more tweaks and optimizations

This commit is contained in:
Fox-McCloud
2016-07-17 07:07:58 -04:00
parent 2710eeff5f
commit 4d40c32f70
6 changed files with 20 additions and 16 deletions
@@ -341,8 +341,6 @@ var/const/INGEST = 2
qdel(A)
update_total()
my_atom.on_reagent_change()
check_gofast(my_atom)
check_goreallyfast(my_atom)
return 0
+8
View File
@@ -251,6 +251,10 @@
M.adjustBrainLoss(1.0)
..()
/datum/reagent/methamphetamine/reagent_deleted(mob/living/M)
M.status_flags &= ~GOTTAGOREALLYFAST
..()
/datum/reagent/methamphetamine/overdose_process(mob/living/M, severity)
var/effect = ..()
if(severity == 1)
@@ -620,6 +624,10 @@
M.emote(pick("twitch", "shiver"))
..()
/datum/reagent/lube/ultra/reagent_deleted(mob/living/M)
M.status_flags &= ~GOTTAGOREALLYFAST
..()
/datum/reagent/lube/ultra/overdose_process(mob/living/M, severity)
if(prob(20))
M.emote("ping")
@@ -804,6 +804,10 @@
M.adjustStaminaLoss(-5*REM)
..()
/datum/reagent/medicine/stimulative_agent/reagent_deleted(mob/living/M)
M.status_flags &= ~GOTTAGOFAST
..()
/datum/reagent/medicine/stimulative_agent/overdose_process(mob/living/M, severity)
if(prob(33))
M.adjustStaminaLoss(2.5*REM)
@@ -97,20 +97,6 @@
R.on_tick()
return
/datum/reagents/proc/check_gofast(mob/M)
if(istype(M, /mob))
if(M.reagents.has_reagent("unholywater")||M.reagents.has_reagent("nuka_cola")||M.reagents.has_reagent("stimulative_agent"))
return 1
else
M.status_flags &= ~GOTTAGOFAST
/datum/reagents/proc/check_goreallyfast(mob/M)
if(istype(M, /mob))
if(M.reagents.has_reagent("methamphetamine"))
return 1
else
M.status_flags &= ~GOTTAGOREALLYFAST
// Called every time reagent containers process.
/datum/reagent/proc/on_tick(data)
return
@@ -54,6 +54,10 @@
M.status_flags |= GOTTAGOFAST
..()
/datum/reagent/drink/cold/nuka_cola/reagent_deleted(mob/living/M)
M.status_flags &= ~GOTTAGOFAST
..()
/datum/reagent/drink/cold/spacemountainwind
name = "Space Mountain Wind"
id = "spacemountainwind"
@@ -35,6 +35,10 @@
M.adjustBruteLoss(2)
..()
/datum/reagent/fuel/unholywater/reagent_deleted(mob/living/M)
M.status_flags &= ~GOTTAGOFAST
..()
/datum/reagent/plasma
name = "Plasma"
id = "plasma"