diff --git a/code/game/objects/items/weapons/chewables.dm b/code/game/objects/items/weapons/chewables.dm index 429191a7c0c..d14c309fdde 100644 --- a/code/game/objects/items/weapons/chewables.dm +++ b/code/game/objects/items/weapons/chewables.dm @@ -84,13 +84,16 @@ obj/item/clothing/mask/chewable/Destroy() desc = "A disgusting spitwad." icon = 'icons/obj/clothing/masks.dmi' icon_state = "spit-chew" + drop_sound = 'sound/items/drop/flesh.ogg' + pickup_sound = 'sound/items/pickup/flesh.ogg' + slot_flags = SLOT_EARS | SLOT_MASK -/obj/item/clothing/mask/chewable/proc/spitout(var/mob/user, var/no_message) - STOP_PROCESSING(SSprocessing, src) +/obj/item/clothing/mask/chewable/proc/spitout(var/transfer_color = 1, var/no_message = 0) if(type_butt) - var/obj/item/butt = new type_butt(user) + var/obj/item/butt = new type_butt(src.loc) transfer_fingerprints_to(butt) - butt.color = color + if(transfer_color) + butt.color = color if(brand) butt.desc += " This one is \a [brand]." if(ismob(loc)) @@ -100,13 +103,12 @@ obj/item/clothing/mask/chewable/Destroy() if(M.wear_mask) M.remove_from_mob(src) //un-equip it so the overlays can update M.update_inv_wear_mask(0) - M.equip_to_slot_if_possible(butt, slot_wear_mask) - else - M.remove_from_mob(src) // if it gets blocked somehow, since chewables shouldn't be processing outside the mask slot. - M.update_inv_l_hand(0) - M.update_inv_r_hand(1) - M.put_in_hands(butt) - qdel(src) + if(!M.equip_to_slot_if_possible(butt, slot_wear_mask)) + M.update_inv_l_hand(0) + M.update_inv_r_hand(1) + M.put_in_hands(butt) + STOP_PROCESSING(SSprocessing, src) + qdel(src) /obj/item/clothing/mask/chewable/tobacco/bad name = "chewing tobacco" @@ -148,6 +150,9 @@ obj/item/clothing/mask/chewable/Destroy() desc = "A disgusting chewed up wad of gum." icon = 'icons/obj/clothing/masks.dmi' icon_state = "spit-gum" + drop_sound = 'sound/items/drop/flesh.ogg' + pickup_sound = 'sound/items/pickup/flesh.ogg' + slot_flags = SLOT_EARS | SLOT_MASK /obj/item/clothing/mask/chewable/candy/gum name = "chewing gum" @@ -186,17 +191,23 @@ obj/item/clothing/mask/chewable/Destroy() /obj/item/clothing/mask/chewable/candy/lolli name = "lollipop" - desc = "A simple artificially flavored sphere of sugar on a handle. Colloquially known as a sucker. Allegedly one is born every minute." + desc = "A simple artificially flavored sphere of sugar on a handle, colloquially known as a sucker. Allegedly one is born every minute." type_butt = /obj/item/trash/lollibutt icon_state = "lollipop" item_state = "lollipop" wrapped = TRUE /obj/item/trash/lollibutt - name = "popsicle stick" - desc = "A popsicle stick devoid of pop." + name = "lollipop stick" + desc = "A lollipop stick devoid of pop." icon = 'icons/obj/clothing/masks.dmi' icon_state = "lollipop_stick" + slot_flags = SLOT_EARS | SLOT_MASK + +/obj/item/clothing/mask/chewable/candy/lolli/process() + chew() + if(chewtime < 1) + spitout(0) /obj/item/clothing/mask/chewable/candy/lolli/update_icon() cut_overlays() diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm index e2c54cc52df..d3506d7949c 100644 --- a/code/game/objects/items/weapons/cigs_lighters.dm +++ b/code/game/objects/items/weapons/cigs_lighters.dm @@ -224,7 +224,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM set_light(2, 0.25, "#E38F46") START_PROCESSING(SSprocessing, src) -/obj/item/clothing/mask/smokable/proc/die(var/no_message = 0, var/mob/living/M) +/obj/item/clothing/mask/smokable/proc/die(var/no_message = 0) var/turf/T = get_turf(src) set_light(0) playsound(src.loc, 'sound/items/cigs_lighters/cig_snuff.ogg', 50, 1) @@ -232,7 +232,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM var/obj/item/butt = new type_butt(src.loc) transfer_fingerprints_to(butt) if(ismob(loc)) - M = loc + var/mob/living/M = loc if(!no_message) to_chat(M, SPAN_NOTICE("Your [name] goes out.")) if(M.wear_mask) @@ -249,7 +249,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM else new /obj/effect/decal/cleanable/ash(T) if(ismob(loc)) - M = loc + var/mob/living/M = loc if(!no_message) to_chat(M, SPAN_NOTICE("Your [name] goes out, and you empty the ash.")) playsound(src.loc, 'sound/items/cigs_lighters/cig_snuff.ogg', 50, 1) diff --git a/html/changelogs/wezzy_chewwad_fix.yml b/html/changelogs/wezzy_chewwad_fix.yml new file mode 100644 index 00000000000..340b9c9fcd1 --- /dev/null +++ b/html/changelogs/wezzy_chewwad_fix.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: Wowzewow (Wezzy) + +# 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: + - bugfix: "Fixes chewables not spawning in their trash item. i.e, chewing gum should give you gum wads once you finished chewing them." + - bugfix: "Lollipops now show up onmob." \ No newline at end of file diff --git a/icons/mob/mask.dmi b/icons/mob/mask.dmi index 4066d8f0e5d..bea54f71daf 100644 Binary files a/icons/mob/mask.dmi and b/icons/mob/mask.dmi differ