mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Merge me a river 🎶
This commit is contained in:
@@ -0,0 +1,78 @@
|
||||
// Replaces chemgrenade stuff, allowing reagent explosions to be called from anywhere.
|
||||
// It should be called using a location, the range, and a list of reagents involved.
|
||||
|
||||
// Threatscale is a multiplier for the 'threat' of the grenade. If you're increasing the affected range drastically, you might want to improve this.
|
||||
// Extra heat affects the temperature of the mixture, and may cause it to react in different ways.
|
||||
|
||||
|
||||
/proc/chem_splash(turf/epicenter, affected_range = 3, list/datum/reagents/reactants = list(), extra_heat = 0, threatscale = 1, adminlog = 1)
|
||||
if(!isturf(epicenter) || !reactants.len || threatscale <= 0)
|
||||
return
|
||||
var/has_reagents
|
||||
var/total_reagents
|
||||
for(var/datum/reagents/R in reactants)
|
||||
if(R.total_volume)
|
||||
has_reagents = 1
|
||||
total_reagents += R.total_volume
|
||||
|
||||
if(!has_reagents)
|
||||
return
|
||||
|
||||
var/datum/reagents/splash_holder = new/datum/reagents(total_reagents*threatscale)
|
||||
splash_holder.my_atom = epicenter // For some reason this is setting my_atom to null, and causing runtime errors.
|
||||
var/total_temp = 0
|
||||
|
||||
for(var/datum/reagents/R in reactants)
|
||||
R.trans_to(splash_holder, R.total_volume, threatscale, 1, 1)
|
||||
total_temp += R.chem_temp
|
||||
splash_holder.chem_temp = (total_temp/reactants.len) + extra_heat // Average temperature of reagents + extra heat.
|
||||
splash_holder.handle_reactions() // React them now.
|
||||
|
||||
if(splash_holder.total_volume && affected_range >= 0) //The possible reactions didnt use up all reagents, so we spread it around.
|
||||
var/datum/effect/system/steam_spread/steam = new /datum/effect/system/steam_spread()
|
||||
steam.set_up(10, 0, epicenter)
|
||||
steam.attach(epicenter)
|
||||
steam.start()
|
||||
|
||||
var/list/viewable = view(affected_range, epicenter)
|
||||
|
||||
var/list/accessible = list(epicenter)
|
||||
for(var/i=1; i<=affected_range; i++)
|
||||
var/list/turflist = list()
|
||||
for(var/turf/T in (orange(i, epicenter) - orange(i-1, epicenter)))
|
||||
turflist |= T
|
||||
for(var/turf/T in turflist)
|
||||
if( !(get_dir(T,epicenter) in cardinal) && (abs(T.x - epicenter.x) == abs(T.y - epicenter.y) ))
|
||||
turflist.Remove(T)
|
||||
turflist.Add(T) // we move the purely diagonal turfs to the end of the list.
|
||||
for(var/turf/T in turflist)
|
||||
if(accessible[T])
|
||||
continue
|
||||
for(var/thing in T.GetAtmosAdjacentTurfs(alldir = TRUE))
|
||||
var/turf/NT = thing
|
||||
if(!(NT in accessible))
|
||||
continue
|
||||
if(!(get_dir(T,NT) in cardinal))
|
||||
continue
|
||||
accessible[T] = 1
|
||||
break
|
||||
var/list/reactable = accessible
|
||||
for(var/turf/T in accessible)
|
||||
for(var/atom/A in T.GetAllContents())
|
||||
if(!(A in viewable))
|
||||
continue
|
||||
reactable |= A
|
||||
if(extra_heat >= 300)
|
||||
T.hotspot_expose(extra_heat*2, 5)
|
||||
if(!reactable.len) //Nothing to react with. Probably means we're in nullspace.
|
||||
return
|
||||
for(var/thing in reactable)
|
||||
var/atom/A = thing
|
||||
var/distance = max(1,get_dist(A, epicenter))
|
||||
var/fraction = 0.5/(2 ** distance) //50/25/12/6... for a 200u splash, 25/12/6/3... for a 100u, 12/6/3/1 for a 50u
|
||||
splash_holder.reaction(A, TOUCH, fraction)
|
||||
|
||||
qdel(splash_holder)
|
||||
return 1
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@ var/list/random_color_list = list("#00aedb","#a200ff","#f47835","#d41243","#d111
|
||||
var/vol_temp
|
||||
// see libs/IconProcs/IconProcs.dm
|
||||
for(var/datum/reagent/reagent in reagent_list)
|
||||
if(reagent.id == "blood" && reagent.data && reagent.data["blood_colour"])
|
||||
reagent_color = reagent.data["blood_colour"]
|
||||
if(reagent.id == "blood" && reagent.data && reagent.data["blood_color"])
|
||||
reagent_color = reagent.data["blood_color"]
|
||||
else
|
||||
reagent_color = reagent.color
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ var/const/INGEST = 2
|
||||
|
||||
return the_id
|
||||
|
||||
/datum/reagents/proc/trans_to(target, amount=1, multiplier=1, preserve_data=1)//if preserve_data=0, the reagents data will be lost. Usefull if you use data for some strange stuff and don't want it to be transferred.
|
||||
/datum/reagents/proc/trans_to(target, amount=1, multiplier=1, preserve_data=1, no_react = 0)//if preserve_data=0, the reagents data will be lost. Usefull if you use data for some strange stuff and don't want it to be transferred.
|
||||
if(!target)
|
||||
return
|
||||
if(total_volume <= 0)
|
||||
@@ -135,21 +135,18 @@ var/const/INGEST = 2
|
||||
for(var/datum/reagent/current_reagent in reagent_list)
|
||||
if(!current_reagent)
|
||||
continue
|
||||
if(current_reagent.id == "blood" && ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
H.inject_blood(my_atom, amount)
|
||||
continue
|
||||
var/current_reagent_transfer = current_reagent.volume * part
|
||||
if(preserve_data)
|
||||
trans_data = copy_data(current_reagent)
|
||||
|
||||
R.add_reagent(current_reagent.id, (current_reagent_transfer * multiplier), trans_data, chem_temp)
|
||||
R.add_reagent(current_reagent.id, (current_reagent_transfer * multiplier), trans_data, chem_temp, no_react = 1)
|
||||
remove_reagent(current_reagent.id, current_reagent_transfer)
|
||||
|
||||
update_total()
|
||||
R.update_total()
|
||||
R.handle_reactions()
|
||||
handle_reactions()
|
||||
if(!no_react)
|
||||
R.handle_reactions()
|
||||
handle_reactions()
|
||||
return amount
|
||||
|
||||
/datum/reagents/proc/copy_to(obj/target, amount=1, multiplier=1, preserve_data=1, safety = 0)
|
||||
@@ -537,7 +534,7 @@ var/const/INGEST = 2
|
||||
var/amt = list_reagents[r_id]
|
||||
add_reagent(r_id, amt, data)
|
||||
|
||||
/datum/reagents/proc/add_reagent(reagent, amount, list/data=null, reagtemp = 300)
|
||||
/datum/reagents/proc/add_reagent(reagent, amount, list/data=null, reagtemp = 300, no_react = 0)
|
||||
if(!isnum(amount))
|
||||
return 1
|
||||
update_total()
|
||||
@@ -554,7 +551,8 @@ var/const/INGEST = 2
|
||||
update_total()
|
||||
my_atom.on_reagent_change()
|
||||
R.on_merge(data)
|
||||
handle_reactions()
|
||||
if(!no_react)
|
||||
handle_reactions()
|
||||
return 0
|
||||
|
||||
var/datum/reagent/D = chemical_reagents_list[reagent]
|
||||
@@ -570,7 +568,8 @@ var/const/INGEST = 2
|
||||
|
||||
update_total()
|
||||
my_atom.on_reagent_change()
|
||||
handle_reactions()
|
||||
if(!no_react)
|
||||
handle_reactions()
|
||||
return 0
|
||||
else
|
||||
warning("[my_atom] attempted to add a reagent called '[reagent]' which doesn't exist. ([usr])")
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
if(archive_diseases[id])
|
||||
var/datum/disease/advance/A = archive_diseases[id]
|
||||
A.AssignName(new_name)
|
||||
for(var/datum/disease/advance/AD in disease_master.processing)
|
||||
for(var/datum/disease/advance/AD in active_diseases)
|
||||
AD.Refresh()
|
||||
updateUsrDialog()
|
||||
|
||||
@@ -205,7 +205,8 @@
|
||||
var/list/vir = Blood.data["viruses"]
|
||||
if(vir.len)
|
||||
var/i = 0
|
||||
for(var/datum/disease/D in Blood.data["viruses"])
|
||||
for(var/thing in Blood.data["viruses"])
|
||||
var/datum/disease/D = thing
|
||||
i++
|
||||
if(!(D.visibility_flags & HIDDEN_PANDEMIC))
|
||||
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
return 1
|
||||
|
||||
if (!is_type_in_list(I, blend_items) && !is_type_in_list(I, juice_items))
|
||||
if(user.a_intent == I_HARM)
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
return ..()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Cannot refine into a reagent!</span>")
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
var/list/data = null
|
||||
var/volume = 0
|
||||
var/metabolization_rate = REAGENTS_METABOLISM
|
||||
//var/list/viruses = list()
|
||||
var/color = "#000000" // rgb: 0, 0, 0 (does not support alpha channels - yet!)
|
||||
var/shock_reduction = 0
|
||||
var/heart_rate_increase = 0
|
||||
|
||||
@@ -47,13 +47,11 @@
|
||||
M.SetConfused(0)
|
||||
M.SetSleeping(0)
|
||||
M.SetJitter(0)
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
for(var/thing in M.viruses)
|
||||
var/datum/disease/D = thing
|
||||
if(D.severity == NONTHREAT)
|
||||
continue
|
||||
D.spread_text = "Remissive"
|
||||
D.stage--
|
||||
if(D.stage < 1)
|
||||
D.cure()
|
||||
D.cure(0)
|
||||
..()
|
||||
|
||||
/datum/reagent/medicine/adminordrazine/nanites
|
||||
|
||||
@@ -877,10 +877,11 @@
|
||||
taste_message = "brain damageeeEEeee"
|
||||
|
||||
/datum/reagent/consumable/ethanol/neurotoxin/on_mob_life(mob/living/M)
|
||||
M.Weaken(3)
|
||||
if(current_cycle >=55)
|
||||
if(current_cycle >= 13)
|
||||
M.Weaken(3)
|
||||
if(current_cycle >= 55)
|
||||
M.Druggy(55)
|
||||
if(current_cycle >=200)
|
||||
if(current_cycle >= 200)
|
||||
M.adjustToxLoss(2)
|
||||
..()
|
||||
|
||||
|
||||
@@ -141,11 +141,11 @@
|
||||
can_synth = 0
|
||||
|
||||
/datum/reagent/concentrated_initro/on_mob_life(mob/living/M)
|
||||
if(volume >=5)
|
||||
if(volume >= 5)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(!H.heart_attack)
|
||||
H.heart_attack = 1 // rip in pepperoni
|
||||
if(!H.undergoing_cardiac_arrest())
|
||||
H.set_heartattack(TRUE) // rip in pepperoni
|
||||
|
||||
//virus foods
|
||||
|
||||
@@ -183,4 +183,4 @@
|
||||
/datum/reagent/plasma_dust/plasmavirusfood/weak
|
||||
name = "weakened virus plasma"
|
||||
id = "weakplasmavirusfood"
|
||||
color = "#CEC3C6" // rgb: 206,195,198
|
||||
color = "#CEC3C6" // rgb: 206,195,198
|
||||
|
||||
@@ -32,11 +32,9 @@
|
||||
if(H.can_eat(diet_flags)) //Make sure the species has it's dietflag set, otherwise it can't digest any nutrients
|
||||
if(prob(50))
|
||||
M.adjustBruteLoss(-1)
|
||||
if(H.species.exotic_blood)
|
||||
H.vessel.add_reagent(H.species.exotic_blood, 0.4)
|
||||
else
|
||||
if(!(H.species.flags & NO_BLOOD))
|
||||
H.vessel.add_reagent("blood", 0.4)
|
||||
if(!(H.species.flags & NO_BLOOD))//do not restore blood on things with no blood by nature.
|
||||
if(H.blood_volume < BLOOD_VOLUME_NORMAL)
|
||||
H.blood_volume += 0.4
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/nutriment/protein // Meat-based protein, digestable by carnivores and omnivores, worthless to herbivores
|
||||
@@ -69,11 +67,9 @@
|
||||
M.satiety += 30
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.species.exotic_blood)
|
||||
H.vessel.add_reagent(H.species.exotic_blood, 0.5)
|
||||
else
|
||||
if(!(H.species.flags & NO_BLOOD))
|
||||
H.vessel.add_reagent("blood", 0.5)
|
||||
if(!(H.species.flags & NO_BLOOD))//do not restore blood on things with no blood by nature.
|
||||
if(H.blood_volume < BLOOD_VOLUME_NORMAL)
|
||||
H.blood_volume += 0.5
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/sugar
|
||||
@@ -817,8 +813,8 @@
|
||||
M.Weaken(1)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(!H.heart_attack)
|
||||
H.heart_attack = 1
|
||||
if(!H.undergoing_cardiac_arrest())
|
||||
H.set_heartattack(TRUE)
|
||||
..()
|
||||
|
||||
/datum/reagent/fungus
|
||||
|
||||
@@ -211,10 +211,11 @@
|
||||
if(prob(33))
|
||||
M.adjustBruteLoss(-2*REAGENTS_EFFECT_MULTIPLIER)
|
||||
M.adjustFireLoss(-2*REAGENTS_EFFECT_MULTIPLIER)
|
||||
if(ishuman(M))
|
||||
if(ishuman(M) && prob(33))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(!H.species.exotic_blood && !(H.species.flags & NO_BLOOD) && prob(33))
|
||||
H.vessel.add_reagent("blood", 1)
|
||||
if(!(H.species.flags & NO_BLOOD))//do not restore blood on things with no blood by nature.
|
||||
if(H.blood_volume < BLOOD_VOLUME_NORMAL)
|
||||
H.blood_volume += 1
|
||||
..()
|
||||
|
||||
/datum/reagent/medicine/synthflesh
|
||||
@@ -1024,3 +1025,11 @@
|
||||
/datum/reagent/medicine/earthsblood/overdose_process(mob/living/M)
|
||||
M.SetHallucinate(min(max(0, M.hallucination + 10), 50))
|
||||
M.adjustToxLoss(5 * REAGENTS_EFFECT_MULTIPLIER)
|
||||
|
||||
/datum/reagent/medicine/corazone
|
||||
name = "Corazone"
|
||||
id = "corazone"
|
||||
description = "A medication used to treat pain, fever, and inflammation, along with heart attacks."
|
||||
color = "#F5F5F5"
|
||||
|
||||
// This reagent's effects are handled in heart attack handling code
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(!H.species.exotic_blood && !(H.species.flags & NO_BLOOD))
|
||||
H.vessel.add_reagent("blood", 0.8)
|
||||
H.blood_volume += 0.8
|
||||
..()
|
||||
|
||||
//foam
|
||||
@@ -396,11 +396,13 @@
|
||||
description = "What is this emotion you humans call \"love?\" Oh, it's this? This is it? Huh, well okay then, thanks."
|
||||
reagent_state = LIQUID
|
||||
color = "#FF83A5"
|
||||
process_flags = ORGANIC | SYNTHETIC // That's the power of love~
|
||||
taste_message = "<font color='pink'><b>love</b></font>"
|
||||
|
||||
/datum/reagent/love/on_mob_life(mob/living/M)
|
||||
if(M.a_intent == I_HARM)
|
||||
M.a_intent = I_HELP
|
||||
if(M.a_intent != INTENT_HELP)
|
||||
M.a_intent_change(INTENT_HELP)
|
||||
M.can_change_intents = 0 //Now you have no choice but to be helpful.
|
||||
|
||||
if(prob(8))
|
||||
var/lovely_phrase = pick("appreciated", "loved", "pretty good", "really nice", "pretty happy with yourself, even though things haven't always gone as well as they could")
|
||||
@@ -417,9 +419,14 @@
|
||||
break
|
||||
..()
|
||||
|
||||
/datum/reagent/love/on_mob_delete(mob/living/M)
|
||||
M.can_change_intents = 1
|
||||
..()
|
||||
|
||||
/datum/reagent/love/reaction_mob(mob/living/M, method=TOUCH, volume)
|
||||
to_chat(M, "<span class='notice'>You feel loved!</span>")
|
||||
|
||||
|
||||
/datum/reagent/royal_bee_jelly
|
||||
name = "royal bee jelly"
|
||||
id = "royal_bee_jelly"
|
||||
|
||||
@@ -229,6 +229,8 @@
|
||||
if(method == TOUCH)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.get_species() == "Grey")
|
||||
return
|
||||
|
||||
if(volume > 25)
|
||||
|
||||
@@ -255,6 +257,10 @@
|
||||
if(method == INGEST)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
|
||||
if(H.get_species() == "Grey")
|
||||
return
|
||||
|
||||
if(volume >=10 && volume <=25)
|
||||
if(!H.unacidable)
|
||||
M.take_organ_damage(0,min(max(volume-10,2)*2,20))
|
||||
@@ -658,8 +664,8 @@
|
||||
M.Weaken(2)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(!H.heart_attack)
|
||||
H.heart_attack = 1 // rip in pepperoni
|
||||
if(!H.undergoing_cardiac_arrest())
|
||||
H.set_heartattack(TRUE) // rip in pepperoni
|
||||
..()
|
||||
|
||||
/datum/reagent/pancuronium
|
||||
|
||||
@@ -21,10 +21,65 @@
|
||||
taste_message = null
|
||||
|
||||
/datum/reagent/water/reaction_mob(mob/living/M, method=TOUCH, volume)
|
||||
// Put out fire
|
||||
if(method == TOUCH)
|
||||
// Put out fire
|
||||
M.adjust_fire_stacks(-(volume / 10))
|
||||
M.ExtinguishMob()
|
||||
if(ishuman(M))
|
||||
|
||||
var/mob/living/carbon/human/H = M
|
||||
|
||||
if(H.get_species() != "Grey") //God this is so gross I hate it.
|
||||
return
|
||||
|
||||
if(volume > 25)
|
||||
|
||||
if(H.wear_mask)
|
||||
to_chat(H, "<span class='danger'>Your mask protects you from the water!</span>")
|
||||
return
|
||||
|
||||
if(H.head)
|
||||
to_chat(H, "<span class='danger'>Your helmet protects you from the water!</span>")
|
||||
return
|
||||
|
||||
if(!M.unacidable)
|
||||
if(prob(75))
|
||||
var/obj/item/organ/external/affecting = H.get_organ("head")
|
||||
if(affecting)
|
||||
affecting.take_damage(5, 10)
|
||||
H.UpdateDamageIcon()
|
||||
H.emote("scream")
|
||||
else
|
||||
M.take_organ_damage(5,10)
|
||||
else
|
||||
M.take_organ_damage(5,10)
|
||||
|
||||
if(method == INGEST)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
|
||||
if(H.get_species() != "Grey")
|
||||
return
|
||||
|
||||
if(volume < 10)
|
||||
to_chat(M, "<span class='danger'>The watery solvent substance stings you, but isn't concentrated enough to harm you!</span>")
|
||||
|
||||
if(volume >=10 && volume <=25)
|
||||
if(!H.unacidable)
|
||||
M.take_organ_damage(0,min(max(volume-10,2)*2,20))
|
||||
M.emote("scream")
|
||||
|
||||
|
||||
if(volume > 25)
|
||||
if(!M.unacidable)
|
||||
if(prob(75))
|
||||
var/obj/item/organ/external/affecting = H.get_organ("head")
|
||||
if(affecting)
|
||||
affecting.take_damage(0, 20)
|
||||
H.UpdateDamageIcon()
|
||||
H.emote("scream")
|
||||
else
|
||||
M.take_organ_damage(0,20)
|
||||
|
||||
/datum/reagent/water/reaction_turf(turf/simulated/T, volume)
|
||||
if(!istype(T))
|
||||
@@ -145,7 +200,8 @@
|
||||
|
||||
/datum/reagent/blood/reaction_mob(mob/living/M, method=TOUCH, volume)
|
||||
if(data && data["viruses"])
|
||||
for(var/datum/disease/D in data["viruses"])
|
||||
for(var/thing in data["viruses"])
|
||||
var/datum/disease/D = thing
|
||||
|
||||
if(D.spread_flags & SPECIAL || D.spread_flags & NON_CONTAGIOUS)
|
||||
continue
|
||||
@@ -155,6 +211,14 @@
|
||||
else //ingest, patch or inject
|
||||
M.ForceContractDisease(D)
|
||||
|
||||
if(method == INGEST && iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
if(C.get_blood_id() == "blood")
|
||||
if((!data || !(data["blood_type"] in get_safe_blood(C.dna.b_type))) && !M.mind.vampire)
|
||||
C.reagents.add_reagent("toxin", volume * 0.5)
|
||||
else
|
||||
C.blood_volume = min(C.blood_volume + round(volume, 0.1), BLOOD_VOLUME_MAXIMUM)
|
||||
|
||||
/datum/reagent/blood/on_new(list/data)
|
||||
if(istype(data))
|
||||
SetViruses(src, data)
|
||||
@@ -183,13 +247,13 @@
|
||||
preserve += D
|
||||
data["viruses"] = preserve
|
||||
|
||||
if(mix_data["blood_colour"])
|
||||
color = mix_data["blood_colour"]
|
||||
if(mix_data["blood_color"])
|
||||
color = mix_data["blood_color"]
|
||||
return 1
|
||||
|
||||
/datum/reagent/blood/on_update(atom/A)
|
||||
if(data["blood_colour"])
|
||||
color = data["blood_colour"]
|
||||
if(data["blood_color"])
|
||||
color = data["blood_color"]
|
||||
return ..()
|
||||
|
||||
/datum/reagent/blood/reaction_turf(turf/simulated/T, volume)//splash the blood all over the place
|
||||
@@ -203,22 +267,12 @@
|
||||
blood_prop = new(T)
|
||||
blood_prop.blood_DNA[data["blood_DNA"]] = data["blood_type"]
|
||||
|
||||
for(var/datum/disease/D in data["viruses"])
|
||||
var/datum/disease/newVirus = D.Copy(1)
|
||||
blood_prop.viruses += newVirus
|
||||
newVirus.holder = blood_prop
|
||||
|
||||
else if(istype(data["donor"], /mob/living/carbon/alien))
|
||||
var/obj/effect/decal/cleanable/blood/xeno/blood_prop = locate() in T
|
||||
if(!blood_prop)
|
||||
blood_prop = new(T)
|
||||
blood_prop.blood_DNA["UNKNOWN DNA STRUCTURE"] = "X*"
|
||||
|
||||
for(var/datum/disease/D in data["viruses"])
|
||||
var/datum/disease/newVirus = D.Copy(1)
|
||||
blood_prop.viruses += newVirus
|
||||
newVirus.holder = blood_prop
|
||||
|
||||
/datum/reagent/vaccine
|
||||
//data must contain virus type
|
||||
name = "Vaccine"
|
||||
@@ -227,7 +281,8 @@
|
||||
|
||||
/datum/reagent/vaccine/reaction_mob(mob/living/M, method=TOUCH, volume)
|
||||
if(islist(data) && (method == INGEST))
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
for(var/thing in M.viruses)
|
||||
var/datum/disease/D = thing
|
||||
if(D.GetDiseaseID() in data)
|
||||
D.cure()
|
||||
M.resistances |= data
|
||||
|
||||
@@ -271,4 +271,11 @@
|
||||
required_reagents = list("ethanol" = 1, "copper" = 1, "silver" = 1)
|
||||
result_amount = 3
|
||||
min_temp = 370
|
||||
mix_message = "The solution gently swirls with a metallic sheen."
|
||||
mix_message = "The solution gently swirls with a metallic sheen."
|
||||
|
||||
/datum/chemical_reaction/corazone
|
||||
name = "Corazone"
|
||||
id = "corazone"
|
||||
result = "corazone"
|
||||
result_amount = 3
|
||||
required_reagents = list("phenol" = 2, "lithium" = 1)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
desc = "..."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = null
|
||||
w_class = 1
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
var/amount_per_transfer_from_this = 5
|
||||
var/possible_transfer_amounts = list(5,10,15,25,30)
|
||||
var/volume = 30
|
||||
@@ -32,7 +32,7 @@
|
||||
create_reagents(volume)
|
||||
if(spawned_disease)
|
||||
var/datum/disease/F = new spawned_disease(0)
|
||||
var/list/data = list("viruses" = list(F), "blood_colour" = "#A10808")
|
||||
var/list/data = list("viruses" = list(F), "blood_color" = "#A10808")
|
||||
reagents.add_reagent("blood", disease_amount, data)
|
||||
if(list_reagents)
|
||||
reagents.add_reagent_list(list_reagents)
|
||||
|
||||
@@ -40,7 +40,8 @@
|
||||
/obj/machinery/biogenerator,
|
||||
/obj/machinery/hydroponics,
|
||||
/obj/machinery/constructable_frame,
|
||||
/obj/machinery/icemachine)
|
||||
/obj/machinery/icemachine,
|
||||
/obj/item/weapon/bombcore/chemical)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/New()
|
||||
..()
|
||||
@@ -289,9 +290,10 @@
|
||||
name = "cryostasis beaker"
|
||||
desc = "A cryostasis beaker that allows for chemical storage without reactions. Can hold up to 50 units."
|
||||
icon_state = "beakernoreact"
|
||||
materials = list(MAT_GLASS=500)
|
||||
materials = list(MAT_METAL=3000)
|
||||
volume = 50
|
||||
amount_per_transfer_from_this = 10
|
||||
origin_tech = "materials=2;engineering=3;plasmatech=3"
|
||||
flags = OPENCONTAINER
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/noreact/New()
|
||||
@@ -302,12 +304,12 @@
|
||||
name = "bluespace beaker"
|
||||
desc = "A bluespace beaker, powered by experimental bluespace technology and Element Cuban combined with the Compound Pete. Can hold up to 300 units."
|
||||
icon_state = "beakerbluespace"
|
||||
materials = list(MAT_GLASS=5000)
|
||||
materials = list(MAT_GLASS=3000)
|
||||
volume = 300
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(5,10,15,25,30,50,100,300)
|
||||
flags = OPENCONTAINER
|
||||
|
||||
origin_tech = "bluespace=5;materials=4;plasmatech=4"
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/cryoxadone
|
||||
list_reagents = list("cryoxadone" = 30)
|
||||
@@ -330,7 +332,7 @@
|
||||
icon_state = "bucket"
|
||||
item_state = "bucket"
|
||||
materials = list(MAT_METAL=200)
|
||||
w_class = 3
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
amount_per_transfer_from_this = 20
|
||||
possible_transfer_amounts = list(5,10,15,20,25,30,50,80,100,120)
|
||||
volume = 120
|
||||
@@ -353,4 +355,4 @@
|
||||
user.unEquip(src)
|
||||
qdel(src)
|
||||
else
|
||||
..()
|
||||
..()
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
flags = OPENCONTAINER | NOBLUDGEON
|
||||
slot_flags = SLOT_BELT
|
||||
throwforce = 0
|
||||
w_class = 2
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
var/spray_maxrange = 3 //what the sprayer will set spray_currentrange to in the attack_self.
|
||||
@@ -145,7 +145,7 @@
|
||||
icon_state = "chemsprayer"
|
||||
item_state = "chemsprayer"
|
||||
throwforce = 0
|
||||
w_class = 3
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
spray_maxrange = 7
|
||||
spray_currentrange = 7
|
||||
amount_per_transfer_from_this = 10
|
||||
@@ -204,4 +204,4 @@
|
||||
icon_state = "plantbgone"
|
||||
item_state = "plantbgone"
|
||||
volume = 100
|
||||
list_reagents = list("glyphosate" = 100)
|
||||
list_reagents = list("glyphosate" = 100)
|
||||
|
||||
@@ -14,8 +14,9 @@
|
||||
amount_per_transfer_from_this = 5
|
||||
possible_transfer_amounts = null //list(5,10,15)
|
||||
volume = 15
|
||||
w_class = 1
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
sharp = 1
|
||||
var/busy = 0
|
||||
var/mode = SYRINGE_DRAW
|
||||
var/projectile_type = /obj/item/projectile/bullet/dart/syringe
|
||||
|
||||
@@ -58,13 +59,16 @@
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/afterattack(obj/target, mob/user, proximity)
|
||||
if(!proximity) return
|
||||
if(!target.reagents) return
|
||||
/obj/item/weapon/reagent_containers/syringe/afterattack(atom/target, mob/user , proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
if(!target.reagents)
|
||||
return
|
||||
|
||||
var/mob/living/L
|
||||
if(isliving(target))
|
||||
var/mob/living/M = target
|
||||
if(!M.can_inject(user, 1))
|
||||
L = target
|
||||
if(!L.can_inject(user, 1))
|
||||
return
|
||||
|
||||
if(mode == SYRINGE_BROKEN)
|
||||
@@ -75,163 +79,84 @@
|
||||
if(SYRINGE_DRAW)
|
||||
|
||||
if(reagents.total_volume >= reagents.maximum_volume)
|
||||
to_chat(user, "<span class='warning'>The syringe is full.</span>")
|
||||
to_chat(user, "<span class='notice'>The syringe is full.</span>")
|
||||
return
|
||||
|
||||
if(ismob(target))//Blood!
|
||||
if(istype(target, /mob/living/carbon/slime))
|
||||
to_chat(user, "<span class='warning'>You are unable to locate any blood.</span>")
|
||||
return
|
||||
if(reagents.has_reagent("blood"))
|
||||
to_chat(user, "<span class='warning'>There is already a blood sample in this syringe</span>")
|
||||
return
|
||||
if(istype(target, /mob/living/carbon))//maybe just add a blood reagent to all mobs. Then you can suck them dry...With hundreds of syringes. Jolly good idea.
|
||||
var/mob/living/carbon/T = target
|
||||
if(!T.dna)
|
||||
to_chat(usr, "You are unable to locate any blood. (To be specific, your target seems to be missing their DNA datum)")
|
||||
if(L) //living mob
|
||||
var/drawn_amount = reagents.maximum_volume - reagents.total_volume
|
||||
if(target != user)
|
||||
target.visible_message("<span class='danger'>[user] is trying to take a blood sample from [target]!</span>", \
|
||||
"<span class='userdanger'>[user] is trying to take a blood sample from [target]!</span>")
|
||||
busy = 1
|
||||
if(!do_mob(user, target))
|
||||
busy = 0
|
||||
return
|
||||
if(NOCLONE in T.mutations) //target done been et, no more blood in him
|
||||
to_chat(user, "<span class='warning'>You are unable to locate any blood.</span>")
|
||||
if(reagents.total_volume >= reagents.maximum_volume)
|
||||
return
|
||||
|
||||
|
||||
var/time = 30
|
||||
if(istype(target,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = T
|
||||
if(H.species.flags & NO_BLOOD)
|
||||
to_chat(usr, "<span class='warning'>You are unable to locate any blood.</span>")
|
||||
return
|
||||
if(target == user)
|
||||
time = 0
|
||||
else
|
||||
for(var/mob/O in viewers(world.view, user))
|
||||
O.show_message(text("<span class='danger'>[] is trying to take a blood sample from []!</span>", user, target), 1)
|
||||
if(!do_mob(user, target, time))
|
||||
return
|
||||
|
||||
var/amount = reagents.maximum_volume - reagents.total_volume
|
||||
if(amount == 0)
|
||||
to_chat(usr, "<span class='warning'>The syringe is full!</span>")
|
||||
return
|
||||
|
||||
var/datum/reagent/B
|
||||
if(istype(T,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = T
|
||||
if(H.species && H.species.exotic_blood && H.vessel.total_volume)
|
||||
H.vessel.trans_to(src,amount)
|
||||
else
|
||||
B = T.take_blood(src,amount)
|
||||
else
|
||||
B = T.take_blood(src,amount)
|
||||
|
||||
if(B)
|
||||
reagents.reagent_list |= B
|
||||
reagents.update_total()
|
||||
on_reagent_change()
|
||||
reagents.handle_reactions()
|
||||
|
||||
to_chat(user, "<span class='notice'>You take a blood sample from [target]</span>")
|
||||
for(var/mob/O in viewers(4, user))
|
||||
O.show_message("<span class='warning'>[user] takes a blood sample from [target].</span>", 1)
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] takes a sample from [target].</span>", "<span class='notice'>You take a sample from [target].</span>")
|
||||
busy = 0
|
||||
if(L.transfer_blood_to(src, drawn_amount))
|
||||
user.visible_message("[user] takes a blood sample from [L].")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You are unable to draw any blood from [L]!</span>")
|
||||
|
||||
else //if not mob
|
||||
if(!target.reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[target] is empty.</span>")
|
||||
to_chat(user, "<span class='warning'>[target] is empty!</span>")
|
||||
return
|
||||
|
||||
if(!target.is_open_container() && !istype(target,/obj/structure/reagent_dispensers) && !istype(target,/obj/item/slime_extract))
|
||||
to_chat(user, "<span class='warning'>You cannot directly remove reagents from this object.</span>")
|
||||
to_chat(user, "<span class='warning'>You cannot directly remove reagents from [target]!</span>")
|
||||
return
|
||||
|
||||
var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this) // transfer from, transfer to - who cares?
|
||||
|
||||
to_chat(user, "<span class='notice'>You fill the syringe with [trans] units of the solution.</span>")
|
||||
to_chat(user, "<span class='notice'>You fill [src] with [trans] units of the solution.</span>")
|
||||
if(reagents.total_volume >= reagents.maximum_volume)
|
||||
mode=!mode
|
||||
update_icon()
|
||||
|
||||
if(SYRINGE_INJECT)
|
||||
if(!reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>The Syringe is empty.</span>")
|
||||
return
|
||||
if(istype(target, /obj/item/weapon/implantcase/chem))
|
||||
to_chat(user, "<span class='notice'>[src] is empty.</span>")
|
||||
return
|
||||
|
||||
if(!target.is_open_container() && !ismob(target) && !istype(target, /obj/item/weapon/reagent_containers/food) && !istype(target, /obj/item/slime_extract) && !istype(target, /obj/item/clothing/mask/cigarette) && !istype(target, /obj/item/weapon/storage/fancy/cigarettes))
|
||||
to_chat(user, "<span class='warning'>You cannot directly fill this object.</span>")
|
||||
to_chat(user, "<span class='warning'>You cannot directly fill [target]!</span>")
|
||||
return
|
||||
if(istype(target, /obj/item/clothing/mask/cigarette))
|
||||
var/obj/item/clothing/mask/cigarette/C = target
|
||||
if(istype(C.loc, /obj/item/weapon/storage/fancy/cigarettes))
|
||||
to_chat(user, "<span class='warning'>You cannot inject a cigarette while it's still in the pack.</span>")
|
||||
return
|
||||
if(target.reagents.total_volume >= target.reagents.maximum_volume)
|
||||
to_chat(user, "<span class='warning'>[target] is full.</span>")
|
||||
to_chat(user, "<span class='notice'>[target] is full.</span>")
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = target
|
||||
if(istype(H))
|
||||
var/obj/item/organ/external/affected = H.get_organ(user.zone_sel.selecting)
|
||||
if(!affected)
|
||||
to_chat(user, "<span class='danger'>\The [H] is missing that limb!</span>")
|
||||
return
|
||||
/* else if(affected.status & ORGAN_ROBOT)
|
||||
to_chat(user, "<span class='danger'>You cannot inject a robotic limb.</span>")
|
||||
return */
|
||||
if(L) //living mob
|
||||
if(L != user)
|
||||
L.visible_message("<span class='danger'>[user] is trying to inject [L]!</span>", \
|
||||
"<span class='userdanger'>[user] is trying to inject [L]!</span>")
|
||||
if(!do_mob(user, L))
|
||||
return
|
||||
if(!reagents.total_volume)
|
||||
return
|
||||
if(L.reagents.total_volume >= L.reagents.maximum_volume)
|
||||
return
|
||||
L.visible_message("<span class='danger'>[user] injects [L] with the syringe!", \
|
||||
"<span class='userdanger'>[user] injects [L] with the syringe!")
|
||||
|
||||
if(ismob(target) && target != user)
|
||||
for(var/mob/O in viewers(world.view, user))
|
||||
O.show_message(text("<span class='danger'>[] is trying to inject []!</span>", user, target), 1)
|
||||
var/list/rinject = list()
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
rinject += R.name
|
||||
var/contained = english_list(rinject)
|
||||
|
||||
if(!do_mob(user, target, 30)) return
|
||||
|
||||
for(var/mob/O in viewers(world.view, user))
|
||||
O.show_message(text("<span class='warning'>[] injects [] with the syringe!</span>", user, target), 1)
|
||||
|
||||
if(istype(target,/mob/living))
|
||||
var/mob/living/M = target
|
||||
var/list/injected = list()
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
injected += R.name
|
||||
var/contained = english_list(injected)
|
||||
M.create_attack_log("<font color='orange'>Has been injected with [name] by [key_name(user)]. Reagents: [contained]</font>")
|
||||
user.create_attack_log("<font color='red'>Used the [name] to inject [key_name(M)]. Reagents: [contained]</font>")
|
||||
if(M.ckey)
|
||||
msg_admin_attack("[key_name_admin(user)] injected [key_name_admin(M)] with [name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)])")
|
||||
if(!iscarbon(user))
|
||||
M.LAssailant = null
|
||||
else
|
||||
M.LAssailant = user
|
||||
|
||||
reagents.reaction(target, INGEST)
|
||||
if(ismob(target) && target == user)
|
||||
reagents.reaction(target, INGEST)
|
||||
|
||||
spawn(5)
|
||||
var/datum/reagent/blood/B
|
||||
for(var/datum/reagent/blood/d in reagents.reagent_list)
|
||||
B = d
|
||||
break
|
||||
var/trans
|
||||
if(B && istype(target,/mob/living/carbon))
|
||||
var/mob/living/carbon/C = target
|
||||
C.inject_blood(src, 5)
|
||||
if(L != user)
|
||||
add_logs(user, L, "injected", src, addition="which had [contained]")
|
||||
else
|
||||
trans = reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
to_chat(user, "<span class='notice'>You inject [trans] units of the solution. The syringe now contains [reagents.total_volume] units.</span>")
|
||||
if(istype(target, /obj/item/weapon/reagent_containers/food/pill/patch))
|
||||
var/obj/item/weapon/reagent_containers/food/pill/patch/P = target
|
||||
if(P.instant_application)
|
||||
to_chat(user, "<span class=warning>You break the medical seal on the [P]!</span>")
|
||||
P.instant_application = 0
|
||||
log_attack("<font color='red'>[user.name] ([user.ckey]) injected [L.name] ([L.ckey]) with [src.name], which had [contained] (INTENT: [uppertext(user.a_intent)])</font>")
|
||||
|
||||
if(reagents.total_volume <= 0 && mode==SYRINGE_INJECT)
|
||||
mode = SYRINGE_DRAW
|
||||
update_icon()
|
||||
|
||||
return
|
||||
var/fraction = min(amount_per_transfer_from_this/reagents.total_volume, 1)
|
||||
reagents.reaction(L, INGEST, fraction)
|
||||
reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
to_chat(user, "<span class='notice'>You inject [amount_per_transfer_from_this] units of the solution. The syringe now contains [reagents.total_volume] units.</span>")
|
||||
if (reagents.total_volume <= 0 && mode==SYRINGE_INJECT)
|
||||
mode = SYRINGE_DRAW
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/update_icon()
|
||||
if(mode == SYRINGE_BROKEN)
|
||||
@@ -398,4 +323,4 @@
|
||||
/obj/item/weapon/reagent_containers/syringe/bioterror
|
||||
name = "bioterror syringe"
|
||||
desc = "Contains several paralyzing reagents."
|
||||
list_reagents = list("neurotoxin" = 5, "capulettium_plus" = 5, "sodium_thiopental" = 5)
|
||||
list_reagents = list("neurotoxin" = 5, "capulettium_plus" = 5, "sodium_thiopental" = 5)
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
|
||||
/obj/structure/reagent_dispensers/proc/boom()
|
||||
visible_message("<span class='danger'>[src] ruptures!</span>")
|
||||
chem_splash(loc, 5, list(reagents))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/reagent_dispensers/ex_act(severity)
|
||||
@@ -53,15 +54,6 @@
|
||||
desc = "A water tank."
|
||||
icon_state = "water"
|
||||
|
||||
/obj/structure/reagent_dispensers/watertank/boom()
|
||||
playsound(loc, 'sound/effects/spray2.ogg', 50, 1, -6)
|
||||
new /obj/effect/effect/water(loc)
|
||||
for(var/turf/simulated/T in view(5, loc))
|
||||
T.MakeSlippery()
|
||||
for(var/mob/living/L in T)
|
||||
L.adjust_fire_stacks(-20)
|
||||
..()
|
||||
|
||||
/obj/structure/reagent_dispensers/watertank/high
|
||||
name = "high-capacity water tank"
|
||||
desc = "A highly-pressurized water tank made to hold gargantuan amounts of water.."
|
||||
@@ -223,6 +215,34 @@
|
||||
user.put_in_hands(S)
|
||||
paper_cups--
|
||||
|
||||
/obj/structure/reagent_dispensers/water_cooler/attackby(obj/item/weapon/W, mob/living/user, params)
|
||||
add_fingerprint(user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if(iswrench(W))
|
||||
if(anchored)
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] starts loosening [src]'s floor casters.", \
|
||||
"<span class='notice'>You start loosening [src]'s floor casters...</span>")
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
if(!loc || !anchored)
|
||||
return
|
||||
user.visible_message("[user] loosened [src]'s floor casters.", \
|
||||
"<span class='notice'>You loosen [src]'s floor casters.</span>")
|
||||
anchored = 0
|
||||
else
|
||||
if(!isfloorturf(loc))
|
||||
user.visible_message("<span class='warning'>A floor must be present to secure [src]!</span>")
|
||||
return
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] start securing [src]'s floor casters...", \
|
||||
"<span class='notice'>You start securing [src]'s floor casters...</span>")
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
if(!loc || anchored)
|
||||
return
|
||||
user.visible_message("[user] has secured [src]'s floor casters.", \
|
||||
"<span class='notice'>You have secured [src]'s floor casters.</span>")
|
||||
anchored = 1
|
||||
|
||||
/obj/structure/reagent_dispensers/beerkeg
|
||||
name = "beer keg"
|
||||
desc = "Beer is liquid bread, it's good for you..."
|
||||
@@ -254,4 +274,4 @@
|
||||
icon_state = "fuel_chem"
|
||||
anchored = 1
|
||||
density = 0
|
||||
accepts_rig = 0
|
||||
accepts_rig = 0
|
||||
|
||||
Reference in New Issue
Block a user