forked from cacklingfiend/lignumis
Compare commits
No commits in common. "9eee7169ec6f227ff857459fbce3617968530bc7" and "ac2e341e419fb0ade05e0aa5847c955fe566e686" have entirely different histories.
9eee7169ec
...
ac2e341e41
3 changed files with 0 additions and 69 deletions
|
@ -1,67 +0,0 @@
|
|||
-- 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,7 +6,6 @@ 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,6 +1,5 @@
|
|||
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