mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Borgmultibelly (#7448)
This commit is contained in:
@@ -941,6 +941,28 @@
|
|||||||
old_x = sprite_datum.pixel_x
|
old_x = sprite_datum.pixel_x
|
||||||
|
|
||||||
if(stat == CONSCIOUS)
|
if(stat == CONSCIOUS)
|
||||||
|
//CHOMPAdd Start
|
||||||
|
// Let us handle the bellies with our own system
|
||||||
|
update_fullness()
|
||||||
|
for(var/belly_class in vore_fullness_ex)
|
||||||
|
reset_belly_lights(belly_class)
|
||||||
|
var/vs_fullness = vore_fullness_ex[belly_class]
|
||||||
|
if(belly_class == "sleeper" && sleeper_state == 0 && vore_selected.silicon_belly_overlay_preference == "Sleeper") continue
|
||||||
|
if(belly_class == "sleeper" && sleeper_state != 0 && !(vs_fullness + 1 > vore_capacity_ex[belly_class]))
|
||||||
|
if(vore_selected.silicon_belly_overlay_preference == "Sleeper")
|
||||||
|
vs_fullness = vore_capacity_ex[belly_class]
|
||||||
|
else if(vore_selected.silicon_belly_overlay_preference == "Both")
|
||||||
|
vs_fullness += 1
|
||||||
|
if(!vs_fullness > 0) continue
|
||||||
|
if(resting)
|
||||||
|
if(!sprite_datum.has_vore_belly_resting_sprites)
|
||||||
|
continue
|
||||||
|
add_overlay(sprite_datum.get_belly_resting_overlay(src, vs_fullness, belly_class))
|
||||||
|
else
|
||||||
|
update_belly_lights(belly_class)
|
||||||
|
add_overlay(sprite_datum.get_belly_overlay(src, vs_fullness, belly_class))
|
||||||
|
//CHOMPAdd End
|
||||||
|
/*CHOMPRemove Start
|
||||||
var/belly_size = 0
|
var/belly_size = 0
|
||||||
if(sprite_datum.has_vore_belly_sprites && vore_selected.belly_overall_mult != 0)
|
if(sprite_datum.has_vore_belly_sprites && vore_selected.belly_overall_mult != 0)
|
||||||
if(vore_selected.silicon_belly_overlay_preference == "Sleeper")
|
if(vore_selected.silicon_belly_overlay_preference == "Sleeper")
|
||||||
@@ -974,7 +996,7 @@
|
|||||||
fullness_to_add = ITEMSIZE_COST_HUGE
|
fullness_to_add = ITEMSIZE_COST_HUGE
|
||||||
else
|
else
|
||||||
fullness_to_add = ITEMSIZE_COST_NO_CONTAINER
|
fullness_to_add = ITEMSIZE_COST_NO_CONTAINER
|
||||||
belly_size += (fullness_to_add / 32) //* vore_selected.overlay_item_multiplier //Enable this later when vorepanel is reworked.
|
belly_size += (fullness_to_add / 32) // vore_selected.overlay_item_multiplier //Enable this later when vorepanel is reworked.
|
||||||
else
|
else
|
||||||
belly_size += 1 //if it's not a person, nor an item... lets just go with 1
|
belly_size += 1 //if it's not a person, nor an item... lets just go with 1
|
||||||
|
|
||||||
@@ -987,6 +1009,7 @@
|
|||||||
add_overlay(sprite_datum.get_belly_resting_overlay(src, belly_size))
|
add_overlay(sprite_datum.get_belly_resting_overlay(src, belly_size))
|
||||||
else if(!resting)
|
else if(!resting)
|
||||||
add_overlay(sprite_datum.get_belly_overlay(src, belly_size))
|
add_overlay(sprite_datum.get_belly_overlay(src, belly_size))
|
||||||
|
*///CHOMPRemove End
|
||||||
|
|
||||||
sprite_datum.handle_extra_icon_updates(src) // Various equipment-based sprites go here.
|
sprite_datum.handle_extra_icon_updates(src) // Various equipment-based sprites go here.
|
||||||
|
|
||||||
@@ -1202,10 +1225,31 @@
|
|||||||
sprite_datum = module_sprites[1]
|
sprite_datum = module_sprites[1]
|
||||||
else
|
else
|
||||||
var/selection = tgui_input_list(src, "Select an icon! [triesleft ? "You have [triesleft] more chance\s." : "This is your last try."]", "Robot Icon", module_sprites)
|
var/selection = tgui_input_list(src, "Select an icon! [triesleft ? "You have [triesleft] more chance\s." : "This is your last try."]", "Robot Icon", module_sprites)
|
||||||
|
sprite_datum = selection
|
||||||
if(selection)
|
if(selection)
|
||||||
sprite_datum = selection
|
sprite_datum = selection
|
||||||
else
|
else
|
||||||
sprite_datum = module_sprites[1]
|
sprite_datum = module_sprites[1]
|
||||||
|
//CHOMPEdit Start, allow multi bellies
|
||||||
|
vore_icon_bellies = list() //Clear any belly options that may not exist now
|
||||||
|
vore_capacity_ex = list()
|
||||||
|
vore_fullness_ex = list()
|
||||||
|
if(sprite_datum.belly_capacity_list.len)
|
||||||
|
for(var/belly in sprite_datum.belly_capacity_list) //vore icons list only contains a list of names with no associated data
|
||||||
|
vore_capacity_ex[belly] = sprite_datum.belly_capacity_list[belly] //I dont know why but this wasnt working when I just
|
||||||
|
vore_fullness_ex[belly] = 0 //set the lists equal to the old lists
|
||||||
|
vore_icon_bellies += belly
|
||||||
|
for(var/belly in sprite_datum.belly_light_list)
|
||||||
|
vore_light_states[belly] = 0
|
||||||
|
else if(sprite_datum.has_vore_belly_sprites)
|
||||||
|
vore_capacity_ex = list("sleeper" = 1)
|
||||||
|
vore_fullness_ex = list("sleeper" = 0)
|
||||||
|
vore_icon_bellies = list("sleeper")
|
||||||
|
if(sprite_datum.has_sleeper_light_indicator)
|
||||||
|
vore_light_states = list("sleeepr" = 0)
|
||||||
|
sprite_datum.belly_light_list = list("sleeper")
|
||||||
|
update_fullness() //Set how full the newly defined bellies are, if they're already full
|
||||||
|
//CHOMPEdit End
|
||||||
if(!istype(src,/mob/living/silicon/robot/drone))
|
if(!istype(src,/mob/living/silicon/robot/drone))
|
||||||
robot_species = sprite_datum.name
|
robot_species = sprite_datum.name
|
||||||
if(notransform)
|
if(notransform)
|
||||||
|
|||||||
@@ -30,25 +30,40 @@
|
|||||||
/datum/robot_sprite/proc/handle_extra_icon_updates(var/mob/living/silicon/robot/ourborg)
|
/datum/robot_sprite/proc/handle_extra_icon_updates(var/mob/living/silicon/robot/ourborg)
|
||||||
return
|
return
|
||||||
|
|
||||||
/datum/robot_sprite/proc/get_belly_overlay(var/mob/living/silicon/robot/ourborg, var/size = 1)
|
/datum/robot_sprite/proc/get_belly_overlay(var/mob/living/silicon/robot/ourborg, var/size = 1, var/b_class) //CHOMPEdit, allows use of our multi belly system
|
||||||
//Size
|
//Size
|
||||||
if(has_sleeper_light_indicator)
|
//CHOMPEdit Start, using our own belly handling
|
||||||
|
if(has_sleeper_light_indicator || belly_light_list.len)
|
||||||
|
if(belly_light_list.len)
|
||||||
|
if(belly_light_list.Find(b_class))
|
||||||
|
//First, Sleeper base icon is input. Second the belly class, supposedly taken from the borg's vore_fullness_ex list.
|
||||||
|
//The belly class should be the same as the belly sprite's name, with as many size values as you defined in the
|
||||||
|
//vore_capacity_ex list. Finally, if the borg has a red/green light sleeper, it'll use g or r appended to the end.
|
||||||
|
//Bellies with lights should be defined in belly_light_list
|
||||||
|
var/sleeperColor = "g"
|
||||||
|
if(ourborg.sleeper_state == 1 || ourborg.vore_light_states[b_class] == 1) // Is our belly safe, or gurgling cuties?
|
||||||
|
sleeperColor = "r"
|
||||||
|
return "[sprite_icon_state]-[b_class]-[size]-[sleeperColor]"
|
||||||
|
|
||||||
|
return "[sprite_icon_state]-[b_class]-[size]"
|
||||||
|
else
|
||||||
var/sleeperColor = "g"
|
var/sleeperColor = "g"
|
||||||
if(ourborg.sleeper_state == 1) // Is our belly safe, or gurgling cuties?
|
if(ourborg.sleeper_state == 1) // Is our belly safe, or gurgling cuties?
|
||||||
sleeperColor = "r"
|
sleeperColor = "r"
|
||||||
return "[sprite_icon_state]-sleeper-[size]-[sleeperColor]"
|
return "[sprite_icon_state]-[b_class]-[size]-[sleeperColor]"
|
||||||
return "[sprite_icon_state]-sleeper-[size]"
|
return "[sprite_icon_state]-[b_class]-[size]"
|
||||||
|
//CHOMPEdit End
|
||||||
|
|
||||||
/datum/robot_sprite/proc/get_belly_resting_overlay(var/mob/living/silicon/robot/ourborg, var/size = 1)
|
/datum/robot_sprite/proc/get_belly_resting_overlay(var/mob/living/silicon/robot/ourborg, var/size = 1, var/b_class) //CHOMPEdit, allows use of our multi belly system
|
||||||
if(!(ourborg.rest_style in rest_sprite_options))
|
if(!(ourborg.rest_style in rest_sprite_options))
|
||||||
ourborg.rest_style = "Default"
|
ourborg.rest_style = "Default"
|
||||||
switch(ourborg.rest_style)
|
switch(ourborg.rest_style)
|
||||||
if("Sit")
|
if("Sit")
|
||||||
return "[get_belly_overlay(ourborg, size)]-sit"
|
return "[get_belly_overlay(ourborg, size, b_class)]-sit" //CHOMPEdit, allows use of our multi belly system
|
||||||
if("Bellyup")
|
if("Bellyup")
|
||||||
return "[get_belly_overlay(ourborg, size)]-bellyup"
|
return "[get_belly_overlay(ourborg, size, b_class)]-bellyup" //CHOMPEdit, allows use of our multi belly system
|
||||||
else
|
else
|
||||||
return "[get_belly_overlay(ourborg, size)]-rest"
|
return "[get_belly_overlay(ourborg, size, b_class)]-rest" //CHOMPEdit, allows use of our multi belly system
|
||||||
|
|
||||||
/datum/robot_sprite/proc/get_eyes_overlay(var/mob/living/silicon/robot/ourborg)
|
/datum/robot_sprite/proc/get_eyes_overlay(var/mob/living/silicon/robot/ourborg)
|
||||||
if(!(ourborg.resting && has_rest_sprites))
|
if(!(ourborg.resting && has_rest_sprites))
|
||||||
|
|||||||
@@ -223,11 +223,11 @@
|
|||||||
else
|
else
|
||||||
ourborg.icon_state = booze_options[ourborg.sprite_extra_customization["boozehound"]]
|
ourborg.icon_state = booze_options[ourborg.sprite_extra_customization["boozehound"]]
|
||||||
|
|
||||||
/datum/robot_sprite/dogborg/service/booze/get_belly_overlay(var/mob/living/silicon/robot/ourborg, var/size = 1)
|
/datum/robot_sprite/dogborg/service/booze/get_belly_overlay(var/mob/living/silicon/robot/ourborg, var/size = 1, var/b_class) //CHOMPEdit for multibelly handling
|
||||||
if(!("boozehound" in ourborg.sprite_extra_customization) || !ourborg.sprite_extra_customization["boozehound"])
|
if(!("boozehound" in ourborg.sprite_extra_customization) || !ourborg.sprite_extra_customization["boozehound"] || b_class != "sleeper") //CHOMPEdit for multibelly handling
|
||||||
return ..()
|
return ..()
|
||||||
else
|
else
|
||||||
return "[booze_options[ourborg.sprite_extra_customization["boozehound"]]]-sleeper-[size]"
|
return "[booze_options[ourborg.sprite_extra_customization["boozehound"]]]-[b_class]-[size]" //CHOMPEdit for multibelly handling
|
||||||
|
|
||||||
/datum/robot_sprite/dogborg/service/booze/get_rest_sprite(var/mob/living/silicon/robot/ourborg)
|
/datum/robot_sprite/dogborg/service/booze/get_rest_sprite(var/mob/living/silicon/robot/ourborg)
|
||||||
if(!(ourborg.rest_style in rest_sprite_options))
|
if(!(ourborg.rest_style in rest_sprite_options))
|
||||||
|
|||||||
@@ -2870,7 +2870,11 @@ var/global/list/belly_colorable_only_fullscreens = list("a_synth_flesh_mono",
|
|||||||
list("Sleeper", "Vorebelly", "Both"))
|
list("Sleeper", "Vorebelly", "Both"))
|
||||||
if(belly_choice == null)
|
if(belly_choice == null)
|
||||||
return FALSE
|
return FALSE
|
||||||
host.vore_selected.silicon_belly_overlay_preference = belly_choice
|
//CHOMPEdit Start, changed to sync the setting among all sleepers for multibelly support
|
||||||
|
for (var/belly in host.vore_organs)
|
||||||
|
var/obj/belly/B = belly
|
||||||
|
B.silicon_belly_overlay_preference = belly_choice
|
||||||
|
//CHOMPEdit End
|
||||||
host.update_icon()
|
host.update_icon()
|
||||||
. = TRUE
|
. = TRUE
|
||||||
if("b_belly_mob_mult")
|
if("b_belly_mob_mult")
|
||||||
|
|||||||
@@ -2,6 +2,11 @@
|
|||||||
var/sleeper_resting = FALSE //Enable resting belly sprites for dogborgs that have the sprites
|
var/sleeper_resting = FALSE //Enable resting belly sprites for dogborgs that have the sprites
|
||||||
var/datum/matter_synth/water_res = null //Enable water for lick clean
|
var/datum/matter_synth/water_res = null //Enable water for lick clean
|
||||||
var/has_recoloured = FALSE
|
var/has_recoloured = FALSE
|
||||||
|
//Multibelly support. We do not want to apply it to any module not supporting it in it's sprites
|
||||||
|
var/list/vore_light_states = list() //Robot exclusive
|
||||||
|
vore_capacity_ex = list()
|
||||||
|
vore_fullness_ex = list()
|
||||||
|
vore_icon_bellies = list()
|
||||||
|
|
||||||
/mob/living/silicon/robot/verb/purge_nutrition()
|
/mob/living/silicon/robot/verb/purge_nutrition()
|
||||||
set name = "Purge Nutrition"
|
set name = "Purge Nutrition"
|
||||||
@@ -30,9 +35,30 @@
|
|||||||
else
|
else
|
||||||
to_chat(src, "<span class='filter_notice'>Insufficient water reserves.</span>")
|
to_chat(src, "<span class='filter_notice'>Insufficient water reserves.</span>")
|
||||||
|
|
||||||
|
/mob/living/silicon/robot/proc/reset_belly_lights(var/b_class)
|
||||||
|
if(sprite_datum.belly_light_list.len && sprite_datum.belly_light_list.Find(b_class))
|
||||||
|
vore_light_states[b_class] = 0
|
||||||
|
|
||||||
|
/mob/living/silicon/robot/proc/update_belly_lights(var/b_class)
|
||||||
|
if(sprite_datum.belly_light_list.len && sprite_datum.belly_light_list.Find(b_class))
|
||||||
|
vore_light_states[b_class] = 2
|
||||||
|
for (var/belly in vore_organs)
|
||||||
|
var/obj/belly/B = belly
|
||||||
|
if(b_class == "sleeper" && (B.silicon_belly_overlay_preference == "Vorebelly" || B.silicon_belly_overlay_preference == "Both") || b_class != "sleeper")
|
||||||
|
if(B.digest_mode != DM_DIGEST || B.belly_sprite_to_affect != b_class || !B.contents.len)
|
||||||
|
continue
|
||||||
|
for(var/contents in B.contents)
|
||||||
|
if(istype(contents, /mob/living))
|
||||||
|
vore_light_states[b_class] = 1
|
||||||
|
return
|
||||||
|
|
||||||
/mob/living/silicon/robot/module_reset()
|
/mob/living/silicon/robot/module_reset()
|
||||||
..()
|
..()
|
||||||
has_recoloured = FALSE
|
has_recoloured = FALSE
|
||||||
|
// We only use the chomp system when the sprite supports it. Else we go through the fallback
|
||||||
|
vore_capacity_ex = list()
|
||||||
|
vore_fullness_ex = list()
|
||||||
|
vore_light_states = list()
|
||||||
|
|
||||||
/mob/living/silicon/robot/verb/ColorMate()
|
/mob/living/silicon/robot/verb/ColorMate()
|
||||||
set name = "Recolour Module"
|
set name = "Recolour Module"
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
/datum/robot_sprite
|
||||||
|
var/list/belly_light_list = list() // Support multiple sleepers with r/g light "sleeper"
|
||||||
|
var/list/belly_capacity_list = list() //Support multiple bellies with multiple sizes, default: "sleeper" = 1
|
||||||
@@ -1115,12 +1115,15 @@ const VoreSelectedMobTypeBellyButtons = (props, context) => {
|
|||||||
const { belly } = props;
|
const { belly } = props;
|
||||||
const {
|
const {
|
||||||
silicon_belly_overlay_preference,
|
silicon_belly_overlay_preference,
|
||||||
|
belly_sprite_option_shown,
|
||||||
|
belly_sprite_to_affect,
|
||||||
belly_mob_mult,
|
belly_mob_mult,
|
||||||
belly_item_mult,
|
belly_item_mult,
|
||||||
belly_overall_mult,
|
belly_overall_mult,
|
||||||
} = belly;
|
} = belly;
|
||||||
|
|
||||||
if (is_cyborg) {
|
if (is_cyborg) {
|
||||||
|
if (belly_sprite_option_shown && belly_sprite_to_affect === 'sleeper') {
|
||||||
return (
|
return (
|
||||||
<Section title={'Cyborg Controls'} width={'80%'}>
|
<Section title={'Cyborg Controls'} width={'80%'}>
|
||||||
<LabeledList>
|
<LabeledList>
|
||||||
@@ -1132,35 +1135,19 @@ const VoreSelectedMobTypeBellyButtons = (props, context) => {
|
|||||||
content={capitalize(silicon_belly_overlay_preference)}
|
content={capitalize(silicon_belly_overlay_preference)}
|
||||||
/>
|
/>
|
||||||
</LabeledList.Item>
|
</LabeledList.Item>
|
||||||
<LabeledList.Item label="Mob Vorebelly Size Mult">
|
|
||||||
<Button
|
|
||||||
onClick={() =>
|
|
||||||
act('set_attribute', { attribute: 'b_belly_mob_mult' })
|
|
||||||
}
|
|
||||||
content={belly_mob_mult}
|
|
||||||
/>
|
|
||||||
</LabeledList.Item>
|
|
||||||
<LabeledList.Item label="Item Vorebelly Size Mult">
|
|
||||||
<Button
|
|
||||||
onClick={() =>
|
|
||||||
act('set_attribute', { attribute: 'b_belly_item_mult' })
|
|
||||||
}
|
|
||||||
content={belly_item_mult}
|
|
||||||
/>
|
|
||||||
</LabeledList.Item>
|
|
||||||
<LabeledList.Item label="Belly Size Multiplier">
|
|
||||||
<Button
|
|
||||||
onClick={() =>
|
|
||||||
act('set_attribute', {
|
|
||||||
attribute: 'b_belly_overall_mult',
|
|
||||||
})
|
|
||||||
}
|
|
||||||
content={belly_overall_mult}
|
|
||||||
/>
|
|
||||||
</LabeledList.Item>
|
|
||||||
</LabeledList>
|
</LabeledList>
|
||||||
</Section>
|
</Section>
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
return (
|
||||||
|
<Section title={'Cyborg Controls'} width={'80%'}>
|
||||||
|
<span style={{ color: 'red' }}>
|
||||||
|
Your module does either not support vore sprites or you've selected
|
||||||
|
a belly sprite other than the sleeper within the Visuals section.
|
||||||
|
</span>
|
||||||
|
</Section>
|
||||||
|
);
|
||||||
|
}
|
||||||
} else if (is_vore_simple_mob) {
|
} else if (is_vore_simple_mob) {
|
||||||
return (
|
return (
|
||||||
// For now, we're only returning empty. TODO: Simple mob belly controls
|
// For now, we're only returning empty. TODO: Simple mob belly controls
|
||||||
@@ -1438,7 +1425,11 @@ const VoreSelectedBellyVisuals = (props, context) => {
|
|||||||
/>
|
/>
|
||||||
</LabeledList.Item>
|
</LabeledList.Item>
|
||||||
) : (
|
) : (
|
||||||
''
|
<LabeledList.Item label="Belly Sprite to affect">
|
||||||
|
<span style={{ color: 'red' }}>
|
||||||
|
You do not have any bellysprites.
|
||||||
|
</span>
|
||||||
|
</LabeledList.Item>
|
||||||
)}
|
)}
|
||||||
{tail_option_shown &&
|
{tail_option_shown &&
|
||||||
vore_sprite_flags.includes('Undergarment addition') ? (
|
vore_sprite_flags.includes('Undergarment addition') ? (
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -178,7 +178,7 @@ export const TguiTarget = new Juke.Target({
|
|||||||
'tgui/.yarn/install-target',
|
'tgui/.yarn/install-target',
|
||||||
'tgui/webpack.config.js',
|
'tgui/webpack.config.js',
|
||||||
'tgui/**/package.json',
|
'tgui/**/package.json',
|
||||||
'tgui/packages/**/*.+(js|cjs|ts|tsx|scss)',
|
'tgui/packages/**/*.+(js|jsx|cjs|ts|tsx|scss)',
|
||||||
],
|
],
|
||||||
outputs: [
|
outputs: [
|
||||||
'tgui/public/tgui.bundle.css',
|
'tgui/public/tgui.bundle.css',
|
||||||
|
|||||||
@@ -4776,6 +4776,7 @@
|
|||||||
#include "modular_chomp\code\modules\mob\living\silicon\robot\dogborg\dog_sleeper.dm"
|
#include "modular_chomp\code\modules\mob\living\silicon\robot\dogborg\dog_sleeper.dm"
|
||||||
#include "modular_chomp\code\modules\mob\living\silicon\robot\drone\drone_items.dm"
|
#include "modular_chomp\code\modules\mob\living\silicon\robot\drone\drone_items.dm"
|
||||||
#include "modular_chomp\code\modules\mob\living\silicon\robot\modules\exploration.dm"
|
#include "modular_chomp\code\modules\mob\living\silicon\robot\modules\exploration.dm"
|
||||||
|
#include "modular_chomp\code\modules\mob\living\silicon\robot\sprites\_sprite_datum.dm"
|
||||||
#include "modular_chomp\code\modules\mob\living\silicon\robot\sprites\civilian.dm"
|
#include "modular_chomp\code\modules\mob\living\silicon\robot\sprites\civilian.dm"
|
||||||
#include "modular_chomp\code\modules\mob\living\silicon\robot\sprites\clown.dm"
|
#include "modular_chomp\code\modules\mob\living\silicon\robot\sprites\clown.dm"
|
||||||
#include "modular_chomp\code\modules\mob\living\silicon\robot\sprites\combat.dm"
|
#include "modular_chomp\code\modules\mob\living\silicon\robot\sprites\combat.dm"
|
||||||
|
|||||||
Reference in New Issue
Block a user