mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 03:25:23 +09:00
Add startable legacy code
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
@commands Spawn
|
||||
]]
|
||||
|
||||
local Commands = require 'expcore.commands' --- @dep expcore.commands
|
||||
local Roles = require 'expcore.roles' --- @dep expcore.roles
|
||||
local Commands = require("modules.exp_legacy.expcore.commands") --- @dep expcore.commands
|
||||
local Roles = require("modules.exp_legacy.expcore.roles") --- @dep expcore.roles
|
||||
|
||||
local function teleport(player)
|
||||
local surface = player.surface
|
||||
@@ -52,12 +52,10 @@ Commands.new_command('go-to-spawn', {'expcom-spawn.description'}, 'Teleport to s
|
||||
:register(function(player, action_player)
|
||||
if not action_player then
|
||||
return Commands.error{'expcom-spawn.unavailable'}
|
||||
|
||||
elseif action_player == player then
|
||||
if not teleport(player) then
|
||||
return Commands.error{'expcom-spawn.unavailable'}
|
||||
end
|
||||
|
||||
elseif Roles.player_allowed(player, 'command/go-to-spawn/always') then
|
||||
if not teleport(action_player) then
|
||||
return Commands.error{'expcom-spawn.unavailable'}
|
||||
|
||||
Reference in New Issue
Block a user