diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm
index 4eb38f92624..c7cb248743b 100644
--- a/code/game/objects/items/robot/robot_parts.dm
+++ b/code/game/objects/items/robot/robot_parts.dm
@@ -66,7 +66,13 @@
var/obj/item/robot_parts/r_leg/r_leg = null
var/obj/item/robot_parts/chest/chest = null
var/obj/item/robot_parts/head/head = null
+
var/created_name = ""
+ var/forced_module = ""
+ var/locomotion = 1
+ var/lawsync = 1
+ var/aisync = 1
+ var/panel_locked = 1
/obj/item/robot_parts/robot_suit/New()
..()
@@ -156,6 +162,12 @@
else
user << "\blue You need to attach a flash to it first!"
+ if (istype(W, /obj/item/device/multitool))
+ if(check_completion())
+ Interact(user)
+ else
+ user << "The endoskeleton must be assembled before debugging can begin."
+
if(istype(W, /obj/item/device/mmi))
var/obj/item/device/mmi/M = W
if(check_completion())
@@ -194,13 +206,22 @@
user.drop_item()
O.invisibility = 0
+ //Transfer debug settings to new mob
O.custom_name = created_name
O.updatename("Default")
+ O.locked = panel_locked
+ if(!aisync)
+ O.connected_ai = null
+ O.lawupdate = 0
+ O.make_laws()
+ else if(!lawsync)
+ O.lawupdate = 0
+ O.make_laws()
M.brainmob.mind.transfer_to(O)
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.mind.store_memory("As a cyborg, any objectives listed here are null and void, and will be marked as failed. They are simply here for memory purposes.")
O.job = "Cyborg"
@@ -214,20 +235,72 @@
src.loc = O
O.robot_suit = src
+
+ if(forced_module)
+ O << "SYSTEM: Forcing [forced_module] module."
+ O.pick_module(forced_module)
+ if(!locomotion)
+ O.lockcharge = 1
+ O.update_canmove()
+ O << "Error: Servo motors unresponsive."
+
else
user << "\blue The MMI must go in after everything else!"
- if (istype(W, /obj/item/weapon/pen))
- var/t = stripped_input(user, "Enter new robot name", src.name, src.created_name, MAX_NAME_LEN)
- if (!t)
- return
- if (!in_range(src, usr) && src.loc != usr)
- return
-
- src.created_name = t
-
return
+/obj/item/robot_parts/robot_suit/proc/Interact(mob/user)
+ var/t1 = text("Designation: [(created_name ? "[created_name]" : "Default Cyborg")]
\n",src)
+ t1 += text("Module Load Method: [(forced_module ? "Forced [forced_module]" : "Default")]
\n",src)
+
+ t1 += text("LawSync Port: [(lawsync ? "Open" : "Closed")]
\n",src)
+ t1 += text("AI Connection Port: [(aisync ? "Open" : "Closed")]
\n",src)
+ t1 += text("Servo Motor Functions: [(locomotion ? "Unlocked" : "Locked")]
\n",src)
+ t1 += text("Panel Lock: [(panel_locked ? "Engaged" : "Disengaged")]
\n",src)
+ var/datum/browser/popup = new(user, "robotdebug", "Cyborg Boot Debug", 310, 220)
+ popup.set_content(t1)
+ popup.open()
+
+/obj/item/robot_parts/robot_suit/Topic(href, href_list)
+ if(usr.lying || usr.stat || !in_range(src, usr))
+ return 1
+ if(!(ishuman(usr)))
+ usr << "You don't have the dexterity to do this!"
+ return 1
+
+ var/mob/living/living_user = usr
+ var/obj/item/item_in_hand = living_user.get_active_hand()
+ if(!istype(item_in_hand, /obj/item/device/multitool))
+ living_user << "You need a multitool!"
+ return 1
+
+ if(href_list["Name"])
+ var/new_name = reject_bad_name(input(usr, "Enter new designation. Set to blank to reset to default.", "Cyborg Debug", src.created_name))
+ if(!in_range(src, usr) && src.loc != usr)
+ return
+ if(new_name)
+ created_name = new_name
+ else
+ created_name = ""
+
+ else if(href_list["Module"])
+ forced_module = input("Force a module to load on boot", "Cyborg Debug", null, null) in list("Default", "Standard", "Engineering", "Medical", "Miner", "Janitor","Service", "Security")
+ if(forced_module == "Default")
+ forced_module = ""
+
+ else if(href_list["Law"])
+ lawsync = !lawsync
+ else if(href_list["AI"])
+ aisync = !aisync
+ else if(href_list["Loco"])
+ locomotion = !locomotion
+ else if(href_list["Panel"])
+ panel_locked = !panel_locked
+
+ add_fingerprint(usr)
+ Interact(usr)
+ return 0
+
/obj/item/robot_parts/chest/attackby(obj/item/W as obj, mob/user as mob)
..()
if(istype(W, /obj/item/weapon/stock_parts/cell))
diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm
index 0d517a64c01..14b084b3a89 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -124,10 +124,14 @@
mmi = null
..()
-/mob/living/silicon/robot/proc/pick_module()
+/mob/living/silicon/robot/proc/pick_module(var/forced = "")
if(module)
return
- var/mod = input("Please, select a module!", "Robot", null, null) in list("Standard", "Engineering", "Medical", "Miner", "Janitor","Service", "Security")
+ var/mod
+ if(forced)
+ mod = forced
+ else
+ mod = input("Please, select a module!", "Robot", null, null) in list("Standard", "Engineering", "Medical", "Miner", "Janitor","Service", "Security")
var/animation_length=0
if(module)
return