[MIRROR] Fixes cigarettes smoking on any slot [MDB IGNORE] (#23907)

* Fixes cigarettes smoking on any slot (#78544)

## About The Pull Request

#76881 allowed you to put cigarettes in a gas mask but removed the check
for, if the thing was a cigarette, making sure it was in your mask slot.

What this meant was that standing around with a cigarette in your hand
would still make you passively smoke it - although this is somewhat more
immersive to me as a former smoker, it also gets obnoxious having to set
the cigarette on a table or put it in my bag to avoid racking up the
ridiculously easy-to-accumulate nicotine addiction points you otherwise
get from even one cigarette in-game.

This just readds that check after the checks for gas masks/non-smoker
locations (which may also be broken but are beyond me right now - trying
to put a cigarette into a gas mask's filter* slot returns 'mask's mouth
is covered.')

* Fixes cigarettes smoking on any slot

---------

Co-authored-by: Higgin <cdonny11@yahoo.com>
This commit is contained in:
SkyratBot
2023-09-25 21:33:57 +02:00
committed by GitHub
parent 3530093d21
commit 12db6556c0
+4
View File
@@ -358,6 +358,10 @@ CIGARETTE PACKETS ARE IN FANCY.DM
if(!istype(smoker) || smoker.get_item_by_slot(ITEM_SLOT_MASK) != loc)
reagents.remove_any(to_smoke)
return
else
if(src != smoker.wear_mask)
reagents.remove_any(to_smoke)
return
reagents.expose(smoker, INGEST, min(to_smoke / reagents.total_volume, 1))
var/obj/item/organ/internal/lungs/lungs = smoker.get_organ_slot(ORGAN_SLOT_LUNGS)