-
Notifications
You must be signed in to change notification settings - Fork 80
/
control.lua
204 lines (187 loc) · 5.53 KB
/
control.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
-- 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
require 'resources.data_stages'
_LIFECYCLE = _STAGE.control -- Control stage
-- Util libraries, omitting is a very bad idea
require 'utils.math'
require 'utils.string'
-- Overrides the _G.print function
require 'utils.print_override'
-- Global Debug and make sure our version file is registered
Debug = require 'utils.debug'
require 'resources.version'
-- Config and map_loader dictate the map you play and the settings in it
local config = require 'config'
require 'map_gen.shared.map_loader' -- to change the map you're playing, modify map_selection.lua
-- Specific to RedMew hosts, can be disabled safely if not hosting on RedMew servers
require 'features.server'
require 'features.server_commands'
-- Library modules
-- If missing, will cause other feature modules to fail
require 'features.player_create'
require 'features.rank_system'
require 'features.redmew_settings_sync'
-- Always required so dumping banned player's inventories works.
require 'features.dump_offline_inventories'
if config.player_colors.enabled then
require 'features.player_colors'
end
-- Feature modules
-- Each can be disabled safely
if config.train_saviour.enabled then
require 'features.train_saviour'
end
if config.infinite_storage_chest.enabled then
require 'features.infinite_storage_chest'
end
if config.landfill_remover.enabled then
require 'features.landfill_remover'
end
if config.autodeconstruct.enabled then
require 'features.autodeconstruct'
end
if config.hodor.enabled or config.auto_respond.enabled or config.mentions.enabled then
require 'features.chat_triggers'
end
if config.death_corpse_tags.enabled then
require 'features.death_corpse_tags'
end
if config.admin_commands.enabled then
require 'features.admin_commands'
end
if config.redmew_commands.enabled then
require 'features.redmew_commands'
end
if config.donator_commands.enabled then
require 'features.donator_commands'
end
if config.market.enabled then
require 'features.market'
end
if config.nuke_control.enabled then
require 'features.nuke_control'
end
if config.reactor_meltdown.enabled then
require 'features.reactor_meltdown'
end
if config.performance.enabled then
require 'features.performance'
end
if config.hail_hydra.enabled then
require 'map_gen.shared.hail_hydra'
end
if config.lazy_bastard.enabled then
require 'features.lazy_bastard'
end
if config.redmew_qol.enabled then
require 'features.redmew_qol'
end
if config.camera.enabled then
require 'features.gui.camera'
end
if config.day_night.enabled then
require 'map_gen.shared.day_night'
end
if config.apocalypse.enabled then
require 'features.apocalypse'
end
if config.player_onboarding.enabled then
require 'features.player_onboarding'
end
if config.biter_attacks.enabled then
require 'map_gen.shared.biter_attacks'
end
if config.player_quick_bars.enabled then
require 'features.player_quick_bars'
end
if config.player_logistic_requests.enabled then
require 'features.player_logistic_requests'
end
if config.biter_corpse_remover.enabled then
require 'features.biter_corpse_remover'
end
if config.turret_active_delay.enabled then
require 'features.turret_active_delay'
end
if config.research_printer.enabled then
require 'features.research_printer'
end
if config.spidertron_group_control.enabled then
require 'features.spidertron_group_control'
end
if config.permissions.enabled then
require 'features.permissions'
end
if config.popup_chat.enabled then
require 'features.popup_chat'
end
-- GUIs
-- The order determines the order they appear from left to right.
-- These can be safely disabled if you want less GUI items.
-- Some map presets will add GUI modules themselves.
if config.map_info.enabled then
require 'features.gui.info'
require 'features.gui.description_generator'
end
if config.admin_panel.enabled then
require 'features.gui.admin_panel.player_manager'
require 'features.gui.admin_panel.map_manager'
require 'features.gui.admin_panel.lua_console'
end
if config.player_list.enabled then
require 'features.gui.player_list'
end
if config.redmew_settings.enabled then
require 'features.gui.redmew_settings'
end
if config.autofill.enabled then
require 'features.gui.autofill'
end
if config.evolution_progress.enabled then
require 'features.gui.evolution_progress'
end
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.paint.enabled then
require 'features.gui.paint'
end
if config.popup.enabled then
require 'features.gui.popup'
end
if config.rich_text_gui.enabled then
require 'features.gui.rich_text'
end
if config.radio.enabled or _DEBUG then
require 'features.gui.radio'
end
if config.player_shortcuts.enabled then
require 'features.gui.shortcuts'
end
if config.experience.enabled then
require 'features.gui.experience'
end
if config.score.enabled then
require 'features.gui.score'
end
--require 'features.snake.control'
-- Debug-only modules
if _DEBUG then
require 'features.scenario_data_manipulation'
end
if _DUMP_ENV then
require 'utils.dump_env'
end
if _DEBUG then
require('utils.test.main')
end
-- Needs to be at bottom so tokens are registered last.
if _DEBUG then
require 'features.gui.debug.command'
end