Adds icons to malf module picker UI. Slightly dejanks malf module buying code. (#96546)

## About The Pull Request

- Adds icons to the malf module picker.
- AI modules can either set icon/icon_state or leave it empty and
fallback to active ability icon (if it has one)
- Removes redundant module picker code from the malf antag datum. Module
picker datum handles both malf and combat upgrade UIs now.
- This split it into two separate UI buttons, but I kinda like it this
way anyways
- General code "improvements".
  - Removed unused UI state vars
- Flattened list of modules since it was just getting instantly
flattened by the UI anyways
- Actually utilizes GenericUplink's category sorting instead of handling
it on the backend

## Why It's Good For The Game

<img width="794" height="603" alt="wowee"
src="https://github.com/user-attachments/assets/fd4abeae-e7d5-4f31-ade8-117d69923a45"
/>

Instead of

<img width="738" height="490" alt="sad"
src="https://github.com/user-attachments/assets/17bfad21-a4ac-4d2e-8057-abb732db4a51"
/>


## Changelog

🆑
fix: malf ai module picker actually has icons to load for the modules
code: Malf antag datum is no longer responsible for handling module
purchases. You again buy modules through the dedicated module picker
button.
/🆑

---------

Co-authored-by: afonamos <d.splinter@live.com>
This commit is contained in:
afo
2026-06-21 20:53:33 +02:00
committed by GitHub
co-authored by afonamos
parent 68f619a29c
commit 37845c2100
7 changed files with 104 additions and 213 deletions
+2 -3
View File
@@ -895,9 +895,8 @@
to_chat(src, "You are also capable of hacking APCs, which grants you more points to spend on your Malfunction powers. The drawback is that a hacked APC will give you away if spotted by the crew. Hacking an APC takes 60 seconds.")
view_core() //A BYOND bug requires you to be viewing your core before your verbs update
malf_picker = new /datum/module_picker
if(!IS_MALF_AI(src)) //antagonists have their modules built into their antag info panel. this is for adminbus and the combat upgrade
modules_action = new(malf_picker)
modules_action.Grant(src)
modules_action = new(malf_picker)
modules_action.Grant(src)
/mob/living/silicon/ai/reset_perspective(atom/new_eye)
SHOULD_CALL_PARENT(FALSE) // I hate you all