mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-21 20:20:33 +01:00
Reworks pAIs (#68241)
A pretty heavy refactor for pAIs that just spilled into a rework. Attempts to fully document and organize backend code. Fixes a large number of bugs left untouched for a decade. Breaks down the frontend into subcomponents. Rebalances their software modules. (should) fix pAI faces get removed if you activate them during alert #68242
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
/**
|
||||
* tgui state: paicard_state
|
||||
*
|
||||
* Checks that the paicard is in the user's top-level
|
||||
* (hand, ear, pocket, belt, etc) inventory OR
|
||||
* if the paicard has been slotted into a PDA which
|
||||
* is also on the user's person.
|
||||
*
|
||||
*/
|
||||
|
||||
GLOBAL_DATUM_INIT(paicard_state, /datum/ui_state/paicard_state, new)
|
||||
|
||||
/datum/ui_state/paicard_state/can_use_topic(obj/item/paicard/paicard, mob/user)
|
||||
/// paicard is in the user's closest inventory
|
||||
if(!paicard.slotted && (paicard in user))
|
||||
return user.shared_ui_interaction(paicard)
|
||||
/// paicard is in a pda slot which is in the user's closest inventory
|
||||
if(paicard.slotted && (paicard.loc in user))
|
||||
return user.shared_ui_interaction(paicard)
|
||||
return UI_CLOSE
|
||||
Reference in New Issue
Block a user