Merge branch 'master' into fix-stuff

This commit is contained in:
mochi
2020-08-07 10:07:18 +02:00
1233 changed files with 71721 additions and 374898 deletions
+3 -19
View File
@@ -13,7 +13,6 @@
var/list/datum/reagent/addiction_list = new/list()
var/list/addiction_threshold_accumulated = new/list()
var/flags
var/list/reagents_generated_per_cycle = new/list()
/datum/reagents/New(maximum = 100, temperature_minimum, temperature_maximum)
maximum_volume = maximum
@@ -21,8 +20,6 @@
temperature_min = temperature_minimum
if(temperature_maximum)
temperature_max = temperature_maximum
if(!(flags & REAGENT_NOREACT))
START_PROCESSING(SSobj, src)
//I dislike having these here but map-objects are initialised before world/New() is called. >_>
if(!GLOB.chemical_reagents_list)
//Chemical Reagents - Initialises all /datum/reagent into a list indexed by reagent id
@@ -185,7 +182,7 @@
return amount
/datum/reagents/proc/set_reagent_temp(new_temp = T0C, react = TRUE)
chem_temp = Clamp(new_temp, temperature_min, temperature_max)
chem_temp = clamp(new_temp, temperature_min, temperature_max)
if(react)
temperature_react()
handle_reactions()
@@ -331,6 +328,7 @@
M.update_canmove()
if(update_flags & STATUS_UPDATE_STAMINA)
M.update_stamina()
M.update_health_hud()
if(update_flags & STATUS_UPDATE_BLIND)
M.update_blind_effects()
if(update_flags & STATUS_UPDATE_BLURRY)
@@ -360,23 +358,10 @@
od_chems.Add(R.id)
return od_chems
/datum/reagents/process()
if(flags & REAGENT_NOREACT)
STOP_PROCESSING(SSobj, src)
return
for(var/thing in reagents_generated_per_cycle)
add_reagent(thing, reagents_generated_per_cycle[thing])
for(var/datum/reagent/R in reagent_list)
R.on_tick()
/datum/reagents/proc/set_reacting(react = TRUE)
if(react)
// Order is important, process() can remove from processing if
// the flag is present
flags &= ~(REAGENT_NOREACT)
START_PROCESSING(SSobj, src)
else
STOP_PROCESSING(SSobj, src)
flags |= REAGENT_NOREACT
/*
@@ -638,7 +623,7 @@
if(total_volume + amount > maximum_volume) amount = (maximum_volume - total_volume) //Doesnt fit in. Make it disappear. Shouldnt happen. Will happen.
if(amount <= 0)
return 0
chem_temp = Clamp((chem_temp * total_volume + reagtemp * amount) / (total_volume + amount), temperature_min, temperature_max) //equalize with new chems
chem_temp = clamp((chem_temp * total_volume + reagtemp * amount) / (total_volume + amount), temperature_min, temperature_max) //equalize with new chems
for(var/A in reagent_list)
@@ -905,7 +890,6 @@
/datum/reagents/Destroy()
. = ..()
STOP_PROCESSING(SSobj, src)
QDEL_LIST(reagent_list)
reagent_list = null
QDEL_LIST(addiction_list)
@@ -118,10 +118,10 @@
if(href_list["adjust_temperature"])
var/val = href_list["adjust_temperature"]
if(isnum(val))
desired_temp = Clamp(desired_temp+val, 0, 1000)
desired_temp = clamp(desired_temp+val, 0, 1000)
else if(val == "input")
var/target = input("Please input the target temperature", name) as num
desired_temp = Clamp(target, 0, 1000)
desired_temp = clamp(target, 0, 1000)
else
return FALSE
. = 1
@@ -185,8 +185,8 @@
color = COLOR_PALE_BTL_GREEN
if("Orange wrapper")
color = COLOR_ORANGE
loaded_pill_bottle.wrapper_color = color;
loaded_pill_bottle.apply_wrap();
loaded_pill_bottle.wrapper_color = color
loaded_pill_bottle.apply_wrap()
else if(href_list["close"])
usr << browse(null, "window=chem_master")
onclose(usr, "chem_master")
+6 -10
View File
@@ -120,8 +120,10 @@
return
// Called every time reagent containers process.
/datum/reagent/proc/on_tick(data)
return
/datum/reagent/process()
if(!holder || holder.flags & REAGENT_NOREACT)
return FALSE
return TRUE
// Called when the reagent container is hit by an explosion
/datum/reagent/proc/on_ex_act(severity)
@@ -203,9 +205,7 @@
return
M.emote("deathgasp")
M.status_flags |= FAKEDEATH
M.update_stat("fakedeath reagent")
M.med_hud_set_health()
M.med_hud_set_status()
M.updatehealth("fakedeath reagent")
/datum/reagent/proc/fakerevive(mob/living/M)
if(!(M.status_flags & FAKEDEATH))
@@ -215,10 +215,6 @@
if(M.resting)
M.StopResting()
M.status_flags &= ~(FAKEDEATH)
M.update_stat("fakedeath reagent end")
M.med_hud_set_status()
M.med_hud_set_health()
if(M.healthdoll)
M.healthdoll.cached_healthdoll_overlays.Cut()
if(M.dna.species)
M.dna.species.handle_hud_icons(M)
M.updatehealth("fakedeath reagent end")
@@ -18,18 +18,18 @@
/datum/reagent/consumable/ethanol/reaction_obj(obj/O, volume)
if(istype(O,/obj/item/paper))
if(istype(O,/obj/item/paper/contract/infernal))
to_chat(usr, "The solution ignites on contact with the [O].")
O.visible_message("<span class='warning'>The solution ignites on contact with [O].</span>")
else
var/obj/item/paper/paperaffected = O
paperaffected.clearpaper()
to_chat(usr, "The solution melts away the ink on the paper.")
paperaffected.visible_message("<span class='notice'>The solution melts away the ink on the paper.</span>")
if(istype(O,/obj/item/book))
if(volume >= 5)
var/obj/item/book/affectedbook = O
affectedbook.dat = null
to_chat(usr, "The solution melts away the ink on the book.")
affectedbook.visible_message("<span class='notice'>The solution melts away the ink on the book.</span>")
else
to_chat(usr, "It wasn't enough...")
O.visible_message("<span class='warning'>It wasn't enough...</span>")
/datum/reagent/consumable/ethanol/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume)//Splashing people with ethanol isn't quite as good as fuel.
if(method == REAGENT_TOUCH)
@@ -1190,12 +1190,12 @@
taste_description = "motor oil"
/datum/reagent/consumable/ethanol/synthanol/on_mob_life(mob/living/M)
metabolization_rate = REAGENTS_METABOLISM
if(!(M.dna.species.reagent_tag & PROCESS_SYN))
holder.remove_reagent(id, 3.6) //gets removed from organics very fast
metabolization_rate += 3.6 //gets removed from organics very fast
if(prob(25))
holder.remove_reagent(id, 15)
metabolization_rate += 15
M.fakevomit()
return ..()
/datum/reagent/consumable/ethanol/synthanol/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume)
@@ -125,7 +125,7 @@
/datum/reagent/blob/proc/reagent_vortex(mob/living/M, setting_type, volume)
var/turf/pull = get_turf(M)
var/range_power = Clamp(round(volume/5, 1), 1, 5)
var/range_power = clamp(round(volume/5, 1), 1, 5)
for(var/atom/movable/X in range(range_power,pull))
if(istype(X, /obj/effect))
continue
@@ -543,7 +543,7 @@
M.AdjustConfused(-5)
update_flags |= M.SetWeakened(0, FALSE)
if(volume >= 70 && prob(25))
if(M.reagents.has_reagent("thc") <= 20)
if(M.reagents.get_reagent_amount("thc") <= 20)
M.Drowsy(10)
if(prob(25))
update_flags |= M.adjustBruteLoss(-2, FALSE)
@@ -173,6 +173,29 @@
metabolization_rate = 0.2
taste_description = "antibiotics"
/datum/reagent/medicine/spaceacillin/on_mob_life(mob/living/M)
var/list/organs_list = list()
if(iscarbon(M))
var/mob/living/carbon/C = M
organs_list += C.internal_organs
if(ishuman(M))
var/mob/living/carbon/human/H = M
organs_list += H.bodyparts
for(var/X in organs_list)
var/obj/item/organ/O = X
if(O.germ_level < INFECTION_LEVEL_ONE)
O.germ_level = 0 //cure instantly
else if(O.germ_level < INFECTION_LEVEL_TWO)
O.germ_level = max(M.germ_level - 25, 0) //at germ_level == 500, this should cure the infection in 34 seconds
else
O.germ_level = max(M.germ_level - 10, 0) // at germ_level == 1000, this will cure the infection in 1 minutes, 14 seconds
organs_list.Cut()
M.germ_level = max(M.germ_level - 20, 0) // Reduces the mobs germ level, too
return ..()
/datum/reagent/medicine/silver_sulfadiazine
name = "Silver Sulfadiazine"
id = "silver_sulfadiazine"
@@ -790,7 +813,7 @@
..()
return
M.SetJitter(0)
var/needs_update = M.mutations.len > 0 || M.disabilities > 0
var/needs_update = M.mutations.len > 0
if(needs_update)
for(var/block = 1; block<=DNA_SE_LENGTH; block++)
@@ -450,21 +450,18 @@
var/mob/living/carbon/C = holder.my_atom
if(!istype(C))
return
var/mind_type = FALSE
if(C.mind)
if(C.mind.assigned_role == "Clown" || C.mind.assigned_role == SPECIAL_ROLE_HONKSQUAD)
mind_type = "Clown"
to_chat(C, "<span class='notice'>Whatever that was, it feels great!</span>")
else if(C.mind.assigned_role == "Mime")
mind_type = "Mime"
to_chat(C, "<span class='warning'>You feel nauseous.</span>")
C.AdjustDizzy(volume)
else
to_chat(C, "<span class='warning'>Something doesn't feel right...</span>")
C.AdjustDizzy(volume)
C.AddComponent(/datum/component/jestosterone, mind_type)
ADD_TRAIT(C, TRAIT_JESTER, id)
C.AddComponent(/datum/component/squeak, null, null, null, null, null, TRUE)
C.AddComponent(/datum/component/waddling)
C.AddElement(/datum/element/waddling)
/datum/reagent/jestosterone/on_mob_life(mob/living/carbon/M)
if(!istype(M))
@@ -472,8 +469,7 @@
var/update_flags = STATUS_UPDATE_NONE
if(prob(10))
M.emote("giggle")
GET_COMPONENT_FROM(jestosterone_component, /datum/component/jestosterone, M)
if(jestosterone_component.mind_type == "Clown")
if(M?.mind.assigned_role == "Clown" || M?.mind.assigned_role == SPECIAL_ROLE_HONKSQUAD)
update_flags |= M.adjustBruteLoss(-1.5 * REAGENTS_EFFECT_MULTIPLIER) //Screw those pesky clown beatings!
else
M.AdjustDizzy(10, 0, 500)
@@ -493,18 +489,15 @@
"Your legs feel like jelly.",
"You feel like telling a pun.")
to_chat(M, "<span class='warning'>[pick(clown_message)]</span>")
if(jestosterone_component.mind_type == "Mime")
if(M?.mind.assigned_role == "Mime")
update_flags |= M.adjustToxLoss(1.5 * REAGENTS_EFFECT_MULTIPLIER)
return ..() | update_flags
/datum/reagent/jestosterone/on_mob_delete(mob/living/M)
..()
GET_COMPONENT_FROM(remove_fun, /datum/component/jestosterone, M)
GET_COMPONENT_FROM(squeaking, /datum/component/squeak, M)
GET_COMPONENT_FROM(waddling, /datum/component/waddling, M)
remove_fun.Destroy()
squeaking.Destroy()
waddling.Destroy()
REMOVE_TRAIT(M, TRAIT_JESTER, id)
qdel(M.GetComponent(/datum/component/squeak))
M.RemoveElement(/datum/element/waddling)
/datum/reagent/royal_bee_jelly
name = "royal bee jelly"
@@ -333,19 +333,26 @@
process_flags = ORGANIC | SYNTHETIC
taste_description = "bitterness"
/datum/reagent/cryostylane/on_new(data)
..()
START_PROCESSING(SSprocessing, src)
/datum/reagent/cryostylane/Destroy()
STOP_PROCESSING(SSprocessing, src)
return ..()
/datum/reagent/cryostylane/on_mob_life(mob/living/M) //TODO: code freezing into an ice cube
if(M.reagents.has_reagent("oxygen"))
M.reagents.remove_reagent("oxygen", 1)
M.bodytemperature -= 30
return ..()
/datum/reagent/cryostylane/on_tick()
if(holder.has_reagent("oxygen"))
holder.remove_reagent("oxygen", 2)
holder.remove_reagent("cryostylane", 2)
holder.temperature_reagents(holder.chem_temp - 200)
holder.temperature_reagents(holder.chem_temp - 200)
..()
/datum/reagent/cryostylane/process()
if(..())
if(holder.has_reagent("oxygen"))
holder.remove_reagent("oxygen", 2)
holder.remove_reagent("cryostylane", 2)
holder.temperature_reagents(holder.chem_temp - 200)
/datum/reagent/cryostylane/reaction_mob(mob/living/M, method = REAGENT_TOUCH, volume)
if(method == REAGENT_TOUCH)
@@ -368,19 +375,26 @@
process_flags = ORGANIC | SYNTHETIC
taste_description = "bitterness"
/datum/reagent/pyrosium/on_new(data)
..()
START_PROCESSING(SSprocessing, src)
/datum/reagent/pyrosium/Destroy()
STOP_PROCESSING(SSprocessing, src)
return ..()
/datum/reagent/pyrosium/on_mob_life(mob/living/M)
if(M.reagents.has_reagent("oxygen"))
M.reagents.remove_reagent("oxygen", 1)
M.bodytemperature += 30
return ..()
/datum/reagent/pyrosium/on_tick()
if(holder.has_reagent("oxygen"))
holder.remove_reagent("oxygen", 2)
holder.remove_reagent("pyrosium", 2)
holder.temperature_reagents(holder.chem_temp + 200)
holder.temperature_reagents(holder.chem_temp + 200)
..()
/datum/reagent/pyrosium/process()
if(..())
if(holder.has_reagent("oxygen"))
holder.remove_reagent("oxygen", 2)
holder.remove_reagent("pyrosium", 2)
holder.temperature_reagents(holder.chem_temp + 200)
/datum/reagent/firefighting_foam
name = "Firefighting foam"
@@ -192,6 +192,14 @@
color = "#7DFF00"
taste_description = "slime"
/datum/reagent/stable_mutagen/on_new(data)
..()
START_PROCESSING(SSprocessing, src)
/datum/reagent/stable_mutagen/Destroy()
STOP_PROCESSING(SSprocessing, src)
return ..()
/datum/reagent/stable_mutagen/on_mob_life(mob/living/M)
if(!ishuman(M) || !M.dna)
return
@@ -212,42 +220,11 @@
return ..()
/datum/reagent/stable_mutagen/on_tick()
var/datum/reagent/blood/B = locate() in holder.reagent_list
if(B && islist(B.data) && !data)
data = B.data.Copy()
..()
/datum/reagent/romerol
name = "romerol"
// the REAL zombie powder
id = "romerol"
description = "Romerol is a highly experimental bioterror agent \
which causes dormant nodules to be etched into the grey matter of \
the subject. These nodules only become active upon death of the \
host, upon which, the secondary structures activate and take control \
of the host body."
color = "#123524" // RGB (18, 53, 36)
metabolization_rate = INFINITY
can_synth = FALSE
taste_description = "CAAAARL"
/datum/reagent/romerol/reaction_mob(mob/living/carbon/human/H, method = REAGENT_TOUCH, volume)
if(!istype(H))
return
// Silently add the zombie infection organ to be activated upon death
if(!H.get_organ_slot("zombie_infection"))
var/obj/item/organ/internal/zombie_infection/nodamage/ZI = new()
ZI.insert(H)
..()
/datum/reagent/romerol/on_mob_life(mob/living/M)
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(!H.get_organ_slot("zombie_infection"))
var/obj/item/organ/internal/zombie_infection/nodamage/ZI = new()
ZI.insert(H)
return ..()
/datum/reagent/stable_mutagen/process()
if(..())
var/datum/reagent/blood/B = locate() in holder.reagent_list
if(B && islist(B.data) && !data)
data = B.data.Copy()
/datum/reagent/uranium
name ="Uranium"
@@ -83,37 +83,7 @@
M.adjustToxLoss(rand(5, 10))
/datum/reagent/space_cleaner/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume)
if(iscarbon(M))
var/mob/living/carbon/C = M
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.lip_style)
H.lip_style = null
H.update_body()
if(C.r_hand)
C.r_hand.clean_blood()
if(C.l_hand)
C.l_hand.clean_blood()
if(C.wear_mask)
if(C.wear_mask.clean_blood())
C.update_inv_wear_mask(0)
if(ishuman(M))
var/mob/living/carbon/human/H = C
if(H.head)
if(H.head.clean_blood())
H.update_inv_head(0,0)
if(H.wear_suit)
if(H.wear_suit.clean_blood())
H.update_inv_wear_suit(0,0)
else if(H.w_uniform)
if(H.w_uniform.clean_blood())
H.update_inv_w_uniform(0,0)
if(H.shoes)
if(H.shoes.clean_blood())
H.update_inv_shoes(0,0)
M.clean_blood()
..()
M.clean_blood()
/datum/reagent/blood
data = list("donor"=null,"viruses"=null,"blood_DNA"=null,"blood_type"=null,"blood_colour"="#A10808","resistances"=null,"trace_chem"=null,"mind"=null,"ckey"=null,"gender"=null,"real_name"=null,"cloneable"=null,"factions"=null, "dna" = null)
@@ -38,7 +38,7 @@
/datum/chemical_reaction/slimemonkey/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
for(var/i = 1, i <= 3, i++)
var /obj/item/reagent_containers/food/snacks/monkeycube/M = new /obj/item/reagent_containers/food/snacks/monkeycube
var/obj/item/reagent_containers/food/snacks/monkeycube/M = new /obj/item/reagent_containers/food/snacks/monkeycube
M.forceMove(get_turf(holder.my_atom))
//Green
+3 -2
View File
@@ -61,8 +61,9 @@ obj/item/reagent_containers/proc/add_initial_reagents()
update_icon()
return
/obj/item/reagent_containers/afterattack(obj/target, mob/user , flag)
return
/obj/item/reagent_containers/attack(mob/M, mob/user, def_zone)
if(user.a_intent == INTENT_HARM)
return ..()
/obj/item/reagent_containers/wash(mob/user, atom/source)
if(is_open_container())
@@ -47,7 +47,7 @@
/obj/item/reagent_containers/borghypo/process() //Every [recharge_time] seconds, recharge some reagents for the cyborg
charge_tick++
if(charge_tick < recharge_time)
if(charge_tick < recharge_time)
return FALSE
charge_tick = 0
@@ -97,9 +97,7 @@
var/contained = injected.name
var/trans = R.trans_to(M, amount_per_transfer_from_this)
add_attack_logs(user, M, "Injected with [name] containing [contained], transfered [trans] units", injected.harmless ? ATKLOG_ALMOSTALL : null)
M.LAssailant = user
to_chat(user, "<span class='notice'>[trans] units injected. [R.total_volume] units remaining.</span>")
return
/obj/item/reagent_containers/borghypo/attack_self(mob/user)
playsound(loc, 'sound/effects/pop.ogg', 50, 0) //Change the mode
@@ -126,4 +124,9 @@
if(empty)
. += "<span class='notice'>It is currently empty. Allow some time for the internal syntheszier to produce more.</span>"
/obj/item/reagent_containers/borghypo/basic
name = "Basic Medical Hypospray"
desc = "A very basic medical hypospray, capable of providing simple medical treatment in emergencies."
reagent_ids = list("salglu_solution", "epinephrine")
#undef BORGHYPO_REFILL_VALUE
@@ -12,11 +12,6 @@
container_type = OPENCONTAINER
volume = 30
/obj/item/reagent_containers/glass/bottle/romerol
name = "romerol bottle"
desc = "A small bottle of Romerol. The REAL zombie powder."
list_reagents = list("romerol" = 30)
/obj/item/reagent_containers/glass/bottle/on_reagent_change()
update_icon()
@@ -47,6 +42,13 @@
var/image/lid = image(icon, src, "lid_bottle")
overlays += lid
/obj/item/reagent_containers/glass/bottle/decompile_act(obj/item/matter_decompiler/C, mob/user)
if(!reagents.total_volume)
C.stored_comms["glass"] += 3
qdel(src)
return TRUE
return ..()
/obj/item/reagent_containers/glass/bottle/toxin
name = "toxin bottle"
desc = "A small bottle containing toxic compounds."
@@ -14,38 +14,7 @@
container_type = OPENCONTAINER
has_lid = TRUE
resistance_flags = ACID_PROOF
var/label_text = ""
// the fucking asshole who designed this can go die in a fire - Iamgoofball
var/list/can_be_placed_into = list(
/obj/machinery/chem_master/,
/obj/machinery/chem_heater/,
/obj/machinery/chem_dispenser/,
/obj/machinery/reagentgrinder,
/obj/structure/table,
/obj/structure/closet,
/obj/structure/sink,
/obj/structure/toilet,
/obj/item/storage,
/obj/machinery/atmospherics/unary/cryo_cell,
/obj/machinery/dna_scannernew,
/obj/item/grenade/chem_grenade,
/mob/living/simple_animal/bot/medbot,
/obj/item/storage/secure/safe,
/obj/machinery/iv_drip,
/obj/machinery/computer/pandemic,
/obj/machinery/disposal,
/mob/living/simple_animal/cow,
/mob/living/simple_animal/hostile/retaliate/goat,
/obj/machinery/sleeper,
/obj/machinery/smartfridge/,
/obj/machinery/biogenerator,
/obj/machinery/hydroponics,
/obj/machinery/constructable_frame,
/obj/machinery/icemachine,
/obj/item/bombcore/chemical,
/obj/machinery/vending,
/obj/machinery/fishtank)
/obj/item/reagent_containers/glass/New()
..()
@@ -74,10 +43,6 @@
M.visible_message("<span class='danger'>[user] splashes the contents of [src] onto [M]!</span>", \
"<span class='userdanger'>[user] splashes the contents of [src] onto [M]!</span>")
add_attack_logs(user, M, "Splashed with [name] containing [contained]", !!M.ckey ? null : ATKLOG_ALL)
if(!iscarbon(user))
M.LAssailant = null
else
M.LAssailant = user
reagents.reaction(M, REAGENT_TOUCH)
reagents.clear_reagents()
@@ -98,56 +63,44 @@
reagents.reaction(M, REAGENT_INGEST, fraction)
addtimer(CALLBACK(reagents, /datum/reagents.proc/trans_to, M, 5), 5)
playsound(M.loc,'sound/items/drink.ogg', rand(10,50), 1)
else
return ..()
/obj/item/reagent_containers/glass/afterattack(obj/target, mob/user, proximity)
if(!proximity)
if((!proximity) || !check_allowed_items(target,target_self = TRUE))
return
if(!is_open_container())
return
for(var/type in can_be_placed_into)
if(istype(target, type))
if(target.is_refillable()) //Something like a glass. Player probably wants to transfer TO it.
if(!reagents.total_volume)
to_chat(user, "<span class='warning'>[src] is empty!</span>")
return
if(istype(target, /obj/structure/reagent_dispensers)) //A dispenser. Transfer FROM it TO us.
if(target.reagents && !target.reagents.total_volume)
if(target.reagents.holder_full())
to_chat(user, "<span class='warning'>[target] is full.</span>")
return
var/trans = reagents.trans_to(target, amount_per_transfer_from_this)
to_chat(user, "<span class='notice'>You transfer [trans] unit\s of the solution to [target].</span>")
else if(target.is_drainable()) //A dispenser. Transfer FROM it TO us.
if(!target.reagents.total_volume)
to_chat(user, "<span class='warning'>[target] is empty and can't be refilled!</span>")
return
if(reagents.total_volume >= reagents.maximum_volume)
to_chat(user, "<span class='notice'>[src] is full.</span>")
if(reagents.holder_full())
to_chat(user, "<span class='warning'>[src] is full.</span>")
return
var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this)
to_chat(user, "<span class='notice'>You fill [src] with [trans] unit\s of the contents of [target].</span>")
else if(target.is_refillable() && is_drainable()) //Something like a glass. Player probably wants to transfer TO it.
if(!reagents.total_volume)
to_chat(user, "<span class='warning'>[src] is empty.</span>")
return
if(target.reagents.total_volume >= target.reagents.maximum_volume)
to_chat(user, "<span class='warning'>[target] is full.</span>")
return
var/trans = reagents.trans_to(target, amount_per_transfer_from_this)
to_chat(user, "<span class='notice'>You transfer [trans] units of the solution to [target].</span>")
else if(istype(target, /obj/item/reagent_containers/glass) && !target.is_open_container())
to_chat(user, "<span class='warning'>You cannot fill [target] while it is sealed.</span>")
return
else if(istype(target, /obj/effect/decal)) //stops splashing while scooping up fluids
return
else if(reagents.total_volume && user.a_intent == INTENT_HARM)
user.visible_message("<span class='danger'>[user] splashes the contents of [src] onto [target]!</span>", \
"<span class='notice'>You splash the contents of [src] onto [target].</span>")
reagents.reaction(target, REAGENT_TOUCH)
reagents.clear_reagents()
else if(reagents.total_volume)
if(user.a_intent == INTENT_HARM)
user.visible_message("<span class='danger'>[user] splashes the contents of [src] onto [target]!</span>", \
"<span class='notice'>You splash the contents of [src] onto [target].</span>")
reagents.reaction(target, REAGENT_TOUCH)
reagents.clear_reagents()
/obj/item/reagent_containers/glass/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/pen) || istype(I, /obj/item/flashlight/pen))
@@ -20,7 +20,7 @@
if(M.eat(src, user))
user.drop_item()
forceMove(M)
M.processing_patches += src
LAZYADD(M.processing_patches, src)
return TRUE
return FALSE
@@ -149,7 +149,7 @@
cut_overlays()
var/rounded_vol
if(reagents && reagents.total_volume)
rounded_vol = Clamp(round((reagents.total_volume / volume * 15), 5), 1, 15)
rounded_vol = clamp(round((reagents.total_volume / volume * 15), 5), 1, 15)
var/image/filling_overlay = mutable_appearance('icons/obj/reagentfillings.dmi', "syringe[rounded_vol]")
filling_overlay.icon += mix_color_from_reagents(reagents.reagent_list)
add_overlay(filling_overlay)