Merge remote-tracking branch 'refs/remotes/Citadel-Station-13/master' into syntheticbloods

This commit is contained in:
Poojawa
2019-09-22 00:22:18 -05:00
117 changed files with 953 additions and 1471 deletions
@@ -6,58 +6,17 @@
id = "fermi"
taste_description = "affection and love!"
can_synth = FALSE
SplitChem = TRUE
//This should process fermichems to find out how pure they are and what effect to do.
/datum/reagent/fermi/on_mob_add(mob/living/carbon/M, amount)
. = ..()
if(!M)
return
if(purity < 0)
CRASH("Purity below 0 for chem: [id], Please let Fermis Know!")
if (purity == 1 || DoNotSplit == TRUE)
log_game("FERMICHEM: [M] ckey: [M.key] has ingested [volume]u of [id]")
return
else if (InverseChemVal > purity)//Turns all of a added reagent into the inverse chem
M.reagents.remove_reagent(id, amount, FALSE)
M.reagents.add_reagent(InverseChem, amount, FALSE, other_purity = 1)
log_game("FERMICHEM: [M] ckey: [M.key] has ingested [volume]u of [InverseChem]")
return
else
var/impureVol = amount * (1 - purity) //turns impure ratio into impure chem
M.reagents.remove_reagent(id, (impureVol), FALSE)
M.reagents.add_reagent(ImpureChem, impureVol, FALSE, other_purity = 1)
log_game("FERMICHEM: [M] ckey: [M.key] has ingested [volume - impureVol]u of [id]")
log_game("FERMICHEM: [M] ckey: [M.key] has ingested [volume]u of [ImpureChem]")
return
//When merging two fermichems, see above
/datum/reagent/fermi/on_merge(data, amount, mob/living/carbon/M, purity)//basically on_mob_add but for merging
. = ..()
if(!ishuman(M))
return
if (purity < 0)
CRASH("Purity below 0 for chem: [id], Please let Fermis Know!")
if (purity == 1 || DoNotSplit == TRUE)
log_game("FERMICHEM: [M] ckey: [M.key] has merged [volume]u of [id] in themselves")
return
else if (InverseChemVal > purity)
M.reagents.remove_reagent(id, amount, FALSE)
M.reagents.add_reagent(InverseChem, amount, FALSE, other_purity = 1)
for(var/datum/reagent/fermi/R in M.reagents.reagent_list)
if(R.name == "")
R.name = name//Negative effects are hidden
log_game("FERMICHEM: [M] ckey: [M.key] has merged [volume]u of [InverseChem]")
return
else
var/impureVol = amount * (1 - purity)
M.reagents.remove_reagent(id, impureVol, FALSE)
M.reagents.add_reagent(ImpureChem, impureVol, FALSE, other_purity = 1)
for(var/datum/reagent/fermi/R in M.reagents.reagent_list)
if(R.name == "")
R.name = name//Negative effects are hidden
log_game("FERMICHEM: [M] ckey: [M.key] has merged [volume - impureVol]u of [id]")
log_game("FERMICHEM: [M] ckey: [M.key] has merged [volume]u of [ImpureChem]")
return
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -2,15 +2,15 @@
mix_sound = 'sound/effects/bubbles.ogg'
//Called for every reaction step
/datum/chemical_reaction/fermi/proc/FermiCreate(holder)
/datum/chemical_reaction/proc/FermiCreate(holder)
return
//Called when reaction STOP_PROCESSING
/datum/chemical_reaction/fermi/proc/FermiFinish(datum/reagents/holder)
/datum/chemical_reaction/proc/FermiFinish(datum/reagents/holder)
return
//Called when temperature is above a certain threshold, or if purity is too low.
/datum/chemical_reaction/fermi/proc/FermiExplode(datum/reagents, var/atom/my_atom, volume, temp, pH, Exploding = FALSE)
/datum/chemical_reaction/proc/FermiExplode(datum/reagents, var/atom/my_atom, volume, temp, pH, Exploding = FALSE)
if (Exploding == TRUE)
return
@@ -24,26 +24,32 @@
if (500 to 750)
for(var/turf/turf in range(1,T))
new /obj/effect/hotspot(turf)
volume*=1.1
if (751 to 1100)
for(var/turf/turf in range(2,T))
new /obj/effect/hotspot(turf)
volume*=1.2
if (1101 to 1500) //If you're crafty
for(var/turf/turf in range(3,T))
new /obj/effect/hotspot(turf)
volume*=1.3
if (1501 to 2500) //requested
for(var/turf/turf in range(4,T))
new /obj/effect/hotspot(turf)
volume*=1.4
if (2501 to 5000)
for(var/turf/turf in range(5,T))
new /obj/effect/hotspot(turf)
volume*=1.5
if (5001 to INFINITY)
for(var/turf/turf in range(6,T))
new /obj/effect/hotspot(turf)
volume*=1.6
message_admins("Fermi explosion at [T], with a temperature of [temp], pH of [pH], Impurity tot of [ImpureTot].")
@@ -66,7 +72,7 @@
if (pH > 10) //if alkaline, small explosion.
var/datum/effect_system/reagents_explosion/e = new()
e.set_up(round((volume/30)*(pH-9)), T, 0, 0)
e.set_up(round((volume/28)*(pH-9)), T, 0, 0)
e.start()
if(!ImpureTot == 0) //If impure, v.small emp (0.6 or less)
@@ -101,10 +107,10 @@
PurityMin = 0.4 //The minimum purity something has to be above, otherwise it explodes.
/datum/chemical_reaction/fermi/eigenstate/FermiFinish(datum/reagents/holder, var/atom/my_atom)//Strange how this doesn't work but the other does.
if(!locate(/datum/reagent/fermi/eigenstate) in my_atom.reagents.reagent_list)
var/datum/reagent/fermi/eigenstate/E = locate(/datum/reagent/fermi/eigenstate) in my_atom.reagents.reagent_list
if(!E)
return
var/turf/open/location = get_turf(my_atom)
var/datum/reagent/fermi/eigenstate/E = locate(/datum/reagent/fermi/eigenstate) in my_atom.reagents.reagent_list
if(location)
E.location_created = location
E.data.["location_created"] = location
@@ -137,12 +143,16 @@
/datum/chemical_reaction/fermi/SDGF/FermiExplode(datum/reagents, var/atom/my_atom, volume, temp, pH)//Spawns an angery teratoma!
var/turf/T = get_turf(my_atom)
var/mob/living/simple_animal/slime/S = new(T,"green")
S.damage_coeff = list(BRUTE = 0.9 , BURN = 2, TOX = 1, CLONE = 1, STAMINA = 0, OXY = 1)
S.name = "Living teratoma"
S.real_name = "Living teratoma"
S.rabid = 1//Make them an angery boi
S.color = "#810010"
var/amount_to_spawn = round((volume/100), 1)
if(amount_to_spawn <= 0)
amount_to_spawn = 1
for(var/i in 1 to amount_to_spawn)
var/mob/living/simple_animal/slime/S = new(T,"green")
S.damage_coeff = list(BRUTE = 0.9 , BURN = 2, TOX = 1, CLONE = 1, STAMINA = 0, OXY = 1)
S.name = "Living teratoma"
S.real_name = "Living teratoma"
S.rabid = 1//Make them an angery boi
S.color = "#810010"
my_atom.reagents.clear_reagents()
var/list/seen = viewers(8, get_turf(my_atom))
for(var/mob/M in seen)
@@ -353,11 +363,15 @@
PurityMin = 0.5
/datum/chemical_reaction/fermi/hatmium/FermiExplode(src, var/atom/my_atom, volume, temp, pH)
var/obj/item/clothing/head/hattip/hat = new /obj/item/clothing/head/hattip(get_turf(my_atom))
hat.animate_atom_living()
var/amount_to_spawn = round((volume/100), 1)
if(amount_to_spawn <= 0)
amount_to_spawn = 1
for(var/i in 1 to amount_to_spawn)
var/obj/item/clothing/head/hattip/hat = new /obj/item/clothing/head/hattip(get_turf(my_atom))
hat.animate_atom_living()
var/list/seen = viewers(8, get_turf(my_atom))
for(var/mob/M in seen)
to_chat(M, "<span class='warning'>The makes an off sounding pop, as a hat suddenly climbs out of the beaker!</b></span>")
to_chat(M, "<span class='warning'>The [my_atom] makes an off sounding pop, as a hat suddenly climbs out of it!</b></span>")
my_atom.reagents.clear_reagents()
/datum/chemical_reaction/fermi/furranium