Fixes the white cane sounds, and blind mob's examine. (#67941)

This commit is contained in:
ArcaneMusic
2022-06-24 16:58:51 -07:00
committed by GitHub
parent d47a22a876
commit 9d826a5e7f
4 changed files with 13 additions and 8 deletions
-2
View File
@@ -40,8 +40,6 @@
#define IGNORE_DIGITIGRADE (1<<18)
/// Has contextual screentips when HOVERING OVER OTHER objects
#define ITEM_HAS_CONTEXTUAL_SCREENTIPS (1 << 19)
/// Item still allows you to examine items while blind and actively held.
#define BLIND_TOOL (1 << 20)
// Flags for the clothing_flags var on /obj/item/clothing
+5
View File
@@ -413,6 +413,9 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
/// Whether or not orbiting is blocked or not
#define TRAIT_ORBITING_FORBIDDEN "orbiting_forbidden"
/// Item still allows you to examine items while blind and actively held.
#define TRAIT_BLIND_TOOL "blind_tool"
// METABOLISMS
// Various jobs on the station have historically had better reactions
// to various drinks and foodstuffs. Security liking donuts is a classic
@@ -812,6 +815,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define ORBITING_TRAIT "orbiting"
/// From the item_scaling element
#define ITEM_SCALING_TRAIT "item_scaling"
/// Trait given by Objects that provide blindsight
#define ITEM_BLIND_TRAIT "blind_item_trait"
/**
* Trait granted by [/mob/living/carbon/Initialize] and
+2 -1
View File
@@ -455,18 +455,19 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi'
force = 1
w_class = WEIGHT_CLASS_SMALL
item_flags = BLIND_TOOL
custom_materials = list(/datum/material/iron = 600)
/obj/item/cane/white/Initialize(mapload)
. = ..()
AddComponent(/datum/component/transforming, \
force_on = 7, \
hitsound_on = hitsound, \
w_class_on = WEIGHT_CLASS_BULKY, \
clumsy_check = FALSE, \
attack_verb_continuous_on = list("smacks", "strikes", "cracks", "beats"), \
attack_verb_simple_on = list("smack", "strike", "crack", "beat"))
RegisterSignal(src, COMSIG_TRANSFORMING_ON_TRANSFORM, .proc/on_transform)
ADD_TRAIT(src, TRAIT_BLIND_TOOL, ITEM_BLIND_TRAIT)
/*
* Signal proc for [COMSIG_TRANSFORMING_ON_TRANSFORM].
+6 -5
View File
@@ -552,11 +552,12 @@
/// the item in our active hand
var/obj/item/active_item = get_active_held_item()
var/boosted = FALSE
if(active_item.item_flags & BLIND_TOOL)
boosted = TRUE
if(active_item && active_item != examined_thing && !(active_item.item_flags & BLIND_TOOL))
to_chat(src, span_warning("Your hands are too full to examine this!"))
return FALSE
if(active_item)
if(HAS_TRAIT(active_item, TRAIT_BLIND_TOOL))
boosted = TRUE
else if(active_item != examined_thing)
to_chat(src, span_warning("Your hands are too full to examine this!"))
return FALSE
//you can only initiate exaimines if you have a hand, it's not disabled, and only as many examines as you have hands
/// our active hand, to check if it's disabled/detatched