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>
This commit is contained in:
danni boi
2020-11-23 19:07:54 +00:00
committed by GitHub
parent ec5f7dd8a5
commit ca97f9a92d
5 changed files with 32 additions and 1 deletions
@@ -33,7 +33,7 @@
/obj/item/pipe_painter/attack_self(mob/user as mob)
mode = input("Which colour do you want to use?", "Pipe Painter", mode) in modes
mode = input("Which colour do you want to use?", name, mode) in modes
/obj/item/pipe_painter/examine(mob/user)
. = ..()
@@ -0,0 +1,22 @@
/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]