From 46f14374bff9cbb6c8ea404e653736da77b5cde5 Mon Sep 17 00:00:00 2001 From: Kubisopplay <38842052+Kubisopplay@users.noreply.github.com> Date: Sat, 12 Jul 2025 01:01:29 +0200 Subject: [PATCH] Tweaks to biddler malf (#92039) ## About The Pull Request Fixes the bugged malf ai descriptions, properly describing which modules need minimum number of hacked apcs Adds a processing power limit to discourage just sitting on your ass for 2 hours to stack up infinite points Increases the power draw of hacked APCs to increase the phantom drain on powernet brought by malf hacking a lot ## Why It's Good For The Game Discourages hacking two apcs and waiting for next two hours. Also having working descriptions is cool. --- code/__DEFINES/antagonists.dm | 2 ++ code/modules/antagonists/malf_ai/malf_ai.dm | 2 ++ code/modules/power/apc/apc_main.dm | 2 +- tgui/packages/tgui/interfaces/common/MalfAiModules.tsx | 8 ++++---- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/code/__DEFINES/antagonists.dm b/code/__DEFINES/antagonists.dm index 5f9bdfab86e..cacd490a412 100644 --- a/code/__DEFINES/antagonists.dm +++ b/code/__DEFINES/antagonists.dm @@ -450,3 +450,5 @@ GLOBAL_LIST_INIT(human_invader_antagonists, list( /// Camera net used by battle royale objective #define BATTLE_ROYALE_CAMERA_NET "battle_royale_camera_net" + +#define MALF_MAX_PP 400 diff --git a/code/modules/antagonists/malf_ai/malf_ai.dm b/code/modules/antagonists/malf_ai/malf_ai.dm index 0821969d1f1..71fd784490e 100644 --- a/code/modules/antagonists/malf_ai/malf_ai.dm +++ b/code/modules/antagonists/malf_ai/malf_ai.dm @@ -180,6 +180,7 @@ var/list/data = list() data["processingTime"] = malf_ai.malf_picker.processing_time data["compactMode"] = module_picker_compactmode + data["hackedAPCs"] = malf_ai.hacked_apcs.len return data /datum/antagonist/malf_ai/ui_static_data(mob/living/silicon/ai/malf_ai) @@ -211,6 +212,7 @@ "name" = mod.name, "cost" = mod.cost, "desc" = mod.description, + "minimum_apcs" = mod.minimum_apcs, )) data["categories"] += list(cat) diff --git a/code/modules/power/apc/apc_main.dm b/code/modules/power/apc/apc_main.dm index 418726a3e8a..9d8c04c9cba 100644 --- a/code/modules/power/apc/apc_main.dm +++ b/code/modules/power/apc/apc_main.dm @@ -594,7 +594,7 @@ hacked_flicker_counter = hacked_flicker_counter - 1 if(hacked_flicker_counter <= 0) flicker_hacked_icon() - if(COOLDOWN_FINISHED(src, malf_ai_pt_generation) && cell.use(30 KILO JOULES)>0) // Over time generation of malf points for the ai controlling it, costs a bit of power + if(COOLDOWN_FINISHED(src, malf_ai_pt_generation) && cell.use(60 KILO JOULES)>0 && malfai.malf_picker.processing_time(); - const { processingTime, apcsHacked, categories = [] } = data; + const { processingTime, hackedAPCs, categories = [] } = data; const categoriesList: string[] = []; const items: MalfItem[] = []; @@ -35,10 +35,10 @@ export function MalfAiModules(props) { cost: `${item.cost} PT`, desc: item.desc + - (item.minimum_apcs + (item.minimum_apcs > 0 ? ` Requires at least ${item.minimum_apcs} APCs hacked.` : ''), - disabled: processingTime < item.cost || apcsHacked < item.minimum_apcs, + disabled: processingTime < item.cost || hackedAPCs < item.minimum_apcs, icon_state: item.icon_state, icon: item.icon, id: item.name,