2019-01-28 09:12:58 +02:00
|
|
|
-- If you're looking to configure anything, you want config.lua. Nearly everything in this file is dictated by the config.
|
|
|
|
|
|
|
|
-- Info on the data lifecycle and how we use it: https://github.com/Refactorio/RedMew/wiki/The-data-lifecycle
|
2019-02-18 08:43:59 +02:00
|
|
|
require 'resources.data_stages'
|
|
|
|
_LIFECYCLE = _STAGE.control -- Control stage
|
2019-01-28 09:12:58 +02:00
|
|
|
|
2019-02-16 14:57:10 +02:00
|
|
|
-- Overrides the _G.print function
|
|
|
|
require 'utils.print_override'
|
|
|
|
|
2018-11-26 03:07:03 +02:00
|
|
|
-- Omitting the math library is a very bad idea
|
2018-10-02 10:08:57 +02:00
|
|
|
require 'utils.math'
|
2018-09-23 00:25:13 +02:00
|
|
|
|
2019-01-27 21:40:07 +02:00
|
|
|
-- Global Debug and make sure our version file is registered
|
2018-12-29 14:16:41 +02:00
|
|
|
Debug = require 'utils.debug'
|
2019-01-27 21:40:07 +02:00
|
|
|
require 'resources.version'
|
2018-12-29 14:16:41 +02:00
|
|
|
|
2019-02-01 03:15:41 +02:00
|
|
|
-- Config and map_loader dictate the map you play and the settings in it
|
2018-12-29 21:01:18 +02:00
|
|
|
local config = require 'config'
|
2019-02-01 03:15:41 +02:00
|
|
|
require 'map_gen.shared.map_loader' -- to change the map you're playing, modify map_selection.lua
|
2018-08-13 17:04:02 +02:00
|
|
|
|
2018-11-11 09:20:07 +02:00
|
|
|
-- Specific to RedMew hosts, can be disabled safely if not hosting on RedMew servers
|
2018-11-27 14:32:33 +02:00
|
|
|
require 'features.server'
|
|
|
|
require 'features.server_commands'
|
2018-09-21 20:48:12 +02:00
|
|
|
|
2019-02-02 03:12:45 +02:00
|
|
|
-- Library modules
|
|
|
|
-- If missing, will cause other feature modules to fail
|
2018-11-15 21:53:28 +02:00
|
|
|
require 'features.player_create'
|
2019-01-30 05:52:43 +02:00
|
|
|
require 'features.rank_system'
|
2019-05-26 18:54:45 +02:00
|
|
|
require 'features.redmew_settings_sync'
|
2019-05-29 18:46:52 +02:00
|
|
|
|
|
|
|
if config.player_colors.enabled then
|
|
|
|
require 'features.player_colors'
|
|
|
|
end
|
2018-11-11 09:20:07 +02:00
|
|
|
|
2019-02-02 03:12:45 +02:00
|
|
|
-- Feature modules
|
|
|
|
-- Each can be disabled safely
|
2019-01-03 20:17:53 +02:00
|
|
|
if config.train_saviour.enabled then
|
|
|
|
require 'features.train_saviour'
|
|
|
|
end
|
2019-01-05 13:12:22 +02:00
|
|
|
if config.infinite_storage_chest.enabled then
|
|
|
|
require 'features.infinite_storage_chest'
|
|
|
|
end
|
2018-12-19 15:41:28 +02:00
|
|
|
if config.autodeconstruct.enabled then
|
2018-12-06 13:18:52 +02:00
|
|
|
require 'features.autodeconstruct'
|
|
|
|
end
|
|
|
|
if config.hodor.enabled or config.auto_respond.enabled or config.mentions.enabled then
|
|
|
|
require 'features.chat_triggers'
|
|
|
|
end
|
2018-12-19 15:41:28 +02:00
|
|
|
if config.corpse_util.enabled then
|
|
|
|
require 'features.corpse_util'
|
|
|
|
end
|
2019-01-02 17:34:17 +02:00
|
|
|
if config.admin_commands.enabled then
|
|
|
|
require 'features.admin_commands'
|
|
|
|
end
|
|
|
|
if config.redmew_commands.enabled then
|
|
|
|
require 'features.redmew_commands'
|
2018-12-19 15:41:28 +02:00
|
|
|
end
|
2019-02-03 06:58:33 +02:00
|
|
|
if config.donator_commands.enabled then
|
|
|
|
require 'features.donator_commands'
|
|
|
|
end
|
2019-01-11 20:25:54 +02:00
|
|
|
if config.market.enabled then
|
|
|
|
require 'features.market'
|
2018-12-06 13:18:52 +02:00
|
|
|
end
|
|
|
|
if config.nuke_control.enabled then
|
|
|
|
require 'features.nuke_control'
|
|
|
|
end
|
|
|
|
if config.reactor_meltdown.enabled then
|
|
|
|
require 'features.reactor_meltdown'
|
|
|
|
end
|
2019-01-10 16:18:55 +02:00
|
|
|
if config.performance.enabled then
|
2018-12-06 13:27:08 +02:00
|
|
|
require 'features.performance'
|
|
|
|
end
|
2019-01-10 16:18:55 +02:00
|
|
|
if config.hail_hydra.enabled then
|
2019-02-02 03:12:45 +02:00
|
|
|
require 'map_gen.shared.hail_hydra'
|
2019-01-16 23:05:12 +02:00
|
|
|
end
|
|
|
|
if config.lazy_bastard.enabled then
|
|
|
|
require 'features.lazy_bastard'
|
2018-12-09 16:04:23 +02:00
|
|
|
end
|
2019-01-12 15:43:41 +02:00
|
|
|
if config.redmew_qol.enabled then
|
|
|
|
require 'features.redmew_qol'
|
|
|
|
end
|
2019-02-02 03:12:45 +02:00
|
|
|
if config.camera.enabled then
|
|
|
|
require 'features.gui.camera'
|
|
|
|
end
|
2019-02-02 03:09:12 +02:00
|
|
|
if config.day_night.enabled then
|
|
|
|
require 'map_gen.shared.day_night'
|
|
|
|
end
|
2019-02-18 08:56:36 +02:00
|
|
|
if config.apocalypse.enabled then
|
|
|
|
require 'features.apocalypse'
|
|
|
|
end
|
2019-03-04 12:15:41 +02:00
|
|
|
if config.player_onboarding.enabled then
|
|
|
|
require 'features.player_onboarding'
|
|
|
|
end
|
2019-04-21 12:38:27 +02:00
|
|
|
if config.biter_attacks.enabled then
|
2019-03-02 07:36:50 +02:00
|
|
|
require 'map_gen.shared.biter_attacks'
|
|
|
|
end
|
2019-04-16 21:30:38 +02:00
|
|
|
if config.player_quick_bars.enabled then
|
|
|
|
require 'features.player_quick_bars'
|
|
|
|
end
|
2019-06-13 23:28:14 +02:00
|
|
|
if config.biter_corpse_remover.enabled then
|
|
|
|
require 'features.biter_corpse_remover'
|
2019-06-04 21:07:43 +02:00
|
|
|
end
|
2019-06-19 15:28:40 +02:00
|
|
|
if config.turret_active_delay.enabled then
|
|
|
|
require 'features.turret_active_delay'
|
|
|
|
end
|
2019-09-02 03:25:21 +02:00
|
|
|
if config.autofill.enabled then
|
2019-06-19 18:36:18 +02:00
|
|
|
require 'features.gui.autofill'
|
|
|
|
end
|
2020-01-01 17:04:33 +02:00
|
|
|
if config.research_printer.enabled then
|
2020-01-01 13:58:08 +02:00
|
|
|
require 'features.research_printer'
|
|
|
|
end
|
2018-12-09 16:04:23 +02:00
|
|
|
|
2019-02-02 03:12:45 +02:00
|
|
|
-- GUIs
|
|
|
|
-- The order determines the order they appear from left to right.
|
2018-11-26 03:07:03 +02:00
|
|
|
-- These can be safely disabled if you want less GUI items.
|
|
|
|
-- Some map presets will add GUI modules themselves.
|
2018-12-22 10:34:51 +02:00
|
|
|
if config.map_info.enabled then
|
|
|
|
require 'features.gui.info'
|
|
|
|
end
|
2018-12-06 13:18:52 +02:00
|
|
|
if config.player_list.enabled then
|
|
|
|
require 'features.gui.player_list'
|
|
|
|
end
|
2019-01-28 22:20:02 +02:00
|
|
|
if config.evolution_progress.enabled then
|
|
|
|
require 'features.gui.evolution_progress'
|
|
|
|
end
|
2018-12-06 13:18:52 +02:00
|
|
|
if config.poll.enabled then
|
|
|
|
require 'features.gui.poll'
|
|
|
|
end
|
|
|
|
if config.tag_group.enabled then
|
|
|
|
require 'features.gui.tag_group'
|
|
|
|
end
|
|
|
|
if config.tasklist.enabled then
|
|
|
|
require 'features.gui.tasklist'
|
|
|
|
end
|
|
|
|
if config.blueprint_helper.enabled then
|
|
|
|
require 'features.gui.blueprint_helper'
|
|
|
|
end
|
|
|
|
if config.paint.enabled then
|
|
|
|
require 'features.gui.paint'
|
|
|
|
end
|
|
|
|
if config.score.enabled then
|
|
|
|
require 'features.gui.score'
|
|
|
|
end
|
2018-12-19 15:41:28 +02:00
|
|
|
if config.popup.enabled then
|
|
|
|
require 'features.gui.popup'
|
|
|
|
end
|
2019-03-01 15:54:36 +02:00
|
|
|
if config.rich_text_gui.enabled then
|
|
|
|
require 'features.gui.rich_text'
|
|
|
|
end
|
2019-10-10 11:01:16 +02:00
|
|
|
if config.radio.enabled or _DEBUG then
|
|
|
|
require 'features.gui.radio'
|
|
|
|
end
|
2019-03-03 22:37:50 +02:00
|
|
|
if config.redmew_settings.enabled then
|
|
|
|
require 'features.gui.redmew_settings'
|
|
|
|
end
|
2019-02-02 03:12:45 +02:00
|
|
|
|
2019-10-11 21:07:16 +02:00
|
|
|
--require 'features.snake.control'
|
2019-07-03 20:45:05 +02:00
|
|
|
|
2019-02-24 17:45:48 +02:00
|
|
|
-- Debug-only modules
|
|
|
|
if _DEBUG then
|
|
|
|
require 'features.scenario_data_manipulation'
|
|
|
|
end
|
2019-05-26 21:32:44 +02:00
|
|
|
|
2018-12-22 10:42:19 +02:00
|
|
|
if _DUMP_ENV then
|
|
|
|
require 'utils.dump_env'
|
|
|
|
end
|
2019-05-26 21:32:44 +02:00
|
|
|
|
|
|
|
-- Needs to be at bottom so tokens are registered last.
|
2019-01-31 00:32:43 +02:00
|
|
|
if _DEBUG then
|
|
|
|
require 'features.gui.debug.command'
|
|
|
|
end
|