Buncha fixes and QoL stuff. (pH, hypo, heater and dispencer_
This commit is contained in:
@@ -127,7 +127,7 @@ Chemist
|
||||
backpack = /obj/item/storage/backpack/chemistry
|
||||
satchel = /obj/item/storage/backpack/satchel/chem
|
||||
duffelbag = /obj/item/storage/backpack/duffelbag/med
|
||||
l_hand = /obj/item/FermiChem/pHbooklet
|
||||
l_hand = /obj/item/fermichem/pHbooklet
|
||||
|
||||
chameleon_extras = /obj/item/gun/syringe
|
||||
|
||||
|
||||
@@ -198,7 +198,7 @@
|
||||
trans_data = copy_data(T)
|
||||
|
||||
|
||||
R.add_reagent(T.id, transfer_amount * multiplier, trans_data, chem_temp, T.purity, pH, no_react = TRUE) //we only handle reaction after every reagent has been transfered.
|
||||
R.add_reagent(T.id, transfer_amount * multiplier, trans_data, chem_temp, T.purity, pH, no_react = TRUE, ignore_pH = TRUE) //we only handle reaction after every reagent has been transfered.
|
||||
|
||||
remove_reagent(T.id, transfer_amount, ignore_pH = TRUE)
|
||||
|
||||
@@ -805,7 +805,7 @@
|
||||
var/obj/item/reagent_containers/RC = my_atom
|
||||
RC.temp_check()
|
||||
|
||||
/datum/reagents/proc/add_reagent(reagent, amount, list/data=null, reagtemp = 300, other_purity = 1, other_pH, no_react = 0)
|
||||
/datum/reagents/proc/add_reagent(reagent, amount, list/data=null, reagtemp = 300, other_purity = 1, other_pH, no_react = 0, ignore_pH = FALSE)
|
||||
|
||||
if(!isnum(amount) || !amount)
|
||||
return FALSE
|
||||
@@ -818,7 +818,7 @@
|
||||
WARNING("[my_atom] attempted to add a reagent called '[reagent]' which doesn't exist. ([usr])")
|
||||
return FALSE
|
||||
|
||||
if (D.id == "water") //Do like an otter, add acid to water.
|
||||
if (D.id == "water" && no_react == FALSE) //Do like an otter, add acid to water.
|
||||
if (pH <= 2)
|
||||
SSblackbox.record_feedback("tally", "fermi_chem", 1, "water-acid explosions")
|
||||
var/datum/effect_system/smoke_spread/chem/s = new
|
||||
@@ -858,10 +858,13 @@
|
||||
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
|
||||
if(istype(my_atom, /obj/item/reagent_containers/))
|
||||
var/obj/item/reagent_containers/RC = my_atom
|
||||
RC.pH_check()//checks beaker resilience
|
||||
if(ignore_pH == FALSE)
|
||||
pH = ((cached_pH * cached_total)+(D.pH * amount))/(cached_total + amount)//should be right
|
||||
if(istype(my_atom, /obj/item/reagent_containers/))
|
||||
var/obj/item/reagent_containers/RC = my_atom
|
||||
RC.pH_check()//checks beaker resilience
|
||||
else
|
||||
pH = other_pH
|
||||
|
||||
//add the reagent to the existing if it exists
|
||||
for(var/A in cached_reagents)
|
||||
|
||||
@@ -190,6 +190,10 @@
|
||||
data["beakerMaxVolume"] = beaker.volume
|
||||
data["beakerTransferAmounts"] = beaker.possible_transfer_amounts
|
||||
data["beakerCurrentpH"] = beaker.reagents.pH
|
||||
//pH accuracy
|
||||
for(var/obj/item/stock_parts/capacitor/C in component_parts)
|
||||
data["partRating"]= 10**(C.rating-1)
|
||||
|
||||
else
|
||||
data["beakerCurrentVolume"] = null
|
||||
data["beakerMaxVolume"] = null
|
||||
|
||||
@@ -100,11 +100,18 @@
|
||||
data["currentpH"] = beaker ? beaker.reagents.pH : null
|
||||
data["beakerCurrentVolume"] = beaker ? beaker.reagents.total_volume : null
|
||||
data["beakerMaxVolume"] = beaker ? beaker.volume : null
|
||||
//purity and pH accuracy
|
||||
for(var/obj/item/stock_parts/micro_laser/M in component_parts)
|
||||
data["partRating"]= 10**(M.rating-1)
|
||||
if(M.rating == 4)
|
||||
data["showPurity"] = 1
|
||||
else
|
||||
data["showPurity"] = 0
|
||||
|
||||
var beakerContents[0]
|
||||
if(beaker)
|
||||
for(var/datum/reagent/R in beaker.reagents.reagent_list)
|
||||
beakerContents.Add(list(list("name" = R.name, "volume" = R.volume))) // list in a list because Byond merges the first list...
|
||||
beakerContents.Add(list(list("name" = R.name, "volume" = R.volume, "purity" = R.purity))) // list in a list because Byond merges the first list...
|
||||
data["beakerContents"] = beakerContents
|
||||
return data
|
||||
|
||||
|
||||
@@ -468,16 +468,16 @@
|
||||
build_path = /obj/item/anomaly_neutralizer
|
||||
category = list("Equipment")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING
|
||||
|
||||
|
||||
/datum/design/pHmeter
|
||||
name = "pH meter"
|
||||
desc = "A a electrode attached to a small circuit box that will tell you the pH of a solution."
|
||||
id = "pHmeter"
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_METAL = 1000, MAT_SILVER = 100, MAT_DIAMOND = 100)
|
||||
build_path = /obj/item/FermiChem/pHmeter
|
||||
build_path = /obj/item/fermichem/pHmeter
|
||||
category = list("Equipment")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
|
||||
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE
|
||||
|
||||
/////////////////////////////////////////
|
||||
////////////Armour///////////////////////
|
||||
|
||||
@@ -1323,6 +1323,7 @@
|
||||
var/instill = stripped_input(user, "Instill an emotion in your [(user.lewd?"Your pet":"listener")].", MAX_MESSAGE_LEN)
|
||||
var/customSpan = list("Notice", "Warning", "Hypnophrase", "Love", "Velvet")
|
||||
to_chat(H, "<span class='[customSpan]'><i>[instill]</i></span>")
|
||||
E.cooldown += 1
|
||||
|
||||
//RECOGNISE
|
||||
else if((findtext(message, recognise_words)))
|
||||
|
||||
@@ -313,7 +313,7 @@
|
||||
/obj/item/storage/backpack/chemistry = 3,
|
||||
/obj/item/storage/backpack/satchel/chem = 3,
|
||||
/obj/item/storage/bag/chemistry = 3,
|
||||
/obj/item/FermiChem/pHbooklet = 3)//pH indicator)
|
||||
/obj/item/fermichem/pHbooklet = 3)//pH indicator)
|
||||
refill_canister = /obj/item/vending_refill/wardrobe/chem_wardrobe
|
||||
|
||||
/obj/item/vending_refill/wardrobe/chem_wardrobe
|
||||
|
||||
Reference in New Issue
Block a user