Simulator::cTribeInputStrategy class

Base classes

class cBaseSimulatorInputStrategy
class App::IUnmanagedMessageListener
Same as App::IMessageListener, but this one does not use ref-counting.

Public static functions

static auto IsInEditor() -> bool
Returns true if the player has gone to the creature outfitter editor, false otherwise.

Public functions

auto ChooseInputActionID(cGameData* object, int unk) -> int
Returns the input action ID (from Simulator::TribeInputAction) that the selected actors (e.g.
auto DoToolActionForAllSelected(cTribeTool* tribeTool) -> bool
Makes selected tribe members act on a tribe tool.
auto DoActionForAllSelected(int citizenActionId, cGameData* actionObject, int unk = 0) -> void
Makes selected tribe members do an action on an object.
auto DoActionGeneric(cGameData* actionObject) -> void
Called when the player inputs an action, this will do the appropriate action for the selected tribe members and the given object (which will be the hovered object by the mouse).
auto SetHoverObjectCursorAndRollover() -> void
Sets the current cursor, and maybe shows a rollover, depending on the current object pointed at by the mouse cursor.

Public variables

int field_40
int field_44
int field_48
int field_4C
int field_50
int field_54
float field_58
int field_5C
eastl::map<int, int> field_60
eastl::map<int, int> field_7C
int field_98
int field_9C
int field_A0
Clock field_A8
int field_C0
bool field_C4
int field_C8

Function documentation

int Simulator::cTribeInputStrategy::ChooseInputActionID(cGameData* object, int unk)

Returns the input action ID (from Simulator::TribeInputAction) that the selected actors (e.g.

Parameters
object
unk
Returns An action ID from TribeInputAction enum

tribe members) should do next. This is called when hovering or clicking over objects such as tribal tools.

bool Simulator::cTribeInputStrategy::DoToolActionForAllSelected(cTribeTool* tribeTool)

Makes selected tribe members act on a tribe tool.

Parameters
tribeTool

This might be repairing it if it's hurt, grabbing the tool, or dancing around the fire pit.

void Simulator::cTribeInputStrategy::DoActionForAllSelected(int citizenActionId, cGameData* actionObject, int unk = 0)

Makes selected tribe members do an action on an object.

Parameters
citizenActionId Action ID, from Simulator::CitizenAction
actionObject
unk

This will call cCreatureCitizen::DoAction(), and may play a sound.

void Simulator::cTribeInputStrategy::DoActionGeneric(cGameData* actionObject)

Called when the player inputs an action, this will do the appropriate action for the selected tribe members and the given object (which will be the hovered object by the mouse).

Parameters
actionObject

The method calls ChooseInputActionID(), then chooses how to translate that into CitizenActions that the tribe members will do.

void Simulator::cTribeInputStrategy::SetHoverObjectCursorAndRollover()

Sets the current cursor, and maybe shows a rollover, depending on the current object pointed at by the mouse cursor.

The object will be cGameViewManager::GetHoveredObject() The method will do nothing is IsInEditor() returns true.