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 <Gatchapod@users.noreply.github.com>
Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
This commit is contained in:
Gatchapod
2025-10-17 19:08:13 +02:00
committed by GitHub
parent fbd8930ff4
commit daa6a854ff
4 changed files with 107 additions and 21 deletions
+1
View File
@@ -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
@@ -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()
+18 -15
View File
@@ -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, "<span class='warning'>You can't possibly imagine how adding more lenses would improve [src].</span>")
return
H.drop_item_to_ground(I)
upgrade_prescription(I)
to_chat(H, "<span class='notice'>You fit [src] with lenses from [I].</span>")
// Removing prescription glasses
H.update_nearsighted_effects()
to_chat(user, "<span class='warning'>You can't possibly imagine how adding more lenses would improve [src].</span>")
return ITEM_INTERACT_COMPLETE
user.drop_item_to_ground(used)
upgrade_prescription(used)
to_chat(user, "<span class='notice'>You fit [src] with lenses from [used].</span>")
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
+85 -5
View File
@@ -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()
. = ..()
. += "<span class='notice'>You can <b>Ctrl-Shift-Click</b> [src] to toggle its electronics if present.</span>"
/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. <br>\
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, "<span class='notice'>You toggle electronics in [src] off.</span>")
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, "<span class='notice'>You toggle electronics in [src] on.</span>")
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 += "<br><span class='notice'>It has an optical meson scanner integrated into it.</span>"
/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, "<span class='notice'>You toggle electronics in [src] off.</span>")
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, "<span class='notice'>You toggle electronics in [src] on.</span>")
/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 += "<br><span class='notice'>It has science goggles integrated into it.</span>"
/obj/item/clothing/glasses/hud/tajblind/sci/CtrlShiftClick(mob/user, modifiers)
if(electronics)
electronics = FALSE
scan_reagents = FALSE
to_chat(user, "<span class='notice'>You toggle electronics in [src] off.</span>")
return
electronics = TRUE
scan_reagents = TRUE
to_chat(user, "<span class='notice'>You toggle electronics in [src] on.</span>")
/obj/item/clothing/glasses/hud/tajblind/sci/item_action_slot_check(slot)
if(slot == ITEM_SLOT_EYES)
return TRUE
@@ -126,9 +182,23 @@
. = ..()
desc += "<br><span class='notice'>It has an optical meson scanner integrated into it.</span>"
/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, "<span class='notice'>You toggle electronics in [src] off.</span>")
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, "<span class='notice'>You toggle electronics in [src] on.</span>")
/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 += "<br><span class='notice'>It has science goggles integrated into it.</span>"
/obj/item/clothing/glasses/hud/tajblind/shaded/sci/CtrlShiftClick(mob/user, modifiers)
if(electronics)
electronics = FALSE
scan_reagents = FALSE
to_chat(user, "<span class='notice'>You toggle electronics in [src] off.</span>")
return
electronics = TRUE
scan_reagents = TRUE
to_chat(user, "<span class='notice'>You toggle electronics in [src] on.</span>")
/obj/item/clothing/glasses/hud/tajblind/shaded/sci/item_action_slot_check(slot)
if(slot == ITEM_SLOT_EYES)
return TRUE