HammeriteNavigationBrushProperties
Navigation. Inherits RefCounted
What a room costs to cross, authored on the air brush that carves it.
Everything else this addon knows about the ground it measures: how much headroom there is, how wide the way through is, how far the sill stands above the floor, how deep the water over it is. Measurement cannot answer what the ground is made OF - that a courtyard is ankle-deep in rubble, that a cellar floor is slick with mud, that a gallery is the sort of place a guard hurries through. Those are authoring decisions, and the brush the room is carved from is where they belong: they move with it, copy with it, and survive a recompile, which nothing derived does.
Cost is a multiplier on distance, so 1 is ordinary ground and 2 means an agent would rather walk twice as far on something else. It multiplies whatever the agent's own profile decides - crossing a muddy crawlspace bent double costs both.
Methods
| Returns | Method |
|---|---|
float | default_travel_cost() static |
StringName | key_travel_cost() static |
void | register() static |
StringName | schema_id() static |
float | travel_cost_for_cell(map: HammeriteMap, cell: HammeriteCell) static |
Method descriptions
default_travel_cost()
static func default_travel_cost() -> float
Travel cost of a room nobody set one on: ordinary ground.
key_travel_cost()
static func key_travel_cost() -> StringName
Brush property: the room's travel cost, a multiplier on distance from 0.1 to 8. Read it through travel_cost_for_cell(), which supplies the default.
register()
static func register() -> void
Declare the navigation schema with HammeriteBrushPropertyRegistry.
Called from the HammeriteNavigation autoload rather than from the editor plugin, for the reason the acoustic one is: the registry supplies DEFAULTS at read time, so a shipped game with no editor in it still has to be able to resolve a property no author ever set.
Idempotent - registering twice replaces the schema rather than stacking a second copy.
schema_id()
static func schema_id() -> StringName
Schema id, and therefore the namespace of every key below.
travel_cost_for_cell()
static func travel_cost_for_cell(map: HammeriteMap, cell: HammeriteCell) -> float
The authored travel cost of the room cell belongs to, never below 0.01.