Backward 512 compatibility removal.

This commit is contained in:
Ghommie
2020-04-23 00:59:23 +02:00
parent 7f271157c3
commit 42201343a9
248 changed files with 478 additions and 544 deletions
+4 -4
View File
@@ -728,7 +728,7 @@
return
//Make sure things are limited, but superacids/bases can push forward the reaction
pH = CLAMP(pH, 0, 14)
pH = clamp(pH, 0, 14)
//return said amount to compare for next step.
return (reactedVol)
@@ -849,7 +849,7 @@
/datum/reagents/proc/adjust_thermal_energy(J, min_temp = 2.7, max_temp = 1000)
var/S = specific_heat()
chem_temp = CLAMP(chem_temp + (J / (S * total_volume)), min_temp, max_temp)
chem_temp = clamp(chem_temp + (J / (S * total_volume)), min_temp, max_temp)
if(istype(my_atom, /obj/item/reagent_containers))
var/obj/item/reagent_containers/RC = my_atom
RC.temp_check()
@@ -877,7 +877,7 @@
for (var/datum/reagent/reagentgas in reagent_list)
R.add_reagent(reagentgas, amount/5)
remove_reagent(reagentgas, amount/5)
s.set_up(R, CLAMP(amount/10, 0, 2), T)
s.set_up(R, clamp(amount/10, 0, 2), T)
s.start()
return FALSE
@@ -995,7 +995,7 @@
RC.pH_check()//checks beaker resilience)
//clamp the removal amount to be between current reagent amount
//and zero, to prevent removing more than the holder has stored
amount = CLAMP(amount, 0, R.volume)
amount = clamp(amount, 0, R.volume)
R.volume -= amount
update_total()
if(!safety)//So it does not handle reactions when it need not to
@@ -151,7 +151,7 @@
target = text2num(target)
. = TRUE
if(.)
target_temperature = CLAMP(target, 0, 1000)
target_temperature = clamp(target, 0, 1000)
if("eject")
on = FALSE
replace_beaker(usr)
+1 -1
View File
@@ -62,7 +62,7 @@ GLOBAL_LIST_INIT(name2reagent, build_name2reagent())
return 0
if(method == VAPOR) //smoke, foam, spray
if(M.reagents)
var/modifier = CLAMP((1 - touch_protection), 0, 1)
var/modifier = clamp((1 - touch_protection), 0, 1)
var/amount = round(reac_volume*modifier, 0.1)
if(amount >= 0.5)
M.reagents.add_reagent(type, amount)
@@ -1124,7 +1124,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
var/datum/antagonist/changeling/changeling = M.mind.has_antag_datum(/datum/antagonist/changeling)
if(changeling)
changeling.chem_charges += metabolization_rate
changeling.chem_charges = CLAMP(changeling.chem_charges, 0, changeling.chem_storage)
changeling.chem_charges = clamp(changeling.chem_charges, 0, changeling.chem_storage)
return ..()
/datum/reagent/consumable/ethanol/irishcarbomb
@@ -196,7 +196,7 @@
. = 1
/datum/reagent/drug/methamphetamine/overdose_process(mob/living/M)
if(CHECK_MOBILITY(M, MOBILITY_MOVE) && !ismovableatom(M.loc))
if(CHECK_MOBILITY(M, MOBILITY_MOVE) && !ismovable(M.loc))
for(var/i in 1 to 4)
step(M, pick(GLOB.cardinals))
if(prob(20))
@@ -223,7 +223,7 @@
..()
/datum/reagent/drug/methamphetamine/addiction_act_stage3(mob/living/M)
if(CHECK_MOBILITY(M, MOBILITY_MOVE) && !ismovableatom(M.loc))
if(CHECK_MOBILITY(M, MOBILITY_MOVE) && !ismovable(M.loc))
for(var/i = 0, i < 4, i++)
step(M, pick(GLOB.cardinals))
M.Jitter(15)
@@ -233,7 +233,7 @@
..()
/datum/reagent/drug/methamphetamine/addiction_act_stage4(mob/living/carbon/human/M)
if(CHECK_MOBILITY(M, MOBILITY_MOVE) && !ismovableatom(M.loc))
if(CHECK_MOBILITY(M, MOBILITY_MOVE) && !ismovable(M.loc))
for(var/i = 0, i < 8, i++)
step(M, pick(GLOB.cardinals))
M.Jitter(20)
@@ -285,7 +285,7 @@
M.adjustStaminaLoss(-5, 0)
M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 4)
M.hallucination += 5
if(CHECK_MOBILITY(M, MOBILITY_MOVE) && !ismovableatom(M.loc))
if(CHECK_MOBILITY(M, MOBILITY_MOVE) && !ismovable(M.loc))
step(M, pick(GLOB.cardinals))
step(M, pick(GLOB.cardinals))
..()
@@ -293,7 +293,7 @@
/datum/reagent/drug/bath_salts/overdose_process(mob/living/M)
M.hallucination += 5
if(CHECK_MOBILITY(M, MOBILITY_MOVE) && !ismovableatom(M.loc))
if(CHECK_MOBILITY(M, MOBILITY_MOVE) && !ismovable(M.loc))
for(var/i in 1 to 8)
step(M, pick(GLOB.cardinals))
if(prob(20))
@@ -304,7 +304,7 @@
/datum/reagent/drug/bath_salts/addiction_act_stage1(mob/living/M)
M.hallucination += 10
if(CHECK_MOBILITY(M, MOBILITY_MOVE) && !ismovableatom(M.loc))
if(CHECK_MOBILITY(M, MOBILITY_MOVE) && !ismovable(M.loc))
for(var/i = 0, i < 8, i++)
step(M, pick(GLOB.cardinals))
M.Jitter(5)
@@ -315,7 +315,7 @@
/datum/reagent/drug/bath_salts/addiction_act_stage2(mob/living/M)
M.hallucination += 20
if(CHECK_MOBILITY(M, MOBILITY_MOVE) && !ismovableatom(M.loc))
if(CHECK_MOBILITY(M, MOBILITY_MOVE) && !ismovable(M.loc))
for(var/i = 0, i < 8, i++)
step(M, pick(GLOB.cardinals))
M.Jitter(10)
@@ -327,7 +327,7 @@
/datum/reagent/drug/bath_salts/addiction_act_stage3(mob/living/M)
M.hallucination += 30
if(CHECK_MOBILITY(M, MOBILITY_MOVE) && !ismovableatom(M.loc))
if(CHECK_MOBILITY(M, MOBILITY_MOVE) && !ismovable(M.loc))
for(var/i = 0, i < 12, i++)
step(M, pick(GLOB.cardinals))
M.Jitter(15)
@@ -339,7 +339,7 @@
/datum/reagent/drug/bath_salts/addiction_act_stage4(mob/living/carbon/human/M)
M.hallucination += 30
if(CHECK_MOBILITY(M, MOBILITY_MOVE) && !ismovableatom(M.loc))
if(CHECK_MOBILITY(M, MOBILITY_MOVE) && !ismovable(M.loc))
for(var/i = 0, i < 16, i++)
step(M, pick(GLOB.cardinals))
M.Jitter(50)
@@ -2023,9 +2023,9 @@
/datum/reagent/peaceborg_confuse/on_mob_life(mob/living/carbon/M)
if(M.confused < 6)
M.confused = CLAMP(M.confused + 3, 0, 5)
M.confused = clamp(M.confused + 3, 0, 5)
if(M.dizziness < 6)
M.dizziness = CLAMP(M.dizziness + 3, 0, 5)
M.dizziness = clamp(M.dizziness + 3, 0, 5)
if(prob(20))
to_chat(M, "You feel confused and disorientated.")
..()
@@ -105,7 +105,7 @@
if(St.purity < 1)
St.volume *= St.purity
St.purity = 1
var/amount = CLAMP(0.002, 0, N.volume)
var/amount = clamp(0.002, 0, N.volume)
N.volume -= amount
St.data["grown_volume"] = St.data["grown_volume"] + added_volume
St.name = "[initial(St.name)] [round(St.data["grown_volume"], 0.1)]u colony"
@@ -195,7 +195,7 @@
return
holder.remove_reagent(/datum/reagent/sorium, multiplier*4)
var/turf/T = get_turf(holder.my_atom)
var/range = CLAMP(sqrt(multiplier*4), 1, 6)
var/range = clamp(sqrt(multiplier*4), 1, 6)
goonchem_vortex(T, 1, range)
/datum/chemical_reaction/sorium_vortex
@@ -206,7 +206,7 @@
/datum/chemical_reaction/sorium_vortex/on_reaction(datum/reagents/holder, multiplier)
var/turf/T = get_turf(holder.my_atom)
var/range = CLAMP(sqrt(multiplier), 1, 6)
var/range = clamp(sqrt(multiplier), 1, 6)
goonchem_vortex(T, 1, range)
/datum/chemical_reaction/liquid_dark_matter
@@ -220,7 +220,7 @@
return
holder.remove_reagent(/datum/reagent/liquid_dark_matter, multiplier*3)
var/turf/T = get_turf(holder.my_atom)
var/range = CLAMP(sqrt(multiplier*3), 1, 6)
var/range = clamp(sqrt(multiplier*3), 1, 6)
goonchem_vortex(T, 0, range)
/datum/chemical_reaction/ldm_vortex
@@ -231,7 +231,7 @@
/datum/chemical_reaction/ldm_vortex/on_reaction(datum/reagents/holder, multiplier)
var/turf/T = get_turf(holder.my_atom)
var/range = CLAMP(sqrt(multiplier/2), 1, 6)
var/range = clamp(sqrt(multiplier/2), 1, 6)
goonchem_vortex(T, 0, range)
/datum/chemical_reaction/flash_powder
+1 -1
View File
@@ -185,7 +185,7 @@
START_PROCESSING(SSobj, src)
else if((reagents.pH < -3) || (reagents.pH > 17))
visible_message("<span class='notice'>[icon2html(src, viewers(src))] \The [src] is damaged by the super pH and begins to deform!</span>")
reagents.pH = CLAMP(reagents.pH, -3, 17)
reagents.pH = clamp(reagents.pH, -3, 17)
container_HP -= 1
@@ -66,7 +66,7 @@
/obj/item/reagent_containers/spray/proc/spray(atom/A)
var/range = CLAMP(get_dist(src, A), 1, current_range)
var/range = clamp(get_dist(src, A), 1, current_range)
var/obj/effect/decal/chempuff/D = new /obj/effect/decal/chempuff(get_turf(src))
D.create_reagents(amount_per_transfer_from_this, NONE, NO_REAGENTS_VALUE)
var/puff_reagent_left = range //how many turf, mob or dense objet we can react with before we consider the chem puff consumed
@@ -180,7 +180,7 @@
///Used by update_icon() and update_overlays()
/obj/item/reagent_containers/syringe/proc/get_rounded_vol()
if(reagents && reagents.total_volume)
return CLAMP(round((reagents.total_volume / volume * 15),5), 1, 15)
return clamp(round((reagents.total_volume / volume * 15),5), 1, 15)
else
return 0