added option for old science and rocket, atom & nuclear changes

This commit is contained in:
Peter 2019-01-06 10:36:19 +08:00
parent 3d7e1431da
commit b92a5779c2
7 changed files with 74 additions and 3 deletions

View File

@ -17,6 +17,22 @@ for _, mod in pairs(data.raw.module) do
end
end
data.raw["technology"]["rocket-silo"].unit.ingredients =
{
{"science-pack-1", 1},
{"science-pack-2", 1},
{"science-pack-3", 1},
--{"military-science-pack", 1},
{"production-science-pack", 1},
{"high-tech-science-pack", 1}
}
data.raw["recipe"]["atomic-bomb"].ingredients =
{
{"rocket-control-unit", 15}, --{"processing-unit", 20},
{"explosives", 10},
{"uranium-235", 30}
}
--HUGE THANKS to Dimava for the following changes
--Added options for some changes (for modded users)

View File

@ -5,12 +5,41 @@ table.insert(data.raw["technology"]["advanced-electronics"].effects, {type = "un
table.insert(data.raw["technology"]["advanced-material-processing-2"].effects, {type = "unlock-recipe",recipe = "17-production-science-pack"})
table.insert(data.raw["technology"]["advanced-electronics-2"].effects, {type = "unlock-recipe",recipe = "17-utility-science-pack"})
table.insert(data.raw["technology"]["advanced-electronics-2"].effects, {type = "unlock-recipe",recipe = "rocket-control-unit"})
table.insert(data.raw["technology"]["advanced-electronics-2"].effects, {type = "unlock-recipe",recipe = "low-density-structure"})
table.insert(data.raw["technology"]["advanced-electronics-2"].effects, {type = "unlock-recipe",recipe = "17-low-density-structure"}) --LDS unlock for pre-rocket bases
table.insert(data.raw["technology"]["advanced-material-processing-2"].effects, {type = "unlock-recipe",recipe = "rocket-fuel"})
local effects = data.raw["technology"]["rocket-silo"].effects --remove the duplicate LDS effect in rocket-silo research
for _=1, #effects do
if effects[_].type == "unlock-recipe" and effects[_].recipe == "low-density-structure" then
if effects[_].type == "unlock-recipe" and (effects[_].recipe == "low-density-structure" or effects[_].recipe == "rocket-fuel" or effects[_].recipe == "rocket-control-unit") then
effects[_] = nil
end
end
local technology = data.raw["technology"]["rocket-silo"].prerequisites
for _=1, #technology do
if technology[_] == "rocket-speed-5" then
technology[_] = nil
end
end
if not settings.startup["017-old-science"].value then
data.raw["recipe"]["science-pack-3"].hidden = true
local effects = data.raw["technology"]["advanced-electronics"].effects
for _=1, #effects do if effects[_].type == "unlock-recipe" and effects[_].recipe == "science-pack-3" then effects[_] = nil end end
data.raw["recipe"]["military-science-pack"].hidden = true
local effects = data.raw["technology"]["military-2"].effects
for _=1, #effects do if effects[_].type == "unlock-recipe" and effects[_].recipe == "military-science-pack" then effects[_] = nil end end
data.raw["recipe"]["production-science-pack"].hidden = true
local effects = data.raw["technology"]["advanced-material-processing-2"].effects
for _=1, #effects do if effects[_].type == "unlock-recipe" and effects[_].recipe == "production-science-pack" then effects[_] = nil end end
data.raw["recipe"]["high-tech-science-pack"].hidden = true
local effects = data.raw["technology"]["advanced-electronics-2"].effects
for _=1, #effects do if effects[_].type == "unlock-recipe" and effects[_].recipe == "high-tech-science-pack" then effects[_] = nil end end
end

View File

@ -1,6 +1,6 @@
{
"name": "017_science",
"version": "0.0.5",
"version": "0.0.6",
"factorio_version": "0.16",
"title": "0.17 science conversion",
"author": "npc_strider(morley376)",

View File

@ -8,8 +8,10 @@ high-tech-science-pack=Utility science pack
017-drill=Ore hardness simplification
017-smelting=Reduce smelting time
017-assem-lim=Remove assembler item limit
017-old-science=Enable old science recipes
[mod-setting-description]
017-drill=(Default enabled) Toggle FFF-266 mining changes (removed hardness). This mod makes all vanilla ore hardness = 1 and makes the burner-mining-drill mining_power = 3, which may break modded ore gating.
017-smelting=(Default enabled) Toggle V's smelting changes (https://forums.factorio.com/viewtopic.php?t=64219#p392508). This mod may break ratios for modded recipes using vanilla and modded items.
017-assem-lim=(Default enabled) Toggle the assembly limit removal. This mod affects all assembling-machines and may affect modded crafting stations based on this entity, which may use the limit as a form of gating.
017-old-science=(Default disabled) Toggle the old science recipes (0.16). Disables the ability to use the vanilla recipes (except SP 1 & 2) but allows existing crafting machines to continue using the recipe until changed.

View File

@ -0,0 +1,16 @@
for i, force in pairs(game.forces) do
if force.technologies["advanced-electronics-2"].researched then
force.recipes["rocket-control-unit"].enabled = true
end
if force.technologies["advanced-material-processing-2"].researched then
force.recipes["rocket-fuel"].enabled = true
end
end
for i, force in pairs(game.forces) do
force.reset_recipes()
end
for i, force in pairs(game.forces) do
force.reset_technologies()
end

View File

@ -15,10 +15,12 @@ for i, force in pairs(game.forces) do
end
if force.technologies["advanced-material-processing-2"].researched then
force.recipes["17-production-science-pack"].enabled = true
force.recipes["rocket-fuel"].enabled = true
end
if force.technologies["advanced-electronics-2"].researched then
force.recipes["low-density-structure"].enabled = true
force.recipes["17-low-density-structure"].enabled = true
force.recipes["17-utility-science-pack"].enabled = true
force.recipes["rocket-control-unit"].enabled = true
end
end

View File

@ -17,5 +17,11 @@ data:extend(
name = "017-assem-lim",
setting_type = "startup",
default_value = true
},
{
type = "bool-setting",
name = "017-old-science",
setting_type = "startup",
default_value = false
}
})