diff --git a/code/__defines/vore_prefs.dm b/code/__defines/vore_prefs.dm index 35e7b63546..2d926e3572 100644 --- a/code/__defines/vore_prefs.dm +++ b/code/__defines/vore_prefs.dm @@ -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; \ diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/vore.dm b/code/modules/mob/living/simple_mob/subtypes/vore/vore.dm index bf7bacf0e0..426a14a864 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/vore.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/vore.dm @@ -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 diff --git a/code/modules/vore/eating/belly_obj_vr.dm b/code/modules/vore/eating/belly_obj_vr.dm index d9bb5e4be2..01dc575d79 100644 --- a/code/modules/vore/eating/belly_obj_vr.dm +++ b/code/modules/vore/eating/belly_obj_vr.dm @@ -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 diff --git a/code/modules/vore/eating/mob_vr.dm b/code/modules/vore/eating/mob_vr.dm index be2dd6b73c..c98eec0bd8 100644 --- a/code/modules/vore/eating/mob_vr.dm +++ b/code/modules/vore/eating/mob_vr.dm @@ -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 diff --git a/code/modules/vore/eating/panel_databackend/vorepanel_pref_data.dm b/code/modules/vore/eating/panel_databackend/vorepanel_pref_data.dm index 56c48d35f6..5cfeec8529 100644 --- a/code/modules/vore/eating/panel_databackend/vorepanel_pref_data.dm +++ b/code/modules/vore/eating/panel_databackend/vorepanel_pref_data.dm @@ -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" diff --git a/code/modules/vore/eating/vore_vr.dm b/code/modules/vore/eating/vore_vr.dm index 64f1901364..e53f55ff94 100644 --- a/code/modules/vore/eating/vore_vr.dm +++ b/code/modules/vore/eating/vore_vr.dm @@ -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 diff --git a/code/modules/vore/eating/vorepanel_vr.dm b/code/modules/vore/eating/vorepanel_vr.dm index 2738c7b604..122d39e896 100644 --- a/code/modules/vore/eating/vorepanel_vr.dm +++ b/code/modules/vore/eating/vorepanel_vr.dm @@ -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) diff --git a/tgui/packages/tgui/interfaces/Canvas.tsx b/tgui/packages/tgui/interfaces/Canvas.tsx index 67815a992c..84f74cbfe5 100644 --- a/tgui/packages/tgui/interfaces/Canvas.tsx +++ b/tgui/packages/tgui/interfaces/Canvas.tsx @@ -175,8 +175,6 @@ class PaintCanvas extends Component { 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++) { diff --git a/tgui/packages/tgui/interfaces/VorePanel/VorePanelMainTabs/VoreUserPreferences.tsx b/tgui/packages/tgui/interfaces/VorePanel/VorePanelMainTabs/VoreUserPreferences.tsx index 0ec6607ecd..3dff43773b 100644 --- a/tgui/packages/tgui/interfaces/VorePanel/VorePanelMainTabs/VoreUserPreferences.tsx +++ b/tgui/packages/tgui/interfaces/VorePanel/VorePanelMainTabs/VoreUserPreferences.tsx @@ -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} /> + ); }; diff --git a/tgui/packages/tgui/interfaces/VorePanel/VoreUserPreferencesTabs/VoreUserPreferencesFX.tsx b/tgui/packages/tgui/interfaces/VorePanel/VoreUserPreferencesTabs/VoreUserPreferencesFX.tsx new file mode 100644 index 0000000000..0916b290fe --- /dev/null +++ b/tgui/packages/tgui/interfaces/VorePanel/VoreUserPreferencesTabs/VoreUserPreferencesFX.tsx @@ -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 ( +
+ } + > + {show_vore_fx ? ( + + + + + + ) : null} +
+ ); +}; diff --git a/tgui/packages/tgui/interfaces/VorePanel/VoreUserPreferencesTabs/VoreUserPreferencesMechanical.tsx b/tgui/packages/tgui/interfaces/VorePanel/VoreUserPreferencesTabs/VoreUserPreferencesMechanical.tsx index 9bdbc5746d..6328bf060c 100644 --- a/tgui/packages/tgui/interfaces/VorePanel/VoreUserPreferencesTabs/VoreUserPreferencesMechanical.tsx +++ b/tgui/packages/tgui/interfaces/VorePanel/VoreUserPreferencesTabs/VoreUserPreferencesMechanical.tsx @@ -93,25 +93,25 @@ export const VoreUserPreferencesMechanical = (props: { diff --git a/tgui/packages/tgui/interfaces/VorePanel/types.ts b/tgui/packages/tgui/interfaces/VorePanel/types.ts index 29d9579089..ec0c820fc5 100644 --- a/tgui/packages/tgui/interfaces/VorePanel/types.ts +++ b/tgui/packages/tgui/interfaces/VorePanel/types.ts @@ -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 = {