Skip to content

Commit

Permalink
Dean cyborg/AI changes
Browse files Browse the repository at this point in the history
  • Loading branch information
CM Dev committed Oct 26, 2018
1 parent d0939bf commit c0e734e
Show file tree
Hide file tree
Showing 130 changed files with 427 additions and 363 deletions.
3 changes: 2 additions & 1 deletion code/#define/objects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ var/list/cheartstopper = list("potassium_chloride") //this stops the heart when
var/list/RESTRICTED_CAMERA_NETWORKS = list( //Those networks can only be accessed by preexisting terminals. AIs and new terminals can't use them.
"thunder",
"ERT",
"NUKE"
"NUKE",
"LADDER"
)

#define STASIS_IN_BAG 1
Expand Down
4 changes: 2 additions & 2 deletions code/WorkInProgress/Cael_Aislinn/Supermatter/LaserComputer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

interact(mob/user)
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
if (!istype(user, /mob/living/silicon))
if (!issilicon(user))
user.unset_interaction()
user << browse(null, "window=laser_control")
return
Expand All @@ -39,7 +39,7 @@
/obj/machinery/computer/lasercon/proc/interact(mob/user)
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
if (!istype(user, /mob/living/silicon))
if (!issilicon(user))
user.interactee = null
user << browse(null, "window=powcomp")
return
Expand Down
2 changes: 1 addition & 1 deletion code/WorkInProgress/computer3/computers/law.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
set category = "Object"
set name = "Access Computer's Internals"
set src in oview(1)
if(!Adjacent(usr) || usr.is_mob_restrained() || usr.lying || usr.stat || istype(usr, /mob/living/silicon) || !istype(usr, /mob/living))
if(!Adjacent(usr) || usr.is_mob_restrained() || usr.lying || usr.stat || issilicon(usr) || !istype(usr, /mob/living))
return

opened = !opened
Expand Down
32 changes: 16 additions & 16 deletions code/WorkInProgress/computer3/computers/medical.dm
Original file line number Diff line number Diff line change
Expand Up @@ -188,14 +188,14 @@

else if (href_list["login"])

if (istype(usr, /mob/living/silicon/ai))
if (isAI(usr))
src.active1 = null
src.active2 = null
src.authenticated = usr.name
src.rank = "AI"
src.screen = 1

