mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-17 10:05:27 +01:00
more TG prefs (#18038)
* makes it a TG pref * Update emote_vr.dm * shadekin removal fix fixes bug where shadekin elements did not disappear upon removal of the component also makes retreat round persistant * nutrition toggles * gives it a subsection * Update ShadekinConfig.tsx * shadekin ability stuff no memory leaks * Update ShadekinConfig.tsx
This commit is contained in:
@@ -211,3 +211,18 @@
|
||||
|
||||
/datum/preference/numeric/human/ears_alpha/create_default_value()
|
||||
return 255 //no randomization here.
|
||||
|
||||
///Tail style.
|
||||
/datum/preference/numeric/human/tail_layering
|
||||
category = PREFERENCE_CATEGORY_MANUALLY_RENDERED
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "tail_layering"
|
||||
can_randomize = FALSE
|
||||
minimum = TAIL_UPPER_LAYER
|
||||
maximum = TAIL_UPPER_LAYER_HIGH
|
||||
|
||||
/datum/preference/numeric/human/tail_layering/create_default_value()
|
||||
return TAIL_UPPER_LAYER
|
||||
|
||||
/datum/preference/numeric/human/tail_layering/apply_to_human(mob/living/carbon/human/target, value)
|
||||
target.tail_layering = value
|
||||
|
||||
@@ -59,3 +59,25 @@
|
||||
var/datum/component/shadekin/our_SK = target.get_shadekin_component()
|
||||
if(our_SK)
|
||||
our_SK.flicker_distance = value
|
||||
|
||||
/datum/preference/toggle/living/dark_retreat_toggle
|
||||
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
|
||||
savefile_key = "DARK_RETREAT_TOGGLE"
|
||||
default_value = TRUE
|
||||
savefile_identifier = PREFERENCE_PLAYER
|
||||
|
||||
/datum/preference/toggle/living/dark_retreat_toggle/apply_to_living(mob/living/target, value)
|
||||
var/datum/component/shadekin/our_SK = target.get_shadekin_component()
|
||||
if(our_SK)
|
||||
our_SK.no_retreat = value
|
||||
|
||||
/datum/preference/toggle/living/shadekin_nutrition_conversion
|
||||
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
|
||||
savefile_key = "SHADEKIN_NUTRITION_CONVERSION"
|
||||
default_value = FALSE
|
||||
savefile_identifier = PREFERENCE_PLAYER
|
||||
|
||||
/datum/preference/toggle/living/shadekin_nutrition_conversion/apply_to_living(mob/living/target, value)
|
||||
var/datum/component/shadekin/our_SK = target.get_shadekin_component()
|
||||
if(our_SK)
|
||||
our_SK.nutrition_energy_conversion = value
|
||||
|
||||
@@ -49,18 +49,21 @@
|
||||
/mob/living/carbon/human/verb/switch_tail_layer()
|
||||
set name = "Switch tail layer"
|
||||
set category = "IC.Game"
|
||||
set desc = "Switch tail layer on top."
|
||||
set desc = "Switch tail layer to show below/above/between clothing or other things such as wings!."
|
||||
|
||||
var/input = tgui_input_list(src, "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
|
||||
tail_layering = input
|
||||
write_preference_directly(/datum/preference/numeric/human/tail_layering, TAIL_UPPER_LAYER_HIGH)
|
||||
if(SWITCH_TAIL_LAYER_STANDARD)
|
||||
tail_alt = TAIL_UPPER_LAYER
|
||||
tail_layering = input
|
||||
write_preference_directly(/datum/preference/numeric/human/tail_layering, TAIL_UPPER_LAYER)
|
||||
if(SWITCH_TAIL_LAYER_LOWER)
|
||||
tail_alt = TAIL_UPPER_LAYER_LOW
|
||||
tail_layering = input
|
||||
write_preference_directly(/datum/preference/numeric/human/tail_layering, TAIL_UPPER_LAYER_LOW)
|
||||
|
||||
update_tail_showing()
|
||||
|
||||
|
||||
@@ -11,6 +11,6 @@
|
||||
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
|
||||
tail_layering = TAIL_UPPER_LAYER // not a toggle for humans but a pointer for what layer the tail should be when facing North/East/West
|
||||
|
||||
var/list/body_writing // assoc list by BP_ key
|
||||
|
||||
@@ -106,13 +106,13 @@
|
||||
/datum/species/shadekin/handle_death(var/mob/living/carbon/human/H)
|
||||
var/special_handling = FALSE //varswitch for downstream
|
||||
H.clear_dark_maws() //clear dark maws on death or similar
|
||||
if(!special_handling)
|
||||
var/datum/component/shadekin/SK = H.get_shadekin_component()
|
||||
if(!special_handling || (SK && SK.no_retreat))
|
||||
spawn(1)
|
||||
for(var/obj/item/W in H)
|
||||
H.drop_from_inventory(W)
|
||||
qdel(H)
|
||||
else
|
||||
var/datum/component/shadekin/SK = H.get_shadekin_component()
|
||||
if(!SK)
|
||||
return
|
||||
if(SK.respite_activating)
|
||||
|
||||
@@ -46,3 +46,17 @@
|
||||
ability_objects.Add(A)
|
||||
if(my_mob && my_mob.client) //If a shadekin is made (mannequins) prior to initialize being finished, my_mob won't be assigned and this will runtime. Mannequins need massive fixing because they shouldn't be getting all these special huds and overlays when they don't need them.
|
||||
toggle_open(2) //forces the icons to refresh on screen
|
||||
|
||||
|
||||
/obj/screen/movable/ability_master/proc/remove_shadekin_ability(var/object_given, var/verb_given, var/arguments)
|
||||
if(!object_given)
|
||||
message_admins("ERROR: remove_shadekin_ability() was not given an object in its arguments.")
|
||||
if(!verb_given)
|
||||
message_admins("ERROR: remove_shadekin_ability() was not given a verb/proc in its arguments.")
|
||||
var/obj/screen/ability/verb_based/shadekin/A = get_ability_by_proc_ref(verb_given)
|
||||
if(!A)
|
||||
return // We don't have the ability, so ignore it.
|
||||
ability_objects.Remove(A)
|
||||
qdel(A)
|
||||
if(my_mob && my_mob.client) //If a shadekin is made (mannequins) prior to initialize being finished, my_mob won't be assigned and this will runtime. Mannequins need massive fixing because they shouldn't be getting all these special huds and overlays when they don't need them.
|
||||
toggle_open(2) //forces the icons to refresh on screen
|
||||
|
||||
@@ -864,7 +864,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_LOWER_LAYER] || overlays_standing[tail_alt]
|
||||
var/tail_is_rendered = overlays_standing[TAIL_LOWER_LAYER] || overlays_standing[tail_layering]
|
||||
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.
|
||||
@@ -1005,7 +1005,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) //see UpdateDamageIcon()
|
||||
if(src.tail_style && src.tail_style.clip_mask_state)
|
||||
tail_layer = TAIL_UPPER_LAYER // Use default, let clip mask handle everything
|
||||
if(tail_layer == TAIL_UPPER_LAYER)
|
||||
tail_layer = tail_alt
|
||||
tail_layer = tail_layering
|
||||
|
||||
var/obj/item/organ/external/chest = organs_by_name[BP_TORSO]
|
||||
|
||||
@@ -1052,7 +1052,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) //see UpdateDamageIcon()
|
||||
if(src.tail_style && src.tail_style.clip_mask_state)
|
||||
tail_layer = TAIL_UPPER_LAYER // Use default, let clip mask handle everything
|
||||
if(tail_layer == TAIL_UPPER_LAYER)
|
||||
tail_layer = tail_alt
|
||||
tail_layer = tail_layering
|
||||
var/image/tail_overlay = overlays_standing[tail_layer]
|
||||
|
||||
remove_layer(TAIL_UPPER_LAYER)
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
var/allow_self_surgery = FALSE // Used to determine if the mob can perform surgery on itself.
|
||||
|
||||
|
||||
var/tail_alt = 0
|
||||
var/tail_layering = 0
|
||||
var/flying = 0 // Allows flight
|
||||
var/inventory_panel_type = /datum/inventory_panel
|
||||
var/datum/inventory_panel/inventory_panel
|
||||
|
||||
@@ -611,7 +611,7 @@
|
||||
|
||||
var/icon/new_holo = getCompoundIcon(dummy)
|
||||
|
||||
dummy.tail_alt = TRUE
|
||||
dummy.tail_layering = TRUE
|
||||
dummy.set_dir(NORTH)
|
||||
var/icon/new_holo_north = getCompoundIcon(dummy)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user