Add compatibility with Planet Picker

This commit is contained in:
Simon Brodtmann 2025-02-15 01:26:54 +01:00
parent 59fda1cb7c
commit dca8ae4ec8
9 changed files with 251 additions and 220 deletions

View file

@ -84,7 +84,6 @@ If your modded lab is special and it should not support these science packs, use
- Add late-game recipe for oil from wood pulp
- Replace usage of gold cable with basic circuits made of wood and gold cable, add option for progressive circuit recipes and add recipe prod research
- Compatibility with [On Wayward Seas](https://mods.factorio.com/mod/wayward-seas)
- Compatibility with [Planet Picker](https://mods.factorio.com/mod/planet-picker)
- Compatibility with [Noble Metals](https://mods.factorio.com/mod/bzgold) once it's updated
## Credits

View file

@ -22,6 +22,7 @@
"?wood-military >= 2.3.3",
"?metal-and-stars",
"?aai-industry",
"?planet-picker",
"!apm_power_ldinc",
"!wood-logistics",
"!early-agriculture",

View file

@ -2,3 +2,4 @@ require("hot-metals")
require("wood-military")
require("metal-and-stars")
require("alien-biomes")
require("planet-picker")

View file

@ -0,0 +1,8 @@
local Technology = require("__cf-lib__/data/Technology")
local Recipe = require("__cf-lib__/data/Recipe")
if not mods["planet-picker"] then return end
local technology = Technology:new("planet-discovery-lignumis")
technology:setPrerequisites({ "space-platform-thruster" })
technology:addIngredients({ "logistic-science-pack", "chemical-science-pack", "space-science-pack" })

View file

@ -20,6 +20,71 @@ data:extend({
time = 10
}
},
{
type = "technology",
name = "gold-fluid-handling",
icon = "__lignumis__/graphics/technology/gold-fluid-handling.png",
icon_size = 256,
prerequisites = { "burner-automation" },
effects = {
{
type = "unlock-recipe",
recipe = "gold-pipe"
},
{
type = "unlock-recipe",
recipe = "gold-pipe-to-ground"
},
{
type = "unlock-recipe",
recipe = "gold-storage-tank"
},
{
type = "unlock-recipe",
recipe = "desiccation-furnace"
},
{
type = "unlock-recipe",
recipe = "moist-stromatolite-remnant-desiccation"
},
{
type = "unlock-recipe",
recipe = "moist-stromatolite-remnant-desiccation-without-steam"
}
},
unit = {
count = 20,
ingredients = { { "wood-science-pack", 1 } },
time = 15
}
},
{
type = "technology",
name = "provisional-rocketry",
icon = "__lignumis__/graphics/technology/provisional-rocketry.png",
icon_size = 256,
essential = true,
effects =
{
{
type = "unlock-recipe",
recipe = "provisional-rocket-silo"
}
},
prerequisites = { "wood-liquefaction" },
unit = {
count = 500,
ingredients = {
{ "wood-science-pack", 1 },
{ "steam-science-pack", 1 }
},
time = 15
}
}
})
if not mods["planet-picker"] then
data:extend({
{
type = "technology",
name = "planet-discovery-nauvis",
@ -103,66 +168,6 @@ data:extend({
},
time = 15
}
},
{
type = "technology",
name = "gold-fluid-handling",
icon = "__lignumis__/graphics/technology/gold-fluid-handling.png",
icon_size = 256,
prerequisites = { "burner-automation" },
effects = {
{
type = "unlock-recipe",
recipe = "gold-pipe"
},
{
type = "unlock-recipe",
recipe = "gold-pipe-to-ground"
},
{
type = "unlock-recipe",
recipe = "gold-storage-tank"
},
{
type = "unlock-recipe",
recipe = "desiccation-furnace"
},
{
type = "unlock-recipe",
recipe = "moist-stromatolite-remnant-desiccation"
},
{
type = "unlock-recipe",
recipe = "moist-stromatolite-remnant-desiccation-without-steam"
}
},
unit = {
count = 20,
ingredients = { { "wood-science-pack", 1 } },
time = 15
}
},
{
type = "technology",
name = "provisional-rocketry",
icon = "__lignumis__/graphics/technology/provisional-rocketry.png",
icon_size = 256,
essential = true,
effects =
{
{
type = "unlock-recipe",
recipe = "provisional-rocket-silo"
}
},
prerequisites = { "wood-liquefaction" },
unit = {
count = 500,
ingredients = {
{ "wood-science-pack", 1 },
{ "steam-science-pack", 1 }
},
time = 15
}
}
})
end

View file

@ -115,12 +115,14 @@ table.insert(data.raw["assembling-machine"]["assembling-machine-3"].crafting_cat
-- Disable vanilla early game recipes
if not mods["planet-picker"] then
data.raw.recipe["iron-plate"].enabled = false
data.raw.recipe["iron-gear-wheel"].enabled = false
data.raw.recipe["iron-chest"].enabled = false
data.raw.recipe["copper-plate"].enabled = false
data.raw.recipe["copper-cable"].enabled = false
data.raw.recipe["transport-belt"].enabled = false
end
-- Progressive recipes
@ -141,6 +143,7 @@ end
-- Adjust vanilla technologies
if not mods["planet-picker"] then
local automation_science_pack_technology = data.raw.technology["automation-science-pack"]
automation_science_pack_technology.prerequisites = { "planet-discovery-nauvis" }
automation_science_pack_technology.research_trigger = nil
@ -287,6 +290,7 @@ production_science_pack_technology:addIngredients({ "wood-science-pack", "steam-
local utility_science_pack_technology = Technology:new("utility-science-pack")
utility_science_pack_technology:setPrerequisites({ "space-platform-thruster" })
utility_science_pack_technology:addIngredients({ "wood-science-pack", "steam-science-pack", "space-science-pack" })
end
if not mods["planet-muluna"] then -- Muluna does the same
Technology:new("logistic-robotics"):addRecipe("requester-chest")

View file

@ -62,6 +62,7 @@ end
InitNew.on_init = function()
if game.tick > 0 then return end
if script.active_mods["planet-picker"] then return end
init_intro()
init_space_locations()

View file

@ -37,6 +37,7 @@ end
-- Initialize the freeplay scenario
local function init_freeplay(event)
if script.active_mods["planet-picker"] then return end
if storage.crashed_ship_lignumis then return end
local player = game.get_player(event.player_index)
@ -63,7 +64,9 @@ local function init_freeplay(event)
table.deepcopy(storage.crashed_ship_parts))
util.remove_safe(player, storage.crashed_ship_items)
util.remove_safe(player, storage.crashed_debris_items)
if player.character then
player.character.get_main_inventory().sort_and_merge()
end
storage.crash_site_cutscene_active = true
crash_site.create_cutscene(player, { -5, -4 })

View file

@ -31,3 +31,12 @@ if mods["wood-military"] then
data.raw["bool-setting"]["lignumis-ammo-progression"].forced_value = false
data.raw["bool-setting"]["lignumis-ammo-progression"].hidden = true
end
if mods["planet-picker"] then
data.raw["bool-setting"]["lignumis-belt-progression"].forced_value = false
data.raw["bool-setting"]["lignumis-belt-progression"].hidden = true
data.raw["bool-setting"]["lignumis-inserter-progression"].forced_value = false
data.raw["bool-setting"]["lignumis-inserter-progression"].hidden = true
data.raw["bool-setting"]["lignumis-ammo-progression"].forced_value = false
data.raw["bool-setting"]["lignumis-ammo-progression"].hidden = true
end