Remove some old backward compatibilty code,
...add comments around another v1.2 backward compatibility code to be removed soon (after 1.3.2).
This commit is contained in:
parent
8516a20aa3
commit
ceb21629f4
3 changed files with 4 additions and 29 deletions
|
@ -32,6 +32,7 @@ Version 1.3.1+svn:
|
||||||
* new key for [set_variable], literal=, to avoid variable substitution
|
* new key for [set_variable], literal=, to avoid variable substitution
|
||||||
* [effect] can now toggle the zoc
|
* [effect] can now toggle the zoc
|
||||||
* new key for [variable], boolean_equals=, to test boolean equality
|
* new key for [variable], boolean_equals=, to test boolean equality
|
||||||
|
* remove some old backward compatibility support
|
||||||
* user interface:
|
* user interface:
|
||||||
* new sounds for user interface events
|
* new sounds for user interface events
|
||||||
* misceleanous bug fixes
|
* misceleanous bug fixes
|
||||||
|
|
|
@ -635,24 +635,6 @@ bool event_handler::handle_event_command(const queued_event& event_info,
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
//command to store gold into a variable
|
|
||||||
else if(cmd == "store_gold") {
|
|
||||||
WRN_NG << "[store_gold] tag is now deprecated; use [store_side] instead.\n";
|
|
||||||
std::string side = cfg["side"];
|
|
||||||
std::string var_name = cfg["variable"];
|
|
||||||
if(var_name.empty()) {
|
|
||||||
var_name = "gold";
|
|
||||||
}
|
|
||||||
wassert(state_of_game != NULL);
|
|
||||||
const int side_num = lexical_cast_default<int>(side,1);
|
|
||||||
const size_t team_index = side_num-1;
|
|
||||||
if(team_index < teams->size()) {
|
|
||||||
char value[50];
|
|
||||||
snprintf(value,sizeof(value),"%d",(*teams)[team_index].gold());
|
|
||||||
wassert(state_of_game != NULL);
|
|
||||||
state_of_game->set_variable(var_name,value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//moving a 'unit' - i.e. a dummy unit that is just moving for
|
//moving a 'unit' - i.e. a dummy unit that is just moving for
|
||||||
//the visual effect
|
//the visual effect
|
||||||
|
|
|
@ -78,15 +78,6 @@ attack_type::attack_type(const config& cfg,const std::string& id, const std::str
|
||||||
teams_=NULL;
|
teams_=NULL;
|
||||||
other_attack_=NULL;
|
other_attack_=NULL;
|
||||||
|
|
||||||
// BACKWARDS COMPATIBILITY
|
|
||||||
const std::string& set_special = cfg["special"];
|
|
||||||
if(set_special != "") {
|
|
||||||
LOG_STREAM(err, config) << "[attack] uses special=" << set_special <<", which is now deprecated. Use the macros provided in abilities.cfg.\n";
|
|
||||||
config new_specials;
|
|
||||||
|
|
||||||
new_specials["set_special"] = set_special;
|
|
||||||
apply_modification(new_specials,NULL);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const attack_animation& attack_type::animation(const display& disp, const gamemap::location& loc,const unit* my_unit,
|
const attack_animation& attack_type::animation(const display& disp, const gamemap::location& loc,const unit* my_unit,
|
||||||
|
@ -141,7 +132,6 @@ bool attack_type::apply_modification(const config& cfg,std::string* description)
|
||||||
const std::string& set_type = cfg["set_type"];
|
const std::string& set_type = cfg["set_type"];
|
||||||
const std::string& del_specials = cfg["remove_specials"];
|
const std::string& del_specials = cfg["remove_specials"];
|
||||||
const config* set_specials = cfg.child("set_specials");
|
const config* set_specials = cfg.child("set_specials");
|
||||||
const std::string& set_special = cfg["set_special"];
|
|
||||||
const std::string& increase_damage = cfg["increase_damage"];
|
const std::string& increase_damage = cfg["increase_damage"];
|
||||||
const std::string& increase_attacks = cfg["increase_attacks"];
|
const std::string& increase_attacks = cfg["increase_attacks"];
|
||||||
const std::string& set_attack_weight = cfg["attack_weight"];
|
const std::string& set_attack_weight = cfg["attack_weight"];
|
||||||
|
@ -192,6 +182,8 @@ bool attack_type::apply_modification(const config& cfg,std::string* description)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// v1.2 backward compatibility (should be removed in a few v1.3.x releases
|
||||||
|
const std::string& set_special = cfg["set_special"];
|
||||||
if(set_special.empty() == false) {
|
if(set_special.empty() == false) {
|
||||||
LOG_STREAM(err, config) << "[effect] uses set_special=" << set_special <<", which is now deprecated. Use [set_specials] instead.\n";
|
LOG_STREAM(err, config) << "[effect] uses set_special=" << set_special <<", which is now deprecated. Use [set_specials] instead.\n";
|
||||||
cfg_.clear_children("specials");
|
cfg_.clear_children("specials");
|
||||||
|
@ -269,7 +261,7 @@ bool attack_type::apply_modification(const config& cfg,std::string* description)
|
||||||
sp["description"] = t_string("Poison:\nThis attack poisons the target. Poisoned units lose 8 HP every turn until they are cured or are reduced to 1 HP.","wesnoth");
|
sp["description"] = t_string("Poison:\nThis attack poisons the target. Poisoned units lose 8 HP every turn until they are cured or are reduced to 1 HP.","wesnoth");
|
||||||
}
|
}
|
||||||
cfg_.add_child("specials",new_specials);
|
cfg_.add_child("specials",new_specials);
|
||||||
}
|
} // end of backward compatibility block
|
||||||
|
|
||||||
if(increase_damage.empty() == false) {
|
if(increase_damage.empty() == false) {
|
||||||
damage_ = utils::apply_modifier(damage_, increase_damage, 1);
|
damage_ = utils::apply_modifier(damage_, increase_damage, 1);
|
||||||
|
|
Loading…
Add table
Reference in a new issue