1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-01-22 03:38:48 +02:00

removed not needed locals

This commit is contained in:
Gerkiz 2020-10-10 20:37:28 +02:00
parent 26cc24d1c5
commit 2bf649a215
3 changed files with 57 additions and 87 deletions

View File

@ -31,7 +31,7 @@ require 'comfy_panel.config'
require 'modules.autostash' require 'modules.autostash'
---------------- ENABLE MODULES HERE ---------------- ---------------- !ENABLE MODULES HERE ----------------
--require 'modules.admins_operate_biters' --require 'modules.admins_operate_biters'
--require 'modules.the_floor_is_lava' --require 'modules.the_floor_is_lava'
--require 'modules.biters_landfill_on_death' --require 'modules.biters_landfill_on_death'
@ -75,117 +75,116 @@ require 'modules.autostash'
--require 'modules.simple_tags' --require 'modules.simple_tags'
--------------------------------------------------------------- ---------------------------------------------------------------
---------------- ENABLE MAPS HERE ---------------- ---------------- ENABLE MAPS HERE ----------------
--Make sure only one map is enabled at a time. --!Make sure only one map is enabled at a time.
--Remove the "--" in front of the line to enable. --!Remove the "--" in front of the line to enable.
--All lines with the "require" keyword are different maps. --!All lines with the "require" keyword are different maps.
--[[North VS South Survival PVP, feed the opposing team's biters with science flasks. Disable Autostash, Group and Poll modules.]]-- --![[North VS South Survival PVP, feed the opposing team's biters with science flasks. Disable Autostash, Group and Poll modules.]]--
--require 'maps.biter_battles_v2.main' --require 'maps.biter_battles_v2.main'
--require 'maps.biter_battles.biter_battles' --require 'maps.biter_battles.biter_battles'
--[[Defend the market against waves of biters]]-- --![[Guide a Train through rough terrain, while defending it from the biters]]--
-- require 'maps.mountain_fortress_v3.main'
--require 'maps.mountain_fortress_v2.main'
--require 'maps.mountain_fortress'
--![[Defend the market against waves of biters]]--
--require 'maps.fish_defender_v2.main' --require 'maps.fish_defender_v2.main'
--require 'maps.crab_defender.main' --require 'maps.crab_defender.main'
--require 'maps.fish_defender_v1.fish_defender' --require 'maps.fish_defender_v1.fish_defender'
--require 'maps.fish_defender.main' --require 'maps.fish_defender.main'
--[[Comfylatron has seized the Fish Train and turned it into a time machine]]-- --![[Comfylatron has seized the Fish Train and turned it into a time machine]]--
--require 'maps.chronosphere.main' --require 'maps.chronosphere.main'
--[[East VS West Survival PVP, where you breed biters with science flasks]]-- --![[East VS West Survival PVP, where you breed biters with science flasks]]--
--require 'maps.biter_hatchery.main' --require 'maps.biter_hatchery.main'
--[[Guide a Train through rough terrain, while defending it from the biters]]-- --![[Chop trees to gain resources]]--
--require 'maps.mountain_fortress_v3.main'
--require 'maps.mountain_fortress_v2.main'
--require 'maps.mountain_fortress'
--[[Chop trees to gain resources]]--
--require 'maps.choppy' --require 'maps.choppy'
--require 'maps.choppy_dx' --require 'maps.choppy_dx'
--[[Infinite random dungeon with RPG]]-- --![[Infinite random dungeon with RPG]]--
--require 'maps.dungeons.main' --require 'maps.dungeons.main'
--require 'maps.dungeons.tiered_dungeon' --require 'maps.dungeons.tiered_dungeon'
--[[Randomly generating Islands that have to be beaten in levels to gain credits]]-- --![[Randomly generating Islands that have to be beaten in levels to gain credits]]--
--require 'maps.island_troopers.main' --require 'maps.island_troopers.main'
--[[Infinitely expanding mazes]]-- --![[Infinitely expanding mazes]]--
--require 'maps.stone_maze.main' --require 'maps.stone_maze.main'
--require 'maps.labyrinth' --require 'maps.labyrinth'
--[[Extreme survival mode with thirst and limited building room]]-- --![[Extreme survival mode with thirst and limited building room]]--
--require 'maps.desert_oasis' --require 'maps.desert_oasis'
--[[The trees are your enemy here]]-- --![[The trees are your enemy here]]--
--require 'maps.overgrowth' --require 'maps.overgrowth'
--[[Wave Defense Map split in 4 Quarters]]-- --![[Wave Defense Map split in 4 Quarters]]--
--'maps.quarters' --'maps.quarters'
--[[Flee from the collapsing map with portable base inside train]]-- --![[Flee from the collapsing map with portable base inside train]]--
--require 'maps.railway_troopers_v2.main' --require 'maps.railway_troopers_v2.main'
--[[Another simliar version without collapsing terrain]]-- --![[Another simliar version without collapsing terrain]]--
--require 'maps.railway_troopers.main' --require 'maps.railway_troopers.main'
--[[You fell in a dark cave, will you survive?]]-- --![[You fell in a dark cave, will you survive?]]--
--require 'maps.cave_miner' --require 'maps.cave_miner'
--require 'maps.cave_choppy.cave_miner' --require 'maps.cave_choppy.cave_miner'
--[[Hungry boxes eat your items, but reward you with new territory to build.]]-- --![[Hungry boxes eat your items, but reward you with new territory to build.]]--
--require 'maps.expanse.main' --require 'maps.expanse.main'
--[[Crashlanding on Junk Planet]]-- --![[Crashlanding on Junk Planet]]--
--require 'maps.junkyard' --require 'maps.junkyard'
--require 'maps.territorial_control' --require 'maps.territorial_control'
--require 'maps.junkyard_pvp.main' --require 'maps.junkyard_pvp.main'
--[[A green maze]]-- --![[A green maze]]--
--require 'maps.hedge_maze' --require 'maps.hedge_maze'
--[[Dangerous forest with unique map revealing]]-- --![[Dangerous forest with unique map revealing]]--
--require 'maps.spooky_forest' --require 'maps.spooky_forest'
--[[Defeat the biters and unlock new areas]]-- --![[Defeat the biters and unlock new areas]]--
--require 'maps.spiral_troopers' --require 'maps.spiral_troopers'
--[[Railworld style terrains]]-- --![[Railworld style terrains]]--
--require 'maps.mixed_railworld' --require 'maps.mixed_railworld'
--require 'maps.scrap_railworld' --require 'maps.scrap_railworld'
--[[It's tetris!]]-- --![[It's tetris!]]--
--require 'maps.tetris.main' --require 'maps.tetris.main'
--[[4 Team Lane Surival]]-- --![[4 Team Lane Surival]]--
--require 'maps.wave_of_death.WoD' --require 'maps.wave_of_death.WoD'
--[[PVP Battles with Tanks]]-- --![[PVP Battles with Tanks]]--
--require 'maps.tank_conquest.tank_conquest' --require 'maps.tank_conquest.tank_conquest'
--require 'maps.tank_battles' --require 'maps.tank_battles'
--[[Terrain with lots of Rocks]]-- --![[Terrain with lots of Rocks]]--
--require 'maps.rocky_waste' --require 'maps.rocky_waste'
--[[Landfill is reveals the map, set resources to high when rolling the map]]-- --![[Landfill is reveals the map, set resources to high when rolling the map]]--
--require 'maps.lost' --require 'maps.lost'
--[[A terrain layout with many rivers]]-- --![[A terrain layout with many rivers]]--
--require 'maps.rivers' --require 'maps.rivers'
--[[Islands Theme]]-- --![[Islands Theme]]--
--require 'maps.atoll' --require 'maps.atoll'
--[[Placed buildings can hardly be removed]]-- --![[Placed buildings can hardly be removed]]--
--require 'maps.refactor-io' --require 'maps.refactor-io'
--[[Prebuilt buildings on the map that can not be removed, you will hate this map]]-- --![[Prebuilt buildings on the map that can not be removed, you will hate this map]]--
--require 'maps.spaghettorio' --require 'maps.spaghettorio'
--[[Misc / WIP]]-- --![[Misc / WIP]]--
--require 'maps.rainbow_road' --require 'maps.rainbow_road'
--require 'maps.deep_jungle' --require 'maps.deep_jungle'
--require 'maps.cratewood_forest' --require 'maps.cratewood_forest'
@ -205,7 +204,6 @@ require 'modules.autostash'
--require 'maps.native_war.main' --require 'maps.native_war.main'
--------------------------------------------------------------- ---------------------------------------------------------------
---------------- MORE MODULES HERE ---------------- ---------------- MORE MODULES HERE ----------------
--require 'modules.hidden_dimension.main' --require 'modules.hidden_dimension.main'
--require 'modules.towny.main' --require 'modules.towny.main'
@ -215,7 +213,6 @@ require 'modules.autostash'
--require 'modules.trees_randomly_die' --require 'modules.trees_randomly_die'
--------------------------------------------------------------- ---------------------------------------------------------------
---------------- MOSTLY TERRAIN LAYOUTS HERE ---------------- ---------------- MOSTLY TERRAIN LAYOUTS HERE ----------------
--require 'terrain_layouts.caves' --require 'terrain_layouts.caves'
--require 'terrain_layouts.cone_to_east' --require 'terrain_layouts.cone_to_east'

