kentuckyUtilities

Module: kentuckyUtilities — environment_kentuckyUtilities.lua

What it does

Controls the game-world electricity and water supply by writing directly to sandbox options. Two actions are available:

Trigger type

kentuckyUtilities

Parameters

Parameter Type Default Valid Values Description
type string required "kentuckyUtilities" Must exactly match the module name.
action string required "on", "off" Whether to restore ("on") or cut ("off") electricity and water.
duration number 24 Any positive number How many in-game hours before the state automatically reverses. If omitted when turning on and electricity is currently off, defaults to 24.

Examples

Restore power and water for 6 in-game hours
{ type="kentuckyUtilities", action="on", duration=6 }
Cut power and water for 12 in-game hours
{ type="kentuckyUtilities", action="off", duration=12 }
Restore power using default 24-hour duration
{ type="kentuckyUtilities", action="on" }