From daa6a854ff1e5eed345c0ef0c57ab980d6d8762c Mon Sep 17 00:00:00 2001 From: Gatchapod <20936555+Gatchapod@users.noreply.github.com> Date: Fri, 17 Oct 2025 19:08:13 +0200 Subject: [PATCH] Tajaran veils can be decorative again. (#30576) * Toggleable veil electronics * Good enough * Update code/modules/clothing/glasses/tajblind.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: Gatchapod <20936555+Gatchapod@users.noreply.github.com> --------- Signed-off-by: Gatchapod <20936555+Gatchapod@users.noreply.github.com> Co-authored-by: Gatchapod Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> --- code/modules/clothing/clothing.dm | 1 + .../clothing/glasses/engine_goggles.dm | 4 +- code/modules/clothing/glasses/glasses.dm | 33 +++---- code/modules/clothing/glasses/tajblind.dm | 90 +++++++++++++++++-- 4 files changed, 107 insertions(+), 21 deletions(-) diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 5ee9bc28ac9..9853cd71cf4 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -199,6 +199,7 @@ var/over_mask = FALSE //Whether or not the eyewear is rendered above the mask. Purely cosmetic. /// If TRUE, will hide the wearer's examines from other players. var/hide_examine = FALSE + new_attack_chain = TRUE /* * SEE_SELF // can see self, no matter what diff --git a/code/modules/clothing/glasses/engine_goggles.dm b/code/modules/clothing/glasses/engine_goggles.dm index eed11f61b1c..d03aad6e984 100644 --- a/code/modules/clothing/glasses/engine_goggles.dm +++ b/code/modules/clothing/glasses/engine_goggles.dm @@ -77,7 +77,9 @@ update_icon(UPDATE_ICON_STATE) update_action_buttons() -/obj/item/clothing/glasses/meson/engine/attack_self__legacy__attackchain(mob/user) +/obj/item/clothing/glasses/meson/engine/activate_self(mob/user) + if(..()) + return toggle_mode(user, TRUE) /obj/item/clothing/glasses/meson/engine/process() diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm index 9ac6eb9c97c..df0e23fc08e 100644 --- a/code/modules/clothing/glasses/glasses.dm +++ b/code/modules/clothing/glasses/glasses.dm @@ -6,22 +6,19 @@ if(hide_examine) ADD_TRAIT(src, TRAIT_HIDE_EXAMINE, INNATE_TRAIT) -/obj/item/clothing/glasses/attackby__legacy__attackchain(obj/item/I, mob/user) +/obj/item/clothing/glasses/item_interaction(mob/living/user, obj/item/used, list/modifiers) if(!prescription_upgradable || user.stat || user.restrained() || !ishuman(user)) return ..() - var/mob/living/carbon/human/H = user - // Adding prescription glasses - if(istype(I, /obj/item/clothing/glasses/regular)) + if(istype(used, /obj/item/clothing/glasses/regular)) if(prescription) - to_chat(H, "You can't possibly imagine how adding more lenses would improve [src].") - return - H.drop_item_to_ground(I) - upgrade_prescription(I) - to_chat(H, "You fit [src] with lenses from [I].") - - // Removing prescription glasses - H.update_nearsighted_effects() + to_chat(user, "You can't possibly imagine how adding more lenses would improve [src].") + return ITEM_INTERACT_COMPLETE + user.drop_item_to_ground(used) + upgrade_prescription(used) + to_chat(user, "You fit [src] with lenses from [used].") + user.update_nearsighted_effects() + return ITEM_INTERACT_COMPLETE /obj/item/clothing/glasses/proc/upgrade_prescription(obj/item/I) if(!I) @@ -303,7 +300,9 @@ desc = "Somehow these seem even more out-of-date than normal sunglasses." actions_types = list(/datum/action/item_action/noir) -/obj/item/clothing/glasses/sunglasses/noir/attack_self__legacy__attackchain(mob/user) +/obj/item/clothing/glasses/sunglasses/noir/activate_self(mob/user) + if(..()) + return toggle_noir(user) /obj/item/clothing/glasses/sunglasses/noir/item_action_slot_check(slot) @@ -320,7 +319,9 @@ var/punused = FALSE actions_types = list(/datum/action/item_action/yeeeaaaaahhhhhhhhhhhhh) -/obj/item/clothing/glasses/sunglasses/yeah/attack_self__legacy__attackchain(mob/user) +/obj/item/clothing/glasses/sunglasses/yeah/activate_self(mob/user) + if(..()) + return pun(user) /obj/item/clothing/glasses/sunglasses/yeah/proc/pun(mob/user) @@ -376,7 +377,9 @@ visor_vars_to_toggle = VISOR_FLASHPROTECT | VISOR_TINT icon_monitor = 'icons/mob/clothing/species/machine/monitor/eyes.dmi' -/obj/item/clothing/glasses/welding/attack_self__legacy__attackchain(mob/user) +/obj/item/clothing/glasses/welding/activate_self(mob/user) + if(..()) + return weldingvisortoggle(user) /obj/item/clothing/glasses/welding/superior diff --git a/code/modules/clothing/glasses/tajblind.dm b/code/modules/clothing/glasses/tajblind.dm index ed9246f2daf..d92305f98cf 100644 --- a/code/modules/clothing/glasses/tajblind.dm +++ b/code/modules/clothing/glasses/tajblind.dm @@ -18,8 +18,17 @@ "Vox" = 'icons/mob/clothing/species/vox/eyes.dmi', "Grey" = 'icons/mob/clothing/species/grey/eyes.dmi' ) + /// Used to toggle features of specialised veils + var/electronics = TRUE -/obj/item/clothing/glasses/hud/tajblind/attack_self__legacy__attackchain(mob/user) + +/obj/item/clothing/glasses/hud/tajblind/examine() + . = ..() + . += "You can Ctrl-Shift-Click [src] to toggle its electronics if present." + +/obj/item/clothing/glasses/hud/tajblind/activate_self(mob/user) + if(..()) + return toggle_veil(user, TRUE) /obj/item/clothing/glasses/hud/tajblind/proc/toggle_veil(mob/user, voluntary) @@ -55,6 +64,29 @@ These current designs are adapted from recreations of the ancient veils, created by the Alchemists Guild. Technologically advanced and created to help Tajara adapt to life in the larger galactic community, they have systems built-in that allow them to have holographic huds, as well as corrective technology to help Tajaran overcome their genetic tritanopia colour blindness.
\ Availability on the wider market is highly restricted as a result of their cultural importance, as well as the patent held by the Alchemists Guild, and the lenses are very hard to reverse engineer. Popular theories suggest this as a result of the unique materials available on Adhomai, or the inability to recreate the light conditions of the Tajara homeworld." +/obj/item/clothing/glasses/hud/tajblind/CtrlShiftClick(mob/user, modifiers) + if(!initial(hud_types)) + return + if(electronics) + electronics = FALSE + to_chat(user, "You toggle electronics in [src] off.") + if(user.get_item_by_slot(ITEM_SLOT_EYES) != src) + hud_types = null + return + for(var/new_hud in hud_types) + var/datum/atom_hud/H = GLOB.huds[new_hud] + H.remove_hud_from(user) + hud_types = null + return + electronics = TRUE + to_chat(user, "You toggle electronics in [src] on.") + hud_types = list(initial(hud_types)) + if(user.get_item_by_slot(ITEM_SLOT_EYES) != src) + return + for(var/new_hud in hud_types) + var/datum/atom_hud/H = GLOB.huds[new_hud] + H.add_hud_to(user) + /obj/item/clothing/glasses/hud/tajblind/meson name = "\improper Tajaran engineering meson veil" icon_state = "tajblind_engi" @@ -63,9 +95,23 @@ . = ..() desc += "
It has an optical meson scanner integrated into it." +/obj/item/clothing/glasses/hud/tajblind/meson/CtrlShiftClick(mob/user, modifiers) + if(electronics) + electronics = FALSE + if(user.get_item_by_slot(ITEM_SLOT_EYES) == src) + REMOVE_TRAIT(user, TRAIT_MESON_VISION, "meson_glasses[UID()]") + user.update_sight() + to_chat(user, "You toggle electronics in [src] off.") + return + electronics = TRUE + if(user.get_item_by_slot(ITEM_SLOT_EYES) == src) + ADD_TRAIT(user, TRAIT_MESON_VISION, "meson_glasses[UID()]") + user.update_sight() + to_chat(user, "You toggle electronics in [src] on.") + /obj/item/clothing/glasses/hud/tajblind/meson/equipped(mob/user, slot, initial) . = ..() - if(slot == ITEM_SLOT_EYES) + if(slot == ITEM_SLOT_EYES && electronics) ADD_TRAIT(user, TRAIT_MESON_VISION, "meson_glasses[UID()]") /obj/item/clothing/glasses/hud/tajblind/meson/dropped(mob/user) @@ -80,13 +126,23 @@ /obj/item/clothing/glasses/hud/tajblind/sci name = "\improper Tajaran scientific veil" icon_state = "tajblind_sci" - scan_reagents = 1 + scan_reagents = TRUE actions_types = list(/datum/action/item_action/toggle, /datum/action/item_action/toggle_research_scanner) /obj/item/clothing/glasses/hud/tajblind/sci/Initialize(mapload) . = ..() desc += "
It has science goggles integrated into it." +/obj/item/clothing/glasses/hud/tajblind/sci/CtrlShiftClick(mob/user, modifiers) + if(electronics) + electronics = FALSE + scan_reagents = FALSE + to_chat(user, "You toggle electronics in [src] off.") + return + electronics = TRUE + scan_reagents = TRUE + to_chat(user, "You toggle electronics in [src] on.") + /obj/item/clothing/glasses/hud/tajblind/sci/item_action_slot_check(slot) if(slot == ITEM_SLOT_EYES) return TRUE @@ -126,9 +182,23 @@ . = ..() desc += "
It has an optical meson scanner integrated into it." +/obj/item/clothing/glasses/hud/tajblind/shaded/meson/CtrlShiftClick(mob/user, modifiers) + if(electronics) + electronics = FALSE + if(user.get_item_by_slot(ITEM_SLOT_EYES) == src) + REMOVE_TRAIT(user, TRAIT_MESON_VISION, "meson_glasses[UID()]") + user.update_sight() + to_chat(user, "You toggle electronics in [src] off.") + return + electronics = TRUE + if(user.get_item_by_slot(ITEM_SLOT_EYES) == src) + ADD_TRAIT(user, TRAIT_MESON_VISION, "meson_glasses[UID()]") + user.update_sight() + to_chat(user, "You toggle electronics in [src] on.") + /obj/item/clothing/glasses/hud/tajblind/shaded/meson/equipped(mob/user, slot, initial) . = ..() - if(slot == ITEM_SLOT_EYES) + if(slot == ITEM_SLOT_EYES && electronics) ADD_TRAIT(user, TRAIT_MESON_VISION, "meson_glasses[UID()]") /obj/item/clothing/glasses/hud/tajblind/shaded/meson/dropped(mob/user) @@ -143,13 +213,23 @@ /obj/item/clothing/glasses/hud/tajblind/shaded/sci name = "shaded Tajaran scientific veil" icon_state = "tajblind_sci" - scan_reagents = 1 + scan_reagents = TRUE actions_types = list(/datum/action/item_action/toggle, /datum/action/item_action/toggle_research_scanner) /obj/item/clothing/glasses/hud/tajblind/shaded/sci/Initialize(mapload) . = ..() desc += "
It has science goggles integrated into it." +/obj/item/clothing/glasses/hud/tajblind/shaded/sci/CtrlShiftClick(mob/user, modifiers) + if(electronics) + electronics = FALSE + scan_reagents = FALSE + to_chat(user, "You toggle electronics in [src] off.") + return + electronics = TRUE + scan_reagents = TRUE + to_chat(user, "You toggle electronics in [src] on.") + /obj/item/clothing/glasses/hud/tajblind/shaded/sci/item_action_slot_check(slot) if(slot == ITEM_SLOT_EYES) return TRUE