Table of Contents

Class HoldingPersonAction

Namespace
TinyLife.Actions
Assembly
TinyLife.dll

This is a SocialAction with additional capabilities that can be used for actions that involve one PersonLike picking up and holding another PersonLike, especially babies.

public abstract class HoldingPersonAction : SocialAction, IGenericDataHolder
Inheritance
JsonTypeSafeGenericDataHolder
HoldingPersonAction
Implements
IGenericDataHolder
Inherited Members
JsonTypeSafeGenericDataHolder.GetDataKeys()
Extension Methods

Constructors

HoldingPersonAction(ActionInfo)

Creates a new typeless action with the given action information.

public HoldingPersonAction(ActionInfo info)

Parameters

info ActionInfo

The information for this action.

HoldingPersonAction(ActionType, ActionInfo)

Creates a new action with the given action information.

public HoldingPersonAction(ActionType type, ActionInfo info)

Parameters

type ActionType

The type for this action.

info ActionInfo

The information for this action.

Properties

IsHoldingParty

Returns whether this action's PersonLike is the holding party (rather than the party that is being held).

protected virtual bool IsHoldingParty { get; }

Property Value

bool

Methods

CanActionInterrupt(Action)

Determines whether the given action can interrupt this action. If this method returns true, it is usually followed by a call to Interrupt(CompletionType). To call this method effectively, use ActionInterruptAction(Action, Action, CompletionType, bool). This method returns false by default, and MultiAction returns true only if the main action has not yet started.

public override bool CanActionInterrupt(Action action)

Parameters

action Action

The action trying to interrupt this action.

Returns

bool

Whether the action can interrupt this action.

CanGenericInterrupt(bool)

Determines whether this action can be interrupted by a generic interruption source. If this method returns true, it is usually followed by a call to Interrupt(CompletionType). To call this method effectively, use GenericInterruptAction(Action, bool, CompletionType, bool). This method returns true by default.

public override bool CanGenericInterrupt(bool isPlayer)

Parameters

isPlayer bool

Whether the generic interruption source is the player.

Returns

bool

Whether a generic interruption source can interrupt this action.

CanMultitask(Action)

Return true on this method if this action can be multi-tasked along with the passed Action. To actually check this property, CanMultitask(Action, Action) should be used as it compares both objects. A multi-tasking is an action that is currently active along with another action. By default, multi-tasking is disallowed for any action.

public override Action.CanMultitaskResult CanMultitask(Action other)

Parameters

other Action

The action to multi-task with

Returns

Action.CanMultitaskResult

Whether this action can be multi-tasked

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

CreateLastActions()

Return a set of actions that should be executed after this action. Even if the yield statement is used, all actions will be collected into a list after the main action is finished. If no action gets returned in this function, this action fails. If the returned set only contains null items, no last actions will be executed, which is also this method's default behavior.

protected override IEnumerable<Action> CreateLastActions()

Returns

IEnumerable<Action>

A set of actions that should run after this action