From 07c15065517e0efb73a8654d3d4d25b5ad4fbd8b Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sun, 5 Jan 2014 23:59:39 +1030 Subject: [PATCH] Implemented NO_PAIN and parts of NO_BLOOD, restructured species flags. Conflicts: code/modules/organs/blood.dm --- code/modules/mob/living/carbon/human/life.dm | 7 +++++-- code/modules/organs/blood.dm | 8 ++++---- code/modules/organs/pain.dm | 4 ++-- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 233c8c0a1f0..a7bc4b2815d 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -1328,7 +1328,7 @@ if(2) healths.icon_state = "health7" else //switch(health - halloss) - switch(100 - traumatic_shock) + switch(100 - ((species && species.flags & NO_PAIN) ? 0 : traumatic_shock)) if(100 to INFINITY) healths.icon_state = "health0" if(80 to 100) healths.icon_state = "health1" if(60 to 80) healths.icon_state = "health2" @@ -1505,7 +1505,7 @@ handle_shock() ..() if(status_flags & GODMODE) return 0 //godmode - if(analgesic) return // analgesic avoids all traumatic shock temporarily + if(analgesic || (species && species.flags & NO_PAIN)) return // analgesic avoids all traumatic shock temporarily if(health < 0)// health 0 makes you immediately collapse shock_stage = max(shock_stage, 61) @@ -1552,8 +1552,11 @@ proc/handle_pulse() + if(life_tick % 5) return pulse //update pulse every 5 life ticks (~1 tick/sec, depending on server load) + if(species && species.flags && NO_BLOOD) return PULSE_NONE //No blood, no pulse. + if(stat == DEAD) return PULSE_NONE //that's it, you're dead, nothing can influence your pulse diff --git a/code/modules/organs/blood.dm b/code/modules/organs/blood.dm index 5a32caf98a7..fef885abbee 100644 --- a/code/modules/organs/blood.dm +++ b/code/modules/organs/blood.dm @@ -13,14 +13,14 @@ var/const/BLOOD_VOLUME_SURVIVE = 122 //Initializes blood vessels /mob/living/carbon/human/proc/make_blood() - if (vessel) - return - - if(species && species.flags & NO_BLOOD) + if(vessel) return vessel = new/datum/reagents(600) vessel.my_atom = src + + if(species && species.flags & NO_BLOOD) //We want the var for safety but we can do without the actual blood. + return if(species.bloodflags &BLOOD_SLIME) vessel.add_reagent("water",560) else diff --git a/code/modules/organs/pain.dm b/code/modules/organs/pain.dm index 5ff936d4d1d..eb4c8e0e54f 100644 --- a/code/modules/organs/pain.dm +++ b/code/modules/organs/pain.dm @@ -54,7 +54,7 @@ mob/living/carbon/proc/pain(var/partname, var/amount, var/force, var/burning = 0 mob/living/carbon/human/proc/custom_pain(var/message, var/flash_strength) if(stat >= 1) return - if(species && species.flags & IS_PLANT) return + if(species && species.flags & NO_PAIN) return if(reagents.has_reagent("tramadol")) return @@ -75,7 +75,7 @@ mob/living/carbon/human/proc/custom_pain(var/message, var/flash_strength) mob/living/carbon/human/proc/handle_pain() // not when sleeping - if(species && species.flags & IS_PLANT) return + if(species && species.flags & NO_PAIN) return if(stat >= 2) return if(reagents.has_reagent("tramadol"))