2020-04-08 20:38:18 +02:00
require ' utils.data_stages '
_LIFECYCLE = _STAGE.control -- Control stage
2022-03-11 22:54:19 +00:00
_DEBUG = false
2020-04-08 20:38:18 +02:00
_DUMP_ENV = false
require ' utils.server '
2020-05-10 02:42:10 +02:00
require ' utils.server_commands '
2021-12-05 22:15:49 +01:00
require ' utils.command_handler '
2020-05-10 02:42:10 +02:00
require ' utils.utils '
2021-05-19 19:49:57 +02:00
require ' utils.pause_game '
2020-05-10 02:42:10 +02:00
require ' utils.table '
2021-07-12 16:15:55 +02:00
require ' utils.datastore.server_ups_data '
require ' utils.datastore.current_time_data '
2020-08-14 22:07:54 +02:00
require ' utils.datastore.color_data '
require ' utils.datastore.session_data '
require ' utils.datastore.jail_data '
require ' utils.datastore.quickbar_data '
require ' utils.datastore.message_on_join_data '
require ' utils.datastore.player_tag_data '
2021-10-09 13:45:19 +02:00
require ' utils.datastore.supporters '
2021-12-05 22:15:49 +01:00
require ' utils.chatbot '
require ' utils.commands '
require ' utils.antigrief '
require ' utils.debug.command '
2020-05-10 02:42:10 +02:00
require ' modules.corpse_markers '
require ' modules.floaty_chat '
2020-05-14 15:29:33 +02:00
require ' modules.show_inventory '
2021-11-08 21:58:32 -05:00
require ' modules.inserter_drops_pickup '
2021-12-05 22:15:49 +01:00
require ' modules.autostash '
2020-04-08 20:38:18 +02:00
2020-05-10 02:42:10 +02:00
require ' comfy_panel.main '
require ' comfy_panel.player_list '
require ' comfy_panel.admin '
2022-03-19 21:20:55 +00:00
-- require 'comfy_panel.group'
-- require 'comfy_panel.poll'
-- require 'comfy_panel.score'
2020-05-10 02:42:10 +02:00
require ' comfy_panel.config '
2022-01-18 00:07:25 +01:00
require ' comfy_panel.server_select '
2022-03-29 20:12:50 +02:00
require ' utils.freeplay '
2020-04-08 20:38:18 +02:00
2020-10-10 20:37:28 +02:00
---------------- !ENABLE MODULES HERE ----------------
2020-05-10 02:42:10 +02:00
--require 'modules.admins_operate_biters'
2020-05-14 15:29:33 +02:00
--require 'modules.the_floor_is_lava'
--require 'modules.biters_landfill_on_death'
--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'
--require 'modules.dangerous_goods'
--require 'modules.explosive_biters'
--require 'modules.explosive_player_respawn'
--require 'modules.explosives_are_explosive'
--require 'modules.fish_respawner'
--require 'modules.fluids_are_explosive'
--require 'modules.hunger'
--require 'modules.hunger_games'
2020-05-10 02:42:10 +02:00
--require 'modules.pistol_buffs'
2020-05-14 15:29:33 +02:00
--require 'modules.players_trample_paths'
--require 'modules.railgun_enhancer'
--require 'modules.restrictive_fluid_mining'
--require 'modules.satellite_score'
--require 'modules.show_health'
--require 'modules.splice_double'
--require 'modules.ores_are_mixed'
2020-06-13 10:45:04 +02:00
--require 'modules.team_teleport'
2020-05-14 15:29:33 +02:00
--require 'modules.surrounded_by_worms'
--require 'modules.no_blueprint_library'
--require 'modules.explosives'
--require 'modules.biter_pets'
--require 'modules.no_solar'
--require 'modules.biter_reanimator'
--require 'modules.force_health_booster'
--require 'modules.immersive_cargo_wagons.main'
--require 'modules.wave_defense.main'
--require 'modules.fjei.main'
2020-07-21 04:56:09 +02:00
--require 'modules.charging_station'
2020-07-25 20:54:54 +02:00
--require 'modules.nuclear_landmines'
2020-09-09 22:24:49 +02:00
--require 'modules.crawl_into_pipes'
--require 'modules.no_acid_puddles'
2020-10-10 15:30:30 +02:00
--require 'modules.simple_tags'
2021-12-25 23:54:27 +01:00
--require 'modules.turret_filler'
2020-09-13 13:01:16 +02:00
---------------------------------------------------------------
2020-04-08 20:38:18 +02:00
2020-09-13 13:01:16 +02:00
---------------- ENABLE MAPS HERE ----------------
2020-10-10 20:37:28 +02:00
--!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.
2020-09-13 13:01:16 +02:00
2020-10-10 20:37:28 +02:00
--![[North VS South Survival PVP, feed the opposing team's biters with science flasks. Disable Autostash, Group and Poll modules.]]--
2020-09-13 13:01:16 +02:00
--require 'maps.biter_battles_v2.main'
--require 'maps.biter_battles.biter_battles'
2021-02-06 11:20:39 +08:00
--![[A map that imitating MF, defending rocket silos instead of trains]]--
2021-04-04 13:51:27 +02:00
--require 'maps.amap.main'
2021-02-06 11:20:39 +08:00
2020-10-10 20:37:28 +02:00
--![[Guide a Train through rough terrain, while defending it from the biters]]--
2021-04-04 13:51:27 +02:00
--require 'maps.mountain_fortress_v3.main'
2020-10-10 20:37:28 +02:00
--require 'maps.mountain_fortress_v2.main'
--require 'maps.mountain_fortress'
--![[Defend the market against waves of biters]]--
2021-05-08 15:12:33 +02:00
--require 'maps.pidgeotto.main'
2020-07-12 20:54:44 +02:00
--require 'maps.fish_defender_v2.main'
2020-09-13 13:01:16 +02:00
--require 'maps.crab_defender.main'
--require 'maps.fish_defender_v1.fish_defender'
2020-05-14 15:29:33 +02:00
--require 'maps.fish_defender.main'
2020-09-13 13:01:16 +02:00
2020-10-10 20:37:28 +02:00
--![[Comfylatron has seized the Fish Train and turned it into a time machine]]--
2020-09-13 13:01:16 +02:00
--require 'maps.chronosphere.main'
2022-03-25 17:57:58 +00:00
--![[Adventure as a crew of pirates]]--
-- NOTE: This scenario is too large for the main repo, due to hardcoded random numbers. Obtain it from https://github.com/danielmartin0/ComfyFactorio-Pirates
-- NOTE: This scenario is intended to be used with comfy_panel.group, comfy_panel.poll, and comfy_panel.score disabled
require ' maps.pirates.main '
2021-10-13 14:56:49 +01:00
2021-05-09 15:47:39 +02:00
--![[Launch rockets in increasingly harder getting worlds.]]--
--require 'maps.journey.main'
2020-10-10 20:37:28 +02:00
--![[East VS West Survival PVP, where you breed biters with science flasks]]--
2020-09-13 13:01:16 +02:00
--require 'maps.biter_hatchery.main'
2021-03-21 23:31:53 +01:00
--![[Fight in a world where everyone are prisoners]]
--require 'maps.planet_prison'
2020-10-10 20:37:28 +02:00
--![[Chop trees to gain resources]]--
2020-09-13 10:06:15 +02:00
--require 'maps.choppy'
--require 'maps.choppy_dx'
2020-09-13 13:01:16 +02:00
2021-04-19 21:09:00 +02:00
--![[Minesweeper?]]--
--require 'maps.minesweeper.main'
2020-10-10 20:37:28 +02:00
--![[Infinite random dungeon with RPG]]--
2020-05-14 15:29:33 +02:00
--require 'maps.dungeons.main'
2020-07-29 21:28:48 +02:00
--require 'maps.dungeons.tiered_dungeon'
2020-09-13 13:01:16 +02:00
2020-10-10 20:37:28 +02:00
--![[Randomly generating Islands that have to be beaten in levels to gain credits]]--
2020-05-14 15:29:33 +02:00
--require 'maps.island_troopers.main'
2020-09-13 13:01:16 +02:00
2020-10-10 20:37:28 +02:00
--![[Infinitely expanding mazes]]--
2020-05-14 15:29:33 +02:00
--require 'maps.stone_maze.main'
2020-09-13 13:01:16 +02:00
--require 'maps.labyrinth'
2020-10-10 20:37:28 +02:00
--![[Extreme survival mode with thirst and limited building room]]--
2020-09-13 10:06:15 +02:00
--require 'maps.desert_oasis'
2020-09-13 13:01:16 +02:00
2020-10-10 20:37:28 +02:00
--![[The trees are your enemy here]]--
2020-05-14 15:29:33 +02:00
--require 'maps.overgrowth'
2020-09-13 13:01:16 +02:00
2020-10-10 20:37:28 +02:00
--![[Wave Defense Map split in 4 Quarters]]--
2021-01-25 01:37:17 +01:00
--require 'maps.quarters'
2020-09-13 13:01:16 +02:00
2020-10-10 20:37:28 +02:00
--![[Flee from the collapsing map with portable base inside train]]--
2020-05-14 15:29:33 +02:00
--require 'maps.railway_troopers_v2.main'
2020-09-13 13:01:16 +02:00
2020-10-10 20:37:28 +02:00
--![[Another simliar version without collapsing terrain]]--
2020-05-14 15:29:33 +02:00
--require 'maps.railway_troopers.main'
2020-09-13 13:01:16 +02:00
2021-05-07 01:46:27 +02:00
--![[Territorial Control - reveal the map as you walk through the mist]]--
--require 'maps.territorial_control'
2022-03-06 00:34:28 +01:00
--![[Deep Jungle - dangerous map]]--
2022-03-06 00:35:07 +01:00
--require 'maps.deep_jungle.main'
2022-03-06 00:34:28 +01:00
2020-10-10 20:37:28 +02:00
--![[You fell in a dark cave, will you survive?]]--
2021-05-04 19:52:58 +02:00
--require 'maps.cave_choppy.main'
2020-05-14 15:29:33 +02:00
--require 'maps.cave_miner'
2020-10-19 18:26:24 +02:00
--require 'maps.cave_miner_v2.main'
2020-09-13 13:01:16 +02:00
2020-10-10 20:37:28 +02:00
--![[Hungry boxes eat your items, but reward you with new territory to build.]]--
2020-09-13 10:06:15 +02:00
--require 'maps.expanse.main'
2020-09-13 13:01:16 +02:00
2020-10-10 20:37:28 +02:00
--![[Crashlanding on Junk Planet]]--
2020-05-14 15:29:33 +02:00
--require 'maps.junkyard'
2020-09-13 10:06:15 +02:00
--require 'maps.junkyard_pvp.main'
2020-09-13 13:01:16 +02:00
2020-10-10 20:37:28 +02:00
--![[A green maze]]--
2020-05-14 15:29:33 +02:00
--require 'maps.hedge_maze'
2020-09-13 13:01:16 +02:00
2020-10-10 20:37:28 +02:00
--![[Dangerous forest with unique map revealing]]--
2020-05-14 15:29:33 +02:00
--require 'maps.spooky_forest'
2020-09-13 13:01:16 +02:00
2020-10-10 20:37:28 +02:00
--![[Defeat the biters and unlock new areas]]--
2020-09-13 13:01:16 +02:00
--require 'maps.spiral_troopers'
2020-10-10 20:37:28 +02:00
--![[Railworld style terrains]]--
2020-05-14 15:29:33 +02:00
--require 'maps.mixed_railworld'
--require 'maps.scrap_railworld'
2020-09-13 13:01:16 +02:00
2020-10-10 20:37:28 +02:00
--![[It's tetris!]]--
2020-09-13 13:01:16 +02:00
--require 'maps.tetris.main'
2020-10-10 20:37:28 +02:00
--![[4 Team Lane Surival]]--
2020-09-13 13:01:16 +02:00
--require 'maps.wave_of_death.WoD'
2020-10-10 20:37:28 +02:00
--![[PVP Battles with Tanks]]--
2020-05-14 15:29:33 +02:00
--require 'maps.tank_conquest.tank_conquest'
2020-09-13 13:01:16 +02:00
--require 'maps.tank_battles'
2020-10-10 20:37:28 +02:00
--![[Terrain with lots of Rocks]]--
2020-05-14 15:29:33 +02:00
--require 'maps.rocky_waste'
2020-09-13 13:01:16 +02:00
2020-10-10 20:37:28 +02:00
--![[Landfill is reveals the map, set resources to high when rolling the map]]--
2020-05-14 15:29:33 +02:00
--require 'maps.lost'
2020-09-13 13:01:16 +02:00
2020-10-10 20:37:28 +02:00
--![[A terrain layout with many rivers]]--
2020-05-14 15:29:33 +02:00
--require 'maps.rivers'
2020-09-13 13:01:16 +02:00
2020-10-10 20:37:28 +02:00
--![[Islands Theme]]--
2020-05-14 15:29:33 +02:00
--require 'maps.atoll'
2020-09-13 13:01:16 +02:00
2020-10-10 20:37:28 +02:00
--![[Placed buildings can hardly be removed]]--
2020-09-13 13:01:16 +02:00
--require 'maps.refactor-io'
2020-10-10 20:37:28 +02:00
--![[Prebuilt buildings on the map that can not be removed, you will hate this map]]--
2020-09-13 13:01:16 +02:00
--require 'maps.spaghettorio'
2020-10-10 20:37:28 +02:00
--![[Misc / WIP]]--
2020-09-13 13:01:16 +02:00
--require 'maps.rainbow_road'
2020-05-14 15:29:33 +02:00
--require 'maps.cratewood_forest'
2020-09-13 10:06:15 +02:00
--require 'maps.maze_challenge'
2020-05-14 15:29:33 +02:00
--require 'maps.lost_desert'
--require 'maps.stoneblock'
--require 'maps.wave_defense'
--require 'maps.crossing'
--require 'maps.anarchy'
--require 'maps.blue_beach'
2020-09-13 10:06:15 +02:00
--require 'maps.nightfall'
2020-05-14 15:29:33 +02:00
--require 'maps.pitch_black.main'
--require 'maps.cube'
2020-10-10 15:30:30 +02:00
--require 'maps.mountain_race.main'
2020-09-13 13:01:16 +02:00
--require 'maps.native_war.main'
2021-02-06 12:42:10 -08:00
--require 'maps.scrap_towny_ffa.main'
2020-09-13 13:01:16 +02:00
---------------------------------------------------------------
2020-04-08 20:38:18 +02:00
2020-09-13 13:01:16 +02:00
---------------- MORE MODULES HERE ----------------
2020-06-07 13:33:24 +02:00
--require 'modules.hidden_dimension.main'
2020-05-14 15:29:33 +02:00
--require 'modules.towny.main'
2020-07-25 17:22:04 +02:00
--require 'modules.rpg.main'
2020-07-25 19:05:02 +02:00
--require 'modules.rpg'
2020-05-14 15:29:33 +02:00
--require 'modules.trees_grow'
--require 'modules.trees_randomly_die'
2020-09-13 13:01:16 +02:00
---------------------------------------------------------------
---------------- MOSTLY TERRAIN LAYOUTS HERE ----------------
2020-12-21 07:37:19 +01:00
--require 'terrain_layouts.winter'
2020-05-14 15:29:33 +02:00
--require 'terrain_layouts.caves'
--require 'terrain_layouts.cone_to_east'
--require 'terrain_layouts.biters_and_resources_east'
--require 'terrain_layouts.scrap_01'
2021-01-25 02:26:09 +01:00
--require 'terrain_layouts.scrap_02'
2020-05-14 15:29:33 +02:00
--require 'terrain_layouts.watery_world'
--require 'terrain_layouts.tree_01'
2021-02-06 12:42:10 -08:00
--require 'terrain_layouts.scrap_towny_ffa'
2020-09-13 13:01:16 +02:00
---------------------------------------------------------------
2020-04-08 20:38:18 +02:00
if _DUMP_ENV then
require ' utils.dump_env '
2021-04-04 13:51:27 +02:00
require ' utils.profiler '
2020-04-08 20:38:18 +02:00
end
local function on_player_created ( event )
2020-05-10 02:42:10 +02:00
local player = game.players [ event.player_index ]
player.gui . top.style = ' slot_table_spacing_horizontal_flow '
player.gui . left.style = ' slot_table_spacing_vertical_flow '
2020-04-08 20:38:18 +02:00
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
2020-07-11 20:57:54 +02:00
local Event = require ' utils.event '
2020-10-10 20:37:28 +02:00
Event.add ( defines.events . on_player_created , on_player_created )