From b6213fe1fb713beee1cee5b77d291354792b8128 Mon Sep 17 00:00:00 2001 From: Simon Brodtmann Date: Mon, 27 Jan 2025 20:21:25 +0100 Subject: [PATCH] Make pipe code more robust https://github.com/SimonBrodtmann/lignumis/issues/5 --- lignumis/prototypes/content/gold/pipes.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lignumis/prototypes/content/gold/pipes.lua b/lignumis/prototypes/content/gold/pipes.lua index 12593ec..5c631c1 100644 --- a/lignumis/prototypes/content/gold/pipes.lua +++ b/lignumis/prototypes/content/gold/pipes.lua @@ -127,8 +127,12 @@ pipe_to_ground.icon = "__lignumis__/graphics/icons/gold-pipe-to-ground.png" pipe_to_ground.corpse = "gold-pipe-to-ground-remnants" pipe_to_ground.next_upgrade = "pipe-to-ground" pipe_to_ground.fluid_box.volume = 50 -pipe_to_ground.fluid_box.pipe_connections[2].max_underground_distance = 6 pipe_to_ground.minable.result = "gold-pipe-to-ground" +for _, connection in pairs(pipe_to_ground.fluid_box.pipe_connections) do + if connection.connection_type == "underground" then + connection.max_underground_distance = 6 + end +end pipe_to_ground.fluid_box.pipe_covers.north.layers[1].filename = "__lignumis__/graphics/entity/gold-pipe/gold-pipe-cover-north.png"