mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
Fixing a couple of pAI bugs (door hacking, recruit window). Removed UltraLight.dm from the dme includes, it was causing lighting and clicking errors.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1637 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -30,6 +30,7 @@ var/datum/paiController/paiController // Global handler for pAI candidates
|
||||
card.pai = pai
|
||||
card.looking_for_personality = 0
|
||||
pai_candidates.Remove(candidate)
|
||||
usr << browse(null, "window=findPai")
|
||||
if(href_list["new"])
|
||||
var/datum/paiCandidate/candidate = locate(href_list["candidate"]) //pai_candidates.Find(href_list["candidate"])
|
||||
var/option = href_list["option"]
|
||||
@@ -43,10 +44,13 @@ var/datum/paiController/paiController // Global handler for pAI candidates
|
||||
if("ooc")
|
||||
candidate.comments = input("Enter any OOC comments", "pAI OOC Comments", candidate.comments) as message
|
||||
if("submit")
|
||||
candidate.ready = 1
|
||||
for(var/obj/item/device/paicard/p in world)
|
||||
if(p.looking_for_personality == 1)
|
||||
p.alertUpdate()
|
||||
if(candidate)
|
||||
candidate.ready = 1
|
||||
for(var/obj/item/device/paicard/p in world)
|
||||
if(p.looking_for_personality == 1)
|
||||
p.alertUpdate()
|
||||
usr << browse(null, "window=paiRecruit")
|
||||
return
|
||||
recruitWindow(usr)
|
||||
|
||||
proc/recruitWindow(var/mob/M as mob)
|
||||
@@ -150,7 +154,12 @@ var/datum/paiController/paiController // Global handler for pAI candidates
|
||||
if(asked[O] < world.time + askDelay)
|
||||
continue
|
||||
if(O.client)
|
||||
spawn question(O.client)
|
||||
var/hasSubmitted = 0
|
||||
for(var/datum/paiCandidate/c in paiController.pai_candidates)
|
||||
if(c.key == O.key)
|
||||
hasSubmitted = 1
|
||||
if(!hasSubmitted)
|
||||
spawn question(O.client)
|
||||
|
||||
proc/question(var/client/C)
|
||||
asked.Add(C.key)
|
||||
|
||||
@@ -152,8 +152,8 @@
|
||||
spawn CheckDNA(M, src)
|
||||
|
||||
if("pdamessage")
|
||||
if(href_list["target"])
|
||||
var/t = input("Please enter message", name, null) as text
|
||||
if(href_list["send"])
|
||||
var/t = input(usr, "Please enter message", name, null) as text
|
||||
t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN)
|
||||
if (!t)
|
||||
return
|
||||
@@ -535,17 +535,10 @@
|
||||
|
||||
// Door Jack - supporting proc
|
||||
/mob/living/silicon/pai/proc/hackloop()
|
||||
var/area/A = src.loc
|
||||
var/loopcount = 0
|
||||
while(!istype(src.loc, /area))
|
||||
A = A.loc
|
||||
if(loopcount >= 6)
|
||||
A = null
|
||||
break
|
||||
loopcount++
|
||||
var/turf/T = get_turf_or_move(src.loc)
|
||||
for(var/mob/living/silicon/ai/AI in world)
|
||||
if(A)
|
||||
AI << "<font color = red><b>Network Alert: Brute-force encryption crack in progress in [A.name].</b></font>"
|
||||
if(T.loc)
|
||||
AI << "<font color = red><b>Network Alert: Brute-force encryption crack in progress in [T.loc].</b></font>"
|
||||
else
|
||||
AI << "<font color = red><b>Network Alert: Brute-force encryption crack in progress. Unable to pinpoint location.</b></font>"
|
||||
while(src.hackprogress < 100)
|
||||
@@ -571,11 +564,11 @@
|
||||
dat += "<ul>"
|
||||
for (var/obj/item/device/pda/P in world)
|
||||
if (!P.owner||P.toff||P == src) continue
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=pdamessage;target=\ref[P]'>[P]</a>"
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=pdamessage;send=1;target=\ref[P]'>[P]</a>"
|
||||
dat += "</li>"
|
||||
for (var/mob/living/silicon/pai/P in world)
|
||||
if(P.stat != 2)
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=pdamessage;target=\ref[P]'>[P]</a>"
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=pdamessage;send=1;target=\ref[P]'>[P]</a>"
|
||||
dat += "</li>"
|
||||
dat += "</ul>"
|
||||
return dat
|
||||
Reference in New Issue
Block a user