Skip to content

Commit

Permalink
Pipes manifold layer fix (CeladonSS13#1207)
Browse files Browse the repository at this point in the history
Пофикшено визуальное дублирование перекрестка труб.
  • Loading branch information
Redwizz777 authored Nov 22, 2024
1 parent 0599d38 commit 14654fb
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,18 @@
initialize_directions = ALL_CARDINALS
initialize_directions &= ~dir

/obj/machinery/atmospherics/pipe/heat_exchanging/manifold/update_overlays()
. = ..()
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold/update_icon()
cut_overlays()

PIPING_LAYER_DOUBLE_SHIFT(center, piping_layer)
. += center
add_overlay(center)

//Add non-broken pieces
for(var/i in 1 to device_type)
if(nodes[i])
. += getpipeimage(icon, "pipe-[piping_layer]", get_dir(src, nodes[i]))
add_overlay( getpipeimage(icon, "pipe-[piping_layer]", get_dir(src, nodes[i])) )

update_layer()

/obj/machinery/atmospherics/pipe/heat_exchanging/manifold/layer2
piping_layer = 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,18 @@
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w/SetInitDirections()
initialize_directions = initial(initialize_directions)

/obj/machinery/atmospherics/pipe/manifold4w/update_overlays()
. = ..()
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w/update_icon()
cut_overlays()

PIPING_LAYER_DOUBLE_SHIFT(center, piping_layer)
. += center
add_overlay(center)

//Add non-broken pieces
for(var/i in 1 to device_type)
if(nodes[i])
. += getpipeimage(icon, "pipe-[piping_layer]", get_dir(src, nodes[i]))
add_overlay( getpipeimage(icon, "pipe-[piping_layer]", get_dir(src, nodes[i])) )

update_layer()

/obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w/layer2
piping_layer = 2
Expand Down
11 changes: 6 additions & 5 deletions code/modules/atmospherics/machinery/pipes/manifold.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,16 @@
initialize_directions = ALL_CARDINALS
initialize_directions &= ~dir

/obj/machinery/atmospherics/pipe/manifold/update_overlays()
. = ..()

/obj/machinery/atmospherics/pipe/manifold/update_icon()
cut_overlays()
if(!center)
center = mutable_appearance(icon, "manifold_center")
PIPING_LAYER_DOUBLE_SHIFT(center, piping_layer)
. += center
add_overlay(center)

//Add non-broken pieces
for(var/i in 1 to device_type)
if(nodes[i])
. += getpipeimage(icon, "pipe-[piping_layer]", get_dir(src, nodes[i]))
add_overlay( getpipeimage(icon, "pipe-[piping_layer]", get_dir(src, nodes[i])) )

update_layer()
8 changes: 4 additions & 4 deletions code/modules/atmospherics/machinery/pipes/manifold4w.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@
/obj/machinery/atmospherics/pipe/manifold4w/SetInitDirections()
initialize_directions = initial(initialize_directions)

/obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w/update_overlays()
. = ..()
/obj/machinery/atmospherics/pipe/manifold4w/update_icon()
cut_overlays()
if(!center)
center = mutable_appearance(icon, "manifold_center")
PIPING_LAYER_DOUBLE_SHIFT(center, piping_layer)
. += center
add_overlay(center)

//Add non-broken pieces
for(var/i in 1 to device_type)
if(nodes[i])
. += getpipeimage(icon, "pipe-[piping_layer]", get_dir(src, nodes[i]))
add_overlay( getpipeimage(icon, "pipe-[piping_layer]", get_dir(src, nodes[i])) )

update_layer()

0 comments on commit 14654fb

Please sign in to comment.