Class Residency
Inheritance
System.Object
Residency
Implements
System.ComponentModel.INotifyPropertyChanged
Assembly: Eco.Gameplay.dll
Syntax
public class Residency : Object, IHasClientControlledContainers, IController, IViewController, IHasUniversalID, IProvidesContext, INotifyPropertyChanged, IRPCAuthChecks
Constructors
Residency()
Declaration
Fields
RentForProperty
Declaration
public RentForProperty RentForProperty
Field Value
ResidencyStatusChangedEvent
Declaration
public static ThreadSafeAction<Deed> ResidencyStatusChangedEvent
Field Value
ResidencyValueNeedsUpdateEvent
Declaration
public static ThreadSafeAction<Room, User> ResidencyValueNeedsUpdateEvent
Field Value
Properties
AllowPlotsUnclaiming
Declaration
public bool AllowPlotsUnclaiming { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
ContextProvided
Declaration
public IEnumerable<IContextValue> ContextProvided { get; }
Property Value
| Type |
Description |
| System.Collections.Generic.IEnumerable<IContextValue> |
|
ControllerID
Declaration
public ref int ControllerID { get; }
Property Value
| Type |
Description |
| System.Int32 |
|
Invitations
Declaration
public Invitations Invitations { get; set; }
Property Value
MaxOccupants
Declaration
public GameValue<float> MaxOccupants { get; set; }
Property Value
ParentDeed
Declaration
public Deed ParentDeed { get; }
Property Value
Residents
Declaration
[ConfirmDelete]
public ControllerHashSet<User> Residents { get; set; }
Property Value
ResidentsShortDescription
Declaration
public LocString ResidentsShortDescription { get; }
Property Value
Methods
BecomeResident(Player)
RPC version of BecomeResident method. May require confirmation.
Declaration
public Task<bool> BecomeResident(Player player)
Parameters
| Type |
Name |
Description |
| Player |
player |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task<System.Boolean> |
|
BecomeResidentOfOwnResidency(User, ResidencyChangeReason)
Simplified version of become resident method which doesn't ask any confirmation and usually initiated by automated workflows (i.e. first deed creation, deed removal etc).
Declaration
public bool BecomeResidentOfOwnResidency(User user, ResidencyChangeReason reason)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
CanBecomeResident(User)
Sets visibility of the accept-invite button.
Declaration
public bool CanBecomeResident(User user)
Parameters
| Type |
Name |
Description |
| User |
user |
|
Returns
| Type |
Description |
| System.Boolean |
|
CanLeaveResidency(Player)
Declaration
public bool CanLeaveResidency(Player player)
Parameters
| Type |
Name |
Description |
| Player |
player |
|
Returns
| Type |
Description |
| System.Boolean |
|
DebugForceEvict(User)
Declaration
public void DebugForceEvict(User user)
Parameters
| Type |
Name |
Description |
| User |
user |
|
DebugForceResidency(User)
Declaration
public bool DebugForceResidency(User user)
Parameters
| Type |
Name |
Description |
| User |
user |
|
Returns
| Type |
Description |
| System.Boolean |
|
Destroy()
Declaration
ForceAdd(IEnumerable<User>)
Declaration
public void ForceAdd(IEnumerable<User> users)
Parameters
| Type |
Name |
Description |
| System.Collections.Generic.IEnumerable<User> |
users |
|
ForceClear()
Declaration
GetAllResidentDeeds(User)
Declaration
public static ThreadSafeList<Deed> GetAllResidentDeeds(User user)
Parameters
| Type |
Name |
Description |
| User |
user |
|
Returns
GetHouseResidency(User)
Declaration
public static Deed GetHouseResidency(User user)
Parameters
| Type |
Name |
Description |
| User |
user |
|
Returns
GetResidencyDeed(User)
Returns any deed rented by user, which have any plot.
Declaration
public static Deed GetResidencyDeed(User u)
Parameters
| Type |
Name |
Description |
| User |
u |
|
Returns
Initialize(Deed, Func<User, Boolean>)
Declaration
public void Initialize(Deed parentDeed, Func<User, bool> isOwner)
Parameters
| Type |
Name |
Description |
| Deed |
parentDeed |
|
| System.Func<User, System.Boolean> |
isOwner |
|
IsResident(User, Deed)
Declaration
public static bool IsResident(User user, Deed deed)
Parameters
| Type |
Name |
Description |
| User |
user |
|
| Deed |
deed |
|
Returns
| Type |
Description |
| System.Boolean |
|
LeaveResidency(Player)
Declaration
public Task LeaveResidency(Player player)
Parameters
| Type |
Name |
Description |
| Player |
player |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
OnOwnerChanged(OwnerChangeType)
Declaration
public void OnOwnerChanged(OwnerChangeType changeType)
Parameters
OnPropertyValueChanged()
Declaration
public void OnPropertyValueChanged()
TryDestroy(GameActionPack, ResidencyChangeReason)
Attempts to destroy the Residency objects.
Declaration
public GameActionPack TryDestroy(GameActionPack pack, ResidencyChangeReason reason)
Parameters
Returns
VerifyCanRemove(Player, IClientControlledContainer, Object)
Declaration
public Task<Result> VerifyCanRemove(Player player, IClientControlledContainer container, object obj)
Parameters
Returns
| Type |
Description |
| System.Threading.Tasks.Task<Result> |
|
Events
PropertyChanged
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
| Type |
Description |
| System.ComponentModel.PropertyChangedEventHandler |
|
Implements
System.ComponentModel.INotifyPropertyChanged
Extension Methods