forked from github/server
replace RCF_CANSTEAL with RCF_NOSTEAL for less confusing default behavior.
This commit is contained in:
parent
5b437c5833
commit
072f927d5b
|
@ -2760,7 +2760,7 @@ static void steal_cmd(unit * u, struct order *ord, request ** stealorders)
|
|||
|
||||
assert(skill_enabled(SK_PERCEPTION) && skill_enabled(SK_STEALTH));
|
||||
|
||||
if (!fval(u_race(u), RCF_CANSTEAL)) {
|
||||
if (fval(u_race(u), RCF_NOSTEAL)) {
|
||||
ADDMSG(&u->faction->msgs, msg_feedback(u, ord, "race_nosteal", "race",
|
||||
u_race(u)));
|
||||
return;
|
||||
|
|
|
@ -326,8 +326,8 @@ static void json_ship(cJSON *json, ship_type *st) {
|
|||
static void json_race(cJSON *json, race *rc) {
|
||||
cJSON *child;
|
||||
const char *flags[] = {
|
||||
"playerrace", "killpeasants", "scarepeasants",
|
||||
"cansteal", "moverandom", "cannotmove",
|
||||
"npc", "killpeasants", "scarepeasants",
|
||||
"nosteal", "moverandom", "cannotmove",
|
||||
"learn", "fly", "swim", "walk", "nolearn",
|
||||
"noteach", "horse", "desert",
|
||||
"illusionary", "absorbpeasants", "noheal",
|
||||
|
|
|
@ -34,7 +34,7 @@ static void check_flag(CuTest *tc, const char *name, int flag) {
|
|||
static void test_flags(CuTest *tc) {
|
||||
check_flag(tc, "npc", RCF_NPC);
|
||||
check_flag(tc, "scarepeasants", RCF_SCAREPEASANTS);
|
||||
check_flag(tc, "cansteal", RCF_CANSTEAL);
|
||||
check_flag(tc, "nosteal", RCF_NOSTEAL);
|
||||
check_flag(tc, "noheal", RCF_NOHEAL);
|
||||
check_flag(tc, "undead", RCF_UNDEAD);
|
||||
check_flag(tc, "dragon", RCF_DRAGON);
|
||||
|
|
|
@ -183,11 +183,11 @@ extern "C" {
|
|||
const struct weapon_type *);
|
||||
void free_races(void);
|
||||
|
||||
/* Flags */
|
||||
#define RCF_NPC (1<<0) /* can be played by a player. */
|
||||
#define RCF_KILLPEASANTS (1<<1) /* Töten Bauern. Dämonen werden nicht über dieses Flag, sondern in randenc() behandelt. */
|
||||
#define RCF_SCAREPEASANTS (1<<2)
|
||||
#define RCF_CANSTEAL (1<<3)
|
||||
/* Flags. Do not reorder these without changing json_race() in jsonconf.c */
|
||||
#define RCF_NPC (1<<0) /* cannot be the race for a player faction (and other limits?) */
|
||||
#define RCF_KILLPEASANTS (1<<1) /* a monster that eats peasants */
|
||||
#define RCF_SCAREPEASANTS (1<<2) /* a monster that scares peasants out of the hex */
|
||||
#define RCF_NOSTEAL (1<<3) /* this race has high stealth, but is not allowed to steal */
|
||||
#define RCF_MOVERANDOM (1<<4)
|
||||
#define RCF_CANNOTMOVE (1<<5)
|
||||
#define RCF_LEARN (1<<6) /* Lernt automatisch wenn struct faction == 0 */
|
||||
|
|
|
@ -1672,8 +1672,8 @@ static int parse_races(xmlDocPtr doc)
|
|||
rc->flags |= RCF_NPC;
|
||||
if (xml_bvalue(node, "scarepeasants", false))
|
||||
rc->flags |= RCF_SCAREPEASANTS;
|
||||
if (xml_bvalue(node, "cansteal", true))
|
||||
rc->flags |= RCF_CANSTEAL;
|
||||
if (!xml_bvalue(node, "cansteal", true))
|
||||
rc->flags |= RCF_NOSTEAL;
|
||||
if (xml_bvalue(node, "cansail", true))
|
||||
rc->flags |= RCF_CANSAIL;
|
||||
if (xml_bvalue(node, "cannotmove", false))
|
||||
|
|
Loading…
Reference in New Issue