Show / Hide Table of Contents

Class WorkParty

Inheritance
System.Object
SimpleEntry
SimpleProposable
Workable
WorkParty
Implements
ILinkableParameterized<SimpleEntry.NamingOptions>
ICachesValidity
IProposable
IHasID
IReInitializable
IHasReferenceableSerializableID
IHostedObject
INamed
IHasTeleportOption
IHasSerializableID
ILinkableParameterized<System.Boolean>
ILinkable
ICustomValidity
ISuffixName
ISingleEditingUser
IPlayerUseTracking
IThreadSafeSubscriptions
ISubscriptions<ThreadSafeSubscriptions>
ISubscriptions
ISettlementAssociated
System.ComponentModel.INotifyPropertyChanged
IRPCAuthChecks
IHasClientControlledContainers
IController
IViewController
IValidity
IDescribable
IProvidesContext
IHasUserAggregatedAmount
IHasUniversalID
Inherited Members
Workable.Open(Player)
Workable.SetHostObject(WorldObject)
Workable.SetupDefault(User)
Workable.CreatorText(Player)
Workable.LocationText(Player)
SimpleProposable.requiresHost
SimpleProposable.SetRequiresHost(Boolean)
SimpleProposable.Valid()
SimpleProposable.DisableHostedObject()
SimpleProposable.AssignHostObject(WorldObject)
SimpleProposable.CanBeAssignedTo(IOrphanAssignment)
SimpleProposable.OnBeforeStateChangeInternal(ProposableState, CivicsUtils.StateChangeDetailFlags)
SimpleProposable.InitializeDraftProposable()
SimpleProposable.GetPairsOfOldAndNewRevisions(IProposable)
SimpleProposable.ApplyUpdatedProposable(IProposable)
SimpleProposable.OnCreate()
SimpleProposable.Destroyed()
SimpleProposable.SetState(ProposableState)
SimpleProposable.UsingPlayers
SimpleProposable.State
SimpleProposable.HostID
SimpleProposable.HostObject
SimpleProposable.TargetToReplace
SimpleProposable.ScanPeriodically
SimpleProposable.LastValidTime
SimpleProposable.Submitted
SimpleProposable.RevisionParent
SimpleProposable.Election
SimpleProposable.RemovedBy
SimpleProposable.RemovalElection
SimpleProposable.Settlement
SimpleProposable.CurrentEditingUser
SimpleProposable.RequiresHost
SimpleProposable.DescribedWithTable
SimpleProposable.RequiresSlot
SimpleProposable.IsActive
SimpleProposable.WasRemoved
SimpleProposable.IHostedObject.HostingSettlement
SimpleProposable.IHostedObject.CanBeEdited
SimpleProposable.IHostedObject.ExpirationWarningsIssued
SimpleEntry.PostLoad()
SimpleEntry.ToString()
SimpleEntry.SaveInRegistrar()
SimpleEntry.UILinkContent()
SimpleEntry.UILinkContent(Boolean)
SimpleEntry.UILinkContent(SimpleEntry.NamingOptions)
SimpleEntry.ReInitialize()
SimpleEntry.MarkDirty()
SimpleEntry.UserDescription
SimpleEntry.Name
SimpleEntry.Creator
SimpleEntry.NameSuffix
SimpleEntry.CreationTime
SimpleEntry.CachedValidity
SimpleEntry.IsDestroyed
SimpleEntry.OnValidityChanged
SimpleEntry.Initialized
SimpleEntry.MarkedUpName
SimpleEntry.Id
SimpleEntry.IconName
SimpleEntry.Registrar
SimpleEntry.WorldTimeSinceCreation
SimpleEntry.CanBeDeleted
SimpleEntry.TextName
SimpleEntry.Scannable
SimpleEntry.Style
SimpleEntry.ControllerID
SimpleEntry.TrueResult
SimpleEntry.Subscriptions
SimpleEntry.PropertyChanged
Namespace: Eco.Gameplay.Economy.WorkParties
Assembly: Eco.Gameplay.dll
Syntax
public class WorkParty : Workable, ILinkableParameterized<SimpleEntry.NamingOptions>, ICachesValidity, IProposable, IHasID, IReInitializable, IHasReferenceableSerializableID, IHostedObject, INamed, IHasTeleportOption, IHasSerializableID, ILinkableParameterized<bool>, ILinkable, ICustomValidity, ISuffixName, ISingleEditingUser, IPlayerUseTracking, IThreadSafeSubscriptions, ISubscriptions<ThreadSafeSubscriptions>, ISubscriptions, ISettlementAssociated, INotifyPropertyChanged, IRPCAuthChecks, IHasClientControlledContainers, IController, IViewController, IValidity, IDescribable, IProvidesContext, IHasUserAggregatedAmount, IHasUniversalID

