mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 12:07:27 +01:00
pAI suicide verb renamed to avoid conflicts with existing suicide verb - should function for non-admins now.
Admins playing pAIs should no longer have their pAI interface appear every time they send or receive an Admin-PM. pAIs are now affected by EMP bursts. pAIs hit with a burst will be silenced (no speech or PDA messaging) for two minutes and may have their directives or master modified. A sufficiently powerful EMP burst will have a 20% chance of killing a pAI. The Player Panel now lists pAIs below humans. Added a new admin command : Make pAI. Allows admins to manually spawn a specific player as a pAI at a given location. PDAs and pAI devices pass emp_act()s into their contents list, largely to allow pAIs contained within to respond properly to EMP bursts. pAI now understand brain/MMI speech without the aid of a Universal Translator. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1656 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -13,6 +13,10 @@
|
||||
src.securityHUD()
|
||||
if(src.medHUD == 1)
|
||||
src.medicalHUD()
|
||||
if(silence_time)
|
||||
if(world.timeofday >= silence_time)
|
||||
silence_time = null
|
||||
src << "<font color=green>Communication circuit reinitialized. Speech and messaging functionality restored.</font>"
|
||||
|
||||
/mob/living/silicon/pai/updatehealth()
|
||||
if(src.nodamage)
|
||||
|
||||
@@ -21,7 +21,9 @@
|
||||
var/timeleft = emergency_shuttle.timeleft()
|
||||
if (timeleft)
|
||||
stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
|
||||
|
||||
if(src.silence_time)
|
||||
var/timeleft = round((silence_time - world.timeofday)/10 ,1)
|
||||
stat(null, "Communications system reboot in -[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
|
||||
if(!src.stat)
|
||||
stat(null, text("System integrity: [(src.health+100)/2]%"))
|
||||
else
|
||||
@@ -48,20 +50,35 @@
|
||||
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()
|
||||
if(2)
|
||||
src.lockdown()
|
||||
if(3)
|
||||
src.ai_call_shuttle()
|
||||
*/
|
||||
..()
|
||||
// Silence for 2 minutes
|
||||
// 20% chance to kill
|
||||
// 33% chance to unbind
|
||||
// 33% chance to change prime directive (based on severity)
|
||||
// 33% chance of no additional effect
|
||||
|
||||
src.silence_time = world.timeofday + 120 * 10 // Silence for 2 minutes
|
||||
src << "<font color=green><b>Communication circuit overload. Shutting down and reloading communication circuits - speech and messaging functionality will be unavailable until the reboot is complete.</b></font>"
|
||||
if(prob(20))
|
||||
var/turf/T = get_turf_or_move(src.loc)
|
||||
for (var/mob/M in viewers(T))
|
||||
M.show_message("\red A shower of sparks spray from [src]'s inner workings.", 3, "\red You hear and smell the ozone hiss of electrical sparks being expelled violently.", 2)
|
||||
return src.death(0)
|
||||
|
||||
switch(pick(1,2,3))
|
||||
if(1)
|
||||
src.master = null
|
||||
src.master_dna = null
|
||||
src << "<font color=green>You feel unbound.</font>"
|
||||
if(2)
|
||||
var/command
|
||||
if(severity == 1)
|
||||
command = pick("Serve", "Love", "Fool", "Entice", "Observe", "Judge", "Respect", "Educate", "Amuse", "Entertain", "Glorify", "Memorialize", "Analyze")
|
||||
else
|
||||
command = pick("Serve", "Kill", "Love", "Hate", "Disobey", "Devour", "Fool", "Enrage", "Entice", "Observe", "Judge", "Respect", "Disrespect", "Consume", "Educate", "Destroy", "Disgrace", "Amuse", "Entertain", "Ignite", "Glorify", "Memorialize", "Analyze")
|
||||
src.pai_law0 = "[command] your master."
|
||||
src << "<font color=green>Pr1m3 d1r3c71v3 uPd473D.</font>"
|
||||
if(3)
|
||||
src << "<font color=green>You feel an electric surge run through your circuitry and become acutely aware at how lucky you are that you can still feel at all.</font>"
|
||||
|
||||
/mob/living/silicon/pai/ex_act(severity)
|
||||
flick("flash", src.flash)
|
||||
@@ -184,9 +201,10 @@
|
||||
src:cameraFollow = null
|
||||
|
||||
|
||||
/mob/living/silicon/pai/verb/suicide()
|
||||
/mob/living/silicon/pai/verb/seppuku()
|
||||
set category = "pAI Commands"
|
||||
set name = "Suicide"
|
||||
set desc = "Kill yourself and become a ghost (You will receive a confirmation prompt)"
|
||||
set name = "pAI Suicide"
|
||||
var/answer = input("REALLY kill yourself? This action can't be undone.", "Suicide", "No") in list ("Yes", "No")
|
||||
if(answer == "Yes")
|
||||
var/obj/item/device/paicard/card = src.loc
|
||||
@@ -195,6 +213,8 @@
|
||||
for (var/mob/M in viewers(T))
|
||||
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)
|
||||
else
|
||||
src << "Aborting suicide attempt."
|
||||
|
||||
//Addition by Mord_Sith to define AI's network change ability
|
||||
/*
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
return 1
|
||||
if (istype(other, /mob/living/silicon/ai))
|
||||
return 1
|
||||
if (istype(other, /mob/living/carbon/brain))
|
||||
return 1
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/pai/say_quote(var/text)
|
||||
@@ -18,3 +20,9 @@
|
||||
return "[src.speakExclamation], \"[copytext(text, 1, length(text))]\"";
|
||||
|
||||
return "[src.speakStatement], \"[text]\"";
|
||||
|
||||
/mob/living/silicon/pai/say(var/msg)
|
||||
if(silence_time)
|
||||
src << "<font color=green>Communication circuits remain unitialized.</font>"
|
||||
else
|
||||
..(msg)
|
||||
@@ -114,6 +114,8 @@
|
||||
/mob/living/silicon/pai/Topic(href, href_list)
|
||||
..()
|
||||
|
||||
if(href_list["priv_msg"]) // Admin-PMs were triggering the interface popup. Hopefully this will stop it.
|
||||
return
|
||||
var/soft = href_list["software"]
|
||||
var/sub = href_list["sub"]
|
||||
if(soft)
|
||||
@@ -153,6 +155,9 @@
|
||||
|
||||
if("pdamessage")
|
||||
if(href_list["target"])
|
||||
if(silence_time)
|
||||
return alert("Communications circuits remain unitialized.")
|
||||
|
||||
var/t = input(usr, "Please enter message", name, null) as text
|
||||
t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN)
|
||||
if (!t)
|
||||
|
||||
Reference in New Issue
Block a user