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-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-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-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]
|
[mod-setting-description]
|
||||||
lignumis-belt-progression=Yellow belts will require wood belts to craft.
|
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-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-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-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]
|
[autoplace-control-names]
|
||||||
lignumis_enemy_base=Lignumis enemy bases
|
lignumis_enemy_base=Lignumis enemy bases
|
||||||
|
|
|
||||||
|
|
@ -8,5 +8,4 @@ require("lane-splitters")
|
||||||
require("wood-industry")
|
require("wood-industry")
|
||||||
require("crushing-industry")
|
require("crushing-industry")
|
||||||
require("canal-excavator")
|
require("canal-excavator")
|
||||||
require("diversitree")
|
require("diversitree")
|
||||||
require("wood-logistics")
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
require("aai-industry")
|
require("aai-industry")
|
||||||
require("gleba-reborn")
|
require("gleba-reborn")
|
||||||
require("crushing-industry-updates")
|
require("crushing-industry-updates")
|
||||||
require("k2so")
|
require("k2so")
|
||||||
|
require("wood-logistics")
|
||||||
|
|
@ -7,6 +7,7 @@ if not mods["wood-logistics"] then
|
||||||
end
|
end
|
||||||
|
|
||||||
local basic_circuit_board = settings.startup["lignumis-basic-circuit-board"].value
|
local basic_circuit_board = settings.startup["lignumis-basic-circuit-board"].value
|
||||||
|
local electric_lumber_mill = settings.startup["lignumis-electric-lumber-mill"].value
|
||||||
|
|
||||||
|
|
||||||
-- Lumber
|
-- Lumber
|
||||||
|
|
@ -18,26 +19,29 @@ end
|
||||||
-- Lumber mill
|
-- Lumber mill
|
||||||
if settings.startup["wood-logistics-lumber-mill"].value then
|
if settings.startup["wood-logistics-lumber-mill"].value then
|
||||||
local lumberMill = data.raw["assembling-machine"]["lumber-mill"]
|
local lumberMill = data.raw["assembling-machine"]["lumber-mill"]
|
||||||
table.assign(lumberMill, {
|
lumberMill.surface_conditions = {
|
||||||
energy_source = {
|
{
|
||||||
|
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",
|
type = "burner",
|
||||||
fuel_categories = { "chemical" },
|
fuel_categories = { "chemical" },
|
||||||
effectivity = 1,
|
effectivity = 1,
|
||||||
fuel_inventory_size = 3,
|
fuel_inventory_size = 3,
|
||||||
emissions_per_minute = { pollution = 10, noise = 100 },
|
emissions_per_minute = { pollution = 10, noise = 100 },
|
||||||
},
|
|
||||||
surface_conditions = {
|
|
||||||
{
|
|
||||||
property = has_oxygen and "oxygen" or "pressure",
|
|
||||||
min = 3
|
|
||||||
},
|
|
||||||
{
|
|
||||||
property = "gravity",
|
|
||||||
min = 1
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
end
|
||||||
table.insert(lumberMill.crafting_categories, "wood-processing")
|
|
||||||
|
|
||||||
data.raw.item["lumber-mill"].default_import_location = "lignumis"
|
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")
|
:replaceIngredient("gold-plate", "copper-plate")
|
||||||
|
:unlockedByTechnology(
|
||||||
|
electric_lumber_mill and "advanced-carpentry"
|
||||||
|
or basic_circuit_board and "copper-processing"
|
||||||
|
or "electronics"
|
||||||
|
)
|
||||||
:apply()
|
: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
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,6 @@ local Technology = require("__cf-lib__/data/Technology")
|
||||||
local LumberMillFactory = require(MF.buildings .. "LumberMill")
|
local LumberMillFactory = require(MF.buildings .. "LumberMill")
|
||||||
local LumberMill = LumberMillFactory()
|
local LumberMill = LumberMillFactory()
|
||||||
|
|
||||||
local basic_circuit_board = settings.startup["lignumis-basic-circuit-board"].value
|
|
||||||
|
|
||||||
data:extend({
|
data:extend({
|
||||||
{
|
{
|
||||||
type = "recipe-category",
|
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 has_oxygen = data.raw["surface-property"]["oxygen"] ~= nil
|
||||||
|
local electric_lumber_mill = settings.startup["lignumis-electric-lumber-mill"].value
|
||||||
|
|
||||||
if mods["wood-logistics"] then
|
if mods["wood-logistics"] then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
LumberMill.EntityBuilder:new()
|
local lumberMill = LumberMill.EntityBuilder:new()
|
||||||
:burnerEnergySource({ emissions_per_minute = { noise = 100 } })
|
:baseProductivity(0.5)
|
||||||
:baseProductivity(0.5)
|
if electric_lumber_mill then
|
||||||
:apply({
|
lumberMill:electricEnergySource({ emissions_per_minute = { noise = 100 } })
|
||||||
crafting_categories = { "wood-processing" },
|
else
|
||||||
crafting_speed = 2,
|
lumberMill:burnerEnergySource({ emissions_per_minute = { noise = 100 } })
|
||||||
energy_usage = "1000kW",
|
end
|
||||||
surface_conditions = {
|
lumberMill:apply({
|
||||||
{
|
crafting_categories = { "wood-processing" },
|
||||||
property = has_oxygen and "oxygen" or "pressure",
|
crafting_speed = 2,
|
||||||
min = 3
|
energy_usage = "1000kW",
|
||||||
},
|
surface_conditions = {
|
||||||
{
|
{
|
||||||
property = "gravity",
|
property = has_oxygen and "oxygen" or "pressure",
|
||||||
min = 1
|
min = 3
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
property = "gravity",
|
||||||
|
min = 1
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
|
})
|
||||||
|
|
||||||
local lumber_mill_item = LumberMill.ItemBuilder:new()
|
local lumber_mill_item = LumberMill.ItemBuilder:new()
|
||||||
:apply({
|
:apply({
|
||||||
default_import_location = "lignumis",
|
default_import_location = "lignumis",
|
||||||
order = "2[lumber-mill]"
|
order = "2[lumber-mill]"
|
||||||
})
|
})
|
||||||
|
|
||||||
LumberMill.RecipeBuilder:new()
|
LumberMill.RecipeBuilder:new()
|
||||||
:ingredients(table.trim({
|
:ingredients(table.trim({
|
||||||
{ type = "item", name = "stone-brick", amount = 40 },
|
{ type = "item", name = "stone-brick", amount = 40 },
|
||||||
{ type = "item", name = "lumber", amount = 50 },
|
{ type = "item", name = "lumber", amount = 50 },
|
||||||
{ type = "item", name = "wooden-gear-wheel", 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,
|
basic_circuit_board and { type = "item", name = "basic-circuit-board", amount = 20 } or nil,
|
||||||
{ type = "item", name = "burner-assembling-machine", amount = 2 }
|
{ type = "item", name = "burner-assembling-machine", amount = 2 }
|
||||||
}))
|
}))
|
||||||
:apply({
|
:apply({
|
||||||
additional_categories = { "wood-processing" }
|
additional_categories = { "wood-processing" }
|
||||||
})
|
})
|
||||||
|
|
||||||
LumberMill.TechnologyBuilder:new()
|
local tech = LumberMill.TechnologyBuilder:new()
|
||||||
:prerequisites({ "steam-science-pack" })
|
:count(250)
|
||||||
:count(250)
|
:time(15)
|
||||||
:time(15)
|
if electric_lumber_mill then
|
||||||
:ingredients({ { "wood-science-pack", 1 }, { "steam-science-pack", 1 } })
|
tech:prerequisites({ "automation-science-pack" })
|
||||||
:apply()
|
: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()
|
LumberMill.RecipeBuilder:new()
|
||||||
:ingredients({
|
:ingredients({
|
||||||
{ type = "item", name = "stone-brick", amount = 40 },
|
{ type = "item", name = "stone-brick", amount = 40 },
|
||||||
{ type = "item", name = "lumber", amount = 50 },
|
{ type = "item", name = "lumber", amount = 50 },
|
||||||
{ type = "item", name = "wooden-gear-wheel", 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 = basic_circuit_board and "basic-circuit-board" or "electronic-circuit", amount = 20 },
|
||||||
{ type = "item", name = "assembling-machine-1", amount = 2 }
|
{ type = "item", name = "assembling-machine-1", amount = 2 }
|
||||||
})
|
})
|
||||||
:apply({
|
:apply({
|
||||||
name = "lumber-mill-copper",
|
name = "lumber-mill-copper",
|
||||||
localised_name = { "entity-name.lumber-mill" },
|
localised_name = { "entity-name.lumber-mill" },
|
||||||
additional_categories = { "wood-processing" },
|
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("wooden-chest"):addCategory("wood-processing")
|
||||||
Recipe:new("small-electric-pole"):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("fuel-category-updates")
|
||||||
require("lignumis/planet-updates")
|
require("lignumis/planet-updates")
|
||||||
require("technology-updates")
|
|
||||||
|
|
@ -99,11 +99,18 @@ data:extend({
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type = "bool-setting",
|
type = "bool-setting",
|
||||||
name = "lignumis-sciences-spoil",
|
name = "lignumis-electric-lumber-mill",
|
||||||
setting_type = "startup",
|
setting_type = "startup",
|
||||||
default_value = false,
|
default_value = false,
|
||||||
order = "o"
|
order = "o"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
type = "bool-setting",
|
||||||
|
name = "lignumis-sciences-spoil",
|
||||||
|
setting_type = "startup",
|
||||||
|
default_value = false,
|
||||||
|
order = "p"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
type = "string-setting",
|
type = "string-setting",
|
||||||
name = "lignumis-second-planet",
|
name = "lignumis-second-planet",
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,5 @@ end
|
||||||
|
|
||||||
local Settings = require("__cf-lib__/settings/Settings")
|
local Settings = require("__cf-lib__/settings/Settings")
|
||||||
local force = Settings.force
|
local force = Settings.force
|
||||||
local default = Settings.default
|
|
||||||
|
|
||||||
force("wood-logistics-woodtronics", false)
|
force("wood-logistics-woodtronics", false)
|
||||||
Loading…
Add table
Add a link
Reference in a new issue