Class BedComponent
Inheritance
System.Object
BedComponent
Implements
System.ComponentModel.INotifyPropertyChanged
Assembly: Eco.Gameplay.dll
Syntax
[ChatCommandHandler]
[RequireComponent]
public class BedComponent : WorldObjectComponent, ILinkable, IOwned, IController, IViewController, IHasUniversalID, IHasSerializableID, IRPCAuthChecks, INotifyPropertyChanged, IThreadSafeSubscriptions, ISubscriptions<ThreadSafeSubscriptions>, ISubscriptions, IHasInteractions, IPickupConfirmationComponent
Constructors
BedComponent()
Declaration
Properties
Availability
Declaration
public override WorldObjectComponentClientAvailability Availability { get; }
Property Value
Overrides
HasFreeSpace
Declaration
public bool HasFreeSpace { get; }
Property Value
Type |
Description |
System.Boolean |
|
MountComponent
Declaration
public MountComponent MountComponent { get; }
Property Value
SleepingUsers
Stores users as value and seat number that is occupied by user as key.
Declaration
public ControllerDictionary<int, User> SleepingUsers { get; }
Property Value
Methods
Bed(User)
Declaration
[ChatSubCommand]
public static Task Bed(User user)
Parameters
Type |
Name |
Description |
User |
user |
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
Destroy()
To avoid awkward behaviour wakes all players on current bed on destroy.
Declaration
public override void Destroy()
Overrides
GetComponentPickupConfirmation()
Returns confirmation popup text for player that want to pickup bed with sleeping players.
Declaration
public LocString GetComponentPickupConfirmation()
Returns
Initialize()
Declaration
public override void Initialize()
Overrides
OnPickup(Player)
To avoid awkward behaviour wakes all users in current bed on pickup.
Declaration
public override void OnPickup(Player player)
Parameters
Type |
Name |
Description |
Player |
player |
|
Overrides
Sleep(Player)
Declaration
public bool Sleep(Player player)
Parameters
Type |
Name |
Description |
Player |
player |
|
Returns
Type |
Description |
System.Boolean |
|
SleepInteraction(Player, InteractionTriggerInfo, InteractionTarget)
Declaration
[Interaction]
public void SleepInteraction(Player player, InteractionTriggerInfo trigger, InteractionTarget target)
Parameters
Wake(User)
Dismounts user from bed, removes from list of "sleepers", removes OnEnterWorld sub. Wakes user in SleepManager
Declaration
public void Wake(User user)
Parameters
Type |
Name |
Description |
User |
user |
|
Implements
System.ComponentModel.INotifyPropertyChanged
Extension Methods