mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-20 03:26:37 +01:00
change the switch tail layer verb to choose between three layers (#17862)
This commit is contained in:
committed by
GitHub
parent
45618b5e9e
commit
d79a8105e9
@@ -1,3 +1,7 @@
|
||||
#define SWITCH_TAIL_LAYER_UPPER "Upper"
|
||||
#define SWITCH_TAIL_LAYER_STANDARD "Standard"
|
||||
#define SWITCH_TAIL_LAYER_LOWER "Lower"
|
||||
|
||||
/mob/living/carbon/human/verb/toggle_resizing_immunity()
|
||||
set name = "Toggle Resizing Immunity"
|
||||
set desc = "Toggles your ability to resist resizing attempts"
|
||||
@@ -46,7 +50,18 @@
|
||||
set name = "Switch tail layer"
|
||||
set category = "IC.Game"
|
||||
set desc = "Switch tail layer on top."
|
||||
tail_alt = !tail_alt
|
||||
|
||||
var/input = tgui_input_list(usr, "Select a tail layer.", "Set Tail Layer", list(SWITCH_TAIL_LAYER_UPPER, SWITCH_TAIL_LAYER_STANDARD, SWITCH_TAIL_LAYER_LOWER))
|
||||
if(isnull(input))
|
||||
return
|
||||
switch(input)
|
||||
if(SWITCH_TAIL_LAYER_UPPER)
|
||||
tail_alt = TAIL_UPPER_LAYER_HIGH
|
||||
if(SWITCH_TAIL_LAYER_STANDARD)
|
||||
tail_alt = TAIL_UPPER_LAYER
|
||||
if(SWITCH_TAIL_LAYER_LOWER)
|
||||
tail_alt = TAIL_UPPER_LAYER_LOW
|
||||
|
||||
update_tail_showing()
|
||||
|
||||
/mob/living/carbon/human/verb/hide_wings_vr()
|
||||
@@ -84,3 +99,7 @@
|
||||
else
|
||||
message = "hides their tail."
|
||||
visible_message(span_filter_notice("[src] [message]"))
|
||||
|
||||
#undef SWITCH_TAIL_LAYER_UPPER
|
||||
#undef SWITCH_TAIL_LAYER_STANDARD
|
||||
#undef SWITCH_TAIL_LAYER_LOWER
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
var/markings_len = 0 //mostly an arbitrary number
|
||||
var/low_sorting_priority = FALSE
|
||||
|
||||
tail_alt = TAIL_UPPER_LAYER // not a toggle for humans but a pointer for what layer the tail should be when facing North/East/West
|
||||
|
||||
/mob/living/carbon/human/proc/shadekin_get_energy()
|
||||
var/datum/species/shadekin/SK = species
|
||||
|
||||
|
||||
@@ -283,5 +283,5 @@
|
||||
/mob/living/carbon/human/set_dir(var/new_dir)
|
||||
. = ..()
|
||||
if(. && (species.tail || tail_style))
|
||||
update_tail_showing()
|
||||
//update_tail_showing() this is already called by update_inv_wear_suit
|
||||
update_inv_wear_suit()
|
||||
|
||||
@@ -860,7 +860,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) //see UpdateDamageIcon()
|
||||
suit_sprite = INV_SUIT_DEF_ICON
|
||||
|
||||
var/icon/c_mask = null
|
||||
var/tail_is_rendered = (overlays_standing[TAIL_UPPER_LAYER] || overlays_standing[TAIL_UPPER_LAYER_ALT] || overlays_standing[TAIL_LOWER_LAYER])
|
||||
var/tail_is_rendered = overlays_standing[TAIL_LOWER_LAYER] || overlays_standing[tail_alt]
|
||||
var/valid_clip_mask = tail_style?.clip_mask
|
||||
|
||||
if(tail_is_rendered && valid_clip_mask && !(istype(suit) && suit.taurized)) //Clip the lower half of the suit off using the tail's clip mask for taurs since taur bodies aren't hidden.
|
||||
@@ -993,14 +993,15 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) //see UpdateDamageIcon()
|
||||
return
|
||||
|
||||
remove_layer(TAIL_UPPER_LAYER)
|
||||
remove_layer(TAIL_UPPER_LAYER_ALT)
|
||||
remove_layer(TAIL_UPPER_LAYER_HIGH)
|
||||
remove_layer(TAIL_UPPER_LAYER_LOW)
|
||||
remove_layer(TAIL_LOWER_LAYER)
|
||||
|
||||
var/tail_layer = get_tail_layer()
|
||||
if(src.tail_style && src.tail_style.clip_mask_state)
|
||||
tail_layer = TAIL_UPPER_LAYER // Use default, let clip mask handle everything
|
||||
if(tail_alt && tail_layer == TAIL_UPPER_LAYER)
|
||||
tail_layer = TAIL_UPPER_LAYER_ALT
|
||||
if(tail_layer == TAIL_UPPER_LAYER)
|
||||
tail_layer = tail_alt
|
||||
|
||||
var/obj/item/organ/external/chest = organs_by_name[BP_TORSO]
|
||||
|
||||
@@ -1046,12 +1047,13 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) //see UpdateDamageIcon()
|
||||
var/tail_layer = get_tail_layer()
|
||||
if(src.tail_style && src.tail_style.clip_mask_state)
|
||||
tail_layer = TAIL_UPPER_LAYER // Use default, let clip mask handle everything
|
||||
if(tail_alt && tail_layer == TAIL_UPPER_LAYER)
|
||||
tail_layer = TAIL_UPPER_LAYER_ALT
|
||||
if(tail_layer == TAIL_UPPER_LAYER)
|
||||
tail_layer = tail_alt
|
||||
var/image/tail_overlay = overlays_standing[tail_layer]
|
||||
|
||||
remove_layer(TAIL_UPPER_LAYER)
|
||||
remove_layer(TAIL_UPPER_LAYER_ALT)
|
||||
remove_layer(TAIL_UPPER_LAYER_HIGH)
|
||||
remove_layer(TAIL_UPPER_LAYER_LOW)
|
||||
remove_layer(TAIL_LOWER_LAYER)
|
||||
|
||||
if(tail_overlay)
|
||||
|
||||
Reference in New Issue
Block a user