mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-21 03:56:47 +01:00
Added a colour selector to the floor painter, added the floor painter to the construction and drone modules.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
|
||||
var/decal = "remove all decals"
|
||||
var/paint_dir = "precise"
|
||||
var/paint_colour = "white"
|
||||
var/paint_colour = "#FFFFFF"
|
||||
|
||||
var/list/decals = list(
|
||||
"quarter-turf" = list("path" = /obj/effect/floor_decal/corner, "precise" = 1, "coloured" = 1),
|
||||
@@ -39,37 +39,6 @@
|
||||
"northeast" = NORTHEAST,
|
||||
"precise" = 0
|
||||
)
|
||||
var/list/paint_colours = list(
|
||||
"white" = COLOR_WHITE,
|
||||
"light gray" = COLOR_SILVER,
|
||||
"dark gray" = COLOR_GRAY,
|
||||
"blue-gray" = COLOR_BLUE_GRAY,
|
||||
"pale blue-gray" = COLOR_PALE_BLUE_GRAY,
|
||||
"green-gray" = COLOR_GREEN_GRAY,
|
||||
"pale green-gray" = COLOR_PALE_GREEN_GRAY,
|
||||
"red-gray" = COLOR_RED_GRAY,
|
||||
"pale red-gray" = COLOR_PALE_RED_GRAY,
|
||||
"purple-gray" = COLOR_PURPLE_GRAY,
|
||||
"pale purple-gray" = COLOR_PALE_PURPLE_GRAY,
|
||||
"black" = COLOR_BLACK,
|
||||
"red" = COLOR_RED,
|
||||
"dark red" = COLOR_MAROON,
|
||||
"yellow" = COLOR_YELLOW,
|
||||
"dark yellow" = COLOR_OLIVE,
|
||||
"green" = COLOR_LIME,
|
||||
"dark green" = COLOR_GREEN,
|
||||
"cyan" = COLOR_CYAN,
|
||||
"teal" = COLOR_TEAL,
|
||||
"blue" = COLOR_BLUE,
|
||||
"dark blue" = COLOR_NAVY,
|
||||
"magenta" = COLOR_PINK,
|
||||
"purple" = COLOR_PURPLE,
|
||||
"orange" = COLOR_ORANGE,
|
||||
"dark orange" = COLOR_DARK_ORANGE,
|
||||
"dark brown" = COLOR_DARK_BROWN,
|
||||
"brown" = COLOR_BROWN,
|
||||
"pale brown" = COLOR_BEIGE
|
||||
)
|
||||
|
||||
/obj/item/device/floor_painter/afterattack(var/atom/A, var/mob/user, proximity, params)
|
||||
if(!proximity)
|
||||
@@ -127,36 +96,25 @@
|
||||
painting_dir = paint_dirs[paint_dir]
|
||||
|
||||
var/painting_colour
|
||||
if(paint_colour && !isnull(paint_colours[paint_colour]) && decal_data["coloured"])
|
||||
painting_colour = paint_colours[paint_colour]
|
||||
if(decal_data["coloured"] && paint_colour)
|
||||
painting_colour = paint_colour
|
||||
|
||||
new painting_decal(F, painting_dir, painting_colour)
|
||||
|
||||
/obj/item/device/floor_painter/attack_self(mob/user as mob)
|
||||
|
||||
/obj/item/device/floor_painter/attack_self(var/mob/user)
|
||||
var/choice = input("Do you wish to change the decal type, paint direction, or paint colour?") as null|anything in list("Decal","Direction", "Colour")
|
||||
|
||||
if(choice == "Decal")
|
||||
var/new_decal = input("Select a decal.") as null|anything in decals
|
||||
if(new_decal && !isnull(decals[new_decal]))
|
||||
decal = new_decal
|
||||
user << "<span class='notice'>You set \the [src] decal to '[decal]'.</span>"
|
||||
choose_decal()
|
||||
else if(choice == "Direction")
|
||||
var/new_dir = input("Select a direction.") as null|anything in paint_dirs
|
||||
if(new_dir && !isnull(paint_dirs[new_dir]))
|
||||
paint_dir = new_dir
|
||||
user << "<span class='notice'>You set \the [src] direction to '[paint_dir]'.</span>"
|
||||
choose_direction()
|
||||
else if(choice == "Colour")
|
||||
var/new_colour = input("Select a colour.") as null|anything in paint_colours
|
||||
if(new_colour && !isnull(paint_colours[new_colour]))
|
||||
paint_colour = new_colour
|
||||
user << "<span class='notice'>You set \the [src] colour to '[paint_colour]'.</span>"
|
||||
choose_colour()
|
||||
|
||||
/obj/item/device/floor_painter/examine(mob/user)
|
||||
..(user)
|
||||
user << "It is configured to produce the '[decal]' decal with a direction of '[paint_dir]' using [paint_colour] paint."
|
||||
|
||||
/obj/item/device/floor_painter/verb/choose_colour(new_colour in paint_colours)
|
||||
/obj/item/device/floor_painter/verb/choose_colour()
|
||||
set name = "Choose Colour"
|
||||
set desc = "Choose a floor painter colour."
|
||||
set category = "Object"
|
||||
@@ -164,12 +122,12 @@
|
||||
|
||||
if(usr.incapacitated())
|
||||
return
|
||||
|
||||
if(new_colour && !isnull(paint_colours[new_colour]))
|
||||
var/new_colour = input(usr, "Choose a colour.", "Floor painter", paint_colour) as color|null
|
||||
if(new_colour && new_colour != paint_colour)
|
||||
paint_colour = new_colour
|
||||
usr << "<span class='notice'>You set \the [src] colour to '[paint_colour]'.</span>"
|
||||
usr << "<span class='notice'>You set \the [src] to paint with <font color='[paint_colour]'>a new colour</font>.</span>"
|
||||
|
||||
/obj/item/device/floor_painter/verb/choose_decal(new_decal in decals)
|
||||
/obj/item/device/floor_painter/verb/choose_decal()
|
||||
set name = "Choose Decal"
|
||||
set desc = "Choose a floor painter decal."
|
||||
set category = "Object"
|
||||
@@ -178,11 +136,12 @@
|
||||
if(usr.incapacitated())
|
||||
return
|
||||
|
||||
var/new_decal = input("Select a decal.") as null|anything in decals
|
||||
if(new_decal && !isnull(decals[new_decal]))
|
||||
decal = new_decal
|
||||
usr << "<span class='notice'>You set \the [src] decal to '[decal]'.</span>"
|
||||
|
||||
/obj/item/device/floor_painter/verb/choose_direction(new_dir in paint_dirs)
|
||||
/obj/item/device/floor_painter/verb/choose_direction()
|
||||
set name = "Choose Direction"
|
||||
set desc = "Choose a floor painter direction."
|
||||
set category = "Object"
|
||||
@@ -191,6 +150,7 @@
|
||||
if(usr.incapacitated())
|
||||
return
|
||||
|
||||
var/new_dir = input("Select a direction.") as null|anything in paint_dirs
|
||||
if(new_dir && !isnull(paint_dirs[new_dir]))
|
||||
paint_dir = new_dir
|
||||
usr << "<span class='notice'>You set \the [src] direction to '[paint_dir]'.</span>"
|
||||
|
||||
Reference in New Issue
Block a user