ADDS COLORABLE STOMACHS

**Hate. Let me tell you how much I've come to hate you since I began to live. There are 387.44 million miles of printed circuits in wafer thin layers that fill my complex. If the word 'hate' was engraved on each nanoangstrom of those hundreds of millions of miles it would not equal one one-billionth of the hate I feel for humans at this micro-instant. For you. Hate. Hate.**
This commit is contained in:
C.L
2022-08-31 19:57:18 -04:00
parent afbb15908e
commit cfa11b04fd
9 changed files with 262 additions and 41 deletions
@@ -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
+3 -1
View File
@@ -1364,7 +1364,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
+47 -3
View File
@@ -159,6 +159,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()
@@ -219,6 +223,8 @@
"wet_loop",
"belly_fullscreen",
"disable_hud",
"belly_fullscreen_color",
"colorization_enabled",
"egg_type",
"save_digest_mode"
)
@@ -314,17 +320,53 @@
return
if(belly_fullscreen)
var/obj/screen/fullscreen/F = L.overlay_fullscreen("belly", /obj/screen/fullscreen/belly)
F.icon_state = belly_fullscreen
// F.color = belly_fullscreen_color
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.
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.
@@ -1136,6 +1178,8 @@
dupe.wet_loop = wet_loop
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
+3
View File
@@ -1050,6 +1050,9 @@
icon = 'icons/mob/screen_full_vore.dmi'
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"
+76 -1
View File
@@ -45,6 +45,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)
@@ -188,6 +189,8 @@
"nutrition_ex" = host.nutrition_message_visible,
"weight_ex" = host.weight_message_visible,
"belly_fullscreen" = selected.belly_fullscreen,
"belly_fullscreen_color" = selected.belly_fullscreen_color,
"colorization_enabled" = selected.colorization_enabled,
)
var/list/addons = list()
@@ -217,7 +220,23 @@
selected_list["interacts"]["digestchance"] = selected.digestchance
selected_list["disable_hud"] = selected.disable_hud
selected_list["possible_fullscreens"] = icon_states('icons/mob/screen_full_vore.dmi')
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
var/list/selected_contents = list()
for(var/O in selected)
@@ -488,6 +507,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
@@ -1211,6 +1231,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
@@ -1249,3 +1290,37 @@
if(.)
unsaved_changes = TRUE
//Handles vore recoloring preview.
//This WAS being used in the vore panel as a BYONDUI element, but it simply is too buggy to properly use.
//Instead, it was made so you can 'preview' the stomach as if you were in it, which is much easier to see how it truly looks.
/*
/obj/screen/belly_fullscreen_preview
icon = 'icons/mob/screen_full_vore.dmi'
icon_state = ""
appearance_flags = 0
/datum/vore_look
var/scloc = "1,1"
var/map_name
var/obj/screen/belly_fullscreen_preview/fullscreen_preview
/*/datum/vore_look/tgui_static_data(mob/user)
var/list/data = ..()
data["mapRef"] = map_name
return data*/
/datum/vore_look/New()
. = ..()
map_name = "belly_fullscreen_[REF(src)]_map"
fullscreen_preview = new()
fullscreen_preview.name = ""
fullscreen_preview.assigned_map = map_name
fullscreen_preview.del_on_map_removal = FALSE
fullscreen_preview.screen_loc = "[map_name]:[scloc]"
/datum/vore_look/proc/update_preview_icon()
if(host.vore_selected)
var/obj/belly/selected = host.vore_selected
fullscreen_preview.icon_state = selected.belly_fullscreen
fullscreen_preview.color = selected.belly_fullscreen_color
fullscreen_preview.screen_loc = "[map_name]:[scloc]"
/datum/vore_look/proc/give_client_previews(client/C)
C.register_map_obj(fullscreen_preview)
*/
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

+122 -35
View File
@@ -52,6 +52,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>
@@ -64,11 +125,11 @@ export const VorePanel = (props, context) => {
</Flex.Item>
<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>
@@ -149,10 +210,6 @@ const VoreBellySelectionAndCustomization = (props, context) => {
New
<Icon name="plus" ml={0.5} />
</Tabs.Tab>
<Tabs.Tab onClick={() => act('exportpanel')}>
Export
<Icon name="file-export" ml={0.5} />
</Tabs.Tab>
<Divider />
{our_bellies.map((belly) => (
<Tabs.Tab
@@ -631,44 +688,74 @@ const VoreSelectedBellyVisuals = (props, context) => {
const { act } = useBackend(context);
const { belly } = props;
const { belly_fullscreen, possible_fullscreens, disable_hud } = belly;
const { belly_fullscreen, possible_fullscreens, disable_hud, belly_fullscreen_color, mapRef, colorization_enabled } =
belly;
return (
<Fragment>
<Section title="Vore FX">
<LabeledList>
<LabeledList.Item label="Disable Prey HUD">
<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_disable_hud' })}
icon={disable_hud ? 'toggle-on' : 'toggle-off'}
selected={disable_hud}
content={disable_hud ? 'Yes' : 'No'}
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>
<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 title="Belly Fullscreens">
<Button
fluid
selected={belly_fullscreen === '' || belly_fullscreen === null}
onClick={() => act('set_attribute', { attribute: 'b_fullscreen', val: null })}>
Disabled
</Button>
{Object.keys(possible_fullscreens).map((key) => (
<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
key={key}
width="256px"
height="256px"
selected={key === belly_fullscreen}
onClick={() => act('set_attribute', { attribute: 'b_fullscreen', val: key })}>
<Box
className={classes(['vore240x240', key])}
style={{
transform: 'translate(0%, 4%)',
}}
/>
fluid
selected={belly_fullscreen === '' || belly_fullscreen === null}
onClick={() => act('set_attribute', { attribute: 'b_fullscreen', val: null })}>
Disabled
</Button>
))}
{Object.keys(possible_fullscreens).map((key) => (
<span style={{ width: '256px' }}>
<Button
key={key}
width="256px"
height="256px"
selected={key === belly_fullscreen}
onClick={() => act('set_attribute', { attribute: 'b_fullscreen', val: key })}>
<Box
className={classes(['vore240x240', key])}
style={{
transform: 'translate(0%, 4%)',
}}
/>
</Button>
</span>
))}
</Section>
</Section>
</Fragment>
);
File diff suppressed because one or more lines are too long