Class LawSection
Inheritance
System.Object
LawSection
Implements
System.ComponentModel.INotifyPropertyChanged
Assembly: Eco.Gameplay.dll
Syntax
public class LawSection : Object, IHasClientControlledContainers, IController, IViewController, IHasUniversalID, INotifyPropertyChanged, IProvidesContext, IThreadSafeSubscriptions, ISubscriptions<ThreadSafeSubscriptions>, ISubscriptions, ICustomValidity, IValidity
Constructors
LawSection()
Declaration
Fields
OnIconsUpdated
Declaration
public ThreadSafeAction OnIconsUpdated
Field Value
Properties
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 |
|
Effects
Declaration
public IEnumerable<LegalAction> Effects { get; }
Property Value
Type |
Description |
System.Collections.Generic.IEnumerable<LegalAction> |
|
IfThenBlocks
Declaration
public ControllerList<IfThenBlock> IfThenBlocks { get; set; }
Property Value
Subscriptions
Declaration
public ref ThreadSafeSubscriptions Subscriptions { get; }
Property Value
Title
Declaration
public string Title { get; set; }
Property Value
Type |
Description |
System.String |
|
Triggers
Declaration
public ControllerList<TriggerSettings> Triggers { get; set; }
Property Value
UserDescription
Declaration
public string UserDescription { get; set; }
Property Value
Type |
Description |
System.String |
|
Methods
CheckConditionsAndApplyEffects(Law, GameAction, AccountChangeSet)
Declaration
public PostResult CheckConditionsAndApplyEffects(Law law, GameAction action, AccountChangeSet acc)
Parameters
Returns
Description()
Declaration
public string Description()
Returns
Type |
Description |
System.String |
|
Icons()
Declaration
public IEnumerable<string> Icons()
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<System.String> |
|
InitializeDraft()
Declaration
public void InitializeDraft()
When performaing a law section we want to allow some limited recursivity but we must make sure to prevent infinite loops.
To prevent infinite loops we save the current section when it's being performed and prevent it from being performed again until it was completely done.
Declaration
public PostResult Perform(Law law, GameAction action, AccountChangeSet acc)
Parameters
Returns
TitleAndDescription()
Declaration
public LocString TitleAndDescription()
Returns
Valid()
Declaration
Returns
Events
PropertyChanged
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
Type |
Description |
System.ComponentModel.PropertyChangedEventHandler |
|
Implements
System.ComponentModel.INotifyPropertyChanged
Extension Methods