1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2025-07-17 01:32:31 +02:00

Expand config (#560)

This commit is contained in:
Matthew
2018-12-19 08:41:28 -05:00
committed by Valansch
parent fa231caeeb
commit 014b53aa42
3 changed files with 89 additions and 67 deletions

View File

@ -2,143 +2,109 @@ _DEBUG = false
_CHEATS = false _CHEATS = false
global.config = { global.config = {
-- The title of the map map_info = {
map_name_key = 'This Map has no name', -- The title of the map
map_name_key = 'This Map has no name',
-- The long description of the map, typically 1 paragraph -- The long description of the map, typically 1 paragraph
map_description_key = "By default this section is blank as it's supposed to be filled out on a per map basis. (If you're seeing this message, ping the admin team to get a description added for this map)", map_description_key = "By default this section is blank as it's supposed to be filled out on a per map basis. (If you're seeing this message, ping the admin team to get a description added for this map)",
-- The feature list of the map
-- The feature list of the map map_extra_info_key = 'This map has no extra information',
map_extra_info_key = 'This map has no extra information', -- New Scenario Features, appears in the "What's new" tab
new_info_key = 'Nothing is new. The world is at peace',
-- New Scenario Features, appears in the "What's new" tab },
new_info_key = 'Nothing is new. The world is at peace', -- adds a command to scale UPS and movement speed. Use with caution as it might break scenarios that modify movement speed
-- Adds a command to scale UPS and movement speed. Use with caution
-- as it might break scenarios that modify movement speed
performance = { performance = {
enabled = true, enabled = true,
}, },
-- adds a player list icon and keeps track of data. -- adds a player list icon and keeps track of data.
player_list = { player_list = {
enabled = true, enabled = true,
show_coin_column = true, show_coin_column = true,
}, },
-- enables the poll system -- enables the poll system
poll = { poll = {
enabled = true, enabled = true,
}, },
-- enables players to create and join tags -- enables players to create and join tags
tag_group = { tag_group = {
enabled = true, enabled = true,
}, },
-- enables players to create and prioritize tasks -- enables players to create and prioritize tasks
tasklist = { tasklist = {
enabled = true, enabled = true,
}, },
-- enables the blueprint helper -- enables the blueprint helper
blueprint_helper = { blueprint_helper = {
enabled = true, enabled = true,
}, },
-- enables score and tracking thereof -- enables score and tracking thereof
score = { score = {
enabled = true, enabled = true,
}, },
-- adds a paint brush -- adds a paint brush
paint = { paint = {
enabled = true, enabled = true,
}, },
-- adds a fish market -- adds a fish market
fish_market = { fish_market = {
enabled = true, enabled = true,
market_item = 'coin', market_item = 'coin',
}, },
-- automatically marks mines for deconstruction when they are depleted
-- currently not working with mods
auto_deconstruct = {
enabled = true,
},
-- adds anti-nuke griefing -- adds anti-nuke griefing
nuke_control = { nuke_control = {
enabled = true, enabled = true,
enable_autokick = true, enable_autokick = true,
enable_autoban = true, enable_autoban = true,
-- how long a player must be on the server to be allowed to use the nuke -- how long a player must be on the server to be allowed to use the nuke
nuke_min_time_hours = 3, nuke_min_time_hours = 3,
}, },
-- adds a meltdown feature, requiring precise management -- adds a meltdown feature, requiring precise management
reactor_meltdown = { reactor_meltdown = {
enabled = true, enabled = true,
-- when enabled, controls whether it's on by default. State can be controlled with the /meltdown command. -- when enabled, controls whether it's on by default. State can be controlled with the /meltdown command.
on_by_default = false, on_by_default = false,
}, },
-- adds hodor responses to messages -- adds hodor responses to messages
hodor = { hodor = {
enabled = true, enabled = true,
}, },
-- enable RedMew auto respond messages -- enable RedMew auto respond messages
auto_respond = { auto_respond = {
enabled = true, enabled = true,
}, },
-- enable the mentioning system, which notifies a player when their name is mentioned -- enable the mentioning system, which notifies a player when their name is mentioned
mentions = { mentions = {
enabled = true, enabled = true,
}, },
player_create = { player_create = {
enabled = true, enabled = true,
-- items automatically inserted into the player inventory -- items automatically inserted into the player inventory
starting_items = { starting_items = {
{name = 'iron-gear-wheel', count = 8}, {name = 'iron-gear-wheel', count = 8},
{name = 'iron-plate', count = 16}, {name = 'iron-plate', count = 16},
}, },
-- opens the scenario popup when the player joins -- opens the scenario popup when the player joins
show_info_at_start = true, show_info_at_start = true,
-- prints messages when the player joins -- prints messages when the player joins
join_messages = { join_messages = {
'Welcome to this map created by the RedMew team. You can join our discord at: redmew.com/discord', 'Welcome to this map created by the RedMew team. You can join our discord at: redmew.com/discord',
'Click the question mark in the top left corner for server information and map details.', 'Click the question mark in the top left corner for server information and map details.',
}, },
-- format is a table: {{message, weight}, {message, weight}}, where a higher weight has more chance to be shown -- format is a table: {{message, weight}, {message, weight}}, where a higher weight has more chance to be shown
random_join_message_set = require 'resources.join_messages', random_join_message_set = require 'resources.join_messages',
-- applied when cheat_mode is set to true -- applied when cheat_mode is set to true
cheats = { cheats = {
-- Sets the manual mining speed for the player force. A value of 1 = 100% faster. Setting it -- Sets the manual mining speed for the player force. A value of 1 = 100% faster. Setting it
-- to 0.5 would make it 50% faster than the base speed. -- to 0.5 would make it 50% faster than the base speed.
manual_mining_speed_modifier = 1000, manual_mining_speed_modifier = 1000,
-- increase the amount of inventory slots for the player force -- increase the amount of inventory slots for the player force
character_inventory_slots_bonus = 0, character_inventory_slots_bonus = 0,
-- increases the run speed of all characters for the player force -- increases the run speed of all characters for the player force
character_running_speed_modifier = 5, character_running_speed_modifier = 5,
-- a flat health bonus to the player force -- a flat health bonus to the player force
character_health_bonus = 1000000, character_health_bonus = 1000000,
-- starts with a fully slotted power armor mk2 -- starts with a fully slotted power armor mk2
start_with_power_armor = true, start_with_power_armor = true,
-- adds additional items to the player when _CHEATS is true -- adds additional items to the player when _CHEATS is true
starting_items = { starting_items = {
{name = 'steel-axe', count = 10}, {name = 'steel-axe', count = 10},
@ -156,17 +122,14 @@ global.config = {
}, },
}, },
}, },
-- spawns more units when one dies -- spawns more units when one dies
hail_hydra = { hail_hydra = {
enabled = false, enabled = false,
-- at which scale the evolution will increase the additional hydra spawns -- at which scale the evolution will increase the additional hydra spawns
-- to disable scaling with evolution, set to 0. -- to disable scaling with evolution, set to 0.
-- the formula: chance = hydra_chance + (evolution_factor * evolution_scale) -- the formula: chance = hydra_chance + (evolution_factor * evolution_scale)
-- example: small spitter has 0.2, which is 20% at 0% and 120% at an evolution_factor of 1 -- example: small spitter has 0.2, which is 20% at 0% and 120% at an evolution_factor of 1
evolution_scale = 1, evolution_scale = 1,
-- any non-rounded number will turn into a chance to spawn an additional alien -- any non-rounded number will turn into a chance to spawn an additional alien
-- example: 2.5 would spawn 2 for sure and 50% chance to spawn one additionally -- example: 2.5 would spawn 2 for sure and 50% chance to spawn one additionally
hydras = { hydras = {
@ -175,18 +138,59 @@ global.config = {
['medium-spitter'] = {['medium-worm-turret'] = 0.2}, ['medium-spitter'] = {['medium-worm-turret'] = 0.2},
['big-spitter'] = {['big-worm-turret'] = 0.2}, ['big-spitter'] = {['big-worm-turret'] = 0.2},
['behemoth-spitter'] = {['big-worm-turret'] = 0.4}, ['behemoth-spitter'] = {['big-worm-turret'] = 0.4},
-- biters -- biters
['medium-biter'] = {['small-biter'] = 1.2}, ['medium-biter'] = {['small-biter'] = 1.2},
['big-biter'] = {['medium-biter'] = 1.2}, ['big-biter'] = {['medium-biter'] = 1.2},
['behemoth-biter'] = {['big-biter'] = 1.2}, ['behemoth-biter'] = {['big-biter'] = 1.2},
-- worms -- worms
['small-worm-turret'] = {['small-biter'] = 2.5}, ['small-worm-turret'] = {['small-biter'] = 2.5},
['medium-worm-turret'] = {['small-biter'] = 2.5, ['medium-biter'] = 0.6}, ['medium-worm-turret'] = {['small-biter'] = 2.5, ['medium-biter'] = 0.6},
['big-worm-turret'] = {['small-biter'] = 3.8, ['medium-biter'] = 1.3, ['big-biter'] = 1.1}, ['big-worm-turret'] = {['small-biter'] = 3.8, ['medium-biter'] = 1.3, ['big-biter'] = 1.1},
}, },
}, },
-- automatically marks miners for deconstruction when they are depleted (currently compatible with hard mods that add miners)
autodeconstruct = {
enabled = true,
},
-- when a player dies, leaves a map marker until the corpse expires or is looted
corpse_util = {
enabled = true,
},
-- adds many commands for users and admins alike
custom_commands = {
enabled = true,
},
-- enables donators' on-join messages
donator_messages = {
enabled = true,
},
-- saves players' lives if they have a small-plane in their inventory, also adds the small-plan to the market
train_saviour = {
enabled = true,
},
-- logs when commands are used and when items are spawned in
free_item_loggin = {
enabled = true,
},
player_colors = {
enabled = true,
},
-- checks the list of players for train station names
train_station_names = {
enabled = true,
},
-- adds a command that switches a player to the enemy force and teleports them far away for some time to calm down
walkabout = {
enabled = true,
},
-- adds a command to generate a popup dialog box for players to see, useful for important announcements
popup = {
enabled = true,
},
-- adds a camera to watch another player
camera = {
enabled = true,
},
} }
return global.config return global.config

View File

@ -14,34 +14,48 @@ require 'features.player_create'
require 'features.user_groups' require 'features.user_groups'
-- Feature modules, each can be disabled safely -- Feature modules, each can be disabled safely
if config.auto_deconstruct.enabled then if config.autodeconstruct.enabled then
require 'features.autodeconstruct' require 'features.autodeconstruct'
end end
if config.hodor.enabled or config.auto_respond.enabled or config.mentions.enabled then if config.hodor.enabled or config.auto_respond.enabled or config.mentions.enabled then
require 'features.chat_triggers' require 'features.chat_triggers'
end end
require 'features.corpse_util' if config.corpse_util.enabled then
require 'features.custom_commands' require 'features.corpse_util'
require 'features.donator_messages' end
require 'features.train_saviour' if config.custom_commands.enabled then
require 'features.custom_commands'
end
if config.donator_messages.enabled then
require 'features.donator_messages'
end
if config.train_saviour.enabled then
require 'features.train_saviour'
end
if config.fish_market.enabled then if config.fish_market.enabled then
require 'features.fish_market' require 'features.fish_market'
end end
require 'features.free_item_logging' if config.free_item_loggin.enabled then
require 'features.free_item_logging'
end
if config.nuke_control.enabled then if config.nuke_control.enabled then
require 'features.nuke_control' require 'features.nuke_control'
end end
require 'features.player_colors' if config.player_colors.enabled then
require 'features.player_colors'
end
if config.reactor_meltdown.enabled then if config.reactor_meltdown.enabled then
require 'features.reactor_meltdown' require 'features.reactor_meltdown'
end end
require 'features.train_station_names' if config.train_station_names.enabled then
require 'features.walkabout' require 'features.train_station_names'
end
if config.walkabout.enabled then
require 'features.walkabout'
end
if global.config.performance.enabled then if global.config.performance.enabled then
require 'features.performance' require 'features.performance'
end end
if global.config.hail_hydra.enabled then if global.config.hail_hydra.enabled then
require 'features.hail_hydra' require 'features.hail_hydra'
end end
@ -71,5 +85,9 @@ end
if config.score.enabled then if config.score.enabled then
require 'features.gui.score' require 'features.gui.score'
end end
require 'features.gui.popup' if config.popup.enabled then
require 'features.gui.camera' require 'features.gui.popup'
end
if config.camera.enabled then
require 'features.gui.camera'
end

View File

@ -21,10 +21,10 @@ local new_info_key = 4
local welcomed_players = {} local welcomed_players = {}
local editable_info = { local editable_info = {
[map_name_key] = global.config.map_name_key, [map_name_key] = global.config.map_info.map_name_key,
[map_description_key] = global.config.map_description_key, [map_description_key] = global.config.map_info.map_description_key,
[map_extra_info_key] = global.config.map_extra_info_key, [map_extra_info_key] = global.config.map_info.map_extra_info_key,
[new_info_key] = global.config.new_info_key [new_info_key] = global.config.map_info.new_info_key
} }
Global.register( Global.register(