Tiberian Technologies Scripts Reference Revision: 9000
Loading...
Searching...
No Matches
BeaconGameObj.h
1/* Renegade Scripts.dll
2 Copyright 2013 Tiberian Technologies
3
4 This file is part of the Renegade scripts.dll
5 The Renegade scripts.dll is free software; you can redistribute it and/or modify it under
6 the terms of the GNU General Public License as published by the Free
7 Software Foundation; either version 2, or (at your option) any later
8 version. See the file COPYING for more details.
9 In addition, an exemption is given to allow Run Time Dynamic Linking of this code with any closed source module that does not contain code covered by this licence.
10 Only the source code to the module(s) containing the licenced code has to be released.
11*/
12#ifndef TT_INCLUDE_BEACONGAMEOBJ_H
13#define TT_INCLUDE_BEACONGAMEOBJ_H
14#include "SimpleGameObj.h"
15class AudibleSoundClass;
16class WeaponDefinitionClass;
17class PlayerDataClass;
18class BeaconGameObjDef;
19class BaseControllerClass;
20class BeaconGameObj :
21 public SimpleGameObj
22{
23private:
24 enum StateEnum
25 {
26 STATE_0, // Probably some idle/startup state
27 STATE_DEPLOYING,
28 STATE_DEPLOYED,
29 STATE_DISARMED,
30 STATE_DETONATED,
31 };
32 ReferencerClass Owner; // 07B0
33 int State; // 07C0
34 float ArmTime; // 07C4
35 float PreDetonateCinematicDelay; // 07C8
36 float DetonateTime; // 07CC
37 float BroadcastToAllTime; // 07D0
38 AudibleSoundClass* ArmedSound; // 07D4
39 AudibleSoundClass* CurrentMessageSound; // 07D8
40 bool PreDetonateCinematicActive; // 07DC
41 const WeaponDefinitionClass* WeaponDef; // 07E0
42 ReferencerClass CinematicObj; // 07E4
43 PlayerDataClass* Player; // 07F4
44public:
45 BeaconGameObj();
46 virtual ~BeaconGameObj();
47 virtual const PersistFactoryClass& Get_Factory() const;
48 virtual void Init();
49 void Init(const BeaconGameObjDef &);
50 SCRIPTS_API const BeaconGameObjDef & Get_Definition( void ) const ;
51 void Init_Beacon(const WeaponDefinitionClass* definition, SoldierGameObj* owner, const Vector3& position);
52 virtual bool Save(ChunkSaveClass& chunks);
53 virtual bool Load(ChunkLoadClass& chunks);
54 bool Load_Variables(ChunkLoadClass&);
55 virtual void Think();
56 virtual void Get_Information(StringClass& information);
57 void Start_Cinematic(int);
58 void Stop_Armed_Sound();
59 void Set_State(int _state);
60 void Update_State();
61 BaseControllerClass* Get_Enemy_Base();
62 bool Can_Place_Here(const Vector3& position);
63 bool Is_In_Enemy_Base();
64 void Stop_Current_Message_Sound();
65 void Display_Message(int);
66 void Begin_Arming();
67 void Start_Owner_Animation();
68 void Stop_Owner_Animation();
69 bool Was_Owner_Interrupted();
70 SoldierGameObj* Get_Owner();
71 virtual void Completely_Damaged(const OffenseObjectClass& offense);
72 void Create_Explosion();
73 virtual void Export_Rare(BitStreamClass& stream);
74 virtual void Import_Rare(BitStreamClass& stream);
75 SoldierGameObj* Restore_Owner();
76 virtual BeaconGameObj* As_BeaconGameObj() { return this; }
77 PlayerDataClass *Get_Player_Data() {return Player;}
78 int Get_State() { return State; }
79 float Get_Arm_Time() { return ArmTime; }
80 float Get_Detonate_Time() { return DetonateTime; }
81 const WeaponDefinitionClass *Get_WeaponDef() { return WeaponDef; }
82}; // 07F8
83
84#endif