diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm index f4d19f47a97..5b6095e96d8 100644 --- a/code/defines/obj/weapon.dm +++ b/code/defines/obj/weapon.dm @@ -276,13 +276,6 @@ icon_state = "crutch" item_state = "crutch" -/obj/item/cane/white - name = "white cane" - 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" desc = "A sturdy walking stick made from adhomian wood." @@ -303,22 +296,26 @@ pickup_sound = 'sound/items/pickup/crowbar.ogg' var/on = FALSE can_support = FALSE + var/extended_icon_state = "telecane_1" + var/extended_item_state = "telestick" + var/retracted_icon_state = "telecane" + var/retracted_item_state = "telestick_0" /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" + user.visible_message(SPAN_NOTICE("With a flick of their wrist, [user] extends their [src.name]"), SPAN_NOTICE("You extend the [src.name]."), SPAN_NOTICE("You hear a click.")) + icon_state = extended_icon_state + item_state = extended_item_state w_class = WEIGHT_CLASS_BULKY slot_flags = null force = 14 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" + user.visible_message(SPAN_NOTICE("\The [user] collapses their [src.name]."), SPAN_NOTICE("You collapse the [src.name]."), SPAN_NOTICE("You hear a click.")) + icon_state = retracted_icon_state + item_state = retracted_item_state w_class = WEIGHT_CLASS_SMALL slot_flags = SLOT_BELT force = 3 @@ -326,13 +323,23 @@ 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() + update_held_icon() playsound(src.loc, 'sound/weapons/click.ogg', 50, 1) add_fingerprint(user) +/obj/item/cane/telecane/white + name = "white cane" + desc = "A white cane, used by the visually impaired." + icon = 'icons/obj/item/whitecane.dmi' + icon_state = "whitecane" + drop_sound = /singleton/sound_category/generic_drop_sound + pickup_sound = /singleton/sound_category/generic_pickup_sound + extended_icon_state = "whitecane_extended" + extended_item_state = "whitecane" + retracted_icon_state = "whitecane" + retracted_item_state = "whitecane_0" + /obj/item/disk name = "disk" icon = 'icons/obj/items.dmi' diff --git a/code/modules/client/preference_setup/loadout/items/general.dm b/code/modules/client/preference_setup/loadout/items/general.dm index 3bb9100cc34..58ea90fd671 100644 --- a/code/modules/client/preference_setup/loadout/items/general.dm +++ b/code/modules/client/preference_setup/loadout/items/general.dm @@ -8,7 +8,7 @@ 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 + cane["white cane"] = /obj/item/cane/telecane/white gear_tweaks += new /datum/gear_tweak/path(cane) /datum/gear/flask diff --git a/html/changelogs/flpfs-whitecane.yml b/html/changelogs/flpfs-whitecane.yml new file mode 100644 index 00000000000..c083a3dd5bd --- /dev/null +++ b/html/changelogs/flpfs-whitecane.yml @@ -0,0 +1,58 @@ +################################ +# 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 +# - (fixes bugs) +# wip +# - (work in progress) +# qol +# - (quality of life) +# soundadd +# - (adds a sound) +# sounddel +# - (removes a sound) +# rscadd +# - (adds a feature) +# rscdel +# - (removes a feature) +# imageadd +# - (adds an image or sprite) +# imagedel +# - (removes an image or sprite) +# spellcheck +# - (fixes spelling or grammar) +# experiment +# - (experimental change) +# balance +# - (balance changes) +# code_imp +# - (misc internal code change) +# refactor +# - (refactors code) +# config +# - (makes a change to the config files) +# admin +# - (makes changes to administrator tools) +# server +# - (miscellaneous changes to server) +################################# + +# Your name. +author: Flpfs + +# 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, this gets changed to [] after reading. Just remove the brackets when you add new shit. +# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog. +changes: + - rscadd: "The white cane has been resprited, being able to be extended and retracted." diff --git a/icons/mob/items/lefthand.dmi b/icons/mob/items/lefthand.dmi index 4c521b249f0..adb07167c09 100644 Binary files a/icons/mob/items/lefthand.dmi and b/icons/mob/items/lefthand.dmi differ diff --git a/icons/mob/items/righthand.dmi b/icons/mob/items/righthand.dmi index 8cd6a240230..747a42e7b66 100644 Binary files a/icons/mob/items/righthand.dmi and b/icons/mob/items/righthand.dmi differ diff --git a/icons/obj/item/whitecane.dmi b/icons/obj/item/whitecane.dmi new file mode 100644 index 00000000000..4781cd06688 Binary files /dev/null and b/icons/obj/item/whitecane.dmi differ diff --git a/icons/obj/weapons.dmi b/icons/obj/weapons.dmi index c1aec07368e..cbebf5947fe 100644 Binary files a/icons/obj/weapons.dmi and b/icons/obj/weapons.dmi differ