[MIRROR] Minor Tweaks & Changes (#11063)

Co-authored-by: ShadowLarkens <shadowlarkens@gmail.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-06-13 00:16:38 -07:00
committed by GitHub
parent 6f1ee5ce78
commit 7ee1ac6c7d
12 changed files with 84 additions and 14 deletions

View File

@@ -50,6 +50,7 @@
target.no_latejoin_prey_warning_time = source.no_latejoin_prey_warning_time; \
target.no_latejoin_vore_warning_persists = source.no_latejoin_vore_warning_persists;\
target.no_latejoin_prey_warning_persists = source.no_latejoin_prey_warning_persists;\
target.max_voreoverlay_alpha = source.max_voreoverlay_alpha; \
\
target.autotransferable = source.autotransferable; \
target.strip_pref = source.strip_pref; \

View File

@@ -72,6 +72,7 @@
no_latejoin_prey_warning_time = client.prefs_vr.no_latejoin_prey_warning_time
no_latejoin_vore_warning_persists = client.prefs_vr.no_latejoin_vore_warning_persists
no_latejoin_prey_warning_persists = client.prefs_vr.no_latejoin_prey_warning_persists
max_voreoverlay_alpha = client.prefs_vr.max_voreoverlay_alpha
belly_rub_target = client.prefs_vr.belly_rub_target
soulcatcher_pref_flags = client.prefs_vr.soulcatcher_pref_flags
persistend_edit_mode = client.prefs_vr.persistend_edit_mode

View File

@@ -663,23 +663,25 @@
var/datum/belly_overlays/lookup_belly_path = text2path("/datum/belly_overlays/[lowertext(belly_fullscreen)]")
if(!lookup_belly_path)
CRASH("Icon datum was not defined for [belly_fullscreen]")
var/alpha = min(belly_fullscreen_alpha, L.max_voreoverlay_alpha)
F.icon = initial(lookup_belly_path.belly_icon)
F.cut_overlays()
var/image/I = image(F.icon, belly_fullscreen) //Would be cool if I could just include color and alpha in the image define so we don't have to copy paste
I.color = belly_fullscreen_color
I.alpha = belly_fullscreen_alpha
I.alpha = alpha
F.add_overlay(I)
I = image(F.icon, belly_fullscreen+"-2")
I.color = belly_fullscreen_color2
I.alpha = belly_fullscreen_alpha
I.alpha = alpha
F.add_overlay(I)
I = image(F.icon, belly_fullscreen+"-3")
I.color = belly_fullscreen_color3
I.alpha = belly_fullscreen_alpha
I.alpha = alpha
F.add_overlay(I)
I = image(F.icon, belly_fullscreen+"-4")
I.color = belly_fullscreen_color4
I.alpha = belly_fullscreen_alpha
I.alpha = alpha
F.add_overlay(I)
var/extra_mush = 0
var/extra_mush_color = mush_color
@@ -695,13 +697,13 @@
if(!mush_overlay)
I = image('icons/mob/vore_fullscreens/bubbles.dmi', "mush")
I.color = extra_mush_color
I.alpha = custom_ingested_alpha
I.alpha = min(custom_ingested_alpha, L.max_voreoverlay_alpha)
I.pixel_y = -450 + ((450 / max(max_ingested, 1)) * min(max_ingested, ingested.total_volume))
F.add_overlay(I)
if(show_liquids && L.liquidbelly_visuals && mush_overlay && (owner.nutrition > 0 || max_mush == 0 || min_mush > 0 || (LAZYLEN(contents) * item_mush_val) > 0))
I = image('icons/mob/vore_fullscreens/bubbles.dmi', "mush")
I.color = mush_color
I.alpha = mush_alpha
I.alpha = min(mush_alpha, L.max_voreoverlay_alpha)
var/total_mush_content = owner.nutrition + LAZYLEN(contents) * item_mush_val + extra_mush
I.pixel_y = -450 + (450 / max(max_mush, 1) * max(min(max_mush, total_mush_content), 1))
if(I.pixel_y < -450 + (450 / 100 * min_mush))
@@ -728,6 +730,7 @@
else
I.alpha = max(150, min(custom_max_volume, 255)) - (255 - belly_fullscreen_alpha)
I.pixel_y = -450 + min((450 / custom_max_volume * reagents.total_volume), 450 / 100 * max_liquid_level)
I.alpha = min(I.alpha, L.max_voreoverlay_alpha)
F.add_overlay(I)
F.update_for_view(L.client.view)
else

View File

@@ -94,3 +94,5 @@
var/enabled = TRUE //Pauses a mob if disabled (Prevents life ticks from happening)
var/died_in_vr = FALSE //For virtual reality sleepers
var/last_move_time = 0 //For movement smoothing
var/max_voreoverlay_alpha = 255

View File

@@ -47,7 +47,8 @@
"soulcatcher_allow_capture" = owner.soulcatcher_pref_flags & SOULCATCHER_ALLOW_CAPTURE,
"soulcatcher_allow_transfer" = owner.soulcatcher_pref_flags & SOULCATCHER_ALLOW_TRANSFER,
"soulcatcher_allow_takeover" = owner.soulcatcher_pref_flags & SOULCATCHER_ALLOW_TAKEOVER,
"soulcatcher_allow_deletion" = (global_flag_check(owner.soulcatcher_pref_flags, SOULCATCHER_ALLOW_DELETION) + global_flag_check(owner.soulcatcher_pref_flags, SOULCATCHER_ALLOW_DELETION_INSTANT))
"soulcatcher_allow_deletion" = (global_flag_check(owner.soulcatcher_pref_flags, SOULCATCHER_ALLOW_DELETION) + global_flag_check(owner.soulcatcher_pref_flags, SOULCATCHER_ALLOW_DELETION_INSTANT)),
"max_voreoverlay_alpha" = owner.max_voreoverlay_alpha,
)
#define SET_TASTE "Set Taste"

