From 79fec1d69383ae68fb4ea554f13cb596cbd1170d Mon Sep 17 00:00:00 2001 From: Verkister Date: Thu, 18 Nov 2021 15:03:49 +0200 Subject: [PATCH] Adds autotransfer min/max buttons to vorepanel The formerly experimental settings are now accessible for everyone now since the vorepanel complexity was reduced to make room for more buttons. --- code/modules/vore/eating/vorepanel_vr.dm | 12 ++++++++++++ tgui/packages/tgui/interfaces/VorePanel.js | 10 ++++++++++ tgui/public/tgui.bundle.js | 2 +- 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/code/modules/vore/eating/vorepanel_vr.dm b/code/modules/vore/eating/vorepanel_vr.dm index 0a0318ff43..3bf8bf4dac 100644 --- a/code/modules/vore/eating/vorepanel_vr.dm +++ b/code/modules/vore/eating/vorepanel_vr.dm @@ -220,6 +220,8 @@ selected_list["autotransfer"]["autotransferchance"] = selected.autotransferchance selected_list["autotransfer"]["autotransferwait"] = selected.autotransferwait selected_list["autotransfer"]["autotransferlocation"] = selected.autotransferlocation + selected_list["autotransfer"]["autotransfer_min_amount"] = selected.autotransfer_min_amount + selected_list["autotransfer"]["autotransfer_max_amount"] = selected.autotransfer_max_amount selected_list["disable_hud"] = selected.disable_hud selected_list["possible_fullscreens"] = icon_states('icons/mob/screen_preview_vore_ch.dmi') //CHOMPedit @@ -1079,6 +1081,16 @@ else host.vore_selected.autotransferlocation = choice.name . = TRUE + if("b_autotransfer_min_amount") + var/autotransfer_min_amount_input = input(user, "Set the minimum amount of items your belly can belly auto-transfer at once. Set to 0 for no limit.", "Auto-Transfer Min Amount") as num|null + if(!isnull(autotransfer_min_amount_input)) + host.vore_selected.autotransfer_min_amount = sanitize_integer(autotransfer_min_amount_input, 0, 100, initial(host.vore_selected.autotransfer_min_amount)) + . = TRUE + if("b_autotransfer_max_amount") + var/autotransfer_max_amount_input = input(user, "Set the maximum amount of items your belly can belly auto-transfer at once. Set to 0 for no limit.", "Auto-Transfer Max Amount") as num|null + if(!isnull(autotransfer_max_amount_input)) + host.vore_selected.autotransfer_max_amount = sanitize_integer(autotransfer_max_amount_input, 0, 100, initial(host.vore_selected.autotransfer_max_amount)) + . = TRUE if("b_autotransfer_enabled") host.vore_selected.autotransfer_enabled = !host.vore_selected.autotransfer_enabled . = TRUE //CHOMPedit End diff --git a/tgui/packages/tgui/interfaces/VorePanel.js b/tgui/packages/tgui/interfaces/VorePanel.js index ce8877bf9d..b0b77a3647 100644 --- a/tgui/packages/tgui/interfaces/VorePanel.js +++ b/tgui/packages/tgui/interfaces/VorePanel.js @@ -796,6 +796,16 @@ const VoreSelectedBellyInteractions = (props, context) => { content={autotransfer.autotransferlocation ? autotransfer.autotransferlocation : "Disabled"} onClick={() => act("set_attribute", { attribute: "b_autotransferlocation" })} /> + +