diff --git a/lignumis/changelog.txt b/lignumis/changelog.txt index 0fe9c1d..48c8bca 100644 --- a/lignumis/changelog.txt +++ b/lignumis/changelog.txt @@ -1,4 +1,21 @@ --------------------------------------------------------------------------------------------------- +Version: 1.0.76 +Date: 12.12.2025 + Changes: + - Add compatibility for "Canal Excavator" (thanks jurgy) + - Add compatibility for "Wood Logistics" + - Diversitree: Improve compatibility + - Use additional_categories for wood processing +--------------------------------------------------------------------------------------------------- +Version: 1.0.75 +Date: 09.12.2025 + Changes: + - Add is_satellite to PlanetsLib:extend + - Remove default item weights as the code has been moved to PlanetsLib + Bug Fixes: + - Recycling in Factoriopedia: Add order to bioprocessing subgroup for compatibility (thanks jvella94) + - Crushing Industry: Use additional_categories for quality assembling so the rocket silo recipe will use concrete mix again +--------------------------------------------------------------------------------------------------- Version: 1.0.74 Date: 18.11.2025 Bug Fixes: @@ -83,7 +100,7 @@ Version: 1.0.62 Date: 02.09.2025 Changes: - Add spanish locales (thanks DFOXpro) - - Add compatibility for Alien Biomes (thanks Chromebomb) + - Add compatibility for "Alien Biomes" (thanks Chromebomb) - The lumber mill can be built on Vulcanus again --------------------------------------------------------------------------------------------------- Version: 1.0.61 diff --git a/lignumis/info.json b/lignumis/info.json index 2e43e9b..c3a157d 100644 --- a/lignumis/info.json +++ b/lignumis/info.json @@ -1,6 +1,6 @@ { "name": "lignumis", - "version": "1.0.74", + "version": "1.0.76", "title": "Lignumis", "description": "Dive into the world of Lignumis, a moon of Nauvis offering only the most basic technologies.\n\nThis planet mod effects other planets and space ships. Make sure to read the description on the mod portal and check the mod settings.", "author": "cackling fiend", @@ -12,39 +12,40 @@ "space-age >= 2.0.53", "astroponics >= 1.2.0", "bioprocessing-tab", - "cf-lib >= 0.0.13", + "cf-lib >= 1.1.0", "flib", "gleba-water-cane", "lignumis-assets >= 1.0.3", "mf-buildings >= 1.0.7", "mf-core >= 1.0.3", "mf-logistics >= 1.0.1", - "PlanetsLib >= 1.1.26", + "PlanetsLib >= 1.14.7", "pollution-as-surface-property", "Wood-Walls >= 1.2.0", "vulcanus-sulfuric-bacteria", - "?aai-industry", - "?aai-loaders", - "?aai-loaders-sane", - "?any-planet-start", - "?atan-nuclear-science", - "?crushing-industry", - "?Diversitree", - "?fulgora-coralmium-agriculture", - "?gleba-reborn", - "?hot-metals >= 1.1.0", - "?Krastorio2-spaced-out", - "?lane-splitters", - "?metal-and-stars", - "(?)secretas", - "(?)Wood_Gasification_updated", - "?wood-industry", - "?wood-military >= 2.3.3", - "!apm_power_ldinc", - "!early-agriculture", - "!planet-picker", - "!wood-logistics", - "!wood-universe-modpack", - "!rso-mod" + "? aai-industry", + "? aai-loaders", + "? aai-loaders-sane", + "? any-planet-start", + "? crushing-industry", + "? fulgora-coralmium-agriculture", + "? hot-metals >= 1.1.0", + "? lane-splitters", + "? wood-industry", + "? wood-military >= 2.3.3", + "? canal-excavator >= 1.9.0", + "? wood-logistics", + "(?) atan-nuclear-science", + "(?) Diversitree", + "(?) gleba-reborn", + "(?) Krastorio2-spaced-out", + "(?) metal-and-stars", + "(?) secretas", + "(?) Wood_Gasification_updated", + "! apm_power_ldinc", + "! early-agriculture", + "! planet-picker", + "! wood-universe-modpack", + "! rso-mod" ] } \ No newline at end of file diff --git a/lignumis/locale/de/strings.cfg b/lignumis/locale/de/strings.cfg index 3c723c8..63a519a 100644 --- a/lignumis/locale/de/strings.cfg +++ b/lignumis/locale/de/strings.cfg @@ -52,7 +52,7 @@ lignumis-medium-wriggler-pentapod=Mittelgroßer Lignumis Fünfbein-Zapler [entity-description] lumber-mill=Fortschrittliche Maschine zur Holzbearbeitung. -quality-assembler=High-End-Montagemaschine, die nur die besten Maschinen herstellt. Verleiht 25% zusätzliche Qualität durch den Verbrauch von [item=gold-quality-catalyst]. Die Oberflächenbedingungen und Zutaten bleiben ansonsten unverändert. +quality-assembler=High-End-Montagemaschine, die nur die besten Maschinen herstellt. Verleiht 35% zusätzliche Qualität durch den Verbrauch von [item=gold-quality-catalyst]. Die Oberflächenbedingungen und Zutaten bleiben ansonsten unverändert. gold-stromatolite-plant=Sammle Gold-Stromatolithen für Bakterien, die Gold aus dem Boden anreichern.\n__REMARK_COLOR_BEGIN__Erwarteter Ertrag:__REMARK_COLOR_END__ 1.5 [item=gold-ore]/m [equipment-name] diff --git a/lignumis/locale/en/strings.cfg b/lignumis/locale/en/strings.cfg index 262ef96..ef74696 100644 --- a/lignumis/locale/en/strings.cfg +++ b/lignumis/locale/en/strings.cfg @@ -53,7 +53,7 @@ burner-lamp=Burner lamp [entity-description] lumber-mill=Advanced machine to process wood. -quality-assembler=High-end assembler to craft only the finest quality machines. It gives 25% additional quality by consuming [item=gold-quality-catalyst]. Surface conditions and ingredients are otherwise unchanged. +quality-assembler=High-end assembler to craft only the finest quality machines. It gives 35% additional quality by consuming [item=gold-quality-catalyst]. Surface conditions and ingredients are otherwise unchanged. gold-stromatolite-plant=Harvest gold stromatolites for bacteria that enrich gold from the ground.\n__REMARK_COLOR_BEGIN__Expected yield:__REMARK_COLOR_END__ 1.5 [item=gold-ore]/m [equipment-name] diff --git a/lignumis/locale/es-ES/strings.cfg b/lignumis/locale/es-ES/strings.cfg index 5131da5..3d78c3f 100644 --- a/lignumis/locale/es-ES/strings.cfg +++ b/lignumis/locale/es-ES/strings.cfg @@ -52,7 +52,7 @@ lignumis-medium-wriggler-pentapod=Pentápodo reptante mediano de Lignumis [entity-description] lumber-mill=Máquina avanzada para procesar madera. -quality-assembler=Ensamblador de alta gama para fabricar solo máquinas de la mejor calidad. Da un 25% de calidad adicional al consumir [item=gold-quality-catalyst]. Por lo demás, las condiciones de la superficie y los ingredientes no cambian. +quality-assembler=Ensamblador de alta gama para fabricar solo máquinas de la mejor calidad. Da un 35% de calidad adicional al consumir [item=gold-quality-catalyst]. Por lo demás, las condiciones de la superficie y los ingredientes no cambian. gold-stromatolite-plant=Recolecte estromatolitos de oro en busca de bacterias que enriquezcan el oro del suelo.\n__REMARK_COLOR_BEGIN__Rendimiento esperado:__REMARK_COLOR_END__ 1.5 [item=gold-ore]/m [equipment-name] diff --git a/lignumis/locale/ru/strings.cfg b/lignumis/locale/ru/strings.cfg index 1d8c517..03b9dc4 100644 --- a/lignumis/locale/ru/strings.cfg +++ b/lignumis/locale/ru/strings.cfg @@ -52,7 +52,7 @@ lignumis-medium-wriggler-pentapod=Средний пятиног-ползун Л [entity-description] lumber-mill=Продвинутая машина для обработки древесины. -quality-assembler=Высококачественный сборочный автомат, создающий только лучшие механизмы. Добавляет 25% дополнительного качества предмету, потребляя [item=gold-quality-catalyst]. Условия поверхности и ингредиенты остаются неизменными. +quality-assembler=Высококачественный сборочный автомат, создающий только лучшие механизмы. Добавляет 35% дополнительного качества предмету, потребляя [item=gold-quality-catalyst]. Условия поверхности и ингредиенты остаются неизменными. gold-stromatolite-plant=Собирайте золотой строматолит для получения бактерий, обогащающих золото из почвы.\n__REMARK_COLOR_BEGIN__Ожидаемая добыча:__REMARK_COLOR_END__ 1.5 [item=gold-ore]/m [equipment-name] diff --git a/lignumis/prototypes/compatibility/aai-loaders.lua b/lignumis/prototypes/compatibility/aai-loaders.lua index 2137280..da3c063 100644 --- a/lignumis/prototypes/compatibility/aai-loaders.lua +++ b/lignumis/prototypes/compatibility/aai-loaders.lua @@ -46,7 +46,7 @@ AAILoaders.make_tier({ order = "d[loader]-a00[aai-wood-loader]" }) -data.raw.recipe["aai-wood-loader"].category = "wood-processing-or-assembling" +data.raw.recipe["aai-wood-loader"].additional_categories = { "wood-processing" } if not basic_circuit_board then local nauvis_recipe = Recipe:new("aai-wood-loader"):clone("wood-loader-electronic-circuit") diff --git a/lignumis/prototypes/compatibility/canal-excavator.lua b/lignumis/prototypes/compatibility/canal-excavator.lua new file mode 100644 index 0000000..5a34a27 --- /dev/null +++ b/lignumis/prototypes/compatibility/canal-excavator.lua @@ -0,0 +1,14 @@ +if not mods["canal-excavator"] then return end + +data:extend({{ + type = "mod-data", + name = "canex-lignumis-config", + data_type = "canex-surface-config", + data = { + surfaceName = "lignumis", + localisation = {"space-location-name.lignumis"}, + mineResult = "stone", + oreStartingAmount = 10, + tint = {r = 102, g = 78, b = 6} + }, +}}) \ No newline at end of file diff --git a/lignumis/prototypes/compatibility/crushing-industry.lua b/lignumis/prototypes/compatibility/crushing-industry.lua index 9a88705..5b035c3 100644 --- a/lignumis/prototypes/compatibility/crushing-industry.lua +++ b/lignumis/prototypes/compatibility/crushing-industry.lua @@ -90,10 +90,9 @@ end local gold_recipe = Recipe:new("burner-crusher") :replaceIngredient("iron-gear-wheel", "wooden-gear-wheel") :replaceIngredient("iron-plate", "gold-plate") - :assign({ - category = settings.startup["lignumis-lumber-mill-more-recipes"].value and "wood-processing-or-assembling" or - "crafting" - }) +if settings.startup["lignumis-lumber-mill-more-recipes"].value then + gold_recipe.prototype.additional_categories = { "wood-processing" } +end gold_recipe:clone("burner-crusher-copper") :replaceIngredient("gold-plate", "copper-plate") diff --git a/lignumis/prototypes/compatibility/data.lua b/lignumis/prototypes/compatibility/data.lua index 6d649e2..0ed7173 100644 --- a/lignumis/prototypes/compatibility/data.lua +++ b/lignumis/prototypes/compatibility/data.lua @@ -6,4 +6,6 @@ require("aai-loaders") require("nuclear-science") require("lane-splitters") require("wood-industry") -require("crushing-industry") \ No newline at end of file +require("crushing-industry") +require("canal-excavator") +require("diversitree") \ No newline at end of file diff --git a/lignumis/prototypes/compatibility/diversitree.lua b/lignumis/prototypes/compatibility/diversitree.lua new file mode 100644 index 0000000..af5e8f1 --- /dev/null +++ b/lignumis/prototypes/compatibility/diversitree.lua @@ -0,0 +1,12 @@ +if not mods["Diversitree"] then + return +end + +data.raw.plant["s6xdvt-fake-tree"].surface_conditions[1].min = 900 + +local tree_plant = data.raw.plant["s6xdvt-fake-tree"] +tree_plant.growth_ticks = 5 * minute +tree_plant.minable.results = { { type = "item", name = "wood", amount = 5 } } +tree_plant.minable.count = nil +tree_plant.surface_conditions[1].min = 900 +table.insert(tree_plant.autoplace.tile_restriction, "natural-gold-soil") \ No newline at end of file diff --git a/lignumis/prototypes/compatibility/lane-splitters.lua b/lignumis/prototypes/compatibility/lane-splitters.lua index 5493840..075cc68 100644 --- a/lignumis/prototypes/compatibility/lane-splitters.lua +++ b/lignumis/prototypes/compatibility/lane-splitters.lua @@ -23,7 +23,7 @@ lane_splitter.prototype.structure_patch.west.filename = data.raw.splitter["wood- lane_splitter.prototype.structure_patch.north.filename = data.raw.splitter["wood-splitter"].structure_patch.north.filename lane_splitter.item.icon = Lignumis.graphics .. "icons/wood-lane-splitter.png" lane_splitter.item.order = "d[lane-splitter]-0[wood-lane-splitter]" -lane_splitter.recipe.category = "wood-processing-or-assembling" +lane_splitter.recipe.additional_categories = { "wood-processing" } data:extend({ lane_splitter.prototype, diff --git a/lignumis/prototypes/content/basic-circuit-board.lua b/lignumis/prototypes/content/basic-circuit-board.lua index 04dbf0a..8858fdf 100644 --- a/lignumis/prototypes/content/basic-circuit-board.lua +++ b/lignumis/prototypes/content/basic-circuit-board.lua @@ -19,7 +19,8 @@ data:extend({ { type = "recipe", name = "basic-circuit-board", - category = "wood-processing-or-assembling", + category = "crafting", + additional_categories = { "wood-processing" }, icons = { { icon = Lignumis.graphics .. "icons/basic-circuit-board.png" }, { icon = Lignumis.graphics .. "icons/gold-cable.png", scale = 0.25, shift = { 8, 8 } } @@ -36,7 +37,8 @@ data:extend({ type = "recipe", name = "basic-circuit-board-copper", localised_name = { "item-name.basic-circuit-board" }, - category = "wood-processing-or-assembling", + category = "crafting", + additional_categories = { "wood-processing" }, icons = { { icon = Lignumis.graphics .. "icons/basic-circuit-board.png" }, { icon = "__base__/graphics/icons/copper-cable.png", scale = 0.25, shift = { 8, 8 } } diff --git a/lignumis/prototypes/content/basic-gun-turret.lua b/lignumis/prototypes/content/basic-gun-turret.lua index 335010b..3935386 100644 --- a/lignumis/prototypes/content/basic-gun-turret.lua +++ b/lignumis/prototypes/content/basic-gun-turret.lua @@ -58,7 +58,7 @@ local turret_recipe = { results = { { type = "item", name = "basic-gun-turret", amount = 1 } } } if settings.startup["lignumis-lumber-mill-more-recipes"].value then - turret_recipe.category = "wood-processing-or-assembling" + turret_recipe.additional_categories = { "wood-processing" } end local turret_technology = { diff --git a/lignumis/prototypes/content/burner-agricultural-tower.lua b/lignumis/prototypes/content/burner-agricultural-tower.lua index e76a2da..dc5a31e 100644 --- a/lignumis/prototypes/content/burner-agricultural-tower.lua +++ b/lignumis/prototypes/content/burner-agricultural-tower.lua @@ -84,7 +84,8 @@ data:extend({ { type = "recipe", name = "burner-agricultural-tower", - category = "wood-processing-or-assembling", + category = "crafting", + additional_categories = { "wood-processing" }, energy_required = 10, ingredients = { { type = "item", name = "stone-brick", amount = 5 }, @@ -116,7 +117,8 @@ data:extend({ { type = "recipe", name = "burner-agricultural-tower-copper", - category = "wood-processing-or-assembling", + category = "crafting", + additional_categories = { "wood-processing" }, localised_name = { "entity-name.burner-agricultural-tower" }, icons = { { icon = Lignumis.graphics .. "icons/burner-agricultural-tower.png" }, diff --git a/lignumis/prototypes/content/burner-assembling-machine.lua b/lignumis/prototypes/content/burner-assembling-machine.lua index 58cd14b..0c46bad 100644 --- a/lignumis/prototypes/content/burner-assembling-machine.lua +++ b/lignumis/prototypes/content/burner-assembling-machine.lua @@ -17,7 +17,6 @@ assembling_machine.crafting_categories = { "crafting", "electronics", "pressing", - "wood-processing-or-assembling", "organic-or-assembling", "electronics-or-assembling", "metallurgy-or-assembling" @@ -50,8 +49,6 @@ remnants.animation[2].filename = gfx .. "burner-assembling-machine-remnants.png" remnants.animation[3].filename = gfx .. "burner-assembling-machine-remnants.png" remnants.order = "0[burner-assembling-machine]" -local crafting_category = settings.startup["lignumis-lumber-mill-more-recipes"].value and "wood-processing-or-assembling" or "crafting" - data:extend({ assembling_machine, remnants, @@ -70,7 +67,8 @@ data:extend({ { type = "recipe", name = "burner-assembling-machine", - category = crafting_category, + category = "crafting", + additional_categories = settings.startup["lignumis-lumber-mill-more-recipes"].value and { "wood-processing" } or nil, enabled = false, ingredients = { { type = "item", name = "wooden-gear-wheel", amount = 5 }, diff --git a/lignumis/prototypes/content/burner-long-handed-inserter.lua b/lignumis/prototypes/content/burner-long-handed-inserter.lua index de8a785..b6dffcf 100644 --- a/lignumis/prototypes/content/burner-long-handed-inserter.lua +++ b/lignumis/prototypes/content/burner-long-handed-inserter.lua @@ -44,8 +44,6 @@ remnants.animation[3].filename = gfx .. "burner-long-handed-inserter-remnants.pn remnants.animation[4].filename = gfx .. "burner-long-handed-inserter-remnants.png" remnants.order = "a-c-0" -local crafting_category = settings.startup["lignumis-lumber-mill-more-recipes"].value and "wood-processing-or-assembling" or "crafting" - data:extend({ long_handed_inserter, remnants, @@ -65,7 +63,8 @@ data:extend({ { type = "recipe", name = "burner-long-handed-inserter", - category = crafting_category, + category = "crafting", + additional_categories = settings.startup["lignumis-lumber-mill-more-recipes"].value and { "wood-processing" } or nil, enabled = false, ingredients = { { type = "item", name = "wooden-gear-wheel", amount = 1 }, diff --git a/lignumis/prototypes/content/deep-miner.lua b/lignumis/prototypes/content/deep-miner.lua index 8f8db39..a52c40e 100644 --- a/lignumis/prototypes/content/deep-miner.lua +++ b/lignumis/prototypes/content/deep-miner.lua @@ -1,44 +1,171 @@ -local DeepMinerFactory = require(MF.buildings .. "CoreExtractor") -local DeepMiner = DeepMinerFactory("deep-miner") +local hit_effects = require("__base__.prototypes.entity.hit-effects") +local item_sounds = require("__base__.prototypes.item_sounds") +local sounds = require("__base__.prototypes.entity.sounds") +local Entity = require("__cf-lib__/data/Entity") -local entity = DeepMiner.EntityBuilder:new():build({ - resource_searching_radius = 0.49, - energy_usage = "25MW", - mining_speed = 7.5, - energy_source = { - emissions_per_minute = { noise = 2000 } +local gfx = Lignumis.graphics .. "entity/deep-miner/" +local techGfx = Lignumis.graphics .. "technology/" +local name = "deep-miner" + +local function animationLayer() + return { + priority = "high", + width = 704, + height = 704, + frame_count = 120, + lines_per_file = 8, + animation_speed = 0.15, + scale = 0.5, + stripes = { + { + filename = gfx .. "core-extractor-animation-1.png", + width_in_frames = 8, + height_in_frames = 8 + }, + { + filename = gfx .. "core-extractor-animation-2.png", + width_in_frames = 8, + height_in_frames = 7 + } + } + } +end + +data:extend({ + { + type = "mining-drill", + name = name, + icon = gfx .. "core-extractor-icon.png", + flags = { "placeable-neutral", "player-creation" }, + minable = { mining_time = 0.2, result = name }, + fast_replaceable_group = name, + max_health = 500, + corpse = "big-remnants", + dying_explosion = "medium-explosion", + collision_box = Entity.collisionBox(11, 11), + selection_box = Entity.selectionBox(11, 11), + damaged_trigger_effect = hit_effects.entity(), + drawing_box_vertical_extension = 1.3, + module_slots = 4, + icon_draw_specification = { scale = 2, shift = { 0, -0.3 } }, + icons_positioning = { + { inventory_index = defines.inventory.assembling_machine_modules, shift = { 0, 1.25 } } + }, + allowed_effects = { "consumption", "speed", "pollution", "quality", "productivity" }, + mining_speed = 7.5, + resource_categories = { "deep-mining" }, + drops_full_belt_stacks = true, + resource_searching_radius = 0.49, + vector_to_place_result = { 0, -5.85 }, + resource_drain_rate_percent = 75, + energy_source = { + type = "electric", + usage_priority = "secondary-input", + emissions_per_minute = { noise = 2000 } + }, + energy_usage = "25MW", + perceived_performance = { minimum = 0.25, performance_to_activity_rate = 2.0, maximum = 20 }, + graphics_set = { + animation = { + layers = { + { + filename = gfx .. "core-extractor-shadow.png", + priority = "high", + width = 1400, + height = 1400, + frame_count = 1, + line_length = 1, + repeat_count = 120, + animation_speed = 0.15, + draw_as_shadow = true, + scale = 0.5 + }, + animationLayer() + } + }, + working_visualisations = { + { + fadeout = true, + animation = { + layers = { + animationLayer(), + { + priority = "high", + draw_as_glow = true, + blend_mode = "additive", + width = 704, + height = 704, + frame_count = 120, + lines_per_file = 8, + animation_speed = 0.15, + scale = 0.5, + stripes = { + { + filename = gfx .. "core-extractor-emission-1.png", + width_in_frames = 8, + height_in_frames = 8 + }, + { + filename = gfx .. "core-extractor-emission-2.png", + width_in_frames = 8, + height_in_frames = 7 + } + } + } + } + } + } + } + }, + open_sound = sounds.drill_open, + close_sound = sounds.drill_close }, - resource_drain_rate_percent = 75 -}) -entity.resource_categories = { "deep-mining" } -data:extend({ entity }) - -DeepMiner.ItemBuilder:new() - :itemsPerRocket(1) - :apply({ + { + type = "item", + name = name, + icon = gfx .. "core-extractor-icon.png", subgroup = "extraction-machine", - order = "a[items]-d[deep-miner]" - }) - -DeepMiner.RecipeBuilder:new() - :ingredients({ - { type = "item", name = "processing-unit", amount = 100 }, - { type = "item", name = "electric-engine-unit", amount = 100 }, - { type = "item", name = "steel-plate", amount = 200 }, - { type = "item", name = "concrete", amount = 50 } - }) - :apply({ - category = "metallurgy-or-assembling" - }) - -DeepMiner.TechnologyBuilder:new() - :prerequisites({ "space-science-pack" }) - :count(500) - :ingredients({ - { "automation-science-pack", 1 }, - { "logistic-science-pack", 1 }, - { "chemical-science-pack", 1 }, - { "space-science-pack", 1 } - }) - :time(60) - :apply() + order = "a[items]-d[deep-miner]", + inventory_move_sound = item_sounds.mechanical_large_inventory_move, + pick_sound = item_sounds.mechanical_large_inventory_pickup, + drop_sound = item_sounds.mechanical_large_inventory_move, + place_result = name, + stack_size = 20, + default_import_location = "nauvis", + weight = 1000 * kg + }, + { + type = "recipe", + name = name, + category = "metallurgy-or-assembling", + enabled = false, + ingredients = { + { type = "item", name = "processing-unit", amount = 100 }, + { type = "item", name = "electric-engine-unit", amount = 100 }, + { type = "item", name = "steel-plate", amount = 200 }, + { type = "item", name = "concrete", amount = 50 } + }, + energy_required = 60, + results = { { type = "item", name = name, amount = 1 } } + }, + { + type = "technology", + name = name, + icon = techGfx .. "core-extractor.png", + icon_size = 256, + effects = { + { type = "unlock-recipe", recipe = name } + }, + prerequisites = { "space-science-pack" }, + unit = { + count = 500, + ingredients = { + { "automation-science-pack", 1 }, + { "logistic-science-pack", 1 }, + { "chemical-science-pack", 1 }, + { "space-science-pack", 1 } + }, + time = 60 + } + } +}) \ No newline at end of file diff --git a/lignumis/prototypes/content/lumber-mill.lua b/lignumis/prototypes/content/lumber-mill.lua index 0bb904c..ac57acb 100644 --- a/lignumis/prototypes/content/lumber-mill.lua +++ b/lignumis/prototypes/content/lumber-mill.lua @@ -1,3 +1,4 @@ +local Recipe = require("__cf-lib__/data/Recipe") local Technology = require("__cf-lib__/data/Technology") local LumberMillFactory = require(MF.buildings .. "LumberMill") local LumberMill = LumberMillFactory() @@ -7,76 +8,143 @@ local basic_circuit_board = settings.startup["lignumis-basic-circuit-board"].val data:extend({ { type = "recipe-category", - name = "wood-processing-or-assembling" + name = "wood-processing" } }) -table.insert(data.raw["character"]["character"].crafting_categories, "wood-processing-or-assembling") - local has_oxygen = data.raw["surface-property"]["oxygen"] ~= nil -LumberMill.EntityBuilder:new() - :burnerEnergySource({ emissions_per_minute = { noise = 100 } }) - :baseProductivity(0.5) - :apply({ - crafting_categories = { "wood-processing-or-assembling" }, +if not mods["wood-logistics"] then + 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 = has_oxygen and "oxygen" or "pressure", + min = 3 }, { - property = "gravity", - min = 1 + 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({ - { type = "item", name = "stone-brick", amount = 40 }, - { type = "item", name = "lumber", amount = 50 }, + 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 }, - { type = "item", name = "gold-plate", amount = basic_circuit_board and 20 or 40 }, + { type = "item", name = "gold-plate", amount = basic_circuit_board and 20 or 40 }, basic_circuit_board and { type = "item", name = "basic-circuit-board", amount = 20 } or nil, { type = "item", name = "burner-assembling-machine", amount = 2 } })) - :apply({ - category = "wood-processing-or-assembling" + :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() + LumberMill.TechnologyBuilder:new() + :prerequisites({ "steam-science-pack" }) + :count(250) + :time(15) + :ingredients({ { "wood-science-pack", 1 }, { "steam-science-pack", 1 } }) + :apply() -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 }, - { type = "item", name = "copper-plate", amount = basic_circuit_board and 20 or 40 }, + 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 }, + { type = "item", name = "copper-plate", amount = basic_circuit_board and 20 or 40 }, { 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", localised_name = { "entity-name.lumber-mill" }, - category = "wood-processing-or-assembling", + additional_categories = { "wood-processing" }, icons = { { icon = lumber_mill_item.icon }, { icon = basic_circuit_board and "__base__/graphics/icons/copper-plate.png" or "__base__/graphics/icons/electronic-circuit.png", scale = 0.25, shift = { 8, 8 } } } }) -Technology:new(basic_circuit_board and "copper-processing" or "electronics"):addRecipe("lumber-mill-copper") + Technology:new(basic_circuit_board and "copper-processing" or "electronics"):addRecipe("lumber-mill-copper") +else + table.assign(data.raw["assembling-machine"]["lumber-mill"], { + energy_source = { + type = "burner", + fuel_categories = { "chemical" }, + effectivity = 1, + fuel_inventory_size = 3, + emissions_per_minute = { pollution = 10, noise = 100 }, + }, + crafting_categories = { "wood-processing" }, + energy_usage = "1000kW", + module_slots = 4, + max_health = 500, + surface_conditions = { + { + property = has_oxygen and "oxygen" or "pressure", + min = 3 + }, + { + property = "gravity", + min = 1 + } + } + }) + + data.raw.item["lumber-mill"].default_import_location = "lignumis" + + table.assign(data.raw.recipe["lumber-mill"], { + additional_categories = { "wood-processing" }, + ingredients = table.trim({ + { type = "item", name = "stone-brick", amount = 40 }, + { type = "item", name = "lumber", amount = 50 }, + { type = "item", name = "wooden-gear-wheel", amount = 50 }, + { type = "item", name = "gold-plate", amount = basic_circuit_board and 20 or 40 }, + basic_circuit_board and { type = "item", name = "basic-circuit-board", amount = 20 } or nil, + { type = "item", name = "burner-assembling-machine", amount = 2 } + }) + }) + + 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 } + } + } + }) + + Recipe:new("lumber-mill") + :clone("lumber-mill-copper") + :assign({ + localised_name = { "entity-name.lumber-mill" }, + icons = { + { icon = data.raw.item["lumber-mill"].icon }, + { icon = basic_circuit_board and "__base__/graphics/icons/copper-plate.png" or "__base__/graphics/icons/electronic-circuit.png", scale = 0.25, shift = { 8, 8 } } + } + }) + :replaceIngredient("gold-plate", "copper-plate") + :apply() + + Technology:new(basic_circuit_board and "copper-processing" or "electronics"):addRecipe("lumber-mill-copper") +end + +Recipe:new("wooden-chest"):addCategory("wood-processing") +Recipe:new("small-electric-pole"):addCategory("wood-processing") \ No newline at end of file diff --git a/lignumis/prototypes/content/lumber.lua b/lignumis/prototypes/content/lumber.lua index 8cb9b14..f3a46f1 100644 --- a/lignumis/prototypes/content/lumber.lua +++ b/lignumis/prototypes/content/lumber.lua @@ -1,33 +1,39 @@ local item_sounds = require("__base__.prototypes.item_sounds") +local Recipe = require("__cf-lib__/data/Recipe") -data:extend({ - { - type = "item", - name = "lumber", - icon = Lignumis.graphics .. "icons/lumber.png", - pictures = { - { filename = Lignumis.graphics .. "icons/lumber.png", size = 64, scale = 0.5 }, - { filename = Lignumis.graphics .. "icons/lumber-1.png", size = 64, scale = 0.5 }, - { filename = Lignumis.graphics .. "icons/lumber-2.png", size = 64, scale = 0.5 }, +if not mods["wood-logistics"] then + data:extend({ + { + type = "item", + name = "lumber", + icon = Lignumis.graphics .. "icons/lumber.png", + pictures = { + { filename = Lignumis.graphics .. "icons/lumber.png", size = 64, scale = 0.5 }, + { filename = Lignumis.graphics .. "icons/lumber-1.png", size = 64, scale = 0.5 }, + { filename = Lignumis.graphics .. "icons/lumber-2.png", size = 64, scale = 0.5 }, + }, + subgroup = "intermediate-product", + order = "A[basic-intermediates]-c[lumber]", + inventory_move_sound = item_sounds.wood_inventory_move, + pick_sound = item_sounds.wood_inventory_pickup, + drop_sound = item_sounds.wood_inventory_move, + stack_size = 100, + random_tint_color = { 1.0, 0.95, 0.9, 1.0 }, + fuel_category = "wood", + fuel_value = "4MJ" }, - subgroup = "intermediate-product", - order = "A[basic-intermediates]-c[lumber]", - inventory_move_sound = item_sounds.wood_inventory_move, - pick_sound = item_sounds.wood_inventory_pickup, - drop_sound = item_sounds.wood_inventory_move, - stack_size = 100, - random_tint_color = { 1.0, 0.95, 0.9, 1.0 }, - fuel_category = "wood", - fuel_value = "4MJ" - }, - { - type = "recipe", - name = "lumber", - category = "wood-processing-or-assembling", - allow_productivity = true, - allow_as_intermediate = true, - ingredients = { { type = "item", name = "wood", amount = 2 } }, - results = { { type = "item", name = "lumber", amount = 1 } }, - energy_required = 1 - } -}) + { + type = "recipe", + name = "lumber", + category = "crafting", + additional_categories = { "wood-processing" }, + allow_productivity = true, + allow_as_intermediate = true, + ingredients = { { type = "item", name = "wood", amount = 2 } }, + results = { { type = "item", name = "lumber", amount = 1 } }, + energy_required = 1 + } + }) +else + Recipe:new("lumber"):addCategory("wood-processing") +end \ No newline at end of file diff --git a/lignumis/prototypes/content/noise.lua b/lignumis/prototypes/content/noise.lua index 4474df5..0505138 100644 --- a/lignumis/prototypes/content/noise.lua +++ b/lignumis/prototypes/content/noise.lua @@ -100,17 +100,17 @@ emit("lab", "biolab", 20) emit("locomotive", "locomotive", 200) emit_constant("locomotive", "locomotive", 10) ---emit_constant("transport-belt", "wood-transport-belt", 2) +emit_constant("transport-belt", "wood-transport-belt", 2) emit_constant("transport-belt", "transport-belt", 3) emit_constant("transport-belt", "fast-transport-belt", 4) emit_constant("transport-belt", "express-transport-belt", 6) emit_constant("transport-belt", "turbo-transport-belt", 8) ---emit_constant("underground-belt", "wood-underground-belt", 7.5) +emit_constant("underground-belt", "wood-underground-belt", 7.5) emit_constant("underground-belt", "underground-belt", 10) emit_constant("underground-belt", "fast-underground-belt", 20) emit_constant("underground-belt", "express-underground-belt", 30) emit_constant("underground-belt", "turbo-underground-belt", 40) ---emit_constant("splitter", "wood-splitter", 20) +emit_constant("splitter", "wood-splitter", 20) emit_constant("splitter", "splitter", 30) emit_constant("splitter", "fast-splitter", 40) emit_constant("splitter", "express-splitter", 50) diff --git a/lignumis/prototypes/content/quality-assembler.lua b/lignumis/prototypes/content/quality-assembler.lua index 0b94e6b..be95a71 100644 --- a/lignumis/prototypes/content/quality-assembler.lua +++ b/lignumis/prototypes/content/quality-assembler.lua @@ -77,7 +77,8 @@ QualityAssembler.EntityBuilder:new() crafting_speed = 4, module_slots = 6, allowed_effects = { "consumption", "pollution", "quality" }, - effect_receiver = { base_effect = { quality = 3.5 } } + effect_receiver = { base_effect = { quality = 3.5 } }, + crafting_categories = { "quality-assembling" } }) QualityAssembler.ItemBuilder:new():apply() @@ -91,7 +92,8 @@ QualityAssembler.RecipeBuilder:new() { type = "item", name = "quantum-processor", amount = 10 } }) :apply({ - category = "electromagnetics-or-quality-assembling", + category = "electromagnetics", + additional_categories = { "quality-assembling" } }) QualityAssembler.TechnologyBuilder:new() @@ -147,71 +149,49 @@ data:extend({ }, research_trigger = { type = "craft-item", item = "gold-quality-catalyst", count = 10000 }, prerequisites = { "experienced-quality-assembling-1" } + }, + { + type = "recipe-category", + name = "quality-assembling" } }) -local function convert_category(name) - local quality_name = name .. "-or-quality-assembling" - data:extend({ - { - type = "recipe-category", - name = quality_name - } - }) - - for _, assembler in pairs(data.raw["assembling-machine"]) do - if assembler.crafting_categories and table.contains(assembler.crafting_categories, name) then - table.insert(assembler.crafting_categories, quality_name) - end - end - for _, character in pairs(data.raw["character"]) do - if character.crafting_categories and table.contains(character.crafting_categories, name) then - table.insert(character.crafting_categories, quality_name) - end - end - table.insert(data.raw["assembling-machine"]["quality-assembler"].crafting_categories, quality_name) +local function qa(recipeName) + local recipe = data.raw.recipe[recipeName] + recipe.additional_categories = recipe.additional_categories or {} + table.insert(recipe.additional_categories, "quality-assembling") end -convert_category("wood-processing-or-assembling") -convert_category("metallurgy-or-assembling") -convert_category("metallurgy") -convert_category("electronics") -convert_category("electronics-or-assembling") -convert_category("electromagnetics") -convert_category("organic-or-assembling") -convert_category("crafting") -convert_category("cryogenics-or-assembling") - -- Lignumis -data.raw.recipe["lumber-mill"].category = "wood-processing-or-assembling-or-quality-assembling" +qa("lumber-mill") -- Nauvis -data.raw.recipe["logistic-robot"].category = "crafting-or-quality-assembling" -data.raw.recipe["construction-robot"].category = "crafting-or-quality-assembling" -data.raw.recipe["roboport"].category = "crafting-or-quality-assembling" -data.raw.recipe["speed-module-3"].category = "electronics-or-quality-assembling" -data.raw.recipe["productivity-module-3"].category = "electronics-or-quality-assembling" -data.raw.recipe["efficiency-module-3"].category = "electronics-or-quality-assembling" -data.raw.recipe["rocket-silo"].category = "crafting-or-quality-assembling" -data.raw.recipe["cargo-bay"].category = "crafting-or-quality-assembling" -data.raw.recipe["asteroid-collector"].category = "crafting-or-quality-assembling" -data.raw.recipe["thruster"].category = "crafting-or-quality-assembling" +qa("logistic-robot") +qa("construction-robot") +qa("roboport") +qa("speed-module-3") +qa("productivity-module-3") +qa("efficiency-module-3") +qa("rocket-silo") +qa("cargo-bay") +qa("asteroid-collector") +qa("thruster") -- Vulcanus -data.raw.recipe["foundry"].category = "metallurgy-or-assembling-or-quality-assembling" -data.raw.recipe["big-mining-drill"].category = "metallurgy-or-quality-assembling" +qa("foundry") +qa("big-mining-drill") -- Fulgora -data.raw.recipe["electromagnetic-plant"].category = "electronics-or-assembling-or-quality-assembling" -data.raw.recipe["lightning-collector"].category = "electromagnetics-or-quality-assembling" -data.raw.recipe["mech-armor"].category = "crafting-or-quality-assembling" -data.raw.recipe["quality-module-3"].category = "electronics-or-quality-assembling" -data.raw.recipe["recycler"].category = "crafting-or-quality-assembling" +qa("electromagnetic-plant") +qa("lightning-collector") +qa("mech-armor") +qa("quality-module-3") +qa("recycler") -- Gleba -data.raw.recipe["biochamber"].category = "organic-or-assembling-or-quality-assembling" -data.raw.recipe["stack-inserter"].category = "crafting-or-quality-assembling" -data.raw.recipe["spidertron"].category = "crafting-or-quality-assembling" +qa("biochamber") +qa("stack-inserter") +qa("spidertron") -- Aquilo -data.raw.recipe["cryogenic-plant"].category = "cryogenics-or-assembling-or-quality-assembling" \ No newline at end of file +qa("cryogenic-plant") \ No newline at end of file diff --git a/lignumis/prototypes/content/steam-assembling-machine.lua b/lignumis/prototypes/content/steam-assembling-machine.lua index da5ef2d..687ed02 100644 --- a/lignumis/prototypes/content/steam-assembling-machine.lua +++ b/lignumis/prototypes/content/steam-assembling-machine.lua @@ -20,7 +20,6 @@ assembling_machine.crafting_categories = { "crafting", "electronics", "pressing", - "wood-processing-or-assembling", "organic-or-assembling", "electronics-or-assembling", "metallurgy-or-assembling", diff --git a/lignumis/prototypes/content/wood-lab.lua b/lignumis/prototypes/content/wood-lab.lua index 7db5aec..2010910 100644 --- a/lignumis/prototypes/content/wood-lab.lua +++ b/lignumis/prototypes/content/wood-lab.lua @@ -144,7 +144,8 @@ data:extend({ { type = "recipe", name = "wood-lab", - category = "wood-processing-or-assembling", + category = "crafting", + additional_categories = { "wood-processing" }, energy_required = 2, ingredients = { { type = "item", name = "lumber", amount = 6 }, diff --git a/lignumis/prototypes/content/wood-logistics.lua b/lignumis/prototypes/content/wood-logistics.lua index 78cb353..a2eef43 100644 --- a/lignumis/prototypes/content/wood-logistics.lua +++ b/lignumis/prototypes/content/wood-logistics.lua @@ -1,104 +1,151 @@ local BeltFactory = require(MF.logistics .. "Belts") local Belt = BeltFactory("wood", "brown", "slow") +local Recipe = require("__cf-lib__/data/Recipe") +local Item = require("__cf-lib__/data/Item") local basic_circuit_board = settings.startup["lignumis-basic-circuit-board"].value -Belt.EntityBuilder:new() - :itemsPerSecond(7.5) - :nextTier("") - :undergroundDistance(4) - :animationSpeedMultiplier(1.01) - :apply({ - transportBelt = { - emissions_per_second = { noise = 2 / 60 } - }, - undergroundBelt = { - emissions_per_second = { noise = 7.5 / 60 }, - factoriopedia_simulation = { - init = - [[ - game.simulation.camera_position = {0, 0.5} - game.simulation.camera_zoom = 1.8 - game.surfaces[1].create_entities_from_blueprint_string - { - string = "0eNqVUNsKgzAM/Zc81+FEBfsrYwwvQQKaltpuivjvS3Wwh8HGnkKSc0tWaIaA1hF70CtMXNvEm6R31MV+Bl0oWECfNwXUGp5AXwRGPddDBHA9Imh4GNMlgTt0vTNSkwYHD5EjsznSrwqQPXnCQ2JvlhuHsUEnAPVdSoE1k7ANv2KlpyOYVLHpyGF7bHMFfrFRidiGGOLDLPvXLP9tZoLf3eRO8jjK5P1YBXd0004oyqzKq6ooqzLNinLbnvlmf6E=", - position = {-0.5, 0} +if not mods["wood-logistics"] then + Belt.EntityBuilder:new() + :itemsPerSecond(7.5) + :nextTier("") + :undergroundDistance(4) + :animationSpeedMultiplier(1.01) + :apply({ + transportBelt = { + emissions_per_second = { noise = 2 / 60 } + }, + undergroundBelt = { + emissions_per_second = { noise = 7.5 / 60 }, + factoriopedia_simulation = { + init = + [[ + game.simulation.camera_position = {0, 0.5} + game.simulation.camera_zoom = 1.8 + game.surfaces[1].create_entities_from_blueprint_string + { + string = "0eNqVUNsKgzAM/Zc81+FEBfsrYwwvQQKaltpuivjvS3Wwh8HGnkKSc0tWaIaA1hF70CtMXNvEm6R31MV+Bl0oWECfNwXUGp5AXwRGPddDBHA9Imh4GNMlgTt0vTNSkwYHD5EjsznSrwqQPXnCQ2JvlhuHsUEnAPVdSoE1k7ANv2KlpyOYVLHpyGF7bHMFfrFRidiGGOLDLPvXLP9tZoLf3eRO8jjK5P1YBXd0004oyqzKq6ooqzLNinLbnvlmf6E=", + position = {-0.5, 0} + } + ]] } - ]] + }, + splitter = { + emissions_per_second = { noise = 20 / 60 } } - }, - splitter = { - emissions_per_second = { noise = 20 / 60 } - } - }) + }) -local splitter_item = Belt.ItemBuilder:new() - :itemsPerRocket("transportBelt", 200) - :itemsPerRocket("undergroundBelt", 100) - :itemsPerRocket("splitter", 100) - :order("0") - :apply() - .splitter + local splitter_item = Belt.ItemBuilder:new() + :itemsPerRocket("transportBelt", 200) + :itemsPerRocket("undergroundBelt", 100) + :itemsPerRocket("splitter", 100) + :order("0") + :apply() + .splitter -Belt.RecipeBuilder:new() - :beltAmount(2) - :ingredients("transportBelt", { - { type = "item", name = "lumber", amount = 1 }, - { type = "item", name = "wooden-gear-wheel", amount = 1 } - }) - :ingredients("undergroundBelt", { - { type = "item", name = "lumber", amount = 1 }, - { type = "item", name = "wood-transport-belt", amount = 4 }, - }) - :ingredients("splitter", { - { type = "item", name = "wood-transport-belt", amount = 2 }, - { type = "item", name = "lumber", amount = 2 }, - basic_circuit_board and { type = "item", name = "basic-circuit-board", amount = 5 } or - { type = "item", name = "gold-cable", amount = 10 } - }) - :apply({ - transportBelt = { - category = "wood-processing-or-assembling" - }, - undergroundBelt = { - category = "wood-processing-or-assembling" - }, - splitter = { - category = "wood-processing-or-assembling" - } - }) + Belt.RecipeBuilder:new() + :beltAmount(2) + :ingredients("transportBelt", { + { type = "item", name = "lumber", amount = 1 }, + { type = "item", name = "wooden-gear-wheel", amount = 1 } + }) + :ingredients("undergroundBelt", { + { type = "item", name = "lumber", amount = 1 }, + { type = "item", name = "wood-transport-belt", amount = 4 }, + }) + :ingredients("splitter", { + { type = "item", name = "wood-transport-belt", amount = 2 }, + { type = "item", name = "lumber", amount = 2 }, + basic_circuit_board and { type = "item", name = "basic-circuit-board", amount = 5 } or + { type = "item", name = "gold-cable", amount = 10 } + }) + :apply({ + transportBelt = { + additional_categories = { "wood-processing" } + }, + undergroundBelt = { + additional_categories = { "wood-processing" } + }, + splitter = { + additional_categories = { "wood-processing" } + } + }) -Belt.TechnologyBuilder:new() - :prerequisites({ "wood-science-pack" }) - :ingredients({ { "wood-science-pack", 1 } }) - :count(10) - :time(10) - :apply() + Belt.TechnologyBuilder:new() + :prerequisites({ "wood-science-pack" }) + :ingredients({ { "wood-science-pack", 1 } }) + :count(10) + :time(10) + :apply() -if not basic_circuit_board then - data:extend({ - Belt.RecipeBuilder:new() - :ingredients("splitter", { - { type = "item", name = "wood-transport-belt", amount = 2 }, - { type = "item", name = "lumber", amount = 2 }, - { type = "item", name = "electronic-circuit", amount = 2 } - }) - :build({ - splitter = { - name = "wood-splitter-electronic-circuit", - localised_name = { "entity-name.wood-splitter" }, - icons = { - { icon = splitter_item.icon }, - { icon = "__base__/graphics/icons/electronic-circuit.png", scale = 0.25, shift = { 8, 8 } } - }, - category = "wood-processing-or-assembling" + if not basic_circuit_board then + data:extend({ + Belt.RecipeBuilder:new() + :ingredients("splitter", { + { type = "item", name = "wood-transport-belt", amount = 2 }, + { type = "item", name = "lumber", amount = 2 }, + { type = "item", name = "electronic-circuit", amount = 2 } + }) + :build({ + splitter = { + name = "wood-splitter-electronic-circuit", + localised_name = { "entity-name.wood-splitter" }, + icons = { + { icon = splitter_item.icon }, + { icon = "__base__/graphics/icons/electronic-circuit.png", scale = 0.25, shift = { 8, 8 } } + }, + additional_categories = { "wood-processing" } + } + }) + .splitter + }) + + table.insert(data.raw.technology["electronics"].effects, { + type = "unlock-recipe", + recipe = "wood-splitter-electronic-circuit" + }) + end + +else + Recipe:new("wood-transport-belt") + :replaceIngredient("copper-cable", "wooden-gear-wheel", 1) + :assign({ + additional_categories = { "wood-processing" } + }) + + Recipe:new("wood-underground-belt") + :assign({ + additional_categories = { "wood-processing" } + }) + + Recipe:new("wood-splitter") + :replaceIngredient("copper-cable", basic_circuit_board and "basic-circuit-board" or "gold-cable", basic_circuit_board and 5 or nil) + :assign({ + additional_categories = { "wood-processing" } + }) + + if not basic_circuit_board then + Recipe:new("wood-splitter") + :clone("wood-splitter-electronic-circuit") + :replaceIngredient(basic_circuit_board and "gold-cable" or "basic-circuit-board", "electronic-circuit", 2) + :assign({ + localised_name = { "entity-name.wood-splitter" }, + icons = { + { icon = data.raw.item["wood-splitter"].icon }, + { icon = "__base__/graphics/icons/electronic-circuit.png", scale = 0.25, shift = { 8, 8 } } } }) - .splitter - }) + :unlockedByTechnology("electronics") + :apply() + end - table.insert(data.raw.technology["electronics"].effects, { - type = "unlock-recipe", - recipe = "wood-splitter-electronic-circuit" - }) -end + Item:new("wood-transport-belt") + :itemsPerRocket(200) + :defaultImportLocation("lignumis") + Item:new("wood-underground-belt") + :itemsPerRocket(100) + :defaultImportLocation("lignumis") + Item:new("wood-splitter") + :itemsPerRocket(100) + :defaultImportLocation("lignumis") +end \ No newline at end of file diff --git a/lignumis/prototypes/content/wood-military.lua b/lignumis/prototypes/content/wood-military.lua index 1dd775f..6c3e312 100644 --- a/lignumis/prototypes/content/wood-military.lua +++ b/lignumis/prototypes/content/wood-military.lua @@ -82,7 +82,8 @@ data:extend({ { type = "recipe", name = "wood-darts-magazine", - category = "wood-processing-or-assembling", + category = "crafting", + additional_categories = { "wood-processing" }, energy_required = 1, ingredients = { { type = "item", name = "wood", amount = 2 } }, results = { { type = "item", name = "wood-darts-magazine", amount = 1 } } diff --git a/lignumis/prototypes/content/wooden-gearwheel.lua b/lignumis/prototypes/content/wooden-gearwheel.lua index 229b175..0d57a98 100644 --- a/lignumis/prototypes/content/wooden-gearwheel.lua +++ b/lignumis/prototypes/content/wooden-gearwheel.lua @@ -17,7 +17,8 @@ data:extend({ { type = "recipe", name = "wooden-gear-wheel", - category = "wood-processing-or-assembling", + category = "crafting", + additional_categories = { "wood-processing" }, ingredients = { { type = "item", name = "lumber", amount = 1 } }, results = { { type = "item", name = "wooden-gear-wheel", amount = 2 } }, allow_productivity = true diff --git a/lignumis/prototypes/integrations/Wood-Walls.lua b/lignumis/prototypes/integrations/Wood-Walls.lua index d1f11d5..884dfdd 100644 --- a/lignumis/prototypes/integrations/Wood-Walls.lua +++ b/lignumis/prototypes/integrations/Wood-Walls.lua @@ -1,4 +1,4 @@ local recipe = data.raw.recipe["wooden-wall"] recipe.ingredients = { { type = "item", name = "lumber", amount = 4 } } recipe.results = { { type = "item", name = "wooden-wall", amount = 1 } } -recipe.category = "wood-processing-or-assembling" \ No newline at end of file +recipe.additional_categories = { "wood-processing" } \ No newline at end of file diff --git a/lignumis/prototypes/integrations/vanilla.lua b/lignumis/prototypes/integrations/vanilla.lua index dd7af70..61b17a5 100644 --- a/lignumis/prototypes/integrations/vanilla.lua +++ b/lignumis/prototypes/integrations/vanilla.lua @@ -21,7 +21,8 @@ local drill_item = data.raw["item"]["burner-mining-drill"] drill_item.icon = Lignumis.graphics .. "icons/burner-mining-drill.png" local drill_recipe = data.raw["recipe"]["burner-mining-drill"] -drill_recipe.category = "wood-processing-or-assembling" +drill_recipe.category = "crafting" +drill_recipe.additional_categories = { "wood-processing" } drill_recipe.ingredients = { { type = "item", name = "stone-furnace", amount = 1 }, { type = "item", name = "wooden-gear-wheel", amount = basic_circuit_board and 2 or 3 }, @@ -48,7 +49,7 @@ burner_inserter_recipe.ingredients = { { type = "item", name = "lumber", amount = 1 } } if settings.startup["lignumis-lumber-mill-more-recipes"].value then - burner_inserter_recipe.category = "wood-processing-or-assembling" + burner_inserter_recipe.additional_categories = { "wood-processing" } end @@ -110,7 +111,7 @@ for _, tree in pairs(data.raw.tree) do if not isRegularTree then goto continue end tree.minable.result = nil tree.minable.count = nil - local woodResult = { type = "item", name = "wood", amount = nil, amount_min = 2, amount_max = 10 } + local woodResult = { type = "item", name = "wood", amount = nil, amount_min = 2, amount_max = 8 } if minable.results and #woodResults > 0 then table.assign(woodResults[1], woodResult) woodResults[1].amount = nil @@ -127,14 +128,7 @@ tree_plant.minable.count = nil tree_plant.surface_conditions[1].min = 900 table.insert(tree_plant.autoplace.tile_restriction, "natural-gold-soil") -if mods["Diversitree"] then - data.raw.plant["s6xdvt-fake-tree"].surface_conditions[1].min = 900 -end - -table.insert(data.raw["assembling-machine"]["assembling-machine-1"].crafting_categories, "wood-processing-or-assembling") table.insert(data.raw["assembling-machine"]["assembling-machine-1"].crafting_categories, "organic-or-assembling") -table.insert(data.raw["assembling-machine"]["assembling-machine-2"].crafting_categories, "wood-processing-or-assembling") -table.insert(data.raw["assembling-machine"]["assembling-machine-3"].crafting_categories, "wood-processing-or-assembling") -- Disable vanilla early game recipes @@ -335,36 +329,4 @@ if settings.startup["lignumis-fulgora-wood"].value then if recycler.result_inventory_size < recycling_result_count then recycler.result_inventory_size = recycling_result_count end -end - - --- Fix item weights - -local function set_default_weight(item, items_per_rocket, type) - data.raw[type or "item"][item].weight = data.raw[type or "item"][item].weight or 1000 * kg / items_per_rocket -end -set_default_weight("electronic-circuit", 2000) -set_default_weight("advanced-circuit", 1000) -set_default_weight("processing-unit", 300) -set_default_weight("low-density-structure", 200) -set_default_weight("rocket-fuel", 100) -set_default_weight("inserter", 50) -set_default_weight("fast-inserter", 50) -set_default_weight("electric-mining-drill", 50) -set_default_weight("pumpjack", 20) -set_default_weight("repair-pack", 100, "repair-tool") -set_default_weight("big-electric-pole", 50) -set_default_weight("assembling-machine-1", 50) -set_default_weight("assembling-machine-2", 50) -set_default_weight("oil-refinery", 10) -set_default_weight("accumulator", 50) -set_default_weight("steam-engine", 10) -set_default_weight("substation", 50) -set_default_weight("radar", 50) -set_default_weight("storage-tank", 50) -set_default_weight("fast-transport-belt", 100) -set_default_weight("fast-underground-belt", 50) -set_default_weight("fast-splitter", 50) -set_default_weight("steel-plate", 400) -set_default_weight("steam-turbine", 10) -set_default_weight("battery", 400) \ No newline at end of file +end \ No newline at end of file diff --git a/lignumis/settings/updates.lua b/lignumis/settings/updates.lua index aedfdff..37ac7b9 100644 --- a/lignumis/settings/updates.lua +++ b/lignumis/settings/updates.lua @@ -1 +1,2 @@ +require("wood-logistics") require("wood-military") \ No newline at end of file diff --git a/lignumis/settings/wood-logistics.lua b/lignumis/settings/wood-logistics.lua new file mode 100644 index 0000000..a4627a8 --- /dev/null +++ b/lignumis/settings/wood-logistics.lua @@ -0,0 +1,20 @@ +if not mods["wood-logistics"] then + return +end + +local Settings = require("__cf-lib__/settings/Settings") +local force = Settings.force +local default = Settings.default + +force("wood-logistics-lumber", true) +force("wood-logistics-lumber-mill", true) +force("wood-logistics-woodtronics", false) +force("wood-logistics-belts", true) +force("wood-logistics-belts-modify", false) +default("wood-logistics-belts-circuits", true) +force("wood-logistics-inserter", false) +default("wood-logistics-rail-cost", 0) +default("wood-logistics-cargo-wagon", false) +force("wood-logistics-assembling-machine", false) +default("wood-logistics-nerf-small-electric-pole", false) +force("wood-logistics-repair-pack-cost", 0) \ No newline at end of file diff --git a/lignumis/settings/wood-military.lua b/lignumis/settings/wood-military.lua index 75ee975..01765eb 100644 --- a/lignumis/settings/wood-military.lua +++ b/lignumis/settings/wood-military.lua @@ -2,10 +2,12 @@ if not mods["wood-military"] then return end -data.raw["bool-setting"]["wood-military-rockets"].default_value = false -data.raw["bool-setting"]["wood-military-artillery"].default_value = false -data.raw["bool-setting"]["wood-military-damage-buff"].default_value = false -data.raw["bool-setting"]["wood-military-armor"].hidden = true -data.raw["bool-setting"]["wood-military-armor"].forced_value = true -data.raw["bool-setting"]["wood-military-nerf-start"].hidden = true -data.raw["bool-setting"]["wood-military-nerf-start"].forced_value = true \ No newline at end of file +local Settings = require("__cf-lib__/settings/Settings") +local force = Settings.force +local default = Settings.default + +default("wood-military-rockets", false) +default("wood-military-artillery", false) +default("wood-military-damage-buff", false) +force("wood-military-armor", true) +force("wood-military-nerf-start", true) \ No newline at end of file