mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-09 16:14:13 +00:00
Fixes pipe painter/RPD ignoring can_be_coloured (#25192)
* Fixes atmos pipe painter/RPD ignoring can_ne_coloured * if
This commit is contained in:
@@ -27,10 +27,8 @@
|
||||
var/datum/pipeline/pipeline = parent
|
||||
var/list/update_later = list()
|
||||
for(var/obj/machinery/atmospherics/pipe in pipeline.members)
|
||||
pipe.color = mass_colour
|
||||
if(!pipe.can_be_coloured)
|
||||
pipe.default_colour = mass_colour
|
||||
update_later += pipe
|
||||
if(pipe.can_be_coloured)
|
||||
pipe.color = mass_colour
|
||||
for(var/obj/machinery/atmospherics/pipe in pipeline.edges)
|
||||
pipe.update_icon()
|
||||
update_later -= pipeline.edges
|
||||
|
||||
@@ -18,9 +18,12 @@
|
||||
if(!istype(A,/obj/machinery/atmospherics/pipe) || istype(A,/obj/machinery/atmospherics/unary/tank) || istype(A,/obj/machinery/atmospherics/unary/vent) || istype(A,/obj/machinery/atmospherics/pipe/simple/heat_exchanging) || istype(A,/obj/machinery/atmospherics/pipe/simple/insulated))
|
||||
return
|
||||
var/obj/machinery/atmospherics/pipe/P = A
|
||||
P.color = mode
|
||||
user.visible_message("<span class='notice'>[user] paints \the [P] [mode].</span>","<span class='notice'>You paint \the [P] [mode].</span>")
|
||||
P.update_icon()
|
||||
if(P.can_be_coloured)
|
||||
P.color = mode
|
||||
user.visible_message("<span class='notice'>[user] paints \the [P] [mode].</span>","<span class='notice'>You paint \the [P] [mode].</span>")
|
||||
P.update_icon()
|
||||
return
|
||||
to_chat(user, "<span class='danger'>\The [P] cannot be painted.</span>")
|
||||
|
||||
/obj/item/device/pipe_painter/attack_self(mob/user as mob)
|
||||
mode = input("Which colour do you want to use?","Pipe painter") in modes
|
||||
|
||||
@@ -109,6 +109,10 @@
|
||||
|
||||
var/obj/machinery/atmospherics/O = A
|
||||
|
||||
if(!O.can_be_coloured)
|
||||
to_chat(user, "<span class='danger'>\The [O] cannot be painted.</span>")
|
||||
return 1
|
||||
|
||||
playsound(master, 'sound/machines/click.ogg', 50, 1)
|
||||
if (selected_color in available_colors)
|
||||
selected_color = available_colors[selected_color]
|
||||
@@ -118,7 +122,7 @@
|
||||
var/obj/machinery/atmospherics/pipe/pipe_to_colour = O
|
||||
var/datum/pipeline/pipe_line = pipe_to_colour.parent
|
||||
var/list/pipeline_members = pipe_line.members
|
||||
if (pipeline_members.len < 500)
|
||||
if(pipeline_members.len < 500)
|
||||
last_colouration = world.timeofday
|
||||
colouring_delay = (pipeline_members.len)/2
|
||||
O.color = selected_color
|
||||
|
||||
Reference in New Issue
Block a user