diff --git a/code/game/objects/items/weapons/chewables.dm b/code/game/objects/items/weapons/chewables.dm index a9699dea89a..e80c91b609a 100644 --- a/code/game/objects/items/weapons/chewables.dm +++ b/code/game/objects/items/weapons/chewables.dm @@ -87,16 +87,25 @@ obj/item/clothing/mask/chewable/Destroy() /obj/item/clothing/mask/chewable/proc/spitout(var/mob/user, var/no_message) STOP_PROCESSING(SSprocessing, src) - if (type_butt) - var/obj/item/butt = new type_butt(get_turf(src)) + if(type_butt) + var/obj/item/butt = new type_butt(user) transfer_fingerprints_to(butt) butt.color = color if(brand) butt.desc += " This one is \a [brand]." if(ismob(loc)) var/mob/living/M = loc - if (!no_message) - to_chat(M, SPAN_NOTICE("You spit out the [name].")) + if(!no_message) + to_chat(M, SPAN_NOTICE("The [name] runs out of flavor.")) + 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) /obj/item/clothing/mask/chewable/tobacco/bad diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm index cb26eccdf3e..a8a2d3f27cc 100644 --- a/code/game/objects/items/weapons/cigs_lighters.dm +++ b/code/game/objects/items/weapons/cigs_lighters.dm @@ -56,7 +56,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM attack_verb = list("flicked") drop_sound = 'sound/items/cigs_lighters/cig_snuff.ogg' pickup_sound = 'sound/items/pickup/food.ogg' - + /obj/item/trash/match/Initialize() . = ..() randpixel_xy() @@ -173,8 +173,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM create_reagents(chem_volume) // making the cigarrete a chemical holder with a maximum volume of 15 /obj/item/clothing/mask/smokable/process() - - if(reagents && reagents.total_volume && burn_rate) + if(reagents && reagents.total_volume && burn_rate && !istype(loc, /obj/item/storage)) if(!initial_volume) initial_volume = reagents.total_volume var/mob/living/carbon/human/C = loc @@ -225,28 +224,33 @@ CIGARETTE PACKETS ARE IN FANCY.DM set_light(2, 0.25, "#E38F46") START_PROCESSING(SSprocessing, src) -/obj/item/clothing/mask/smokable/proc/die(var/nomessage = FALSE) +/obj/item/clothing/mask/smokable/proc/die(var/no_message = 0, var/mob/living/M) var/turf/T = get_turf(src) set_light(0) playsound(src.loc, 'sound/items/cigs_lighters/cig_snuff.ogg', 50, 1) - if (type_butt) - var/obj/item/butt = new type_butt(T) + if(type_butt) + var/obj/item/butt = new type_butt(src.loc) transfer_fingerprints_to(butt) if(ismob(loc)) - var/mob/living/M = loc - if (!nomessage) + M = loc + if(!no_message) to_chat(M, SPAN_NOTICE("Your [name] goes out.")) - M.remove_from_mob(src) //un-equip it so the overlays can update - M.update_inv_wear_mask(0) - M.update_inv_l_hand(0) - M.update_inv_r_hand(1) + 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 dies in your hand. + M.update_inv_l_hand(0) + M.update_inv_r_hand(1) + M.put_in_hands(butt) STOP_PROCESSING(SSprocessing, src) qdel(src) else new /obj/effect/decal/cleanable/ash(T) if(ismob(loc)) - var/mob/living/M = loc - if (!nomessage) + 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) lit = 0 @@ -287,7 +291,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM icon_state = "cigoff" throw_speed = 0.5 item_state = "cigoff" - w_class = 1 + w_class = ITEMSIZE_TINY slot_flags = SLOT_EARS | SLOT_MASK attack_verb = list("burnt", "singed") icon_on = "cigon" //Note - these are in masks.dmi not in cigarette.dmi @@ -306,15 +310,12 @@ CIGARETTE PACKETS ARE IN FANCY.DM reagents.add_reagent(/datum/reagent/toxin/tobacco,10) reagents.add_reagent(/datum/reagent/mental/nicotine,5) // 2/3 ratio, Adds 0.03 units per second - /obj/item/clothing/mask/smokable/cigarette/attackby(obj/item/W as obj, mob/user as mob) ..() - if(istype(W, /obj/item/melee/energy/sword)) var/obj/item/melee/energy/sword/S = W if(S.active) light(SPAN_WARNING("[user] swings their [W], barely missing themselves. They light their [name] in the process.")) - return /obj/item/clothing/mask/smokable/cigarette/attack(mob/living/carbon/human/H, mob/user, def_zone) @@ -481,10 +482,11 @@ CIGARETTE PACKETS ARE IN FANCY.DM icon = 'icons/obj/clothing/masks.dmi' icon_state = "cigbutt" randpixel = 10 - w_class = 1 - slot_flags = SLOT_EARS + w_class = ITEMSIZE_TINY + slot_flags = SLOT_EARS | SLOT_MASK throwforce = 1 drop_sound = 'sound/items/cigs_lighters/cig_snuff.ogg' + pickup_sound = 'sound/items/pickup/food.ogg' /obj/item/trash/cigbutt/Initialize() . = ..() @@ -535,7 +537,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM icon_on = "pipeon" //Note - these are in masks.dmi icon_off = "pipeoff" burn_rate = 0.003 - w_class = 1 + w_class = ITEMSIZE_TINY chem_volume = 30 matchmes = "USER lights their NAME with their FLAME." lightermes = "USER manages to light their NAME with FLAME." @@ -641,7 +643,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM slot_l_hand_str = 'icons/mob/items/lefthand_cigs_lighters.dmi', slot_r_hand_str = 'icons/mob/items/righthand_cigs_lighters.dmi', ) - w_class = 1 + w_class = ITEMSIZE_TINY throwforce = 4 flags = CONDUCT slot_flags = SLOT_BELT @@ -802,7 +804,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM desc = "A thin piece of paper used to make smokables." icon = 'icons/obj/cigs_lighters.dmi' icon_state = "cigpaper_generic" - w_class = 1.0 + w_class = ITEMSIZE_TINY /obj/item/paper/cig/attackby(obj/item/P as obj, mob/user as mob) if(istype(P, /obj/item/flame) || P.iswelder()) @@ -821,7 +823,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM name = "cigarette filter" desc = "A small nub like filter for cigarettes." icon_state = "cigfilter" - w_class = 1.0 + w_class = ITEMSIZE_TINY /obj/item/paper/cig/filter/attackby(obj/item/P as obj, mob/user as mob) if(istype(P, /obj/item/flame) || P.iswelder()) @@ -840,7 +842,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM //tobacco sold seperately if you're too snobby to grow it yourself. /obj/item/reagent_containers/food/snacks/grown/dried_tobacco plantname = "tobacco" - w_class = 1.0 + w_class = ITEMSIZE_TINY /obj/item/reagent_containers/food/snacks/grown/dried_tobacco/Initialize() . = ..() diff --git a/html/changelogs/wezzy_cigbutts_stay.yml b/html/changelogs/wezzy_cigbutts_stay.yml new file mode 100644 index 00000000000..e139126d87b --- /dev/null +++ b/html/changelogs/wezzy_cigbutts_stay.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: + - rscadd: "Cigarettes and chewables stay in your mouth/hands when they go out." + - rscadd: "Cigarettes no longer stay lit in storage containers." diff --git a/icons/mob/items/lefthand_cigs_lighters.dmi b/icons/mob/items/lefthand_cigs_lighters.dmi index b7bf2edc92a..68e92071c51 100644 Binary files a/icons/mob/items/lefthand_cigs_lighters.dmi and b/icons/mob/items/lefthand_cigs_lighters.dmi differ diff --git a/icons/mob/items/righthand_cigs_lighters.dmi b/icons/mob/items/righthand_cigs_lighters.dmi index 17989ce70dc..01db9a0d8a6 100644 Binary files a/icons/mob/items/righthand_cigs_lighters.dmi and b/icons/mob/items/righthand_cigs_lighters.dmi differ