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

incident

The pursuit as a state machine with named, timed, observable states.

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

incident

The pursuit as a state machine with named, timed, observable states.

  clear ──(someone is noticing)──> noticed ──(a report lands)──> reported ──(responders arrive / timeout)──┐
    ^            │  └────────(a pursuer is certain)────────┐         │                                      v
    │            └─(nobody is)─> clear                     v         └──(a pursuer is certain)──> pursuit <──(seen)── search
    │                                                   pursuit ──(unseen for loseSight)────────────────────> search
    └──────────── escaped <──(the search timer runs out)──────────────────────────────────────────────────────┘
  pursuit ──(a grab completes)──> arrest ──(the arrest sequence ends)──> released ──> clear

It owns the last known position (where the pursuers believe the suspect is) and the search area (centre,
radius growing with time, time left). It does not move anyone: pursuers read it.

  local Incident = require("~.modules.incident")
  local inc = Incident.new(cfg, heat, hub?)     -- cfg: kit config; heat: a heat.module meter
  inc:tick(dt, {
      awareness = 0.4,          -- highest observer meter
      seen = false,             -- a pursuer is certain AND has eyes on the suspect now
      x = 0, z = 0,             -- where the suspect is
      hidden = false,           -- the suspect is in a hiding place
      reports = { { x, z, offence } },   -- reports that landed this tick
      responderAt = false,      -- a responder has reached the last known position
  })
  inc.state   inc.time (seconds in this state)   inc.lkp = { x, z }
  inc.search = { x, z, radius, left, duration } while searching (else nil)
  inc:arrest()     -- a grab completed: state "arrest" (the arrest module runs the sequence)
  inc:broke()      -- the suspect broke free: back to pursuit
  inc:release()    -- the sequence ended: "released" for one tick, then clear; heat reset by the host's rules
  inc:view()       -- { state, time, level, levelName, heat, lkp, search, timer = { left, duration } } for a HUD

Events on the hub: "state" { from, to, level }, "lkp" { x, z }, "searchStarted" { x, z, radius, duration },
"escaped" { level, name, heatBefore }, "arrested" { level }, "released" {}.

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.incident — the pursuit as a state machine with named, timed, observable states.

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

A new incident machine in "clear".

argtypedescription
cfgany
heatany
hubany?

go(self: any, to: string) → void

argtypedescription
selfany
tostring

setLkp(self: any, x: number, z: number, quiet: boolean?) → void

argtypedescription
selfany
xnumber
znumber
quietboolean?

startSearch(self: any) → void

argtypedescription
selfany

tick(dt: number, input: any) → void

Advance the machine. See the header for `input`.

argtypedescription
dtnumber
inputany

arrest( ) → void

A grab completed.

broke( ) → void

The suspect broke the grab: the chase is on again.

release( ) → void

The arrest sequence ended.

view( ) → any

Everything a HUD needs, as one plain table.

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.