Skip to content

Commit

Permalink
Merge branch 'maraxsis-buildability-rules'
Browse files Browse the repository at this point in the history
  • Loading branch information
notnotmelon committed Jan 14, 2025
2 parents 984b4a3 + 5285100 commit 86bf169
Show file tree
Hide file tree
Showing 50 changed files with 488 additions and 584 deletions.
8 changes: 8 additions & 0 deletions compat/aai-signal-transmission.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
if not mods["aai-signal-transmission"] then return end

for _, entity in pairs {
data.raw["roboport"]["aai-signal-sender"],
data.raw["roboport"]["aai-signal-receiver"],
} do
entity.maraxsis_buildability_rules = {water = false, dome = true, coral = false, trench = true, trench_entrance = false, trench_lava = false}
end
8 changes: 0 additions & 8 deletions compat/alien-biomes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,3 @@ for _, planet in pairs {"maraxsis", "maraxsis-trench"} do
end
end
end

if not mods["alien-biomes"] then return end

for _, tile in pairs(data.raw.tile) do
if tile.name:find("%-underwater") and tile.collision_mask.layers[maraxsis_collision_mask] then
tile.collision_mask.layers.item = nil
end
end
7 changes: 0 additions & 7 deletions compat/combat-mechanics-overhaul.lua

This file was deleted.

13 changes: 13 additions & 0 deletions compat/editor-extensions.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
if not mods["EditorExtensions"] then return end

for _, entity in pairs {
data.raw["electric-energy-interface"]["ee-infinity-accumulator-primary-output"],
data.raw["electric-energy-interface"]["ee-infinity-accumulator-secondary-output"],
data.raw["electric-energy-interface"]["ee-infinity-accumulator-tertiary-output"],
data.raw["electric-energy-interface"]["ee-infinity-accumulator-primary-input"],
data.raw["electric-energy-interface"]["ee-infinity-accumulator-secondary-input"],
data.raw["electric-energy-interface"]["ee-infinity-accumulator-tertiary-input"],
data.raw["electric-energy-interface"]["ee-infinity-accumulator-tertiary-buffer"],
} do
entity.maraxsis_buildability_rules = {water = true, dome = true, coral = true, trench = true, trench_entrance = false, trench_lava = false}
end
5 changes: 0 additions & 5 deletions compat/ks-power.lua

This file was deleted.

4 changes: 1 addition & 3 deletions compat/rocket-silo-construction.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
if not mods["Rocket-Silo-Construction"] then return end
local collision_mask_util = require "__core__/lualib/collision-mask-util"

