mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-01-26 03:52:22 +02:00
Fix merge conflict
This commit is contained in:
parent
f75ca6dc7b
commit
854a6c5d7c
@ -98,10 +98,13 @@ require 'utils.freeplay'
|
||||
--require 'maps.amap.main'
|
||||
|
||||
--![[Guide a Train through rough terrain, while defending it from the biters]]--
|
||||
--require 'maps.mountain_fortress_v3.main'
|
||||
require 'maps.mountain_fortress_v3.main'
|
||||
--require 'maps.mountain_fortress_v2.main'
|
||||
--require 'maps.mountain_fortress'
|
||||
|
||||
--![[Tower defense system]]--
|
||||
--require 'maps.tower_defense.main'
|
||||
|
||||
--![[Defend the market against waves of biters]]--
|
||||
--require 'maps.pidgeotto.main'
|
||||
--require 'maps.fish_defender_v2.main'
|
||||
@ -164,7 +167,7 @@ require 'utils.freeplay'
|
||||
--require 'maps.deep_jungle.main'
|
||||
|
||||
--![[You fell in a dark cave, will you survive?]]--
|
||||
--require 'maps.cave_choppy.main'
|
||||
-- require 'maps.cave_choppy.main'
|
||||
--require 'maps.cave_miner'
|
||||
--require 'maps.cave_miner_v2.main'
|
||||
|
||||
|
@ -97,24 +97,21 @@ commands.add_command(
|
||||
'set_queue_speed',
|
||||
'Usable only for admins - sets the queue speed of this map!',
|
||||
function(cmd)
|
||||
local p
|
||||
local player = game.player
|
||||
local param = tonumber(cmd.parameter)
|
||||
|
||||
if player and player.valid then
|
||||
p = player.print
|
||||
if not player.admin then
|
||||
p("[ERROR] You're not admin!", Color.fail)
|
||||
player.print("[ERROR] You're not admin!", Color.fail)
|
||||
return
|
||||
end
|
||||
if not param then
|
||||
return
|
||||
end
|
||||
p('Queue speed set to: ' .. param)
|
||||
player.print('Queue speed set to: ' .. param)
|
||||
Task.set_queue_speed(param)
|
||||
else
|
||||
p = log
|
||||
p('Queue speed set to: ' .. param)
|
||||
log('Queue speed set to: ' .. param)
|
||||
Task.set_queue_speed(param)
|
||||
end
|
||||
end
|
||||
@ -126,7 +123,7 @@ commands.add_command(
|
||||
function()
|
||||
local player = game.player
|
||||
|
||||
if not player and player.valid then
|
||||
if not player or not player.valid then
|
||||
return
|
||||
end
|
||||
if not player.admin then
|
||||
@ -160,8 +157,7 @@ commands.add_command(
|
||||
'Usable only for admins - toggles orbital strikes!',
|
||||
function()
|
||||
local player = game.player
|
||||
|
||||
if not player and player.valid then
|
||||
if not player or not player.valid then
|
||||
return
|
||||
end
|
||||
if not player.admin then
|
||||
@ -210,34 +206,34 @@ commands.add_command(
|
||||
end
|
||||
)
|
||||
|
||||
if _DEBUG then
|
||||
commands.add_command(
|
||||
'start_collapse',
|
||||
'Enabled only on SP',
|
||||
function()
|
||||
local p
|
||||
local player = game.player
|
||||
commands.add_command(
|
||||
'toggle_collapse',
|
||||
'Toggles the collapse feature',
|
||||
function()
|
||||
local player = game.player
|
||||
|
||||
if game.is_multiplayer() then
|
||||
if player and player.valid then
|
||||
if not player.admin then
|
||||
player.print("[ERROR] You're not admin!", Color.fail)
|
||||
return
|
||||
end
|
||||
|
||||
if player and player.valid then
|
||||
p = player.print
|
||||
if not player.admin then
|
||||
p("[ERROR] You're not admin!", Color.fail)
|
||||
return
|
||||
end
|
||||
if not Collapse.start_now() then
|
||||
Collapse.start_now(true)
|
||||
p('Collapse started!')
|
||||
else
|
||||
Collapse.start_now(false)
|
||||
p('Collapse stopped!')
|
||||
end
|
||||
if not Collapse.start_now() then
|
||||
Collapse.start_now(true)
|
||||
game.print(mapkeeper .. ' ' .. player.name .. ', has started collapse!', {r = 0.98, g = 0.66, b = 0.22})
|
||||
else
|
||||
Collapse.start_now(false)
|
||||
game.print(mapkeeper .. ' ' .. player.name .. ', has stopped collapse!', {r = 0.98, g = 0.66, b = 0.22})
|
||||
end
|
||||
else
|
||||
if not Collapse.start_now() then
|
||||
Collapse.start_now(true)
|
||||
log('Collapse has started.')
|
||||
else
|
||||
Collapse.start_now(false)
|
||||
log('Collapse has stopped.')
|
||||
end
|
||||
end
|
||||
)
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
return Public
|
||||
|
@ -172,7 +172,7 @@ function Public.set_active_surface_index(value)
|
||||
end
|
||||
|
||||
function Public.reset()
|
||||
Public.clear_offline_players();
|
||||
Public.clear_offline_players()
|
||||
end
|
||||
|
||||
--- Clears the offline table
|
||||
@ -193,11 +193,14 @@ Event.add(
|
||||
local ticker = game.tick
|
||||
if player and player.online_time >= this.settings.required_online_time then
|
||||
if player.character then
|
||||
insert(this.offline_players, {
|
||||
index = event.player_index,
|
||||
name = player.name,
|
||||
tick = ticker + this.settings.clear_player_after_tick
|
||||
})
|
||||
insert(
|
||||
this.offline_players,
|
||||
{
|
||||
index = event.player_index,
|
||||
name = player.name,
|
||||
tick = ticker + this.settings.clear_player_after_tick
|
||||
}
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user