View File

@ -1,31 +1,30 @@
local DebugView = require 'utils.debug.main_view' local DebugView = require 'utils.debug.main_view'
local Model = require 'model'
local loadstring = loadstring
local pcall = pcall
local dump = Model.dump
local log = log
commands.add_command( commands.add_command(
'debug', 'debug',
'Opens the debugger', 'Opens the debugger',
function(_) function(_)
local player = game.player local player = game.player
local p if not player or not player.valid then
if player then return
p = player.print
if not player.admin then
p('Only admins can use this command.')
return
end
else
p = player.print
end end
DebugView.open_dubug(player)
if not player.admin then
player.print('Only admins can use this command.')
return
end
DebugView.open_debug(player)
end end
) )
if _DEBUG then if _DEBUG then
local Model = require 'model'
local loadstring = loadstring
local pcall = pcall
local dump = Model.dump
local log = log
commands.add_command( commands.add_command(
'dump-log', 'dump-log',
'Dumps value to log', 'Dumps value to log',

View File

@ -20,7 +20,7 @@ local main_frame_name = Gui.uid_name()
local close_name = Gui.uid_name() local close_name = Gui.uid_name()
local tab_name = Gui.uid_name() local tab_name = Gui.uid_name()
function Public.open_dubug(player) function Public.open_debug(player)
for i = 1, #pages do for i = 1, #pages do
local page = pages[i] local page = pages[i]
local callback = page.on_open_debug local callback = page.on_open_debug
@ -35,7 +35,7 @@ function Public.open_dubug(player)
return return
end end
frame = screen.add {type = 'frame', name = main_frame_name, caption = 'Debuggertron 3002', direction = 'vertical'} frame = screen.add {type = 'frame', name = main_frame_name, caption = 'Debuggertron 3003', direction = 'vertical'}
frame.auto_center = true frame.auto_center = true
local frame_style = frame.style local frame_style = frame.style
frame_style.height = 600 frame_style.height = 600
@ -69,32 +69,6 @@ function Public.open_dubug(player)
frame.add {type = 'button', name = close_name, caption = 'Close'} frame.add {type = 'button', name = close_name, caption = 'Close'}
end end
Event.add(
defines.events.on_player_left_game,
function(event)
local player = game.players[event.player_index]
local frame = player.gui.screen[main_frame_name]
if frame then
Gui.destroy(frame)
end
end
)
Event.add(
defines.events.on_gui_closed,
function(event)
local type = event.gui_type
if type == defines.gui_type.custom then
local player = game.players[event.player_index]
local frame = player.gui.screen[main_frame_name]
if frame then
Gui.destroy(frame)
end
end
end
)
Gui.on_click( Gui.on_click(
tab_name, tab_name,
function(event) function(event)