Constructors

WorkParty()

Declaration
public WorkParty()

Properties

ContextProvided

Declaration
public IEnumerable<IContextValue> ContextProvided { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<IContextValue>

ExpandRoles

Declaration
public bool ExpandRoles { get; set; }
Property Value
Type Description
System.Boolean

GeneralRequirements

Declaration
public string GeneralRequirements { get; }
Property Value
Type Description
System.String

GeneralRequirementsBool

Declaration
public GameValue<bool> GeneralRequirementsBool { get; set; }
Property Value
Type Description
GameValue<System.Boolean>

HostContainer

Declaration
public override ContainedWorkables HostContainer { get; set; }
Property Value
Type Description
ContainedWorkables
Overrides
Workable.HostContainer

HostObjectName

Declaration
public string HostObjectName { get; }
Property Value
Type Description
System.String

LaborerChangedEvent

Declaration
public static ThreadSafeAction<WorkParty> LaborerChangedEvent { get; }
Property Value
Type Description
ThreadSafeAction<WorkParty>

Laborers

Declaration
public ControllerList<Laborer> Laborers { get; set; }
Property Value
Type Description
ControllerList<Laborer>

Owner

Declaration
public override User Owner { get; }
Property Value
Type Description
User
Overrides
Workable.Owner

Payment

Declaration
public ControllerList<Payment> Payment { get; set; }
Property Value
Type Description
ControllerList<Payment>

PercentDone

Declaration
public float PercentDone { get; set; }
Property Value
Type Description
System.Single

Position

Declaration
public Vector3i Position { get; }
Property Value
Type Description
Vector3i

ShowLocationTooltip

Declaration
public override bool ShowLocationTooltip { get; }
Property Value
Type Description
System.Boolean
Overrides
Workable.ShowLocationTooltip

UIName

Declaration
public override string UIName { get; }
Property Value
Type Description
System.String
Overrides
Workable.UIName

Work

Declaration
public ControllerList<Work> Work { get; set; }
Property Value
Type Description
ControllerList<Work>

WorkDescriptionChangedEvent

Declaration
public static ThreadSafeAction<WorkParty> WorkDescriptionChangedEvent { get; }
Property Value
Type Description
ThreadSafeAction<WorkParty>

Methods

ActionPerformed(GameAction)

Declaration
public void ActionPerformed(GameAction action)
Parameters
Type Name Description
GameAction action

AddPayment(Player)

Declaration
public void AddPayment(Player player)
Parameters
Type Name Description
Player player

Cancel(Player)

Declaration
[RPCAuthMaxProposableState]
public Task<bool> Cancel(Player player)
Parameters
Type Name Description
Player player
Returns
Type Description
System.Threading.Tasks.Task<System.Boolean>

ContainsUser(User)

Declaration
public bool ContainsUser(User user)
Parameters
Type Name Description
User user
Returns
Type Description
System.Boolean

Description()

Declaration
public override LocString Description()
Returns
Type Description
LocString
Overrides
SimpleEntry.Description()

EditPayment(Player, Int32)

Declaration
public void EditPayment(Player player, int index)
Parameters
Type Name Description
Player player
System.Int32 index

ForceCancel()

Declaration
public void ForceCancel()

GetWork<TWork>(WorkOrder)

Declaration
public TWork GetWork<TWork>(WorkOrder order)
    where TWork : WorkOrderWork
Parameters
Type Name Description
WorkOrder order
Returns
Type Description
TWork
Type Parameters
Name Description
TWork

Initialize()

Declaration
public override void Initialize()
Overrides
SimpleProposable.Initialize()

Join(Player, Laborer)

Declaration
[RPCAuthMaxProposableState]
public void Join(Player player, Laborer laborer)
Parameters
Type Name Description
Player player
Laborer laborer

Join(User, Laborer)

Declaration
public Result Join(User user, Laborer laborer)
Parameters
Type Name Description
User user
Laborer laborer
Returns
Type Description
Result

Leave(Player)

Declaration
[RPCAuthMaxProposableState]
public Task Leave(Player player)
Parameters
Type Name Description
Player player
Returns
Type Description
System.Threading.Tasks.Task

Leave(User, Boolean)

Declaration
public Task<Result> Leave(User user, bool forced = false)
Parameters
Type Name Description
User user
System.Boolean forced
Returns
Type Description
System.Threading.Tasks.Task<Result>

Notify(LocString)

Declaration
public void Notify(LocString text)
Parameters
Type Name Description
LocString text

OnLinkClicked(TooltipOrigin, TooltipClickContext, User)

Declaration
public override void OnLinkClicked(TooltipOrigin origin, TooltipClickContext clickContext, User user)
Parameters
Type Name Description
TooltipOrigin origin
TooltipClickContext clickContext
User user
Overrides
SimpleProposable.OnLinkClicked(TooltipOrigin, TooltipClickContext, User)

OnStateChangedInternal(ProposableState, CivicsUtils.StateChangeDetailFlags)

Declaration
public override void OnStateChangedInternal(ProposableState oldState, CivicsUtils.StateChangeDetailFlags flags)
Parameters
Type Name Description
ProposableState oldState
CivicsUtils.StateChangeDetailFlags flags
Overrides
Workable.OnStateChangedInternal(ProposableState, CivicsUtils.StateChangeDetailFlags)

OnUserAggregateAmountDue(User, Single)

Handles aggregate payments for PayAsYouGo feature, User is the laborer reference and weighted percent delta is the change in his contribution to the work party.

Declaration
public void OnUserAggregateAmountDue(User user, float weightedPercentDelta)
Parameters
Type Name Description
User user

The targeted user reference.

System.Single weightedPercentDelta

Post(User)

Declaration
public Result Post(User user)
Parameters
Type Name Description
User user
Returns
Type Description
Result

RelevantUsers()

Declaration
public override IEnumerable<User> RelevantUsers()
Returns
Type Description
System.Collections.Generic.IEnumerable<User>
Overrides
Workable.RelevantUsers()

SetGeneralRequirements(Player)

Declaration
public void SetGeneralRequirements(Player player)
Parameters
Type Name Description
Player player

SetWorkOrders(Player, List<WorkOrder>)

Declaration
public void SetWorkOrders(Player player, List<WorkOrder> workOrders)
Parameters
Type Name Description
Player player
System.Collections.Generic.List<WorkOrder> workOrders

SetWorkOrders(User, List<WorkOrder>, Boolean)

Declaration
public void SetWorkOrders(User user, List<WorkOrder> workOrders, bool quiet)
Parameters
Type Name Description
User user
System.Collections.Generic.List<WorkOrder> workOrders
System.Boolean quiet

ShortWorkDesc()

Declaration
public LocString ShortWorkDesc()
Returns
Type Description
LocString

ShouldOverrideAuth(GameAction)

Declaration
public bool ShouldOverrideAuth(GameAction action)
Parameters
Type Name Description
GameAction action
Returns
Type Description
System.Boolean

StateDesc()

Declaration
public LocString StateDesc()
Returns
Type Description
LocString

Users()

Declaration
public IEnumerable<User> Users()
Returns
Type Description
System.Collections.Generic.IEnumerable<User>

WorkOrderDestroyed(WorkOrder)

Declaration
public void WorkOrderDestroyed(WorkOrder order)
Parameters
Type Name Description
WorkOrder order

Implements

ILinkableParameterized<T>
ICachesValidity
IProposable
IHasID
IReInitializable
IHasReferenceableSerializableID
IHostedObject
INamed
IHasTeleportOption
IHasSerializableID
ILinkableParameterized<T>
ILinkable
ICustomValidity
ISuffixName
ISingleEditingUser
IPlayerUseTracking
IThreadSafeSubscriptions
ISubscriptions<TSubscriptionsList>
ISubscriptions
ISettlementAssociated
System.ComponentModel.INotifyPropertyChanged
IRPCAuthChecks
IHasClientControlledContainers
IController
IViewController
IValidity
IDescribable
IProvidesContext
IHasUserAggregatedAmount
IHasUniversalID

Extension Methods

TagUtils.TagNames(Object, Boolean)
TagUtils.TagDisplayNames(Object, Boolean)
ClientSetViewExtensions.SetClassOfProperty(Object, Player, String, String, Int32)
WorkPartyExtensions.GetCollectResourcesWork(WorkParty, WorkOrder)
TypeTooltipExtensions.UILinkGeneric(Object)
ILinkableTooltipLibrary.SimpleProposableLinkClicked(SimpleProposable)
MiscTooltipLibrary.SimpleEntryTooltip(SimpleEntry, User)
MiscTooltipLibrary.SimpleEntryTitle(SimpleEntry)
WorkPartyTooltipLibrary.WorkPartyTooltip(WorkParty)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