mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-11 15:14:27 +01:00
Foam Fixes+Changes
This commit is contained in:
@@ -492,7 +492,7 @@
|
||||
if(reagent_id == "internal_beaker")
|
||||
if(use_beaker && reagent_glass && reagent_glass.reagents.total_volume)
|
||||
var/fraction = min(injection_amount/reagent_glass.reagents.total_volume, 1)
|
||||
reagent_glass.reagents.reaction(patient, 2, fraction)
|
||||
reagent_glass.reagents.reaction(patient, INGEST, fraction)
|
||||
reagent_glass.reagents.trans_to(patient, injection_amount) //Inject from beaker instead.
|
||||
else
|
||||
patient.reagents.add_reagent(reagent_id,injection_amount)
|
||||
|
||||
@@ -387,45 +387,48 @@ var/const/INGEST = 2
|
||||
can_process = 1
|
||||
return can_process
|
||||
|
||||
/datum/reagents/proc/reaction(var/atom/A, var/method=TOUCH, var/volume_modifier=0)
|
||||
|
||||
/datum/reagents/proc/reaction(atom/A, method=TOUCH, volume_modifier = 1)
|
||||
switch(method)
|
||||
if(TOUCH)
|
||||
for(var/datum/reagent/R in reagent_list)
|
||||
if(ismob(A))
|
||||
spawn(0)
|
||||
if(!R) return
|
||||
var/check = reaction_check(A, R)
|
||||
if(!check)
|
||||
continue
|
||||
else
|
||||
R.reaction_mob(A, TOUCH, R.volume+volume_modifier)
|
||||
if(!R)
|
||||
return
|
||||
var/check = reaction_check(A, R)
|
||||
if(!check)
|
||||
continue
|
||||
else
|
||||
R.reaction_mob(A, TOUCH, R.volume*volume_modifier)
|
||||
if(isturf(A))
|
||||
spawn(0)
|
||||
if(!R) return
|
||||
else R.reaction_turf(A, R.volume+volume_modifier)
|
||||
if(!R)
|
||||
return
|
||||
else
|
||||
R.reaction_turf(A, R.volume*volume_modifier)
|
||||
if(isobj(A))
|
||||
spawn(0)
|
||||
if(!R) return
|
||||
else R.reaction_obj(A, R.volume+volume_modifier)
|
||||
if(!R)
|
||||
return
|
||||
else
|
||||
R.reaction_obj(A, R.volume*volume_modifier)
|
||||
if(INGEST)
|
||||
for(var/datum/reagent/R in reagent_list)
|
||||
if(ismob(A) && R)
|
||||
spawn(0)
|
||||
if(!R) return
|
||||
var/check = reaction_check(A, R)
|
||||
if(!check)
|
||||
continue
|
||||
else
|
||||
R.reaction_mob(A, INGEST, R.volume+volume_modifier)
|
||||
if(!R)
|
||||
return
|
||||
var/check = reaction_check(A, R)
|
||||
if(!check)
|
||||
continue
|
||||
else
|
||||
R.reaction_mob(A, INGEST, R.volume*volume_modifier)
|
||||
if(isturf(A) && R)
|
||||
spawn(0)
|
||||
if(!R) return
|
||||
else R.reaction_turf(A, R.volume+volume_modifier)
|
||||
if(!R)
|
||||
return
|
||||
else
|
||||
R.reaction_turf(A, R.volume*volume_modifier)
|
||||
if(isobj(A) && R)
|
||||
spawn(0)
|
||||
if(!R) return
|
||||
else R.reaction_obj(A, R.volume+volume_modifier)
|
||||
if(!R)
|
||||
return
|
||||
else
|
||||
R.reaction_obj(A, R.volume*volume_modifier)
|
||||
return
|
||||
|
||||
/datum/reagents/proc/add_reagent_list(list/list_reagents, list/data=null) // Like add_reagent but you can enter a list. Format it like this: list("toxin" = 10, "beer" = 15)
|
||||
|
||||
@@ -293,7 +293,7 @@ datum/reagent/blackpowder/reaction_turf(var/turf/T, var/volume) //oh shit
|
||||
required_reagents = list("potassium" = 1, "sugar" = 1, "phosphorus" = 1)
|
||||
result_amount = 1
|
||||
mix_message = "The mixture quickly turns into a pall of smoke!"
|
||||
var/forbidden_reagents = list("sugar", "phosphorus", "potassium") //Do not transfer this stuff through smoke.
|
||||
var/forbidden_reagents = list("sugar", "phosphorus", "potassium", "stimulants") //Do not transfer this stuff through smoke.
|
||||
|
||||
/datum/chemical_reaction/smoke/on_reaction(var/datum/reagents/holder, var/created_volume)
|
||||
for(var/f_reagent in forbidden_reagents)
|
||||
@@ -325,7 +325,7 @@ datum/reagent/blackpowder/reaction_turf(var/turf/T, var/volume) //oh shit
|
||||
min_temp = 374
|
||||
secondary = 1
|
||||
result_amount = 1
|
||||
forbidden_reagents = list()
|
||||
forbidden_reagents = list("stimulants")
|
||||
mix_sound = null
|
||||
|
||||
/datum/reagent/sonic_powder
|
||||
|
||||
@@ -190,7 +190,9 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
|
||||
|
||||
if(src.species.exotic_blood)
|
||||
vessel.remove_reagent(species.exotic_blood,amm)
|
||||
vessel.reaction(T, TOUCH, amm)
|
||||
if(vessel.total_volume)
|
||||
var/fraction = amm / vessel.total_volume
|
||||
vessel.reaction(T, TOUCH, fraction)
|
||||
return
|
||||
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user