1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-01-06 00:23:49 +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'
---------------- ENABLE MODULES HERE ----------------
---------------- !ENABLE MODULES HERE ----------------
--require 'modules.admins_operate_biters'
--require 'modules.the_floor_is_lava'
--require 'modules.biters_landfill_on_death'
@ -75,117 +75,116 @@ require 'modules.autostash'
--require 'modules.simple_tags'
---------------------------------------------------------------
---------------- ENABLE MAPS HERE ----------------
--Make sure only one map is enabled at a time.
--Remove the "--" in front of the line to enable.
--All lines with the "require" keyword are different maps.
--!Make sure only one map is enabled at a time.
--!Remove the "--" in front of the line to enable.
--!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.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.crab_defender.main'
--require 'maps.fish_defender_v1.fish_defender'
--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'
--[[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'
--[[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'
--[[Chop trees to gain resources]]--
--![[Chop trees to gain resources]]--
--require 'maps.choppy'
--require 'maps.choppy_dx'
--[[Infinite random dungeon with RPG]]--
--![[Infinite random dungeon with RPG]]--
--require 'maps.dungeons.main'
--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'
--[[Infinitely expanding mazes]]--
--![[Infinitely expanding mazes]]--
--require 'maps.stone_maze.main'
--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'
--[[The trees are your enemy here]]--
--![[The trees are your enemy here]]--
--require 'maps.overgrowth'
--[[Wave Defense Map split in 4 Quarters]]--
--![[Wave Defense Map split in 4 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'
--[[Another simliar version without collapsing terrain]]--
--![[Another simliar version without collapsing terrain]]--
--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_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'
--[[Crashlanding on Junk Planet]]--
--![[Crashlanding on Junk Planet]]--
--require 'maps.junkyard'
--require 'maps.territorial_control'
--require 'maps.junkyard_pvp.main'
--[[A green maze]]--
--![[A green maze]]--
--require 'maps.hedge_maze'
--[[Dangerous forest with unique map revealing]]--
--![[Dangerous forest with unique map revealing]]--
--require 'maps.spooky_forest'
--[[Defeat the biters and unlock new areas]]--
--![[Defeat the biters and unlock new areas]]--
--require 'maps.spiral_troopers'
--[[Railworld style terrains]]--
--![[Railworld style terrains]]--
--require 'maps.mixed_railworld'
--require 'maps.scrap_railworld'
--[[It's tetris!]]--
--![[It's tetris!]]--
--require 'maps.tetris.main'
--[[4 Team Lane Surival]]--
--![[4 Team Lane Surival]]--
--require 'maps.wave_of_death.WoD'
--[[PVP Battles with Tanks]]--
--![[PVP Battles with Tanks]]--
--require 'maps.tank_conquest.tank_conquest'
--require 'maps.tank_battles'
--[[Terrain with lots of Rocks]]--
--![[Terrain with lots of Rocks]]--
--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'
--[[A terrain layout with many rivers]]--
--![[A terrain layout with many rivers]]--
--require 'maps.rivers'
--[[Islands Theme]]--
--![[Islands Theme]]--
--require 'maps.atoll'
--[[Placed buildings can hardly be removed]]--
--![[Placed buildings can hardly be removed]]--
--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'
--[[Misc / WIP]]--
--![[Misc / WIP]]--
--require 'maps.rainbow_road'
--require 'maps.deep_jungle'
--require 'maps.cratewood_forest'
@ -205,7 +204,6 @@ require 'modules.autostash'
--require 'maps.native_war.main'
---------------------------------------------------------------
---------------- MORE MODULES HERE ----------------
--require 'modules.hidden_dimension.main'
--require 'modules.towny.main'
@ -215,7 +213,6 @@ require 'modules.autostash'
--require 'modules.trees_randomly_die'
---------------------------------------------------------------
---------------- MOSTLY TERRAIN LAYOUTS HERE ----------------
--require 'terrain_layouts.caves'
--require 'terrain_layouts.cone_to_east'
@ -241,4 +238,4 @@ function require(path)
end
local Event = require 'utils.event'
Event.add(defines.events.on_player_created, on_player_created)
Event.add(defines.events.on_player_created, on_player_created)

View File

@ -1,31 +1,30 @@
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(
'debug',
'Opens the debugger',
function(_)
local player = game.player
local p
if player then
p = player.print
if not player.admin then
p('Only admins can use this command.')
return
end
else
p = player.print
if not player or not player.valid then
return
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
)
if _DEBUG then
local Model = require 'model'
local loadstring = loadstring
local pcall = pcall
local dump = Model.dump
local log = log
commands.add_command(
'dump-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 tab_name = Gui.uid_name()
function Public.open_dubug(player)
function Public.open_debug(player)
for i = 1, #pages do
local page = pages[i]
local callback = page.on_open_debug
@ -35,7 +35,7 @@ function Public.open_dubug(player)
return
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
local frame_style = frame.style
frame_style.height = 600
@ -69,32 +69,6 @@ function Public.open_dubug(player)
frame.add {type = 'button', name = close_name, caption = 'Close'}
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(
tab_name,
function(event)