rocket engine nozzle
This commit is contained in:
parent
dec00dc1c2
commit
6e8fe4280d
4 changed files with 48 additions and 10 deletions
|
|
@ -1,4 +1,9 @@
|
||||||
---------------------------------------------------------------------------------------------------
|
---------------------------------------------------------------------------------------------------
|
||||||
|
Version: 0.4.0
|
||||||
|
Date: 2021-01-03
|
||||||
|
Changes:
|
||||||
|
- Tungsten sets basic rocket-engine-nozzle recipe, this mod updates it with zirconia
|
||||||
|
---------------------------------------------------------------------------------------------------
|
||||||
Version: 0.3.2
|
Version: 0.3.2
|
||||||
Date: 2021-12-31
|
Date: 2021-12-31
|
||||||
Features:
|
Features:
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,15 @@ local util = {}
|
||||||
util.me = me
|
util.me = me
|
||||||
util.get_setting = util.me.get_setting
|
util.get_setting = util.me.get_setting
|
||||||
|
|
||||||
|
util.titanium_plate = ""
|
||||||
|
util.titanium_processing = ""
|
||||||
|
|
||||||
|
if mods["FactorioExtended-Plus-Core"] then
|
||||||
|
util.titanium_plate = "titanium-alloy"
|
||||||
|
else
|
||||||
|
util.titanium_plate = "titanium-plate"
|
||||||
|
end
|
||||||
|
|
||||||
function util.fe_plus(sub)
|
function util.fe_plus(sub)
|
||||||
if mods["FactorioExtended-Plus-"..sub] then
|
if mods["FactorioExtended-Plus-"..sub] then
|
||||||
return true
|
return true
|
||||||
|
|
@ -334,7 +343,7 @@ function util.remove_raw(t, name)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Multiply energy required
|
-- Multiply energy required
|
||||||
function util.multiply_time(recipe, factor)
|
function util.multiply_time(recipe_name, factor)
|
||||||
if me.bypass[recipe_name] then return end
|
if me.bypass[recipe_name] then return end
|
||||||
if data.raw.recipe[recipe_name] then
|
if data.raw.recipe[recipe_name] then
|
||||||
multiply_time(data.raw.recipe[recipe_name], factor)
|
multiply_time(data.raw.recipe[recipe_name], factor)
|
||||||
|
|
@ -351,19 +360,40 @@ function multiply_time(recipe, factor)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Add to energy required
|
||||||
|
function util.add_time(recipe_name, amount)
|
||||||
|
log("Doing ".. recipe_name)
|
||||||
|
log(amount)
|
||||||
|
if me.bypass[recipe_name] then return end
|
||||||
|
log(1)
|
||||||
|
if data.raw.recipe[recipe_name] then
|
||||||
|
add_time(data.raw.recipe[recipe_name], amount)
|
||||||
|
add_time(data.raw.recipe[recipe_name].normal, amount)
|
||||||
|
add_time(data.raw.recipe[recipe_name].expensive, amount)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function add_time(recipe, amount)
|
||||||
|
if recipe then
|
||||||
|
if recipe.energy_required then
|
||||||
|
recipe.energy_required = recipe.energy_required + amount
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- Set recipe category
|
-- Set recipe category
|
||||||
function util.set_category(recipe, category)
|
function util.set_category(recipe_name, category)
|
||||||
if me.bypass[recipe_name] then return end
|
if me.bypass[recipe_name] then return end
|
||||||
if data.raw.recipe[recipe] then
|
if data.raw.recipe[recipe_name] then
|
||||||
data.raw.recipe[recipe].category = category
|
data.raw.recipe[recipe_name].category = category
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Set recipe subgroup
|
-- Set recipe subgroup
|
||||||
function util.set_subgroup(recipe, subgroup)
|
function util.set_subgroup(recipe_name, subgroup)
|
||||||
if me.bypass[recipe_name] then return end
|
if me.bypass[recipe_name] then return end
|
||||||
if data.raw.recipe[recipe] then
|
if data.raw.recipe[recipe_name] then
|
||||||
data.raw.recipe[recipe].subgroup = subgroup
|
data.raw.recipe[recipe_name].subgroup = subgroup
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "bzzirconium",
|
"name": "bzzirconium",
|
||||||
"version": "0.3.2",
|
"version": "0.4.0",
|
||||||
"factorio_version": "1.1",
|
"factorio_version": "1.1",
|
||||||
"title": "Zirconium",
|
"title": "Zirconium",
|
||||||
"author": "Brevven",
|
"author": "Brevven",
|
||||||
|
|
@ -16,8 +16,8 @@
|
||||||
"? bzsilicon",
|
"? bzsilicon",
|
||||||
"? bzlead",
|
"? bzlead",
|
||||||
"? bztitanium >= 0.12.4",
|
"? bztitanium >= 0.12.4",
|
||||||
"? bztungsten >= 0.2.1"
|
"? bztungsten >= 0.5.0"
|
||||||
],
|
],
|
||||||
"description": "Adds zircon, zirconia, zirconium, and cermet to the base game."
|
"description": "Adds zircon, zirconia, zirconium, and cermet to the base game.\n\nCompatible with Krastorio 2, Space Exploration, FE+, and more. A standalone piece of BZ Mods."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,9 @@ if not mods.bztungsten then
|
||||||
util.add_ingredient("nuclear-fuel", "zirconium-plate", 1)
|
util.add_ingredient("nuclear-fuel", "zirconium-plate", 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
util.add_ingredient("rocket-engine-nozzle", "zirconia", 1)
|
||||||
|
util.add_to_product("rocket-engine-nozzle", "rocket-engine-nozzle", 1)
|
||||||
|
util.add_time("rocket-engine-nozzle", 5)
|
||||||
|
|
||||||
if util.me.use_cermet() then
|
if util.me.use_cermet() then
|
||||||
util.add_ingredient("rocket-control-unit", "cermet", 1)
|
util.add_ingredient("rocket-control-unit", "cermet", 1)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue