Surgery Code

Updates the surgery code to match latest Baystation. Includes
modifications to overlays and a new DMI.
This commit is contained in:
skull132
2015-06-01 01:10:38 +03:00
parent 634f9e406c
commit d605dfe9f3
8 changed files with 86 additions and 128 deletions
@@ -108,28 +108,29 @@ Please contact me on #coderbus IRC. ~Carn x
#define MUTANTRACE_LAYER 1
#define MUTATIONS_LAYER 2
#define DAMAGE_LAYER 3
#define UNIFORM_LAYER 4
#define TAIL_LAYER 5 //bs12 specific. this hack is probably gonna come back to haunt me
#define ID_LAYER 6
#define SHOES_LAYER 7
#define GLOVES_LAYER 8
#define SUIT_LAYER 9
#define GLASSES_LAYER 10
#define BELT_LAYER 11 //Possible make this an overlay of somethign required to wear a belt?
#define SUIT_STORE_LAYER 12
#define BACK_LAYER 13
#define HAIR_LAYER 14 //TODO: make part of head layer?
#define EARS_LAYER 15
#define FACEMASK_LAYER 16
#define HEAD_LAYER 17
#define COLLAR_LAYER 18
#define HANDCUFF_LAYER 19
#define LEGCUFF_LAYER 20
#define L_HAND_LAYER 21
#define R_HAND_LAYER 22
#define TARGETED_LAYER 23 //BS12: Layer for the target overlay from weapon targeting system
#define FIRE_LAYER 24 //If you're on fire
#define TOTAL_LAYERS 24
#define SURGERY_LEVEL 4
#define UNIFORM_LAYER 5
#define TAIL_LAYER 6 //bs12 specific. this hack is probably gonna come back to haunt me
#define ID_LAYER 7
#define SHOES_LAYER 8
#define GLOVES_LAYER 9
#define SUIT_LAYER 10
#define GLASSES_LAYER 11
#define BELT_LAYER 12 //Possible make this an overlay of somethign required to wear a belt?
#define SUIT_STORE_LAYER 13
#define BACK_LAYER 14
#define HAIR_LAYER 15 //TODO: make part of head layer?
#define EARS_LAYER 16
#define FACEMASK_LAYER 17
#define HEAD_LAYER 18
#define COLLAR_LAYER 19
#define HANDCUFF_LAYER 20
#define LEGCUFF_LAYER 21
#define L_HAND_LAYER 22
#define R_HAND_LAYER 23
#define TARGETED_LAYER 24 //BS12: Layer for the target overlay from weapon targeting system
#define FIRE_LAYER 25 //If you're on fire
#define TOTAL_LAYERS 25
//////////////////////////////////
/mob/living/carbon/human
@@ -1051,10 +1052,21 @@ proc/get_damage_icon_part(damage_state, body_part)
var/image/face_lying_image = new /image(icon = face_lying)
return face_lying_image
/mob/living/carbon/human/proc/update_surgery(var/update_icons=1)
overlays_standing[SURGERY_LEVEL] = null
var/image/total = new
for(var/datum/organ/external/E in organs)
if(E.open)
var/image/I = image("icon"='icons/mob/surgery.dmi', "icon_state"="[E.name][round(E.open)]", "layer"=-SURGERY_LEVEL)
total.overlays += I
overlays_standing[SURGERY_LEVEL] = total
if(update_icons) update_icons()
//Human Overlays Indexes/////////
#undef MUTANTRACE_LAYER
#undef MUTATIONS_LAYER
#undef DAMAGE_LAYER
#undef SURGERY_LEVEL
#undef UNIFORM_LAYER
#undef TAIL_LAYER
#undef ID_LAYER