diff --git a/README.md b/README.md index 1166cc6..79d9318 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,37 @@ +[![Discord](https://img.shields.io/badge/Discord-%235865F2.svg?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/ufvFUJtVwk)[![Forgejo](https://img.shields.io/badge/source%20code-%23f4f4f5?style=for-the-badge&logo=forgejo&logoColor=%23c2410c)](https://git.cacklingfiend.info/cacklingfiend/lignumis) +_________________ +![Lignumis poster](https://git.cacklingfiend.info/cacklingfiend/lignumis-assets/raw/commit/27e61170a897dc4a6afc7d518629899a3b05b6f0/sources/poster.jpg) + +## Lignumis + This mod extends the early game of Space Age by putting you on the moon "Lignumis" before you escape to Nauvis. It concentrates on wood and steam technologies, giving you some early game production chains for those resources. -The duration of the stay on Lignumis will be rather short. The impact of the later game will still be substantial (once implemented). +The duration of the stay on Lignumis will be rather short. The impact of the later game will still be substantial. **Warning when adding to existing games:** With the default settings, this mod will break a few things in your existing bases and space ships. Check out the settings to disable what you don't like. +#### Streamers featuring Lignumis + +[![S1-E01 - Lumber Support - Laurence Plays Factorio: Planetary Pioneers](https://i.ytimg.com/vi/1eH4oJtlBpE/hqdefault.jpg?sqp=-oaymwEcCPYBEIoBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLD6UdmD7HuhCdhQBCCSL38Ke_FpXg)](https://www.youtube.com/watch?v=1eH4oJtlBpE) [![S1-E01 - Lumber Support - Laurence Plays Factorio: Planetary Pioneers](https://i.ytimg.com/vi/TNR1-Z5XFxI/hqdefault.jpg?sqp=-oaymwEcCPYBEIoBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLAvatJCSqylrWAZQyTkcBW_lB82rA)](https://www.youtube.com/watch?v=TNR1-Z5XFxI) +[![Factorio Multiplayer: Planetary Pioneers - Space Age - E01 - 02/06/25 - Laurence Streams](https://i.ytimg.com/vi/OMDpDhZdTmU/hqdefault.jpg?sqp=-oaymwEbCKgBEF5IVfKriqkDDggBFQAAiEIYAXABwAEG&rs=AOn4CLCVQhrlcmwsZbzRDNQo8vgMKtUHaA)](https://www.youtube.com/live/OMDpDhZdTmU?feature=shared&t=290&list=PLALTzJaRcgW97ItZgtZvkqFBcdVjKNVHz&index=2) [![Factorio Multiplayer: Planetary Pioneers - Space Age - E01.5 - 02/06/25 - Laurence Streams](https://i.ytimg.com/vi/d4n1H6Z4KPc/hqdefault.jpg?sqp=-oaymwEbCKgBEF5IVfKriqkDDggBFQAAiEIYAXABwAEG&rs=AOn4CLA5TNZBTs7GpUFdVB1CG1-hzYw0tw)](https://www.youtube.com/live/d4n1H6Z4KPc?list=PLALTzJaRcgW97ItZgtZvkqFBcdVjKNVHz&index=3) [![Factorio Multiplayer: Planetary Pioneers - Space Age - E02 - 09/06/25 - Laurence Streams](https://i.ytimg.com/vi/guWhjqPrVN0/hqdefault.jpg?sqp=-oaymwEbCKgBEF5IVfKriqkDDggBFQAAiEIYAXABwAEG&rs=AOn4CLAP1kKquScBtrf5w41Eaarp-y5UPA)](https://www.youtube.com/live/guWhjqPrVN0?list=PLALTzJaRcgW97ItZgtZvkqFBcdVjKNVHz&index=4&t=362) +_________________ + ## Mod recommendations The following mods can be a great addition for this mod: +#### [Inserter Fuel Leech](https://mods.factorio.com/mod/InserterFuelLeech) + +While optional, the intended way is to use this mod for the burner phase as it improves the fueling experience of burner entities. + +For UPS optimizations, you can disable this mod once the burner phase is over. + +Alternatives: [Burner Leech Fork](https://mods.factorio.com/mod/Burner-Leech-Fork), [Burner Leech](https://mods.factorio.com/mod/Burner-Leech) + #### [Any Planet Start](https://mods.factorio.com/mod/any-planet-start) Allows you to choose the planet that Lignumis orbits. You can continue on Vulcanus, Fulgora or Gleba after leaving Lignumis. +Some modded planets add APS support as well (sometimes with a separate mod). #### [Diversitree](https://mods.factorio.com/mod/Diversitree) @@ -32,7 +53,7 @@ If you like go more into the charcoal direction. It has no overlap with Lignumis For wood on Aquilo. -#### [Crushing Industry](https://mods.factorio.com/mod/crushing-industry) +#### [Crushing Industry](https://mods.factorio.com/mod/crushing-industry) with [Crushing Industry - Productivity Research](https://mods.factorio.com/mod/crushing-industry-productivity-research) Recommended with high science cost settings. It adds crushers and crushed ores to increase productivity. Lignumis adds crushed gold ore and a technology to unlock the crusher with wood and steam science packs. @@ -49,6 +70,8 @@ Add this for increased complexity in the early Nauvis game. It has no effect on For even more complexity after Lignumis. They currently don't change anything on Lignumis itself. +_________________ + ## Compatibility with other planet mods The following planet mods are tested for (at least technical) compatibility: @@ -65,12 +88,18 @@ The following planet mods are tested for (at least technical) compatibility: - [Terra Palus](https://mods.factorio.com/mod/terrapalus) - [Secretas & Frozeta](https://mods.factorio.com/mod/secretas) +This list is probably not up-to-date. In doubt, just try it out. + +_________________ + ## Problematic / incompatible mods * The combination of AAI Industry and Any planet start is currently not supported. * Alien Biomes: Lignumis won't have any trees. It's playable, but not as intended. * The rest of the Wooden Universe: I marked the ones incompatible that don't make sense to combine or that wouldn't add more that is not already included. +_________________ + ## Add compatibility to your mod Lignumis, by default, adds wood and steam science packs during `data-updates.lua` to all technologies that match certain criteria. @@ -121,17 +150,19 @@ data.raw["string-setting"]["lignumis-second-planet"].allowed_values = { "gleba" data.raw["string-setting"]["lignumis-second-planet"].default_value = "gleba" ``` +_________________ + ## Todo - Fix pipe graphics on desiccation furnace and quality assembler - Trees must not die when absorbing noise - https://lua-api.factorio.com/latest/types/TreeVariation.html -- Improve transition to Nauvis a bit more - Add information in Factoriopedia - Compatibility with [On Wayward Seas](https://mods.factorio.com/mod/wayward-seas) - Compatibility with [Exotic Space Industries](https://mods.factorio.com/mod/exotic-space-industries) - Compatibility with [Noble Metals](https://mods.factorio.com/mod/bzgold) once it's updated -- "Hardcore Lignumis" + +_________________ ## Credits diff --git a/lignumis/changelog.txt b/lignumis/changelog.txt index f2f469a..80440cf 100644 --- a/lignumis/changelog.txt +++ b/lignumis/changelog.txt @@ -1,4 +1,44 @@ --------------------------------------------------------------------------------------------------- +Version: 1.0.53 +Date: 08.06.2025 + Changes: + - Gold plates require 1 gold ore again and buff gold by 33% + - Reduce usage of resources for some buildings + Bug Fixes: + - Any Planet Start: Works with moons now (required for Cerys) +--------------------------------------------------------------------------------------------------- +Version: 1.0.52 +Date: 06.06.2025 + Changes: + - Increase speed of rocket a bit + - Add flames and explosions to transition +--------------------------------------------------------------------------------------------------- +Version: 1.0.51 +Date: 06.06.2025 + Changes: + - Adjust essential flags on technologies + Bug Fixes: + - Crushing industry + Hot metals: Fix crushed gold not being smelted into hot gold +--------------------------------------------------------------------------------------------------- +Version: 1.0.50 +Date: 04.06.2025 + Changes: + - Reapply "Improve transition to Nauvis" +--------------------------------------------------------------------------------------------------- +Version: 1.0.49 +Date: 04.06.2025 + Changes: + - Enable burner leech when no dedicated mod is installed + - Burner-Leech-Fork is not incompatible anymore + Bug Fixes: + - Revert "Improve transition to Nauvis" since it requires currently unstable Factorio version 2.0.53 +--------------------------------------------------------------------------------------------------- +Version: 1.0.48 +Date: 03.06.2025 + Changes: + - Make InserterFuelLeech optional + - Improve transition to Nauvis +--------------------------------------------------------------------------------------------------- Version: 1.0.47 Date: 31.05.2025 Bug Fixes: diff --git a/lignumis/data-final-fixes.lua b/lignumis/data-final-fixes.lua index 02e2978..bbdacb8 100644 --- a/lignumis/data-final-fixes.lua +++ b/lignumis/data-final-fixes.lua @@ -1,2 +1,7 @@ require("prototypes/content/final") -require("prototypes/compatibility/final") \ No newline at end of file +require("prototypes/compatibility/final") + +if not mods["Burner-Leech-Fork"] and not mods["Burner-Leech"] and not mods["InserterFuelLeech"] then + data.raw["inserter"]["burner-inserter"].allow_burner_leech = true + data.raw["inserter"]["burner-long-handed-inserter"].allow_burner_leech = true +end \ No newline at end of file diff --git a/lignumis/info.json b/lignumis/info.json index eb76a6c..4a359f8 100644 --- a/lignumis/info.json +++ b/lignumis/info.json @@ -1,6 +1,6 @@ { "name": "lignumis", - "version": "1.0.47", + "version": "1.0.53", "title": "Lignumis", "description": "Dive into the world of Lignumis, a moon of Nauvis offering only the most basic technologies.", "author": "cackling fiend", @@ -9,12 +9,11 @@ "space_travel_required": true, "dependencies": [ "base", - "space-age >= 2.0.33", + "space-age >= 2.0.53", "astroponics >= 1.2.0", "bioprocessing-tab", "cf-lib >= 0.0.13", "flib", - "InserterFuelLeech", "lignumis-assets >= 1.0.3", "mf-buildings >= 1.0.7", "mf-core >= 1.0.3", @@ -34,13 +33,12 @@ "?gleba-reborn", "?hot-metals >= 1.1.0", "?lane-splitters", - "(?)metal-and-stars", + "?metal-and-stars", "(?)secretas", "(?)Wood_Gasification_updated", "?wood-industry", "?wood-military >= 2.3.3", "!apm_power_ldinc", - "!Burner-Leech-Fork", "!early-agriculture", "!planet-picker", "!wood-logistics", diff --git a/lignumis/locale/en/strings.cfg b/lignumis/locale/en/strings.cfg index 4cbe90d..a2409a1 100644 --- a/lignumis/locale/en/strings.cfg +++ b/lignumis/locale/en/strings.cfg @@ -138,6 +138,7 @@ active-noise-cancelling=Active noise cancelling quality-assembler=Quality assembler aai-wood-loader=Wood loader basic-ore-crushing=Basic ore crushing +astroponics-productivity=Astroponics productivity [technology-description] wood-science-pack=Allows research of basic technologies based on wood products. diff --git a/lignumis/prototypes/compatibility/any-planet-start-final.lua b/lignumis/prototypes/compatibility/any-planet-start-final.lua index 668cc66..072dfbe 100644 --- a/lignumis/prototypes/compatibility/any-planet-start-final.lua +++ b/lignumis/prototypes/compatibility/any-planet-start-final.lua @@ -7,7 +7,8 @@ local target_planet = settings.startup["aps-planet"].value if target_planet == "none" or target_planet == "nauvis" then return end -- Switch planet discovery technology to the new planet -Technology:new("planet-discovery-" .. target_planet) +local planet_discovery = data.raw.technology["planet-discovery-" .. target_planet] or data.raw.technology["moon-discovery-" .. target_planet] +Technology:new(planet_discovery) :assign({ enabled = true, hidden = false diff --git a/lignumis/prototypes/compatibility/any-planet-start.lua b/lignumis/prototypes/compatibility/any-planet-start.lua index 6bb4f27..ee57775 100644 --- a/lignumis/prototypes/compatibility/any-planet-start.lua +++ b/lignumis/prototypes/compatibility/any-planet-start.lua @@ -10,7 +10,8 @@ Technology:new("tree-seeding"):setPrerequisites({ "wood-science-pack" }) -- Switch planet discovery technology to the new planet -Technology:new("planet-discovery-" .. target_planet) +local planet_discovery = data.raw.technology["planet-discovery-" .. target_planet] or data.raw.technology["moon-discovery-" .. target_planet] +Technology:new(planet_discovery) :assign({ enabled = true, hidden = false, @@ -24,8 +25,8 @@ Technology:new("planet-discovery-" .. target_planet) } }) :setPrerequisites({ "provisional-rocketry" }) -Technology:new("iron-processing"):replacePrerequisite("planet-discovery-nauvis", "planet-discovery-" .. target_planet) -Technology:new("copper-processing"):replacePrerequisite("planet-discovery-nauvis", "planet-discovery-" .. target_planet) +Technology:new("iron-processing"):replacePrerequisite("planet-discovery-nauvis", planet_discovery.name) +Technology:new("copper-processing"):replacePrerequisite("planet-discovery-nauvis", planet_discovery.name) -- Vulcanus diff --git a/lignumis/prototypes/compatibility/crushing-industry-updates.lua b/lignumis/prototypes/compatibility/crushing-industry-updates.lua new file mode 100644 index 0000000..940ba53 --- /dev/null +++ b/lignumis/prototypes/compatibility/crushing-industry-updates.lua @@ -0,0 +1,10 @@ +local Technology = require("__cf-lib__/data/Technology") + +if not mods["crushing-industry"] then return end +if not settings.startup["crushing-industry-ore"].value then return end + +if mods["aai-industry"] then + Technology:new("burner-mechanics"):removeRecipe("burner-crusher") +else + Technology:new("steam-power"):removeRecipe("burner-crusher") +end \ No newline at end of file diff --git a/lignumis/prototypes/compatibility/crushing-industry.lua b/lignumis/prototypes/compatibility/crushing-industry.lua index 2f62662..4c9a5ac 100644 --- a/lignumis/prototypes/compatibility/crushing-industry.lua +++ b/lignumis/prototypes/compatibility/crushing-industry.lua @@ -53,7 +53,7 @@ data:extend({ auto_recycle = false, hide_from_player_crafting = settings.startup["crushing-industry-hide-player-crafting"].value, energy_required = 3.2, - ingredients = { { type = "item", name = "crushed-gold-ore", amount = 2 } }, + ingredients = { { type = "item", name = "crushed-gold-ore", amount = 1 } }, results = { { type = "item", name = "gold-plate", amount = 1 } }, main_product = "gold-plate", }, @@ -84,14 +84,6 @@ if settings.startup["crushing-industry-byproducts"].value then table.insert(data.raw["recipe"]["crushed-gold-ore"].results, { type = "item", name = "sand", amount = 1, probability = 0.02 }) end -if mods["aai-industry"] then - Technology:new("burner-mechanics"):removeRecipe("burner-crusher") -else - Technology:new("steam-power"):removeRecipe("burner-crusher") -end - - - local gold_recipe = Recipe:new("burner-crusher") :replaceIngredient("iron-gear-wheel", "wooden-gear-wheel") :replaceIngredient("iron-plate", "gold-plate") diff --git a/lignumis/prototypes/compatibility/data.lua b/lignumis/prototypes/compatibility/data.lua index 8f4bb5b..6d649e2 100644 --- a/lignumis/prototypes/compatibility/data.lua +++ b/lignumis/prototypes/compatibility/data.lua @@ -5,4 +5,5 @@ require("alien-biomes") require("aai-loaders") require("nuclear-science") require("lane-splitters") -require("wood-industry") \ No newline at end of file +require("wood-industry") +require("crushing-industry") \ No newline at end of file diff --git a/lignumis/prototypes/compatibility/updates.lua b/lignumis/prototypes/compatibility/updates.lua index 8df0677..3bd7bd3 100644 --- a/lignumis/prototypes/compatibility/updates.lua +++ b/lignumis/prototypes/compatibility/updates.lua @@ -1,4 +1,4 @@ require("aai-industry") require("gleba-reborn") require("any-planet-start") -require("crushing-industry") \ No newline at end of file +require("crushing-industry-updates") \ No newline at end of file diff --git a/lignumis/prototypes/content/basic-gun-turret.lua b/lignumis/prototypes/content/basic-gun-turret.lua index 75428e1..335010b 100644 --- a/lignumis/prototypes/content/basic-gun-turret.lua +++ b/lignumis/prototypes/content/basic-gun-turret.lua @@ -51,9 +51,9 @@ local turret_recipe = { enabled = false, energy_required = 8, ingredients = { - { type = "item", name = "wooden-gear-wheel", amount = 10 }, + { type = "item", name = "wooden-gear-wheel", amount = 5 }, { type = "item", name = "lumber", amount = 10 }, - { type = "item", name = "gold-plate", amount = 20 } + { type = "item", name = "gold-plate", amount = 10 } }, results = { { type = "item", name = "basic-gun-turret", amount = 1 } } } diff --git a/lignumis/prototypes/content/burner-agricultural-tower.lua b/lignumis/prototypes/content/burner-agricultural-tower.lua index 127c2fe..32a2234 100644 --- a/lignumis/prototypes/content/burner-agricultural-tower.lua +++ b/lignumis/prototypes/content/burner-agricultural-tower.lua @@ -87,8 +87,8 @@ data:extend({ energy_required = 10, ingredients = { { type = "item", name = "stone-brick", amount = 5 }, - { type = "item", name = "wooden-gear-wheel", amount = 20 }, - { type = "item", name = "lumber", amount = 20 }, + { type = "item", name = "wooden-gear-wheel", amount = 15 }, + { type = "item", name = "lumber", amount = 15 }, { type = "item", name = "gold-plate", amount = basic_circuit_board and 10 or 20 }, basic_circuit_board and { type = "item", name = "basic-circuit-board", amount = 10 } or nil }, @@ -124,8 +124,8 @@ data:extend({ energy_required = 10, ingredients = { { type = "item", name = "stone-brick", amount = 5 }, - { type = "item", name = "wooden-gear-wheel", amount = 20 }, - { type = "item", name = "lumber", amount = 20 }, + { type = "item", name = "wooden-gear-wheel", amount = 15 }, + { type = "item", name = "lumber", amount = 15 }, { type = "item", name = "copper-plate", amount = 10 }, { type = "item", name = basic_circuit_board and "basic-circuit-board" or "electronic-circuit", amount = 10 } }, diff --git a/lignumis/prototypes/content/gold/intermediates.lua b/lignumis/prototypes/content/gold/intermediates.lua index 4848e32..3f4f010 100644 --- a/lignumis/prototypes/content/gold/intermediates.lua +++ b/lignumis/prototypes/content/gold/intermediates.lua @@ -20,7 +20,7 @@ data:extend({ name = "gold-plate", category = "smelting", energy_required = 3.2, - ingredients = { { type = "item", name = "gold-ore", amount = 2 } }, + ingredients = { { type = "item", name = "gold-ore", amount = 1 } }, results = { { type = "item", name = "gold-plate", amount = 1 } }, allow_productivity = true }, diff --git a/lignumis/prototypes/content/gold/stromatolite.lua b/lignumis/prototypes/content/gold/stromatolite.lua index 315757f..d69218c 100644 --- a/lignumis/prototypes/content/gold/stromatolite.lua +++ b/lignumis/prototypes/content/gold/stromatolite.lua @@ -147,7 +147,7 @@ plant.minable = { mining_time = 2, results = { { type = "item", name = "moist-stromatolite-remnant", amount = 25 }, - { type = "item", name = "gold-bacteria", amount = 30 }, + { type = "item", name = "gold-bacteria", amount = 20 }, { type = "item", name = "gold-stromatolite-seed", amount_min = 1, amount_max = 3 } } } diff --git a/lignumis/prototypes/content/lumber-mill.lua b/lignumis/prototypes/content/lumber-mill.lua index 78da9a0..3ac959d 100644 --- a/lignumis/prototypes/content/lumber-mill.lua +++ b/lignumis/prototypes/content/lumber-mill.lua @@ -13,6 +13,8 @@ data:extend({ 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) @@ -20,6 +22,16 @@ LumberMill.EntityBuilder:new() crafting_categories = { "wood-processing-or-assembling" }, crafting_speed = 2, energy_usage = "1000kW", + surface_conditions = { + { + property = has_oxygen and "oxygen" or "pressure", + min = 10 + }, + { + property = "gravity", + min = 1 + } + } }) local lumber_mill_item = LumberMill.ItemBuilder:new() @@ -31,11 +43,11 @@ local lumber_mill_item = LumberMill.ItemBuilder:new() LumberMill.RecipeBuilder:new() :ingredients(table.trim({ { type = "item", name = "stone-brick", amount = 40 }, - { type = "item", name = "lumber", amount = 100 }, - { type = "item", name = "wooden-gear-wheel", amount = 100 }, - { type = "item", name = "gold-plate", amount = basic_circuit_board and 30 or 60 }, - basic_circuit_board and { type = "item", name = "basic-circuit-board", amount = 30 } or nil, - { type = "item", name = "burner-assembling-machine", amount = 5 } + { 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 } })) :apply({ category = "wood-processing-or-assembling" @@ -53,8 +65,8 @@ LumberMill.RecipeBuilder:new() { 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 30 or 60 }, - { type = "item", name = basic_circuit_board and "basic-circuit-board" or "electronic-circuit", amount = 30 }, + { 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 } }) :apply({ diff --git a/lignumis/prototypes/content/technology.lua b/lignumis/prototypes/content/technology.lua index fa19344..d0f7dee 100644 --- a/lignumis/prototypes/content/technology.lua +++ b/lignumis/prototypes/content/technology.lua @@ -3,7 +3,6 @@ data:extend({ type = "technology", name = "planet-discovery-lignumis", icons = PlanetsLib.technology_icons_moon(Lignumis.graphics .. "technology/lignumis.png", 256), - essential = true, effects = { { type = "unlock-space-location", @@ -117,7 +116,6 @@ data:extend({ name = "iron-processing", icon = "__base__/graphics/icons/iron-plate.png", icon_size = 64, - essential = true, effects = { { type = "unlock-recipe", @@ -143,7 +141,6 @@ data:extend({ name = "copper-processing", icon = "__base__/graphics/icons/copper-plate.png", icon_size = 64, - essential = true, effects = { { type = "unlock-recipe", diff --git a/lignumis/prototypes/content/wood-lab.lua b/lignumis/prototypes/content/wood-lab.lua index 6f06645..7db5aec 100644 --- a/lignumis/prototypes/content/wood-lab.lua +++ b/lignumis/prototypes/content/wood-lab.lua @@ -147,8 +147,8 @@ data:extend({ category = "wood-processing-or-assembling", energy_required = 2, ingredients = { - { type = "item", name = "lumber", amount = 10 }, - { type = "item", name = "wooden-gear-wheel", amount = 10 }, + { type = "item", name = "lumber", amount = 6 }, + { type = "item", name = "wooden-gear-wheel", amount = 4 }, { type = "item", name = "stone-brick", amount = 10 }, { type = "item", name = "gold-plate", amount = basic_circuit_board and 10 or 20 }, basic_circuit_board and { type = "item", name = "basic-circuit-board", amount = 10 } or nil diff --git a/lignumis/prototypes/content/wooden-rocket-silo.lua b/lignumis/prototypes/content/wooden-rocket-silo.lua index ab55f70..4bfb828 100644 --- a/lignumis/prototypes/content/wooden-rocket-silo.lua +++ b/lignumis/prototypes/content/wooden-rocket-silo.lua @@ -67,10 +67,10 @@ local silo_recipe = table.deepcopy(data.raw["recipe"]["rocket-silo"]) silo_recipe.name = "provisional-rocket-silo" silo_recipe.results[1].name = "provisional-rocket-silo" silo_recipe.ingredients = { - { type = "item", name = "lumber", amount = 500 }, - { type = "item", name = "wooden-gear-wheel", amount = 250 }, - { type = "item", name = "stone-brick", amount = 500 }, - { type = "item", name = "gold-plate", amount = 500 }, + { type = "item", name = "lumber", amount = 400 }, + { type = "item", name = "wooden-gear-wheel", amount = 150 }, + { type = "item", name = "stone-brick", amount = 400 }, + { type = "item", name = "gold-plate", amount = 400 }, basic_circuit_board and { type = "item", name = "basic-circuit-board", amount = 100 } or { type = "item", name = "gold-cable", amount = 100 } } @@ -79,9 +79,9 @@ local rocket = table.deepcopy(data.raw["rocket-silo-rocket"]["rocket-silo-rocket rocket.name = "provisional-rocket" rocket.inventory_size = 40 rocket.rising_speed = 1 / (14 * 60) -rocket.engine_starting_speed = 1 / (11 * 60) -rocket.flying_speed = 1 / (4000 * 60) -rocket.flying_acceleration = 0.005 +rocket.engine_starting_speed = 1 / (8 * 60) +rocket.flying_speed = 1 / (3000 * 60) +rocket.flying_acceleration = 0.007 rocket.rocket_sprite.layers[1].filename = Lignumis.graphics .. "entity/wooden-rocket-silo/rocket-static-pod.png" local rocket_part_recipe = { diff --git a/lignumis/prototypes/integrations/astroponics.lua b/lignumis/prototypes/integrations/astroponics.lua new file mode 100644 index 0000000..07f0842 --- /dev/null +++ b/lignumis/prototypes/integrations/astroponics.lua @@ -0,0 +1,43 @@ +data:extend({ + { + type = "technology", + name = "astroponics-productivity", + icons = { + { icon = "__base__/graphics/icons/wood.png", icon_size = 64 }, + { icon = "__astroponics__/graphics/icons/fluid/liquid-fertilizer.png", shift = { -32, -32 }, scale = 1.2 }, + { + icon = "__core__/graphics/icons/technology/constants/constant-recipe-productivity.png", + icon_size = 128, + scale = 0.5, + shift = { 50, 50 }, + floating = true + } + }, + essential = false, + level = 1, + max_level = 5, + show_levels_info = true, + effects = { + { + type = "change-recipe-productivity", + recipe = "tree-astroponics", + change = 0.1 + }, + { + type = "change-recipe-productivity", + recipe = "bioslurry-recycling", + change = 0.1 + } + }, + prerequisites = { "astroponics", "production-science-pack" }, + unit = { + count_formula = "L*250", + ingredients = { + { "wood-science-pack", 1 }, + { "production-science-pack", 1 }, + { "space-science-pack", 1 }, + }, + time = 60 + } + } +}) diff --git a/lignumis/prototypes/integrations/data.lua b/lignumis/prototypes/integrations/data.lua index 038c3cb..a8b9659 100644 --- a/lignumis/prototypes/integrations/data.lua +++ b/lignumis/prototypes/integrations/data.lua @@ -1,2 +1,3 @@ -require("vanilla") -require("Wood-Walls") \ No newline at end of file +require("vanilla") +require("Wood-Walls") +require("astroponics") \ No newline at end of file diff --git a/lignumis/scripts/init.lua b/lignumis/scripts/init.lua index 8ca9832..ad58805 100644 --- a/lignumis/scripts/init.lua +++ b/lignumis/scripts/init.lua @@ -71,6 +71,10 @@ Init.events[defines.events.on_player_created] = function(event) game.print("While Alien Biomes is playable with Lignumis, it is not recommended as it prevents trees from being generated on Lignumis.") end + if not script.active_mods["Burner-Leech-Fork"] and not script.active_mods["Burner-Leech"] and not script.active_mods["InserterFuelLeech"] then + game.print("Lignumis: You are starting a new game without a burner leech mod. The intended experience is to use one of the available options. You can disable such a mod after the burner phase of the game. See the mod page for more details.") + end + if not script.active_mods["any-planet-start"] then init_player(event) init_freeplay(event) diff --git a/lignumis/scripts/to-nauvis.lua b/lignumis/scripts/to-nauvis.lua index 7dfbd82..27cffdd 100644 --- a/lignumis/scripts/to-nauvis.lua +++ b/lignumis/scripts/to-nauvis.lua @@ -29,7 +29,7 @@ end local function teleport_player(player) local nauvis = game.planets[storage.target_planet].surface if player.surface.name == "lignumis" then - local position = nauvis.find_non_colliding_position("character", { 0, 0 }, 100, 1) or { 0, 0 } + local position = nauvis.find_non_colliding_position("character", { 2, 2 }, 100, 1) or { 0, 0 } player.teleport(position, storage.target_planet) chart_starting_area(nauvis, player) end @@ -57,35 +57,131 @@ local function init_freeplay() end -ToNauvis.events[defines.events.on_rocket_launched] = function(event) - if not event.rocket_silo or event.rocket_silo.name ~= "provisional-rocket-silo" then return end +local function transit_player(player_index) + local player = game.get_player(player_index) + local transition = storage.transitions[player_index] - local rocket_entry - local rocket_entry_index - local player - - for i, entry in pairs(storage.rocket_silos) do - if entry.real_silo == event.rocket_silo then - rocket_entry = entry - rocket_entry_index = i - player = entry.player and game.get_player(entry.player) or game.players[1] - break - end - end + transition.rocket_entry.cargo_pod.set_passenger(nil) + transition.rocket_entry.cargo_pod.destroy() init_nauvis() teleport_player(player) init_freeplay() -- Give the player the content of the rocket - if rocket_entry.rocket_content then + if transition.rocket_entry.rocket_content then local inventory = player.get_main_inventory() - for _, item in pairs(rocket_entry.rocket_content) do + for _, item in pairs(transition.rocket_entry.rocket_content) do inventory.insert(item) end inventory.sort_and_merge() end - table.remove(storage.rocket_silos, rocket_entry_index) + table.remove(storage.rocket_silos, transition.rocket_entry_index) +end + + +local function explode_silo(silo) + silo.die() +end + + +local get_random_position = function(box, x_scale, y_scale) + x_scale = x_scale or 1 + y_scale = y_scale or 1 + local x1 = box.left_top.x + local y1 = box.left_top.y + local x2 = box.right_bottom.x + local y2 = box.right_bottom.y + local x = ((x2 - x1) * x_scale * (math.random() - 0.5)) + ((x1 + x2) / 2) + local y = ((y2 - y1) * y_scale * (math.random() - 0.5)) + ((y1 + y2) / 2) + return { x, y } +end + + +local function burn_silo(silo) + local surface = silo.surface + local box = silo.bounding_box + for k = 1, 6 do + local position = get_random_position(box, 0.8, 0.5) + surface.create_entity + { + name = "crash-site-fire-flame", + position = position + } + local fire = surface.create_entity + { + name = "crash-site-fire-smoke", + position = position + } + fire.time_to_live = math.random(59 * 9, 59 * 14 - 1) + fire.time_to_next_effect = math.random(59 * 2) + end +end + + +local function pre_explode_silo(silo) + local surface = silo.surface + local box = silo.bounding_box + for k = 1, 3 do + local explosions = surface.create_entity + { + name = "crash-site-explosion-smoke", + position = get_random_position(box, 0.8, 0.5) + } + explosions.time_to_live = math.random(59 * 6, 59 * 11 - 1) + explosions.time_to_next_effect = math.random(59 * 3) + end +end + + +ToNauvis.events[defines.events.on_rocket_launch_ordered] = function(event) + if not event.rocket_silo or event.rocket_silo.name ~= "provisional-rocket-silo" then return end + + local player + + for i, entry in pairs(storage.rocket_silos) do + if entry.real_silo == event.rocket_silo then + if not storage.transitions then + storage.transitions = {} + end + player = entry.player and game.get_player(entry.player) or game.players[1] + storage.transitions[player.index] = { + rocket_entry = entry, + rocket_entry_index = i + } + break + end + end + + local burn_tick = game.tick + (14 * 59) + local pre_explode_tick = game.tick + (17 * 59) + local transit_tick = game.tick + (23 * 59) + local explode_tick = game.tick + (28 * 59) + + script.on_nth_tick(burn_tick, function() + burn_silo(event.rocket_silo) + script.on_nth_tick(burn_tick, nil) + end) + + script.on_nth_tick(pre_explode_tick, function() + pre_explode_silo(event.rocket_silo) + script.on_nth_tick(pre_explode_tick, nil) + end) + + script.on_nth_tick(transit_tick, function() + transit_player(player.index) + script.on_nth_tick(transit_tick, nil) + end) + + script.on_nth_tick(explode_tick, function() + explode_silo(event.rocket_silo) + script.on_nth_tick(explode_tick, nil) + end) +end + +ToNauvis.events[defines.events.on_post_entity_died] = function(event) + if not event.ghost or event.prototype.name ~= "provisional-rocket-silo" then return end + event.ghost.destroy() end return ToNauvis diff --git a/lignumis/scripts/wooden-rocket-silo.lua b/lignumis/scripts/wooden-rocket-silo.lua index c0890cf..7d3795b 100644 --- a/lignumis/scripts/wooden-rocket-silo.lua +++ b/lignumis/scripts/wooden-rocket-silo.lua @@ -92,8 +92,10 @@ local function launch(event) if entry.fake_silo == fake_silo then entry.player = event.player_index entry.rocket_content = rocket_content + entry.cargo_pod = entry.real_silo.rocket.attached_cargo_pod fake_silo.destroy() entry.real_silo.launch_rocket() + entry.cargo_pod.set_passenger(player) break end end