2019-01-28 02:12:58 -05: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
|
|
|
|
_LIFECYCLE = 4 -- Control stage
|
|
|
|
|
2019-02-16 12:57:10 +00:00
|
|
|
-- Overrides the _G.print function
|
|
|
|
require 'utils.print_override'
|
|
|
|
|
2018-11-25 20:07:03 -05:00
|
|
|
-- Omitting the math library is a very bad idea
|
2018-10-02 10:08:57 +02:00
|
|
|
require 'utils.math'
|
2018-09-22 23:25:13 +01:00
|
|
|
|
2019-01-27 14:40:07 -05:00
|
|
|
-- Global Debug and make sure our version file is registered
|
2018-12-29 13:16:41 +01:00
|
|
|
Debug = require 'utils.debug'
|
2019-01-27 14:40:07 -05:00
|
|
|
require 'resources.version'
|
2018-12-29 13:16:41 +01:00
|
|
|
|
2019-01-31 20:15:41 -05:00
|
|
|
-- Config and map_loader dictate the map you play and the settings in it
|
2018-12-29 20:01:18 +01:00
|
|
|
local config = require 'config'
|
2019-01-31 20:15:41 -05: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 02:20:07 -05:00
|
|
|
-- Specific to RedMew hosts, can be disabled safely if not hosting on RedMew servers
|
2018-11-27 12:32:33 +00:00
|
|
|
require 'features.server'
|
|
|
|
require 'features.server_commands'
|
2018-09-21 19:48:12 +01:00
|
|
|
|
2019-02-01 20:12:45 -05:00
|
|
|
-- Library modules
|
|
|
|
-- If missing, will cause other feature modules to fail
|
2018-11-15 14:53:28 -05:00
|
|
|
require 'features.player_create'
|
2019-01-29 22:52:43 -05:00
|
|
|
require 'features.rank_system'
|
2018-11-11 02:20:07 -05:00
|
|
|
|
2019-02-01 20:12:45 -05:00
|
|
|
-- Feature modules
|
|
|
|
-- Each can be disabled safely
|
2019-01-03 19:17:53 +01:00
|
|
|
if config.train_saviour.enabled then
|
|
|
|
require 'features.train_saviour'
|
|
|
|
end
|
2019-01-05 12:12:22 +01:00
|
|
|
if config.infinite_storage_chest.enabled then
|
|
|
|
require 'features.infinite_storage_chest'
|
|
|
|
end
|
2018-12-19 08:41:28 -05:00
|
|
|
if config.autodeconstruct.enabled then
|
2018-12-06 12:18:52 +01: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 08:41:28 -05:00
|
|
|
if config.corpse_util.enabled then
|
|
|
|
require 'features.corpse_util'
|
|
|
|
end
|
2019-01-02 10:34:17 -05: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 08:41:28 -05:00
|
|
|
end
|
2019-01-11 19:25:54 +01:00
|
|
|
if config.market.enabled then
|
|
|
|
require 'features.market'
|
2018-12-06 12:18:52 +01:00
|
|
|
end
|
|
|
|
if config.nuke_control.enabled then
|
|
|
|
require 'features.nuke_control'
|
|
|
|
end
|
2018-12-19 08:41:28 -05:00
|
|
|
if config.player_colors.enabled then
|
|
|
|
require 'features.player_colors'
|
|
|
|
end
|
2018-12-06 12:18:52 +01:00
|
|
|
if config.reactor_meltdown.enabled then
|
|
|
|
require 'features.reactor_meltdown'
|
|
|
|
end
|
2018-12-19 08:41:28 -05:00
|
|
|
if config.walkabout.enabled then
|
|
|
|
require 'features.walkabout'
|
|
|
|
end
|
2019-01-10 15:18:55 +01:00
|
|
|
if config.performance.enabled then
|
2018-12-06 12:27:08 +01:00
|
|
|
require 'features.performance'
|
|
|
|
end
|
2019-01-10 15:18:55 +01:00
|
|
|
if config.hail_hydra.enabled then
|
2019-02-01 20:12:45 -05:00
|
|
|
require 'map_gen.shared.hail_hydra'
|
2019-01-16 22:05:12 +01:00
|
|
|
end
|
|
|
|
if config.lazy_bastard.enabled then
|
|
|
|
require 'features.lazy_bastard'
|
2018-12-09 15:04:23 +01:00
|
|
|
end
|
2019-01-12 08:43:41 -05:00
|
|
|
if config.redmew_qol.enabled then
|
|
|
|
require 'features.redmew_qol'
|
|
|
|
end
|
2019-02-01 20:12:45 -05:00
|
|
|
if config.camera.enabled then
|
|
|
|
require 'features.gui.camera'
|
|
|
|
end
|
2019-02-01 20:09:12 -05:00
|
|
|
if config.day_night.enabled then
|
|
|
|
require 'map_gen.shared.day_night'
|
|
|
|
end
|
2018-12-09 15:04:23 +01:00
|
|
|
|
2019-02-01 20:12:45 -05:00
|
|
|
-- GUIs
|
|
|
|
-- The order determines the order they appear from left to right.
|
2018-11-25 20:07:03 -05:00
|
|
|
-- These can be safely disabled if you want less GUI items.
|
|
|
|
-- Some map presets will add GUI modules themselves.
|
2018-12-22 03:34:51 -05:00
|
|
|
if config.map_info.enabled then
|
|
|
|
require 'features.gui.info'
|
|
|
|
end
|
2018-12-06 12:18:52 +01:00
|
|
|
if config.player_list.enabled then
|
|
|
|
require 'features.gui.player_list'
|
|
|
|
end
|
2019-01-28 21:20:02 +01:00
|
|
|
if config.evolution_progress.enabled then
|
|
|
|
require 'features.gui.evolution_progress'
|
|
|
|
end
|
2018-12-06 12:18:52 +01: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 08:41:28 -05:00
|
|
|
if config.popup.enabled then
|
|
|
|
require 'features.gui.popup'
|
|
|
|
end
|
2019-02-01 20:12:45 -05:00
|
|
|
|
|
|
|
-- Needs to be at bottom so tokens are registered last.
|
2018-12-22 03:42:19 -05:00
|
|
|
if _DUMP_ENV then
|
|
|
|
require 'utils.dump_env'
|
|
|
|
end
|
2019-01-30 22:32:43 +00:00
|
|
|
if _DEBUG then
|
|
|
|
require 'features.gui.debug.command'
|
|
|
|
end
|