mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 02:24:11 +01:00
Merge pull request #6176 from Fox-McCloud/reagents-noreact-refactor
Makes Reagents Holder Process and Refactors NOREACT
This commit is contained in:
@@ -42,11 +42,13 @@ LIGHTERS ARE IN LIGHTERS.DM
|
||||
|
||||
/obj/item/clothing/mask/cigarette/New()
|
||||
..()
|
||||
flags |= NOREACT // so it doesn't react until you light it
|
||||
create_reagents(chem_volume) // making the cigarrete a chemical holder with a maximum volume of 30
|
||||
reagents.set_reacting(FALSE) // so it doesn't react until you light it
|
||||
|
||||
/obj/item/clothing/mask/cigarette/Destroy()
|
||||
qdel(reagents)
|
||||
if(reagents)
|
||||
qdel(reagents)
|
||||
processing_objects -= src
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/mask/cigarette/attack(var/mob/living/M, var/mob/living/user, def_zone)
|
||||
@@ -135,7 +137,7 @@ LIGHTERS ARE IN LIGHTERS.DM
|
||||
M.unEquip(src, 1)
|
||||
qdel(src)
|
||||
return
|
||||
flags &= ~NOREACT // allowing reagents to react after being lit
|
||||
reagents.set_reacting(TRUE)
|
||||
reagents.handle_reactions()
|
||||
icon_state = icon_on
|
||||
item_state = icon_on
|
||||
|
||||
@@ -176,8 +176,8 @@
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/New()
|
||||
..()
|
||||
flags |= NOREACT
|
||||
create_reagents(30 * storage_slots)//so people can inject cigarettes without opening a packet, now with being able to inject the whole one
|
||||
reagents.set_reacting(FALSE)
|
||||
for(var/i = 1 to storage_slots)
|
||||
var/obj/item/clothing/mask/cigarette/C = new cigarette_type(src)
|
||||
unlaced_cigarettes += C
|
||||
|
||||
Reference in New Issue
Block a user