ScheduleSlot

An individual time slot inside an NPC's daily routine.

Constructor

new ScheduleSlot(config)

Parameters:
NameTypeDescription
configObject

Configuration object.

Properties
NameTypeAttributesDefaultDescription
startnumber | string

Start time (hour 0-24 or "HH:MM").

endnumber | string

End time (hour 0-24 or "HH:MM").

activitystring<optional>
"idle"

Scheduled activity.

destinationObject | string<optional>
null

Primary destination point.

fallbacksArray<optional>
[]

Alternate destination points if primary is occupied.

fallbackDestinationObject | string<optional>
null

Single fallback point shorthand.

fallbackActivitystring<optional>
"idle"

Activity if all destinations are occupied.

idstring<optional>

Optional identifier for the slot.

prioritynumber<optional>
0

Priority for overlapping slots (higher wins).

isAppointmentboolean<optional>
false

Whether this slot represents an appointment.

onEnterfunction<optional>
null

Lifecycle callback when slot becomes active.

onExitfunction<optional>
null

Lifecycle callback when slot ends.

dataObject<optional>
{}

Additional custom metadata.

Classes

ScheduleSlot

Members

duration

Duration in hours of this slot.

wrapsMidnight

Whether this slot wraps around midnight (e.g. 22:00 to 06:00).

Methods

isActive(hour) → {boolean}

Checks if this slot is active at the given game hour.

Parameters:
NameTypeDescription
hournumber | string

Hour to test.

Returns:
Type: 
boolean