1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2024-12-12 10:04:40 +02:00

Merge pull request #190 from grilledham/popup-fix

Popup fix
This commit is contained in:
grilledham 2018-06-21 12:20:59 +01:00 committed by GitHub
commit 8053234b49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View File

@ -569,7 +569,8 @@ if not _DEBUG then
local success, error = pcall(func, cmd)
if not success then
log(error)
player_print(error)
--player_print(error) -- This casues desyncs
player_print('Sorry there was an error running '.. cmd.name)
end
end
)

View File

@ -71,7 +71,13 @@ local function popup(cmd)
return
end
local message = cmd.parameter:gsub('\\n', '\n')
local message = cmd.parameter
if not message then
player_print('Usage: /popup <message>')
return
end
message = message:gsub('\\n', '\n')
for _, p in ipairs(game.connected_players) do
show_popup(p, message)