Fixed compiling errors for Neko.

This commit is contained in:
Fermi
2019-05-17 16:57:42 +01:00
parent fa5531285a
commit cabf490134
4 changed files with 36 additions and 28 deletions
+16 -11
View File
@@ -543,6 +543,7 @@ im
/datum/reagents/process()
var/datum/chemical_reaction/C = fermiReactID
var/list/cached_required_reagents = C.required_reagents//update reagents list
var/list/cached_results = C.results//resultant chemical list
var/multiplier = INFINITY
@@ -559,7 +560,8 @@ im
targetVol = 0
handle_reactions()
update_total()
C.fermiFinish(src, multiplier)
var/datum/reagent/fermi/Ferm = fermiReactID
Ferm.FermiFinish(src, multiplier)
//C.on_reaction(src, multiplier, special_react_result)
return
for(var/P in cached_results)
@@ -582,7 +584,8 @@ im
targetVol = 0
handle_reactions()
update_total()
C.fermiFinish(src, multiplier)
var/datum/reagent/fermi/Ferm = fermiReactID
Ferm.FermiFinish(src, multiplier)
//C.on_reaction(src, multiplier, special_react_result)
return
else
@@ -593,14 +596,15 @@ im
targetVol = 0
handle_reactions()
update_total()
C.fermiFinish(src, multiplier)
var/datum/reagent/fermi/Ferm = fermiReactID
Ferm.FermiFinish(src, multiplier)
//C.on_reaction(src, multiplier, special_react_result)
return
//handle_reactions()
/datum/reagents/proc/FermiReact(selected_reaction, chem_temp, pH, reactedVol, targetVol, cached_required_reagents, cached_results)
var/datum/chemical_reaction/C = selected_reaction
var/datum/chemical_reaction/fermi/C = selected_reaction
var/deltaT = 0
var/deltapH = 0
var/stepChemAmmount = 0
@@ -619,8 +623,8 @@ im
C.FermiExplode(src, (reactedVol+targetVol), chem_temp, pH)
if (pH > 14)
pH = 14
else (pH < 0 || )
pH = 14
else if (pH < 0)
pH = 0
//Create chemical sludge eventually(for now just destroy the beaker I guess?)
//TODO Strong acids eat glass, make it so you NEED plastic beakers for superacids(for some reactions)
@@ -636,7 +640,7 @@ im
deltapH = 0
return//If outside pH range, no reaction
else
deltapH = (((pH - (C.OptimalpHMin - C.ReactpHLim))**C.CurveSharppH)/((C.ReactpHLim**C.CurveSharppH))
deltapH = (((pH - (C.OptimalpHMin - C.ReactpHLim))**C.CurveSharppH)/((C.ReactpHLim**C.CurveSharppH)))
//Upper range
else if (pH > C.OptimalpHMin)
if (pH > (C.OptimalpHMin + C.ReactpHLim))
@@ -817,11 +821,12 @@ im
return FALSE
if (D.id == "water") //Do like an otter, add acid to water.
(if pH <= 2)
if (pH <= 2)
var/datum/effect_system/smoke_spread/chem/smoke_machine/s = new
s.set_up(reagents, totalVol, pH*10, src)
s.set_up(, total_volume, pH*10, src)
s.start()
remove_any(amount/10)
return
if(!pH)
@@ -885,8 +890,8 @@ im
R.data = data
R.on_new(data)
if(istype(D, /datum/reagent/fermi))//Is this a fermichem?
var/datum/reagent/fermi/FermiTime = D //It's Fermi time!
FermiTime.fermiCreate(R.holder) //Seriously what is "data" ????
var/datum/reagent/fermi/Ferm = D.id //It's Fermi time!
Ferm.FermiNew(R.holder) //Seriously what is "data" ????
//This is how I keep myself sane.
+12 -13
View File
@@ -55,11 +55,11 @@
var/crit_stabilizing_reagent = "epinephrine"
//health
var/health = 500
var/maxHealth = 500
var/damage = 0
//TODO: lung health affects lung function
/obj/item/organ/tongue/proc/adjustLungLoss(mob/living/carbon/M, damage_mod)
/obj/item/organ/lungs/proc/adjustLungLoss(mob/living/carbon/human/M, damage_mod)
if (maxHealth == "plasma")
return
if(damage+damage_mod < 0)
@@ -74,16 +74,15 @@
else if ((damage / maxHealth) > 0.75)
to_chat(M, "<span class='warning'>It's getting really hard to breathe!!</span>")
M.emote("gasp")
H.Dizzy(3)
M.Dizzy(3)
else if ((damage / maxHealth) > 0.5)
H.Dizzy(2)
M.Dizzy(2)
to_chat(M, "<span class='notice'>Your chest is really starting to hurt.</span>")
M.emote("cough")
H.Dizzy(1)
else if ((damage / maxHealth) > 0.2)
to_chat(M, "<span class='notice'>You feel an ache within your chest.</span>")
M.emote("cough")
M.Dizzy(1)
/obj/item/organ/lungs/proc/check_breath(datum/gas_mixture/breath, mob/living/carbon/human/H)
if((H.status_flags & GODMODE))
@@ -156,7 +155,7 @@
else
H.failed_last_breath = FALSE
if(H.health >= H.crit_threshold)
H.adjustOxyLoss(-5*((damage/health)/2)) //More damaged lungs = slower oxy rate up to a factor of half
H.adjustOxyLoss(-5*((damage/maxHealth)/2)) //More damaged lungs = slower oxy rate up to a factor of half
gas_breathed = breath_gases[/datum/gas/oxygen][MOLES]
H.clear_alert("not_enough_oxy")
@@ -185,7 +184,7 @@
else
H.failed_last_breath = FALSE
if(H.health >= H.crit_threshold)
H.adjustOxyLoss(-5*((damage/health)/2))
H.adjustOxyLoss(-5*((damage/maxHealth)/2))
gas_breathed = breath_gases[/datum/gas/nitrogen][MOLES]
H.clear_alert("nitro")
@@ -222,7 +221,7 @@
else
H.failed_last_breath = FALSE
if(H.health >= H.crit_threshold)
H.adjustOxyLoss(-5*((damage/health)/2))
H.adjustOxyLoss(-5*((damage/maxHealth)/2))
gas_breathed = breath_gases[/datum/gas/carbon_dioxide][MOLES]
H.clear_alert("not_enough_co2")
@@ -252,7 +251,7 @@
else
H.failed_last_breath = FALSE
if(H.health >= H.crit_threshold)
H.adjustOxyLoss(-5*((damage/health)/2))
H.adjustOxyLoss(-5*((damage/maxHealth)/2))
gas_breathed = breath_gases[/datum/gas/plasma][MOLES]
H.clear_alert("not_enough_tox")
@@ -442,14 +441,14 @@
safe_oxygen_max = 0 // Like, at all.
safe_toxins_min = 16 //We breath THIS!
safe_toxins_max = 0
health = "plasma"//I don't understand how plamamen work, so I'm not going to try t give them special lungs atm
maxHealth = "plasma"//I don't understand how plamamen work, so I'm not going to try t give them special lungs atm
/obj/item/organ/lungs/cybernetic
name = "cybernetic lungs"
desc = "A cybernetic version of the lungs found in traditional humanoid entities. It functions the same as an organic lung and is merely meant as a replacement."
icon_state = "lungs-c"
synthetic = TRUE
health = 600
maxHealth = 600
/obj/item/organ/lungs/cybernetic/emp_act()
. = ..()
@@ -469,7 +468,7 @@
cold_level_1_threshold = 200
cold_level_2_threshold = 140
cold_level_3_threshold = 100
health = 750
maxHealth = 750
/obj/item/organ/lungs/ashwalker
name = "ash lungs"
@@ -23,7 +23,11 @@
//return ..()
//Called when reaction stops.
/datum/reagent/fermi/proc/fermiFinish(holder) //You can get holder by reagents.holder WHY DID I LEARN THIS NOW???
/datum/reagent/fermi/proc/FermiFinish(holder) //You can get holder by reagents.holder WHY DID I LEARN THIS NOW???
return
//Called when added to a beaker without the reagent added.
/datum/reagent/fermi/proc/FermiNew(holder) //You can get holder by reagents.holder WHY DID I LEARN THIS NOW???
return
//This should process fermichems to find out how pure they are and what effect to do.
@@ -579,7 +583,7 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING
color = "#E60584" // rgb: 96, 0, 255
taste_description = "a milky ice cream like flavour."
overdose_threshold = 12
metabolization_rate = 0.5qa
metabolization_rate = 0.5
ImpureChem = "BEsmaller" //If you make an inpure chem, it stalls growth
InverseChemVal = 0.25
InverseChem = "BEsmaller" //At really impure vols, it just becomes 100% inverse
@@ -1028,7 +1032,7 @@ And as stated earlier, this chem is hard to make, and is punishing on failure. Y
var/creatorName
var/mob/living/creator
/datum/reagent/fermi/enthrall/fermiCreate()
/datum/reagent/fermi/enthrall/FermiFinish()
message_admins("On new for enthral proc'd")
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in holder.reagent_list
//var/datum/reagent/fermi/enthrall/E = locate(/datum/reagent/fermi/enthrall) in holder.reagent_list
@@ -30,7 +30,7 @@
FermiChem = TRUE//If the chemical uses the Fermichem reaction mechanics
FermiExplode = FALSE //If the chemical explodes in a special way
/datum/chemical_reaction/eigenstate/FermiCreate(datum/reagents/holder)
/datum/chemical_reaction/fermi/eigenstate/FermiCreate(datum/reagents/holder)
var/location = get_turf(holder.my_atom)
var/datum/reagent/fermi/eigenstate/E = locate(/datum/reagent/fermi/eigenstate) in holder.reagent_list
E.location_created = location