Class SitSpec
Specifies an action that seats an NPC at an ScheduleOne.AvatarFramework.Animation.AvatarSeatSet.
public sealed class SitSpec : IScheduleActionSpec
- Inheritance
-
SitSpec
- Implements
- Inherited Members
- Extension Methods
Remarks
The specification resolves an ScheduleOne.AvatarFramework.Animation.AvatarSeatSet using one of the provided lookup mechanisms and configures a ScheduleOne.NPCs.Schedules.NPCEvent_Sit instance on the target schedule. This allows mods to declaratively schedule seating behaviour through the S1API builder.
Important: When multiple seat sets share the same name (e.g. "outdoorbench"), use SeatSetPath to target a specific one by its full hierarchy path (e.g. "Map/Hyland Point/Region_Docks/WaterFront/OutdoorBench (1)"). Name lookups return the first match found.
Duration: You must set DurationMinutes to a positive value.
The game's NPCEvent_Sit uses Duration to calculate its end time. With Duration=0 the action
has a zero-width time range and will never be matched by the schedule manager.
Seat set resolution failure: If the seat set cannot be resolved, the action
is disabled to prevent a NullReferenceException in NPCEvent_Sit.Started() which would
permanently break the NPC's schedule. A warning is logged to help diagnose the issue.
Constructors
SitSpec()
public SitSpec()
Properties
DurationMinutes
Gets or sets the duration of the sit action in minutes. If not set (0 or negative), defaults to 60 minutes. Must be positive for the action to trigger.
public int DurationMinutes { get; set; }
Property Value
IncludeInactiveSearch
Gets or sets whether lookups should consider inactive seat sets. Defaults to true.
public bool IncludeInactiveSearch { get; set; }
Property Value
Name
Gets or sets the optional display name for this action. Defaults to "Sit".
public string Name { get; set; }
Property Value
SeatSetName
Gets or sets the GameObject name of the desired seat set.
public string SeatSetName { get; set; }
Property Value
Remarks
Name lookups search all seat sets in the scene and are case-insensitive.
SeatSetPath
Gets or sets a transform path (e.g. "@Locations/Cafe/Seats/Booth01") used to locate the seat set.
public string SeatSetPath { get; set; }
Property Value
Remarks
Paths are matched case-insensitively against full transform hierarchies. Inactive objects are included
when IncludeInactiveSearch is true.
SeatSetReference
Gets or sets a direct Unity object reference that contains the desired seat set.
public Object SeatSetReference { get; set; }
Property Value
- Object
Remarks
The reference may be an ScheduleOne.AvatarFramework.Animation.AvatarSeatSet, a UnityEngine.GameObject, or any UnityEngine.Component that is part of the seat set hierarchy.
StartTime
Gets or sets the start time for this action, in 24-hour time (e.g. 830 for 8:30 AM).
public int StartTime { get; set; }
Property Value
WarpIfSkipped
Gets or sets whether the NPC should be warped to the seat if the action is skipped.
public bool WarpIfSkipped { get; set; }