1 /*
2  * This file is part of the Colobot: Gold Edition source code
3  * Copyright (C) 2001-2020, Daniel Roux, EPSITEC SA & TerranovaTeam
4  * http://epsitec.ch; http://colobot.info; http://github.com/colobot
5  *
6  * This program is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14  * See the GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see http://gnu.org/licenses
18  */
19 
20 /**
21  * \file object/object_type.h
22  * \brief ObjectType enum
23  */
24 
25 #pragma once
26 
27 #include <functional>
28 
29 /**
30  * \enum ObjectType
31  * \brief Type of game object
32  */
33 enum ObjectType
34 {
35     OBJECT_NULL             = 0,
36     OBJECT_PORTICO          = 2,    //!< Portico
37     OBJECT_BASE             = 3,    //!< SpaceShip
38     OBJECT_DERRICK          = 4,    //!< Derrick
39     OBJECT_FACTORY          = 5,    //!< BotFactory
40     OBJECT_STATION          = 6,    //!< PowerStation
41     OBJECT_CONVERT          = 7,    //!< Converter
42     OBJECT_REPAIR           = 8,    //!< RepairStation
43     OBJECT_TOWER            = 9,    //!< DefenseTower
44     OBJECT_NEST             = 10,   //!< AlienNest
45     OBJECT_RESEARCH         = 11,   //!< ResearchCenter
46     OBJECT_RADAR            = 12,   //!< RadarStation
47     OBJECT_ENERGY           = 13,   //!< PowerPlant
48     OBJECT_LABO             = 14,   //!< AutoLab
49     OBJECT_NUCLEAR          = 15,   //!< NuclearPlant
50     OBJECT_START            = 16,   //!< StartArea
51     OBJECT_END              = 17,   //!< EndArea
52     OBJECT_INFO             = 18,   //!< ExchangePost
53     OBJECT_PARA             = 19,   //!< PowerCaptor
54     OBJECT_TARGET1          = 20,   //!< Target1 (gate)
55     OBJECT_TARGET2          = 21,   //!< Target2 (center)
56     OBJECT_SAFE             = 22,   //!< Vault
57     OBJECT_HUSTON           = 23,   //!< Houston
58     OBJECT_DESTROYER        = 24,   //!< Destroyer
59     OBJECT_STONE            = 31,   //!< TitaniumOre
60     OBJECT_URANIUM          = 32,   //!< UraniumOre
61     OBJECT_METAL            = 33,   //!< Titanium
62     OBJECT_POWER            = 34,   //!< PowerCell
63     OBJECT_ATOMIC           = 35,   //!< NuclearCell
64     OBJECT_BULLET           = 36,   //!< OrgaMatter
65     OBJECT_BBOX             = 37,   //!< BlackBox
66     OBJECT_TNT              = 38,   //!< TNT
67     OBJECT_MARKPOWER        = 50,   //!< PowerSpot
68     OBJECT_MARKSTONE        = 51,   //!< TitaniumSpot
69     OBJECT_MARKURANIUM      = 52,   //!< UraniumSpot
70     OBJECT_MARKKEYa         = 53,   //!< KeyASpot
71     OBJECT_MARKKEYb         = 54,   //!< KeyBSpot
72     OBJECT_MARKKEYc         = 55,   //!< KeyCSpot
73     OBJECT_MARKKEYd         = 56,   //!< KeyDSpot
74     OBJECT_BOMB             = 60,   //!< Mine
75     OBJECT_WINFIRE          = 61,   //!< Firework
76     OBJECT_SHOW             = 62,   //!< arrow above object (Visit)
77     OBJECT_BAG              = 63,   //!< Bag
78     OBJECT_PLANT0           = 70,   //!< Greenery0
79     OBJECT_PLANT1           = 71,   //!< Greenery1
80     OBJECT_PLANT2           = 72,   //!< Greenery2
81     OBJECT_PLANT3           = 73,   //!< Greenery3
82     OBJECT_PLANT4           = 74,   //!< Greenery4
83     OBJECT_PLANT5           = 75,   //!< Greenery5
84     OBJECT_PLANT6           = 76,   //!< Greenery6
85     OBJECT_PLANT7           = 77,   //!< Greenery7
86     OBJECT_PLANT8           = 78,   //!< Greenery8
87     OBJECT_PLANT9           = 79,   //!< Greenery9
88     OBJECT_PLANT10          = 80,   //!< Greenery10
89     OBJECT_PLANT11          = 81,   //!< Greenery11
90     OBJECT_PLANT12          = 82,   //!< Greenery12
91     OBJECT_PLANT13          = 83,   //!< Greenery13
92     OBJECT_PLANT14          = 84,   //!< Greenery14
93     OBJECT_PLANT15          = 85,   //!< Greenery15
94     OBJECT_PLANT16          = 86,   //!< Greenery16
95     OBJECT_PLANT17          = 87,   //!< Greenery17
96     OBJECT_PLANT18          = 88,   //!< Greenery18
97     OBJECT_PLANT19          = 89,   //!< Greenery19
98     OBJECT_TREE0            = 90,   //!< Tree0
99     OBJECT_TREE1            = 91,   //!< Tree1
100     OBJECT_TREE2            = 92,   //!< Tree2
101     OBJECT_TREE3            = 93,   //!< Tree3
102     OBJECT_TREE4            = 94,   //!< Tree4
103     OBJECT_TREE5            = 95,   //!< Tree5
104     OBJECT_MOBILEwt         = 100,  //!< WheeledTrainer (PracticeBot)
105     OBJECT_MOBILEtt         = 101,  //!< TrackedTrainer
106     OBJECT_MOBILEft         = 102,  //!< WingedTrainer
107     OBJECT_MOBILEit         = 103,  //!< LeggedTrainer
108     OBJECT_MOBILErp         = 104,  //!< HeavyTrainer
109     OBJECT_MOBILEst         = 105,  //!< AmphibiousTrainer
110     OBJECT_MOBILEwa         = 110,  //!< WheeledGrabber
111     OBJECT_MOBILEta         = 111,  //!< TrackedGrabber
112     OBJECT_MOBILEfa         = 112,  //!< WingedGrabber
113     OBJECT_MOBILEia         = 113,  //!< LeggedGrabber
114     OBJECT_MOBILEwc         = 120,  //!< WheeledShooter
115     OBJECT_MOBILEtc         = 121,  //!< TrackedShooter
116     OBJECT_MOBILEfc         = 122,  //!< WingedShooter
117     OBJECT_MOBILEic         = 123,  //!< LeggedShooter
118     OBJECT_MOBILEwi         = 130,  //!< WheeledOrgaShooter
119     OBJECT_MOBILEti         = 131,  //!< TrackedOrgaShooter
120     OBJECT_MOBILEfi         = 132,  //!< WingedOrgaShooter
121     OBJECT_MOBILEii         = 133,  //!< LeggedOrgaShooter
122     OBJECT_MOBILEws         = 140,  //!< WheeledSniffer
123     OBJECT_MOBILEts         = 141,  //!< TrackedSniffer
124     OBJECT_MOBILEfs         = 142,  //!< WingedSniffer
125     OBJECT_MOBILEis         = 143,  //!< LeggedSniffer
126     OBJECT_MOBILErt         = 200,  //!< Thumper
127     OBJECT_MOBILErc         = 201,  //!< PhazerShooter
128     OBJECT_MOBILErr         = 202,  //!< Recycler
129     OBJECT_MOBILErs         = 203,  //!< Shielder
130     OBJECT_MOBILEsa         = 210,  //!< Subber
131     OBJECT_MOBILEtg         = 211,  //!< TargetBot
132     OBJECT_MOBILEdr         = 212,  //!< Scribbler
133     OBJECT_CONTROLLER       = 213,  //!< MissionController
134     OBJECT_MOBILEwb         = 220,  //!< WheeledBuilder
135     OBJECT_MOBILEtb         = 221,  //!< TrackedBuilder
136     OBJECT_MOBILEfb         = 222,  //!< WingedBuilder
137     OBJECT_MOBILEib         = 223,  //!< LeggedBuilder
138     OBJECT_MOBILEpr         = 224,  //!< PracticeBot (alias)
139     OBJECT_WAYPOINT         = 250,  //!< WayPoint
140     OBJECT_FLAGb            = 260,  //!< BlueFlag
141     OBJECT_FLAGr            = 261,  //!< RedFlag
142     OBJECT_FLAGg            = 262,  //!< GreenFlag
143     OBJECT_FLAGy            = 263,  //!< YellowFlag
144     OBJECT_FLAGv            = 264,  //!< VioletFlag
145     OBJECT_KEYa             = 270,  //!< KeyA
146     OBJECT_KEYb             = 271,  //!< KeyB
147     OBJECT_KEYc             = 272,  //!< KeyC
148     OBJECT_KEYd             = 273,  //!< KeyD
149     OBJECT_HUMAN            = 300,  //!< Me
150     OBJECT_TOTO             = 301,  //!< Robby (toto)
151     OBJECT_TECH             = 302,  //!< Tech
152     OBJECT_BARRIER0         = 400,  //!< Barrier0
153     OBJECT_BARRIER1         = 401,  //!< Barrier1
154     OBJECT_BARRIER2         = 402,  //!< Barrier2
155     OBJECT_BARRIER3         = 403,  //!< Barrier3
156     OBJECT_BARRICADE0       = 410,  //!< Barricade0
157     OBJECT_BARRICADE1       = 411,  //!< Barricade1
158     OBJECT_MOTHER           = 500,  //!< AlienQueen
159     OBJECT_EGG              = 501,  //!< AlienEgg
160     OBJECT_ANT              = 502,  //!< AlienAnt
161     OBJECT_SPIDER           = 503,  //!< AlienSpider
162     OBJECT_BEE              = 504,  //!< AlienWasp
163     OBJECT_WORM             = 505,  //!< AlienWorm
164     OBJECT_RUINmobilew1     = 600,  //!< WreckBotw1
165     OBJECT_RUINmobilew2     = 601,  //!< WreckBotw2
166     OBJECT_RUINmobilet1     = 602,  //!< WreckBott1
167     OBJECT_RUINmobilet2     = 603,  //!< WreckBott2
168     OBJECT_RUINmobiler1     = 604,  //!< WreckBotr1
169     OBJECT_RUINmobiler2     = 605,  //!< WreckBotr2
170     OBJECT_RUINfactory      = 606,  //!< RuinBotFactory
171     OBJECT_RUINdoor         = 607,  //!< RuinDoor
172     OBJECT_RUINsupport      = 608,  //!< RuinSupport
173     OBJECT_RUINradar        = 609,  //!< RuinRadar
174     OBJECT_RUINconvert      = 610,  //!< RuinConvert
175     OBJECT_RUINbase         = 611,  //!< RuinBaseCamp
176     OBJECT_RUINhead         = 612,  //!< RuinHeadCamp
177     OBJECT_TEEN0            = 620,  //!< Teen0
178     OBJECT_TEEN1            = 621,  //!< Teen1
179     OBJECT_TEEN2            = 622,  //!< Teen2
180     OBJECT_TEEN3            = 623,  //!< Teen3
181     OBJECT_TEEN4            = 624,  //!< Teen4
182     OBJECT_TEEN5            = 625,  //!< Teen5
183     OBJECT_TEEN6            = 626,  //!< Teen6
184     OBJECT_TEEN7            = 627,  //!< Teen7
185     OBJECT_TEEN8            = 628,  //!< Teen8
186     OBJECT_TEEN9            = 629,  //!< Teen9
187     OBJECT_TEEN10           = 630,  //!< Teen10
188     OBJECT_TEEN11           = 631,  //!< Teen11
189     OBJECT_TEEN12           = 632,  //!< Teen12
190     OBJECT_TEEN13           = 633,  //!< Teen13
191     OBJECT_TEEN14           = 634,  //!< Teen14
192     OBJECT_TEEN15           = 635,  //!< Teen15
193     OBJECT_TEEN16           = 636,  //!< Teen16
194     OBJECT_TEEN17           = 637,  //!< Teen17
195     OBJECT_TEEN18           = 638,  //!< Teen18
196     OBJECT_TEEN19           = 639,  //!< Teen19
197     OBJECT_TEEN20           = 640,  //!< Teen20
198     OBJECT_TEEN21           = 641,  //!< Teen21
199     OBJECT_TEEN22           = 642,  //!< Teen22
200     OBJECT_TEEN23           = 643,  //!< Teen23
201     OBJECT_TEEN24           = 644,  //!< Teen24
202     OBJECT_TEEN25           = 645,  //!< Teen25
203     OBJECT_TEEN26           = 646,  //!< Teen26
204     OBJECT_TEEN27           = 647,  //!< Teen27
205     OBJECT_TEEN28           = 648,  //!< Teen28
206     OBJECT_TEEN29           = 649,  //!< Teen29
207     OBJECT_TEEN30           = 650,  //!< Teen30
208     OBJECT_TEEN31           = 651,  //!< Teen31
209     OBJECT_TEEN32           = 652,  //!< Teen32
210     OBJECT_TEEN33           = 653,  //!< Teen33
211     OBJECT_TEEN34           = 654,  //!< Stone (Teen34)
212     OBJECT_TEEN35           = 655,  //!< Teen35
213     OBJECT_TEEN36           = 656,  //!< Teen36
214     OBJECT_TEEN37           = 657,  //!< Teen37
215     OBJECT_TEEN38           = 658,  //!< Teen38
216     OBJECT_TEEN39           = 659,  //!< Teen39
217     OBJECT_TEEN40           = 660,  //!< Teen40
218     OBJECT_TEEN41           = 661,  //!< Teen41
219     OBJECT_TEEN42           = 662,  //!< Teen42
220     OBJECT_TEEN43           = 663,  //!< Teen43
221     OBJECT_TEEN44           = 664,  //!< Teen44
222     OBJECT_QUARTZ0          = 700,  //!< Quartz0
223     OBJECT_QUARTZ1          = 701,  //!< Quartz1
224     OBJECT_QUARTZ2          = 702,  //!< Quartz2
225     OBJECT_QUARTZ3          = 703,  //!< Quartz3
226     OBJECT_ROOT0            = 710,  //!< MegaStalk0
227     OBJECT_ROOT1            = 711,  //!< MegaStalk1
228     OBJECT_ROOT2            = 712,  //!< MegaStalk2
229     OBJECT_ROOT3            = 713,  //!< MegaStalk3
230     OBJECT_ROOT4            = 714,  //!< MegaStalk4
231     OBJECT_ROOT5            = 715,  //!< MegaStalk5
232     OBJECT_MUSHROOM1        = 731,  //!< Mushroom1
233     OBJECT_MUSHROOM2        = 732,  //!< Mushroom2
234     OBJECT_APOLLO1          = 900,  //!< ApolloLEM
235     OBJECT_APOLLO2          = 901,  //!< ApolloJeep
236     OBJECT_APOLLO3          = 902,  //!< ApolloFlag
237     OBJECT_APOLLO4          = 903,  //!< ApolloModule
238     OBJECT_APOLLO5          = 904,  //!< ApolloAntenna
239     OBJECT_HOME1            = 910,  //!< Home
240 
241     OBJECT_MAX              = 1000  //!< number of values
242 };
243 
244 struct ObjectTypeHash
245 {
operatorObjectTypeHash246     inline std::size_t operator()(ObjectType t) const
247     {
248         return std::hash<int>()(t);
249     }
250 };
251 
252 bool IsValidObjectTypeId(int id);
253