Skip to content

Commit

Permalink
fix: Fixed could not built any entity with the combat mechanics overh…
Browse files Browse the repository at this point in the history
…aul mod installed. Resolves #209 Resolves #216
  • Loading branch information
notnotmelon committed Jan 24, 2025
1 parent aaace1c commit 789c8be
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
7 changes: 7 additions & 0 deletions compat/combat-mechanics-overhaul.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-- https://github.com/notnotmelon/maraxsis/issues/209

for _, tile in pairs(data.raw.tile) do
if tile.collision_mask and tile.collision_mask.layers and tile.fluid == "maraxsis-saline-water" then
tile.collision_mask.layers.item = nil
end
end
12 changes: 12 additions & 0 deletions data-final-fixes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ require "compat.alien-biomes"
require "compat.visible-planets-in-space"
require "compat.rocket-silo-construction"
require "compat.whats-a-spoilage"
require "compat.combat-mechanics-overhaul"

for extractor in pairs(maraxsis.MARAXSIS_SAND_EXTRACTORS) do
local mask = collision_mask_util.get_mask(data.raw["mining-drill"][extractor])
Expand Down Expand Up @@ -100,3 +101,14 @@ add_crafting_category_if_other_category_exists("organic", "maraxsis-smelting-or-
add_crafting_category_if_other_category_exists("organic", "maraxsis-hydro-plant-or-biochamber")
add_crafting_category_if_other_category_exists("crafting", "maraxsis-hydro-plant-or-assembling")
add_crafting_category_if_other_category_exists("advanced-crafting", "maraxsis-hydro-plant-or-advanced-crafting")

local sand_mask = collision_mask_util.get_mask(data.raw.tile["sand-1-underwater"])
local hydro_plant_mask = collision_mask_util.get_mask(data.raw["assembling-machine"]["maraxsis-hydro-plant"])
if collision_mask_util.masks_collide(sand_mask, hydro_plant_mask) then
error(
"Hydro plant cannot be built on maraxsis. Is there a mod conflict? Sand mask: "
.. serpent.line(sand_mask)
.. " Hydro plant mask: "
.. serpent.line(hydro_plant_mask)
)
end

0 comments on commit 789c8be

Please sign in to comment.