Constructor
new PlayerGate(terrain, testable, message)
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
terrain |
Terrain | The underlying terrain this decorator wraps. |
testable |
string | Flag name or item name the player must possess to pass. |
message |
string | null | Optional modal message shown when the player is blocked. |
Extends
Classes
Members
terrain :Terrain
- Source:
- Overrides:
Type:
Methods
getProxiedTerrain()
- Description:
Return the terrain being wrapped (TerrainProxy interface).
- Source:
- Overrides:
onEnterInternal(event, player, cell, _dir)
- Description:
Cancels the movement event if the player does not satisfy PlayerGate#testable, optionally showing a modal message first. Skips silently when the event is already cancelled.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
event |
GameEvent | |
player |
Player | |
cell |
Cell | |
_dir |
Direction | Unused. |