Freeciv-3.3: /fast/freeciv/nightly/main/common/explanation.h Source File

Freeciv-3.3

Loading...
Searching...
No Matches
explanation.h
Go to the documentation of this file.
1/***********************************************************************
2 Freeciv - Copyright (C) 2014-2020 - The Freeciv Project contributors.
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12***********************************************************************/
13
14#ifndef FC_EXPLANATION_H
15#define FC_EXPLANATION_H
16
17#ifdef __cplusplus
18extern "C" {
19#endif /* __cplusplus */
20
21/* A category of reasons why an action isn't enabled. */
22 enum ane_kind {
23 /* Explanation: wrong actor unit. */
24 ANEK_ACTOR_UNIT,
25 /* Explanation: no action target. */
26 ANEK_MISSING_TARGET,
27 /* Explanation: the action is redundant vs this target. */
28 ANEK_BAD_TARGET,
29 /* Explanation: bad actor terrain. */
30 ANEK_BAD_TERRAIN_ACT,
31 /* Explanation: bad target terrain. */
32 ANEK_BAD_TERRAIN_TGT,
33 /* Explanation: being transported. */
34 ANEK_IS_TRANSPORTED,
35 /* Explanation: not being transported. */
36 ANEK_IS_NOT_TRANSPORTED,
37 /* Explanation: transports a cargo unit. */
38 ANEK_IS_TRANSPORTING,
39 /* Explanation: doesn't transport a cargo unit. */
40 ANEK_IS_NOT_TRANSPORTING,
41 /* Explanation: actor unit has a home city. */
42 ANEK_ACTOR_HAS_HOME_CITY,
43 /* Explanation: actor unit has no a home city. */
44 ANEK_ACTOR_HAS_NO_HOME_CITY,
45 /* Explanation: must declare war first. */
46 ANEK_NO_WAR,
47 /* Explanation: must break peace first. */
48 ANEK_PEACE,
49 /* Explanation: can't be done to domestic targets. */
50 ANEK_DOMESTIC,
51 /* Explanation: can't be done to foreign targets. */
52 ANEK_FOREIGN,
53 /* Explanation: can't be done with non allied units at target tile. */
54 ANEK_TGT_NON_ALLIED_UNITS_ON_TILE,
55 /* Explanation: this nation can't act. */
56 ANEK_NATION_ACT,
57 /* Explanation: this nation can't be targeted. */
58 ANEK_NATION_TGT,
59 /* Explanation: not enough MP left. */
60 ANEK_LOW_MP,
61 /* Explanation: can't be done to city centers. */
62 ANEK_IS_CITY_CENTER,
63 /* Explanation: can't be done to non city centers. */
64 ANEK_IS_NOT_CITY_CENTER,
65 /* Explanation: can't be done to claimed target tiles. */
66 ANEK_TGT_IS_CLAIMED,
67 /* Explanation: can't be done to unclaimed target tiles. */
68 ANEK_TGT_IS_UNCLAIMED,
69 /* Explanation: can't be done because target is too near. */
70 ANEK_DISTANCE_NEAR,
71 /* Explanation: can't be done because target is too far away. */
72 ANEK_DISTANCE_FAR,
73 /* Explanation: can't be done to targets that far from the coast line. */
74 ANEK_TRIREME_MOVE,
75 /* Explanation: can't be done because the actor can't exit its
76 * transport. */
77 ANEK_DISEMBARK_ACT,
78 /* Explanation: actor can't reach unit at target. */
79 ANEK_TGT_UNREACHABLE,
80 /* Explanation: the action is disabled in this scenario. */
81 ANEK_SCENARIO_DISABLED,
82 /* Explanation: too close to a city. */
83 ANEK_CITY_TOO_CLOSE_TGT,
84 /* Explanation: the target city is too big. */
85 ANEK_CITY_TOO_BIG,
86 /* Explanation: the target city's population limit banned the action. */
87 ANEK_CITY_POP_LIMIT,
88 /* Explanation: the specified city don't have the needed capacity. */
89 ANEK_CITY_NO_CAPACITY,
90 /* Explanation: the target unit can't switch sides because it is unique
91 * and the actor player already has one. */
92 ANEK_TGT_IS_UNIQUE_ACT_HAS,
93 /* Explanation: the target tile is unknown. */
94 ANEK_TGT_TILE_UNKNOWN,
95 /* Explanation: the actor player can't afford performing this action. */
96 ANEK_ACT_NOT_ENOUGH_MONEY,
97 /* Explanation: the action is blocked by another action. */
98 ANEK_ACTION_BLOCKS,
99 /* Explanation: the target unit is not wipable. */
100 ANEK_NOT_WIPABLE,
101 /* Explanation not detected. */
102 ANEK_UNKNOWN,
103};
104
105#ifdef __cplusplus
106}
107#endif /* __cplusplus */
108
109#endif /* FC_EXPLANATION_H */
ane_kind
ane_kind
Definition explanation.h:22
ANEK_IS_CITY_CENTER
@ ANEK_IS_CITY_CENTER
Definition explanation.h:62
ANEK_ACTION_BLOCKS
@ ANEK_ACTION_BLOCKS
Definition explanation.h:98
ANEK_DOMESTIC
@ ANEK_DOMESTIC
Definition explanation.h:50
ANEK_LOW_MP
@ ANEK_LOW_MP
Definition explanation.h:60
ANEK_TGT_TILE_UNKNOWN
@ ANEK_TGT_TILE_UNKNOWN
Definition explanation.h:94
ANEK_BAD_TERRAIN_TGT
@ ANEK_BAD_TERRAIN_TGT
Definition explanation.h:32
ANEK_TRIREME_MOVE
@ ANEK_TRIREME_MOVE
Definition explanation.h:74
ANEK_CITY_TOO_CLOSE_TGT
@ ANEK_CITY_TOO_CLOSE_TGT
Definition explanation.h:83
ANEK_CITY_NO_CAPACITY
@ ANEK_CITY_NO_CAPACITY
Definition explanation.h:89
ANEK_NATION_TGT
@ ANEK_NATION_TGT
Definition explanation.h:58
ANEK_BAD_TARGET
@ ANEK_BAD_TARGET
Definition explanation.h:28
ANEK_MISSING_TARGET
@ ANEK_MISSING_TARGET
Definition explanation.h:26
ANEK_TGT_IS_CLAIMED
@ ANEK_TGT_IS_CLAIMED
Definition explanation.h:66
ANEK_FOREIGN
@ ANEK_FOREIGN
Definition explanation.h:52
ANEK_DISEMBARK_ACT
@ ANEK_DISEMBARK_ACT
Definition explanation.h:77
ANEK_IS_TRANSPORTED
@ ANEK_IS_TRANSPORTED
Definition explanation.h:34
ANEK_IS_NOT_CITY_CENTER
@ ANEK_IS_NOT_CITY_CENTER
Definition explanation.h:64
ANEK_TGT_IS_UNCLAIMED
@ ANEK_TGT_IS_UNCLAIMED
Definition explanation.h:68
ANEK_TGT_NON_ALLIED_UNITS_ON_TILE
@ ANEK_TGT_NON_ALLIED_UNITS_ON_TILE
Definition explanation.h:54
ANEK_BAD_TERRAIN_ACT
@ ANEK_BAD_TERRAIN_ACT
Definition explanation.h:30
ANEK_SCENARIO_DISABLED
@ ANEK_SCENARIO_DISABLED
Definition explanation.h:81
ANEK_ACTOR_HAS_HOME_CITY
@ ANEK_ACTOR_HAS_HOME_CITY
Definition explanation.h:42
ANEK_PEACE
@ ANEK_PEACE
Definition explanation.h:48
ANEK_DISTANCE_NEAR
@ ANEK_DISTANCE_NEAR
Definition explanation.h:70
ANEK_UNKNOWN
@ ANEK_UNKNOWN
Definition explanation.h:102
ANEK_ACT_NOT_ENOUGH_MONEY
@ ANEK_ACT_NOT_ENOUGH_MONEY
Definition explanation.h:96
ANEK_IS_NOT_TRANSPORTING
@ ANEK_IS_NOT_TRANSPORTING
Definition explanation.h:40
ANEK_TGT_UNREACHABLE
@ ANEK_TGT_UNREACHABLE
Definition explanation.h:79
ANEK_ACTOR_HAS_NO_HOME_CITY
@ ANEK_ACTOR_HAS_NO_HOME_CITY
Definition explanation.h:44
ANEK_NOT_WIPABLE
@ ANEK_NOT_WIPABLE
Definition explanation.h:100
ANEK_CITY_TOO_BIG
@ ANEK_CITY_TOO_BIG
Definition explanation.h:85
ANEK_NO_WAR
@ ANEK_NO_WAR
Definition explanation.h:46
ANEK_DISTANCE_FAR
@ ANEK_DISTANCE_FAR
Definition explanation.h:72
ANEK_ACTOR_UNIT
@ ANEK_ACTOR_UNIT
Definition explanation.h:24
ANEK_NATION_ACT
@ ANEK_NATION_ACT
Definition explanation.h:56
ANEK_IS_NOT_TRANSPORTED
@ ANEK_IS_NOT_TRANSPORTED
Definition explanation.h:36
ANEK_IS_TRANSPORTING
@ ANEK_IS_TRANSPORTING
Definition explanation.h:38
ANEK_CITY_POP_LIMIT
@ ANEK_CITY_POP_LIMIT
Definition explanation.h:87
ANEK_TGT_IS_UNIQUE_ACT_HAS
@ ANEK_TGT_IS_UNIQUE_ACT_HAS
Definition explanation.h:92