Show / Hide Table of Contents

Class LawSection

Inheritance
System.Object
LawSection
Implements
IHasClientControlledContainers
IController
IViewController
IHasUniversalID
System.ComponentModel.INotifyPropertyChanged
IProvidesContext
IThreadSafeSubscriptions
ISubscriptions<ThreadSafeSubscriptions>
ISubscriptions
ICustomValidity
IValidity
Namespace: Eco.Gameplay.Civics.Laws
Assembly: Eco.Gameplay.dll
Syntax
public class LawSection : Object, IHasClientControlledContainers, IController, IViewController, IHasUniversalID, INotifyPropertyChanged, IProvidesContext, IThreadSafeSubscriptions, ISubscriptions<ThreadSafeSubscriptions>, ISubscriptions, ICustomValidity, IValidity

Constructors

LawSection()

Declaration
public LawSection()

Fields

OnIconsUpdated

Declaration
public ThreadSafeAction OnIconsUpdated
Field Value
Type Description
ThreadSafeAction

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
Type Description
ControllerList<IfThenBlock>

Subscriptions

Declaration
public ref ThreadSafeSubscriptions Subscriptions { get; }
Property Value
Type Description
ThreadSafeSubscriptions

Title

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

Triggers

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

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
Type Name Description
Law law
GameAction action
AccountChangeSet acc
Returns
Type Description
PostResult

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()

Perform(Law, GameAction, AccountChangeSet)

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
Type Name Description
Law law
GameAction action
AccountChangeSet acc
Returns
Type Description
PostResult

TitleAndDescription()

Declaration
public LocString TitleAndDescription()
Returns
Type Description
LocString

Valid()

Declaration
public Result Valid()
Returns
Type Description
Result

Events

PropertyChanged

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

Implements

IHasClientControlledContainers
IController
IViewController
IHasUniversalID
System.ComponentModel.INotifyPropertyChanged
IProvidesContext
IThreadSafeSubscriptions
ISubscriptions<TSubscriptionsList>
ISubscriptions
ICustomValidity
IValidity

Extension Methods

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