mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
Axed couple unused organ flags, made them look a bit nicer with bitmove
This commit is contained in:
@@ -30,18 +30,15 @@
|
|||||||
#define AIR_DAMAGE_MODIFIER 2.025 // More means less damage from hot air scalding lungs, less = more damage. (default 2.025)
|
#define AIR_DAMAGE_MODIFIER 2.025 // More means less damage from hot air scalding lungs, less = more damage. (default 2.025)
|
||||||
|
|
||||||
// Organ defines.
|
// Organ defines.
|
||||||
#define ORGAN_CUT_AWAY 1
|
#define ORGAN_CUT_AWAY 1<<0
|
||||||
#define ORGAN_GAUZED 2
|
#define ORGAN_BLEEDING 1<<1
|
||||||
#define ORGAN_ATTACHABLE 4
|
#define ORGAN_BROKEN 1<<2
|
||||||
#define ORGAN_BLEEDING 8
|
#define ORGAN_DESTROYED 1<<3
|
||||||
#define ORGAN_BROKEN 32
|
#define ORGAN_ROBOT 1<<4
|
||||||
#define ORGAN_DESTROYED 64
|
#define ORGAN_SPLINTED 1<<5
|
||||||
#define ORGAN_ROBOT 128
|
#define ORGAN_DEAD 1<<6
|
||||||
#define ORGAN_SPLINTED 256
|
#define ORGAN_MUTATED 1<<7
|
||||||
#define SALVED 512
|
#define ORGAN_ASSISTED 1<<8
|
||||||
#define ORGAN_DEAD 1024
|
|
||||||
#define ORGAN_MUTATED 2048
|
|
||||||
#define ORGAN_ASSISTED 4096
|
|
||||||
|
|
||||||
#define DROPLIMB_EDGE 0
|
#define DROPLIMB_EDGE 0
|
||||||
#define DROPLIMB_BLUNT 1
|
#define DROPLIMB_BLUNT 1
|
||||||
|
|||||||
@@ -217,7 +217,6 @@ var/list/organ_cache = list()
|
|||||||
src.status &= ~ORGAN_BLEEDING
|
src.status &= ~ORGAN_BLEEDING
|
||||||
src.status &= ~ORGAN_SPLINTED
|
src.status &= ~ORGAN_SPLINTED
|
||||||
src.status &= ~ORGAN_CUT_AWAY
|
src.status &= ~ORGAN_CUT_AWAY
|
||||||
src.status &= ~ORGAN_ATTACHABLE
|
|
||||||
src.status &= ~ORGAN_DESTROYED
|
src.status &= ~ORGAN_DESTROYED
|
||||||
src.status |= ORGAN_ROBOT
|
src.status |= ORGAN_ROBOT
|
||||||
src.status |= ORGAN_ASSISTED
|
src.status |= ORGAN_ASSISTED
|
||||||
|
|||||||
@@ -392,7 +392,7 @@ This function completely restores a damaged organ to perfect condition.
|
|||||||
|
|
||||||
//Determines if we even need to process this organ.
|
//Determines if we even need to process this organ.
|
||||||
/obj/item/organ/external/proc/need_process()
|
/obj/item/organ/external/proc/need_process()
|
||||||
if(status & (ORGAN_CUT_AWAY|ORGAN_GAUZED|ORGAN_BLEEDING|ORGAN_BROKEN|ORGAN_DESTROYED|ORGAN_SPLINTED|ORGAN_DEAD|ORGAN_MUTATED))
|
if(status & (ORGAN_CUT_AWAY|ORGAN_BLEEDING|ORGAN_BROKEN|ORGAN_DESTROYED|ORGAN_SPLINTED|ORGAN_DEAD|ORGAN_MUTATED))
|
||||||
return 1
|
return 1
|
||||||
if(brute_dam || burn_dam)
|
if(brute_dam || burn_dam)
|
||||||
return 1
|
return 1
|
||||||
@@ -613,7 +613,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
|||||||
//things tend to bleed if they are CUT OPEN
|
//things tend to bleed if they are CUT OPEN
|
||||||
if (open && !clamped && (H && !(H.species.flags & NO_BLOOD)))
|
if (open && !clamped && (H && !(H.species.flags & NO_BLOOD)))
|
||||||
status |= ORGAN_BLEEDING
|
status |= ORGAN_BLEEDING
|
||||||
|
|
||||||
//Bone fractures
|
//Bone fractures
|
||||||
if(config.bones_can_break && brute_dam > min_broken_damage * config.organ_health_multiplier && !(status & ORGAN_ROBOT))
|
if(config.bones_can_break && brute_dam > min_broken_damage * config.organ_health_multiplier && !(status & ORGAN_ROBOT))
|
||||||
src.fracture()
|
src.fracture()
|
||||||
@@ -908,7 +908,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
|||||||
|
|
||||||
/obj/item/organ/external/proc/is_usable()
|
/obj/item/organ/external/proc/is_usable()
|
||||||
if((status & ORGAN_ROBOT) && get_damage() >= max_damage) //robot limbs just become inoperable at max damage
|
if((status & ORGAN_ROBOT) && get_damage() >= max_damage) //robot limbs just become inoperable at max damage
|
||||||
return
|
return
|
||||||
return !is_dislocated() && !(status & (ORGAN_DESTROYED|ORGAN_MUTATED|ORGAN_DEAD))
|
return !is_dislocated() && !(status & (ORGAN_DESTROYED|ORGAN_MUTATED|ORGAN_DEAD))
|
||||||
|
|
||||||
/obj/item/organ/external/proc/is_malfunctioning()
|
/obj/item/organ/external/proc/is_malfunctioning()
|
||||||
|
|||||||
Reference in New Issue
Block a user