[MIRROR] Fixes pipes not fulfulling nicotine withdrawal [MDB IGNORE] (#8823)

* Fixes pipes not fulfulling nicotine withdrawal (#61993)

Co-authored-by: seth-scherer <seth.scherer@ protonmail.com>

* Fixes pipes not fulfulling nicotine withdrawal

Co-authored-by: Seth Scherer <supernovaa41@protonmail.com>
Co-authored-by: seth-scherer <seth.scherer@ protonmail.com>
This commit is contained in:
SkyratBot
2021-10-14 21:20:36 +01:00
committed by GitHub
co-authored by seth-scherer Seth Scherer
parent 01a41bef0d
commit 56fddbf762
+15 -7
View File
@@ -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)