Rename as "hidden" the "hides" status

drop the backward compatibility with the old "stone" status (which
comes from before 1.4.x)
This commit is contained in:
Benoît Timbert 2008-05-23 22:26:55 +00:00
parent 90788f2ba0
commit 554f01f3ee
13 changed files with 22 additions and 20 deletions

View file

@ -59,7 +59,9 @@ Version 1.5.0+svn:
* add "default_base" parameter to overlay terrains, which specifies the
base terrain the editor draws by default.
* New [heal_unit] action.
* Make it possible to change base and overlay separately in [terrain] and [terrain_mask] actions.
* Make it possible to change base and overlay separately in [terrain] and
[terrain_mask] actions.
* rename the "hides" status as "hidden"
* wesnothd
* added expiration time to bans
* added restart command to server that does gracefull restart

View file

@ -250,7 +250,7 @@
upkeep=loyal
[status]
hides=yes
hidden=yes
[/status]
[/unit]

View file

@ -320,7 +320,7 @@
[/modifications]
[status]
hides=yes
hidden=yes
[/status]
[/unit]

View file

@ -952,7 +952,7 @@ _f, _f, _f, _f, _f, _f, Re, _f, _f, _f, _f, _f,
x={X}
y={Y}
[status]
hides=yes
hidden=yes
[/status]
[object]
silent=yes

View file

@ -102,7 +102,7 @@
#define TURNED_TO_STONE
[status]
stone=on
stoned=on
[/status]
#enddef

View file

@ -302,8 +302,8 @@
upkeep=loyal
[status]
hides=yes
stone=yes
hidden=yes
stoned=yes
[/status]
[/unit]

View file

@ -3063,7 +3063,7 @@
[/store_unit]
{VARIABLE Zhul_statue.id "Zhul_statue"}
{VARIABLE Zhul_statue.status.stone "on"}
{VARIABLE Zhul_statue.status.stoned "on"}
[unstore_unit]
variable=Zhul_statue

View file

@ -10,7 +10,7 @@
random_traits=no
[status]
stone=on
stoned=on
[/status]
[modifications]

View file

@ -175,7 +175,7 @@
{VARIABLE experience $ai_unit[$id].experience}
{VARIABLE poisoned $ai_unit[$id].status.poisoned}
{VARIABLE slowed $ai_unit[$id].status.slowed}
{VARIABLE hides $ai_unit[$id].status.hides}
{VARIABLE hidden $ai_unit[$id].status.hidden}
{VARIABLE x $ai_unit[$id].x}
{VARIABLE y $ai_unit[$id].y}
[if]
@ -198,7 +198,7 @@
name=$name
random_traits=yes
[status]
hides=$hides
hidden=$hidden
slowed=$slowed
poisoned=$poisoned
[/status]
@ -228,7 +228,7 @@
{CLEAR_VARIABLE gender}
{CLEAR_VARIABLE experience}
{CLEAR_VARIABLE poisoned}
{CLEAR_VARIABLE hides}
{CLEAR_VARIABLE hidden}
{CLEAR_VARIABLE slowed}
{CLEAR_VARIABLE hp_add}
{CLEAR_VARIABLE max_hp}

View file

@ -12,7 +12,7 @@
random_traits=no
[status]
stone=on
stoned=on
[/status]
[modifications]

View file

@ -244,7 +244,7 @@ Xu , Xu , Qxu , Qxu , Ql , Ql
generate_description=yes
hitpoints=4
[status]
stone=on
stoned=on
[/status]
[/unit]
[unit]

View file

@ -901,7 +901,7 @@ attack::attack(game_display& gui, const gamemap& map,
d_->second.set_resting(false);
// If the attacker was invisible, she isn't anymore!
a_->second.set_state("hides","");
a_->second.set_state("hidden","");
bc_ = new battle_context(map_, teams_, units_, state_, attacker_, defender_, attack_with_, defend_with_);
a_stats_ = &bc_->get_attacker_stats();

View file

@ -676,7 +676,7 @@ void unit::new_turn()
end_turn_ = false;
movement_ = total_movement();
attacks_left_ = max_attacks_;
set_state("hides","yes");
set_state("hidden","yes");
if (hold_position_) {
end_turn_ = true;
@ -1304,9 +1304,9 @@ void unit::read(const config& cfg, bool use_traits, game_state* state)
const config* status_flags = cfg.child("status");
if(status_flags) {
for(string_map::const_iterator st = status_flags->values.begin(); st != status_flags->values.end(); ++st) {
// backwards compatibility
if(st->first == "stone") {
states_["stoned"] = st->second;
// backwards compatibility (to be dropped after 1.5.2)
if(st->first == "hides") {
states_["hidden"] = st->second;
} else {
states_[st->first] = st->second;
}
@ -2786,7 +2786,7 @@ bool unit::invisible(const gamemap::location& loc,
// Test hidden status
static const std::string hides("hides");
bool is_inv = (utils::string_bool(get_state(hides)) && get_ability_bool(hides,loc));
bool is_inv = (utils::string_bool(get_state("hidden")) && get_ability_bool(hides,loc));
if(is_inv){
for(unit_map::const_iterator u = units.begin(); u != units.end(); ++u) {
if(teams[side_-1].is_enemy(u->second.side()) && tiles_adjacent(loc,u->first)) {