Adds colorable stomachs

This commit is contained in:
C.L
2022-09-04 18:09:32 -04:00
committed by Darlantan
parent 8247ddd9a7
commit 87b0b96512
8 changed files with 236 additions and 3 deletions

View File

@@ -304,6 +304,16 @@
downscaled.Scale(240, 240)
InsertAll("", downscaled)
..()
/datum/asset/spritesheet/vore_colorized //This should be getting loaded in the TGUI vore panel but the game refuses to do so, for some reason. It only loads the vore spritesheet.
name = "colorizedvore"
/datum/asset/spritesheet/vore_colorized/register()
var/icon/downscaledVC = icon('icons/mob/screen_full_colorized_vore.dmi')
downscaledVC.Scale(240, 240)
InsertAll("", downscaledVC)
..()
//VOREStation Add End
// // Representative icons for each research design

View File

@@ -1419,7 +1419,9 @@
else
clear_alert("high")
if(!isbelly(loc)) clear_fullscreen("belly") //VOREStation Add - Belly fullscreens safety
if(!isbelly(loc)) //VOREStation Add - Belly fullscreens safety
clear_fullscreen("belly")
//clear_fullscreen("belly2") //For multilayered stomachs. Not currently implemented.
if(config.welder_vision)
var/found_welder

View File

@@ -163,6 +163,10 @@
// Lets you do a fullscreen overlay. Set to an icon_state string.
var/belly_fullscreen = ""
var/disable_hud = FALSE
var/colorization_enabled = FALSE
var/belly_fullscreen_color = "#823232"
//For serialization, keep this updated, required for bellies to save correctly.
/obj/belly/vars_to_save()
@@ -223,6 +227,7 @@
"wet_loop",
"belly_fullscreen",
"disable_hud",
<<<<<<< HEAD
"reagent_mode_flags", //CHOMP start of variables from CHOMP
"belly_fullscreen_color",
"reagentbellymode",
@@ -261,6 +266,10 @@
"autotransfer_enabled",
"autotransfer_min_amount",
"autotransfer_max_amount", //CHOMP end of variables from CHOMP
=======
"belly_fullscreen_color",
"colorization_enabled",
>>>>>>> 3ba4e4b189... Merge pull request #13619 from Cameron653/GREYSCALE_TUMMY_V2
"egg_type",
"save_digest_mode"
)
@@ -387,17 +396,59 @@
return
if(belly_fullscreen)
<<<<<<< HEAD
var/obj/screen/fullscreen/F = L.overlay_fullscreen("belly", /obj/screen/fullscreen/belly)
F.icon_state = belly_fullscreen
F.color = belly_fullscreen_color //CHOMPEdit
=======
if(colorization_enabled)
var/obj/screen/fullscreen/F = L.overlay_fullscreen("belly", /obj/screen/fullscreen/belly/colorized)
F.icon_state = belly_fullscreen
F.color = belly_fullscreen_color
/* //Allows for 'multilayered' stomachs. Currently not implemented.
if(b_multilayered)
var/obj/screen/fullscreen/F2 = L.overlay_fullscreen("belly2", /obj/screen/fullscreen/belly)
*/
else
var/obj/screen/fullscreen/F = L.overlay_fullscreen("belly", /obj/screen/fullscreen/belly)
F.icon_state = belly_fullscreen
>>>>>>> 3ba4e4b189... Merge pull request #13619 from Cameron653/GREYSCALE_TUMMY_V2
else
L.clear_fullscreen("belly")
//L.clear_fullscreen("belly2") //Allows for 'multilayered' stomachs. Currently not implemented.
if(disable_hud)
if(L?.hud_used?.hud_shown)
to_chat(L, "<span class='notice'>((Your pred has disabled huds in their belly. Turn off vore FX and hit F12 to get it back; or relax, and enjoy the serenity.))</span>")
L.toggle_hud_vis(TRUE)
/obj/belly/proc/vore_preview(mob/living/L)
if(!istype(L))
return
if(!L.client)
return
if(belly_fullscreen)
if(colorization_enabled)
var/obj/screen/fullscreen/F = L.overlay_fullscreen("belly", /obj/screen/fullscreen/belly/colorized)
F.icon_state = belly_fullscreen
F.color = belly_fullscreen_color
/* //Allows for 'multilayered' stomachs. Currently not implemented.
if(b_multilayered)
var/obj/screen/fullscreen/F2 = L.overlay_fullscreen("belly2", /obj/screen/fullscreen/belly)
*/
else
var/obj/screen/fullscreen/F = L.overlay_fullscreen("belly", /obj/screen/fullscreen/belly)
F.icon_state = belly_fullscreen
else
L.clear_fullscreen("belly")
//L.clear_fullscreen("belly2") //Allows for 'multilayered' stomachs. Currently not implemented.
/obj/belly/proc/clear_preview(mob/living/L)
L.clear_fullscreen("belly")
// Release all contents of this belly into the owning mob's location.
// If that location is another mob, contents are transferred into whichever of its bellies the owning mob is in.
// Returns the number of mobs so released.
@@ -1258,6 +1309,8 @@
dupe.belly_fullscreen = belly_fullscreen
dupe.disable_hud = disable_hud
dupe.belly_fullscreen_color = belly_fullscreen_color
dupe.colorization_enabled = colorization_enabled
dupe.egg_type = egg_type
dupe.emote_time = emote_time
dupe.emote_active = emote_active

