Table of Contents

Class StartTogetherAction

Namespace
TinyLife.Actions
Assembly
Tiny Life.dll

An action type that automatically invokes another action after asking someone to start that action together. The resulting actions will not be executed in any type of "together" form, so they must implement togetherness behavior themselves. A start together action type can be created using Create(string, ActionType, int).

public class StartTogetherAction : MultiAction, IGenericDataHolder
Inheritance
JsonTypeSafeGenericDataHolder
StartTogetherAction
Implements
IGenericDataHolder
Inherited Members
JsonTypeSafeGenericDataHolder.GetDataKeys()
Extension Methods

Constructors

StartTogetherAction(ActionType, ActionInfo, params Person[])

public StartTogetherAction(ActionType type, ActionInfo info, params Person[] people)

Parameters

type ActionType
info ActionInfo
people Person[]

Properties

MainAction

The type of the main action to start, which returns the value set through Create(string, ActionType, int).

public ActionType MainAction { get; }

Property Value

ActionType

Methods

AndThenIsCompleted()

MultiAction version of IsCompleted(). This method returns whether or not the main action is completed.

protected override CompletionType AndThenIsCompleted()

Returns

CompletionType

Whether the main action is completed

Create(string, ActionType, int)

Creates a new start together action type that starts the specified main action. The returned type settings will have largely the same settings the mainAction, except that a set of free people will be selectable to ask. The returned type settings' ActionType.AiSettings will additionally contain the SolvedNeeds entry of Social.

public static ActionType.TypeSettings Create(string name, ActionType mainAction, int maxOtherPeople)

Parameters

name string

The name of the action type to create.

mainAction ActionType

The main action to start together.

maxOtherPeople int

The maximum amount of other people that can be selected to ask.

Returns

ActionType.TypeSettings

The action settings for the start together action.

CreateFirstActions()

Return a set of actions that should be executed before this action. Even if the yield statement is used, all actions will be collected into a list at the start of this action's invocation. If no action gets returned in this function, this action fails. If the returned set only contains null items, no first actions will be executed.

protected override IEnumerable<Action> CreateFirstActions()

Returns

IEnumerable<Action>

A set of actions that should run before this action

GetNextAction(CompletionType)

Returns an action that should be queued up immediately after this action completes. The queued up action is immediately started in the slot that this action occupied. Can be null, and is null by default.

public override Action GetNextAction(CompletionType completion)

Parameters

completion CompletionType

The type that this action completed with

Returns

Action

The follow-up action