FearlessStudios

FS-Blackout

Toggle synchronized world-light blackouts while leaving vehicle lights unaffected.

Start Here

  1. Start FS-Lib, then FS-Blackout.
  2. Decide who may use the blackout command.
  3. Run /worldblackout, then run it again to restore normal lighting.

Expected result: artificial world lights flicker and switch off for connected players; vehicle lights remain unaffected. Players joining during a blackout receive its current state.

Installation

Copy the built FS-Blackout release into your resources directory. The server code calls FS-Lib for its startup version check, so start FS-Lib first even though the current manifest does not declare it as a dependency.

ensure FS-Lib
ensure FS-Blackout

No framework or database is used by the current source. FS-Weather is an optional consumer of the blackout exports.

Configuration

Edit the installed config.lua, then restart the resource.

SettingDefaultMeaning and when to change it
Config.CommandworldblackoutToggle command without a slash. Rename to avoid a command collision.
Config.AcePerms.EnabledfalseEveryone can toggle by default. Enable for staff-only control.
Config.AcePerms.PermissionRequiredworldblackoutACE checked when restrictions are enabled. Change only to match your permission scheme.

For staff-only use, change the existing setting and grant the permission to your intended group:

Config.AcePerms.Enabled = true
add_ace group.admin worldblackout allow

Flicker timing is internal server behavior, not an exposed config.lua setting. Blackout state starts false when the resource starts; there is no persistent database state.

Usage

  1. Run /worldblackout as a permitted player, or worldblackout from the server console.
  2. Allow the transition flicker to finish. While active, periodic flicker bursts are expected.
  3. Run the command again to restore normal lighting. A new toggle cancels an older in-progress transition.

Troubleshooting

The command is denied

Check AcePerms.Enabled, the permission string and group membership. Server-console calls are allowed by the current implementation.

Lights change back unexpectedly

Check for another script controlling artificial lights or calling the blackout exports, including storm-blackout integration. Vehicle lights staying on is intentional.

Startup reports a missing FS-Lib export

Install/start a compatible FS-Lib before FS-Blackout. Its documentation may be temporarily unavailable, but the dependency remains required by the startup code.

Advanced reference

See server exports for explicit state control.