diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm index d81223dd40e..244799a7098 100644 --- a/code/defines/obj/weapon.dm +++ b/code/defines/obj/weapon.dm @@ -56,6 +56,7 @@ w_class = ITEMSIZE_LARGE matter = list(DEFAULT_WALL_MATERIAL = 50) attack_verb = list("bludgeoned", "whacked", "disciplined", "thrashed") + var/can_support = TRUE /obj/item/cane/attack(mob/living/target, mob/living/carbon/human/user, target_zone = BP_CHEST) @@ -294,6 +295,7 @@ desc = "A white cane, used by the visually impaired." icon_state = "whitecane" item_state = "whitecane" + can_support = FALSE /obj/item/cane/shillelagh name = "adhomian shillelagh" @@ -303,6 +305,48 @@ item_state = "shillelagh" contained_sprite = TRUE +/obj/item/cane/telecane + name = "telescopic cane" + desc = "A compact cane which can be collapsed for storage." + icon = 'icons/obj/contained_items/weapons/telecane.dmi' + icon_state = "telecane" + contained_sprite = TRUE + w_class = ITEMSIZE_SMALL + slot_flags = SLOT_BELT + drop_sound = 'sound/items/drop/crowbar.ogg' + pickup_sound = 'sound/items/pickup/crowbar.ogg' + var/on = FALSE + can_support = FALSE + +/obj/item/cane/telecane/attack_self(mob/user) + on = !on + if(on) + user.visible_message(SPAN_WARNING("With a flick of their wrist, [user] extends their telescopic cane."), SPAN_WARNING("You extend the cane."), SPAN_WARNING("You hear an ominous click.")) + icon_state = "telecane_1" + item_state = "telestick" + w_class = ITEMSIZE_LARGE + slot_flags = null + force = 6 + attack_verb = list("smacked", "struck", "slapped") + can_support = TRUE + else + user.visible_message(SPAN_NOTICE("\The [user] collapses their telescopic cane."), SPAN_NOTICE("You collapse the cane."), SPAN_NOTICE("You hear a click.")) + icon_state = "telecane" + item_state = "telestick_0" + w_class = ITEMSIZE_SMALL + slot_flags = SLOT_BELT + force = 3 + attack_verb = list("hit", "punched") + can_support = FALSE + + if(istype(user,/mob/living/carbon/human)) + var/mob/living/carbon/human/H = user + H.update_inv_l_hand() + H.update_inv_r_hand() + + playsound(src.loc, 'sound/weapons/click.ogg', 50, 1) + add_fingerprint(user) + /obj/item/disk name = "disk" icon = 'icons/obj/items.dmi' diff --git a/code/modules/client/preference_setup/loadout/loadout_general.dm b/code/modules/client/preference_setup/loadout/loadout_general.dm index fe61303fce5..9565328e35b 100644 --- a/code/modules/client/preference_setup/loadout/loadout_general.dm +++ b/code/modules/client/preference_setup/loadout/loadout_general.dm @@ -2,13 +2,14 @@ display_name = "cane" path = /obj/item/cane -/datum/gear/cane/crutch - display_name = "crutch" - path = /obj/item/cane/crutch - -/datum/gear/cane/white - display_name = "white cane" - path = /obj/item/cane/white +/datum/gear/cane/New() + ..() + var/list/cane = list() + cane["cane"] = /obj/item/cane + cane["telescopic cane"] = /obj/item/cane/telecane + cane["crutch"] = /obj/item/cane/crutch + cane["white cane"] = /obj/item/cane/white + gear_tweaks += new /datum/gear_tweak/path(cane) /datum/gear/dice display_name = "pack of dice" diff --git a/code/modules/mob/living/carbon/human/human_organs.dm b/code/modules/mob/living/carbon/human/human_organs.dm index 38127aeccfa..f915ac1446b 100644 --- a/code/modules/mob/living/carbon/human/human_organs.dm +++ b/code/modules/mob/living/carbon/human/human_organs.dm @@ -113,10 +113,9 @@ // One cane mitigates a broken leg+foot, or a missing foot. // No double caning allowed, sorry. Canes also don't work if you're missing a functioning pair of feet or legs. if(has_opposite_limb) - if(l_hand && istype(l_hand, /obj/item/cane)) - stance_damage -= 2 - else if(r_hand && istype(r_hand, /obj/item/cane)) - stance_damage -= 2 + var/obj/item/cane/C = get_type_in_hands(/obj/item/cane) + if(C?.can_support) + stance_damage -=2 //Standing is poor. if(stance_damage >= 4 || (stance_damage >= 2 && prob(5))) diff --git a/html/changelogs/William Murdoch - Telecopic Cane.yml b/html/changelogs/William Murdoch - Telecopic Cane.yml new file mode 100644 index 00000000000..9d9e2cb569d --- /dev/null +++ b/html/changelogs/William Murdoch - Telecopic Cane.yml @@ -0,0 +1,42 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: William Murdoch + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - rscadd: "Adds a telecopic cane which can be found in the loadout under cane." + - tweak: "Merges white cane and crutches under the cane option in the loadout." \ No newline at end of file diff --git a/icons/obj/contained_items/weapons/telebaton.dmi b/icons/obj/contained_items/weapons/telebaton.dmi index 40bf2ddc090..f3e735b62ae 100644 Binary files a/icons/obj/contained_items/weapons/telebaton.dmi and b/icons/obj/contained_items/weapons/telebaton.dmi differ diff --git a/icons/obj/contained_items/weapons/telecane.dmi b/icons/obj/contained_items/weapons/telecane.dmi new file mode 100644 index 00000000000..16c298473f9 Binary files /dev/null and b/icons/obj/contained_items/weapons/telecane.dmi differ