Compare commits
1 commit
master
...
fix-alien-
Author | SHA1 | Date | |
---|---|---|---|
![]() |
085d7a83ca |
3 changed files with 69 additions and 0 deletions
67
lignumis/prototypes/compatibility/alien-biomes-final.lua
Normal file
67
lignumis/prototypes/compatibility/alien-biomes-final.lua
Normal file
|
@ -0,0 +1,67 @@
|
|||
-- Lignumis + Alien Biomes Compatibility - Final Fixes
|
||||
--
|
||||
-- This runs AFTER alien-biomes data-updates.lua to ensure our fixes aren't overridden
|
||||
-- Load order: data.lua -> data-updates.lua -> data-final-fixes.lua (THIS FILE)
|
||||
|
||||
if not mods["alien-biomes"] then
|
||||
return
|
||||
end
|
||||
|
||||
-- Define Lignumis grass tiles (from mapgen.lua)
|
||||
local lignumis_grass_tiles = {
|
||||
"grass-1",
|
||||
"grass-2",
|
||||
"grass-3",
|
||||
"grass-4",
|
||||
"natural-gold-soil"
|
||||
}
|
||||
|
||||
-- Fix tree plant for manual planting on Lignumis grass tiles
|
||||
local tree_plant = data.raw.plant["tree-plant"]
|
||||
if mods["Diversitree"] then
|
||||
tree_plant = data.raw.plant["s6xdvt-fake-tree"]
|
||||
end
|
||||
|
||||
if tree_plant then
|
||||
for _, tile in pairs(lignumis_grass_tiles) do
|
||||
local already_present = false
|
||||
for _, existing_tile in pairs(tree_plant.autoplace.tile_restriction) do
|
||||
if existing_tile == tile then
|
||||
already_present = true
|
||||
break
|
||||
end
|
||||
end
|
||||
if not already_present then
|
||||
table.insert(tree_plant.autoplace.tile_restriction, tile)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Fix tree autoplace restrictions for natural tree spawning
|
||||
for _, tree in pairs(data.raw.tree) do
|
||||
if tree.autoplace and tree.autoplace.tile_restriction then
|
||||
-- Skip gold stromatolites - they should remain exclusive to natural-gold-soil
|
||||
local is_gold_stromatolite = tree.name and (tree.name:find("stromatolite") or tree.name:find("gold"))
|
||||
|
||||
if not is_gold_stromatolite then
|
||||
-- Check if Lignumis grass tiles are missing
|
||||
local has_lignumis_tiles = false
|
||||
for _, existing_tile in pairs(tree.autoplace.tile_restriction) do
|
||||
for _, lignumis_tile in pairs(lignumis_grass_tiles) do
|
||||
if existing_tile == lignumis_tile then
|
||||
has_lignumis_tiles = true
|
||||
break
|
||||
end
|
||||
end
|
||||
if has_lignumis_tiles then break end
|
||||
end
|
||||
|
||||
-- Add Lignumis grass tiles if missing
|
||||
if not has_lignumis_tiles then
|
||||
for _, tile_name in pairs(lignumis_grass_tiles) do
|
||||
table.insert(tree.autoplace.tile_restriction, tile_name)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -6,6 +6,7 @@ settings["small-rock"] = nil
|
|||
settings["tiny-rock"] = nil
|
||||
|
||||
-- Fix trees not being plantable on Alien Biomes tiles
|
||||
-- Note: Additional tree fixes for Lignumis grass tiles are handled in alien-biomes-final.lua
|
||||
local tile_restriction = data.raw["plant"]["tree-plant"].autoplace.tile_restriction
|
||||
for _, tile in pairs(alien_biomes.all_tiles()) do
|
||||
if tile.tags and (table.contains(tile.tags, "dirt") or table.contains(tile.tags, "grass")) then
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
require("aai-loaders-final")
|
||||
require("any-planet-start-final")
|
||||
require("alien-biomes-final")
|
||||
|
||||
if not data.raw.technology["legendary-quality"] then
|
||||
table.removeValue(data.raw.technology["quality-assembler"].prerequisites, "legendary-quality")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue