Class SleepManager
Inheritance
System.Object
SleepManager
Implements
System.ComponentModel.INotifyPropertyChanged
Assembly: Eco.Gameplay.dll
Syntax
[ChatCommandHandler]
public class SleepManager : Singleton<SleepManager>, IController, IViewController, IHasUniversalID, INotifyPropertyChanged, IEditablePluginData, ISimplePluginData, IStorage, ISerializable
Constructors
SleepManager()
Declaration
Fields
OnUserSleep
Declaration
public static ThreadSafeAction<User> OnUserSleep
Field Value
Properties
AcceleratingTime
Declaration
public bool AcceleratingTime { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
ControllerID
Declaration
public ref int ControllerID { get; }
Property Value
Type |
Description |
System.Int32 |
|
EditObject
Declaration
public object EditObject { get; set; }
Property Value
Type |
Description |
System.Object |
|
SleepConfig
Declaration
public SleepConfig SleepConfig { get; }
Property Value
SleepStatus
Declaration
public string SleepStatus { get; set; }
Property Value
Type |
Description |
System.String |
|
SleepTimeStartReal
Declaration
public double SleepTimeStartReal { get; set; }
Property Value
Type |
Description |
System.Double |
|
SleepTimeStartSim
Declaration
public double SleepTimeStartSim { get; set; }
Property Value
Type |
Description |
System.Double |
|
Methods
FastForward(User, Boolean)
Declaration
[ChatSubCommand]
public static void FastForward(User user, bool set = true)
Parameters
Type |
Name |
Description |
User |
user |
|
System.Boolean |
set |
|
GetCategory()
Declaration
public string GetCategory()
Returns
Type |
Description |
System.String |
|
GetDisplayText()
Declaration
public string GetDisplayText()
Returns
Type |
Description |
System.String |
|
GetSleepingUsers(WorldObject)
Declaration
public IEnumerable<User> GetSleepingUsers(WorldObject bed)
Parameters
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<User> |
|
GetStatus()
Declaration
public string GetStatus()
Returns
Type |
Description |
System.String |
|
Initialize(TimedTask)
Declaration
public void Initialize(TimedTask timer)
Parameters
IsUserAsleep(User)
Declaration
public bool IsUserAsleep(User user)
Parameters
Type |
Name |
Description |
User |
user |
|
Returns
Type |
Description |
System.Boolean |
|
OnCreate()
Declaration
OnEditObjectChanged(Object, String)
Declaration
public void OnEditObjectChanged(object o, string param)
Parameters
Type |
Name |
Description |
System.Object |
o |
|
System.String |
param |
|
OnLoaded()
Declaration
Run()
Declaration
ShutdownAsync()
Declaration
public Task ShutdownAsync()
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
SkipTime(User, Single)
Declaration
[ChatSubCommand]
public static void SkipTime(User user, float hoursToSkip = 24F)
Parameters
Type |
Name |
Description |
User |
user |
|
System.Single |
hoursToSkip |
|
UserSleep(User, WorldObject)
Declaration
public void UserSleep(User user, WorldObject bed)
Parameters
UserWake(User)
Declaration
public void UserWake(User user)
Parameters
Type |
Name |
Description |
User |
user |
|
WakeUserUp(User)
If the bed that player's sleeping on is destroyed, we need to wake the player up
Declaration
public void WakeUserUp(User user)
Parameters
Type |
Name |
Description |
User |
user |
|
Events
PropertyChanged
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
Type |
Description |
System.ComponentModel.PropertyChangedEventHandler |
|
Implements
System.ComponentModel.INotifyPropertyChanged
Extension Methods