View File

@@ -1096,6 +1096,9 @@
icon = 'modular_chomp/icons/mob/screen_full_vore_ch.dmi' //CHOMPedit
icon_state = ""
/obj/screen/fullscreen/belly/colorized
icon = 'icons/mob/screen_full_colorized_vore.dmi'
/mob/living/proc/vorebelly_printout() //Spew the vorepanel belly messages into chat window for copypasting.
set name = "X-Print Vorebelly Settings"
set category = "Preferences"

View File

@@ -46,6 +46,7 @@
/datum/vore_look/ui_assets(mob/user)
. = ..()
. += get_asset_datum(/datum/asset/spritesheet/vore)
. += get_asset_datum(/datum/asset/spritesheet/vore_colorized) //Either this isn't working or my cache is corrupted and won't show them.
/datum/vore_look/tgui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
@@ -198,6 +199,7 @@
"nutrition_ex" = host.nutrition_message_visible,
"weight_ex" = host.weight_message_visible,
"belly_fullscreen" = selected.belly_fullscreen,
<<<<<<< HEAD
"belly_fullscreen_color" = selected.belly_fullscreen_color, //CHOMPEdit
"mapRef" = map_name, //CHOMPEdit
"vorespawn_blacklist" = selected.vorespawn_blacklist, //CHOMP Addition: vorespawn blacklist
@@ -215,6 +217,10 @@
"tail_extra_overlay2" = selected.tail_extra_overlay2
//"marking_to_add" = selected.marking_to_add
//CHOMPEdit end
=======
"belly_fullscreen_color" = selected.belly_fullscreen_color,
"colorization_enabled" = selected.colorization_enabled,
>>>>>>> 3ba4e4b189... Merge pull request #13619 from Cameron653/GREYSCALE_TUMMY_V2
)
var/list/addons = list()
@@ -261,7 +267,27 @@
selected_list["autotransfer"]["autotransfer_max_amount"] = selected.autotransfer_max_amount
selected_list["disable_hud"] = selected.disable_hud
<<<<<<< HEAD
selected_list["possible_fullscreens"] = icon_states('icons/mob/screen_preview_vore_ch.dmi') //CHOMPedit
=======
selected_list["colorization_enabled"] = selected.colorization_enabled
selected_list["belly_fullscreen_color"] = selected.belly_fullscreen_color
if(selected.colorization_enabled)
selected_list["possible_fullscreens"] = icon_states('icons/mob/screen_full_colorized_vore.dmi') //Makes any icons inside of here selectable.
else
selected_list["possible_fullscreens"] = icon_states('icons/mob/screen_full_vore.dmi') //Where all stomachs - colorable and not - are stored.
//INSERT COLORIZE-ONLY STOMACHS HERE.
//This manually removed color-only stomachs from the above list.
//For some reason, colorized stomachs have to be added to both colorized_vore(to be selected) and full_vore (to show the preview in tgui)
//Why? I have no flipping clue. As you can see above, vore_colorized is included in the assets but isn't working. It makes no sense.
//I can only imagine this is a BYOND/TGUI issue with the cache. If you can figure out how to fix this and make it so you only need to
//include things in full_colorized_vore, that would be great. For now, this is the only workaround that I could get to work.
selected_list["possible_fullscreens"] -= "a_synth_flesh_mono"
selected_list["possible_fullscreens"] -= "a_synth_flesh_mono_hole"
selected_list["possible_fullscreens"] -= "a_anim_belly"
//INSERT COLORIZE-ONLY STOMACHS HERE
>>>>>>> 3ba4e4b189... Merge pull request #13619 from Cameron653/GREYSCALE_TUMMY_V2
var/list/selected_contents = list()
for(var/O in selected)
@@ -582,6 +608,7 @@
host.client.prefs_vr.show_vore_fx = host.show_vore_fx
if(!host.show_vore_fx)
host.clear_fullscreen("belly")
//host.clear_fullscreen("belly2") //For multilayered stomachs. Not currently implemented.
if(!host.hud_used.hud_shown)
host.toggle_hud_vis()
unsaved_changes = TRUE
@@ -1372,6 +1399,27 @@
if("b_disable_hud")
host.vore_selected.disable_hud = !host.vore_selected.disable_hud
. = TRUE
if("b_colorization_enabled") //ALLOWS COLORIZATION.
host.vore_selected.colorization_enabled = !host.vore_selected.colorization_enabled
host.vore_selected.belly_fullscreen = "dark" //This prevents you from selecting a belly that is not meant to be colored and then turning colorization on.
. = TRUE
/*
if("b_multilayered") //Allows for 'multilayered' stomachs. Currently not implemented. Add to TGUI.
host.vore_selected.multilayered = !host.vore_selected.multilayered //Add to stomach vars.
host.vore_selected.belly_fullscreen = "dark"
. = TRUE
*/
if("b_preview_belly")
host.vore_selected.vore_preview(host) //Gives them the stomach overlay. It fades away after ~2 seconds as human/life.dm removes the overlay if not in a gut.
. = TRUE
if("b_clear_preview")
host.vore_selected.clear_preview(host) //Clears the stomach overlay. This is a failsafe but shouldn't occur.
. = TRUE
if("b_fullscreen_color")
var/newcolor = input(usr, "Choose a color.", "", host.vore_selected.belly_fullscreen_color) as color|null
if(newcolor)
host.vore_selected.belly_fullscreen_color = newcolor
. = TRUE
if("b_save_digest_mode")
host.vore_selected.save_digest_mode = !host.vore_selected.save_digest_mode
. = TRUE

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 2.2 MiB

