Files
Paradise/code/game/objects/items/devices/window_painter.dm
danni boi ca97f9a92d Windowpainter (#14888)
* adds a window painting tool

* Update code/game/objects/items/devices/window_painter.dm

Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>

* gigit

* edited code to match steelslayer's suggestion

* Update code/game/objects/items/devices/window_painter.dm

OOF thank you for catching that

Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>

Co-authored-by: danni-boy <32673848+danni-boy@users.noreply.github.com>
Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>
2020-11-23 19:07:54 +00:00

23 lines
698 B
Plaintext

/obj/item/pipe_painter/window_painter
name = "window painter"
icon_state = "window_painter"
var/list/paintable_windows = list(
/obj/structure/window/reinforced,
/obj/structure/window/basic,
/obj/structure/window/full/reinforced,
/obj/structure/window/full/basic,
/obj/machinery/door/window)
/obj/item/pipe_painter/window_painter/afterattack(atom/A, mob/user as mob)
if(!is_type_in_list(A, paintable_windows) || !in_range(user, A))
return
var/obj/structure/window/W = A
if(W.color == GLOB.pipe_colors[mode])
to_chat(user, "<span class='notice'>This window is aready painted [mode]!</span>")
return
playsound(loc, usesound, 30, TRUE)
W.color = GLOB.pipe_colors[mode]