Deleting poly clothes copypasta.
This commit is contained in:
@@ -91,3 +91,14 @@
|
||||
heat_protection = HEAD
|
||||
max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF | GOLIATH_RESISTANCE
|
||||
|
||||
/obj/item/clothing/neck/cloak/polychromic
|
||||
name = "polychromic cloak"
|
||||
desc = "For when you want to show off your horrible colour coordination skills."
|
||||
icon_state = "polyce"
|
||||
item_state = "qmcloak"
|
||||
var/list/poly_colors = list("#FFFFFF", "#FFFFFF", "#808080")
|
||||
|
||||
/obj/item/clothing/neck/cloak/polychromic/ComponentInitialize()
|
||||
. = ..()
|
||||
AddElement(/datum/element/polychromic, poly_colors, 3)
|
||||
|
||||
@@ -974,70 +974,11 @@
|
||||
icon_state = "coatpoly"
|
||||
item_state = "coatpoly"
|
||||
hoodtype = /obj/item/clothing/head/hooded/winterhood/polychromic
|
||||
hasprimary = TRUE
|
||||
hassecondary = TRUE
|
||||
hastertiary = TRUE
|
||||
primary_color = "#6A6964"
|
||||
secondary_color = "#C4B8A6"
|
||||
tertiary_color = "#0000FF"
|
||||
|
||||
/obj/item/clothing/suit/hooded/wintercoat/ComponentInitialize()
|
||||
. = ..()
|
||||
AddElement(/datum/element/polychromic, list("#6A6964", "#C4B8A6", "#0000FF"), 3)
|
||||
|
||||
/obj/item/clothing/head/hooded/winterhood/polychromic
|
||||
icon_state = "winterhood_poly"
|
||||
item_state = "winterhood_poly"
|
||||
|
||||
/obj/item/clothing/head/hooded/winterhood/polychromic/worn_overlays(isinhands, icon_file, used_state, style_flags = NONE) //this is where the main magic happens.
|
||||
. = ..()
|
||||
if(suit.hasprimary | suit.hassecondary)
|
||||
if(!isinhands) //prevents the worn sprites from showing up if you're just holding them
|
||||
if(suit.hasprimary) //checks if overlays are enabled
|
||||
var/mutable_appearance/primary_worn = mutable_appearance(icon_file, "[icon_state]-primary") //automagical sprite selection
|
||||
primary_worn.color = suit.primary_color //colors the overlay
|
||||
. += primary_worn //adds the overlay onto the buffer list to draw on the mob sprite.
|
||||
if(suit.hassecondary)
|
||||
var/mutable_appearance/secondary_worn = mutable_appearance(icon_file, "[icon_state]-secondary")
|
||||
secondary_worn.color = suit.secondary_color
|
||||
. += secondary_worn
|
||||
|
||||
/obj/item/clothing/suit/hooded/wintercoat/polychromic/worn_overlays(isinhands, icon_file, used_state, style_flags = NONE) //this is where the main magic happens.
|
||||
. = ..()
|
||||
if(hasprimary | hassecondary | hastertiary)
|
||||
if(!isinhands) //prevents the worn sprites from showing up if you're just holding them
|
||||
if(hasprimary) //checks if overlays are enabled
|
||||
var/mutable_appearance/primary_worn = mutable_appearance(icon_file, "[icon_state]-primary[suittoggled ? "_t" : ""]") //automagical sprite selection
|
||||
primary_worn.color = primary_color //colors the overlay
|
||||
. += primary_worn //adds the overlay onto the buffer list to draw on the mob sprite.
|
||||
if(hassecondary)
|
||||
var/mutable_appearance/secondary_worn = mutable_appearance(icon_file, "[icon_state]-secondary[suittoggled ? "_t" : ""]")
|
||||
secondary_worn.color = secondary_color
|
||||
. += secondary_worn
|
||||
if(hastertiary)
|
||||
var/mutable_appearance/tertiary_worn = mutable_appearance(icon_file, "[icon_state]-tertiary[suittoggled ? "_t" : ""]")
|
||||
tertiary_worn.color = tertiary_color
|
||||
. += tertiary_worn
|
||||
|
||||
/obj/item/clothing/suit/hooded/wintercoat/AltClick(mob/user)
|
||||
. = ..()
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
return
|
||||
if(hasprimary | hassecondary | hastertiary)
|
||||
var/choice = input(user,"polychromic thread options", "Clothing Recolor") as null|anything in list("[hasprimary ? "Primary Color" : ""]", "[hassecondary ? "Secondary Color" : ""]", "[hastertiary ? "Tertiary Color" : ""]") //generates a list depending on the enabled overlays
|
||||
switch(choice) //Lets the list's options actually lead to something
|
||||
if("Primary Color")
|
||||
var/primary_color_input = input(usr,"","Choose Primary Color",primary_color) as color|null //color input menu, the "|null" adds a cancel button to it.
|
||||
if(primary_color_input) //Checks if the color selected is NULL, rejects it if it is NULL.
|
||||
primary_color = sanitize_hexcolor(primary_color_input, desired_format=6, include_crunch=1) //formats the selected color properly
|
||||
update_icon() //updates the item icon
|
||||
user.regenerate_icons() //updates the worn icon. Probably a bad idea, but it works.
|
||||
if("Secondary Color")
|
||||
var/secondary_color_input = input(usr,"","Choose Secondary Color",secondary_color) as color|null
|
||||
if(secondary_color_input)
|
||||
secondary_color = sanitize_hexcolor(secondary_color_input, desired_format=6, include_crunch=1)
|
||||
update_icon()
|
||||
user.regenerate_icons()
|
||||
if("Tertiary Color")
|
||||
var/tertiary_color_input = input(usr,"","Choose Tertiary Color",tertiary_color) as color|null
|
||||
if(tertiary_color_input)
|
||||
tertiary_color = sanitize_hexcolor(tertiary_color_input, desired_format=6, include_crunch=1)
|
||||
update_icon()
|
||||
user.regenerate_icons()
|
||||
return TRUE
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
var/hoodtype = /obj/item/clothing/head/hooded/winterhood //so the chaplain hoodie or other hoodies can override this
|
||||
|
||||
/obj/item/clothing/suit/hooded/New()
|
||||
MakeHood()
|
||||
hood = MakeHelmet()
|
||||
..()
|
||||
|
||||
/obj/item/clothing/suit/hooded/Destroy()
|
||||
@@ -14,11 +14,15 @@
|
||||
qdel(hood)
|
||||
hood = null
|
||||
|
||||
/obj/item/clothing/suit/hooded/proc/MakeHood()
|
||||
/obj/item/clothing/suit/proc/MakeHelmet(obj/item/clothing/head/H)
|
||||
SEND_SIGNAL(src, COMSIG_SUIT_MADE_HELMET, H)
|
||||
return H
|
||||
|
||||
/obj/item/clothing/suit/hooded/MakeHelmet(obj/item/clothing/head/hooded/H)
|
||||
if(!hood)
|
||||
var/obj/item/clothing/head/hooded/W = new hoodtype(src)
|
||||
W.suit = src
|
||||
hood = W
|
||||
H = new hoodtype(src)
|
||||
H.suit = src
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/suit/hooded/ui_action_click()
|
||||
ToggleHood()
|
||||
@@ -125,7 +129,7 @@
|
||||
|
||||
//Hardsuit toggle code
|
||||
/obj/item/clothing/suit/space/hardsuit/Initialize()
|
||||
MakeHelmet()
|
||||
helmet = MakeHelmet()
|
||||
. = ..()
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/Destroy()
|
||||
@@ -140,13 +144,13 @@
|
||||
suit.helmet = null
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/proc/MakeHelmet()
|
||||
/obj/item/clothing/suit/space/hardsuit/MakeHelmet(obj/item/clothing/head/helmet/space/hardsuit/H)
|
||||
if(!helmettype)
|
||||
return
|
||||
if(!helmet)
|
||||
var/obj/item/clothing/head/helmet/space/hardsuit/W = new helmettype(src)
|
||||
W.suit = src
|
||||
helmet = W
|
||||
H = new helmettype(src)
|
||||
H.suit = src
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/ui_action_click()
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user