New vore sprite options

This commit is contained in:
TheGreatKitsune
2022-11-23 12:27:51 -06:00
parent 1432be0e37
commit 2f9d0b7e32
7 changed files with 134 additions and 3 deletions
+32 -1
View File
@@ -82,6 +82,12 @@
var/affects_vore_sprites = FALSE
var/count_absorbed_prey_for_sprite = TRUE
var/absorbed_multiplier = 1
var/count_liquid_for_sprite = FALSE
var/liquid_multiplier = 1
var/count_items_for_sprite = FALSE
var/item_multiplier = 1
var/health_impacts_size = TRUE
var/resist_triggers_animation = TRUE
var/size_factor_for_sprite = 1
var/belly_sprite_to_affect = "stomach"
@@ -99,7 +105,32 @@
var/belly_fullness = 0
for(var/mob/living/M in src)
if(count_absorbed_prey_for_sprite || !M.absorbed)
belly_fullness += M.size_multiplier
var/fullness_to_add = M.size_multiplier
fullness_to_add *= M.mob_size / 20
if(M.absorbed)
fullness_to_add *= absorbed_multiplier
if(health_impacts_size)
fullness_to_add *= M.health / M.getMaxHealth()
belly_fullness += fullness_to_add
if(count_liquid_for_sprite)
belly_fullness += (reagents.total_volume / 100) * liquid_multiplier
if(count_items_for_sprite)
for(var/obj/item/I in src)
var/fullness_to_add = 0
if(I.w_class == ITEMSIZE_TINY)
fullness_to_add = ITEMSIZE_COST_TINY
if(I.w_class == ITEMSIZE_SMALL)
fullness_to_add = ITEMSIZE_COST_SMALL
if(I.w_class == ITEMSIZE_NORMAL)
fullness_to_add = ITEMSIZE_COST_NORMAL
if(I.w_class == ITEMSIZE_LARGE)
fullness_to_add = ITEMSIZE_COST_LARGE
if(I.w_class == ITEMSIZE_HUGE)
fullness_to_add = ITEMSIZE_COST_HUGE
else
fullness_to_add = ITEMSIZE_COST_NO_CONTAINER
fullness_to_add /= 32
belly_fullness += fullness_to_add * item_multiplier
belly_fullness *= size_factor_for_sprite
return belly_fullness
+12
View File
@@ -260,6 +260,12 @@
"vore_sprite_flags",
"affects_vore_sprites",
"count_absorbed_prey_for_sprite",
"absorbed_multiplier",
"count_liquid_for_sprite",
"liquid_multiplier",
"count_items_for_sprite",
"item_multiplier",
"health_impacts_size",
"resist_triggers_animation",
"size_factor_for_sprite",
"belly_sprite_to_affect",
@@ -1304,6 +1310,12 @@
dupe.vore_sprite_flags = vore_sprite_flags
dupe.affects_vore_sprites = affects_vore_sprites
dupe.count_absorbed_prey_for_sprite = count_absorbed_prey_for_sprite
dupe.absorbed_multiplier = absorbed_multiplier
dupe.count_liquid_for_sprite = count_liquid_for_sprite
dupe.liquid_multiplier = liquid_multiplier
dupe.count_items_for_sprite = count_items_for_sprite
dupe.item_multiplier = item_multiplier
dupe.health_impacts_size = health_impacts_size
dupe.resist_triggers_animation = resist_triggers_animation
dupe.size_factor_for_sprite = size_factor_for_sprite
dupe.belly_sprite_to_affect = belly_sprite_to_affect
+37 -1
View File
@@ -203,6 +203,12 @@
//CHOMP add: vore sprite options
"affects_voresprite" = selected.affects_vore_sprites,
"absorbed_voresprite" = selected.count_absorbed_prey_for_sprite,
"absorbed_multiplier" = selected.absorbed_multiplier,
"liquid_voresprite" = selected.count_liquid_for_sprite,
"liquid_multiplier" = selected.liquid_multiplier,
"item_voresprite" = selected.count_items_for_sprite,
"item_multiplier" = selected.item_multiplier,
"health_voresprite" = selected.health_impacts_size,
"resist_animation" = selected.resist_triggers_animation,
"voresprite_size_factor" = selected.size_factor_for_sprite,
"belly_sprite_to_affect" = selected.belly_sprite_to_affect,
@@ -1555,11 +1561,41 @@
host.vore_selected.count_absorbed_prey_for_sprite = !host.vore_selected.count_absorbed_prey_for_sprite
host.update_fullness()
. = TRUE
if("b_absorbed_multiplier") //CHOMP Addition
var/absorbed_multiplier_input = input(user, "Set the impact absorbed prey's size have on your vore sprite. 1 means no scaling, 0.5 means absorbed prey count half as much, 2 means absorbed prey count double. (Range from 0.1 - 3)", "Absorbed Multiplier") as num|null
if(!isnull(absorbed_multiplier_input))
host.vore_selected.absorbed_multiplier = CLAMP(absorbed_multiplier_input, 0.1, 3)
host.update_fullness()
. = TRUE
if("b_count_liquid_for_sprites") //CHOMP Addition
host.vore_selected.count_liquid_for_sprite = !host.vore_selected.count_liquid_for_sprite
host.update_fullness()
. = TRUE
if("b_liquid_multiplier") //CHOMP Addition
var/liquid_multiplier_input = input(user, "Set the impact amount of liquid reagents will have on your vore sprite. 1 means a belly with 100 reagents of fluid will count as 1 normal sized prey-thing's worth, 0.5 means liquid counts half as much, 2 means liquid counts double. (Range from 0.1 - 10)", "Liquid Multiplier") as num|null
if(!isnull(liquid_multiplier_input))
host.vore_selected.liquid_multiplier = CLAMP(liquid_multiplier_input, 0.1, 10)
host.update_fullness()
. = TRUE
if("b_count_items_for_sprites") //CHOMP Addition
host.vore_selected.count_items_for_sprite = !host.vore_selected.count_items_for_sprite
host.update_fullness()
. = TRUE
if("b_item_multiplier") //CHOMP Addition
var/item_multiplier_input = input(user, "Set the impact items will have on your vore sprite. 1 means a belly with 8 normal-sized items will count as 1 normal sized prey-thing's worth, 0.5 means items count half as much, 2 means items count double. (Range from 0.1 - 10)", "Item Multiplier") as num|null
if(!isnull(item_multiplier_input))
host.vore_selected.item_multiplier = CLAMP(item_multiplier_input, 0.1, 10)
host.update_fullness()
. = TRUE
if("b_health_impacts_size") //CHOMP Addition
host.vore_selected.health_impacts_size = !host.vore_selected.health_impacts_size
host.update_fullness()
. = TRUE
if("b_resist_animation") //CHOMP Addition
host.vore_selected.resist_triggers_animation = !host.vore_selected.resist_triggers_animation
. = TRUE
if("b_size_factor_sprites") //CHOMP Addition
var/size_factor_input = input(user, "Set the impact prey's size have on your vore sprite. 1 means no scaling, 0.5 means prey count half as much, 2 means prey count double. (Range from 0.1 - 3)", "Size Factor") as num|null
var/size_factor_input = input(user, "Set the impact all belly content's collective size has on your vore sprite. 1 means no scaling, 0.5 means content counts half as much, 2 means contents count double. (Range from 0.1 - 3)", "Size Factor") as num|null
if(!isnull(size_factor_input))
host.vore_selected.size_factor_for_sprite = CLAMP(size_factor_input, 0.1, 3)
host.update_fullness()
@@ -183,6 +183,12 @@
// Visuals
belly_data["affects_vore_sprites"] = B.affects_vore_sprites
belly_data["count_absorbed_prey_for_sprite"] = B.count_absorbed_prey_for_sprite
belly_data["absorbed_multiplier"] = B.absorbed_multiplier
belly_data["count_liquid_for_sprite"] = B.count_liquid_for_sprite
belly_data["liquid_multiplier"] = B.liquid_multiplier
belly_data["count_items_for_sprite"] = B.count_items_for_sprite
belly_data["item_multiplier"] = B.item_multiplier
belly_data["health_impacts_size"] = B.health_impacts_size
belly_data["resist_triggers_animation"] = B.resist_triggers_animation
belly_data["size_factor_for_sprite"] = B.size_factor_for_sprite
belly_data["belly_sprite_to_affect"] = B.belly_sprite_to_affect
@@ -850,6 +850,12 @@ const VoreSelectedBellyVisuals = (props, context) => {
vore_sprite_flags,
affects_voresprite,
absorbed_voresprite,
absorbed_multiplier,
liquid_voresprite,
liquid_multiplier,
item_voresprite,
item_multiplier,
health_voresprite,
resist_animation,
voresprite_size_factor,
belly_sprite_option_shown,
@@ -893,6 +899,40 @@ const VoreSelectedBellyVisuals = (props, context) => {
content={absorbed_voresprite ? 'Yes' : 'No'}
/>
</LabeledList.Item>
<LabeledList.Item label="Absorbed Multiplier">
<Button
onClick={() => act('set_attribute', { attribute: 'b_absorbed_multiplier' })}
content={absorbed_multiplier}
/>
</LabeledList.Item>
<LabeledList.Item label="Count liquid reagents for vore sprites">
<Button
onClick={() => act('set_attribute', { attribute: 'b_count_liquid_for_sprites' })}
icon={liquid_voresprite ? 'toggle-on' : 'toggle-off'}
selected={liquid_voresprite}
content={liquid_voresprite ? 'Yes' : 'No'}
/>
</LabeledList.Item>
<LabeledList.Item label="Liquid Multiplier">
<Button
onClick={() => act('set_attribute', { attribute: 'b_liquid_multiplier' })}
content={liquid_multiplier}
/>
</LabeledList.Item>
<LabeledList.Item label="Count items for vore sprites">
<Button
onClick={() => act('set_attribute', { attribute: 'b_count_items_for_sprites' })}
icon={item_voresprite ? 'toggle-on' : 'toggle-off'}
selected={item_voresprite}
content={item_voresprite ? 'Yes' : 'No'}
/>
</LabeledList.Item>
<LabeledList.Item label="Items Multiplier">
<Button
onClick={() => act('set_attribute', { attribute: 'b_item_multiplier' })}
content={item_multiplier}
/>
</LabeledList.Item>
<LabeledList.Item label="Animation when prey resist">
<Button
onClick={() => act('set_attribute', { attribute: 'b_resist_animation' })}
@@ -148,6 +148,12 @@ type Belly = {
// Visuals
affects_vore_sprites: BooleanLike;
count_absorbed_prey_for_sprite: BooleanLike;
absorbed_multiplier: number;
count_liquid_for_sprite: BooleanLike;
liquid_multiplier: number;
count_items_for_sprite: BooleanLike;
item_multiplier: number;
health_impacts_size: BooleanLike;
resist_triggers_animation: BooleanLike;
size_factor_for_sprite: number;
belly_sprite_to_affect: string;
File diff suppressed because one or more lines are too long