diff --git a/code/game/objects/items/cigs_lighters.dm b/code/game/objects/items/cigs_lighters.dm index a793bf36ab0..b01c9e55ae8 100644 --- a/code/game/objects/items/cigs_lighters.dm +++ b/code/game/objects/items/cigs_lighters.dm @@ -582,24 +582,32 @@ CIGARETTE PACKETS ARE IN FANCY.DM return ..() /obj/item/clothing/mask/cigarette/pipe/process(delta_time) - var/turf/location = get_turf(src) - smoketime -= delta_time + if(isliving(loc)) + var/mob/living/living_smoker = loc + living_smoker.IgniteMob() + if(!reagents.has_reagent(/datum/reagent/oxygen)) //cigarettes need oxygen + var/datum/gas_mixture/air = return_air() + if(!air?.has_gas(/datum/gas/oxygen, 1)) //or oxygen on a tile to burn + extinguish() + return + + smoketime -= delta_time * (1 SECONDS) if(smoketime <= 0) - new /obj/effect/decal/cleanable/ash(location) if(ismob(loc)) - var/mob/living/M = loc - to_chat(M, span_notice("Your [name] goes out.")) + var/mob/living/living_smoker = loc + to_chat(living_smoker, span_notice("Your [name] goes out.")) lit = FALSE icon_state = icon_off inhand_icon_state = icon_off - M.update_inv_wear_mask() + living_smoker.update_inv_wear_mask() packeditem = FALSE name = "empty [initial(name)]" STOP_PROCESSING(SSobj, src) return open_flame(heat) - if(reagents?.total_volume) // check if it has any reagents at all + if(reagents?.total_volume && COOLDOWN_FINISHED(src, drag_cooldown)) + COOLDOWN_START(src, drag_cooldown, dragtime) handle_reagents() /obj/item/clothing/mask/cigarette/pipe/attackby(obj/item/thing, mob/user, params)