Show / Hide Table of Contents

Class Residency

Inheritance
System.Object
Residency
Implements
IHasClientControlledContainers
IController
IViewController
IHasUniversalID
IProvidesContext
System.ComponentModel.INotifyPropertyChanged
IRPCAuthChecks
Namespace: Eco.Gameplay.Property
Assembly: Eco.Gameplay.dll
Syntax
public class Residency : Object, IHasClientControlledContainers, IController, IViewController, IHasUniversalID, IProvidesContext, INotifyPropertyChanged, IRPCAuthChecks

Constructors

Residency()

Declaration
public Residency()

Fields

RentForProperty

Declaration
public RentForProperty RentForProperty
Field Value
Type Description
RentForProperty

ResidencyStatusChangedEvent

Declaration
public static ThreadSafeAction<Deed> ResidencyStatusChangedEvent
Field Value
Type Description
ThreadSafeAction<Deed>

ResidencyValueNeedsUpdateEvent

Declaration
public static ThreadSafeAction<Room, User> ResidencyValueNeedsUpdateEvent
Field Value
Type Description
ThreadSafeAction<Room, User>

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
Type Description
Invitations

MaxOccupants

Declaration
public GameValue<float> MaxOccupants { get; set; }
Property Value
Type Description
GameValue<System.Single>

ParentDeed

Declaration
public Deed ParentDeed { get; }
Property Value
Type Description
Deed

Residents

Declaration
[ConfirmDelete]
public ControllerHashSet<User> Residents { get; set; }
Property Value
Type Description
ControllerHashSet<User>

ResidentsShortDescription

Declaration
public LocString ResidentsShortDescription { get; }
Property Value
Type Description
LocString

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
Type Name Description
User user
ResidencyChangeReason reason
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
public void Destroy()

ForceAdd(IEnumerable<User>)

Declaration
public void ForceAdd(IEnumerable<User> users)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<User> users

ForceClear()

Declaration
public void ForceClear()

GetAllResidentDeeds(User)

Declaration
public static ThreadSafeList<Deed> GetAllResidentDeeds(User user)
Parameters
Type Name Description
User user
Returns
Type Description
ThreadSafeList<Deed>

GetHouseResidency(User)

Declaration
public static Deed GetHouseResidency(User user)
Parameters
Type Name Description
User user
Returns
Type Description
Deed

GetResidencyHouse(User)

Returns any deed rented by user, which have any plot.

Declaration
public static Deed GetResidencyHouse(User u)
Parameters
Type Name Description
User u
Returns
Type Description
Deed

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
Type Name Description
OwnerChangeType changeType

OnPropertyValueChanged()

Declaration
public void OnPropertyValueChanged()

TryDestroy(GameActionPack, ResidencyChangeReason)

Attempts to destroy the Residency objects.

Declaration
public GameActionPack TryDestroy(GameActionPack pack, ResidencyChangeReason reason)
Parameters
Type Name Description
GameActionPack pack
ResidencyChangeReason reason
Returns
Type Description
GameActionPack

VerifyCanRemove(Player, IClientControlledContainer, Object)

Declaration
public Task<Result> VerifyCanRemove(Player player, IClientControlledContainer container, object obj)
Parameters
Type Name Description
Player player
IClientControlledContainer container
System.Object obj
Returns
Type Description
System.Threading.Tasks.Task<Result>

Events

PropertyChanged

Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
Type Description
System.ComponentModel.PropertyChangedEventHandler

Implements

IHasClientControlledContainers
IController
IViewController
IHasUniversalID
IProvidesContext
System.ComponentModel.INotifyPropertyChanged
IRPCAuthChecks

Extension Methods

TagUtils.TagNames(Object, Boolean)
TagUtils.TagDisplayNames(Object, Boolean)
ClientSetViewExtensions.SetClassOfProperty(Object, Player, String, String, Int32)
TypeTooltipExtensions.UILinkGeneric(Object)
ResidencyTooltipLibrary.ResidentsTooltip(Residency)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