▣
module · drop-in viewer
asset⌬ modulemoduleprimary: init.luau·part ofpackage pursuitKit.package·originates fromworld 0a0b119f-a…
description
What the pursuers know the suspect looks like, and losing it.
by·posted 11d ago
What it does
description
What the pursuers know the suspect looks like, and losing it.
A description is a set of tags with values ("jacket" = "ochre", "vehicle.kind" = "van", "vehicle.colour" =
"blue", "vehicle.plate" = "VR 1123"), noted when the suspect
is identified. While the suspect's current appearance matches any noted tag, observers treat it as worth
looking at (perception's `described`). Changing the thing a tag describes, out of sight, sheds that tag.
local Description = require("~.modules.description")
local d = Description.new()
d:note({ jacket = "ochre", vehicle = "blue van" })
d:matches({ jacket = "ochre" }) -- true, { "jacket" }
d:matches({ jacket = "grey", vehicle = nil }) -- false, {} (on foot, jacket turned)
d:strength({ jacket = "ochre" }) -- 0..1: the share of what they know that the appearance matches
d:shed("jacket") -- they no longer know the jacket (returns true if they did)
d:known() -- { jacket = "ochre", ... } a copy, for UI
d:clear()
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.