Table of Contents

Namespace TinyLife.Actions.Behaviors

Classes

ActionBehavior

An action behavior is a generic, non-serialized set of things that a PersonLike does throughout an action. This class is intended to be used with BehaviorAction, which is a MultiAction that makes use of a behavior. Note that action behaviors do not have the DataContractAttribute, which means they are not saved to disk. This differentiates them from the various action handlers in TinyLife.Actions.Handlers.

ComputerBehavior

A computer behavior is a WorkAtDeskObjectBehavior that is executed at a computer. Using this behavior automatically turns the computer on (TurnOn(string)) and plays a typing sound.

GetAndSitDownBehavior

A get-and-sit-down behavior is an ActionBehavior where a person gets an action object that can be picked up (like a plate of food) and interacts with it on a chair or at a standing desk. This behavior considers a multitude of possible circumstances for the action, including the item being on a counter, on the ground, already on a valid table, in the person's hand, and more. Note that GetInteractingItemForAction<T>(ActionInfo, params FurnitureType[]) should be used to ensure that the correct interaction item is returned in every circumstance.

PhoneBehavior

An action behavior that involves either a landline phone (which is expected to have the LandlinePhone), or a Tiny taking out their own mobile phone and using it (which happens if the Self category is attached to the action). An action that uses the phone behavior can have both object categories attached for multi-use.

PickUpOrSpawnBehavior

An action behavior that causes an object to be spawned in a PersonLike's hand, or picked up from a location that it is occupying. Note that a previous item is always discarded using the DiscardHeldItemAction action.

ReadBehavior

An action behavior that is used for any kind of action that involves reading a book or other type of media. A BehaviorAction<T> using this behavior will cause the PersonLike to sit down after using the underlying PickUpOrSpawnBehavior behavior to pick up or spawn the book.

SinkBehavior

An ActionBehavior for an action that is invoked at a ExtremelySimpleLogger.Sink. If the sink is not the main GetActionObject<T>(bool), it should be added as an auxiliary object using AddAuxiliaryObject(MapObject, ActionSpot) in AndThenInitialize(). This behavior automatically displays a running water sound and sets the active person's pose to a working version using ToWorking(Pose).

WorkAtDeskObjectBehavior

A work at desk object behavior is a ActionBehavior where a person works at an object that is statically attached to a table or standing desk. Note that this behavior differs from GetAndSitDownBehavior in that the object involved in this behavior cannot be picked up or moved by a person. This class is used by ComputerBehavior.