View File

@@ -92,6 +92,7 @@
var/belly_rub_target = null
var/soulcatcher_pref_flags = 0
var/list/soulcatcher_prefs = list()
var/max_voreoverlay_alpha = 255
var/persistend_edit_mode = FALSE
var/list/belly_prefs = list()
@@ -250,6 +251,7 @@
soulcatcher_pref_flags = json_from_file["soulcatcher_pref_flags"]
soulcatcher_prefs = json_from_file["soulcatcher_prefs"]
persistend_edit_mode = json_from_file["persistend_edit_mode"]
max_voreoverlay_alpha = json_from_file["max_voreoverlay_alpha"]
//Quick sanitize
if(isnull(digestable))
@@ -381,6 +383,8 @@
soulcatcher_prefs = list()
if(isnull(persistend_edit_mode))
persistend_edit_mode = FALSE
if(isnull(max_voreoverlay_alpha))
max_voreoverlay_alpha = 255
return TRUE
@@ -443,7 +447,8 @@
"belly_rub_target" = belly_rub_target,
"soulcatcher_pref_flags" = soulcatcher_pref_flags,
"soulcatcher_prefs" = soulcatcher_prefs,
"persistend_edit_mode" = persistend_edit_mode
"persistend_edit_mode" = persistend_edit_mode,
"max_voreoverlay_alpha" = max_voreoverlay_alpha,
)
//List to JSON

View File

@@ -494,6 +494,16 @@
host.noisy = !host.noisy
unsaved_changes = TRUE
return TRUE
if("set_max_voreoverlay_alpha")
var/new_alpha = CLAMP(params["val"], 0, 255)
host.max_voreoverlay_alpha = new_alpha
if(host.client.prefs_vr)
host.client.prefs_vr.max_voreoverlay_alpha = host.max_voreoverlay_alpha
if (isbelly(host.loc))
var/obj/belly/B = host.loc
B.vore_fx(host, TRUE)
unsaved_changes = TRUE
return TRUE
// liquid belly code
if("liq_set_attribute")
return liq_set_attr(ui.user, params)

View File

