12#ifndef TT_INCLUDE_ACTION_H
13#define TT_INCLUDE_ACTION_H
16#include "ReferencerClass.h"
19class SafeActionParamsStruct :
public ActionParamsStruct {
21 SafeActionParamsStruct & operator = (
const ActionParamsStruct & src);
22 bool Save( ChunkSaveClass & csave );
23 bool Load( ChunkLoadClass & cload );
24 ReferencerClass MoveObjectRef;
25 ReferencerClass AttackObjectRef;
26 ReferencerClass LookObjectRef;
27 StringClass SafeAnimationName;
28 StringClass SafeConversationName;
32 ActionClass( SmartGameObj *obj );
33 virtual ~ActionClass(
void );
34 bool Save( ChunkSaveClass & csave );
35 bool Load( ChunkLoadClass & cload );
36 SmartGameObj * Get_Action_Obj(
void ) {
return ActionObj; }
37 SafeActionParamsStruct & Get_Parameters(
void ) {
return Parameters; }
38 SCRIPTS_API
bool Is_Acting(
void );
39 bool Is_Animating(
void );
40 void Begin_Hibernation(
void );
41 void End_Hibernation(
void );
42 bool Reset(
float priority );
43 bool Follow_Input(
const ActionParamsStruct & parameters );
44 bool Stand(
const ActionParamsStruct & parameters );
45 bool Play_Animation(
const ActionParamsStruct & parameters );
46 bool Goto(
const ActionParamsStruct & parameters );
47 bool Enter_Exit(
const ActionParamsStruct & parameters );
48 bool Dive(
const ActionParamsStruct & parameters );
49 bool Attack(
const ActionParamsStruct & parameters );
50 bool Face_Location(
const ActionParamsStruct & parameters );
51 bool Have_Conversation(
const ActionParamsStruct & parameters );
52 bool Dock_Vehicle(
const ActionParamsStruct & parameters );
53 bool Modify(
const ActionParamsStruct & parameters,
bool modify_move,
bool modify_attack );
55 unsigned int Get_Act_Count(
void ) {
return ActCount; }
56 bool Is_Active(
void );
58 bool Is_Paused(
void )
const {
return IsPaused; }
59 void Pause(
bool onoff) { IsPaused = onoff; }
60 void Done(
int reason );
62 void Notify_Completed(
int observer_id,
int action_id,
int reason );
63 bool Request_Action( ActionCodeClass * action,
const ActionParamsStruct & parameters );
64 SmartGameObj * ActionObj;
65 ActionCodeClass * ActionCode;
66 SafeActionParamsStruct Parameters;
68 unsigned int ActCount;
69 void Set_Action_Code( ActionCodeClass * code );