Updates reagents a bit.
This commit is contained in:
+6
-7
@@ -6,7 +6,6 @@
|
||||
|
||||
var/flags_1 = NONE
|
||||
var/interaction_flags_atom = NONE
|
||||
var/container_type = NONE
|
||||
var/datum/reagents/reagents = null
|
||||
|
||||
//This atom's HUD (med/sec, etc) images. Associative list.
|
||||
@@ -203,16 +202,16 @@
|
||||
return is_refillable() && is_drainable()
|
||||
|
||||
/atom/proc/is_injectable(allowmobs = TRUE)
|
||||
return reagents && (container_type & (INJECTABLE | REFILLABLE))
|
||||
return reagents && (reagents.reagents_holder_flags & (INJECTABLE | REFILLABLE))
|
||||
|
||||
/atom/proc/is_drawable(allowmobs = TRUE)
|
||||
return reagents && (container_type & (DRAWABLE | DRAINABLE))
|
||||
return reagents && (reagents.reagents_holder_flags & (DRAWABLE | DRAINABLE))
|
||||
|
||||
/atom/proc/is_refillable()
|
||||
return reagents && (container_type & REFILLABLE)
|
||||
return reagents && (reagents.reagents_holder_flags & REFILLABLE)
|
||||
|
||||
/atom/proc/is_drainable()
|
||||
return reagents && (container_type & DRAINABLE)
|
||||
return reagents && (reagents.reagents_holder_flags & DRAINABLE)
|
||||
|
||||
|
||||
/atom/proc/AllowDrop()
|
||||
@@ -261,7 +260,7 @@
|
||||
to_chat(user, desc)
|
||||
|
||||
if(reagents)
|
||||
if(container_type & TRANSPARENT)
|
||||
if(reagents.reagents_holder_flags & TRANSPARENT)
|
||||
to_chat(user, "It contains:")
|
||||
if(reagents.reagent_list.len)
|
||||
if(user.can_see_reagents()) //Show each individual reagent
|
||||
@@ -274,7 +273,7 @@
|
||||
to_chat(user, "[total_volume] units of various reagents")
|
||||
else
|
||||
to_chat(user, "Nothing.")
|
||||
else if(container_type & AMOUNT_VISIBLE)
|
||||
else if(reagents.reagents_holder_flags & AMOUNT_VISIBLE)
|
||||
if(reagents.total_volume)
|
||||
to_chat(user, "<span class='notice'>It has [reagents.total_volume] unit\s left.</span>")
|
||||
else
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
icon = 'icons/obj/machines/limbgrower.dmi'
|
||||
icon_state = "limbgrower_idleoff"
|
||||
density = TRUE
|
||||
container_type = OPENCONTAINER
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 10
|
||||
active_power_usage = 100
|
||||
@@ -34,7 +33,7 @@
|
||||
)
|
||||
|
||||
/obj/machinery/limbgrower/Initialize()
|
||||
create_reagents(100)
|
||||
create_reagents(100, OPENCONTAINER)
|
||||
stored_research = new /datum/techweb/specialized/autounlocking/limbgrower
|
||||
. = ..()
|
||||
|
||||
|
||||
@@ -257,8 +257,7 @@
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/Initialize()
|
||||
. = ..()
|
||||
create_reagents(max_volume)
|
||||
reagents.set_reacting(FALSE)
|
||||
create_reagents(max_volume, NO_REACT)
|
||||
syringes = new
|
||||
known_reagents = list("epinephrine"="Epinephrine","charcoal"="Charcoal")
|
||||
processed_reagents = new
|
||||
@@ -274,7 +273,7 @@
|
||||
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/critfail()
|
||||
..()
|
||||
if(reagents)
|
||||
reagents.set_reacting(TRUE)
|
||||
DISABLE_BITFIELD(reagents.reagents_holder_flags, NO_REACT)
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/can_attach(obj/mecha/medical/M)
|
||||
if(..())
|
||||
|
||||
@@ -102,7 +102,6 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
icon_state = "cigoff"
|
||||
throw_speed = 0.5
|
||||
item_state = "cigoff"
|
||||
container_type = INJECTABLE
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
body_parts_covered = null
|
||||
grind_results = list()
|
||||
@@ -123,8 +122,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
|
||||
/obj/item/clothing/mask/cigarette/Initialize()
|
||||
. = ..()
|
||||
create_reagents(chem_volume)
|
||||
reagents.set_reacting(FALSE) // so it doesn't react until you light it
|
||||
create_reagents(chem_volume, INJECTABLE | NO_REACT) // so it doesn't react until you light it
|
||||
if(list_reagents)
|
||||
reagents.add_reagent_list(list_reagents)
|
||||
if(starts_lit)
|
||||
@@ -184,7 +182,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
qdel(src)
|
||||
return
|
||||
// allowing reagents to react after being lit
|
||||
reagents.set_reacting(TRUE)
|
||||
DISABLE_BITFIELD(reagents.reagents_holder_flags, NO_REACT)
|
||||
reagents.handle_reactions()
|
||||
icon_state = icon_on
|
||||
item_state = icon_on
|
||||
@@ -325,7 +323,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
list_reagents = list("space_drugs" = 15, "lipolicide" = 35)
|
||||
|
||||
/obj/item/clothing/mask/cigarette/rollie/mindbreaker
|
||||
list_reagents = list("mindbreaker" = 35, "lipolicide" = 15)
|
||||
list_reagents = list("mindbreaker" = 35, "lipolicide" = 15)
|
||||
|
||||
/obj/item/cigbutt/roach
|
||||
name = "roach"
|
||||
@@ -720,8 +718,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
|
||||
/obj/item/clothing/mask/vape/Initialize(mapload, param_color)
|
||||
. = ..()
|
||||
create_reagents(chem_volume)
|
||||
reagents.set_reacting(FALSE) // so it doesn't react until you light it
|
||||
DISABLE_BITFIELD(reagents.reagents_holder_flags, NO_REACT)
|
||||
reagents.add_reagent("nicotine", 50)
|
||||
if(!icon_state)
|
||||
if(!param_color)
|
||||
@@ -790,13 +787,12 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
if(reagents.total_volume > 0)
|
||||
to_chat(user, "<span class='notice'>You empty [src] of all reagents.</span>")
|
||||
reagents.clear_reagents()
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/vape/equipped(mob/user, slot)
|
||||
if(slot == SLOT_WEAR_MASK)
|
||||
if(!screw)
|
||||
to_chat(user, "<span class='notice'>You start puffing on the vape.</span>")
|
||||
reagents.set_reacting(TRUE)
|
||||
DISABLE_BITFIELD(reagents.reagents_holder_flags, NO_REACT)
|
||||
START_PROCESSING(SSobj, src)
|
||||
else //it will not start if the vape is opened.
|
||||
to_chat(user, "<span class='warning'>You need to close the cap first!</span>")
|
||||
@@ -804,7 +800,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
/obj/item/clothing/mask/vape/dropped(mob/user)
|
||||
var/mob/living/carbon/C = user
|
||||
if(C.get_item_by_slot(SLOT_WEAR_MASK) == src)
|
||||
reagents.set_reacting(FALSE)
|
||||
ENABLE_BITFIELD(reagents.reagents_holder_flags, NO_REACT)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/clothing/mask/vape/proc/hand_reagents()//had to rename to avoid duplicate error
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
attack_verb = list("slammed", "whacked", "bashed", "thunked", "battered", "bludgeoned", "thrashed")
|
||||
dog_fashion = /datum/dog_fashion/back
|
||||
resistance_flags = FIRE_PROOF
|
||||
container_type = AMOUNT_VISIBLE
|
||||
var/max_water = 50
|
||||
var/last_use = 1
|
||||
var/chem = "water"
|
||||
@@ -56,7 +55,7 @@
|
||||
|
||||
/obj/item/extinguisher/Initialize()
|
||||
. = ..()
|
||||
create_reagents(max_water)
|
||||
create_reagents(max_water, AMOUNT_VISIBLE)
|
||||
reagents.add_reagent(chem, max_water)
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
name = "chem implant"
|
||||
desc = "Injects things."
|
||||
icon_state = "reagents"
|
||||
container_type = OPENCONTAINER
|
||||
activated = FALSE
|
||||
|
||||
/obj/item/implant/chem/get_data()
|
||||
@@ -23,7 +22,7 @@
|
||||
|
||||
/obj/item/implant/chem/Initialize()
|
||||
. = ..()
|
||||
create_reagents(50)
|
||||
create_reagents(50, OPENCONTAINER)
|
||||
GLOB.tracked_chem_implants += src
|
||||
|
||||
/obj/item/implant/chem/Destroy()
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
/obj/item/watertank/Initialize()
|
||||
. = ..()
|
||||
create_reagents(volume)
|
||||
create_reagents(volume, OPENCONTAINER)
|
||||
noz = make_noz()
|
||||
|
||||
/obj/item/watertank/ui_action_click(mob/user)
|
||||
@@ -113,7 +113,6 @@
|
||||
possible_transfer_amounts = list(25,50,100)
|
||||
volume = 500
|
||||
item_flags = NOBLUDGEON | ABSTRACT // don't put in storage
|
||||
container_type = OPENCONTAINER
|
||||
slot_flags = 0
|
||||
|
||||
var/obj/item/watertank/tank
|
||||
@@ -335,7 +334,7 @@
|
||||
var/usage_ratio = 5 //5 unit added per 1 removed
|
||||
var/injection_amount = 1
|
||||
amount_per_transfer_from_this = 5
|
||||
container_type = OPENCONTAINER
|
||||
reagent_flags = OPENCONTAINER
|
||||
spillable = FALSE
|
||||
possible_transfer_amounts = list(5,10,15)
|
||||
|
||||
|
||||
@@ -266,10 +266,10 @@
|
||||
status = !status
|
||||
if(status)
|
||||
to_chat(user, "<span class='notice'>You resecure [src] and close the fuel tank.</span>")
|
||||
container_type = NONE
|
||||
DISABLE_BITFIELD(reagents.reagents_holder_flags, OPENCONTAINER)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] can now be attached, modified, and refuelled.</span>")
|
||||
container_type = OPENCONTAINER
|
||||
ENABLE_BITFIELD(reagents.reagents_holder_flags, OPENCONTAINER)
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/weldingtool/proc/flamethrower_rods(obj/item/I, mob/user)
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
icon_state = "cart"
|
||||
anchored = FALSE
|
||||
density = TRUE
|
||||
container_type = OPENCONTAINER
|
||||
//copypaste sorry
|
||||
var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite
|
||||
var/obj/item/storage/bag/trash/mybag = null
|
||||
@@ -18,7 +17,7 @@
|
||||
|
||||
/obj/structure/janitorialcart/Initialize()
|
||||
. = ..()
|
||||
create_reagents(100)
|
||||
create_reagents(100, OPENCONTAINER)
|
||||
|
||||
/obj/structure/janitorialcart/proc/wet_mop(obj/item/mop, mob/user)
|
||||
if(reagents.total_volume < 1)
|
||||
|
||||
@@ -4,13 +4,12 @@
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "mopbucket"
|
||||
density = TRUE
|
||||
container_type = OPENCONTAINER
|
||||
var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite
|
||||
|
||||
|
||||
/obj/structure/mopbucket/Initialize()
|
||||
. = ..()
|
||||
create_reagents(100)
|
||||
create_reagents(100, OPENCONTAINER)
|
||||
|
||||
/obj/structure/mopbucket/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/mop))
|
||||
|
||||
Reference in New Issue
Block a user