Skip to main content
Version: 0.15.0

Mount Reconciler

Description​

Decides what an action needs of an agent's seat, and stands the agent up when it needs to be on its feet. The action processor asks it once as each action starts, before the action itself runs, which is what lets an agent stay seated from one action to the next.

It finds action types by name in the action type collection, which the module registers as IActionTypeCollection. No action id is held in code.

Interface​

Type
IMountReconciler

Inherits​

Type
N/A

Properties​

NameType
actionTypesIActionTypeCollection

Public Methods​

NameParametersReturn TypeDescription
MountReconcilerN/AMountReconcilerA constructor which finds the action type collection through the module's services when it is first needed.
MountReconcilerIActionTypeCollection actionTypesMountReconcilerA constructor for a given action type collection.
ReconcileAction action, IAgentService agentbool?Stands the agent up if the action needs it to. Null while the dismount animation plays, true once the agent is where it should be. Never false.
RequiresDismountAction action, IAgentService agentboolWhether the agent has to stand up before the action can run.
RequiresMountAction action, Item itemboolWhether the action's POI action is one the item performs seated.
IsPerformedMountedAction action, Item goalItemboolWhether the action ends with the agent sitting down, as a Mount or as a seated POI action.
CanStayMountedForAction action, IAgentService agentboolWhether the item the agent is sitting on answers the action, so it can stay where it is.
DismountIAgentService agent, bool playTransitionbool?Stands the agent up. Pass false to skip the dismount animation. Succeeds on an agent that is already standing.
ReleaseSeatReservationIAgentService agent, Item mountItemvoidGives up a seat the agent reserved on the item and never sat in.
GetMountedItemIAgentService agentItemReturns the item the agent is sitting on, or null.
IsMountedOnIAgentService agent, Item itemboolWhether the agent is sitting on the item.
FindMissingActionTypesIActionTypeCollection actionTypesIEnumerable<string>Static. The built-in action type names the collection lacks. The module logs each one as it starts.

Standing an agent up from your own code​

Dismount is the one place an agent is taken off its seat, so use it rather than calling the seat directly.

csharp
var reconciler = new MountReconciler();

if (reconciler.Dismount(agent, playTransition: false) == true)
{
// the agent is on its feet and back on the nav mesh
}

With playTransition left at true the call returns null until the seat's dismount animation has finished, so call it again on each update until it returns true.