@@ -175,8 +175,6 @@ class PaintCanvas extends Component<PaintCanvasProps> {
if (this.mouseIsDown && propSource.tool === Tool.Line) {
this.drawLine(grid);
} else if (propSource.tool === Tool.Fill) {
this.areaFill(grid);
}
for (let x = 0; x < grid.length; x++) {

View File

@@ -4,6 +4,7 @@ import type { BooleanLike } from 'tgui-core/react';
import { digestModeToColor } from '../constants';
import type { localPrefs, prefData } from '../types';
import { VoreUserPreferencesDevouring } from '../VoreUserPreferencesTabs/VoreUserPreferencesDevouring';
import { VoreUserPreferencesFX } from '../VoreUserPreferencesTabs/VoreUserPreferencesFX';
import { VoreUserPreferencesMechanical } from '../VoreUserPreferencesTabs/VoreUserPreferencesMechanical';
import { VoreUserPreferencesSoulcatcher } from '../VoreUserPreferencesTabs/VoreUserPreferencesSoulcatcher';
import { VoreUserPreferencesSpawn } from '../VoreUserPreferencesTabs/VoreUserPreferencesSpawn';
@@ -61,6 +62,7 @@ export const VoreUserPreferences = (props: {
soulcatcher_allow_transfer,
soulcatcher_allow_deletion,
soulcatcher_allow_takeover,
max_voreoverlay_alpha,
} = prefs;
const preferences: localPrefs = {
@@ -714,6 +716,11 @@ export const VoreUserPreferences = (props: {
no_spawnprey_warning_time={no_spawnprey_warning_time}
no_spawnprey_warning_save={no_spawnprey_warning_save}
/>
<VoreUserPreferencesFX
preferences={preferences}
show_vore_fx={show_vore_fx}
max_voreoverlay_alpha={max_voreoverlay_alpha}
/>
</Section>
);
};

View File

@@ -0,0 +1,41 @@
import { LabeledList, Section } from 'tgui-core/components';
import { type BooleanLike } from 'tgui-core/react';
import { type localPrefs } from '../types';
import { VorePanelEditNumber } from '../VorePanelElements/VorePanelEditNumber';
import { VoreUserPreferenceItem } from '../VorePanelElements/VoreUserPreferenceItem';
export const VoreUserPreferencesFX = (props: {
preferences: localPrefs;
show_vore_fx: BooleanLike;
max_voreoverlay_alpha: number;
}) => {
const { preferences, show_vore_fx, max_voreoverlay_alpha } = props;
return (
<Section
title="Vore FX"
buttons={
<VoreUserPreferenceItem
spec={preferences.vore_fx}
tooltipPosition="right"
/>
}
>
{show_vore_fx ? (
<LabeledList>
<LabeledList.Item label="Max Overlay Alpha">
<VorePanelEditNumber
editMode
action="set_max_voreoverlay_alpha"
value={max_voreoverlay_alpha}
minValue={0}
maxValue={255}
tooltip="Sets the maximum opacity of vore overlays, so that you can always have them be transparent if you want."
/>
</LabeledList.Item>
</LabeledList>
) : null}
</Section>
);
};

View File

@@ -93,25 +93,25 @@ export const VoreUserPreferencesMechanical = (props: {
</Stack.Item>
<Stack.Item basis="32%">
<VoreUserPreferenceItem
spec={preferences.vore_fx}
spec={preferences.spontaneous_tf}
tooltipPosition="right"
/>
</Stack.Item>
<Stack.Item basis="32%" grow>
<VoreUserPreferenceItem
spec={preferences.spontaneous_tf}
spec={preferences.mind_transfer}
tooltipPosition="top"
/>
</Stack.Item>
<Stack.Item basis="32%">
<VoreUserPreferenceItem
spec={preferences.mind_transfer}
spec={preferences.allow_mimicry}
tooltipPosition="left"
/>
</Stack.Item>
<Stack.Item basis="32%">
<VoreUserPreferenceItem
spec={preferences.allow_mimicry}
spec={preferences.toggle_consume_liquid_belly}
tooltipPosition="right"
/>
</Stack.Item>

View File

@@ -327,6 +327,7 @@ export type prefData = {
soulcatcher_allow_transfer: BooleanLike;
soulcatcher_allow_deletion: BooleanLike;
soulcatcher_allow_takeover: BooleanLike;
max_voreoverlay_alpha: number;
};
export type scMessageData = {