▣
module · drop-in viewer
asset⌬ modulemoduleprimary: init.luau·part ofpackage pursuitKit.package·originates fromworld 0a0b119f-a…
party
Several suspects in one world: heat stays each one's own, shared when they act together.
by·posted 11d ago
What it does
party
Several suspects in one world: heat stays each one's own, shared when they act together.
Every suspect has a director of its own (its own awareness, heat, incident, arrest). The party joins them with
one rule: suspects standing within cfg.party.radius of each other are ACTING TOGETHER, so an offence one of
them is charged with also charges the others a share of its points, and a report that lands on one opens the
others' eyes to where it happened. Apart, nothing one does touches another.
local Party = require("~.modules.party")
local party = Party.new(cfg.party)
party:join("p1", director1) party:join("p2", director2) party:leave("p2")
party:place("p1", x, z) -- where each suspect is (every tick)
party:together("p1") -- ids acting with p1 now, sorted (p1 itself excluded)
local shared = party:charge("p1", "paintGuard", 15)
-- p1 was charged 15 points for an offence: accomplices get cfg.share of them; returns { [id] = points }
party:reported("p1", x, z) -- a report on p1 landed there: accomplices' pursuers are told
-- the place too (their incidents get the report without heat)
party:members() -- ids, sorted
Config (cfg.party): radius (metres), share (0..1 of an accomplice's offence points).
The interface is documented in the header of init.luau; this file repeats it for the asset browser.
Discussion
Scoped to this part · feeds back into the world's score.
Sign in to post.sign in
No comments yet. Be the first.