1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-01-08 00:39:30 +02:00
ComfyFactorio/control.lua

129 lines
3.7 KiB
Lua
Raw Normal View History

2019-03-10 00:18:52 +02:00
require 'utils.data_stages'
_LIFECYCLE = _STAGE.control -- Control stage
_DEBUG = false
_DUMP_ENV = false
2019-02-20 12:43:29 +02:00
server_commands = require 'utils.server'
require "utils.server_commands"
2018-09-19 06:51:25 +02:00
require "utils.utils"
2019-08-09 18:01:07 +02:00
require "utils.table"
2019-08-06 03:04:35 +02:00
require "utils.corpse_util" --disable for hunger games
2019-07-28 12:21:57 +02:00
require "utils.color_data"
require "utils.session_data"
2018-12-18 10:42:37 +02:00
require "chatbot"
2019-02-14 16:44:12 +02:00
require "commands"
require "antigrief"
2018-11-18 15:18:43 +02:00
require "antigrief_admin_panel"
2018-09-19 06:51:25 +02:00
require "group"
require "player_list"
2019-02-26 22:00:00 +02:00
require "poll"
2019-06-07 11:18:08 +02:00
require "score"
require "modules.floaty_chat"
2019-08-26 02:00:00 +02:00
--require "modules.autohotbar"
2019-06-07 11:18:08 +02:00
--require "on_tick_schedule"
2018-09-29 19:01:13 +02:00
---- enable modules here ----
2019-03-16 10:14:41 +02:00
--require "tools.cheat_mode"
2019-08-06 03:04:35 +02:00
--require "modules.the_floor_is_lava"
2019-05-17 20:33:53 +02:00
--require "modules.autodecon_when_depleted"
--require "modules.biter_noms_you"
--require "modules.biters_avoid_damage"
--require "modules.biters_double_damage"
--require "modules.burden"
--require "modules.comfylatron"
2019-07-24 19:23:18 +02:00
--require "modules.spaghett_challenge"
2019-05-17 20:33:53 +02:00
--require "modules.dangerous_goods"
--require "modules.dynamic_landfill"
--require "modules.explosive_biters"
--require "modules.explosive_player_respawn"
--require "modules.explosives_are_explosive"
2019-03-13 18:09:06 +02:00
--require "modules.fish_respawner"
--require "modules.fluids_are_explosive"
2019-05-17 20:33:53 +02:00
--require "modules.hunger"
2019-03-13 18:09:06 +02:00
--require "modules.hunger_games"
2019-05-17 20:33:53 +02:00
--require "modules.players_trample_paths"
--require "modules.railgun_enhancer"
--require "modules.restrictive_fluid_mining"
--require "modules.satellite_score"
--require "modules.show_health"
2019-05-17 20:33:53 +02:00
--require "modules.splice_double"
2019-06-07 11:18:08 +02:00
--require "modules.team_teleport" --(REQUIRES "on_tick_schedule" !)
--require "modules.surrounded_by_worms"
--require "modules.more_attacks"
--require "modules.evolution_extended"
-----------------------------
2018-09-19 06:51:25 +02:00
2018-09-29 11:39:36 +02:00
---- enable maps here ----
2019-08-01 22:16:37 +02:00
--require "maps.tank_conquest.tank_conquest"
2019-07-08 16:56:19 +02:00
--require "maps.territorial_control"
--require "maps.cave_choppy.cave_miner"
2019-08-01 22:16:37 +02:00
--require "maps.biter_battles_v2.biter_battles_v2"
--require "maps.biter_battles.biter_battles"
2019-05-17 20:33:53 +02:00
--require "maps.fish_defender.fish_defender"
--require "maps.wave_of_death.WoD"
2019-06-07 11:18:08 +02:00
--require "maps.stone_maze.main"
2019-08-16 23:19:19 +02:00
--require "maps.overgrowth"
2019-08-26 02:00:00 +02:00
require "maps.tetris"
2019-08-12 14:34:16 +02:00
--require "maps.maze_challenge"
2019-03-08 18:22:06 +02:00
--require "maps.cave_miner"
2019-08-09 18:01:07 +02:00
--require "maps.rocky_waste"
2019-03-19 00:53:27 +02:00
--require "maps.labyrinth"
2019-03-23 03:02:30 +02:00
--require "maps.junkyard"
2019-01-15 03:32:05 +02:00
--require "maps.spooky_forest"
2019-06-07 11:18:08 +02:00
--require "maps.mixed_railworld"
2019-01-04 10:06:26 +02:00
--require "maps.nightfall"
2019-03-31 10:22:20 +02:00
--require "maps.lost"
2019-04-15 09:02:51 +02:00
--require "maps.hedge_maze"
2019-04-13 19:12:46 +02:00
--require "maps.rivers"
2019-03-13 03:38:38 +02:00
--require "maps.atoll"
2019-05-17 20:33:53 +02:00
--require "maps.rainbow_road"
--require "maps.cratewood_forest"
2019-03-11 23:38:34 +02:00
--require "maps.choppy"
2018-12-31 02:55:18 +02:00
--require "maps.tank_battles"
2019-03-18 06:51:32 +02:00
--require "maps.spiral_troopers"
2019-02-28 19:53:33 +02:00
--require "maps.mountain_fortress"
--require "maps.stoneblock"
2019-02-26 19:42:36 +02:00
--require "maps.deep_jungle"
2018-11-16 09:13:08 +02:00
--require "maps.crossing"
--require "maps.anarchy"
2018-12-31 02:55:18 +02:00
--require "maps.spaghettorio"
2019-06-07 11:18:08 +02:00
--require "maps.blue_beach"
2018-12-31 02:55:18 +02:00
--require "maps.lost_desert"
2019-05-17 20:33:53 +02:00
--require "maps.cube"
2019-08-26 02:00:00 +02:00
--require "maps.forest_circle"
2019-02-05 09:42:45 +02:00
--require "maps.empty_map"
--require "maps.custom_start"
2018-09-19 06:51:25 +02:00
-----------------------------
2019-08-16 23:19:19 +02:00
---- more modules here ----
--require "modules.trees_grow"
--require "modules.trees_randomly_die"
------
2019-02-14 16:44:12 +02:00
local event = require 'utils.event'
2018-09-19 06:51:25 +02:00
2019-03-10 00:18:52 +02:00
if _DUMP_ENV then
require 'utils.dump_env'
end
if _DEBUG then
require 'utils.debug.command'
end
2019-07-24 19:42:27 +02:00
local function on_player_created(event)
local player = game.players[event.player_index]
2018-09-19 06:51:25 +02:00
player.gui.top.style = 'slot_table_spacing_horizontal_flow'
player.gui.left.style = 'slot_table_spacing_vertical_flow'
end
2019-04-13 19:12:46 +02:00
local function on_init()
game.forces.player.research_queue_enabled = true
end
local loaded = _G.package.loaded
function require(path)
return loaded[path] or error('Can only require files at runtime that have been required in the control stage.', 2)
end
2019-04-13 19:12:46 +02:00
event.on_init(on_init)
event.add(defines.events.on_player_created, on_player_created)