1
0
mirror of https://github.com/Oarcinae/FactorioScenarioMultiplayerSpawn.git synced 2025-01-18 02:58:37 +02:00

Made the buildable silos in frontier mode a proper option. Defaults to player buildable because that works better for multiple forces.

This commit is contained in:
Oarcinae 2019-05-15 14:40:32 +08:00
parent 16c72d7b30
commit f0768358e6
4 changed files with 17 additions and 6 deletions

View File

@ -299,9 +299,9 @@ end)
script.on_event(defines.events.on_research_finished, function(event)
-- Never allows players to build rocket-silos in "frontier" mode.
-- if global.ocfg.frontier_rocket_silo then
-- RemoveRecipe(event.research.force, "rocket-silo")
-- end
if global.ocfg.frontier_rocket_silo and not global.ocfg.frontier_allow_build then
RemoveRecipe(event.research.force, "rocket-silo")
end
if LOCK_GOODIES_UNTIL_ROCKET_LAUNCH and
(not global.satellite_sent or not global.satellite_sent[event.research.force.name]) then

View File

@ -389,6 +389,13 @@ ENABLE_SILO_VISION = true
ENABLE_SILO_BEACONS = false
ENABLE_SILO_RADAR = false
-- Allow silos to be built by the player, but forces them to build in
-- the fixed locations. If this is false, silos are built and assigned
-- only to the main force. This can cause a problem for non main forces
-- when playing with LOCK_GOODIES_UNTIL_ROCKET_LAUNCH enabled.
ENABLE_SILO_PLAYER_BUILD = true
--------------------------------------------------------------------------------
-- Long Reach Options
--------------------------------------------------------------------------------

View File

@ -110,9 +110,11 @@ local function CreateRocketSilo(surface, siloPosition, force)
surface.set_tiles(tiles, true)
-- Create indestructible silo and assign to a force
-- local silo = surface.create_entity{name = "rocket-silo", position = {siloPosition.x+0.5, siloPosition.y}, force = force}
-- silo.destructible = false
-- silo.minable = false
if not global.ocfg.frontier_allow_build then
local silo = surface.create_entity{name = "rocket-silo", position = {siloPosition.x+0.5, siloPosition.y}, force = force}
silo.destructible = false
silo.minable = false
end
-- TAG it on the main force at least.
game.forces[global.ocfg.main_force].add_chart_tag(game.surfaces[GAME_SURFACE_NAME],

View File

@ -65,6 +65,7 @@ function InitOarcConfig()
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
-- MOD VERSION
else
@ -187,6 +188,7 @@ function InitOarcConfig()
global.ocfg.frontier_fixed_pos = false
global.ocfg.frontier_pos_table = {{x = 0, y = 100}}
global.ocfg.frontier_silo_vision = settings.global["oarc-frontier-silo-vision"].value
global.ocfg.frontier_allow_build = true
end