From 7b173258099aef4a7ba93b36c979f6596ffab057 Mon Sep 17 00:00:00 2001 From: Kashargul <144968721+Kashargul@users.noreply.github.com> Date: Fri, 17 Nov 2023 19:46:13 +0100 Subject: [PATCH 1/2] Vorepanel fixes + VTEC toggle fixed typo in the vorepanel tgui, resulting in Item Vorebelly Size Mult: not being changebale fixed a wrong variable use which led to broken sprites in case the Mob Vorebelly Size Mult: was tset to 0. added VTEC toggle. --- code/game/objects/items/robot/robot_upgrades.dm | 6 +++--- code/modules/mob/living/silicon/robot/robot.dm | 12 +++++++++++- tgui/packages/tgui/interfaces/VorePanel.js | 2 +- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm index 2a79c6aaac..474ef45c6b 100644 --- a/code/game/objects/items/robot/robot_upgrades.dm +++ b/code/game/objects/items/robot/robot_upgrades.dm @@ -86,9 +86,9 @@ /obj/item/borg/upgrade/vtec/action(var/mob/living/silicon/robot/R) if(..()) return 0 - if(R.speed == -1) + if(R.speed == -1 || (/mob/living/silicon/robot/proc/toggle_vtec in R.verbs)) return 0 - + R.verbs += /mob/living/silicon/robot/proc/toggle_vtec R.speed-- return 1 @@ -214,4 +214,4 @@ R.add_language(LANGUAGE_TERMINUS, 1) R.add_language(LANGUAGE_ZADDAT, 1) - return 1 \ No newline at end of file + return 1 diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index ed8bdbf3cb..a497d9b86b 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -476,6 +476,16 @@ else stat(null, text("No Cell Inserted!")) +// function to toggle VTEC once installed +/mob/living/silicon/robot/proc/toggle_vtec() + set name = "Toggle VTEC" + set category = "Abilities" + if(speed == -1) + to_chat(src, "VTEC module disbaled.") + speed = 0 + else + to_chat(src, "VTEC module enabled.") + speed = -1 // update the status screen display /mob/living/silicon/robot/Stat() @@ -895,7 +905,7 @@ if(LAZYLEN(vore_selected.contents) > 0) for(var/borgfood in vore_selected.contents) //"inspired" (kinda copied) from Chompstation's belly fullness system's procs if(istype(borgfood, /mob/living)) - if(vore_selected.belly_item_mult <= 0) //If mobs dont contribute, dont calculate further + if(vore_selected.belly_mob_mult <= 0) //If mobs dont contribute, dont calculate further continue var/mob/living/prey = borgfood //typecast to living belly_size += (prey.size_multiplier / size_multiplier) / vore_selected.belly_mob_mult //Smaller prey are less filling to larger bellies diff --git a/tgui/packages/tgui/interfaces/VorePanel.js b/tgui/packages/tgui/interfaces/VorePanel.js index 7bd8bd7e1d..da75ebf89c 100644 --- a/tgui/packages/tgui/interfaces/VorePanel.js +++ b/tgui/packages/tgui/interfaces/VorePanel.js @@ -763,7 +763,7 @@ const VoreSelectedMobTypeBellyButtons = (props, context) => {