More pAI Stuff (#10647)

This commit is contained in:
Geeves
2021-01-16 13:56:24 +02:00
committed by GitHub
parent 01a0b1bac2
commit bb18e617b3
13 changed files with 79 additions and 17 deletions

View File

@@ -69,7 +69,6 @@
to_chat(user, SPAN_NOTICE("You install \the [H] into \the [src]."))
verbs += /obj/item/modular_computer/proc/eject_personal_ai
personal_ai.pai.parent_computer = src
personal_ai.pai.verbs += /mob/living/silicon/pai/proc/personal_computer_interact
to_chat(personal_ai.pai, SPAN_NOTICE("You gain access to \the [src]'s computronics."))
user.drop_from_inventory(H, src)
update_icon()
@@ -119,7 +118,6 @@
H.forceMove(get_turf(src))
if(put_in_hands)
user.put_in_hands(H)
personal_ai.pai.verbs -= /mob/living/silicon/pai/proc/personal_computer_interact
to_chat(personal_ai.pai, SPAN_NOTICE("You lose access to \the [src]'s computronics."))
personal_ai.pai.parent_computer = null
update_icon()

View File

@@ -188,6 +188,10 @@
return attack_self(user)
return ..()
// pai can take a look, but they cannot interact with the UI
/obj/item/modular_computer/attack_pai(mob/user)
return attack_self(user)
// On-click handling. Turns on the computer if it's off and opens the GUI.
/obj/item/modular_computer/attack_self(mob/user)
if(enabled && screen_on)