mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
Add optional selectable fullscreen belly overlays with pred & prey prefs
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
clear_fullscreen(category, FALSE)
|
||||
screen = null
|
||||
else if(!severity || severity == screen.severity)
|
||||
return null
|
||||
return screen
|
||||
|
||||
if(!screen)
|
||||
screen = new type()
|
||||
|
||||
@@ -285,6 +285,17 @@
|
||||
InsertAll("", each, global.alldirs)
|
||||
..()
|
||||
|
||||
//VOREStation Add
|
||||
/datum/asset/spritesheet/vore
|
||||
name = "vore"
|
||||
|
||||
/datum/asset/spritesheet/vore/register()
|
||||
var/icon/downscaled = icon('icons/mob/screen_full_vore.dmi')
|
||||
downscaled.Scale(240, 240)
|
||||
InsertAll("", downscaled)
|
||||
..()
|
||||
//VOREStation Add End
|
||||
|
||||
// // Representative icons for each research design
|
||||
// /datum/asset/spritesheet/research_designs
|
||||
// name = "design"
|
||||
|
||||
@@ -1283,16 +1283,8 @@
|
||||
if(blinded)
|
||||
overlay_fullscreen("blind", /obj/screen/fullscreen/blind)
|
||||
throw_alert("blind", /obj/screen/alert/blind)
|
||||
|
||||
else
|
||||
clear_fullscreens()
|
||||
clear_alert("blind")
|
||||
|
||||
if(blinded)
|
||||
overlay_fullscreen("blind", /obj/screen/fullscreen/blind)
|
||||
|
||||
else if(!machine)
|
||||
clear_fullscreens()
|
||||
clear_fullscreen("blind")
|
||||
clear_alert("blind")
|
||||
|
||||
if(disabilities & NEARSIGHTED) //this looks meh but saves a lot of memory by not requiring to add var/prescription
|
||||
@@ -1310,6 +1302,8 @@
|
||||
else
|
||||
clear_alert("high")
|
||||
|
||||
if(!isbelly(loc)) clear_fullscreen("belly") //VOREStation Add - Belly fullscreens safety
|
||||
|
||||
if(config.welder_vision)
|
||||
var/found_welder
|
||||
if(species.short_sighted)
|
||||
|
||||
@@ -117,6 +117,10 @@
|
||||
//List has indexes that are the digestion mode strings, and keys that are lists of strings.
|
||||
var/tmp/list/emote_lists = list()
|
||||
|
||||
// Lets you do a fullscreen overlay. Set to an icon_state string.
|
||||
var/belly_fullscreen = ""
|
||||
var/disable_hud = FALSE
|
||||
|
||||
//For serialization, keep this updated, required for bellies to save correctly.
|
||||
/obj/belly/vars_to_save()
|
||||
return ..() + list(
|
||||
@@ -155,7 +159,9 @@
|
||||
"release_sound",
|
||||
"fancy_vore",
|
||||
"is_wet",
|
||||
"wet_loop"
|
||||
"wet_loop",
|
||||
"belly_fullscreen",
|
||||
"disable_hud"
|
||||
)
|
||||
|
||||
/obj/belly/Initialize()
|
||||
@@ -199,6 +205,7 @@
|
||||
var/taste
|
||||
if(can_taste && (taste = M.get_taste_message(FALSE)))
|
||||
to_chat(owner, "<span class='notice'>[M] tastes of [taste].</span>")
|
||||
vore_fx(M)
|
||||
//Stop AI processing in bellies
|
||||
if(M.ai_holder)
|
||||
M.ai_holder.go_sleep()
|
||||
@@ -208,9 +215,31 @@
|
||||
. = ..()
|
||||
if(isliving(thing) && !isbelly(thing.loc))
|
||||
var/mob/living/L = thing
|
||||
L.clear_fullscreen("belly")
|
||||
if(!L.hud_used.hud_shown)
|
||||
L.toggle_hud_vis()
|
||||
if((L.stat != DEAD) && L.ai_holder)
|
||||
L.ai_holder.go_wake()
|
||||
|
||||
/obj/belly/proc/vore_fx(mob/living/L)
|
||||
if(!istype(L))
|
||||
return
|
||||
if(!L.show_vore_fx)
|
||||
L.clear_fullscreen("belly")
|
||||
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
|
||||
else
|
||||
L.clear_fullscreen("belly")
|
||||
|
||||
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)
|
||||
|
||||
// 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.
|
||||
@@ -684,6 +713,8 @@
|
||||
dupe.fancy_vore = fancy_vore
|
||||
dupe.is_wet = is_wet
|
||||
dupe.wet_loop = wet_loop
|
||||
dupe.belly_fullscreen = belly_fullscreen
|
||||
dupe.disable_hud = disable_hud
|
||||
|
||||
//// Object-holding variables
|
||||
//struggle_messages_outside - strings
|
||||
|
||||
@@ -121,6 +121,9 @@
|
||||
if(L.absorbed)
|
||||
L.Weaken(5)
|
||||
|
||||
// Fullscreen overlays
|
||||
vore_fx(L)
|
||||
|
||||
//Handle 'human'
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/H = L
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
var/adminbus_trash = FALSE // For abusing trash eater for event shenanigans.
|
||||
var/adminbus_eat_minerals = FALSE // This creature subsists on a diet of pure adminium.
|
||||
var/vis_height = 32 // Sprite height used for resize features.
|
||||
var/show_vore_fx = TRUE // Show belly fullscreens
|
||||
|
||||
//
|
||||
// Hook for generic creation of stuff on new creatures
|
||||
@@ -235,6 +236,7 @@
|
||||
P.vore_taste = src.vore_taste
|
||||
P.vore_smell = src.vore_smell
|
||||
P.permit_healbelly = src.permit_healbelly
|
||||
P.show_vore_fx = src.show_vore_fx
|
||||
P.can_be_drop_prey = src.can_be_drop_prey
|
||||
P.can_be_drop_pred = src.can_be_drop_pred
|
||||
|
||||
@@ -266,6 +268,7 @@
|
||||
vore_taste = P.vore_taste
|
||||
vore_smell = P.vore_smell
|
||||
permit_healbelly = P.permit_healbelly
|
||||
show_vore_fx = P.show_vore_fx
|
||||
can_be_drop_prey = P.can_be_drop_prey
|
||||
can_be_drop_pred = P.can_be_drop_pred
|
||||
|
||||
@@ -851,3 +854,8 @@
|
||||
user << browse("<html><head><title>Vore prefs: [src]</title></head><body><center>[dispvoreprefs]</center></body></html>", "window=[name]mvp;size=200x300;can_resize=0;can_minimize=0")
|
||||
onclose(user, "[name]")
|
||||
return
|
||||
|
||||
// Full screen belly overlays!
|
||||
/obj/screen/fullscreen/belly
|
||||
icon = 'icons/mob/screen_full_vore.dmi'
|
||||
icon_state = ""
|
||||
|
||||
@@ -53,6 +53,7 @@ V::::::V V::::::VO:::::::OOO:::::::ORR:::::R R:::::REE::::::EEEEEE
|
||||
var/vore_taste = "nothing in particular"
|
||||
var/vore_smell = "nothing in particular"
|
||||
var/permit_healbelly = TRUE
|
||||
var/show_vore_fx = TRUE
|
||||
var/can_be_drop_prey = FALSE
|
||||
var/can_be_drop_pred = FALSE
|
||||
|
||||
@@ -126,6 +127,7 @@ V::::::V V::::::VO:::::::OOO:::::::ORR:::::R R:::::REE::::::EEEEEE
|
||||
vore_taste = json_from_file["vore_taste"]
|
||||
vore_smell = json_from_file["vore_smell"]
|
||||
permit_healbelly = json_from_file["permit_healbelly"]
|
||||
show_vore_fx = json_from_file["show_vore_fx"]
|
||||
can_be_drop_prey = json_from_file["can_be_drop_prey"]
|
||||
can_be_drop_pred = json_from_file["can_be_drop_pred"]
|
||||
belly_prefs = json_from_file["belly_prefs"]
|
||||
@@ -145,6 +147,8 @@ V::::::V V::::::VO:::::::OOO:::::::ORR:::::R R:::::REE::::::EEEEEE
|
||||
allowmobvore = TRUE
|
||||
if(isnull(permit_healbelly))
|
||||
permit_healbelly = TRUE
|
||||
if(isnull(show_vore_fx))
|
||||
show_vore_fx = TRUE
|
||||
if(isnull(can_be_drop_prey))
|
||||
can_be_drop_prey = FALSE
|
||||
if(isnull(can_be_drop_pred))
|
||||
@@ -170,6 +174,7 @@ V::::::V V::::::VO:::::::OOO:::::::ORR:::::R R:::::REE::::::EEEEEE
|
||||
"vore_taste" = vore_taste,
|
||||
"vore_smell" = vore_smell,
|
||||
"permit_healbelly" = permit_healbelly,
|
||||
"show_vore_fx" = show_vore_fx,
|
||||
"can_be_drop_prey" = can_be_drop_prey,
|
||||
"can_be_drop_pred" = can_be_drop_pred,
|
||||
"belly_prefs" = belly_prefs,
|
||||
|
||||
@@ -40,6 +40,10 @@
|
||||
host = null
|
||||
. = ..()
|
||||
|
||||
/datum/vore_look/ui_assets(mob/user)
|
||||
. = ..()
|
||||
. += get_asset_datum(/datum/asset/spritesheet/vore)
|
||||
|
||||
/datum/vore_look/tgui_interact(mob/user, datum/tgui/ui)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
@@ -148,6 +152,8 @@
|
||||
"digest_burn" = selected.digest_burn,
|
||||
"bulge_size" = selected.bulge_size,
|
||||
"shrink_grow_size" = selected.shrink_grow_size,
|
||||
"belly_fullscreen" = selected.belly_fullscreen,
|
||||
"possible_fullscreens" = icon_states('icons/mob/screen_full_vore.dmi'),
|
||||
)
|
||||
|
||||
data["selected"]["addons"] = list()
|
||||
@@ -172,6 +178,8 @@
|
||||
data["selected"]["interacts"]["absorbchance"] = selected.absorbchance
|
||||
data["selected"]["interacts"]["digestchance"] = selected.digestchance
|
||||
|
||||
data["selected"]["disable_hud"] = selected.disable_hud
|
||||
|
||||
data["selected"]["contents"] = list()
|
||||
for(var/O in selected)
|
||||
var/list/info = list(
|
||||
@@ -197,6 +205,7 @@
|
||||
"digest_leave_remains" = host.digest_leave_remains,
|
||||
"allowmobvore" = host.allowmobvore,
|
||||
"permit_healbelly" = host.permit_healbelly,
|
||||
"show_vore_fx" = host.show_vore_fx,
|
||||
"can_be_drop_prey" = host.can_be_drop_prey,
|
||||
"can_be_drop_pred" = host.can_be_drop_pred,
|
||||
"noisy" = host.noisy,
|
||||
@@ -354,6 +363,16 @@
|
||||
host.client.prefs_vr.permit_healbelly = host.permit_healbelly
|
||||
unsaved_changes = TRUE
|
||||
return TRUE
|
||||
if("toggle_fx")
|
||||
host.show_vore_fx = !host.show_vore_fx
|
||||
if(host.client.prefs_vr)
|
||||
host.client.prefs_vr.show_vore_fx = host.show_vore_fx
|
||||
if(!host.show_vore_fx)
|
||||
host.clear_fullscreen("belly")
|
||||
if(!host.hud_used.hud_shown)
|
||||
host.toggle_hud_vis()
|
||||
unsaved_changes = TRUE
|
||||
return TRUE
|
||||
if("toggle_noisy")
|
||||
host.noisy = !host.noisy
|
||||
unsaved_changes = TRUE
|
||||
@@ -786,6 +805,12 @@
|
||||
if(!isnull(digest_chance_input))
|
||||
host.vore_selected.digestchance = sanitize_integer(digest_chance_input, 0, 100, initial(host.vore_selected.digestchance))
|
||||
. = TRUE
|
||||
if("b_fullscreen")
|
||||
host.vore_selected.belly_fullscreen = params["val"]
|
||||
. = TRUE
|
||||
if("b_disable_hud")
|
||||
host.vore_selected.disable_hud = !host.vore_selected.disable_hud
|
||||
. = TRUE
|
||||
if("b_del")
|
||||
var/alert = alert("Are you sure you want to delete your [lowertext(host.vore_selected.name)]?","Confirmation","Delete","Cancel")
|
||||
if(!(alert == "Delete"))
|
||||
|
||||
BIN
icons/mob/screen_full_vore.dmi
Normal file
BIN
icons/mob/screen_full_vore.dmi
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 518 KiB |
@@ -4,6 +4,7 @@ import { Fragment } from 'inferno';
|
||||
import { useBackend, useLocalState } from "../backend";
|
||||
import { Box, Button, Flex, Collapsible, Icon, LabeledList, NoticeBox, Section, Tabs } from "../components";
|
||||
import { Window } from "../layouts";
|
||||
import { classes } from 'common/react';
|
||||
|
||||
const stats = [
|
||||
null,
|
||||
@@ -197,6 +198,9 @@ const VoreSelectedBelly = (props, context) => {
|
||||
escapable,
|
||||
interacts,
|
||||
contents,
|
||||
belly_fullscreen,
|
||||
possible_fullscreens,
|
||||
disable_hud,
|
||||
} = belly;
|
||||
|
||||
const [tabIndex, setTabIndex] = useLocalState(context, 'tabIndex', 0);
|
||||
@@ -216,6 +220,9 @@ const VoreSelectedBelly = (props, context) => {
|
||||
<Tabs.Tab selected={tabIndex === 3} onClick={() => setTabIndex(3)}>
|
||||
Interactions
|
||||
</Tabs.Tab>
|
||||
<Tabs.Tab selected={tabIndex === 4} onClick={() => setTabIndex(4)}>
|
||||
Belly Styles
|
||||
</Tabs.Tab>
|
||||
</Tabs>
|
||||
{tabIndex === 0 && (
|
||||
<LabeledList>
|
||||
@@ -436,10 +443,50 @@ const VoreSelectedBelly = (props, context) => {
|
||||
</LabeledList>
|
||||
) : "These options only display while interactions are turned on."}
|
||||
</Section>
|
||||
) || "Error."}
|
||||
) || tabIndex === 4 && (
|
||||
<Fragment>
|
||||
<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">
|
||||
<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 => (
|
||||
<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>
|
||||
))}
|
||||
</Section>
|
||||
</Fragment>
|
||||
) || "Error"}
|
||||
</Fragment>
|
||||
);
|
||||
};
|
||||
|
||||
const VoreContentsPanel = (props, context) => {
|
||||
const { act } = useBackend(context);
|
||||
const {
|
||||
@@ -501,6 +548,7 @@ const VoreUserPreferences = (props, context) => {
|
||||
digest_leave_remains,
|
||||
allowmobvore,
|
||||
permit_healbelly,
|
||||
show_vore_fx,
|
||||
can_be_drop_prey,
|
||||
can_be_drop_pred,
|
||||
noisy,
|
||||
@@ -615,7 +663,7 @@ const VoreUserPreferences = (props, context) => {
|
||||
: "Click here to turn on hunger noises.")}
|
||||
content={noisy ? "Hunger Noises Enabled" : "Hunger Noises Disabled"} />
|
||||
</Flex.Item>
|
||||
<Flex.Item basis="100%">
|
||||
<Flex.Item basis="49%">
|
||||
<Button
|
||||
onClick={() => act("toggle_leaveremains")}
|
||||
icon={digest_leave_remains ? "toggle-on" : "toggle-off"}
|
||||
@@ -629,6 +677,20 @@ const VoreUserPreferences = (props, context) => {
|
||||
+ " Click this to allow leaving remains.")}
|
||||
content={digest_leave_remains ? "Allow Leaving Remains Behind" : "Do Not Allow Leaving Remains Behind"} />
|
||||
</Flex.Item>
|
||||
<Flex.Item basis="49%">
|
||||
<Button
|
||||
onClick={() => act("toggle_fx")}
|
||||
icon={show_vore_fx ? "toggle-on" : "toggle-off"}
|
||||
selected={show_vore_fx}
|
||||
fluid
|
||||
tooltipPosition="top"
|
||||
tooltip={show_vore_fx
|
||||
? "This setting controls whether or not a pred is allowed to mess with your HUD and fullscreen overlays."
|
||||
+ "Click to disable all FX."
|
||||
: ("Regardless of Predator Setting, you will not see their FX settings."
|
||||
+ " Click this to enable showing FX.")}
|
||||
content={show_vore_fx ? "Show Vore FX" : "Do Not Show Vore FX"} />
|
||||
</Flex.Item>
|
||||
<Flex.Item basis="49%">
|
||||
<Button
|
||||
fluid
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user