diff --git a/code/game/objects/items/weapons/misc_items.dm b/code/game/objects/items/weapons/misc_items.dm index fccf75455f7..57802f04de3 100644 --- a/code/game/objects/items/weapons/misc_items.dm +++ b/code/game/objects/items/weapons/misc_items.dm @@ -37,6 +37,51 @@ /obj/item/cane/get_crutch_efficiency() return 2 +/obj/item/blindcane + name = "white cane" + desc = "A white cane for the visually impaired to feel their way around, though not sturdy enough to lean on. It easily folds up into a bag or pocket." + icon = 'icons/obj/weapons/melee.dmi' // Smack! + icon_state = "blindcane" + lefthand_file = 'icons/mob/inhands/weapons_lefthand.dmi' + righthand_file = 'icons/mob/inhands/weapons_righthand.dmi' + flags = CONDUCT + force = 5 + throwforce = 7 + w_class = WEIGHT_CLASS_SMALL // Canes can fold up to fit in bags or pockets + materials = list(MAT_METAL = 50) + attack_verb = list("smacked", "whacked", "bumped", "struck") + new_attack_chain = TRUE + +/obj/item/blindcane/pre_attack(atom/target, mob/living/user, params) + . = ..() + if(!(ismob(target) || istype(target, /obj/structure) || istype(target, /obj/machinery))) + return + + if(user.a_intent == INTENT_HELP) + user.do_attack_animation(target) + user.visible_message( + "[user] has prodded [target] with [src].", + "You prod [target] with [src]." + ) + if(HAS_TRAIT(user, TRAIT_BLIND)) + to_chat(user, "You feel [target] with [src].") + playsound(loc, 'sound/weapons/tap.ogg', 50, TRUE, -1) + + else if(user.a_intent == INTENT_DISARM && ismob(target)) //Harmless smack + user.visible_message( + "[user] harmlessly slaps [target] with the end of the white cane.", + "You harmlessly slap [target] with the end of the white cane." + ) + if(HAS_TRAIT(user, TRAIT_BLIND)) + to_chat(user, "You harmlessly slap [target] with the end of the white cane.") + user.do_attack_animation(target, ATTACK_EFFECT_DISARM) + playsound(loc, 'sound/effects/woodhit.ogg', 50, TRUE, -1) + + else // If the user is not on help or disarm intent + return // Harmful smack + + return FINISH_ATTACK | MELEE_COOLDOWN_PREATTACK + /obj/item/crutches name = "crutches" desc = "A medical device to help those who have injured or missing legs to walk." diff --git a/code/modules/client/preference/loadout/loadout_general.dm b/code/modules/client/preference/loadout/loadout_general.dm index 2877c0ea576..2798629813f 100644 --- a/code/modules/client/preference/loadout/loadout_general.dm +++ b/code/modules/client/preference/loadout/loadout_general.dm @@ -129,6 +129,10 @@ display_name = "Walking cane" path = /obj/item/cane +/datum/gear/blindcane + display_name = "Blind cane" + path = /obj/item/blindcane + /datum/gear/cards display_name = "Deck of standard cards" path = /obj/item/deck/cards diff --git a/code/modules/client/preference/quirks/negative_quirks.dm b/code/modules/client/preference/quirks/negative_quirks.dm index 1a317f85189..5af0f278561 100644 --- a/code/modules/client/preference/quirks/negative_quirks.dm +++ b/code/modules/client/preference/quirks/negative_quirks.dm @@ -49,8 +49,7 @@ cost = -4 trait_to_apply = TRAIT_BLIND blacklisted = TRUE - item_to_give = /obj/item/clothing/glasses/sunglasses/blindfold - item_slot = ITEM_SLOT_EYES + item_to_give = /obj/item/blindcane /datum/quirk/mute name = "Mute" diff --git a/icons/mob/inhands/weapons_lefthand.dmi b/icons/mob/inhands/weapons_lefthand.dmi index a20292fcaef..3a9032a38c3 100644 Binary files a/icons/mob/inhands/weapons_lefthand.dmi and b/icons/mob/inhands/weapons_lefthand.dmi differ diff --git a/icons/mob/inhands/weapons_righthand.dmi b/icons/mob/inhands/weapons_righthand.dmi index 892c160ab76..7b7d8bcc2b6 100644 Binary files a/icons/mob/inhands/weapons_righthand.dmi and b/icons/mob/inhands/weapons_righthand.dmi differ diff --git a/icons/obj/weapons/melee.dmi b/icons/obj/weapons/melee.dmi index 1ea2ed6fc7b..dec7dbf8906 100644 Binary files a/icons/obj/weapons/melee.dmi and b/icons/obj/weapons/melee.dmi differ