Update of bug #17987 (project wesnoth):
Status: None => Wont Fix
Assigned to: None => anonymissimus
_______________________________________________________
Follow-up Comment #2:
I don't think that we should complicate the core gold tag with such a
functionality which is only useful for a few use cases.
Note that it is possible to write a custom gold tag for this or modify the
existing one, for instance like so (untested):
++
local old_gold = wesnoth.wml_actions.gold
function wesnoth.wml_actions.gold(cfg)
local shared_gold = cfg.shared_gold
if not shared_gold then
old_gold(cfg)
return
end
cfg = table.insert(cfg.__literal, {"has_unit", {}})
local teams = wesnoth.get_sides(cfg)
if #teams == 0 then return end
local amount = tonumber(cfg.amount) or
helper.wml_error "[gold] missing required amount=
attribute."
amount = amount/#teams
for index, team in ipairs(teams) do
team.gold = team.gold + amount
end
end
--
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?17987>
_______________________________________________
Nachricht geschickt von/durch Gna!
http://gna.org/
_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs