Revert "Add [modify_unit]rebuild=no"

This reverts commit 51d6402453.

After discussion with @gfgtdf it was determined that this is not a useful feature after all, since it was in fact the default behaviour for the optimized path.
This commit is contained in:
Celtic Minstrel 2019-11-16 14:38:05 -05:00
parent 3686dba82c
commit 2cc7fe6450
2 changed files with 2 additions and 4 deletions

View file

@ -54,7 +54,6 @@
* [effect]apply_to=variation now supports heal_full
* Support [set/clear_variable] inside [modify_unit/side]
* Support [variables] in [modify_side], as in [modify_unit]
* [modify_unit] now accepts rebuild=no which will avoid a rebuild of the unit if possible (not guaranteed)
### Packaging
* The Wesnoth client now looks for the data/dist file when logging into the multiplayer server.
This file should contain one of the following values based on where the package is for:

View file

@ -53,7 +53,6 @@ local known_attributes = make_set {
"description",
"hidden",
"unrenamable",
"rebuild",
}
local known_tags = make_set {
@ -168,10 +167,10 @@ local function simple_modify_unit(cfg)
u:transform(cfg.type or u.type, cfg.variation)
end
-- by default always do an advancement here (not only when experience/max_experience/type was modified)
-- always do an advancement here (not only when experience/max_experience/type was modified)
-- for compatibility with old code.
-- Skip for recall list units
if u.valid == 'map' and (cfg.experience or cfg.max_experience or cfg.rebuild ~= false) then
if u.valid == 'map' then
u:advance()
end
end