mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
Surgery now shows up on mob, in all gory glory.
This commit is contained in:
@@ -107,28 +107,29 @@ Please contact me on #coderbus IRC. ~Carn x
|
|||||||
//Human Overlays Indexes/////////
|
//Human Overlays Indexes/////////
|
||||||
#define MUTATIONS_LAYER 1
|
#define MUTATIONS_LAYER 1
|
||||||
#define DAMAGE_LAYER 2
|
#define DAMAGE_LAYER 2
|
||||||
#define UNIFORM_LAYER 3
|
#define SURGERY_LEVEL 3 //bs12 specific.
|
||||||
#define TAIL_LAYER 4 //bs12 specific. this hack is probably gonna come back to haunt me
|
#define UNIFORM_LAYER 4
|
||||||
#define ID_LAYER 5
|
#define TAIL_LAYER 5 //bs12 specific. this hack is probably gonna come back to haunt me
|
||||||
#define SHOES_LAYER 6
|
#define ID_LAYER 6
|
||||||
#define GLOVES_LAYER 7
|
#define SHOES_LAYER 7
|
||||||
#define SUIT_LAYER 8
|
#define GLOVES_LAYER 8
|
||||||
#define GLASSES_LAYER 9
|
#define SUIT_LAYER 9
|
||||||
#define BELT_LAYER 10 //Possible make this an overlay of somethign required to wear a belt?
|
#define GLASSES_LAYER 10
|
||||||
#define SUIT_STORE_LAYER 11
|
#define BELT_LAYER 11 //Possible make this an overlay of somethign required to wear a belt?
|
||||||
#define BACK_LAYER 12
|
#define SUIT_STORE_LAYER 12
|
||||||
#define HAIR_LAYER 13 //TODO: make part of head layer?
|
#define BACK_LAYER 13
|
||||||
#define EARS_LAYER 14
|
#define HAIR_LAYER 14 //TODO: make part of head layer?
|
||||||
#define FACEMASK_LAYER 15
|
#define EARS_LAYER 15
|
||||||
#define HEAD_LAYER 16
|
#define FACEMASK_LAYER 16
|
||||||
#define COLLAR_LAYER 17
|
#define HEAD_LAYER 17
|
||||||
#define HANDCUFF_LAYER 18
|
#define COLLAR_LAYER 18
|
||||||
#define LEGCUFF_LAYER 19
|
#define HANDCUFF_LAYER 19
|
||||||
#define L_HAND_LAYER 20
|
#define LEGCUFF_LAYER 20
|
||||||
#define R_HAND_LAYER 21
|
#define L_HAND_LAYER 21
|
||||||
#define FIRE_LAYER 22 //If you're on fire
|
#define R_HAND_LAYER 22
|
||||||
#define TARGETED_LAYER 23 //BS12: Layer for the target overlay from weapon targeting system
|
#define FIRE_LAYER 23 //If you're on fire
|
||||||
#define TOTAL_LAYERS 23
|
#define TARGETED_LAYER 24 //BS12: Layer for the target overlay from weapon targeting system
|
||||||
|
#define TOTAL_LAYERS 24
|
||||||
//////////////////////////////////
|
//////////////////////////////////
|
||||||
|
|
||||||
/mob/living/carbon/human
|
/mob/living/carbon/human
|
||||||
@@ -509,6 +510,7 @@ proc/get_damage_icon_part(damage_state, body_part)
|
|||||||
update_inv_legcuffed(0)
|
update_inv_legcuffed(0)
|
||||||
update_inv_pockets(0)
|
update_inv_pockets(0)
|
||||||
update_fire(0)
|
update_fire(0)
|
||||||
|
update_surgery(0)
|
||||||
UpdateDamageIcon()
|
UpdateDamageIcon()
|
||||||
update_icons()
|
update_icons()
|
||||||
//Hud Stuff
|
//Hud Stuff
|
||||||
@@ -929,6 +931,16 @@ proc/get_damage_icon_part(damage_state, body_part)
|
|||||||
|
|
||||||
if(update_icons) update_icons()
|
if(update_icons) update_icons()
|
||||||
|
|
||||||
|
/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()
|
||||||
|
|
||||||
// Used mostly for creating head items
|
// Used mostly for creating head items
|
||||||
/mob/living/carbon/human/proc/generate_head_icon()
|
/mob/living/carbon/human/proc/generate_head_icon()
|
||||||
//gender no longer matters for the mouth, although there should probably be seperate base head icons.
|
//gender no longer matters for the mouth, although there should probably be seperate base head icons.
|
||||||
@@ -967,6 +979,7 @@ proc/get_damage_icon_part(damage_state, body_part)
|
|||||||
//Human Overlays Indexes/////////
|
//Human Overlays Indexes/////////
|
||||||
#undef MUTATIONS_LAYER
|
#undef MUTATIONS_LAYER
|
||||||
#undef DAMAGE_LAYER
|
#undef DAMAGE_LAYER
|
||||||
|
#undef SURGERY_LEVEL
|
||||||
#undef UNIFORM_LAYER
|
#undef UNIFORM_LAYER
|
||||||
#undef TAIL_LAYER
|
#undef TAIL_LAYER
|
||||||
#undef ID_LAYER
|
#undef ID_LAYER
|
||||||
|
|||||||
@@ -103,6 +103,9 @@ proc/do_surgery(mob/living/carbon/M, mob/living/user, obj/item/tool)
|
|||||||
else // This failing silently was a pain.
|
else // This failing silently was a pain.
|
||||||
user << "\red You must remain close to your patient to conduct surgery."
|
user << "\red You must remain close to your patient to conduct surgery."
|
||||||
M.op_stage.in_progress = 0 // Clear the in-progress flag.
|
M.op_stage.in_progress = 0 // Clear the in-progress flag.
|
||||||
|
if (ishuman(M))
|
||||||
|
var/mob/living/carbon/human/H = M
|
||||||
|
H.update_surgery()
|
||||||
return 1 //don't want to do weapony things after surgery
|
return 1 //don't want to do weapony things after surgery
|
||||||
|
|
||||||
if (user.a_intent == "help")
|
if (user.a_intent == "help")
|
||||||
|
|||||||
BIN
icons/mob/surgery.dmi
Normal file
BIN
icons/mob/surgery.dmi
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
Reference in New Issue
Block a user