else if (istype(usr, /mob/living/silicon/robot))
else if (isrobot(usr))
src.active1 = null
src.active2 = null
src.authenticated = usr.name
Expand Down Expand Up @@ -240,7 +240,7 @@
if("fingerprint")
if (istype(src.active1, /datum/data/record))
var/t1 = copytext(trim(sanitize(input("Please input fingerprint hash:", "Med. records", src.active1.fields["fingerprint"], null) as text)),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.is_mob_restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.is_mob_restrained() || (!interactable() && (!issilicon(usr))) || src.active1 != a1))
return
src.active1.fields["fingerprint"] = t1
if("sex")
Expand All @@ -252,61 +252,61 @@
if("age")
if (istype(src.active1, /datum/data/record))
var/t1 = input("Please input age:", "Med. records", src.active1.fields["age"], null) as num
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.is_mob_restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.is_mob_restrained() || (!interactable() && (!issilicon(usr))) || src.active1 != a1))
return
src.active1.fields["age"] = t1
if("mi_dis")
if (istype(src.active2, /datum/data/record))
var/t1 = copytext(trim(sanitize(input("Please input minor disabilities list:", "Med. records", src.active2.fields["mi_dis"], null) as text)),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.is_mob_restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.is_mob_restrained() || (!interactable() && (!issilicon(usr))) || src.active2 != a2))
return
src.active2.fields["mi_dis"] = t1
if("mi_dis_d")
if (istype(src.active2, /datum/data/record))
var/t1 = copytext(trim(sanitize(input("Please summarize minor dis.:", "Med. records", src.active2.fields["mi_dis_d"], null) as message)),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.is_mob_restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.is_mob_restrained() || (!interactable() && (!issilicon(usr))) || src.active2 != a2))
return
src.active2.fields["mi_dis_d"] = t1
if("ma_dis")
if (istype(src.active2, /datum/data/record))
var/t1 = copytext(trim(sanitize(input("Please input major diabilities list:", "Med. records", src.active2.fields["ma_dis"], null) as text)),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.is_mob_restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.is_mob_restrained() || (!interactable() && (!issilicon(usr))) || src.active2 != a2))
return
src.active2.fields["ma_dis"] = t1
if("ma_dis_d")
if (istype(src.active2, /datum/data/record))
var/t1 = copytext(trim(sanitize(input("Please summarize major dis.:", "Med. records", src.active2.fields["ma_dis_d"], null) as message)),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.is_mob_restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.is_mob_restrained() || (!interactable() && (!issilicon(usr))) || src.active2 != a2))
return
src.active2.fields["ma_dis_d"] = t1
if("alg")
if (istype(src.active2, /datum/data/record))
var/t1 = copytext(trim(sanitize(input("Please state allergies:", "Med. records", src.active2.fields["alg"], null) as text)),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.is_mob_restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.is_mob_restrained() || (!interactable() && (!issilicon(usr))) || src.active2 != a2))
return
src.active2.fields["alg"] = t1
if("alg_d")
if (istype(src.active2, /datum/data/record))
var/t1 = copytext(trim(sanitize(input("Please summarize allergies:", "Med. records", src.active2.fields["alg_d"], null) as message)),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.is_mob_restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.is_mob_restrained() || (!interactable() && (!issilicon(usr))) || src.active2 != a2))
return
src.active2.fields["alg_d"] = t1
if("cdi")
if (istype(src.active2, /datum/data/record))
var/t1 = copytext(trim(sanitize(input("Please state diseases:", "Med. records", src.active2.fields["cdi"], null) as text)),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.is_mob_restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.is_mob_restrained() || (!interactable() && (!issilicon(usr))) || src.active2 != a2))
return
src.active2.fields["cdi"] = t1
if("cdi_d")
if (istype(src.active2, /datum/data/record))
var/t1 = copytext(trim(sanitize(input("Please summarize diseases:", "Med. records", src.active2.fields["cdi_d"], null) as message)),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.is_mob_restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.is_mob_restrained() || (!interactable() && (!issilicon(usr))) || src.active2 != a2))
return
src.active2.fields["cdi_d"] = t1
if("notes")
if (istype(src.active2, /datum/data/record))
var/t1 = copytext(html_encode(trim(input("Please summarize notes:", "Med. records", html_decode(src.active2.fields["notes"]), null) as message)),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.is_mob_restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.is_mob_restrained() || (!interactable() && (!issilicon(usr))) || src.active2 != a2))
return
src.active2.fields["notes"] = t1
if("p_stat")
Expand All @@ -321,7 +321,7 @@
if("b_dna")
if (istype(src.active2, /datum/data/record))
var/t1 = copytext(sanitize(trim(input("Please input DNA hash:", "Med. records", src.active2.fields["b_dna"], null) as text)),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.is_mob_restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.is_mob_restrained() || (!interactable() && (!issilicon(usr))) || src.active2 != a2))
return
src.active2.fields["b_dna"] = t1

Expand Down Expand Up @@ -427,7 +427,7 @@
return
var/a2 = src.active2
var/t1 = copytext(sanitize(input("Add Comment:", "Med. records", null, null) as message),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.is_mob_restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.is_mob_restrained() || (!interactable() && (!issilicon(usr))) || src.active2 != a2))
return
var/counter = 1
while(src.active2.fields[text("com_[]", counter)])
Expand All @@ -440,7 +440,7 @@

