This commit is contained in:
Fermi
2019-06-13 06:35:12 +01:00
parent 378af882d3
commit aa7805eaa4
6 changed files with 48 additions and 47 deletions
+4 -7
View File
@@ -786,7 +786,7 @@
var/S = specific_heat()
chem_temp = CLAMP(chem_temp + (J / (S * total_volume)), min_temp, max_temp)
/datum/reagents/proc/add_reagent(reagent, amount, list/data=null, reagtemp = 300, other_purity = 1, other_pH, no_react = 0)//EDIT HERE TOO ~FERMICHEM~
/datum/reagents/proc/add_reagent(reagent, amount, list/data=null, reagtemp = 300, other_purity = 1, other_pH, no_react = 0)
if(!isnum(amount) || !amount)
return FALSE
@@ -803,7 +803,7 @@
if (pH <= 2)
var/datum/effect_system/smoke_spread/chem/s = new
var/turf/T = get_turf(my_atom)
var/datum/reagents/R = new/datum/reagents(3000)//I don't want to hold it back..!
var/datum/reagents/R = new/datum/reagents(3000)
R.add_reagent("fermiAcid", amount)
for (var/datum/reagent/reagentgas in reagent_list)
R.add_reagent(reagentgas, amount/5)
@@ -836,7 +836,6 @@
specific_heat += D.specific_heat * (amount / new_total)
thermal_energy += D.specific_heat * amount * reagtemp
chem_temp = thermal_energy / (specific_heat * new_total)
////
//cacluate reagent based pH shift.
pH = ((cached_pH * cached_total)+(D.pH * amount))/(cached_total + amount)//should be right
@@ -858,10 +857,8 @@
if(my_atom)
my_atom.on_reagent_change(ADD_REAGENT)
R.on_merge(data, amount, my_atom, other_purity)
if(istype(D, /datum/reagent/fermi))//Is this a fermichem?
var/datum/reagent/fermi/Ferm = D //It is a fermichem!
if(Ferm.OnMobMergeCheck == TRUE) //Does this fermichem split?
R.on_mob_add(my_atom, amount) //On mob add processes fermichems, splitting them into their impure and pure products. This allows them to split when merging fermichems in a mob.
if(R.OnMobMergeCheck == TRUE)//Forces on_mob_add proc when a chem is merged
R.on_mob_add(my_atom, amount)
if(!no_react)
handle_reactions()
@@ -38,6 +38,7 @@
var/addProc = FALSE //If the chemical should force an on_new() call
var/turf/loc = null //Should be the creation location!
var/pH = 7 //pH of the specific reagent, used for calculating the sum pH of a holder.
var/OnMobMergeCheck = FALSE
/datum/reagent/Destroy() // This should only be called by the holder, so it's already handled clearing its references
. = ..()
+9 -5
View File
@@ -1,3 +1,8 @@
#define FLAG_STATUS_NONE (1<<0)
#define FLAG_STATUS_PH_IMMUNE (1<<1)
#define FLAG_STATUS_TEMP_IMMUNE (1<<2)
/obj/item/reagent_containers
name = "Container"
desc = "..."
@@ -11,8 +16,7 @@
var/spawned_disease = null
var/disease_amount = 20
var/spillable = FALSE
var/pH_immune = TRUE//true for now, just so things that shouldn't melt don't.
var/temp_immune = TRUE
var/beaker_resistances |= 1<<3
/obj/item/reagent_containers/Initialize(mapload, vol)
. = ..()
@@ -127,7 +131,7 @@
//melts plastic beakers
/obj/item/reagent_containers/microwave_act(obj/machinery/microwave/M)
reagents.expose_temperature(1000)
if(!temp_immune)
if(!beaker_resistances = FLAG_STATUS_TEMP_IMMUNE)
var/list/seen = viewers(5, get_turf(src))
var/iconhtml = icon2html(src, seen)
for(var/mob/H in seen)
@@ -139,7 +143,7 @@
//melts plastic beakers
/obj/item/reagent_containers/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
reagents.expose_temperature(exposed_temperature)
if(!temp_immune)
if(!beaker_resistances = FLAG_STATUS_TEMP_IMMUNE)
if(reagents.chem_temp > 444)//assuming polypropylene
var/list/seen = viewers(5, get_turf(src))
var/iconhtml = icon2html(src, seen)
@@ -150,7 +154,7 @@
//melts glass beakers
/obj/item/reagent_containers/proc/pH_check()
if(!pH_immune)
if(!beaker_resistances = FLAG_STATUS_PH_IMMUNE)
if((reagents.pH < 0.5) || (reagents.pH > 13.5))
var/list/seen = viewers(5, get_turf(src))
var/iconhtml = icon2html(src, seen)
+1 -2
View File
@@ -1229,8 +1229,7 @@
return
if(message_admins)
message_admins("[ADMIN_LOOKUPFLW(user)] has said '[log_message]' with a Velvet Voice, affecting [english_list(listeners)], with a power multiplier of [power_multiplier].")
log_game("[key_name(user)] has said '[log_message]' with a Velvet Voice, affecting [english_list(listeners)], with a power multiplier of [power_multiplier].")
investigate_log("[key_name(user)] has said '[log_message]' with a Velvet Voice, affecting [english_list(listeners)], with a power multiplier of [power_multiplier].", INVESTIGATE_FERMICHEM)
log_game("FERMICHEM: [key_name(user)] has said '[log_message]' with a Velvet Voice, affecting [english_list(listeners)], with a power multiplier of [power_multiplier].")
//SSblackbox.record_feedback("tally", "Velvet_voice", 1, log_message) If this is on, it fills the thing up and OOFs the server
return