now
now: (HazardField) -> numberThe absolute tick of the field's first layer.
scene:hazardField(…)| Method | Returns | Description |
|---|---|---|
now() | number | The absolute tick of the field's first layer. |
horizonTicks() | number | How many ticks ahead it answers for. |
blocked(WorldPoint, number, HazardGroups?, boolean?) | boolean | Whether a tile is impassable at a tick. |
cost(WorldPoint, number) | number | Extra entry cost for a tile at a tick, summed over every costing source. |
firstBlocked(WorldPoint, number, number, HazardGroups?, boolean?) | number? | The first tick in a range at which a tile is impassable: nil is safe to WAIT on for the whole range, as opposed to running through it. |
inReach(WorldPoint, HazardGroups?) | boolean | Whether a group EVER reaches a tile across the horizon: "am I standing in the corridor", asked without caring when. |
groupsAt(WorldPoint, number) | { number } | Which groups block a tile at a tick. |
blockedTiles(number, HazardGroups?) | { WorldPoint } | Every tile a group blocks at a tick. For an overlay, not a hot path. |
| Method | Returns | Description |
|---|---|---|
SceneDomain.hazardField | HazardField? | Expand a set of scheduled hazards over the scene: which tiles are lethal on which ticks. |
nownow: (HazardField) -> numberThe absolute tick of the field's first layer.
horizonTickshorizonTicks: (HazardField) -> numberHow many ticks ahead it answers for.
blockedblocked: (HazardField, WorldPoint, number, HazardGroups?, boolean?) -> booleanWhether a tile is impassable at a tick.
tiletickgroupsgracedcostcost: (HazardField, WorldPoint, number) -> numberExtra entry cost for a tile at a tick, summed over every costing source.
tiletickfirstBlockedfirstBlocked: (HazardField, WorldPoint, number, number, HazardGroups?, boolean?) -> number?The first tick in a range at which a tile is impassable: nil is safe to WAIT on for the whole range, as opposed to running through it.
tilefromtogroupsgracednil when it is clear for the whole range.inReachinReach: (HazardField, WorldPoint, HazardGroups?) -> booleanWhether a group EVER reaches a tile across the horizon: "am I standing in the corridor", asked without caring when.
tilegroupsgroupsAtgroupsAt: (HazardField, WorldPoint, number) -> { number }Which groups block a tile at a tick.
tiletickblockedTilesblockedTiles: (HazardField, number, HazardGroups?) -> { WorldPoint }Every tile a group blocks at a tick. For an overlay, not a hot path.
tickgroups