mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-31 04:51:40 +09:00
Improved Warp System
This commit is contained in:
@@ -204,16 +204,18 @@ Event.register(defines.events.on_tick,function(event)
|
|||||||
if _warps().cooldowns[index] == 0 then player_return({'warp-system.cooldown-zero'},defines.text_color.low,index) end
|
if _warps().cooldowns[index] == 0 then player_return({'warp-system.cooldown-zero'},defines.text_color.low,index) end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
for _,player in pairs(game.connected_players) do
|
end)
|
||||||
local cooldown = _warps().cooldowns[player.index] or 0
|
|
||||||
if not Ranking.get_rank(player):allowed('always-warp') and cooldown == 0 then
|
Event.register(defines.events.on_player_changed_position, function(event)
|
||||||
if player.surface.get_tile(player.position).name == warp_tile
|
local player = Game.get_player(event)
|
||||||
or player.surface.get_tile(player.position).name == warp_partern
|
local cooldown = _warps().cooldowns[player.index] or 0
|
||||||
and player.surface.name == 'nauvis'
|
local tile = player.surface.get_tile(player.position).name
|
||||||
then mod_gui.get_frame_flow(player)['warp-list'].style.visible = true
|
if not Ranking.get_rank(player):allowed('always-warp') and cooldown == 0 then
|
||||||
elseif player.position.x^2+player.position.y^2 < (warp_radius*spawn_warp_scale)^2 then mod_gui.get_frame_flow(player)['warp-list'].style.visible = true
|
if tile == warp_tile or tile == warp_partern and player.surface.name == 'nauvis' then
|
||||||
else mod_gui.get_frame_flow(player)['warp-list'].style.visible = false end
|
mod_gui.get_frame_flow(player)['warp-list'].style.visible = true
|
||||||
end
|
elseif player.position.x^2+player.position.y^2 < (warp_radius*spawn_warp_scale)^2 then
|
||||||
|
mod_gui.get_frame_flow(player)['warp-list'].style.visible = true
|
||||||
|
else mod_gui.get_frame_flow(player)['warp-list'].style.visible = false end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user