mirror of
https://github.com/Oarcinae/FactorioScenarioMultiplayerSpawn.git
synced 2025-01-22 03:08:49 +02:00
Add modular armor quick start option.
This commit is contained in:
parent
9bf9b4dd31
commit
567408dbbc
@ -89,6 +89,7 @@ LOCK_GOODIES_UNTIL_ROCKET_LAUNCH = false
|
||||
|
||||
-- Give cheaty items on start.
|
||||
ENABLE_POWER_ARMOR_QUICK_START = false
|
||||
ENABLE_MODULAR_ARMOR_QUICK_START = true
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- MAP CONFIGURATION OPTIONS
|
||||
@ -118,18 +119,6 @@ PLAYER_SPAWN_START_ITEMS = {
|
||||
{name="iron-plate", count=16},
|
||||
{name="burner-mining-drill", count = 2},
|
||||
{name="stone-furnace", count = 2},
|
||||
-- {name="iron-plate", count=20},
|
||||
-- {name="burner-mining-drill", count = 1},
|
||||
-- {name="stone-furnace", count = 1},
|
||||
-- {name="power-armor", count=1},
|
||||
-- {name="fusion-reactor-equipment", count=1},
|
||||
-- {name="battery-mk2-equipment", count=3},
|
||||
-- {name="exoskeleton-equipment", count=1},
|
||||
-- {name="personal-roboport-mk2-equipment", count=3},
|
||||
-- {name="solar-panel-equipment", count=7},
|
||||
-- {name="construction-robot", count=100},
|
||||
-- {name="repair-pack", count=100},
|
||||
-- {name="steel-axe", count=3},
|
||||
}
|
||||
|
||||
-- Items provided after EVERY respawn (disabled by default)
|
||||
@ -188,7 +177,7 @@ OARC_CFG = {
|
||||
-- THIS IS WHAT SETS THE SPAWN CIRCLE SIZE!
|
||||
-- Create a circle of land area for the spawn
|
||||
-- If you make this much bigger than a few chunks, good luck.
|
||||
land_area_tiles = CHUNK_SIZE*1.8,
|
||||
land_area_tiles = CHUNK_SIZE*2,
|
||||
|
||||
-- Allow players to choose to spawn with a moat
|
||||
moat_choice_enabled = true,
|
||||
|
@ -110,8 +110,8 @@ function CreateGameOptionsTab(tab_container, player)
|
||||
if (global.ocfg.enable_regrowth) then
|
||||
game_info_str = game_info_str.."\n".."Old parts of the map will slowly be deleted over time (chunks without any player buildings)."
|
||||
end
|
||||
if (global.ocfg.enable_power_armor_start) then
|
||||
game_info_str = game_info_str.."\n".."Power armor quick start enabled."
|
||||
if (global.ocfg.enable_power_armor_start or global.ocfg.enable_modular_armor_start) then
|
||||
game_info_str = game_info_str.."\n".."Quicker start enabled."
|
||||
end
|
||||
if (global.ocfg.lock_goodies_rocket_launch) then
|
||||
game_info_str = game_info_str.."\n".."Artillery/Nukes/ArmorMK2 tech and Prod/Speed 3 module recipes are locked until you launch a rocket!"
|
||||
|
@ -42,6 +42,7 @@ function InitOarcConfig()
|
||||
global.ocfg.enable_research_queue = ENABLE_RESEARCH_QUEUE
|
||||
global.ocfg.enable_chest_sharing = ENABLE_CHEST_SHARING
|
||||
global.ocfg.enable_power_armor_start = ENABLE_POWER_ARMOR_QUICK_START
|
||||
global.ocfg.enable_modular_armor_start = ENABLE_MODULAR_ARMOR_QUICK_START
|
||||
global.ocfg.lock_goodies_rocket_launch = LOCK_GOODIES_UNTIL_ROCKET_LAUNCH
|
||||
|
||||
global.ocfg.modified_enemy_spawning = OARC_MODIFIED_ENEMY_SPAWNING
|
||||
|
@ -228,6 +228,28 @@ function GivePlayerStarterItems(player)
|
||||
|
||||
if global.ocfg.enable_power_armor_start then
|
||||
GiveQuickStartPowerArmor(player)
|
||||
elseif global.ocfg.enable_modular_armor_start then
|
||||
GiveQuickStartModularArmor(player)
|
||||
end
|
||||
end
|
||||
|
||||
-- Modular armor quick start
|
||||
function GiveQuickStartModularArmor(player)
|
||||
player.insert{name="modular-armor", count = 1}
|
||||
|
||||
if player and player.get_inventory(defines.inventory.character_armor) ~= nil and player.get_inventory(defines.inventory.character_armor)[1] ~= nil then
|
||||
local p_armor = player.get_inventory(defines.inventory.character_armor)[1].grid
|
||||
if p_armor ~= nil then
|
||||
for i=1,2 do
|
||||
p_armor.put({name = "personal-roboport-equipment"})
|
||||
p_armor.put({name = "battery-equipment"})
|
||||
|
||||
end
|
||||
for i=1,13 do
|
||||
p_armor.put({name = "solar-panel-equipment"})
|
||||
end
|
||||
end
|
||||
player.insert{name="construction-robot", count = 40}
|
||||
end
|
||||
end
|
||||
|
||||
@ -246,13 +268,9 @@ function GiveQuickStartPowerArmor(player)
|
||||
p_armor.put({name = "personal-roboport-mk2-equipment"})
|
||||
p_armor.put({name = "personal-roboport-mk2-equipment"})
|
||||
p_armor.put({name = "battery-mk2-equipment"})
|
||||
for i=1,7 do
|
||||
p_armor.put({name = "solar-panel-equipment"})
|
||||
p_armor.put({name = "solar-panel-equipment"})
|
||||
p_armor.put({name = "solar-panel-equipment"})
|
||||
p_armor.put({name = "solar-panel-equipment"})
|
||||
p_armor.put({name = "solar-panel-equipment"})
|
||||
p_armor.put({name = "solar-panel-equipment"})
|
||||
p_armor.put({name = "solar-panel-equipment"})
|
||||
end
|
||||
end
|
||||
player.insert{name="construction-robot", count = 100}
|
||||
player.insert{name="belt-immunity-equipment", count = 1}
|
||||
|
Loading…
x
Reference in New Issue
Block a user