fix handcuffs disappearing when shot by a damaging projectile (#34634)

* fix handcuffs disappearing when shot by a damaging projectile

* whitespace
This commit is contained in:
nervere
2023-07-13 20:46:00 -04:00
committed by GitHub
parent 5bf435cb70
commit b935f06355
4 changed files with 13 additions and 8 deletions

View File

@@ -1262,11 +1262,12 @@ var/default_colour_matrix = list(1,0,0,0,\
#define BACK_LAYER 17 //Back should be above head so that headgear doesn't hides backpack when facing north #define BACK_LAYER 17 //Back should be above head so that headgear doesn't hides backpack when facing north
#define ID_LAYER 18 //IDs should be visible above suits and backpacks #define ID_LAYER 18 //IDs should be visible above suits and backpacks
#define HANDCUFF_LAYER 19 #define HANDCUFF_LAYER 19
#define LEGCUFF_LAYER 20 #define MUTUALCUFF_LAYER 20
#define HAND_LAYER 21 #define LEGCUFF_LAYER 21
#define TAIL_LAYER 22 //bs12 specific. this hack is probably gonna come back to haunt me #define HAND_LAYER 22
#define TARGETED_LAYER 23 //BS12: Layer for the target overlay from weapon targeting system #define TAIL_LAYER 23 //bs12 specific. this hack is probably gonna come back to haunt me
#define TOTAL_LAYERS 23 #define TARGETED_LAYER 24 //BS12: Layer for the target overlay from weapon targeting system
#define TOTAL_LAYERS 24
////////////////////////////////// //////////////////////////////////
//Snake stuff so leaderboard can see it too //Snake stuff so leaderboard can see it too

View File

@@ -182,6 +182,7 @@
obj_overlays[FACEMASK_LAYER] = new /obj/abstract/Overlays/facemask_layer obj_overlays[FACEMASK_LAYER] = new /obj/abstract/Overlays/facemask_layer
obj_overlays[HEAD_LAYER] = new /obj/abstract/Overlays/head_layer obj_overlays[HEAD_LAYER] = new /obj/abstract/Overlays/head_layer
obj_overlays[HANDCUFF_LAYER] = new /obj/abstract/Overlays/handcuff_layer obj_overlays[HANDCUFF_LAYER] = new /obj/abstract/Overlays/handcuff_layer
obj_overlays[MUTUALCUFF_LAYER] = new /obj/abstract/Overlays/mutualcuff_layer
obj_overlays[LEGCUFF_LAYER] = new /obj/abstract/Overlays/legcuff_layer obj_overlays[LEGCUFF_LAYER] = new /obj/abstract/Overlays/legcuff_layer
//obj_overlays[HAND_LAYER] = new /obj/abstract/Overlays/hand_layer //obj_overlays[HAND_LAYER] = new /obj/abstract/Overlays/hand_layer
obj_overlays[TAIL_LAYER] = new /obj/abstract/Overlays/tail_layer obj_overlays[TAIL_LAYER] = new /obj/abstract/Overlays/tail_layer

View File

@@ -1302,15 +1302,15 @@ var/global/list/damage_icon_parts = list()
/mob/living/carbon/human/update_inv_mutual_handcuffed(var/update_icons = TRUE) /mob/living/carbon/human/update_inv_mutual_handcuffed(var/update_icons = TRUE)
if(monkeyizing) if(monkeyizing)
return return
overlays -= obj_overlays[HANDCUFF_LAYER] overlays -= obj_overlays[MUTUALCUFF_LAYER]
if (mutual_handcuffs && mutual_handcuffs.is_visible()) if (mutual_handcuffs && mutual_handcuffs.is_visible())
stop_pulling() //TODO: should be handled elsewhere stop_pulling() //TODO: should be handled elsewhere
var/obj/abstract/Overlays/O = obj_overlays[HANDCUFF_LAYER] var/obj/abstract/Overlays/O = obj_overlays[MUTUALCUFF_LAYER]
O.icon = 'icons/obj/cuffs.dmi' O.icon = 'icons/obj/cuffs.dmi'
O.icon_state = "singlecuff1"//TODO: procedurally generated single-cuffs O.icon_state = "singlecuff1"//TODO: procedurally generated single-cuffs
O.pixel_x = species.inventory_offsets["[slot_handcuffed]"]["pixel_x"] * PIXEL_MULTIPLIER O.pixel_x = species.inventory_offsets["[slot_handcuffed]"]["pixel_x"] * PIXEL_MULTIPLIER
O.pixel_y = species.inventory_offsets["[slot_handcuffed]"]["pixel_y"] * PIXEL_MULTIPLIER O.pixel_y = species.inventory_offsets["[slot_handcuffed]"]["pixel_y"] * PIXEL_MULTIPLIER
obj_to_plane_overlay(O,HANDCUFF_LAYER) obj_to_plane_overlay(O,MUTUALCUFF_LAYER)
if(update_icons) if(update_icons)
update_icons() update_icons()

View File

@@ -60,6 +60,9 @@
/obj/abstract/Overlays/handcuff_layer /obj/abstract/Overlays/handcuff_layer
layer = FLOAT_LAYER - (TOTAL_LAYERS - HANDCUFF_LAYER) layer = FLOAT_LAYER - (TOTAL_LAYERS - HANDCUFF_LAYER)
/obj/abstract/Overlays/mutualcuff_layer
layer = FLOAT_LAYER - (TOTAL_LAYERS - MUTUALCUFF_LAYER)
/obj/abstract/Overlays/legcuff_layer /obj/abstract/Overlays/legcuff_layer
layer = FLOAT_LAYER - (TOTAL_LAYERS - LEGCUFF_LAYER) layer = FLOAT_LAYER - (TOTAL_LAYERS - LEGCUFF_LAYER)