Table of Contents

Class CurfewManager

Namespace
S1API.Law
Assembly
S1API.dll

Manages the curfew system, including activation state and timing. The curfew restricts player movement during nighttime hours (9 PM to 5 AM).

public static class CurfewManager
Inheritance
CurfewManager
Inherited Members

Fields

CurfewEndTime

The time (in 24-hour format) when the curfew ends. Default: 05:00 (5 AM).

public const int CurfewEndTime = 500

Field Value

int

CurfewStartTime

The time (in 24-hour format) when the curfew officially begins. Default: 21:00 (9 PM).

public const int CurfewStartTime = 2100

Field Value

int

HardCurfewStartTime

The time (in 24-hour format) when the hard curfew begins. During hard curfew, violations result in immediate police response. Default: 21:15 (9:15 PM).

public const int HardCurfewStartTime = 2115

Field Value

int

HourBeforeCurfew

The time (in 24-hour format) when curfew warnings begin appearing. Default: 20:00 (8 PM) - Two hours before curfew starts.

public const int HourBeforeCurfew = 2000

Field Value

int

WarningTime

The time (in 24-hour format) when the 30-minute warning is displayed. Default: 20:30 (8:30 PM).

public const int WarningTime = 2030

Field Value

int

Properties

IsCurrentlyActive

Gets a value indicating whether the curfew is currently active. True between 9 PM and 5 AM when curfew is enabled.

public static bool IsCurrentlyActive { get; }

Property Value

bool

IsEnabled

Gets a value indicating whether the curfew system is enabled. When disabled, no curfew violations will occur.

public static bool IsEnabled { get; }

Property Value

bool

IsHardCurfewActive

Gets a value indicating whether hard curfew is currently active. During hard curfew (9:15 PM - 5 AM), violations result in immediate police dispatch.

public static bool IsHardCurfewActive { get; }

Property Value

bool

Methods

DisableCurfew()

Disables the curfew system. VMS boards will be hidden and no curfew violations will occur.

public static void DisableCurfew()

EnableCurfew()

Enables the curfew system. VMS boards will display curfew information and violations will be enforced.

public static void EnableCurfew()

IsWithinCurfewHours()

Checks if the current game time is within the curfew period.

public static bool IsWithinCurfewHours()

Returns

bool

True if the current time is between 9 PM and 5 AM.

IsWithinHardCurfewHours()

Checks if the current game time is within the hard curfew period.

public static bool IsWithinHardCurfewHours()

Returns

bool

True if the current time is between 9:15 PM and 5 AM.

MinutesUntilCurfew()

Gets the number of minutes until curfew starts.

public static int MinutesUntilCurfew()

Returns

int

Minutes until curfew, or 0 if curfew is already active or disabled.

MinutesUntilCurfewEnds()

Gets the number of minutes until curfew ends.

public static int MinutesUntilCurfewEnds()

Returns

int

Minutes until curfew ends, or 0 if curfew is not currently active.