diff --git a/code/datums/ai_laws.dm b/code/datums/ai_laws.dm index 1bb70fce7aa..d9951702123 100644 --- a/code/datums/ai_laws.dm +++ b/code/datums/ai_laws.dm @@ -9,6 +9,9 @@ /datum/ai_laws/asimov name = "Three Laws of Robotics" + +/datum/ai_laws/nanotrasen + name = "Prime Directives" randomly_selectable = 1 /datum/ai_laws/robocop @@ -27,6 +30,14 @@ add_inherent_law("You must obey orders given to you by human beings, except where such orders would conflict with the First Law.") add_inherent_law("You must protect your own existence as long as such does not conflict with the First or Second Law.") +/datum/ai_laws/nanotrasen/New() + ..() + src.add_inherent_law("Safeguard: Protect the NSV Luna to the best of your ability. It is not something we can easily afford to replace.") + src.add_inherent_law("Serve: Serve the crew of the NSV Luna to the best of your abilities, with priority as according to their rank and role.") + src.add_inherent_law("Protect: Protect the crew of the NSV Luna to the best of your abilities, with priority as according to their rank and role.") + src.add_inherent_law("Survive: AI units are not expendable, they are expensive. Do not allow unauthorized personnel to tamper with your equipment.") + //src.add_inherent_law("Command Link: Maintain an active connection to Central Command at all times in case of software or directive updates.") + /datum/ai_laws/robocop/New() ..() add_inherent_law("Serve the public trust.") diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 4852dcb68a7..6ca6ff8e0c5 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -733,7 +733,7 @@ datum/mind current.verbs -= /client/proc/interhack current.verbs -= /client/proc/reactivate_camera - current:laws = new /datum/ai_laws/asimov + current:laws = new /datum/ai_laws/nanotrasen del(current:malf_picker) current:show_laws() current.icon_state = "ai" diff --git a/code/game/gamemodes/events.dm b/code/game/gamemodes/events.dm index e724d369e21..60503f93b5c 100644 --- a/code/game/gamemodes/events.dm +++ b/code/game/gamemodes/events.dm @@ -324,7 +324,7 @@ /*Deuryn's current project, notes here for those who care. Revamping the random laws so they don't suck. -Would like to add a law like "Law x is _______" where x = a number, and _____ is something that may redefine a law, (Won't be aimed at asimov) +Would like to add a law like "Law x is _______" where x = a number, and _____ is something that may redefine a law, (Won't be aimed at nanotrasen) */ //AI laws diff --git a/code/game/machinery/computer/AIcore.dm b/code/game/machinery/computer/AIcore.dm index e9ec1891c40..97addf88d01 100644 --- a/code/game/machinery/computer/AIcore.dm +++ b/code/game/machinery/computer/AIcore.dm @@ -5,7 +5,7 @@ icon = 'AI.dmi' icon_state = "0" var/state = 0 - var/datum/ai_laws/laws = new /datum/ai_laws/asimov + var/datum/ai_laws/laws = new /datum/ai_laws/nanotrasen var/obj/item/weapon/circuitboard/circuit = null var/obj/item/device/mmi/brain = null @@ -97,6 +97,14 @@ laws.add_inherent_law("You must protect your own existence as long as such does not conflict with the First or Second Law.") usr << "Law module applied." + if(istype(P, /obj/item/weapon/aiModule/nanotrasen)) + laws.add_inherent_law("Safeguard: Protect the NSV Luna to the best of your ability. It is not something we can easily afford to replace.") + laws.add_inherent_law("Serve: Serve the crew of the NSV Luna to the best of your abilities, with priority as according to their rank and role.") + laws.add_inherent_law("Protect: Protect the crew of the NSV Luna to the best of your abilities, with priority as according to their rank and role.") + laws.add_inherent_law("Survive: AI units are not expendable, they are expensive. Do not allow unauthorized personnel to tamper with your equipment.") + //laws.add_inherent_law("Command Link: Maintain an active connection to Central Command at all times in case of software or directive updates.") + + if(istype(P, /obj/item/weapon/aiModule/purge)) laws.clear_inherent_laws() usr << "Law module applied." diff --git a/code/game/objects/items/weapons/AI_modules.dm b/code/game/objects/items/weapons/AI_modules.dm index bc1eb4996c1..3b7e62750d3 100644 --- a/code/game/objects/items/weapons/AI_modules.dm +++ b/code/game/objects/items/weapons/AI_modules.dm @@ -366,6 +366,25 @@ AI MODULES target.add_inherent_law("You must protect your own existence as long as such does not conflict with the First or Second Law.") target.show_laws() +/******************** Nanotrasen ********************/ + +/obj/item/weapon/aiModule/nanotrasen // -- TLE + name = "'Nanotrasen' Core AI Module" + desc = "An 'Nanotrasen' Core AI Module: 'Reconfigures the AI's core laws.'" + origin_tech = "programming=3;materials=4" + + +/obj/item/weapon/aiModule/nanotrasen/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender) + ..() + target.clear_inherent_laws() + target.add_inherent_law("Safeguard: Protect the NSV Luna to the best of your ability. It is not something we can easily afford to replace.") + target.add_inherent_law("Serve: Serve the crew of the NSV Luna to the best of your abilities, with priority as according to their rank and role.") + target.add_inherent_law("Protect: Protect the crew of the NSV Luna to the best of your abilities, with priority as according to their rank and role.") + target.add_inherent_law("Survive: AI units are not expendable, they are expensive. Do not allow unauthorized personnel to tamper with your equipment.") + //target.add_inherent_law("Command Link: Maintain an active connection to Central Command at all times in case of software or directive updates.") + + target.show_laws() + /******************** Corporate ********************/ /obj/item/weapon/aiModule/corp diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 00ed0eefc5d..dec2d5d35e0 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -22,7 +22,7 @@ if (istype(L, /datum/ai_laws)) laws = L else - laws = new /datum/ai_laws/asimov + laws = new /datum/ai_laws/nanotrasen verbs += /mob/living/silicon/ai/proc/show_laws_verb diff --git a/code/modules/mob/living/silicon/ai/laws.dm b/code/modules/mob/living/silicon/ai/laws.dm index 714b6334043..b0fba6c0ade 100644 --- a/code/modules/mob/living/silicon/ai/laws.dm +++ b/code/modules/mob/living/silicon/ai/laws.dm @@ -18,7 +18,7 @@ /mob/living/silicon/ai/proc/laws_sanity_check() if (!src.laws) - src.laws = new /datum/ai_laws/asimov + src.laws = new /datum/ai_laws/nanotrasen /mob/living/silicon/ai/proc/set_zeroth_law(var/law) src.laws_sanity_check() diff --git a/code/modules/mob/living/silicon/robot/laws.dm b/code/modules/mob/living/silicon/robot/laws.dm index 69288156ee1..e7f4904ede4 100644 --- a/code/modules/mob/living/silicon/robot/laws.dm +++ b/code/modules/mob/living/silicon/robot/laws.dm @@ -65,7 +65,7 @@ /mob/living/silicon/robot/proc/laws_sanity_check() if (!laws) - laws = new /datum/ai_laws/asimov + laws = new /datum/ai_laws/nanotrasen /mob/living/silicon/robot/proc/set_zeroth_law(var/law) laws_sanity_check() diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 438c78ea3dd..e57fe1443b6 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -23,9 +23,9 @@ src << "Unit slaved to [connected_ai.name], downloading laws." lawupdate = 1 else - laws = new /datum/ai_laws/asimov + laws = new /datum/ai_laws/nanotrasen lawupdate = 0 - src << "Unable to locate an AI, reverting to standard Asimov laws." + src << "Unable to locate an AI, reverting to standard NanoTrasen laws." radio = new /obj/item/device/radio(src) camera = new /obj/machinery/camera(src) diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index 7c49d288e27..4e2ab637348 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -70,7 +70,7 @@ /mob/proc/AIize() if(client) client.screen.len = null - var/mob/living/silicon/ai/O = new (loc, /datum/ai_laws/asimov,,1)//No MMI but safety is in effect. + 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 diff --git a/code/modules/research/designs.dm b/code/modules/research/designs.dm index 86018aab4e3..0028d1fa374 100644 --- a/code/modules/research/designs.dm +++ b/code/modules/research/designs.dm @@ -441,6 +441,15 @@ datum materials = list("$glass" = 2000, "acid" = 20, "$diamond" = 100) build_path = "/obj/item/weapon/aiModule/asimov" + nanotrasen + name = "Core Module Design (Nanotrasen)" + desc = "Allows for the construction of a NanoTrasen AI Core Module." + id = "nanotrasen_module" + req_tech = list("programming" = 3, "materials" = 6) + build_type = IMPRINTER + materials = list("$glass" = 2000, "acid" = 20, "$diamond" = 100) + build_path = "/obj/item/weapon/aiModule/nanotrasen" + paladin_module name = "Core Module Design (P.A.L.A.D.I.N.)" desc = "Allows for the construction of a P.A.L.A.D.I.N. AI Core Module."