Allows painting of padded stools, chairs and beds. (#12855)

This commit is contained in:
Wowzewow (Wezzy)
2021-12-26 21:12:36 +01:00
committed by GitHub
parent e2abc62193
commit 96f1c79d0e
8 changed files with 269 additions and 164 deletions
+16 -4
View File
@@ -13,6 +13,7 @@
var/material/material
var/perunit
var/apply_colour //temp pending icon rewrite
var/painted_colour
var/use_material_sound = TRUE
/obj/item/stack/material/Initialize(mapload, amount)
@@ -32,7 +33,9 @@
perunit = SHEET_MATERIAL_AMOUNT
if(apply_colour)
color = material.icon_colour
var/image/I = new(icon, icon_state)
I.color = material.icon_colour
add_overlay(I)
if(use_material_sound) // SEE MATERIALS.DM
drop_sound = material.drop_sound
@@ -61,8 +64,16 @@
/obj/item/stack/material/update_icon()
. = ..()
cut_overlays()
if(material)
update_strings()
if(apply_colour) // This is ass, but stops maptext from getting colored.
var/image/I = new(icon, icon_state)
if(!painted_colour)
I.color = material.icon_colour
else
I.color = painted_colour
add_overlay(I)
/obj/item/stack/material/transfer_to(obj/item/stack/S, var/tamount=null, var/type_verified)
var/obj/item/stack/material/M = S
@@ -92,7 +103,7 @@
name = "iron"
icon_state = "sheet-silver"
default_type = MATERIAL_IRON
apply_colour = 1
apply_colour = TRUE
/obj/item/stack/material/iron/full/Initialize()
. = ..()
@@ -223,7 +234,7 @@
name = "tritium"
icon_state = "sheet-silver"
default_type = MATERIAL_TRITIUM
apply_colour = 1
apply_colour = TRUE
/obj/item/stack/material/tritium/full/Initialize()
. = ..()
@@ -234,7 +245,7 @@
name = "osmium"
icon_state = "sheet-silver"
default_type = MATERIAL_OSMIUM
apply_colour = 1
apply_colour = TRUE
/obj/item/stack/material/osmium/full/Initialize()
. = ..()
@@ -315,6 +326,7 @@
icon_state = "sheet-cloth"
default_type = MATERIAL_CLOTH
icon_has_variants = TRUE
apply_colour = TRUE
/obj/item/stack/material/cloth/full/Initialize()
. = ..()
-42
View File
@@ -893,48 +893,6 @@
pickup_sound = 'sound/items/pickup/cloth.ogg'
weapon_hitsound = 'sound/weapons/towelwhip.ogg'
/material/cloth/teal
name = MATERIAL_CLOTH_TEAL
display_name ="teal"
use_name = "teal cloth"
icon_colour = "#00EAFA"
/material/cloth/black
name = MATERIAL_CLOTH_BLACK
display_name = "black"
use_name = "black cloth"
icon_colour = "#505050"
/material/cloth/green
name = MATERIAL_CLOTH_GREEN
display_name = "green"
use_name = "green cloth"
icon_colour = "#01C608"
/material/cloth/purple
name = MATERIAL_CLOTH_PURPLE
display_name = "purple"
use_name = "purple cloth"
icon_colour = "#9C56C4"
/material/cloth/blue
name = MATERIAL_CLOTH_BLUE
display_name = "blue"
use_name = "blue cloth"
icon_colour = "#6B6FE3"
/material/cloth/beige
name = MATERIAL_CLOTH_BEIGE
display_name = "beige"
use_name = "beige cloth"
icon_colour = "#E8E7C8"
/material/cloth/lime
name = MATERIAL_CLOTH_LIME
display_name = "lime"
use_name = "lime cloth"
icon_colour = "#62E36C"
/material/hide //TODO make different hides somewhat different among them
name = MATERIAL_HIDE
stack_origin_tech = list(TECH_MATERIAL = 2)