for _, silo in pairs {
data.raw["assembling-machine"]["rsc-silo-stage1"],
Expand All @@ -9,6 +8,5 @@ for _, silo in pairs {
data.raw["assembling-machine"]["rsc-silo-stage5"],
data.raw["assembling-machine"]["rsc-silo-stage6"],
} do
silo.collision_mask = collision_mask_util.get_mask(silo)
silo.collision_mask.layers[maraxsis_dome_collision_mask] = true
silo.maraxsis_buildability_rules = {water = true, dome = false, coral = true, trench = false, trench_entrance = false, trench_lava = false}
end
7 changes: 1 addition & 6 deletions compat/transport-ring-teleporter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ for _, name in pairs {
} do
local ring_teleporter = data.raw["accumulator"][name] or data.raw["simple-entity-with-force"][name]
if ring_teleporter then
ring_teleporter.surface_conditions = ring_teleporter.surface_conditions or {}
table.insert(ring_teleporter.surface_conditions, {
property = "pressure",
max = 50000,
min = 0
})
ring_teleporter.maraxsis_buildability_rules = {water = false, dome = false, coral = false, trench = false, trench_entrance = false, trench_lava = false}
end
end
9 changes: 0 additions & 9 deletions data-final-fixes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ require "prototypes.swimming"

require "compat.5-dim"
require "compat.alien-biomes"
require "compat.combat-mechanics-overhaul"
require "compat.visible-planets-in-space"
require "compat.rocket-silo-construction"
require "compat.whats-a-spoilage"
Expand Down Expand Up @@ -45,14 +44,6 @@ end

ducts["maraxsis-trench-duct"] = true

-- fix collision masks for the trench entrance
for _, entity in pairs(collision_mask_util.collect_prototypes_with_layer("object")) do
if entity.type ~= "tile" and not ducts[entity.name] then
entity.collision_mask = collision_mask_util.get_mask(entity)
entity.collision_mask.layers[maraxsis_trench_entrance_collision_mask] = true
end
end

-- allow rocket fuel and nuclear fuel to be used in submarines
local fuel_category = table.deepcopy(data.raw["fuel-category"]["chemical"])
fuel_category.name = "rocket-fuel"
Expand Down
7 changes: 5 additions & 2 deletions data-updates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@ require "prototypes.vanilla-changes"
require "prototypes.spidertron-patrols"
require "prototypes.item-weight"
require "prototypes.default-import-location"
require "prototypes.fluid-void"
require "prototypes.item-sounds"
require "prototypes.regulator-fluidbox"
require "prototypes.fluid-void"
require "prototypes.entity.regulator-fluidbox"

require "compat.aai-industry"
require "compat.aai-signal-transmission"
require "compat.editor-extensions"
require "compat.transport-ring-teleporter"
require "compat.quality-seeds"

Expand Down
74 changes: 41 additions & 33 deletions data.lua
Original file line number Diff line number Diff line change
@@ -1,42 +1,50 @@
_G.maraxsis = require "scripts.constants"
require "lib.lib"
require "prototypes.abyssal-diving-gear"

require "prototypes.entity.water-shader"
require "prototypes.entity.submarine"
require "prototypes.entity.salt-reactor"
require "prototypes.entity.rocks"
require "prototypes.entity.trench-duct"
require "prototypes.entity.fish"
require "prototypes.entity.cliffs"
require "prototypes.entity.hydro-plant"
require "prototypes.entity.regulator"
require "prototypes.entity.pressure-dome"
require "prototypes.entity.sonar"
require "prototypes.entity.fishing-tower"
require "prototypes.entity.sand-extractor"
require "prototypes.entity.bubbles"
require "prototypes.entity.coral"
require "prototypes.entity.offshore-pump"
require "prototypes.entity.conduit"

require "prototypes.technology.abyssal-diving-gear"
require "prototypes.technology.technology"
require "prototypes.technology.glass"
require "prototypes.technology.wyrm"
require "prototypes.technology.recipes"
require "prototypes.technology.fat-man"
require "prototypes.technology.water-treatment"
require "prototypes.technology.big-cliff-explosive"
require "prototypes.technology.atmosphere"
require "prototypes.technology.hydraulic-science-pack"
require "prototypes.technology.project-seadragon"
require "prototypes.technology.deepsea-research"
require "prototypes.technology.preservatives"
require "prototypes.technology.promethium-productivity"
require "prototypes.technology.stone-centrifuging"

require "prototypes.circuit-connector-definitions"
require "prototypes.tile.water-and-cliffs"
require "prototypes.submarine"
require "prototypes.salt-reactor"
require "prototypes.technology"
require "prototypes.glass"
require "prototypes.wyrm"
require "prototypes.rocks"
require "prototypes.trench-duct"
require "prototypes.fish"
require "prototypes.tile.lava"
require "prototypes.hydro-plant"
require "prototypes.regulator"
require "prototypes.pressure-dome"
require "prototypes.sonar"
require "prototypes.fishing-tower"
require "prototypes.sand-extractor"
require "prototypes.bubbles"
require "prototypes.recipes"
require "prototypes.fat-man"
require "prototypes.water-treatment"
require "prototypes.big-cliff-explosive"
require "prototypes.atmosphere"
require "prototypes.hydraulic-science-pack"
require "prototypes.coral"
require "prototypes.project-seadragon"
require "prototypes.deepsea-research"
require "prototypes.preservatives"
require "prototypes.promethium-productivity"
require "prototypes.tips-and-tricks.tips-and-tricks"
require "prototypes.offshore-pump"
require "prototypes.tiles"
require "prototypes.tips-and-tricks"
require "prototypes.planet.space-location"
require "prototypes.conduit"
require "prototypes.stone-centrifuging"
require "prototypes.achievements"

data.raw["mining-drill"]["burner-mining-drill"].maraxsis_buildability_rules = {water = false, dome = false, coral = false, trench = false, trench_entrance = false, trench_lava = false}
data.raw["assembling-machine"]["chemical-plant"].maraxsis_buildability_rules = {water = true, dome = true, coral = true, trench = true, trench_entrance = false, trench_lava = false}
data.raw["electric-energy-interface"]["electric-energy-interface"].maraxsis_buildability_rules = {water = true, dome = true, coral = true, trench = true, trench_entrance = false, trench_lava = false}

--- custom event for submarine submerged
--- also triggers on character submerged with abyssal diving gear
--- event table: {entity, old_surface_index, old_position}
Expand Down
Loading

0 comments on commit 86bf169

Please sign in to comment.