mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-01-24 03:47:58 +02:00
Merge pull request #198 from ComfyFactory/chronotrain_commands_fix
fix for crash when sending commande from console
This commit is contained in:
commit
af61da269d
@ -42,9 +42,11 @@ local function scenario(p, parameter)
|
||||
end
|
||||
|
||||
local function cmd_handler(cmd)
|
||||
local command_name = cmd.name
|
||||
local player = game.get_player(cmd.player_index)
|
||||
local p
|
||||
if not cmd.player_index then
|
||||
p = log
|
||||
else
|
||||
local player = game.get_player(cmd.player_index)
|
||||
if not player or not player.valid then
|
||||
p = log
|
||||
else
|
||||
@ -54,6 +56,8 @@ local function cmd_handler(cmd)
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
local command_name = cmd.name
|
||||
if command_name == 'scenario' then
|
||||
scenario(p, cmd.parameter)
|
||||
elseif command_name == 'chronojump' then
|
||||
|
Loading…
x
Reference in New Issue
Block a user