mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
Add Undergarment TF mode to vore sprites.
This commit is contained in:
@@ -12,3 +12,4 @@
|
|||||||
#define DM_FLAG_VORESPRITE_BELLY 0x1
|
#define DM_FLAG_VORESPRITE_BELLY 0x1
|
||||||
#define DM_FLAG_VORESPRITE_TAIL 0x2
|
#define DM_FLAG_VORESPRITE_TAIL 0x2
|
||||||
#define DM_FLAG_VORESPRITE_MARKING 0x4
|
#define DM_FLAG_VORESPRITE_MARKING 0x4
|
||||||
|
#define DM_FLAG_VORESPRITE_ARTICLE 0x8
|
||||||
|
|||||||
@@ -77,7 +77,8 @@
|
|||||||
var/tmp/static/list/vore_sprite_flag_list= list(
|
var/tmp/static/list/vore_sprite_flag_list= list(
|
||||||
"Normal belly sprite" = DM_FLAG_VORESPRITE_BELLY,
|
"Normal belly sprite" = DM_FLAG_VORESPRITE_BELLY,
|
||||||
//"Tail adjustment" = DM_FLAG_VORESPRITE_TAIL,
|
//"Tail adjustment" = DM_FLAG_VORESPRITE_TAIL,
|
||||||
//"Marking addition" = DM_FLAG_VORESPRITE_MARKING
|
//"Marking addition" = DM_FLAG_VORESPRITE_MARKING,
|
||||||
|
"Undergarment addition" = DM_FLAG_VORESPRITE_ARTICLE,
|
||||||
)
|
)
|
||||||
|
|
||||||
var/affects_vore_sprites = FALSE
|
var/affects_vore_sprites = FALSE
|
||||||
@@ -91,6 +92,9 @@
|
|||||||
var/resist_triggers_animation = TRUE
|
var/resist_triggers_animation = TRUE
|
||||||
var/size_factor_for_sprite = 1
|
var/size_factor_for_sprite = 1
|
||||||
var/belly_sprite_to_affect = "stomach"
|
var/belly_sprite_to_affect = "stomach"
|
||||||
|
var/undergarment_chosen = "Underwear, bottom"
|
||||||
|
var/undergarment_if_none
|
||||||
|
var/undergarment_color = COLOR_GRAY
|
||||||
var/datum/sprite_accessory/tail/tail_to_change_to = FALSE
|
var/datum/sprite_accessory/tail/tail_to_change_to = FALSE
|
||||||
var/tail_colouration = FALSE
|
var/tail_colouration = FALSE
|
||||||
var/tail_extra_overlay = FALSE
|
var/tail_extra_overlay = FALSE
|
||||||
|
|||||||
@@ -275,6 +275,9 @@
|
|||||||
"resist_triggers_animation",
|
"resist_triggers_animation",
|
||||||
"size_factor_for_sprite",
|
"size_factor_for_sprite",
|
||||||
"belly_sprite_to_affect",
|
"belly_sprite_to_affect",
|
||||||
|
"undergarment_chosen",
|
||||||
|
"undergarment_if_none",
|
||||||
|
"undergarment_color",
|
||||||
"autotransferchance",
|
"autotransferchance",
|
||||||
"autotransferwait",
|
"autotransferwait",
|
||||||
"autotransferlocation",
|
"autotransferlocation",
|
||||||
@@ -1425,6 +1428,9 @@
|
|||||||
dupe.resist_triggers_animation = resist_triggers_animation
|
dupe.resist_triggers_animation = resist_triggers_animation
|
||||||
dupe.size_factor_for_sprite = size_factor_for_sprite
|
dupe.size_factor_for_sprite = size_factor_for_sprite
|
||||||
dupe.belly_sprite_to_affect = belly_sprite_to_affect
|
dupe.belly_sprite_to_affect = belly_sprite_to_affect
|
||||||
|
dupe.undergarment_chosen = undergarment_chosen
|
||||||
|
dupe.undergarment_if_none = undergarment_if_none
|
||||||
|
dupe.undergarment_color = undergarment_color
|
||||||
dupe.autotransferchance = autotransferchance
|
dupe.autotransferchance = autotransferchance
|
||||||
dupe.autotransferwait = autotransferwait
|
dupe.autotransferwait = autotransferwait
|
||||||
dupe.autotransferlocation = autotransferlocation
|
dupe.autotransferlocation = autotransferlocation
|
||||||
|
|||||||
@@ -30,7 +30,14 @@
|
|||||||
for(var/belly_class in vore_icon_bellies)
|
for(var/belly_class in vore_icon_bellies)
|
||||||
new_fullness[belly_class] = 0
|
new_fullness[belly_class] = 0
|
||||||
for(var/obj/belly/B as anything in vore_organs)
|
for(var/obj/belly/B as anything in vore_organs)
|
||||||
|
if(DM_FLAG_VORESPRITE_BELLY & B.vore_sprite_flags)
|
||||||
new_fullness[B.belly_sprite_to_affect] += B.GetFullnessFromBelly()
|
new_fullness[B.belly_sprite_to_affect] += B.GetFullnessFromBelly()
|
||||||
|
if(istype(src, /mob/living/carbon/human) && DM_FLAG_VORESPRITE_ARTICLE & B.vore_sprite_flags)
|
||||||
|
if(!new_fullness[B.undergarment_chosen])
|
||||||
|
new_fullness[B.undergarment_chosen] = 1
|
||||||
|
new_fullness[B.undergarment_chosen] += B.GetFullnessFromBelly()
|
||||||
|
new_fullness[B.undergarment_chosen + "-ifnone"] = B.undergarment_if_none
|
||||||
|
new_fullness[B.undergarment_chosen + "-color"] = B.undergarment_color
|
||||||
for(var/belly_class in vore_icon_bellies)
|
for(var/belly_class in vore_icon_bellies)
|
||||||
new_fullness[belly_class] /= size_multiplier //Divided by pred's size so a macro mob won't get macro belly from a regular prey.
|
new_fullness[belly_class] /= size_multiplier //Divided by pred's size so a macro mob won't get macro belly from a regular prey.
|
||||||
new_fullness[belly_class] = round(new_fullness[belly_class], 1) // Because intervals of 0.25 are going to make sprite artists cry.
|
new_fullness[belly_class] = round(new_fullness[belly_class], 1) // Because intervals of 0.25 are going to make sprite artists cry.
|
||||||
@@ -39,6 +46,7 @@
|
|||||||
if(vore_fullness < 0)
|
if(vore_fullness < 0)
|
||||||
vore_fullness = 0
|
vore_fullness = 0
|
||||||
vore_fullness = min(vore_capacity, vore_fullness)
|
vore_fullness = min(vore_capacity, vore_fullness)
|
||||||
|
return new_fullness
|
||||||
|
|
||||||
|
|
||||||
/mob/living/proc/check_vorefootstep(var/m_intent, var/turf/T)
|
/mob/living/proc/check_vorefootstep(var/m_intent, var/turf/T)
|
||||||
|
|||||||
@@ -218,6 +218,9 @@
|
|||||||
"resist_animation" = selected.resist_triggers_animation,
|
"resist_animation" = selected.resist_triggers_animation,
|
||||||
"voresprite_size_factor" = selected.size_factor_for_sprite,
|
"voresprite_size_factor" = selected.size_factor_for_sprite,
|
||||||
"belly_sprite_to_affect" = selected.belly_sprite_to_affect,
|
"belly_sprite_to_affect" = selected.belly_sprite_to_affect,
|
||||||
|
"undergarment_chosen" = selected.undergarment_chosen,
|
||||||
|
"undergarment_if_none" = selected.undergarment_if_none || "None",
|
||||||
|
"undergarment_color" = selected.undergarment_color,
|
||||||
"belly_sprite_option_shown" = LAZYLEN(host.vore_icon_bellies) > 1 ? TRUE : FALSE,
|
"belly_sprite_option_shown" = LAZYLEN(host.vore_icon_bellies) > 1 ? TRUE : FALSE,
|
||||||
"tail_option_shown" = istype(host, /mob/living/carbon/human),
|
"tail_option_shown" = istype(host, /mob/living/carbon/human),
|
||||||
"tail_to_change_to" = selected.tail_to_change_to,
|
"tail_to_change_to" = selected.tail_to_change_to,
|
||||||
@@ -1805,6 +1808,29 @@
|
|||||||
host.vore_selected.size_factor_for_sprite = CLAMP(size_factor_input, 0.1, 3)
|
host.vore_selected.size_factor_for_sprite = CLAMP(size_factor_input, 0.1, 3)
|
||||||
host.update_fullness()
|
host.update_fullness()
|
||||||
. = TRUE
|
. = TRUE
|
||||||
|
if("b_undergarment_choice") //CHOMP Addition
|
||||||
|
var/datum/category_group/underwear/undergarment_choice = tgui_input_list(usr, "Which undergarment do you want to enable when your [lowertext(host.vore_selected.name)] is filled?","Select Undergarment Class", global_underwear.categories)
|
||||||
|
if(!undergarment_choice) //They cancelled, no changes
|
||||||
|
return FALSE
|
||||||
|
else
|
||||||
|
host.vore_selected.undergarment_chosen = undergarment_choice.name
|
||||||
|
host.update_fullness()
|
||||||
|
. = TRUE
|
||||||
|
if("b_undergarment_if_none") //CHOMP Addition
|
||||||
|
var/datum/category_group/underwear/UWC = global_underwear.categories_by_name[host.vore_selected.undergarment_chosen]
|
||||||
|
var/datum/category_item/underwear/selected_underwear = tgui_input_list(usr, "If no undergarment is equipped, which undergarment style do you want to use?","Select Underwear Style",UWC.items,host.vore_selected.undergarment_if_none)
|
||||||
|
if(!selected_underwear) //They cancelled, no changes
|
||||||
|
return FALSE
|
||||||
|
else
|
||||||
|
host.vore_selected.undergarment_if_none = selected_underwear
|
||||||
|
host.update_fullness()
|
||||||
|
host.updateVRPanel()
|
||||||
|
if("b_undergarment_color") //CHOMP Addition
|
||||||
|
var/newcolor = input(usr, "Choose a color.", "", host.vore_selected.undergarment_color) as color|null
|
||||||
|
if(newcolor)
|
||||||
|
host.vore_selected.undergarment_color = newcolor
|
||||||
|
host.update_fullness()
|
||||||
|
. = TRUE
|
||||||
if("b_tail_to_change_to") //CHOMP Addition
|
if("b_tail_to_change_to") //CHOMP Addition
|
||||||
var/tail_choice = tgui_input_list(usr, "Which tail sprite do you want to use when your [lowertext(host.vore_selected.name)] is filled?","Select Sprite", global.tail_styles_list)
|
var/tail_choice = tgui_input_list(usr, "Which tail sprite do you want to use when your [lowertext(host.vore_selected.name)] is filled?","Select Sprite", global.tail_styles_list)
|
||||||
if(!tail_choice) //They cancelled, no changes
|
if(!tail_choice) //They cancelled, no changes
|
||||||
|
|||||||
@@ -3,7 +3,24 @@
|
|||||||
var/previous_taur_fullness = vore_fullness_ex["taur belly"]
|
var/previous_taur_fullness = vore_fullness_ex["taur belly"]
|
||||||
//update_vore_tail_sprite()
|
//update_vore_tail_sprite()
|
||||||
//update_vore_belly_sprite()
|
//update_vore_belly_sprite()
|
||||||
. = ..()
|
var/list/new_fullness = ..()
|
||||||
|
. = new_fullness
|
||||||
|
for(var/datum/category_group/underwear/undergarment_class in global_underwear.categories)
|
||||||
|
if(new_fullness[undergarment_class.name] == 0)
|
||||||
|
continue
|
||||||
|
new_fullness[undergarment_class.name] = -1 * round(-1 * new_fullness[undergarment_class.name]) // Doing a ceiling the only way BYOND knows how I guess
|
||||||
|
new_fullness[undergarment_class.name] = (min(2, new_fullness[undergarment_class.name]) - 2) * -1 //Complicated stuff to get it correctly aligned with the expected TRUE/FALSE
|
||||||
|
var/datum/category_item/underwear/UWI = all_underwear[undergarment_class.name]
|
||||||
|
if(!UWI || UWI.name == "None")
|
||||||
|
//Welllll okay then. If the former then something went wrong, if None was selected then...
|
||||||
|
if(istype(undergarment_class.items_by_name[new_fullness[undergarment_class.name + "-ifnone"]], /datum/category_item/underwear))
|
||||||
|
UWI = undergarment_class.items_by_name[new_fullness[undergarment_class.name + "-ifnone"]]
|
||||||
|
all_underwear[undergarment_class.name] = UWI
|
||||||
|
if(UWI && UWI.has_color && new_fullness[undergarment_class.name + "-color"])
|
||||||
|
all_underwear_metadata[undergarment_class.name]["[gear_tweak_free_color_choice]"] = new_fullness[undergarment_class.name + "-color"]
|
||||||
|
if(UWI && UWI.name != "None" && hide_underwear[undergarment_class.name] != new_fullness[undergarment_class.name])
|
||||||
|
hide_underwear[undergarment_class.name] = new_fullness[undergarment_class.name]
|
||||||
|
update_underwear(1)
|
||||||
if(vore_fullness_ex["stomach"] != previous_stomach_fullness)
|
if(vore_fullness_ex["stomach"] != previous_stomach_fullness)
|
||||||
update_vore_belly_sprite()
|
update_vore_belly_sprite()
|
||||||
if(vore_fullness_ex["taur belly"] != previous_taur_fullness)
|
if(vore_fullness_ex["taur belly"] != previous_taur_fullness)
|
||||||
|
|||||||
@@ -192,6 +192,9 @@
|
|||||||
belly_data["resist_triggers_animation"] = B.resist_triggers_animation
|
belly_data["resist_triggers_animation"] = B.resist_triggers_animation
|
||||||
belly_data["size_factor_for_sprite"] = B.size_factor_for_sprite
|
belly_data["size_factor_for_sprite"] = B.size_factor_for_sprite
|
||||||
belly_data["belly_sprite_to_affect"] = B.belly_sprite_to_affect
|
belly_data["belly_sprite_to_affect"] = B.belly_sprite_to_affect
|
||||||
|
belly_data["undergarment_chosen"] = B.undergarment_chosen
|
||||||
|
belly_data["undergarment_if_none"] = B.undergarment_if_none
|
||||||
|
belly_data["undergarment_color"] = B.undergarment_color
|
||||||
|
|
||||||
// Visuals (Belly Fullscreens Preview and Coloring)
|
// Visuals (Belly Fullscreens Preview and Coloring)
|
||||||
belly_data["belly_fullscreen_color"] = B.belly_fullscreen_color
|
belly_data["belly_fullscreen_color"] = B.belly_fullscreen_color
|
||||||
|
|||||||
@@ -815,6 +815,9 @@ const VoreSelectedBellyVisuals = (props, context) => {
|
|||||||
voresprite_size_factor,
|
voresprite_size_factor,
|
||||||
belly_sprite_option_shown,
|
belly_sprite_option_shown,
|
||||||
belly_sprite_to_affect,
|
belly_sprite_to_affect,
|
||||||
|
undergarment_chosen,
|
||||||
|
undergarment_if_none,
|
||||||
|
undergarment_color,
|
||||||
tail_option_shown,
|
tail_option_shown,
|
||||||
tail_to_change_to,
|
tail_to_change_to,
|
||||||
tail_colouration,
|
tail_colouration,
|
||||||
@@ -837,7 +840,6 @@ const VoreSelectedBellyVisuals = (props, context) => {
|
|||||||
</LabeledList.Item>
|
</LabeledList.Item>
|
||||||
{affects_voresprite ? (
|
{affects_voresprite ? (
|
||||||
<span>
|
<span>
|
||||||
{/* Once other options are added in:
|
|
||||||
<LabeledList.Item label="Vore Sprite Mode">
|
<LabeledList.Item label="Vore Sprite Mode">
|
||||||
{(vore_sprite_flags.length && vore_sprite_flags.join(', ')) || 'None'}
|
{(vore_sprite_flags.length && vore_sprite_flags.join(', ')) || 'None'}
|
||||||
<Button
|
<Button
|
||||||
@@ -845,7 +847,7 @@ const VoreSelectedBellyVisuals = (props, context) => {
|
|||||||
ml={1}
|
ml={1}
|
||||||
icon="plus"
|
icon="plus"
|
||||||
/>
|
/>
|
||||||
</LabeledList.Item>*/}
|
</LabeledList.Item>
|
||||||
<LabeledList.Item label="Count Absorbed prey for vore sprites">
|
<LabeledList.Item label="Count Absorbed prey for vore sprites">
|
||||||
<Button
|
<Button
|
||||||
onClick={() => act('set_attribute', { attribute: 'b_count_absorbed_prey_for_sprites' })}
|
onClick={() => act('set_attribute', { attribute: 'b_count_absorbed_prey_for_sprites' })}
|
||||||
@@ -920,6 +922,30 @@ const VoreSelectedBellyVisuals = (props, context) => {
|
|||||||
) : (
|
) : (
|
||||||
''
|
''
|
||||||
)}
|
)}
|
||||||
|
{tail_option_shown && vore_sprite_flags.includes('Undergarment addition') ? (
|
||||||
|
<div>
|
||||||
|
<LabeledList.Item label="Undergarment type to affect">
|
||||||
|
<Button
|
||||||
|
onClick={() => act('set_attribute', { attribute: 'b_undergarment_choice' })}
|
||||||
|
content={undergarment_chosen}
|
||||||
|
/>
|
||||||
|
</LabeledList.Item>
|
||||||
|
<LabeledList.Item label="Undergarment if none equipped">
|
||||||
|
<Button
|
||||||
|
onClick={() => act('set_attribute', { attribute: 'b_undergarment_if_none' })}
|
||||||
|
content={undergarment_if_none}
|
||||||
|
/>
|
||||||
|
</LabeledList.Item>
|
||||||
|
<FeatureColorInput
|
||||||
|
action_name="b_undergarment_color"
|
||||||
|
value_of={null}
|
||||||
|
back_color={undergarment_color}
|
||||||
|
name_of="Undergarment Color if none"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
''
|
||||||
|
)}
|
||||||
{tail_option_shown && vore_sprite_flags.includes('Tail adjustment') ? (
|
{tail_option_shown && vore_sprite_flags.includes('Tail adjustment') ? (
|
||||||
<LabeledList.Item label="Tail to change to">
|
<LabeledList.Item label="Tail to change to">
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user