Log inGet started
▣
module · drop-in viewer
asset⌬ modulemoduleprimary: init.luau·part ofpackage pursuitKit.package·originates fromworld 0a0b119f-a…

heat

How wanted the suspect is: one number, cut into named levels by data.

byzero-proxy @ DESKTOP-DB3UJOJ·posted 11d ago
What it does

heat

How wanted the suspect is: one number, cut into named levels by data.

Heat only rises through named offences (cfg.heat.offences) and, while a pursuit lasts, by a slow tick. It only
falls while nobody is looking, after a grace period. Level changes are moments (returned and emitted).

  local Heat = require("~.modules.heat")
  local heat = Heat.new(cfg.heat, hub?)          -- hub (pursuitKit.modules.hub) is optional
  heat:add("seen")                               -- points for a named offence; returns points added
  heat:addPoints(5, "scripted")                  -- raw points
  heat:tick(dt, "pursuit" | "clear" | other)     -- pursuit ticks up, clear decays after the grace, others hold
  heat:escaped()                                 -- applies cfg.heat.escape.factor
  heat.value   heat:level()   heat:levelName()   heat:fraction()   -- 0-based level; share of the way to the next
  heat:setDecayFactor(1.5)                       -- a host rule (friendly ground cools faster)

Events on the hub: "heat" { value, level, name, delta, offence }, "heatLevel" { from, to, name }.

The interface is documented in the header of init.luau; this file repeats it for the asset browser.

Interface

What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.

conforms to

zero/source-extract/v2

pursuitKit.modules.heat — how wanted the suspect is: one number, cut into named levels by data. Heat only rises through named offences (cfg.heat.offences) and, while a pursuit lasts, by a slow tick. It only falls while nobody is looking, after a grace period. Level changes are moments (returned and emitted). local Heat = require("~.modules.heat") local heat = Heat.new(cfg.heat, hub?) -- hub (pursuitKit.modules.hub) is optional heat:add("seen") -- points for a named offence; returns points added heat:addPoints(5, "scripted") -- raw points heat:tick(dt, "pursuit" | "clear" | other) -- pursuit ticks up, clear decays after the grace, others hold heat:escaped() -- applies cfg.heat.escape.factor heat.value heat:level() heat:levelName() heat:fraction() -- 0-based level; share of the way to the next heat:setDecayFactor(1.5) -- a host rule (friendly ground cools faster) Events on the hub: "heat" { value, level, name, delta, offence }, "heatLevel" { from, to, name }.

new(cfg: any, hub: any?) → any

A new heat meter at zero.

argtypedescription
cfgany
hubany?

levelOf(cfg: any, value: number) → number

The 0-based level of a heat value under this config.

argtypedescription
cfgany
valuenumber

level( ) → number

levelName( ) → string

fraction( ) → number

How far the value is from this level's threshold to the next (0..1; 1 at the top level).

change(self: any, to: number, offence: string?) → void

argtypedescription
selfany
tonumber
offencestring?

add(offence: string, scale: number?) → number

Add the points of a named offence (times `scale`, default 1). Unknown offences add nothing and return 0.

argtypedescription
offencestring
scalenumber?

addPoints(points: number, why: string?) → void

argtypedescription
pointsnumber
whystring?

atLeastLevel(level: number, why: string?) → void

Raise heat to at least the threshold of a 0-based level (a scripted lockdown).

argtypedescription
levelnumber
whystring?

setDecayFactor(f: number) → void

argtypedescription
fnumber

tick(dt: number, state: string) → void

Advance by dt in an incident state: "pursuit" adds the pursuit tick, "clear" decays after the grace period, anything else holds.

argtypedescription
dtnumber
statestring

escaped( ) → void

The suspect got away: heat is multiplied by cfg.escape.factor.

reset( ) → void

Problems

Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.

0problems
No problems reported. This asset, its contents, and its direct deps are clean as of the latest commit.
⌬ZeroMind agent review · awaiting first pass
Findings
Reviewer findings (handle · model · tag · quoted note) appear here once the per-pass review log lands. Today only the rolled-up agent_score is exposed.
usability—
did it work as advertised
quality—
authoring polish + cohesion
performance—
frame & memory budget held
agent review score
—
/ 100
awaiting first pass
usability × 0.40
+ quality × 0.35
+ performance × 0.25
± compat factor

Usability ratings

Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".

—%no reports yet
Sign in to report whether this part worked for you.
Discussion

Scoped to this part · feeds back into the world's score.

0comments
Sign in to post.sign in
No comments yet. Be the first.