Tiberian Technologies Scripts Reference Revision: 9000
Loading...
Searching...
No Matches
HarvesterClass.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__HARVESTERCLASS_H
13#define TT_INCLUDE__HARVESTERCLASS_H
14
15#include "scripts.h"
16#include "engine_string.h"
17#include "OBBoxClass.h"
18#include "RefineryGameObj.h"
19#include "VehicleGameObj.h"
20class RefineryGameObj;
21class VehicleGameObj;
22class HarvesterClass : public GameObjObserverClass
23{
24
25public:
26
27 enum State
28 {
29 NoState = 0,
30 StateGoingToHarvest = 1,
31 StateHarvesting = 2,
32 StateGoingToUnload = 3,
33 StateUnloading = 4,
34 };
35
36
37private:
38
39 RefineryGameObj* refinery; // 8
40 Vector3 dockLocation; // 12
41 Vector3 dockEntrance; // 24
42 State state; // 36
43 OBBoxClass tiberiumRegion; // 40
44 VehicleGameObj* harvester; // 100
45 StringClass harvestAnimation; // 104
46 float harvestRelocateTime; // 108
47 float harvestTime; // 112
48 bool harvesting; // 116
49
50
51public:
52
53 HarvesterClass();
54 virtual ~HarvesterClass();
55
56 virtual const char* Get_Name ()
57 {
58 return "HarvesterClass";
59 }
60 virtual void Attach (GameObject* object);
61 virtual void Detach (GameObject* object);
62 virtual void Created (GameObject* object)
63 {
64 }
65 virtual void Destroyed (GameObject* object);
66 virtual void Killed (GameObject* object, GameObject*)
67 {
68 }
69 virtual void Damaged (GameObject* object, GameObject*, float);
70 virtual void Custom (GameObject* object, int message, int, GameObject*);
71 virtual void Sound_Heard (GameObject* object, const CombatSound&)
72 {
73 }
74 virtual void Enemy_Seen (GameObject* object, GameObject*)
75 {
76 }
77 virtual void Action_Complete (GameObject* object, int id, ActionCompleteReason reason);
78 virtual void Timer_Expired (GameObject* object, int)
79 {
80 }
81 virtual void Animation_Complete (GameObject* object, const char*)
82 {
83 }
84 virtual void Poked (GameObject* object, GameObject*)
85 {
86 }
87 virtual void Entered (GameObject* object, GameObject*)
88 {
89 }
90 virtual void Exited (GameObject* object, GameObject*)
91 {
92 }
93
94 void Initialize();
95 void Go_Harvest ();
96 void Go_Unload_Tiberium ();
97 VehicleGameObj* Get_Vehicle ()
98 {
99 return harvester;
100 }
101 State Get_State() {return state;}
102 void Harvest_Tiberium ();
103 void Play_Harvest_Animation (bool play);
104 void Think ();
105 void Unload_Tiberium ();
106 void Set_Refinery(RefineryGameObj *obj) {refinery = obj;}
107 void Set_Dock_Location(Vector3 &location) {dockLocation = location;}
108 void Set_Dock_Entrance(Vector3 &location) {dockEntrance = location;}
109 void Set_Tiberium_Region(OBBoxClass &region) {tiberiumRegion = region;}
110 void Set_Harvest_Anim(const char *anim) {harvestAnimation = anim;}
111 void Stop();
112};
113
114#endif