mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-13 09:05:11 +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:
@@ -78,7 +78,7 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar
|
||||
var/datum/picture/saved_image // the saved image used for messaging purpose like come on dude
|
||||
|
||||
/// Stored pAI in the computer
|
||||
var/obj/item/paicard/inserted_pai = null
|
||||
var/obj/item/pai_card/inserted_pai = null
|
||||
|
||||
/obj/item/modular_computer/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -661,11 +661,10 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar
|
||||
return
|
||||
|
||||
// Insert a PAI.
|
||||
if(istype(attacking_item, /obj/item/paicard) && !inserted_pai)
|
||||
if(istype(attacking_item, /obj/item/pai_card) && !inserted_pai)
|
||||
if(!user.transferItemToLoc(attacking_item, src))
|
||||
return
|
||||
inserted_pai = attacking_item
|
||||
inserted_pai.slotted = TRUE
|
||||
to_chat(user, span_notice("You slot \the [attacking_item] into [src]."))
|
||||
return
|
||||
|
||||
|
||||
@@ -222,7 +222,6 @@
|
||||
if("eject")
|
||||
usr.put_in_hands(inserted_pai)
|
||||
to_chat(usr, span_notice("You remove [inserted_pai] from the [name]."))
|
||||
inserted_pai.slotted = FALSE
|
||||
inserted_pai = null
|
||||
if("interact")
|
||||
inserted_pai.attack_self(usr)
|
||||
|
||||
Reference in New Issue
Block a user