adds ability to set organs as unremovable

This commit is contained in:
Wallemations
2020-09-04 20:44:08 -04:00
parent ae71b992dc
commit f00a2250d6
3 changed files with 4 additions and 2 deletions
+1
View File
@@ -59,6 +59,7 @@
#define ORGAN_VITAL (1<<4) //Currently only the brain
#define ORGAN_EDIBLE (1<<5) //is a snack? :D
#define ORGAN_SYNTHETIC_EMP (1<<6) //Synthetic organ affected by an EMP. Deteriorates over time.
#define ORGAN_UNREMOVABLE (1<<7) //Can't be removed using surgery
/// Integrity defines for clothing (not flags but close enough)
#define CLOTHING_PRISTINE 0 // We have no damage on the clothing
+2 -2
View File
@@ -119,8 +119,8 @@
I = organs[I]
if(!I)
return -1
if(istype(I, /obj/item/organ/tongue/tied)) //Since I couldn't find any code for unremovable organs
to_chat(user, "<span class='warning'>Only Alexander the Great would be able to untie that knot!</span>")
if(I.organ_flags & ORGAN_UNREMOVABLE)
to_chat(user, "<span class='warning'>[I] is too well connected to take out!</span>")
return -1
display_results(user, target, "<span class='notice'>You begin to extract [I] from [target]'s [parse_zone(target_zone)]...</span>",
"<span class='notice'>[user] begins to extract [I] from [target]'s [parse_zone(target_zone)].</span>",
+1
View File
@@ -326,6 +326,7 @@
say_mod = "signs"
icon_state = "tonguetied"
modifies_speech = TRUE
organ_flags = ORGAN_UNREMOVABLE
/obj/item/organ/tongue/tied/Insert(mob/living/carbon/M)
. = ..()