mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-30 20:41:41 +09:00
Merge branch 'hotfix/deconThreadError' into dev
This commit is contained in:
@@ -27,8 +27,8 @@ end)
|
|||||||
|
|
||||||
function Admin.kick(player,by_player,reason)
|
function Admin.kick(player,by_player,reason)
|
||||||
player = Game.get_player(player)
|
player = Game.get_player(player)
|
||||||
reason = Admin.create_reason(reason,by_player_name)
|
|
||||||
local by_player_name = Game.get_player(by_player) and Game.get_player(by_player).name or '<server>'
|
local by_player_name = Game.get_player(by_player) and Game.get_player(by_player).name or '<server>'
|
||||||
|
reason = Admin.create_reason(reason,by_player_name)
|
||||||
if Sync then Sync.emit_embedded{
|
if Sync then Sync.emit_embedded{
|
||||||
title='Player Kick',
|
title='Player Kick',
|
||||||
color=Color.to_hex(defines.textcolor.high),
|
color=Color.to_hex(defines.textcolor.high),
|
||||||
|
|||||||
@@ -24,12 +24,12 @@ commands.add_command('home', 'Allows you to set, remove and goto your homes', {
|
|||||||
homes._n=homes._n+1
|
homes._n=homes._n+1
|
||||||
player_return{'ExpGamingCommands-home.set',name,pos[1],pos[2]}
|
player_return{'ExpGamingCommands-home.set',name,pos[1],pos[2]}
|
||||||
elseif command == 'remove' then
|
elseif command == 'remove' then
|
||||||
if not homes[name] then player_return{'ExpGamingCommands-home.invalid',name} end
|
if not homes[name] then player_return{'ExpGamingCommands-home.invalid',name} return commands.error end
|
||||||
homes[name] = nil
|
homes[name] = nil
|
||||||
homes._n=homes._n-1
|
homes._n=homes._n-1
|
||||||
player_return{'ExpGamingCommands-home.remove',name}
|
player_return{'ExpGamingCommands-home.remove',name}
|
||||||
elseif command == 'goto' then
|
elseif command == 'goto' then
|
||||||
if not homes[name] then player_return{'ExpGamingCommands-home.invalid',name} end
|
if not homes[name] then player_return{'ExpGamingCommands-home.invalid',name} return commands.error end
|
||||||
local pos = {math.floor(player.position.x),math.floor(player.position.y)}
|
local pos = {math.floor(player.position.x),math.floor(player.position.y)}
|
||||||
player.teleport(player.surface.find_non_colliding_position('player',homes[name],32,1),player.surface)
|
player.teleport(player.surface.find_non_colliding_position('player',homes[name],32,1),player.surface)
|
||||||
homes._r = pos
|
homes._r = pos
|
||||||
|
|||||||
@@ -457,7 +457,8 @@ function Server._thread:error(err)
|
|||||||
_return = true
|
_return = true
|
||||||
else
|
else
|
||||||
self:close() -- no matter what happens next this thread will be closed
|
self:close() -- no matter what happens next this thread will be closed
|
||||||
error('Thread Error (no handler): '..err)
|
local name = self.name or self.uuid
|
||||||
|
error('Thread Error (no handler) on <'..name..'>: '..err)
|
||||||
end
|
end
|
||||||
return _return
|
return _return
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user