mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-04 16:01:17 +00:00

...for strings, too this is done by a) scanning for all .lua files additionally to all .cfg files in FINDCFG and b) by adding the equivalent of a "commented out" #textdomain DOMAIN declaration next step: testing if it really does work as expected this should also fix bug #15629 since the objectives are now *only* declared via some lua magic
23 lines
450 B
Lua
23 lines
450 B
Lua
--! #textdomain wesnoth-low
|
|
|
|
local labels = {}
|
|
local wml_label
|
|
|
|
wml_label = wesnoth.register_wml_action("label",
|
|
function(cfg)
|
|
table.insert(labels, cfg.__parsed)
|
|
wml_label(cfg)
|
|
end)
|
|
|
|
wesnoth.register_wml_action("shift_labels",
|
|
function(cfg)
|
|
for k, v in ipairs(labels) do
|
|
wml_label { x = v.x, y = v.y }
|
|
end
|
|
for k, v in ipairs(labels) do
|
|
v.x = v.x + cfg.x
|
|
v.y = v.y + cfg.y
|
|
wml_label(v)
|
|
end
|
|
end)
|