mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-19 20:06:28 +01:00
pAI Computer Piloting (#8842)
pAI can now be put into modular computers to control them. When a pAI is inserted, a new service will be unlocked, which can disable their access to the computer. The VueUI change wasn't tested, but finding and replacing should leave the functionality unchanged.
This commit is contained in:
@@ -30,6 +30,16 @@
|
||||
|
||||
proc_eject_ai(usr)
|
||||
|
||||
/obj/item/modular_computer/verb/eject_personal_ai()
|
||||
set name = "Eject Personal AI"
|
||||
set category = "Object"
|
||||
set src in view(1)
|
||||
|
||||
if(use_check_and_message(usr))
|
||||
return
|
||||
|
||||
proc_eject_personal_ai(usr)
|
||||
|
||||
/obj/item/modular_computer/proc/proc_eject_id(mob/user)
|
||||
if(!user)
|
||||
user = usr
|
||||
@@ -87,6 +97,17 @@
|
||||
ai_slot.update_power_usage()
|
||||
update_uis()
|
||||
|
||||
/obj/item/modular_computer/proc/proc_eject_personal_ai(mob/user)
|
||||
if(!personal_ai)
|
||||
to_chat(user, SPAN_WARNING("There is no personal AI connected to \the [src]."))
|
||||
return
|
||||
|
||||
personal_ai.pai.verbs -= /mob/living/silicon/pai/proc/personal_computer_interact
|
||||
personal_ai.pai.parent_computer = null
|
||||
to_chat(personal_ai.pai, SPAN_NOTICE("You lose access to \the [src]'s computronics."))
|
||||
uninstall_component(user, personal_ai, put_in_hands = TRUE)
|
||||
update_uis()
|
||||
|
||||
/obj/item/modular_computer/attack_ghost(var/mob/abstract/observer/user)
|
||||
if(enabled)
|
||||
ui_interact(user)
|
||||
@@ -154,6 +175,8 @@
|
||||
try_install_component(user, C)
|
||||
else
|
||||
to_chat(user, SPAN_WARNING("This component is too large for \the [src]."))
|
||||
if(istype(W, /obj/item/device/paicard))
|
||||
try_install_component(user, W)
|
||||
if(W.iswrench())
|
||||
var/list/components = get_all_components()
|
||||
if(components.len)
|
||||
|
||||
Reference in New Issue
Block a user