Rename [object]duration=level to [object]duration=scenario

This commit is contained in:
Alexander van Gessel 2012-05-01 22:13:52 +01:00
parent 820689b0f8
commit c9a5c32bb4
4 changed files with 11 additions and 2 deletions

View file

@ -231,6 +231,7 @@ Version 1.11.0-svn:
* Added [object]duration=turn
* Pushed LOOT macro from LoW, THoT and TRoW in core
* Adds new WML attribute for configurable village support (upkeep)
* Change [object]duration=level to [object]duration=scenario
* Miscellaneous and bug fixes:
* Fix wrong preferences path suffix (1.1 instead of 1.10) on Linux and other
platforms using XDG layout (no compiled-in preferences path override,

View file

@ -2582,7 +2582,7 @@ For game purposes, the races group into factions; for example, orcs often cooper
id=bleach
name= "Potion of bleach"
image=items/potion-red.png
duration=level
duration=scenario
description="Oooh tingly!!!"
[effect]
apply_to=image_mod

View file

@ -521,7 +521,8 @@ linechanges = (
("[removeitem]", "[remove_item]"),
("[/removeitem]", "[/remove_item]"),
# Changes just before 1.11.0
("viewing_side", "side")
("viewing_side", "side"),
("duration=level", "duration=scenario") # Note: this may be removed after 1.11.2, so an actual duration=level can be implemented
)
def validate_on_pop(tagstack, closer, filename, lineno):

View file

@ -1995,6 +1995,13 @@ WML_HANDLER_FUNCTION(object, event_info, cfg)
if (u != resources::units->end() && (filter.null() || game_events::unit_matches_filter(*u, filter)))
{
//@deprecated This can be removed (and a proper duration=level implemented) after 1.11.2
// Don't forget to remove it from wmllint too!
const std::string& duration = cfg["duration"];
if (duration == "level") {
lg::wml_error << "[object]duration=level is deprecated. Use duration=scenario instead.\n";
}
text = cfg["description"].str();
if(cfg["delayed_variable_substitution"].to_bool(false))