mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
pAIs now ghost and appear in the player panel properly. You can no longer download multiple personalities to one unit.
Personality settings can be saved and loaded. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1640 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -1444,6 +1444,8 @@ var/showadminmessages = 1
|
||||
dat += "<tr><td>[M.name]</td>"
|
||||
if(istype(M, /mob/living/silicon/ai))
|
||||
dat += "<td>AI</td>"
|
||||
if(istype(M, /mob/living/silicon/pai))
|
||||
dat += "<td>pAI</td>"
|
||||
if(istype(M, /mob/living/silicon/robot))
|
||||
dat += "<td>Cyborg</td>"
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
@@ -1481,6 +1483,8 @@ var/showadminmessages = 1
|
||||
dat += "<tr><td>[M.name]</td>"
|
||||
if(istype(M, /mob/living/silicon/ai))
|
||||
dat += "<td>AI</td>"
|
||||
if(istype(M, /mob/living/silicon/pai))
|
||||
dat += "<td>pAI</td>"
|
||||
if(istype(M, /mob/living/silicon/robot))
|
||||
dat += "<td>Cyborg</td>"
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
|
||||
@@ -48,8 +48,11 @@
|
||||
return 0
|
||||
|
||||
/mob/living/silicon/pai/emp_act(severity)
|
||||
/*
|
||||
if (prob(30))
|
||||
src.master = null
|
||||
src.master_dna = null
|
||||
src << "<font color=green>You feel unbound.</font>"
|
||||
/*
|
||||
switch(pick(1,2,3)) //Add Random laws.
|
||||
if(1)
|
||||
src.cancel_camera()
|
||||
@@ -57,7 +60,7 @@
|
||||
src.lockdown()
|
||||
if(3)
|
||||
src.ai_call_shuttle()
|
||||
*/
|
||||
*/
|
||||
..()
|
||||
|
||||
/mob/living/silicon/pai/ex_act(severity)
|
||||
@@ -190,9 +193,8 @@
|
||||
card.pai = null
|
||||
var/turf/T = get_turf_or_move(card.loc)
|
||||
for (var/mob/M in viewers(T))
|
||||
M.show_message("\blue [src] flashes a message across its screen, \"Wiping core files. Please a new personality to continue using pAI device functions.\"", 3, "\blue [src] bleeps electronically.", 2)
|
||||
M.show_message("\blue [src] flashes a message across its screen, \"Wiping core files. Please acquire a new personality to continue using pAI device functions.\"", 3, "\blue [src] bleeps electronically.", 2)
|
||||
src.death(0)
|
||||
del(src)
|
||||
|
||||
//Addition by Mord_Sith to define AI's network change ability
|
||||
/*
|
||||
|
||||
@@ -23,9 +23,12 @@ var/datum/paiController/paiController // Global handler for pAI candidates
|
||||
if(href_list["download"])
|
||||
var/datum/paiCandidate/candidate = locate(href_list["candidate"]) //pai_candidates.Find(href_list["candidate"])
|
||||
var/obj/item/device/paicard/card = locate(href_list["device"])
|
||||
if(card.pai)
|
||||
return
|
||||
if(card && candidate)
|
||||
var/mob/living/silicon/pai/pai = new(card)
|
||||
pai.name = candidate.name
|
||||
pai.real_name = pai.name
|
||||
pai.key = candidate.key
|
||||
card.pai = pai
|
||||
card.looking_for_personality = 0
|
||||
@@ -43,6 +46,14 @@ var/datum/paiController/paiController // Global handler for pAI candidates
|
||||
candidate.role = input("Enter a role for your pAI", "pAI Role", candidate.role) as text
|
||||
if("ooc")
|
||||
candidate.comments = input("Enter any OOC comments", "pAI OOC Comments", candidate.comments) as message
|
||||
|
||||
if("save")
|
||||
world << "saving personality"
|
||||
candidate.savefile_save(usr)
|
||||
if("load")
|
||||
world << "loading personality"
|
||||
candidate.savefile_load(usr)
|
||||
|
||||
if("submit")
|
||||
if(candidate)
|
||||
candidate.ready = 1
|
||||
@@ -98,7 +109,9 @@ var/datum/paiController/paiController // Global handler for pAI candidates
|
||||
dat += "</table>"
|
||||
|
||||
dat += "<br>"
|
||||
dat += "<h3><a href='byond://?src=\ref[src];option=submit;new=1;candidate=\ref[candidate]'>Submit Personality</a></h3>"
|
||||
dat += "<h3><a href='byond://?src=\ref[src];option=submit;new=1;candidate=\ref[candidate]'>Submit Personality</a></h3><br>"
|
||||
dat += "<a href='byond://?src=\ref[src];option=save;new=1;candidate=\ref[candidate]'>Save Personality</a><br>"
|
||||
dat += "<a href='byond://?src=\ref[src];option=load;new=1;candidate=\ref[candidate]'>Load Personality</a><br>"
|
||||
|
||||
M << browse(dat, "window=paiRecruit")
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
</div>
|
||||
</body>
|
||||
</html>"}
|
||||
usr << browse(dat, "window=pai;size=640x480;border=0;can_close=1;can_resize=0;can_minimize=0;titlebar=1")
|
||||
usr << browse(dat, "window=pai;size=640x480;border=0;can_close=1;can_resize=1;can_minimize=1;titlebar=1")
|
||||
onclose(usr, "pai")
|
||||
temp = null
|
||||
return
|
||||
@@ -152,34 +152,53 @@
|
||||
spawn CheckDNA(M, src)
|
||||
|
||||
if("pdamessage")
|
||||
if(href_list["send"])
|
||||
if(href_list["target"])
|
||||
var/t = input(usr, "Please enter message", name, null) as text
|
||||
t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN)
|
||||
if (!t)
|
||||
return
|
||||
var/obj/item/device/pda/P = locate(href_list["target"])
|
||||
var/target = locate(href_list["target"])
|
||||
|
||||
if (isnull(P)||P.toff)
|
||||
return
|
||||
// PDA Message
|
||||
if(istype(target, /obj/item/device/pda))
|
||||
var/obj/item/device/pda/P = target
|
||||
if (isnull(P)||P.toff)
|
||||
return
|
||||
|
||||
for (var/obj/machinery/message_server/MS in world)
|
||||
MS.send_pda_message("[P.owner]","[src]","[t]")
|
||||
|
||||
tnote += "<i><b>→ To [P.owner]:</b></i><br>[t]<br>"
|
||||
P.tnote += "<i><b>← From <a href='byond://?src=\ref[P];choice=Message;target=\ref[src]'>[src]</a>:</b></i><br>[t]<br>"
|
||||
|
||||
if (prob(15)) //Give the AI a chance of intercepting the message
|
||||
for (var/mob/living/silicon/ai/ai in world)
|
||||
ai.show_message("<i>Intercepted message from <b>[P:owner]</b>: [t]</i>")
|
||||
|
||||
if (!P.silent)
|
||||
playsound(P.loc, 'twobeep.ogg', 50, 1)
|
||||
for (var/mob/O in hearers(3, P.loc))
|
||||
O.show_message(text("\icon[P] *[P.ttone]*"))
|
||||
|
||||
P.overlays = null
|
||||
P.overlays += image('pda.dmi', "pda-r")
|
||||
|
||||
// pAI Message
|
||||
else
|
||||
var/mob/living/silicon/pai/P = target
|
||||
|
||||
tnote += "<i><b>→ To [P]:</b></i><br>[t]<br>"
|
||||
P.tnote += "<i><b>← From <a href='byond://?src=\ref[P];soft=pdamessage;target=\ref[src]'>[src]</a>:</b></i><br>[t]<br>"
|
||||
|
||||
|
||||
for (var/obj/machinery/message_server/MS in world)
|
||||
MS.send_pda_message("[P.owner]","[src]","[t]")
|
||||
for (var/obj/machinery/message_server/MS in world)
|
||||
MS.send_pda_message("[P]","[src]","[t]")
|
||||
|
||||
tnote += "<i><b>→ To [P.owner]:</b></i><br>[t]<br>"
|
||||
P.tnote += "<i><b>← From <a href='byond://?src=\ref[P];choice=Message;target=\ref[src]'>[src]</a>:</b></i><br>[t]<br>"
|
||||
if (prob(15)) //Give the AI a chance of intercepting the message
|
||||
for (var/mob/living/silicon/ai/ai in world)
|
||||
ai.show_message("<i>Intercepted message from <b>[P]</b>: [t]</i>")
|
||||
|
||||
if (prob(15)) //Give the AI a chance of intercepting the message
|
||||
for (var/mob/living/silicon/ai/A in world)
|
||||
A.show_message("<i>Intercepted message from <b>[P:owner]</b>: [t]</i>")
|
||||
|
||||
if (!P.silent)
|
||||
playsound(P.loc, 'twobeep.ogg', 50, 1)
|
||||
for (var/mob/O in hearers(3, P.loc))
|
||||
O.show_message(text("\icon[P] *[P.ttone]*"))
|
||||
|
||||
P.overlays = null
|
||||
P.overlays += image('pda.dmi', "pda-r")
|
||||
|
||||
// Accessing medical records
|
||||
if("medicalrecord")
|
||||
@@ -565,11 +584,13 @@
|
||||
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;send=1;target=\ref[P]'>[P]</a>"
|
||||
dat += "<li><a href='byond://?src=\ref[src];software=pdamessage;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;send=1;target=\ref[P]'>[P]</a>"
|
||||
dat += "<li><a href='byond://?src=\ref[src];software=pdamessage;target=\ref[P]'>[P]</a>"
|
||||
dat += "</li>"
|
||||
dat += "</ul>"
|
||||
dat += "<br><br>"
|
||||
dat += "Messages: <hr> [tnote]"
|
||||
return dat
|
||||
Reference in New Issue
Block a user