pub fn dev_set_flag_handler(
world: &mut AmbleWorld,
view: &mut View,
flag_name: &str,
)Expand description
Sets a simple boolean flag on the player (DEV_MODE only).
This development command creates or sets a simple flag that represents a boolean condition or completed state. Simple flags are either present (true) or absent (false) and are commonly used for unlock conditions, story progression markers, or achievement tracking.
§Parameters
world- Mutable reference to the game world containing the playerview- Mutable reference to the player’s view for feedback messagesflag_name- Name identifier for the simple flag to set
§Behavior
- Creates a simple (non-sequence) flag with the specified name
- Adds flag to player’s flag collection (replacing any existing flag with same name)
- Displays success message confirming flag was set
- All flag setting is logged at
warnlevel for audit trail
§Use Cases
- Unlocking areas or content that requires specific flags
- Testing trigger conditions that depend on flag states
- Simulating completed story events or achievements