Merge pull request #8581 from Ghommie/Ghommie-cit42

[Ready]Reskinnable PDAs.
This commit is contained in:
kevinz000
2019-06-28 20:30:05 -07:00
committed by GitHub
16 changed files with 182 additions and 99 deletions
@@ -1,4 +0,0 @@
//Overrides TG's PDA sprites with Cit's PDA sprites. Remind me to turn this into a pref somewhere down the line.
/obj/item/pda
icon = 'modular_citadel/icons/obj/pda.dmi'
@@ -16,6 +16,7 @@
"purple hypovial" = "hypovial-p",
"black hypovial" = "hypovial-t"
)
always_reskinnable = TRUE
/obj/item/reagent_containers/glass/bottle/vial/Initialize()
. = ..()
@@ -29,17 +30,6 @@
/obj/item/reagent_containers/glass/bottle/vial/on_reagent_change()
update_icon()
/obj/item/reagent_containers/glass/bottle/vial/reskin_obj(mob/M) //Makes the vials completely reskinnable, and renames them - overrides /obj/proc/reskin_obj
if(!LAZYLEN(unique_reskin))
return
var/choice = input(M,"Do you wish to recolour your [src]?","Vial Recolour") as null|anything in unique_reskin
if(!QDELETED(src) && choice && !current_skin && !M.incapacitated() && in_range(M,src))
if(!unique_reskin[choice])
return
icon_state = unique_reskin[choice]
name = choice
to_chat(M, "[src] is now skinned as '[choice].'")
/obj/item/reagent_containers/glass/bottle/vial/update_icon()
cut_overlays()
if(reagents.total_volume)