Adds silent AI transform to player panel/view variables.

This commit is contained in:
Ren Erthilo
2012-04-29 04:21:07 +01:00
parent ccd117ca32
commit 67d1f32883
3 changed files with 112 additions and 1 deletions
+16
View File
@@ -1091,6 +1091,21 @@ var/global/BSACooldown = 0
alert("You cannot perform this action. You must be of a higher administrative rank!", null, null, null, null, null)
return
if (href_list["makeaisilent"])
if (src.level>=3)
var/mob/M = locate(href_list["makeaisilent"])
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
message_admins("\red Admin [key_name_admin(usr)] AIized [key_name_admin(M)] silently!", 1)
log_admin("[key_name(usr)] AIized [key_name(M)] silently")
H.AIizeSilent()
else
alert("I cannot allow this.")
return
else
alert("You cannot perform this action. You must be of a higher administrative rank!", null, null, null, null, null)
return
if (href_list["makealien"])
if (src.level>=3)
var/mob/M = locate(href_list["makealien"])
@@ -2345,6 +2360,7 @@ var/global/BSACooldown = 0
foo += text("<B>Is an AI</B> | ")
else if(ishuman(M))
foo += text("<A HREF='?src=\ref[src];makeai=\ref[M]'>Make AI</A> | ")
foo += text("<A HREF='?src=\ref[src];makeaisilent=\ref[M]'>Make AI Silently</A> | ")
foo += text("<A HREF='?src=\ref[src];makerobot=\ref[M]'>Make Robot</A> | ")
foo += text("<A HREF='?src=\ref[src];makealien=\ref[M]'>Make Alien</A> | ")
foo += text("<A HREF='?src=\ref[src];makemetroid=\ref[M]'>Make Metroid</A> | ")
+78 -1
View File
@@ -335,4 +335,81 @@
new_corgi << "<B>You are now a Corgi!.</B>"
spawn(0)//To prevent the proc from returning null.
del(src)
return
return
/mob/living/carbon/human/AIizeSilent()
if (monkeyizing)
return
for(var/name in organs)
del(organs[name])
if(client)
src << sound(null, repeat = 0, wait = 0, volume = 85, channel = 1) // stop the jams for AIs
return ..()
/mob/living/carbon/AIizeSilent()
if (monkeyizing)
return
for(var/obj/item/W in src)
drop_from_slot(W)
update_clothing()
monkeyizing = 1
canmove = 0
icon = null
invisibility = 101
return ..()
/mob/proc/AIizeSilent()
if(client)
client.screen.len = null
var/mob/living/silicon/ai/O = new (loc, /datum/ai_laws/nanotrasen,,1)//No MMI but safety is in effect.
O.invisibility = 0
O.aiRestorePowerRoutine = 0
O.lastKnownIP = client.address
if(mind)
mind.transfer_to(O)
O.mind.original = O
else
O.mind = new
O.mind.current = O
O.mind.original = O
O.mind.assigned_role = "AI"
O.key = key
if(!(O.mind in ticker.minds))
ticker.minds += O.mind//Adds them to regular mind list.
O << "<B>You are playing the station's AI. The AI cannot move, but can interact with many objects while viewing them (through cameras).</B>"
O << "<B>To look at other parts of the station, double-click yourself to get a camera menu, use the freelook command, or use the Show Camera List command..</B>"
O << "<B>While observing through a camera, you can use most (networked) devices which you can see, such as computers, APCs, intercoms, doors, etc.</B>"
O << "To use something, simply click or double-click it."
O << "Currently right-click functions will not work for the AI (except examine), and will either be replaced with dialogs or won't be usable by the AI."
if (!(ticker && ticker.mode && (O.mind in ticker.mode.malf_ai)))
O.show_laws()
O << "<b>These laws may be changed by other players, or by you being the traitor.</b>"
O << "<br><b><font color=red>IMPORTANT GAMEPLAY ASPECTS:</font></b>"
O << "1.) Act like an AI. If someone is breaking into your upload, say something like \"Alert. Unauthorised Access Detected: AI Upload.\" not \"Help! Urist is trying to subvert me!\""
O << "2.) Do not watch the traitor like a hawk alerting the station to his/her every move. This relates to 1."
O << "3.) You are theoretically omniscient, but you should not be Beepsky 5000, laying down the law left and right. That is security's job. Instead, try to keep the station productive and effective. (Feel free to report the location of major violence and crimes and all that, just do not be the evil thing looking over peoples shoulders)"
O << "4.) Your laws are not in preference, laws do not take preference over one another unless specifically stated in the law."
O << "<br>We want everyone to have a good time, so we, the admins, will try to correct you if you stray from these rules. Just try to keep it sensible."
O.verbs += /mob/living/silicon/ai/proc/ai_call_shuttle
O.verbs += /mob/living/silicon/ai/proc/show_laws_verb
O.verbs += /mob/living/silicon/ai/proc/ai_camera_track
O.verbs += /mob/living/silicon/ai/proc/ai_alerts
O.verbs += /mob/living/silicon/ai/proc/ai_camera_list
O.verbs += /mob/living/silicon/ai/proc/ai_statuschange
O.verbs += /mob/living/silicon/ai/proc/ai_roster
// O.verbs += /mob/living/silicon/ai/proc/ai_cancel_call
O.job = "AI"
spawn(0)
ainame(O)
del(src)
return O