View File

@@ -177,6 +177,67 @@ export const VorePanel = (props, context) => {
tabs[1] = <VoreUserPreferences />;
const generateBellyString = () => {
const {
// Controls
belly_name,
mode,
item_mode,
addons,
// Descriptions
verb,
release_verb,
desc,
absorbed_desc,
} = data.selected;
let result = '=== ' + belly_name + ' ===\n\n';
result += '== Controls ==\n\n';
result += 'Mode:\n' + mode + '\n\n';
result += 'Addons:\n' + addons + '\n\n';
result += 'Item Mode:\n' + item_mode + '\n\n';
result += '== Descriptions ==\n\n';
result += 'Verb:\n' + verb + '\n\n';
result += 'Release Verb:\n' + release_verb + '\n\n';
result += 'Description:\n"' + desc + '"\n\n';
result += 'Absorbed Description:\n"' + absorbed_desc + '"\n\n';
return result;
};
const downloadPrefs = () => {
const { belly_name } = data.selected;
const extension = '.txt';
let now = new Date();
let hours = String(now.getHours());
if (hours.length < 2) {
hours = '0' + hours;
}
let minutes = String(now.getMinutes());
if (minutes.length < 2) {
minutes = '0' + minutes;
}
let dayofmonth = String(now.getDate());
if (dayofmonth.length < 2) {
dayofmonth = '0' + dayofmonth;
}
let month = String(now.getMonth() + 1); // 0-11
if (month.length < 2) {
month = '0' + month;
}
let year = String(now.getFullYear());
let datesegment = ' ' + year + '-' + month + '-' + dayofmonth + ' (' + hours + ' ' + minutes + ')';
let filename = belly_name + datesegment + extension;
let blob = new Blob([generateBellyString()], { type: 'text/html;charset=utf8;' });
window.navigator.msSaveOrOpenBlob(blob, filename);
};
return (
<Window width={890} height={660} theme="abstract" resizable>
<Window.Content scrollable>
@@ -190,11 +251,11 @@ export const VorePanel = (props, context) => {
{/* CHOMPEdit - "Belly HTML Export Earlyport" */}
<Flex.Item>
<Button
content="Save Prefs & Open Export Panel"
content="Save Prefs & Export Selected Belly"
icon="download"
onClick={() => {
act('saveprefs');
act('exportpanel');
downloadPrefs();
}}
/>
</Flex.Item>
@@ -276,12 +337,15 @@ const VoreBellySelectionAndCustomization = (props, context) => {
New
<Icon name="plus" ml={0.5} />
</Tabs.Tab>
<<<<<<< HEAD
{/* CHOMPEdit - "Belly HTML Export Earlyport" */}
<Tabs.Tab onClick={() => act('exportpanel')}>
Export
<Icon name="file-export" ml={0.5} />
</Tabs.Tab>
{/* CHOMPEdit End */}
=======
>>>>>>> 3ba4e4b189... Merge pull request #13619 from Cameron653/GREYSCALE_TUMMY_V2
<Divider />
{our_bellies.map((belly) => (
<Tabs.Tab
@@ -779,6 +843,7 @@ const VoreSelectedBellyVisuals = (props, context) => {
const { act } = useBackend(context);
const { belly } = props;
<<<<<<< HEAD
const {
belly_fullscreen,
belly_fullscreen_color,
@@ -913,6 +978,58 @@ const VoreSelectedBellyVisuals = (props, context) => {
onClick={() => act('set_attribute', { attribute: 'b_fullscreen', val: null })}>
Disabled
</Button>
=======
const { belly_fullscreen, possible_fullscreens, disable_hud, belly_fullscreen_color, mapRef, colorization_enabled } =
belly;
return (
<Fragment>
<Section title="Belly Fullscreens Preview and Coloring">
<Flex direction="row">
<Box backgroundColor={belly_fullscreen_color} width="20px" height="20px" />
<Button
icon="eye-dropper"
onClick={() => act('set_attribute', { attribute: 'b_fullscreen_color', val: null })}>
Select Color
</Button>
<LabeledList.Item label="Enable Coloration">
<Button
onClick={() => act('set_attribute', { attribute: 'b_colorization_enabled' })}
icon={colorization_enabled ? 'toggle-on' : 'toggle-off'}
selected={colorization_enabled}
content={colorization_enabled ? 'Yes' : 'No'}
/>
</LabeledList.Item>
<LabeledList.Item label="Preview Belly">
<Button onClick={() => act('set_attribute', { attribute: 'b_preview_belly' })} content={'Preview'} />
</LabeledList.Item>
<LabeledList.Item label="Clear Preview">
<Button onClick={() => act('set_attribute', { attribute: 'b_clear_preview' })} content={'Clear'} />
</LabeledList.Item>
</Flex>
</Section>
<Section>
<Section title="Vore FX">
<LabeledList>
<LabeledList.Item label="Disable Prey HUD">
<Button
onClick={() => act('set_attribute', { attribute: 'b_disable_hud' })}
icon={disable_hud ? 'toggle-on' : 'toggle-off'}
selected={disable_hud}
content={disable_hud ? 'Yes' : 'No'}
/>
</LabeledList.Item>
</LabeledList>
</Section>
<Section title="Belly Fullscreens Styles" width="800px">
Belly styles:
<Button
fluid
selected={belly_fullscreen === '' || belly_fullscreen === null}
onClick={() => act('set_attribute', { attribute: 'b_fullscreen', val: null })}>
Disabled
</Button>
>>>>>>> 3ba4e4b189... Merge pull request #13619 from Cameron653/GREYSCALE_TUMMY_V2
{Object.keys(possible_fullscreens).map((key) => (
<span style={{ width: '256px' }}>
<Button