Add setting to make the lumber mill electric
This commit is contained in:
parent
3115b51e4e
commit
bb624c1159
9 changed files with 108 additions and 69 deletions
|
|
@ -195,6 +195,7 @@ lignumis-vanilla-lab=[color=orange][font=heading-2]Overhaul[/font][/color] Keep
|
|||
lignumis-double-rocket=[color=green][font=heading-2]Easy[/font][/color] Double provisional rocket cargo capacity
|
||||
lignumis-sciences-spoil=[color=red][font=heading-2]Hard[/font][/color] Lignumis science packs spoil
|
||||
lignumis-infinite-astroponics-productivity-research=[color=green][font=heading-2]Easy[/font][/color] Infinite productivity research for Astroponics
|
||||
lignumis-electric-lumber-mill=[color=green][font=heading-2]Easy[/font][/color] Electric lumber mill
|
||||
|
||||
[mod-setting-description]
|
||||
lignumis-belt-progression=Yellow belts will require wood belts to craft.
|
||||
|
|
@ -211,6 +212,7 @@ lignumis-vanilla-lab=Moves the transport belt recipe to Iron processing so the l
|
|||
lignumis-double-rocket=The provisional rocket can carry 80 instead of 40 slots.
|
||||
lignumis-sciences-spoil=Both wood science packs and steam science packs spoil for additional difficulty.
|
||||
lignumis-infinite-astroponics-productivity-research=Productivity research for Astroponics is infinite instead of being capped to level 5 (which results in 50% productivity).
|
||||
lignumis-electric-lumber-mill=The lumber mill will consume electricity instead of burner fuel and will be unlocked after researching electricity.
|
||||
|
||||
[autoplace-control-names]
|
||||
lignumis_enemy_base=Lignumis enemy bases
|
||||
|
|
|
|||
|
|
@ -8,5 +8,4 @@ require("lane-splitters")
|
|||
require("wood-industry")
|
||||
require("crushing-industry")
|
||||
require("canal-excavator")
|
||||
require("diversitree")
|
||||
require("wood-logistics")
|
||||
require("diversitree")
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
require("aai-industry")
|
||||
require("gleba-reborn")
|
||||
require("crushing-industry-updates")
|
||||
require("k2so")
|
||||
require("k2so")
|
||||
require("wood-logistics")
|
||||
|
|
@ -7,6 +7,7 @@ if not mods["wood-logistics"] then
|
|||
end
|
||||
|
||||
local basic_circuit_board = settings.startup["lignumis-basic-circuit-board"].value
|
||||
local electric_lumber_mill = settings.startup["lignumis-electric-lumber-mill"].value
|
||||
|
||||
|
||||
-- Lumber
|
||||
|
|
@ -18,26 +19,29 @@ end
|
|||
-- Lumber mill
|
||||
if settings.startup["wood-logistics-lumber-mill"].value then
|
||||
local lumberMill = data.raw["assembling-machine"]["lumber-mill"]
|
||||
table.assign(lumberMill, {
|
||||
energy_source = {
|
||||
lumberMill.surface_conditions = {
|
||||
{
|
||||
property = has_oxygen and "oxygen" or "pressure",
|
||||
min = 3
|
||||
},
|
||||
{
|
||||
property = "gravity",
|
||||
min = 1
|
||||
}
|
||||
}
|
||||
table.insert(lumberMill.crafting_categories, "wood-processing")
|
||||
|
||||
if electric_lumber_mill then
|
||||
lumberMill.energy_source.emissions_per_minute.noise = 100
|
||||
else
|
||||
lumberMill.energy_source = {
|
||||
type = "burner",
|
||||
fuel_categories = { "chemical" },
|
||||
effectivity = 1,
|
||||
fuel_inventory_size = 3,
|
||||
emissions_per_minute = { pollution = 10, noise = 100 },
|
||||
},
|
||||
surface_conditions = {
|
||||
{
|
||||
property = has_oxygen and "oxygen" or "pressure",
|
||||
min = 3
|
||||
},
|
||||
{
|
||||
property = "gravity",
|
||||
min = 1
|
||||
}
|
||||
}
|
||||
})
|
||||
table.insert(lumberMill.crafting_categories, "wood-processing")
|
||||
end
|
||||
|
||||
data.raw.item["lumber-mill"].default_import_location = "lignumis"
|
||||
|
||||
|
|
@ -63,9 +67,37 @@ if settings.startup["wood-logistics-lumber-mill"].value then
|
|||
}
|
||||
})
|
||||
:replaceIngredient("gold-plate", "copper-plate")
|
||||
:unlockedByTechnology(
|
||||
electric_lumber_mill and "advanced-carpentry"
|
||||
or basic_circuit_board and "copper-processing"
|
||||
or "electronics"
|
||||
)
|
||||
:apply()
|
||||
|
||||
Technology:new(basic_circuit_board and "copper-processing" or "electronics"):addRecipe("lumber-mill-copper")
|
||||
if electric_lumber_mill then
|
||||
table.assign(data.raw.technology["advanced-carpentry"], {
|
||||
prerequisites = { "automation-science-pack" },
|
||||
unit = {
|
||||
count = 250,
|
||||
time = 15,
|
||||
ingredients = {
|
||||
{ "automation-science-pack", 1 }
|
||||
}
|
||||
}
|
||||
})
|
||||
else
|
||||
table.assign(data.raw.technology["advanced-carpentry"], {
|
||||
prerequisites = { "steam-science-pack" },
|
||||
unit = {
|
||||
count = 250,
|
||||
time = 15,
|
||||
ingredients = {
|
||||
{ "wood-science-pack", 1 },
|
||||
{ "steam-science-pack", 1 }
|
||||
}
|
||||
}
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@ local Technology = require("__cf-lib__/data/Technology")
|
|||
local LumberMillFactory = require(MF.buildings .. "LumberMill")
|
||||
local LumberMill = LumberMillFactory()
|
||||
|
||||
local basic_circuit_board = settings.startup["lignumis-basic-circuit-board"].value
|
||||
|
||||
data:extend({
|
||||
{
|
||||
type = "recipe-category",
|
||||
|
|
@ -12,39 +10,45 @@ data:extend({
|
|||
}
|
||||
})
|
||||
|
||||
local basic_circuit_board = settings.startup["lignumis-basic-circuit-board"].value
|
||||
local has_oxygen = data.raw["surface-property"]["oxygen"] ~= nil
|
||||
local electric_lumber_mill = settings.startup["lignumis-electric-lumber-mill"].value
|
||||
|
||||
if mods["wood-logistics"] then
|
||||
return
|
||||
end
|
||||
|
||||
LumberMill.EntityBuilder:new()
|
||||
:burnerEnergySource({ emissions_per_minute = { noise = 100 } })
|
||||
:baseProductivity(0.5)
|
||||
:apply({
|
||||
crafting_categories = { "wood-processing" },
|
||||
crafting_speed = 2,
|
||||
energy_usage = "1000kW",
|
||||
surface_conditions = {
|
||||
{
|
||||
property = has_oxygen and "oxygen" or "pressure",
|
||||
min = 3
|
||||
},
|
||||
{
|
||||
property = "gravity",
|
||||
min = 1
|
||||
}
|
||||
local lumberMill = LumberMill.EntityBuilder:new()
|
||||
:baseProductivity(0.5)
|
||||
if electric_lumber_mill then
|
||||
lumberMill:electricEnergySource({ emissions_per_minute = { noise = 100 } })
|
||||
else
|
||||
lumberMill:burnerEnergySource({ emissions_per_minute = { noise = 100 } })
|
||||
end
|
||||
lumberMill:apply({
|
||||
crafting_categories = { "wood-processing" },
|
||||
crafting_speed = 2,
|
||||
energy_usage = "1000kW",
|
||||
surface_conditions = {
|
||||
{
|
||||
property = has_oxygen and "oxygen" or "pressure",
|
||||
min = 3
|
||||
},
|
||||
{
|
||||
property = "gravity",
|
||||
min = 1
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
local lumber_mill_item = LumberMill.ItemBuilder:new()
|
||||
:apply({
|
||||
local lumber_mill_item = LumberMill.ItemBuilder:new()
|
||||
:apply({
|
||||
default_import_location = "lignumis",
|
||||
order = "2[lumber-mill]"
|
||||
})
|
||||
|
||||
LumberMill.RecipeBuilder:new()
|
||||
:ingredients(table.trim({
|
||||
LumberMill.RecipeBuilder:new()
|
||||
:ingredients(table.trim({
|
||||
{ type = "item", name = "stone-brick", amount = 40 },
|
||||
{ type = "item", name = "lumber", amount = 50 },
|
||||
{ type = "item", name = "wooden-gear-wheel", amount = 50 },
|
||||
|
|
@ -52,19 +56,24 @@ end
|
|||
basic_circuit_board and { type = "item", name = "basic-circuit-board", amount = 20 } or nil,
|
||||
{ type = "item", name = "burner-assembling-machine", amount = 2 }
|
||||
}))
|
||||
:apply({
|
||||
:apply({
|
||||
additional_categories = { "wood-processing" }
|
||||
})
|
||||
|
||||
LumberMill.TechnologyBuilder:new()
|
||||
:prerequisites({ "steam-science-pack" })
|
||||
:count(250)
|
||||
:time(15)
|
||||
:ingredients({ { "wood-science-pack", 1 }, { "steam-science-pack", 1 } })
|
||||
:apply()
|
||||
local tech = LumberMill.TechnologyBuilder:new()
|
||||
:count(250)
|
||||
:time(15)
|
||||
if electric_lumber_mill then
|
||||
tech:prerequisites({ "automation-science-pack" })
|
||||
:ingredients({ { "automation-science-pack", 1 } })
|
||||
else
|
||||
tech:prerequisites({ "steam-science-pack" })
|
||||
:ingredients({ { "wood-science-pack", 1 }, { "steam-science-pack", 1 } })
|
||||
end
|
||||
tech:apply()
|
||||
|
||||
LumberMill.RecipeBuilder:new()
|
||||
:ingredients({
|
||||
LumberMill.RecipeBuilder:new()
|
||||
:ingredients({
|
||||
{ type = "item", name = "stone-brick", amount = 40 },
|
||||
{ type = "item", name = "lumber", amount = 50 },
|
||||
{ type = "item", name = "wooden-gear-wheel", amount = 50 },
|
||||
|
|
@ -72,7 +81,7 @@ end
|
|||
{ type = "item", name = basic_circuit_board and "basic-circuit-board" or "electronic-circuit", amount = 20 },
|
||||
{ type = "item", name = "assembling-machine-1", amount = 2 }
|
||||
})
|
||||
:apply({
|
||||
:apply({
|
||||
name = "lumber-mill-copper",
|
||||
localised_name = { "entity-name.lumber-mill" },
|
||||
additional_categories = { "wood-processing" },
|
||||
|
|
@ -82,7 +91,11 @@ end
|
|||
}
|
||||
})
|
||||
|
||||
Technology:new(basic_circuit_board and "copper-processing" or "electronics"):addRecipe("lumber-mill-copper")
|
||||
Technology:new(
|
||||
electric_lumber_mill and "lumber-mill"
|
||||
or basic_circuit_board and "copper-processing"
|
||||
or "electronics"
|
||||
):addRecipe("lumber-mill-copper")
|
||||
|
||||
Recipe:new("wooden-chest"):addCategory("wood-processing")
|
||||
Recipe:new("small-electric-pole"):addCategory("wood-processing")
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
if mods["wood-logistics"] then
|
||||
table.assign(data.raw.technology["advanced-carpentry"], {
|
||||
prerequisites = { "steam-science-pack" },
|
||||
unit = {
|
||||
count = 250,
|
||||
time = 15,
|
||||
ingredients = {
|
||||
{ "wood-science-pack", 1 },
|
||||
{ "steam-science-pack", 1 }
|
||||
}
|
||||
}
|
||||
})
|
||||
end
|
||||
|
|
@ -1,3 +1,2 @@
|
|||
require("fuel-category-updates")
|
||||
require("lignumis/planet-updates")
|
||||
require("technology-updates")
|
||||
require("lignumis/planet-updates")
|
||||
|
|
@ -99,11 +99,18 @@ data:extend({
|
|||
},
|
||||
{
|
||||
type = "bool-setting",
|
||||
name = "lignumis-sciences-spoil",
|
||||
name = "lignumis-electric-lumber-mill",
|
||||
setting_type = "startup",
|
||||
default_value = false,
|
||||
order = "o"
|
||||
},
|
||||
{
|
||||
type = "bool-setting",
|
||||
name = "lignumis-sciences-spoil",
|
||||
setting_type = "startup",
|
||||
default_value = false,
|
||||
order = "p"
|
||||
},
|
||||
{
|
||||
type = "string-setting",
|
||||
name = "lignumis-second-planet",
|
||||
|
|
|
|||
|
|
@ -4,6 +4,5 @@ end
|
|||
|
||||
local Settings = require("__cf-lib__/settings/Settings")
|
||||
local force = Settings.force
|
||||
local default = Settings.default
|
||||
|
||||
force("wood-logistics-woodtronics", false)
|
||||
Loading…
Add table
Add a link
Reference in a new issue