2019-04-10 13:59:57 -04:00
|
|
|
-- oarc_global_cfg.lua
|
|
|
|
-- April 2019
|
|
|
|
--
|
|
|
|
-- Here is where we store/init config values to the global table.
|
|
|
|
-- Allows runtime modification of game settings if we want it.
|
|
|
|
-- Also allows supporting both MOD and SCENARIO versions.
|
|
|
|
|
2019-04-10 20:40:34 -04:00
|
|
|
-- DON'T JUDGE ME
|
2019-04-10 13:59:57 -04:00
|
|
|
|
2019-04-10 20:40:34 -04:00
|
|
|
|
|
|
|
-- That's a LOT of settings.
|
2019-04-10 13:59:57 -04:00
|
|
|
function InitOarcConfig()
|
|
|
|
|
|
|
|
global.ocfg = {}
|
|
|
|
|
2019-07-31 13:53:21 -05:00
|
|
|
if (game.active_mods["clean-tutorial-grid"]) then
|
|
|
|
global.ocfg.locked_build_area_tile = "clean-tutorial-grid"
|
|
|
|
else
|
|
|
|
global.ocfg.locked_build_area_tile = "tutorial-grid"
|
2019-04-10 13:59:57 -04:00
|
|
|
end
|
|
|
|
|
2020-02-04 15:10:13 -05:00
|
|
|
-- SCENARIO VERSION (ONLY - no more mod version.)
|
|
|
|
global.ocfg.welcome_title = WELCOME_MSG_TITLE
|
|
|
|
global.ocfg.welcome_msg = WELCOME_MSG
|
|
|
|
global.ocfg.server_rules = SERVER_MSG
|
|
|
|
global.ocfg.minimum_online_time = MIN_ONLINE_TIME_IN_MINUTES
|
|
|
|
global.ocfg.server_contact = CONTACT_MSG
|
|
|
|
global.ocfg.enable_vanilla_spawns = ENABLE_VANILLA_SPAWNS
|
|
|
|
global.ocfg.enable_buddy_spawn = ENABLE_BUDDY_SPAWN
|
|
|
|
global.ocfg.frontier_rocket_silo = FRONTIER_ROCKET_SILO_MODE
|
|
|
|
global.ocfg.silo_islands = SILO_ISLANDS_MODE
|
|
|
|
global.ocfg.enable_undecorator = ENABLE_UNDECORATOR
|
|
|
|
global.ocfg.enable_tags = ENABLE_TAGS
|
|
|
|
global.ocfg.enable_long_reach = ENABLE_LONGREACH
|
|
|
|
global.ocfg.enable_autofill = ENABLE_AUTOFILL
|
|
|
|
global.ocfg.enable_loaders = ENABLE_LOADERS
|
|
|
|
global.ocfg.enable_player_list = ENABLE_PLAYER_LIST
|
|
|
|
global.ocfg.list_offline_players = PLAYER_LIST_OFFLINE_PLAYERS
|
|
|
|
global.ocfg.enable_shared_team_vision = ENABLE_SHARED_TEAM_VISION
|
|
|
|
global.ocfg.enable_regrowth = ENABLE_REGROWTH
|
|
|
|
global.ocfg.enable_abandoned_base_removal = ENABLE_ABANDONED_BASE_REMOVAL
|
|
|
|
global.ocfg.enable_research_queue = ENABLE_RESEARCH_QUEUE
|
|
|
|
global.ocfg.enable_chest_sharing = ENABLE_CHEST_SHARING
|
2020-05-01 14:59:47 -04:00
|
|
|
global.ocfg.enable_magic_factories = ENABLE_MAGIC_FACTORIES
|
2020-03-03 13:44:44 -05:00
|
|
|
global.ocfg.enable_offline_protect = ENABLE_OFFLINE_PROTECTION
|
2020-02-04 15:10:13 -05:00
|
|
|
global.ocfg.enable_power_armor_start = ENABLE_POWER_ARMOR_QUICK_START
|
2020-02-26 02:01:20 -05:00
|
|
|
global.ocfg.enable_modular_armor_start = ENABLE_MODULAR_ARMOR_QUICK_START
|
2020-02-04 15:10:13 -05:00
|
|
|
global.ocfg.lock_goodies_rocket_launch = LOCK_GOODIES_UNTIL_ROCKET_LAUNCH
|
2020-03-26 12:51:49 -04:00
|
|
|
global.ocfg.scale_resources_around_spawns = SCALE_RESOURCES_AROUND_SPAWNS
|
2020-02-04 15:10:13 -05:00
|
|
|
|
|
|
|
global.ocfg.modified_enemy_spawning = OARC_MODIFIED_ENEMY_SPAWNING
|
|
|
|
global.ocfg.near_dist_start = NEAR_MIN_DIST
|
|
|
|
global.ocfg.near_dist_end = NEAR_MAX_DIST
|
|
|
|
global.ocfg.far_dist_start = FAR_MIN_DIST
|
|
|
|
global.ocfg.far_dist_end = FAR_MAX_DIST
|
|
|
|
global.ocfg.vanilla_spawn_count = VANILLA_SPAWN_COUNT
|
|
|
|
global.ocfg.vanilla_spawn_spacing = VANILLA_SPAWN_SPACING
|
|
|
|
|
|
|
|
global.ocfg.spawn_config = OARC_CFG
|
|
|
|
|
|
|
|
global.ocfg.enable_separate_teams = ENABLE_SEPARATE_TEAMS
|
|
|
|
global.ocfg.main_force = MAIN_FORCE
|
|
|
|
global.ocfg.enable_shared_spawns = ENABLE_SHARED_SPAWNS
|
|
|
|
global.ocfg.max_players_shared_spawn = MAX_PLAYERS_AT_SHARED_SPAWN
|
|
|
|
global.ocfg.enable_shared_chat = ENABLE_SHARED_TEAM_CHAT
|
|
|
|
global.ocfg.respawn_cooldown_min = RESPAWN_COOLDOWN_IN_MINUTES
|
|
|
|
global.ocfg.frontier_silo_count = SILO_NUM_SPAWNS
|
|
|
|
global.ocfg.frontier_silo_distance = SILO_CHUNK_DISTANCE
|
|
|
|
global.ocfg.frontier_fixed_pos = SILO_FIXED_POSITION
|
|
|
|
global.ocfg.frontier_pos_table = SILO_POSITIONS
|
|
|
|
global.ocfg.frontier_silo_vision = ENABLE_SILO_VISION
|
|
|
|
global.ocfg.frontier_allow_build = ENABLE_SILO_PLAYER_BUILD
|
|
|
|
|
2020-05-01 14:59:47 -04:00
|
|
|
global.ocfg.enable_anti_grief = ENABLE_ANTI_GRIEFING
|
|
|
|
global.ocfg.ghost_ttl = GHOST_TIME_TO_LIVE
|
|
|
|
global.ocfg.enable_friendly_fire = ENABLE_FRIENDLY_FIRE
|
|
|
|
|
2020-02-04 15:10:13 -05:00
|
|
|
global.ocfg.enable_server_write_files = ENABLE_SERVER_WRITE_FILES
|
2019-04-28 14:58:59 -04:00
|
|
|
|
|
|
|
|
|
|
|
-----------------------
|
|
|
|
-- VALIDATION CHECKS --
|
|
|
|
-----------------------
|
|
|
|
|
|
|
|
if (not global.ocfg.frontier_rocket_silo or not global.ocfg.enable_vanilla_spawns) then
|
|
|
|
global.ocfg.silo_islands = false
|
|
|
|
end
|
|
|
|
|
|
|
|
if (global.ocfg.enable_vanilla_spawns) then
|
|
|
|
global.ocfg.enable_buddy_spawn = false
|
|
|
|
end
|
|
|
|
|
2020-05-01 14:59:47 -04:00
|
|
|
if (not global.ocfg.enable_chest_sharing) then
|
|
|
|
global.ocfg.enable_magic_factories = false
|
|
|
|
end
|
|
|
|
|
2019-04-10 13:59:57 -04:00
|
|
|
end
|