diff --git a/code/modules/loadout/categories/heads.dm b/code/modules/loadout/categories/heads.dm index 8fd2c268c1105..86858b3aff1a4 100644 --- a/code/modules/loadout/categories/heads.dm +++ b/code/modules/loadout/categories/heads.dm @@ -126,7 +126,7 @@ /* /datum/loadout_item/head/plague_doctor // DOPPLER EDIT REMOVAL name = "Cap (Plague Doctor)" - item_path = /obj/item/clothing/head/bio_hood/plague + item_path = /obj/item/clothing/head/bio_hood/plague */ /datum/loadout_item/head/rose name = "Rose" @@ -150,7 +150,7 @@ /datum/loadout_item/head/harebell name = "Harebell" - item_path = /obj/item/food/grown/harebell */ + item_path = /obj/item/food/grown/harebell /datum/loadout_item/head/wig name = "Wig" diff --git a/modular_doppler/loadout_categories/categories/glasses.dm b/modular_doppler/loadout_categories/categories/glasses.dm index d63e1d99821c2..50d99accf50c0 100644 --- a/modular_doppler/loadout_categories/categories/glasses.dm +++ b/modular_doppler/loadout_categories/categories/glasses.dm @@ -17,3 +17,7 @@ /datum/loadout_item/glasses/fake_blindfold name = "Fake Blindfold" item_path = /obj/item/clothing/glasses/trickblindfold + +/datum/loadout_item/glasses/techno_visor + name = "Techno-Visor" + item_path = /obj/item/clothing/glasses/techno_visor diff --git a/modular_doppler/super_glasses/code/glasses_stats_thief.dm b/modular_doppler/super_glasses/code/glasses_stats_thief.dm new file mode 100644 index 0000000000000..9a36a9c6cd08c --- /dev/null +++ b/modular_doppler/super_glasses/code/glasses_stats_thief.dm @@ -0,0 +1,47 @@ +/datum/component/glasses_stats_thief + +/datum/component/glasses_stats_thief/Initialize(successful_robberies = 1) + if(!isclothing(parent)) + return COMPONENT_INCOMPATIBLE + + RegisterSignal(parent, COMSIG_ITEM_INTERACTING_WITH_ATOM, PROC_REF(try_consume)) + RegisterSignal(parent, COMSIG_ATOM_EXAMINE, PROC_REF(examine)) + + src.successful_robberies = successful_robberies + +/datum/component/glasses_stats_thief/proc/examine(datum/source, mob/user, list/examine_list) + SIGNAL_HANDLER + + examine_list += span_notice("You can use this on another pair of glasses to copy the hud, flash protection, night vision, etc. from them.") + +/// Checks if the atom interacted with has the requirements to be consumed or not +/datum/component/glasses_stats_thief/proc/try_consume(datum/source, mob/living/user, obj/item/thing) + SIGNAL_HANDLER + + var/obj/item/clothing/glasses/attacking_glasses = thing + if(!istype(attacking_glasses)) + return + // Do the glasses attacking us have any of the things we care about? + if(!attacking_glasses.color_cutoffs && (!attacking_glasses.flash_protect != FLASH_PROTECTION_NONE) && (!length(attacking_glasses.clothing_traits)) && !attacking_glasses.vision_flags) + return + INVOKE_ASYNC(src, PROC_REF(consume), user, thing) + +/// Attempts to consume the glasses we are passed and add their stats to the parent +/datum/component/glasses_stats_thief/proc/consume(mob/living/carbon/human/user, obj/item/clothing/glasses/slick_shades) + if(!slick_shades) + return + if(!do_after(user, 5 SECONDS, slick_shades)) + return + + var/obj/item/clothing/glasses/thief = parent + + thief.color_cutoffs = slick_shades.color_cutoffs + thief.forced_glass_color = slick_shades.forced_glass_color + thief.change_glass_color(slick_shades.glass_colour_type) + thief.clothing_traits = slick_shades.clothing_traits + thief.flash_protect = slick_shades.flash_protect + thief.vision_flags = slick_shades.vision_flags + thief.tint = slick_shades.tint + playsound(slick_shades, 'sound/effects/industrial_scan/industrial_scan1.ogg', 50, TRUE) + do_sparks(3, FALSE, slick_shades) + qdel(slick_shades) diff --git a/modular_doppler/super_glasses/code/techno_visors.dm b/modular_doppler/super_glasses/code/techno_visors.dm new file mode 100644 index 0000000000000..c75217d510f6d --- /dev/null +++ b/modular_doppler/super_glasses/code/techno_visors.dm @@ -0,0 +1,38 @@ +/obj/item/clothing/glasses/techno_visor + name = "techno-visor" + desc = "A complicated, curved visor with a network of cameras that allow vision through it. \ + Has the unique ability to consume the traits of specialized huds and glasses it touches, \ + becoming like the much lamer piece of eyewear it just destroyed. Surely it's fine to have this \ + so close to your eyes." + icon = 'modular_doppler/super_glasses/icons/visors.dmi' + icon_state = "black" + worn_icon = 'modular_doppler/super_glasses/icons/worn/visors.dmi' + worn_icon_state = "black" + obj_flags = UNIQUE_RENAME | INFINITE_RESKIN + uses_advanced_reskins = TRUE + unique_reskin = list( + "Tactical Black" = list( + RESKIN_ICON_STATE = "black", + RESKIN_WORN_ICON_STATE = "black", + ), + "Shiny Steel" = list( + RESKIN_ICON_STATE = "shiny", + RESKIN_WORN_ICON_STATE = "shiny", + ), + "Polished Copper" = list( + RESKIN_ICON_STATE = "copper", + RESKIN_WORN_ICON_STATE = "copper", + ), + "Display Green" = list( + RESKIN_ICON_STATE = "green", + RESKIN_WORN_ICON_STATE = "green", + ), + "Vintage Computer" = list( + RESKIN_ICON_STATE = "vintage", + RESKIN_WORN_ICON_STATE = "vintage", + ), + ) + +/obj/item/clothing/glasses/techno_visor/Initialize(mapload) + . = ..() + AddComponent(/datum/component/glasses_stats_thief) diff --git a/modular_doppler/super_glasses/icons/visors.dmi b/modular_doppler/super_glasses/icons/visors.dmi new file mode 100644 index 0000000000000..7c1d4459a7f9a Binary files /dev/null and b/modular_doppler/super_glasses/icons/visors.dmi differ diff --git a/modular_doppler/super_glasses/icons/worn/visors.dmi b/modular_doppler/super_glasses/icons/worn/visors.dmi new file mode 100644 index 0000000000000..5fb9af6187c5d Binary files /dev/null and b/modular_doppler/super_glasses/icons/worn/visors.dmi differ diff --git a/tgstation.dme b/tgstation.dme index 9fb5ba4b91a1d..48ca73dfea85f 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -7206,6 +7206,8 @@ #include "modular_doppler\sprite_swaps\code\bigclosets.dm" #include "modular_doppler\stone\code\ore_veins.dm" #include "modular_doppler\stone\code\stone.dm" +#include "modular_doppler\super_glasses\code\glasses_stats_thief.dm" +#include "modular_doppler\super_glasses\code\techno_visors.dm" #include "modular_doppler\tableflip\tableflip.dm" #include "modular_doppler\the-business\code\twitch.dm" #include "modular_doppler\time_clock\code\console.dm"