Skip to content

Commit

Permalink
Merge pull request #929 from sigurdfdragon/add_new_keys_to_store_side
Browse files Browse the repository at this point in the history
WML: Add additional members to [store_side] results
  • Loading branch information
CelticMinstrel committed Feb 18, 2017
2 parents ff93e64 + 8cbd084 commit 3df8d4f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
1 change: 1 addition & 0 deletions changelog
Expand Up @@ -35,6 +35,7 @@ Version 1.13.6+dev:
* Wesnoth Formula Engine:
* New str_upper and str_lower functions for case transformations
* WML Engine:
* Update [store_side] to store everything in corresponding wesnoth.sides[*].__cfg
* Removed LOW_MEM option when building.
* Add color= attribute to [floating_text]
* Add ~CHAN() IPF that allows altering images according to formulas
Expand Down
22 changes: 4 additions & 18 deletions data/lua/wml-tags.lua
Expand Up @@ -666,24 +666,10 @@ end
function wml_actions.store_side(cfg)
local writer = utils.vwriter.init(cfg, "side")
for t, side_number in helper.get_sides(cfg) do
local container = {
controller = t.controller,
recruit = table.concat(t.recruit, ","),
fog = t.fog,
shroud = t.shroud,
hidden = t.hidden,
income = t.total_income,
village_gold = t.village_gold,
village_support = t.village_support,
team_name = t.team_name,
user_team_name = t.user_team_name,
color = t.color,
gold = t.gold,
scroll_to_leader = t.scroll_to_leader,
flag = t.flag,
flag_icon = t.flag_icon,
side = side_number
}
local container = t.__cfg
-- set values not properly handled by the __cfg
container.income = t.total_income
container.side = side_number
utils.vwriter.write(writer, container)
end
end
Expand Down

0 comments on commit 3df8d4f

Please sign in to comment.