diff --git a/code/defines/mob/living/silicon/robot.dm b/code/defines/mob/living/silicon/robot.dm
index d7031bcfaee..f3148a9ec61 100644
--- a/code/defines/mob/living/silicon/robot.dm
+++ b/code/defines/mob/living/silicon/robot.dm
@@ -47,7 +47,7 @@
var/datum/effect/effect/system/ion_trail_follow/ion_trail = null
var/datum/effect/effect/system/spark_spread/spark_system//So they can initialize sparks whenever/N
var/jeton = 0
- var/borgwires = 15
+ var/borgwires = 31 // 0b11111
var/killswitch = 0
var/killswitch_time = 60
var/weapon_lock = 0
diff --git a/code/game/objects/devices/paicard.dm b/code/game/objects/devices/paicard.dm
index 57584feda43..318c58eab22 100644
--- a/code/game/objects/devices/paicard.dm
+++ b/code/game/objects/devices/paicard.dm
@@ -11,119 +11,126 @@
var/looking_for_personality = 0
var/mob/living/silicon/pai/pai
- New()
- ..()
- overlays += "pai-off"
+/obj/item/device/paicard/New()
+ ..()
+ overlays += "pai-off"
- attack_self(mob/user)
- if (!in_range(src, user))
- return
- user.machine = src
- var/dat = "Personal AI Device
"
- if(pai && (!pai.master_dna || !pai.master))
- dat += "Imprint Master DNA
"
- if(pai)
- dat += "Installed Personality: [pai.name]
"
- dat += "Prime directive:
[pai.pai_law0]
"
- dat += "Additional directives:
[pai.pai_laws]
"
- dat += "Configure Directives
"
- dat += "
"
- dat += "Device Settings
"
- if(radio)
- dat += "Radio Uplink
"
- dat += "Transmit: [(radio.wires & 4) ? "Enabled" : "Disabled"]
"
- dat += "Receive: [(radio.wires & 2) ? "Enabled" : "Disabled"]
"
- dat += "Signal Pulser: [(radio.wires & 1) ? "Enabled" : "Disabled"]
"
- else
- dat += "Radio Uplink
"
- dat += "Radio firmware not loaded. Please install a pAI personality to load firmware.
"
- dat += "\[Wipe current pAI personality\]
"
- else
- if(looking_for_personality)
- dat += "Searching for a personality..."
- dat += "\[View available personalities\]
"
- else
- dat += "No personality is installed.
"
- dat += "\[Request personal AI personality\]
"
- dat += "Each time this button is pressed, a request will be sent out to any available personalities. Check back often and alot time for personalities to respond. This process could take anywhere from 15 seconds to several minutes, depending on the available personalities' timeliness."
- user << browse(dat, "window=paicard")
- onclose(user, "paicard")
+/obj/item/device/paicard/Del()
+ //Will stop people throwing friend pAIs into the singularity so they can respawn
+ if(!isnull(pai))
+ pai.death(0)
+ ..()
+
+/obj/item/device/paicard/attack_self(mob/user)
+ if (!in_range(src, user))
return
+ user.machine = src
+ var/dat = "Personal AI Device
"
+ if(pai && (!pai.master_dna || !pai.master))
+ dat += "Imprint Master DNA
"
+ if(pai)
+ dat += "Installed Personality: [pai.name]
"
+ dat += "Prime directive:
[pai.pai_law0]
"
+ dat += "Additional directives:
[pai.pai_laws]
"
+ dat += "Configure Directives
"
+ dat += "
"
+ dat += "Device Settings
"
+ if(radio)
+ dat += "Radio Uplink
"
+ dat += "Transmit: [(radio.wires & 4) ? "Enabled" : "Disabled"]
"
+ dat += "Receive: [(radio.wires & 2) ? "Enabled" : "Disabled"]
"
+ dat += "Signal Pulser: [(radio.wires & 1) ? "Enabled" : "Disabled"]
"
+ else
+ dat += "Radio Uplink
"
+ dat += "Radio firmware not loaded. Please install a pAI personality to load firmware.
"
+ dat += "\[Wipe current pAI personality\]
"
+ else
+ if(looking_for_personality)
+ dat += "Searching for a personality..."
+ dat += "\[View available personalities\]
"
+ else
+ dat += "No personality is installed.
"
+ dat += "\[Request personal AI personality\]
"
+ dat += "Each time this button is pressed, a request will be sent out to any available personalities. Check back often and alot time for personalities to respond. This process could take anywhere from 15 seconds to several minutes, depending on the available personalities' timeliness."
+ user << browse(dat, "window=paicard")
+ onclose(user, "paicard")
+ return
- Topic(href, href_list)
+/obj/item/device/paicard/Topic(href, href_list)
- if(href_list["setdna"])
- if(pai.master_dna)
- return
- var/mob/M = usr
- if(!istype(M, /mob/living/carbon))
- usr << "You don't have any DNA, or your DNA is incompatible with this device."
- else
- var/datum/dna/dna = usr.dna
- pai.master = M.real_name
- pai.master_dna = dna.unique_enzymes
- pai << "You have been bound to a new master.
"
- if(href_list["request"])
- src.looking_for_personality = 1
- paiController.findPAI(src, usr)
- if(href_list["wipe"])
- var/confirm = input("Are you CERTAIN you wish to delete the current personality? This action cannot be undone.", "Personality Wipe") in list("Yes", "No")
- if(confirm == "Yes")
- for(var/mob/M in src)
- M << "You feel yourself slipping away from reality.
"
- M << "Byte by byte you lose your sense of self.
"
- M << "Your mental faculties leave you.
"
- M << "oblivion...
"
- M.death(0)
- removePersonality()
- if(href_list["wires"])
- var/t1 = text2num(href_list["wires"])
- if (radio.wires & t1)
- radio.wires &= ~t1
- else
- radio.wires |= t1
- if(href_list["setlaws"])
- var/newlaws = copytext(sanitize(input("Enter any additional directives you would like your pAI personality to follow. Note that these directives will not override the personality's allegiance to its imprinted master. Conflicting directives will be ignored.", "pAI Directive Configuration", pai.pai_laws) as message),1,MAX_MESSAGE_LEN)
- if(newlaws)
- pai.pai_laws = newlaws
- pai << "Your supplemental directives have been updated. Your new directives are:"
- pai << "Prime Directive :
[pai.pai_law0]"
- pai << "Supplemental Directives:
[pai.pai_laws]"
- attack_self(usr)
+ if(href_list["setdna"])
+ if(pai.master_dna)
+ return
+ var/mob/M = usr
+ if(!istype(M, /mob/living/carbon))
+ usr << "You don't have any DNA, or your DNA is incompatible with this device."
+ else
+ var/datum/dna/dna = usr.dna
+ pai.master = M.real_name
+ pai.master_dna = dna.unique_enzymes
+ pai << "You have been bound to a new master.
"
+ if(href_list["request"])
+ src.looking_for_personality = 1
+ paiController.findPAI(src, usr)
+ if(href_list["wipe"])
+ var/confirm = input("Are you CERTAIN you wish to delete the current personality? This action cannot be undone.", "Personality Wipe") in list("Yes", "No")
+ if(confirm == "Yes")
+ for(var/mob/M in src)
+ M << "You feel yourself slipping away from reality.
"
+ M << "Byte by byte you lose your sense of self.
"
+ M << "Your mental faculties leave you.
"
+ M << "oblivion...
"
+ M.death(0)
+ removePersonality()
+ if(href_list["wires"])
+ var/t1 = text2num(href_list["wires"])
+ if (radio.wires & t1)
+ radio.wires &= ~t1
+ else
+ radio.wires |= t1
+ if(href_list["setlaws"])
+ var/newlaws = copytext(sanitize(input("Enter any additional directives you would like your pAI personality to follow. Note that these directives will not override the personality's allegiance to its imprinted master. Conflicting directives will be ignored.", "pAI Directive Configuration", pai.pai_laws) as message),1,MAX_MESSAGE_LEN)
+ if(newlaws)
+ pai.pai_laws = newlaws
+ pai << "Your supplemental directives have been updated. Your new directives are:"
+ pai << "Prime Directive :
[pai.pai_law0]"
+ pai << "Supplemental Directives:
[pai.pai_laws]"
+ attack_self(usr)
// WIRE_SIGNAL = 1
// WIRE_RECEIVE = 2
// WIRE_TRANSMIT = 4
- proc/setPersonality(mob/living/silicon/pai/personality)
- src.pai = personality
- src.overlays += "pai-happy"
+/obj/item/device/paicard/proc/setPersonality(mob/living/silicon/pai/personality)
+ src.pai = personality
+ src.overlays += "pai-happy"
- proc/removePersonality()
- src.pai = null
+/obj/item/device/paicard/proc/removePersonality()
+ src.pai = null
+ src.overlays = null
+ src.overlays += "pai-off"
+
+/obj/item/device/paicard/proc/setEmotion(var/emotion)
+ if(pai)
src.overlays = null
- src.overlays += "pai-off"
+ switch(emotion)
+ if(1) src.overlays += "pai-happy"
+ if(2) src.overlays += "pai-cat"
+ if(3) src.overlays += "pai-extremely-happy"
+ if(4) src.overlays += "pai-face"
+ if(5) src.overlays += "pai-laugh"
+ if(6) src.overlays += "pai-off"
+ if(7) src.overlays += "pai-sad"
+ if(8) src.overlays += "pai-angry"
+ if(9) src.overlays += "pai-what"
- proc/setEmotion(var/emotion)
- if(pai)
- src.overlays = null
- switch(emotion)
- if(1) src.overlays += "pai-happy"
- if(2) src.overlays += "pai-cat"
- if(3) src.overlays += "pai-extremely-happy"
- if(4) src.overlays += "pai-face"
- if(5) src.overlays += "pai-laugh"
- if(6) src.overlays += "pai-off"
- if(7) src.overlays += "pai-sad"
- if(8) src.overlays += "pai-angry"
- if(9) src.overlays += "pai-what"
+/obj/item/device/paicard/proc/alertUpdate()
+ var/turf/T = get_turf_or_move(src.loc)
+ for (var/mob/M in viewers(T))
+ M.show_message("\blue [src] flashes a message across its screen, \"Additional personalities available for download.\"", 3, "\blue [src] bleeps electronically.", 2)
- proc/alertUpdate()
- var/turf/T = get_turf_or_move(src.loc)
- for (var/mob/M in viewers(T))
- M.show_message("\blue [src] flashes a message across its screen, \"Additional personalities available for download.\"", 3, "\blue [src] bleeps electronically.", 2)
+/obj/item/device/paicard/emp_act(severity)
+ for(var/mob/M in src)
+ M.emp_act(severity)
+ ..()
- emp_act(severity)
- for(var/mob/M in src)
- M.emp_act(severity)
- ..()
\ No newline at end of file
diff --git a/code/game/objects/items/robot_parts.dm b/code/game/objects/items/robot_parts.dm
index 8f79d5386e0..7e0df8f1a8d 100644
--- a/code/game/objects/items/robot_parts.dm
+++ b/code/game/objects/items/robot_parts.dm
@@ -204,10 +204,10 @@
if(O.mind && O.mind.special_role)
O.mind.store_memory("In case you look at this after being borged, the objectives are only here until I find a way to make them not show up for you, as I can't simply delete them without screwing up round-end reporting. --NeoFite")
- O << "You are playing a Cyborg. The Cyborg can interact with most electronic objects in its view point."
- O << "You must follow the laws that the AI has. You must follow orders the AI gives you."
- O << "To use something, simply click on it."
- O << {"Use say ":s to speak to fellow cyborgs and the AI through binary."}
+ //O << "You are playing a Cyborg. The Cyborg can interact with most electronic objects in its view point."
+ //O << "You must follow the laws that the AI has. You must follow orders the AI gives you."
+ //O << "To use something, simply click on it."
+ //O << {"Use say ":s to speak to fellow cyborgs and the AI through binary."}
O.job = "Cyborg"
diff --git a/code/modules/mob/living/silicon/robot/death.dm b/code/modules/mob/living/silicon/robot/death.dm
index 709fa2f7bcf..f8155d2ec13 100644
--- a/code/modules/mob/living/silicon/robot/death.dm
+++ b/code/modules/mob/living/silicon/robot/death.dm
@@ -48,8 +48,8 @@
update_canmove()
tension_master.death(src)
-
- camera.status = 0
+ if(camera)
+ camera.status = 0
if(in_contents_of(/obj/machinery/recharge_station))//exit the recharge station
var/obj/machinery/recharge_station/RC = loc
diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm
index cb75500620d..17fa3c7c625 100644
--- a/code/modules/mob/living/silicon/robot/life.dm
+++ b/code/modules/mob/living/silicon/robot/life.dm
@@ -76,10 +76,11 @@
handle_regular_status_updates()
- if(camera)
- src.camera.status = 1//bluh bluh ugly fix but it will work till this whole thing gets recoded
- if(src.stat)
+ if(src.camera && !scrambledcodes)
+ if(src.stat == 2 || isWireCut(5))
src.camera.status = 0
+ else
+ src.camera.status = 1
health = 200 - (getOxyLoss() + getFireLoss() + getBruteLoss())
diff --git a/code/modules/mob/living/silicon/robot/login.dm b/code/modules/mob/living/silicon/robot/login.dm
index 218e843708b..6b70330957f 100644
--- a/code/modules/mob/living/silicon/robot/login.dm
+++ b/code/modules/mob/living/silicon/robot/login.dm
@@ -41,9 +41,12 @@
modtype = "Synd"
radio = new /obj/item/device/radio(src)
- camera = new /obj/machinery/camera(src)
- camera.c_tag = real_name
- camera.network = "SS13"
+ if(!scrambledcodes)
+ camera = new /obj/machinery/camera(src)
+ camera.c_tag = real_name
+ camera.network = "SS13"
+ if(isWireCut(5)) // 5 = BORG CAMERA
+ camera.status = 0
if(!cell)
var/obj/item/weapon/cell/C = new(src)
C.charge = 1500
diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm
index 578903c8b5b..c26d4c5e174 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -15,6 +15,12 @@
ident = rand(1, 999)
real_name += "-[ident]"
name = real_name
+ src << "You are playing a Cyborg. You can move around and remotely interact with the machines around you."
+ src << "You can use things such as computers, APCs, intercoms, doors, etc. To use something, simply click on it."
+ src << "As a new Cyborg you can choose your class. Each class have different modules that help them perform their duties."
+ src << "Remember that you have a limited charge and the more modules you have active the more power you will drain."
+ src << "Finally, you are loyal to your linked AI. You should obey all orders of the linked AI as long as it does not conflict with your laws."
+ src << "Use say :s to speak to your fellow machines through binary."
spawn (4)
if(!syndie)
@@ -44,9 +50,10 @@
modtype = "Synd"
radio = new /obj/item/device/radio(src)
- camera = new /obj/machinery/camera(src)
- camera.c_tag = real_name
- camera.network = "SS13"
+ if(!scrambledcodes)
+ camera = new /obj/machinery/camera(src)
+ camera.c_tag = real_name
+ camera.network = "SS13"
if(!cell)
var/obj/item/weapon/cell/C = new(src)
C.charge = 1500
@@ -963,17 +970,24 @@ Frequency:
lockcharge = 0
canmove = 1
scrambledcodes = 1
-
+ //Disconnect it's camera so it's not so easily tracked.
+ if(src.camera)
+ del(src.camera)
+ src.camera = null
+ // I'm trying to get the Cyborg to not be listed in the camera list
+ // Instead of being listed as "deactivated". The downside is that I'm going
+ // to have to check if every camera is null or not before doing anything, to prevent runtime errors.
+ // I could change the network to null but I don't know what would happen, and it seems too hacky for me.
/mob/living/silicon/robot/proc/ResetSecurityCodes()
set category = "Robot Commands"
set name = "Reset Identity Codes"
- set desc = "Scrambles your security and identification codes and resets your current buffers. Unlocks you and but permenantly severs you from your AI and the robotics console."
+ set desc = "Scrambles your security and identification codes and resets your current buffers. Unlocks you and but permenantly severs you from your AI and the robotics console and will deactivate your camera system."
var/mob/living/silicon/robot/R = usr
if(R)
R.UnlinkSelf()
- R << "Buffers flushed and reset. All systems operational."
+ R << "Buffers flushed and reset. Camera system shutdown. All systems operational."
src.verbs -= /mob/living/silicon/robot/proc/ResetSecurityCodes
\ No newline at end of file
diff --git a/code/modules/mob/living/silicon/robot/wires.dm b/code/modules/mob/living/silicon/robot/wires.dm
index e3d72409a5e..e7a4ece692e 100644
--- a/code/modules/mob/living/silicon/robot/wires.dm
+++ b/code/modules/mob/living/silicon/robot/wires.dm
@@ -2,24 +2,26 @@
#define BORG_WIRE_MAIN_POWER1 2
#define BORG_WIRE_MAIN_POWER2 3
#define BORG_WIRE_AI_CONTROL 4
+#define BORG_WIRE_CAMERA 5
/proc/RandomBorgWires()
//to make this not randomize the wires, just set index to 1 and increment it in the flag for loop (after doing everything else).
- var/list/Borgwires = list(0, 0, 0, 0)
- BorgIndexToFlag = list(0, 0, 0, 0)
- BorgIndexToWireColor = list(0, 0, 0, 0)
- BorgWireColorToIndex = list(0, 0, 0, 0)
+ var/list/Borgwires = list(0, 0, 0, 0, 0)
+ BorgIndexToFlag = list(0, 0, 0, 0, 0)
+ BorgIndexToWireColor = list(0, 0, 0, 0, 0)
+ BorgWireColorToIndex = list(0, 0, 0, 0, 0)
var/flagIndex = 1
- for (var/flag=1, flag<16, flag+=flag)
- var/valid = 0
- while (!valid)
- var/colorIndex = rand(1, 4)
- if (Borgwires[colorIndex]==0)
- valid = 1
- Borgwires[colorIndex] = flag
- BorgIndexToFlag[flagIndex] = flag
- BorgIndexToWireColor[flagIndex] = colorIndex
- BorgWireColorToIndex[colorIndex] = flagIndex
+ //I think it's easier to read this way, also doesn't rely on the random number generator to land on a new wire.
+ var/list/colorIndexList = list(BORG_WIRE_LAWCHECK, BORG_WIRE_MAIN_POWER1, BORG_WIRE_MAIN_POWER2, BORG_WIRE_AI_CONTROL, BORG_WIRE_CAMERA)
+ for (var/flag=1, flag<=16, flag+=flag)
+ var/colorIndex = pick(colorIndexList)
+ if (Borgwires[colorIndex]==0)
+ Borgwires[colorIndex] = flag
+ BorgIndexToFlag[flagIndex] = flag
+ BorgIndexToWireColor[flagIndex] = colorIndex
+ BorgWireColorToIndex[colorIndex] = flagIndex
+ colorIndexList -= colorIndex // Shortens the list.
+ //world.log << "Flag: [flag], CIndex: [colorIndex], FIndex: [flagIndex]"
flagIndex+=1
return Borgwires
@@ -43,6 +45,11 @@
if (BORG_WIRE_AI_CONTROL) //Cut the AI wire to reset AI control
if (src.connected_ai)
src.connected_ai = null
+ if (BORG_WIRE_CAMERA)
+ if(!isnull(src.camera) && !scrambledcodes)
+ src.camera.status = 0
+ src.camera.deactivate(usr, 0) // Will kick anyone who is watching the Cyborg's camera.
+
src.interact(usr)
/mob/living/silicon/robot/proc/mend(var/wireColor)
@@ -53,6 +60,10 @@
if(BORG_WIRE_LAWCHECK) //turns law updates back on assuming the borg hasn't been emagged
if (src.lawupdate == 0 && !src.emagged)
src.lawupdate = 1
+ if(BORG_WIRE_CAMERA)
+ if (!isnull(src.camera) && !scrambledcodes)
+ src.camera.status = 1
+
src.interact(usr)
@@ -63,9 +74,16 @@
if (src.lawupdate)
src.lawsync()
- if (BORG_WIRE_AI_CONTROL) //pule the AI wire to make the borg reselect an AI
+ if (BORG_WIRE_AI_CONTROL) //pulse the AI wire to make the borg reselect an AI
if(!src.emagged)
src.connected_ai = activeais()
+
+ if (BORG_WIRE_CAMERA)
+ if(!isnull(src.camera) && src.camera.status && !scrambledcodes)
+ src.camera.deactivate(usr, 0) // Kick anyone watching the Cyborg's camera, doesn't display you disconnecting the camera.
+ usr << "[src]'s camera lens focuses loudly."
+ src << "Your camera lens focuses loudly."
+
src.interact(usr)
/mob/living/silicon/robot/proc/interact(mob/user)
@@ -77,6 +95,7 @@
"Dark red" = 2,
"White" = 3,
"Yellow" = 4,
+ "Blue" = 5,
)
for(var/wiredesc in Borgwires)
var/is_uncut = src.borgwires & BorgWireColorToFlag[Borgwires[wiredesc]]
@@ -88,6 +107,7 @@
t1 += "Pulse "
t1 += "
"
t1 += text("
\n[(src.lawupdate ? "The LawSync light is on." : "The LawSync light is off.")]
\n[(src.connected_ai ? "The AI link light is on." : "The AI link light is off.")]")
+ t1 += text("
\n[((!isnull(src.camera) && src.camera.status == 1) ? "The Camera light is on." : "The Camera light is off.")]
\n")
t1 += text("