if (href_list["search"])
var/t1 = input("Search String: (Name, DNA, or ID)", "Med. records", null, null) as text
if ((!( t1 ) || usr.stat || !( src.authenticated ) || usr.is_mob_restrained() || ((!interactable()) && (!istype(usr, /mob/living/silicon)))))
if ((!( t1 ) || usr.stat || !( src.authenticated ) || usr.is_mob_restrained() || ((!interactable()) && (!issilicon(usr)))))
return
src.active1 = null
src.active2 = null
Expand Down
8 changes: 4 additions & 4 deletions code/WorkInProgress/computer3/computers/message.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
var/noserver = "<span class='alert'>ALERT: No server detected.</span>"
var/incorrectkey = "<span class='warning'>ALERT: Incorrect decryption key!</span>"
var/defaultmsg = "<span class='notice'>Welcome. Please select an option.</span>"
var/rebootmsg = "<span class='warning'>%$&(£: Critical %$$@ Error // !RestArting! <lOadiNg backUp iNput ouTput> - ?pLeaSe wAit!</span>"
var/rebootmsg = "<span class='warning'>%$&(: Critical %$$@ Error // !RestArting! <lOadiNg backUp iNput ouTput> - ?pLeaSe wAit!</span>"

//Computer properties
var/screen = 0 // 0 = Main menu, 1 = Message Logs, 2 = Hacked screen, 3 = Custom Message
Expand Down Expand Up @@ -94,7 +94,7 @@
else
for(var/n = ++i; n <= optioncount; n++)
dat += "<dd><font color='blue'>&#09;[n]. ---------------</font><br></dd>"
if((istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot)) && (usr.mind.special_role && usr.mind.original == usr))
if(ishighersilicon(usr) && (usr.mind.special_role && usr.mind.original == usr))
//Malf/Traitor AIs can bruteforce into the system to gain the Key.
dat += "<dd><A href='?src=\ref[src];hack=1'><i><font color='Red'>*&@#. Bruteforce Key</font></i></font></a><br></dd>"
else
Expand Down Expand Up @@ -124,7 +124,7 @@
dat += "</table>"
//Hacking screen.
if(2)
if(istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot))
if(ishighersilicon(usr))
dat += "Brute-forcing for server key.<br> It will take 20 seconds for every character that the password has."
dat += "In the meantime, this console can reveal your true intentions if you let someone access it. Make sure no humans enter the room during that time."
else
Expand Down Expand Up @@ -314,7 +314,7 @@

//Hack the Console to get the password
if ("hack" in href_list)
if((istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot)) && (usr.mind.special_role && usr.mind.original == usr))
if(ishighersilicon(usr) && (usr.mind.special_role && usr.mind.original == usr))
src.hacking = 1
src.screen = 2
src.active_state = hack_icon
Expand Down
2 changes: 1 addition & 1 deletion code/WorkInProgress/computer3/computers/prisonshuttle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ var/prison_shuttle_timeleft = 0
if(..())
return

if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (issilicon(usr)))
usr.set_machine(src)

if (href_list["sendtodock"])
Expand Down
6 changes: 3 additions & 3 deletions code/WorkInProgress/computer3/computers/robot.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@
dat += "<A href='?src=\ref[src];screen=2'>2. Emergency Full Destruct</A><BR>"
if(screen == 1)
for(var/mob/living/silicon/robot/R in mob_list)
if(istype(usr, /mob/living/silicon/ai))
if(isAI(usr))
if (R.connected_ai != usr)
continue
if(istype(usr, /mob/living/silicon/robot))
if(isrobot(usr))
if (R != usr)
continue
if(R.scrambledcodes)
Expand All @@ -72,7 +72,7 @@
dat += " Slaved to [R.connected_ai.name] |"
else
dat += " Independent from AI |"
if (istype(usr, /mob/living/silicon))
if (issilicon(usr))
if(issilicon(usr) && is_special_character(usr) && !R.emagged)
dat += "<A href='?src=\ref[src];magbot=\ref[R]'>(<i>Hack</i>)</A> "
dat += "<A href='?src=\ref[src];stopbot=\ref[R]'>(<i>[R.canmove ? "Lockdown" : "Release"]</i>)</A> "
Expand Down
Loading

0 comments on commit c0e734e

Please sign in to comment.