Skip to content

Commit

Permalink
Simplify conditional for 'get' and 'show'
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeroKnight committed Jun 17, 2019
1 parent 694cb8d commit fb89b99
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions commands.lua
Expand Up @@ -45,12 +45,12 @@ function command_spawn(command, args)
else
game.print{"invalid-parameter"}
end
elseif subcommand == "get" then
elseif subcommand == "get" or subcommand == "show" then
pos = player.force.get_spawn_position(1)
game.print{"setspawn.spawn-point-get", player.force.name, pos.x, pos.y}
elseif subcommand == "show" then
pos = player.force.get_spawn_position(1)
game.print{"setspawn.spawn-point-show", player.force.name, pos.x, pos.y}
game.print{
"setspawn.spawn-point-"..subcommand,
player.force.name, pos.x, pos.y
}
elseif subcommand == "reset" then
pos = global.original_spawn[player.force.name]
player.force.set_spawn_position(pos, 1)
Expand Down

0 comments on commit fb89b99

Please sign in to comment.