Updates reagents a bit.

This commit is contained in:
Ghommie
2019-06-07 06:27:04 +02:00
parent 17febdd07c
commit 7aac9e6280
56 changed files with 118 additions and 163 deletions
@@ -13,7 +13,7 @@
icon = 'icons/obj/toy.dmi'
icon_state = "rag"
item_flags = NOBLUDGEON
container_type = OPENCONTAINER
reagent_flags = OPENCONTAINER
amount_per_transfer_from_this = 5
possible_transfer_amounts = list()
volume = 5
@@ -8,7 +8,7 @@
icon_state = null
lefthand_file = 'icons/mob/inhands/misc/food_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/food_righthand.dmi'
container_type = OPENCONTAINER
reagent_flags = OPENCONTAINER
var/gulp_size = 5 //This is now officially broken ... need to think of a nice way to fix it.
possible_transfer_amounts = list(5,10,15,20,25,30,50)
volume = 50
@@ -152,7 +152,6 @@
possible_transfer_amounts = list()
volume = 5
flags_1 = CONDUCT_1
container_type = OPENCONTAINER
spillable = TRUE
resistance_flags = FIRE_PROOF
isGlass = FALSE
@@ -399,7 +398,7 @@
name = "soda can"
lefthand_file = 'icons/mob/inhands/misc/food_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/food_righthand.dmi'
container_type = NONE
reagent_flags = NONE
spillable = FALSE
isGlass = FALSE
@@ -423,7 +422,7 @@
/obj/item/reagent_containers/food/drinks/soda_cans/attack_self(mob/user)
if(!is_drainable())
to_chat(user, "You pull back the tab of \the [src] with a satisfying pop.") //Ahhhhhhhh
container_type = OPENCONTAINER
ENABLE_BITFIELD(reagents.reagents_holder_flags, OPENCONTAINER)
playsound(src, "can_open", 50, 1)
spillable = TRUE
return
+1 -1
View File
@@ -4,7 +4,7 @@
/obj/item/reagent_containers/food
possible_transfer_amounts = list()
volume = 50 //Sets the default container amount for all food items.
container_type = INJECTABLE
reagent_flags = INJECTABLE
resistance_flags = FLAMMABLE
var/foodtype = NONE
var/last_check_time
@@ -10,7 +10,7 @@
desc = "Just your average condiment container."
icon = 'icons/obj/food/containers.dmi'
icon_state = "emptycondiment"
container_type = OPENCONTAINER
reagent_flags = OPENCONTAINER
possible_transfer_amounts = list(1, 5, 10, 15, 20, 25, 30, 50)
volume = 50
//Possible_states has the reagent id as key and a list of, in order, the icon_state, the name and the desc as values. Used in the on_reagent_change(changetype) to change names, descs and sprites.
@@ -290,7 +290,7 @@
desc = "A simple bowl, used for soups and salads."
icon = 'icons/obj/food/soupsalad.dmi'
icon_state = "bowl"
container_type = OPENCONTAINER
reagent_flags = OPENCONTAINER
materials = list(MAT_GLASS = 500)
w_class = WEIGHT_CLASS_NORMAL
@@ -28,7 +28,6 @@ God bless America.
density = TRUE
use_power = IDLE_POWER_USE
idle_power_usage = 5
container_type = OPENCONTAINER
layer = BELOW_OBJ_LAYER
var/obj/item/reagent_containers/food/snacks/deepfryholder/frying //What's being fried RIGHT NOW?
var/cook_time = 0
@@ -52,7 +51,7 @@ God bless America.
/obj/machinery/deepfryer/Initialize()
. = ..()
create_reagents(50)
create_reagents(50, OPENCONTAINER)
reagents.add_reagent("cooking_oil", 25)
component_parts = list()
component_parts += new /obj/item/circuitboard/machine/deep_fryer(null)
@@ -15,13 +15,11 @@
var/portion = 10
var/selected_drink
var/list/stored_food = list()
container_type = OPENCONTAINER
var/obj/item/reagent_containers/mixer
/obj/machinery/food_cart/Initialize()
. = ..()
create_reagents(LIQUID_CAPACIY)
reagents.set_reacting(FALSE)
create_reagents(LIQUID_CAPACIY, OPENCONTAINER | NO_REACT)
mixer = new /obj/item/reagent_containers(src, MIXER_CAPACITY)
mixer.name = "Mixer"
@@ -14,7 +14,6 @@
anchored = FALSE
use_power = NO_POWER_USE
layer = BELOW_OBJ_LAYER
container_type = OPENCONTAINER
max_integrity = 300
var/list/product_types = list()
var/dispense_flavour = ICECREAM_VANILLA
@@ -65,8 +64,7 @@
. = ..()
while(product_types.len < 6)
product_types.Add(5)
create_reagents()
reagents.set_reacting(FALSE)
create_reagents(100, OPENCONTAINER | NO_REACT)
for(var/reagent in icecream_vat_reagents)
reagents.add_reagent(reagent, icecream_vat_reagents[reagent])
@@ -86,7 +86,6 @@
src.icon_state = "mw"
src.broken = 0 // Fix it!
src.dirty = 0 // just to be sure
src.container_type = OPENCONTAINER
return 0 //to use some fuel
else
to_chat(user, "<span class='warning'>It's broken!</span>")
@@ -103,7 +102,6 @@
src.dirty = 0 // It's clean!
src.broken = 0 // just to be sure
src.icon_state = "mw"
src.container_type = OPENCONTAINER
src.updateUsrDialog()
return 1 // Disables the after-attack so we don't spray the floor/user.
else
@@ -124,7 +122,6 @@
src.dirty = 0 // It's clean!
src.broken = 0 // just to be sure
src.icon_state = "mw"
src.container_type = OPENCONTAINER
else if(src.dirty==100) // The microwave is all dirty so can't be used!
to_chat(user, "<span class='warning'>It's dirty!</span>")
@@ -18,8 +18,7 @@
/obj/machinery/smartfridge/Initialize()
. = ..()
create_reagents()
reagents.set_reacting(FALSE)
create_reagents(100, NO_REACT)
if(islist(initial_contents))
for(var/typekey in initial_contents)
@@ -5,14 +5,13 @@
icon_state = "barrel"
density = TRUE
anchored = FALSE
container_type = DRAINABLE | AMOUNT_VISIBLE
pressure_resistance = 2 * ONE_ATMOSPHERE
max_integrity = 300
var/open = FALSE
var/speed_multiplier = 1 //How fast it distills. Defaults to 100% (1.0). Lower is better.
/obj/structure/fermenting_barrel/Initialize()
create_reagents(300) //Bluespace beakers, but without the portability or efficiency in circuits.
create_reagents(300, DRAINABLE | AMOUNT_VISIBLE) //Bluespace beakers, but without the portability or efficiency in circuits.
. = ..()
/obj/structure/fermenting_barrel/examine(mob/user)
@@ -56,10 +55,12 @@
/obj/structure/fermenting_barrel/attack_hand(mob/user)
open = !open
if(open)
container_type = REFILLABLE | AMOUNT_VISIBLE
DISABLE_BITFIELD(reagents.reagents_holder_flags, DRAINABLE)
ENABLE_BITFIELD(reagents.reagents_holder_flags, REFILLABLE)
to_chat(user, "<span class='notice'>You open [src], letting you fill it.</span>")
else
container_type = DRAINABLE | AMOUNT_VISIBLE
DISABLE_BITFIELD(reagents.reagents_holder_flags, REFILLABLE)
ENABLE_BITFIELD(reagents.reagents_holder_flags, DRAINABLE)
to_chat(user, "<span class='notice'>You close [src], letting you draw from its tap.</span>")
update_icon()
+1 -2
View File
@@ -7,7 +7,6 @@
species = "replicapod"
plantname = "Replica Pod"
product = /mob/living/carbon/human //verrry special -- Urist
container_type = INJECTABLE|DRAWABLE
lifespan = 50
endurance = 8
maturation = 10
@@ -28,7 +27,7 @@
/obj/item/seeds/replicapod/Initialize()
. = ..()
create_reagents(volume)
create_reagents(volume, INJECTABLE | DRAWABLE)
/obj/item/seeds/replicapod/on_reagent_change(changetype)
if(changetype == ADD_REAGENT)
+2 -2
View File
@@ -310,10 +310,10 @@
/datum/plant_gene/trait/noreact/on_new(obj/item/reagent_containers/food/snacks/grown/G, newloc)
..()
G.reagents.set_reacting(FALSE)
ENABLE_BITFIELD(G.reagents.reagents_holder_flags, NO_REACT)
/datum/plant_gene/trait/noreact/on_squash(obj/item/reagent_containers/food/snacks/grown/G, atom/target)
G.reagents.set_reacting(TRUE)
DISABLE_BITFIELD(G.reagents.reagents_holder_flags, NO_REACT)
G.reagents.handle_reactions()
@@ -90,7 +90,6 @@
icon_state = "chemical_cell"
extended_desc = "This is effectively an internal beaker. It will consume and produce power from plasma, slime jelly, welding fuel, carbon,\
ethanol, nutriment, and blood in order of decreasing efficiency. It will consume fuel only if the battery can take more energy."
container_type = OPENCONTAINER
complexity = 4
inputs = list()
outputs = list("volume used" = IC_PINTYPE_NUMBER, "self reference" = IC_PINTYPE_SELFREF)
@@ -101,9 +100,9 @@
var/multi = 1
var/lfwb =TRUE
/obj/item/integrated_circuit/passive/power/chemical_cell/New()
/obj/item/integrated_circuit/passive/power/chemical_cell/Initialize()
..()
create_reagents(volume)
create_reagents(volume, OPENCONTAINER)
extended_desc +="But no fuel can be compared with blood of living human."
@@ -51,7 +51,6 @@
extended_desc = "This autoinjector can push up to 30 units of reagents into another container or someone else outside of the machine. The target \
must be adjacent to the machine, and if it is a person, they cannot be wearing thick clothing. Negative given amounts makes the injector suck out reagents instead."
container_type = OPENCONTAINER
volume = 30
complexity = 20
@@ -80,6 +79,10 @@
var/transfer_amount = 10
var/busy = FALSE
/obj/item/integrated_circuit/reagent/injector/Initialize()
. = ..()
ENABLE_BITFIELD(reagents.reagents_holder_flags, OPENCONTAINER)
/obj/item/integrated_circuit/reagent/injector/on_reagent_change(changetype)
push_vol()
@@ -260,7 +263,6 @@
icon_state = "reagent_storage"
extended_desc = "This is effectively an internal beaker."
container_type = OPENCONTAINER
volume = 60
complexity = 4
@@ -272,7 +274,9 @@
activators = list("push ref" = IC_PINTYPE_PULSE_OUT)
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/integrated_circuit/reagent/storage/Initialize()
. = ..()
ENABLE_BITFIELD(reagents.reagents_holder_flags, OPENCONTAINER)
/obj/item/integrated_circuit/reagent/storage/do_work()
set_pin_data(IC_OUTPUT, 2, WEAKREF(src))
@@ -302,7 +306,7 @@
/obj/item/integrated_circuit/reagent/storage/cryo/Initialize()
. = ..()
reagents.set_reacting(FALSE)
ENABLE_BITFIELD(reagents.flags, NO_REACT)
/obj/item/integrated_circuit/reagent/storage/grinder
name = "reagent grinder"
@@ -501,7 +505,6 @@
desc = "Stores liquid inside the device away from electrical components. It can store up to 60u. It will heat or cool the reagents \
to the target temperature when turned on."
icon_state = "heater"
container_type = OPENCONTAINER
complexity = 8
inputs = list(
"target temperature" = IC_PINTYPE_NUMBER,
@@ -552,7 +555,6 @@
ext_cooldown = 1
volume = 100
container_type = OPENCONTAINER
complexity = 20
cooldown_per_use = 1 SECONDS
@@ -571,6 +573,10 @@
var/smoke_radius = 5
var/notified = FALSE
/obj/item/integrated_circuit/reagent/smoke/Initialize()
. = ..()
ENABLE_BITFIELD(reagents.reagents_holder_flags, OPENCONTAINER)
/obj/item/integrated_circuit/reagent/smoke/on_reagent_change(changetype)
//reset warning only if we have reagents now
if(changetype == ADD_REAGENT)
@@ -605,7 +611,6 @@
extended_desc = "This circuit can hold up to 30 units of any given chemicals. On each use, it sprays these reagents like a fire extinguisher. Requires at least 10 units of reagents to work."
volume = 30
container_type = OPENCONTAINER
complexity = 20
cooldown_per_use = 6 SECONDS
@@ -628,6 +633,7 @@
/obj/item/integrated_circuit/reagent/extinguisher/Initialize()
.=..()
ENABLE_BITFIELD(reagents.reagents_holder_flags, OPENCONTAINER)
set_pin_data(IC_OUTPUT,2, src)
/obj/item/integrated_circuit/reagent/extinguisher/on_reagent_change(changetype)
+1 -4
View File
@@ -151,9 +151,6 @@
/*
* Sleepypens
*/
/obj/item/pen/sleepy
container_type = OPENCONTAINER
/obj/item/pen/sleepy/attack(mob/living/M, mob/user)
if(!istype(M))
@@ -167,7 +164,7 @@
/obj/item/pen/sleepy/Initialize()
. = ..()
create_reagents(45)
create_reagents(45, OPENCONTAINER)
reagents.add_reagent("chloralhydratedelayed", 20)
reagents.add_reagent("mutetoxin", 15)
reagents.add_reagent("tirizene", 10)
+1 -2
View File
@@ -20,7 +20,6 @@
var/self_recharge = 0 //does it self recharge, over time, or not?
var/ratingdesc = TRUE
var/grown_battery = FALSE // If it's a grown that acts as a battery, add a wire overlay to it.
container_type = INJECTABLE|DRAINABLE
/obj/item/stock_parts/cell/get_cell()
return src
@@ -28,7 +27,7 @@
/obj/item/stock_parts/cell/Initialize(mapload, override_maxcharge)
. = ..()
START_PROCESSING(SSobj, src)
create_reagents(5)
create_reagents(5, INJECTABLE | DRAINABLE)
if (override_maxcharge)
maxcharge = override_maxcharge
charge = maxcharge
@@ -111,23 +111,23 @@
icon_state = "cshell"
projectile_type = /obj/item/projectile/bullet/dart
var/reagent_amount = 30
var/reagent_react = TRUE
/obj/item/ammo_casing/shotgun/dart/Initialize()
. = ..()
create_reagents(reagent_amount, OPENCONTAINER)
/obj/item/ammo_casing/shotgun/dart/attackby()
return
/obj/item/ammo_casing/shotgun/dart/noreact
name = "cryostasis shotgun dart"
desc = "A dart for use in shotguns. Uses technology similar to cryostasis beakers to keep internal reagents from reacting. Can be injected with up to 10 units of any chemical."
icon_state = "cnrshell"
reagent_amount = 10
reagent_react = FALSE
/obj/item/ammo_casing/shotgun/dart/Initialize()
/obj/item/ammo_casing/shotgun/dart/noreact/Initialize()
. = ..()
container_type |= OPENCONTAINER
create_reagents(reagent_amount)
reagents.set_reacting(reagent_react)
/obj/item/ammo_casing/shotgun/dart/attackby()
return
ENABLE_BITFIELD(reagents.reagents_holder_flags, NO_REACT)
/obj/item/ammo_casing/shotgun/dart/bioterror
desc = "A shotgun dart filled with deadly toxins."
@@ -12,7 +12,6 @@
materials = list(MAT_METAL=2000)
clumsy_check = FALSE
fire_sound = 'sound/items/syringeproj.ogg'
container_type = OPENCONTAINER
var/time_per_syringe = 250
var/syringes_left = 4
var/max_syringes = 4
@@ -22,7 +21,7 @@
. = ..()
chambered = new /obj/item/ammo_casing/chemgun(src)
START_PROCESSING(SSobj, src)
create_reagents(100)
create_reagents(100, OPENCONTAINER)
/obj/item/gun/chem/Destroy()
. = ..()
@@ -6,8 +6,7 @@
/obj/item/projectile/bullet/dart/Initialize()
. = ..()
create_reagents(50)
reagents.set_reacting(FALSE)
create_reagents(50, NO_REACT)
/obj/item/projectile/bullet/dart/on_hit(atom/target, blocked = FALSE)
if(iscarbon(target))
@@ -24,7 +23,7 @@
"<span class='userdanger'>You were protected against \the [src]!</span>")
..(target, blocked)
reagents.set_reacting(TRUE)
DISABLE_BITFIELD(reagents.reagents_holder_flags, NO_REACT)
reagents.handle_reactions()
return TRUE
+10 -15
View File
@@ -53,7 +53,7 @@
var/list/datum/reagent/addiction_list = new/list()
var/reagents_holder_flags
/datum/reagents/New(maximum=100)
/datum/reagents/New(maximum=100, new_flags)
maximum_volume = maximum
//I dislike having these here but map-objects are initialised before world/New() is called. >_>
@@ -62,6 +62,8 @@
if(!GLOB.chemical_reactions_list)
build_chemical_reactions_list()
reagents_holder_flags = new_flags
/datum/reagents/Destroy()
. = ..()
var/list/cached_reagents = reagent_list
@@ -311,13 +313,6 @@
C.update_stamina()
update_total()
/datum/reagents/proc/set_reacting(react = TRUE)
if(react)
reagents_holder_flags &= ~(REAGENT_NOREACT)
else
reagents_holder_flags |= REAGENT_NOREACT
/datum/reagents/proc/conditional_update_move(atom/A, Running = 0)
var/list/cached_reagents = reagent_list
for(var/reagent in cached_reagents)
@@ -333,11 +328,11 @@
update_total()
/datum/reagents/proc/handle_reactions()
if(reagents_holder_flags & NO_REACT)
return //Yup, no reactions here. No siree.
var/list/cached_reagents = reagent_list
var/list/cached_reactions = GLOB.chemical_reactions_list
var/datum/cached_my_atom = my_atom
if(reagents_holder_flags & REAGENT_NOREACT)
return //Yup, no reactions here. No siree.
var/reaction_occurred = 0
do
@@ -555,7 +550,7 @@
if(!D)
WARNING("[my_atom] attempted to add a reagent called '[reagent]' which doesn't exist. ([usr])")
return FALSE
update_total()
var/cached_total = total_volume
if(cached_total + amount > maximum_volume)
@@ -599,9 +594,9 @@
if(data)
R.data = data
R.on_new(data)
if(isliving(my_atom))
R.on_mob_add(my_atom) //Must occur befor it could posibly run on_mob_delete
R.on_mob_add(my_atom) //Must occur befor it could posibly run on_mob_delete
update_total()
if(my_atom)
my_atom.on_reagent_change(ADD_REAGENT)
@@ -800,10 +795,10 @@
// Convenience proc to create a reagents holder for an atom
// Max vol is maximum volume of holder
/atom/proc/create_reagents(max_vol)
/atom/proc/create_reagents(max_vol, flags)
if(reagents)
qdel(reagents)
reagents = new/datum/reagents(max_vol)
reagents = new/datum/reagents(max_vol, flags)
reagents.my_atom = src
/proc/get_random_reagent_id() // Returns a random reagent ID minus blacklisted reagents
+1 -1
View File
@@ -230,7 +230,7 @@ By default, all atom have a reagents var - but its empty. if you want to use an
'pouring' our reagents into something else.
atom/proc/is_open_container()
Checks obj/var/container_type & OPENCONTAINER.
Checks atom/var/reagents.reagents_holder_flags & OPENCONTAINER.
If this returns 1 , you can use syringes, beakers etc
to manipulate the contents of this object.
If it's 0, you'll need to write your own custom reagent
+2 -1
View File
@@ -7,6 +7,7 @@
var/amount_per_transfer_from_this = 5
var/list/possible_transfer_amounts = list(5,10,15,20,25,30)
var/volume = 30
var/reagent_flags
var/list/list_reagents = null
var/spawned_disease = null
var/disease_amount = 20
@@ -16,7 +17,7 @@
. = ..()
if(isnum(vol) && vol > 0)
volume = vol
create_reagents(volume)
create_reagents(volume, reagent_flags)
if(spawned_disease)
var/datum/disease/F = new spawned_disease()
var/list/data = list("viruses"= list(F))
@@ -6,7 +6,7 @@
amount_per_transfer_from_this = 5
possible_transfer_amounts = list(1, 2, 3, 4, 5)
volume = 5
container_type = TRANSPARENT
reagent_flags = TRANSPARENT
/obj/item/reagent_containers/dropper/afterattack(obj/target, mob/user , proximity)
. = ..()
@@ -3,7 +3,7 @@
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(5, 10, 15, 20, 25, 30, 50)
volume = 50
container_type = OPENCONTAINER
reagent_flags = OPENCONTAINER
spillable = TRUE
resistance_flags = ACID_PROOF
@@ -194,13 +194,10 @@
reactions. Can hold up to 50 units."
icon_state = "beakernoreact"
materials = list(MAT_METAL=3000)
reagent_flags = OPENCONTAINER | NO_REACT
volume = 50
amount_per_transfer_from_this = 10
/obj/item/reagent_containers/glass/beaker/noreact/Initialize()
. = ..()
reagents.set_reacting(FALSE)
/obj/item/reagent_containers/glass/beaker/bluespace
name = "bluespace beaker"
desc = "A bluespace beaker, powered by experimental bluespace technology \
@@ -291,11 +288,11 @@
to_chat(user, "<span class='userdanger'>[src]'s contents spill all over you!</span>")
reagents.reaction(user, TOUCH)
reagents.clear_reagents()
container_type = NONE
reagent_flags = NONE
/obj/item/reagent_containers/glass/bucket/dropped(mob/user)
. = ..()
container_type = initial(container_type)
reagent_flags = initial(reagent_flags)
/obj/item/reagent_containers/glass/bucket/equip_to_best_slot(var/mob/M)
if(reagents.total_volume) //If there is water in a bucket, don't quick equip it to the head
@@ -10,7 +10,7 @@
volume = 30
possible_transfer_amounts = list()
resistance_flags = ACID_PROOF
container_type = OPENCONTAINER
reagent_flags = OPENCONTAINER
slot_flags = ITEM_SLOT_BELT
var/ignore_flags = 0
var/infinite = FALSE
@@ -73,7 +73,7 @@
desc = "A modified air-needle autoinjector with a small single-use reservoir. It contains an experimental serum."
icon_state = "combat_hypo"
volume = 5
container_type = NONE
reagent_flags = NONE
list_reagents = list("magillitis" = 5)
//MediPens
@@ -88,7 +88,7 @@
amount_per_transfer_from_this = 10
volume = 10
ignore_flags = 1 //so you can medipen through hardsuits
container_type = DRAWABLE
reagent_flags = DRAWABLE
flags_1 = null
list_reagents = list("epinephrine" = 10)
@@ -103,7 +103,7 @@
..()
if(!iscyborg(user))
reagents.maximum_volume = 0 //Makes them useless afterwards
container_type = NONE
reagent_flags = NONE
update_icon()
addtimer(CALLBACK(src, .proc/cyborg_recharge, user), 80)
@@ -8,7 +8,7 @@
righthand_file = 'icons/mob/inhands/equipment/hydroponics_righthand.dmi'
item_flags = NOBLUDGEON
obj_flags = UNIQUE_RENAME
container_type = OPENCONTAINER
reagent_flags = OPENCONTAINER
slot_flags = ITEM_SLOT_BELT
throwforce = 0
w_class = WEIGHT_CLASS_SMALL
@@ -7,7 +7,7 @@
lefthand_file = 'icons/mob/inhands/equipment/custodial_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/custodial_righthand.dmi'
item_flags = NOBLUDGEON
container_type = OPENCONTAINER
reagent_flags = OPENCONTAINER
slot_flags = ITEM_SLOT_BELT
throwforce = 0
w_class = WEIGHT_CLASS_SMALL
@@ -224,7 +224,7 @@
return
/obj/item/reagent_containers/spray/waterflower/cyborg
container_type = NONE
reagent_flags = NONE
volume = 100
list_reagents = list("water" = 100)
var/generate_amount = 5
@@ -13,7 +13,7 @@
var/busy = FALSE // needed for delayed drawing of blood
var/proj_piercing = 0 //does it pierce through thick clothes when shot with syringe gun
materials = list(MAT_METAL=10, MAT_GLASS=20)
container_type = TRANSPARENT
reagent_flags = TRANSPARENT
/obj/item/reagent_containers/syringe/Initialize()
. = ..()
@@ -249,10 +249,7 @@
name = "cryo syringe"
desc = "An advanced syringe that stops reagents inside from reacting. It can hold up to 20 units."
volume = 20
/obj/item/reagent_containers/syringe/noreact/Initialize()
. = ..()
reagents.set_reacting(FALSE)
reagent_flags = TRANSPARENT | NO_REACT
/obj/item/reagent_containers/syringe/piercing
name = "piercing syringe"
+1 -2
View File
@@ -5,7 +5,6 @@
icon_state = "water"
density = TRUE
anchored = FALSE
container_type = DRAINABLE | AMOUNT_VISIBLE
pressure_resistance = 2*ONE_ATMOSPHERE
max_integrity = 300
var/tank_volume = 1000 //In units, how much the dispenser can hold
@@ -24,7 +23,7 @@
return ..()
/obj/structure/reagent_dispensers/Initialize()
create_reagents(tank_volume)
create_reagents(tank_volume, DRAINABLE | AMOUNT_VISIBLE)
reagents.add_reagent(reagent_id, tank_volume)
. = ..()
@@ -1,7 +1,6 @@
/obj/machinery/rnd/production
name = "technology fabricator"
desc = "Makes researched and prototype items with materials and energy."
container_type = OPENCONTAINER
layer = BELOW_OBJ_LAYER
var/consoleless_interface = FALSE //Whether it can be used without a console.
var/efficiency_coeff = 1 //Materials needed / coeff = actual.
@@ -21,7 +20,7 @@
/obj/machinery/rnd/production/Initialize(mapload)
. = ..()
create_reagents(0)
create_reagents(0, OPENCONTAINER)
matching_designs = list()
cached_designs = list()
stored_research = new
@@ -2,7 +2,6 @@
name = "circuit imprinter"
desc = "Manufactures circuit boards for the construction of machines."
icon_state = "circuit_imprinter"
container_type = OPENCONTAINER
circuit = /obj/item/circuitboard/machine/circuit_imprinter
categories = list(
"AI Modules",
@@ -2,7 +2,6 @@
name = "department circuit imprinter"
desc = "A special circuit imprinter with a built in interface meant for departmental usage, with built in ExoSync receivers allowing it to print designs researched that match its ROM-encoded department type."
icon_state = "circuit_imprinter"
container_type = OPENCONTAINER
circuit = /obj/item/circuitboard/machine/circuit_imprinter/department
requires_console = FALSE
consoleless_interface = TRUE
@@ -2,7 +2,6 @@
name = "department protolathe"
desc = "A special protolathe with a built in interface meant for departmental usage, with built in ExoSync receivers allowing it to print designs researched that match its ROM-encoded department type."
icon_state = "protolathe"
container_type = OPENCONTAINER
circuit = /obj/item/circuitboard/machine/protolathe/department
requires_console = FALSE
consoleless_interface = TRUE
@@ -2,7 +2,6 @@
name = "department techfab"
desc = "An advanced fabricator designed to print out the latest prototypes and circuits researched from Science. Contains hardware to sync to research networks. This one is department-locked and only possesses a limited set of decryption keys."
icon_state = "protolathe"
container_type = OPENCONTAINER
circuit = /obj/item/circuitboard/machine/techfab/department
/obj/machinery/rnd/production/techfab/department/engineering
@@ -2,7 +2,6 @@
name = "protolathe"
desc = "Converts raw materials into useful objects."
icon_state = "protolathe"
container_type = OPENCONTAINER
circuit = /obj/item/circuitboard/machine/protolathe
categories = list(
"Power Designs",
@@ -2,7 +2,6 @@
name = "technology fabricator"
desc = "Produces researched prototypes with raw materials and energy."
icon_state = "protolathe"
container_type = OPENCONTAINER
circuit = /obj/item/circuitboard/machine/techfab
categories = list(
"Power Designs",
@@ -90,12 +90,11 @@ To add a crossbreed:
icon = 'icons/obj/slimecrossing.dmi'
icon_state = "base"
var/del_on_empty = TRUE
container_type = INJECTABLE | DRAWABLE
var/list/list_reagents
/obj/item/slimecrossbeaker/Initialize()
. = ..()
create_reagents(50)
create_reagents(50, INJECTABLE | DRAWABLE)
if(list_reagents)
for(var/reagent in list_reagents)
reagents.add_reagent(reagent, list_reagents[reagent])
@@ -130,10 +129,13 @@ To add a crossbreed:
list_reagents = list("omnizine" = 15)
/obj/item/slimecrossbeaker/autoinjector //As with the above, but automatically injects whomever it is used on with contents.
container_type = DRAWABLE //Cannot be refilled, since it's basically an autoinjector!
var/ignore_flags = FALSE
var/self_use_only = FALSE
/obj/item/slimecrossbeaker/autoinjector/Initialize()
. = ..()
reagents.reagents_holder_flags = DRAWABLE // Cannot be refilled, since it's basically an autoinjector!
/obj/item/slimecrossbeaker/autoinjector/attack(mob/living/M, mob/user)
if(!reagents.total_volume)
to_chat(user, "<span class='warning'>[src] is empty!</span>")
@@ -169,12 +171,15 @@ To add a crossbreed:
list_reagents = list("slimejelly" = 50)
/obj/item/slimecrossbeaker/autoinjector/peaceandlove
container_type = null //It won't be *that* easy to get your hands on pax.
name = "peaceful distillation"
desc = "A light pink gooey sphere. Simply touching it makes you a little dizzy."
color = "#DDAAAA"
list_reagents = list("synthpax" = 10, "space_drugs" = 15) //Peace, dudes
/obj/item/slimecrossbeaker/autoinjector/peaceandlove/Initialize()
. = ..()
reagents.reagents_holder_flags = NONE // It won't be *that* easy to get your hands on pax.
/obj/item/slimecrossbeaker/autoinjector/slimestimulant
name = "invigorating gel"
desc = "A bubbling purple mixture, designed to heal and boost movement."
@@ -7,12 +7,11 @@ Burning extracts:
name = "burning extract"
desc = "It's boiling over with barely-contained energy."
effect = "burning"
container_type = INJECTABLE | DRAWABLE
icon_state = "burning"
/obj/item/slimecross/burning/Initialize()
. = ..()
create_reagents(10)
create_reagents(10, INJECTABLE | DRAWABLE)
/obj/item/slimecross/burning/attack_self(mob/user)
if(!reagents.has_reagent("plasma",10))
@@ -8,12 +8,11 @@ Charged extracts:
name = "charged extract"
desc = "It sparks with electric power."
effect = "charged"
container_type = INJECTABLE | DRAWABLE
icon_state = "charged"
/obj/item/slimecross/charged/Initialize()
. = ..()
create_reagents(10)
create_reagents(10, INJECTABLE | DRAWABLE)
/obj/item/slimecross/charged/attack_self(mob/user)
if(!reagents.has_reagent("plasma",10))
@@ -7,12 +7,11 @@ Chilling extracts:
name = "chilling extract"
desc = "It's cold to the touch, as if frozen solid."
effect = "chilling"
container_type = INJECTABLE | DRAWABLE
icon_state = "chilling"
/obj/item/slimecross/chilling/Initialize()
. = ..()
create_reagents(10)
create_reagents(10, INJECTABLE | DRAWABLE)
/obj/item/slimecross/chilling/attack_self(mob/user)
if(!reagents.has_reagent("plasma",10))
@@ -5,7 +5,6 @@ Industrial extracts:
/obj/item/slimecross/industrial
name = "industrial extract"
desc = "A gel-like, sturdy extract, fond of plasma and industry."
container_type = INJECTABLE | DRAWABLE
effect = "industrial"
icon_state = "industrial_still"
var/plasmarequired = 2 //Units of plasma required to be consumed to produce item.
@@ -22,7 +21,7 @@ Industrial extracts:
/obj/item/slimecross/industrial/Initialize()
. = ..()
create_reagents(100)
create_reagents(100, INJECTABLE | DRAWABLE)
START_PROCESSING(SSobj,src)
/obj/item/slimecross/industrial/Destroy()
@@ -10,7 +10,6 @@
throwforce = 0
throw_speed = 3
throw_range = 6
container_type = INJECTABLE | DRAWABLE
grind_results = list()
var/Uses = 1 // uses before it goes inert
var/qdel_timer = null // deletion timer, for delayed reactions
@@ -39,7 +38,7 @@
/obj/item/slime_extract/Initialize()
. = ..()
create_reagents(100)
create_reagents(100, INJECTABLE | DRAWABLE)
/obj/item/slime_extract/on_grind()
if(Uses)