mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-03 16:05:43 +00:00
add [message] wait_description=
the description provided in wait_description is used when other players wait for this [message] input.
This commit is contained in:
parent
4c3e00b3bb
commit
58512935d4
@ -2,6 +2,7 @@
|
|||||||
local helper = wesnoth.require "lua/helper.lua"
|
local helper = wesnoth.require "lua/helper.lua"
|
||||||
local utils = wesnoth.require "lua/wml-utils.lua"
|
local utils = wesnoth.require "lua/wml-utils.lua"
|
||||||
local location_set = wesnoth.require "lua/location_set.lua"
|
local location_set = wesnoth.require "lua/location_set.lua"
|
||||||
|
local _ = wesnoth.textdomain "wesnoth"
|
||||||
|
|
||||||
local function log(msg, level)
|
local function log(msg, level)
|
||||||
wesnoth.wml_actions.wml_message({
|
wesnoth.wml_actions.wml_message({
|
||||||
@ -196,11 +197,12 @@ function wesnoth.wml_actions.message(cfg)
|
|||||||
-- Always show the dialog if it has no input, whether we are replaying or not
|
-- Always show the dialog if it has no input, whether we are replaying or not
|
||||||
msg_dlg()
|
msg_dlg()
|
||||||
else
|
else
|
||||||
|
local wait_description = cfg.wait_description or _("input")
|
||||||
if type(sides_for) ~= "number" then
|
if type(sides_for) ~= "number" then
|
||||||
-- 0 means currently playing side.
|
-- 0 means currently playing side.
|
||||||
sides_for = 0
|
sides_for = 0
|
||||||
end
|
end
|
||||||
local choice = wesnoth.synchronize_choice(msg_dlg, sides_for)
|
local choice = wesnoth.synchronize_choice(wait_description, msg_dlg, sides_for)
|
||||||
|
|
||||||
option_chosen = tonumber(choice.value)
|
option_chosen = tonumber(choice.value)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user