Removes a bunch fo Spawns in Life

This commit is contained in:
Fox-McCloud
2017-07-05 16:32:22 -04:00
parent b724ca613d
commit 641af24a2d
9 changed files with 48 additions and 76 deletions
@@ -22,15 +22,13 @@
if(disabilities & COUGHING)
if((prob(5) && paralysis <= 1))
drop_item()
spawn( 0 )
emote("cough")
return
emote("cough")
return
if(disabilities & TOURETTES)
if((prob(10) && paralysis <= 1))
Stun(10)
spawn( 0 )
emote("twitch")
return
emote("twitch")
return
if(disabilities & NERVOUS)
if(prob(10))
stuttering = max(10, stuttering)
@@ -68,8 +66,7 @@
//UNCONSCIOUS. NO-ONE IS HOME
if((getOxyLoss() > 50) || (config.health_threshold_crit >= health))
if(health <= 20 && prob(1))
spawn(0)
emote("gasp")
emote("gasp")
if(!reagents.has_reagent("epinephrine"))
adjustOxyLoss(1)
Paralyse(3)
@@ -81,8 +78,7 @@
blinded = 1
stat = UNCONSCIOUS
if(prob(10) && health)
spawn(0)
emote("hiss")
emote("hiss")
//CONSCIOUS
else
stat = CONSCIOUS
@@ -40,9 +40,8 @@
else if(sleeping)
blinded = 1
stat = UNCONSCIOUS
if( prob(10) && health )
spawn(0)
emote("hiss_")
if(prob(10) && health)
emote("hiss_")
//CONSCIOUS
else
stat = CONSCIOUS
+1 -2
View File
@@ -126,8 +126,7 @@
if(isturf(loc))
I.remove(src)
I.forceMove(get_turf(src))
spawn()
I.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),5)
I.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),5)
for(var/mob/M in src)
if(M in src.stomach_contents)
@@ -19,8 +19,7 @@
if(isturf(loc))
var/atom/movable/thing = I.remove(src)
thing.forceMove(get_turf(src))
spawn()
thing.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),5)
thing.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),5)
for(var/obj/item/organ/external/E in bodyparts)
if(istype(E, /obj/item/organ/external/chest))
+2 -2
View File
@@ -259,7 +259,7 @@
if(losebreath > 0)
AdjustLoseBreath(-1)
if(prob(10))
spawn emote("gasp")
emote("gasp")
if(istype(loc, /obj/))
var/obj/loc_as_obj = loc
loc_as_obj.handle_internal_lifeform(src, 0)
@@ -1090,7 +1090,7 @@
// Humans can lack a mind datum, y'know
if(H.mind && (H.mind.assigned_role == "Detective" || H.mind.assigned_role == "Coroner"))
return //too cool for puke
to_chat(H, "<spawn class='warning'>You smell something foul...")
to_chat(H, "<span class='warning'>You smell something foul...")
H.fakevomit()
/mob/living/carbon/human/proc/handle_heartbeat()
@@ -166,8 +166,7 @@
if(Toxins_pp < safe_plasma_min)
if(prob(20))
spawn(0)
H.emote("gasp")
H.emote("gasp")
if(Toxins_pp > 0)
var/ratio = safe_plasma_min/Toxins_pp
H.adjustOxyLoss(min(5*ratio, HUMAN_MAX_OXYLOSS)) // Don't fuck them up too fast (space only does HUMAN_MAX_OXYLOSS after all!)
@@ -198,8 +197,7 @@
if(world.time - H.co2overloadtime > 300) // They've been in here 30s now, lets start to kill them for their own good!
H.adjustOxyLoss(8)
if(prob(20)) // Lets give them some chance to know somethings not right though I guess.
spawn(0)
H.emote("cough")
H.emote("cough")
else
H.co2overloadtime = 0
@@ -213,8 +211,7 @@
H.AdjustSleeping(8, bound_lower = 0, bound_upper = 10)
else if(SA_pp > 0.15) // There is sleeping gas in their lungs, but only a little, so give them a bit of a warning
if(prob(20))
spawn(0)
H.emote(pick("giggle", "laugh"))
H.emote(pick("giggle", "laugh"))
SA.moles = 0
if(abs(310.15 - breath.temperature) > 50) // Hot air hurts :(
@@ -227,8 +227,7 @@
if(O2_pp < atmos_requirements["min_oxy"])
if(prob(20))
spawn(0)
H.emote("gasp")
H.emote("gasp")
H.failed_last_breath = 1
if(O2_pp > 0)
@@ -250,8 +249,7 @@
if(N2_pp < atmos_requirements["min_nitro"])
if(prob(20))
spawn(0)
H.emote("gasp")
H.emote("gasp")
H.failed_last_breath = 1
if(N2_pp > 0)
@@ -273,8 +271,7 @@
if(Tox_pp < atmos_requirements["min_tox"])
if(prob(20))
spawn(0)
H.emote("gasp")
H.emote("gasp")
H.failed_last_breath = 1
if(Tox_pp > 0)
@@ -297,8 +294,7 @@
if(CO2_pp < atmos_requirements["min_co2"])
if(prob(20))
spawn(0)
H.emote("gasp")
H.emote("gasp")
H.failed_last_breath = 1
if(CO2_pp)
@@ -316,8 +312,7 @@
if(world.time - H.co2overloadtime > 300) // They've been in here 30s now, lets start to kill them for their own good!
H.adjustOxyLoss(8)
if(prob(20)) // Lets give them some chance to know somethings not right though I guess.
spawn(0)
H.emote("cough")
H.emote("cough")
else
H.clear_alert("co2")
H.co2overloadtime = 0
@@ -343,8 +338,7 @@
H.AdjustSleeping(8, bound_lower = 0, bound_upper = 10)
else if(SA_pp > 0.01) // There is sleeping gas in their lungs, but only a little, so give them a bit of a warning
if(prob(20))
spawn(0)
H.emote(pick("giggle", "laugh"))
H.emote(pick("giggle", "laugh"))
handle_temperature(breath, H)
return 1
+15 -20
View File
@@ -54,7 +54,7 @@
if(losebreath > 0)
AdjustLoseBreath(-1)
if(prob(10))
spawn emote("gasp")
emote("gasp")
if(istype(loc, /obj/))
var/obj/loc_as_obj = loc
loc_as_obj.handle_internal_lifeform(src, 0)
@@ -114,8 +114,7 @@
//OXYGEN
if(O2_partialpressure < safe_oxy_min) //Not enough oxygen
if(prob(20))
spawn(0)
emote("gasp")
emote("gasp")
if(O2_partialpressure > 0)
var/ratio = safe_oxy_min/O2_partialpressure
adjustOxyLoss(min(5*ratio, 3))
@@ -145,7 +144,7 @@
if(world.time - co2overloadtime > 300)
adjustOxyLoss(8)
if(prob(20))
spawn(0) emote("cough")
emote("cough")
else
co2overloadtime = 0
@@ -168,7 +167,7 @@
AdjustSleeping(2, bound_lower = 0, bound_upper = 10)
else if(SA_partialpressure > 0.01)
if(prob(20))
spawn(0) emote(pick("giggle","laugh"))
emote(pick("giggle","laugh"))
//BREATH TEMPERATURE
handle_breath_temperature(breath)
@@ -236,21 +235,18 @@
wetlevel = max(wetlevel - 1,0)
/mob/living/carbon/handle_stomach()
spawn(0)
for(var/mob/living/M in stomach_contents)
if(M.loc != src)
for(var/mob/living/M in stomach_contents)
if(M.loc != src)
stomach_contents.Remove(M)
continue
if(stat != DEAD)
if(M.stat == DEAD)
stomach_contents.Remove(M)
qdel(M)
continue
if(istype(M, /mob/living) && stat != 2)
if(M.stat == 2)
M.death(1)
stomach_contents.Remove(M)
qdel(M)
continue
if(mob_master.current_cycle%3==1)
if(!(M.status_flags & GODMODE))
M.adjustBruteLoss(5)
nutrition += 10
if(mob_master.current_cycle%3==1)
M.adjustBruteLoss(5)
nutrition += 10
//This updates the health and status of the mob (conscious, unconscious, dead)
/mob/living/carbon/handle_regular_status_updates()
@@ -347,8 +343,7 @@
handle_dreams()
adjustStaminaLoss(-10)
if(prob(10) && health && hal_screwyhud != SCREWYHUD_CRIT)
spawn(0)
emote("snore")
emote("snore")
// Keep SSD people asleep
if(player_logged)
Sleeping(2)
+12 -19
View File
@@ -281,11 +281,9 @@
if(prob(90) && !client)
Discipline++
spawn()
SStun = 1
sleep(rand(45,60))
if(src)
SStun = 0
SStun = 1
spawn(rand(45,60))
SStun = 0
Victim = null
anchored = 0
@@ -309,11 +307,9 @@
if(Discipline == 1)
attacked = 0
spawn()
SStun = 1
sleep(rand(55,65))
if(src)
SStun = 0
SStun = 1
spawn(rand(55,65))
SStun = 0
Victim = null
anchored = 0
@@ -439,9 +435,8 @@
if(Discipline == 1)
attacked = 0
spawn()
SStun = 1
sleep(rand(5,20))
SStun = 1
spawn(rand(5,20))
SStun = 0
spawn(0)
@@ -491,9 +486,8 @@
Target = null
anchored = 0
spawn()
SStun = 1
sleep(rand(5,20))
SStun = 1
spawn(rand(5,20))
SStun = 0
spawn(0)
@@ -513,9 +507,8 @@
Discipline++
if(Discipline == 1)
attacked = 0
spawn()
SStun = 1
sleep(rand(5,20))
SStun = 1
spawn(rand(5,20))
SStun = 0
Victim = null