Methods
(static) advanceBurn(params) → {InteractionResult}
Advance burning progression. Transitions to CHARRED when duration met.
| Name | Type | Description | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params | object | Properties
|
- Source
- Type:
- InteractionResult
(static) applyInteraction(params) → {InteractionResult|string}
Compute next state and apply interaction rules.
| Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params | object | Properties
|
- Source
- Type:
- InteractionResult |
string
(static) getEffectiveTraversalCost(arg1, arg2opt) → {number}
Query effective traversal cost based on material attributes and current state. Supports both getEffectiveTraversalCost(materialId, state) and getEffectiveTraversalCost({ materialId, state }).
| Name | Type | Attributes | Description |
|---|---|---|---|
arg1 | string | | materialId or options object. | |
arg2 | string | <optional> | state if arg1 is materialId. |
- Source
Effective traversal cost (>= 1.0).
- Type:
- number
(static) getHazardStatus(arg1, arg2opt) → {Object}
Query hazard status based on material attributes and current state. Supports both getHazardStatus(materialId, state) and getHazardStatus({ materialId, state }).
| Name | Type | Attributes | Description |
|---|---|---|---|
arg1 | string | | materialId or options object. | |
arg2 | string | <optional> | state if arg1 is materialId. |
- Source
- Type:
- Object
(static) isHazard(arg1, arg2opt) → {boolean}
Check if the material and state combination constitutes a hazard.
| Name | Type | Attributes | Description |
|---|---|---|---|
arg1 | string | | materialId or options object. | |
arg2 | string | <optional> | state. |
- Source
- Type:
- boolean
(static) query(query) → {object}
Query traversal cost and hazard status together.
| Name | Type | Description |
|---|---|---|
query | object | Query parameters { materialId, state }. |
- Source
- Type:
- object
(static) transition(params) → {string}
Helper to compute only the next state string.
| Name | Type | Description |
|---|---|---|
params | object | Same parameters as applyInteraction. |
- Source
The next state string.
- Type:
- string