lets ghosts click a pAI device to download into it without a master (#15838)
* yes * Update pai.dm
This commit is contained in:
committed by
GitHub
parent
33ee9f5a19
commit
3de3dc8e6f
@@ -1,12 +1,18 @@
|
||||
SUBSYSTEM_DEF(pai)
|
||||
name = "pAI"
|
||||
|
||||
flags = SS_NO_INIT|SS_NO_FIRE
|
||||
flags = SS_NO_FIRE
|
||||
|
||||
var/list/candidates = list()
|
||||
var/ghost_spam = FALSE
|
||||
var/spam_delay = 100
|
||||
var/list/pai_card_list = list()
|
||||
var/list/restricted_areas = list()
|
||||
|
||||
/datum/controller/subsystem/pai/Initialize(var/time_of_day)
|
||||
restricted_areas += typesof(/area/command/heads_quarters, /area/ai_monitored) // heads quarters and AI monitored places (like the armory)
|
||||
initialized = TRUE
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/pai/Topic(href, href_list)
|
||||
if(href_list["download"])
|
||||
|
||||
@@ -322,6 +322,30 @@
|
||||
else
|
||||
to_chat(user, "Encryption Key ports not configured.")
|
||||
|
||||
/obj/item/paicard/attack_ghost(mob/dead/observer/user)
|
||||
if(pai)
|
||||
to_chat(user, "<span class='warning'>This pAI is already in use!</span>")
|
||||
return
|
||||
|
||||
var/area/A = get_area(get_turf(src))
|
||||
if(A.type in SSpai.restricted_areas) // set in subsystem/pai.dm on initialize of the subsystem
|
||||
to_chat(user, "<span class='warning'>You can't download yourself into a restricted area!</span>")
|
||||
return
|
||||
|
||||
var/pai_name = reject_bad_name(stripped_input(usr, "Enter a name for your pAI", "pAI Name", user.name, MAX_NAME_LEN), TRUE)
|
||||
if(!pai_name)
|
||||
to_chat(user, "<span class='warning'>Entered name is not valid.</span>")
|
||||
return
|
||||
|
||||
var/mob/living/silicon/pai/new_pai = new(src)
|
||||
new_pai.name = pai_name
|
||||
new_pai.real_name = new_pai.name
|
||||
new_pai.key = user.key
|
||||
|
||||
setPersonality(new_pai)
|
||||
|
||||
SSticker.mode.update_cult_icons_removed(pai.mind)
|
||||
|
||||
/obj/item/paicard/emag_act(mob/user) // Emag to wipe the master DNA and supplemental directive
|
||||
. = ..()
|
||||
if(!pai)
|
||||
|
||||
Reference in New Issue
Block a user