1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-02-07 13:31:40 +02:00
This commit is contained in:
Gerkiz 2020-08-14 22:53:59 +02:00
parent cc90180237
commit 632ca676e6
2 changed files with 13 additions and 1 deletions

View File

@ -1491,6 +1491,18 @@ local function on_player_changed_surface(event)
local map_name = 'mountain_fortress_v3'
if player.surface.name == 'nauvis' then
local active_surface = WPT.get('active_surface_index')
local surface = game.surfaces[active_surface]
if not surface or not surface.valid then
return
end
player.teleport(
surface.find_non_colliding_position('character', game.forces.player.get_spawn_position(surface), 3, 0, 5),
surface
)
end
if string.sub(player.surface.name, 0, #map_name) ~= map_name then
return Public.add_player_to_permission_group(player, 'locomotive')
else

View File

@ -123,7 +123,7 @@ local vote_to_jail = function(player, griefer)
end
local vote_to_free = function(player, griefer)
if votejail[griefer] and not votefree[griefer] then
if votefree[griefer] and not votefree[griefer] then
votefree[griefer] = {index = 0, actor = player.name}
local message = player.name .. ' has started a vote to free player ' .. griefer
Utils.print_to(nil, message)