mirror of
https://github.com/Refactorio/RedMew.git
synced 2025-01-18 03:21:47 +02:00
fixed crash
This commit is contained in:
parent
38c1e6f339
commit
a0b737d7fb
@ -89,11 +89,10 @@ local function walkabout(cmd)
|
||||
if duration < 15 then duration = 15 end
|
||||
|
||||
local player = game.players[player_name]
|
||||
if player == nil or global.walking[player_name:lower()] then
|
||||
if type(player) ~= "table" or global.walking[player_name:lower()] then
|
||||
player_print(player_name .. " could not go on a walkabout.")
|
||||
return
|
||||
end
|
||||
|
||||
local chunks = {}
|
||||
for chunk in player.surface.get_chunks() do
|
||||
table.insert(chunks, chunk)
|
||||
@ -440,7 +439,7 @@ commands.add_command("kill", "Will kill you.", kill)
|
||||
commands.add_command("tpplayer", "<player> - Teleports you to the player. (Admins and moderators)", teleport_player)
|
||||
commands.add_command("invoke", "<player> - Teleports the player to you. (Admins and moderators)", invoke)
|
||||
commands.add_command("tppos", "Teleports you to a selected entity. (Admins only)", teleport_location)
|
||||
commands.add_command("walkabout", '<player> <"close", "far", "very far", number> <duration> - Send someone on a walk. (Admins and moderators)', walkabout)
|
||||
commands.add_command("walkabout", '<player> <duration> - Send someone on a walk. (Admins and moderators)', walkabout)
|
||||
commands.add_command("market", 'Places a fish market near you. (Admins only)', spawn_market)
|
||||
commands.add_command("regulars", 'Prints a list of game regulars.', print_regulars)
|
||||
commands.add_command("regular", '<promote, demote>, <player> Change regular status of a player. (Admins and moderators)', regular)
|
||||
|
Loading…
x
Reference in New Issue
Block a user