Table of Contents

Class HoldingPersonAction

Namespace
TinyLife.Actions
Assembly
Tiny Life.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

CanCancel(Action)

Returns whether or not this action can be canceled by the given outside source. Note that the outside source can be null, and if it is, it means that the player canceled the action manually. By default, actions can only be canceled if the cancelSource is null.

public override bool CanCancel(Action cancelSource)

Parameters

cancelSource Action

The source of the cancelation, or null if the player canceled it

Returns

bool

true if the action can be canceled

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 bool CanMultitask(Action other)

Parameters

other Action

The action to multi-task with

Returns

bool

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