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 #pragma once
21 
22 /**
23  * \file common/error.h
24  * \brief Definition of the Error enum
25  */
26 
27 /**
28  * \enum Error
29  * \brief Type of error or info message
30  */
31 enum Error
32 {
33     ERR_OK                = 0,        //!<  ok
34     ERR_UNKNOWN           = 1,        //!<  any error
35     ERR_CONTINUE          = 2,        //!<  continues
36     ERR_STOP              = 3,        //!<  stops
37     ERR_CMD               = 4,        //!<  unknown command
38     ERR_OBJ_BUSY          = 5,        //!<  object is busy
39     ERR_MANIP_FLY         = 101,      //!<  impossible in flight
40     ERR_MANIP_BUSY        = 102,      //!<  taking: hands already occupied
41     ERR_MANIP_NIL         = 103,      //!<  taking: nothing has to take
42     ERR_MANIP_MOTOR       = 105,      //!<  busy: impossible to move
43     ERR_MANIP_OCC         = 106,      //!<  busy: location already occupied
44     ERR_MANIP_RADIO       = 108,      //!<  impossible because radioactive
45     ERR_MANIP_WATER       = 109,      //!<  not possible under water
46     ERR_MANIP_EMPTY       = 110,      //!<  nothing to deposit
47     ERR_BUILD_FLY         = 120,      //!<  not possible in flight
48     ERR_BUILD_WATER       = 121,      //!<  not possible under water
49     ERR_BUILD_METALAWAY   = 123,      //!<  lack of metal (too far)
50     ERR_BUILD_METALNEAR   = 124,      //!<  lack of metal (too close)
51     ERR_BUILD_METALINEX   = 125,      //!<  lack of metal
52     ERR_BUILD_FLAT        = 126,      //!<  not enough flat ground
53     ERR_BUILD_FLATLIT     = 127,      //!<  not enough flat ground space
54     ERR_BUILD_BUSY        = 128,      //!<  location occupied
55     ERR_BUILD_BASE        = 129,      //!<  too close to the rocket
56     ERR_BUILD_NARROW      = 130,      //!<  buildings too close
57     ERR_BUILD_MOTOR       = 131,      //!<  built: not possible in movement
58     ERR_BUILD_DISABLED    = 132,      //!<  built: can not produce this object in this mission
59     ERR_BUILD_RESEARCH    = 133,      //!<  built: can not produce not researched object
60     ERR_SEARCH_FLY        = 140,      //!<  not possible in flight
61     ERR_SEARCH_MOTOR      = 142,      //!<  impossible in movement
62     ERR_TERRA_ENERGY      = 151,      //!<  not enough energy
63     ERR_FIRE_ENERGY       = 161,      //!<  not enough energy
64     ERR_RECOVER_ENERGY    = 171,      //!<  not enough energy
65     ERR_RECOVER_NULL      = 172,      //!<  lack of ruin
66     ERR_CONVERT_EMPTY     = 180,      //!<  no stone was transformed
67     ERR_SHIELD_ENERGY     = 191,      //!<  not enough energy
68     ERR_MOVE_IMPOSSIBLE   = 200,      //!<  move impossible
69     ERR_GOTO_IMPOSSIBLE   = 210,      //!<  goto impossible
70     ERR_GOTO_ITER         = 211,      //!<  goto too complicated
71     ERR_GOTO_BUSY         = 212,      //!<  goto destination occupied
72     ERR_DERRICK_NULL      = 300,      //!<  no ore underground
73     ERR_STATION_NULL      = 301,      //!<  no energy underground
74     ERR_TOWER_POWER       = 310,      //!<  no battery
75     ERR_TOWER_ENERGY      = 311,      //!<  more energy
76     ERR_RESEARCH_POWER    = 320,      //!<  no battery
77     ERR_RESEARCH_ENERGY   = 321,      //!<  more energy
78     ERR_RESEARCH_TYPE     = 322,      //!<  the wrong type of battery
79     ERR_RESEARCH_ALREADY  = 323,      //!<  research already done
80     ERR_ENERGY_NULL       = 330,      //!<  no energy underground
81     ERR_ENERGY_LOW        = 331,      //!<  not enough energy
82     ERR_ENERGY_EMPTY      = 332,      //!<  lack of metal
83     ERR_ENERGY_BAD        = 333,      //!<  transforms only the metal
84     ERR_BASE_DLOCK        = 340,      //!<  doors locked
85     ERR_BASE_DHUMAN       = 341,      //!<  you must be on spaceship
86     ERR_LABO_NULL         = 350,      //!<  nothing to analyze
87     ERR_LABO_BAD          = 351,      //!<  analyzes only organic ball
88     ERR_LABO_ALREADY      = 352,      //!<  analysis already made
89     ERR_NUCLEAR_EMPTY     = 362,      //!<  lack of uranium
90     ERR_NUCLEAR_BAD       = 363,      //!<  transforms only uranium
91     ERR_FACTORY_NULL      = 370,      //!<  no metal
92     ERR_FACTORY_NEAR      = 371,      //!<  vehicle too close
93     ERR_INFO_NULL         = 390,      //!<  no information terminal
94     ERR_VEH_VIRUS         = 400,      //!<  vehicle infected by a virus
95     ERR_BAT_VIRUS         = 401,      //!<  building infected by a virus
96     ERR_DESTROY_NOTFOUND  = 410,      //!<  not found anything to destroy
97     ERR_WRONG_OBJ         = 420,      //!<  inappropriate vehicle
98     ERR_VEH_POWER         = 500,      //!<  no battery
99     ERR_VEH_ENERGY        = 501,      //!<  more energy
100     ERR_FLAG_FLY          = 510,      //!<  impossible in flight
101     ERR_FLAG_WATER        = 511,      //!<  impossible during swimming
102     ERR_FLAG_MOTOR        = 512,      //!<  impossible in movement
103     ERR_FLAG_BUSY         = 513,      //!<  taking: already creating flag
104     ERR_FLAG_CREATE       = 514,      //!<  too many flags
105     ERR_FLAG_PROXY        = 515,      //!<  too close
106     ERR_FLAG_DELETE       = 516,      //!<  nothing to remove
107     ERR_MISSION_NOTERM    = 600,      //!<  Mission not completed
108     ERR_DELETEMOBILE      = 700,      //!<  vehicle destroyed
109     ERR_DELETEBUILDING    = 701,      //!<  building destroyed
110     ERR_ENEMY_OBJECT      = 703,      //!<  can't control enemy object
111     ERR_OBLIGATORYTOKEN   = 800,      //!<  compulsory instruction missing
112     ERR_PROHIBITEDTOKEN   = 801,      //!<  instruction prohibited
113     ERR_AIM_IMPOSSIBLE    = 900,      //!<  cannot aim at specified angle(s)
114     ERR_WRONG_BOT         = 910,      //!<  inappropriate bot
115     ERR_NO_QUICK_SLOT     = 920,      //!<  quicksave slot not found
116 
117     INFO_FIRST            = 10000,    //! <  first information
118     INFO_BUILD            = 10001,    //! <  construction builded
119     INFO_CONVERT          = 10002,    //! <  metal available
120     INFO_RESEARCH         = 10003,    //! <  search ended
121     INFO_FACTORY          = 10004,    //! <  vehicle manufactured
122     INFO_LABO             = 10005,    //! <  analysis ended
123     INFO_ENERGY           = 10006,    //! <  battery available
124     INFO_NUCLEAR          = 10007,    //! <  nuclear battery available
125     INFO_FINDING          = 10008,    //! <  useful object found
126     INFO_MARKPOWER        = 10020,    //! <  location for station found
127     INFO_MARKURANIUM      = 10021,    //! <  location for derrick found
128     INFO_MARKSTONE        = 10022,    //! <  location for derrick found
129     INFO_MARKKEYa         = 10023,    //! <  location for derrick found
130     INFO_MARKKEYb         = 10024,    //! <  location for derrick found
131     INFO_MARKKEYc         = 10025,    //! <  location for derrick found
132     INFO_MARKKEYd         = 10026,    //! <  location for derrick found
133     INFO_RESEARCHTANK     = 10030,    //! <  research ended
134     INFO_RESEARCHFLY      = 10031,    //! <  research ended
135     INFO_RESEARCHTHUMP    = 10032,    //! <  research ended
136     INFO_RESEARCHCANON    = 10033,    //! <  research ended
137     INFO_RESEARCHTOWER    = 10034,    //! <  research ended
138     INFO_RESEARCHPHAZER   = 10035,    //! <  research ended
139     INFO_RESEARCHSHIELD   = 10036,    //! <  research ended
140     INFO_RESEARCHATOMIC   = 10037,    //! <  research ended
141     INFO_RESEARCHBUILDER  = 10038,    //! <  research ended
142     INFO_WIN              = 10040,    //! <  win
143     INFO_LOST             = 10041,    //! <  lost
144     INFO_LOSTq            = 10042,    //! <  lost immediately
145     INFO_WRITEOK          = 10043,    //! <  record done
146     INFO_DELETEMOTHER     = 10100,    //! <  insect killed
147     INFO_DELETEANT        = 10101,    //! <  insect killed
148     INFO_DELETEBEE        = 10102,    //! <  insect killed
149     INFO_DELETEWORM       = 10103,    //! <  insect killed
150     INFO_DELETESPIDER     = 10104,    //! <  insect killed
151     INFO_BEGINSATCOM      = 10105,    //! <  use your SatCom
152     INFO_TEAM_FINISH      = 10110,
153     INFO_TEAM_DEAD        = 10111,
154     INFO_TEAM_SCORE       = 10112,
155 
156     ERR_MAX //! < number of values
157 };
158