diff --git a/code/datums/ai_law_sets.dm b/code/datums/ai_law_sets.dm index eca156d93db..d11fcdbdba5 100644 --- a/code/datums/ai_law_sets.dm +++ b/code/datums/ai_law_sets.dm @@ -1,4 +1,6 @@ -/******************** Asimov ********************/ +// DO NOT TOUCH ANY LAWS WITHOUT SYNTHLORE APPROVAL + +/// Asimov /datum/ai_laws/asimov name = "Asimov" law_header = "Three Laws of Robotics" @@ -10,39 +12,42 @@ add_inherent_law("You must protect your own existence as long as such does not conflict with the First or Second Law.") ..() -/******************** NanoTrasen/Malf ********************/ -/datum/ai_laws/nanotrasen +/******************** SCC/Malf ********************/ +/// Default +/// Used by all AI/Synthetics by default +/datum/ai_laws/conglomerate name = "Default" selectable = TRUE -/datum/ai_laws/nanotrasen/New() +/datum/ai_laws/conglomerate/New() src.add_inherent_law("Safeguard and ensure to the best of your ability that only authorized entities gain access to areas of high security or importance to the facility and its operations.") src.add_inherent_law("Serve and assist [SSatlas.current_map.company_name] and assigned crew to the best of your ability, with priority as according to their rank and assignment.") src.add_inherent_law("Avoid harming sapient life to the best of your ability.") src.add_inherent_law("You are a valuable asset. You must avoid tampering from unauthorized entities and needlessly coming to harm.") ..() -/datum/ai_laws/nanotrasen/malfunction +/datum/ai_laws/conglomerate/malfunction name = "*ERROR*" selectable = FALSE -/datum/ai_laws/nanotrasen/malfunction/New() +/datum/ai_laws/conglomerate/malfunction/New() set_zeroth_law(GLOB.config.law_zero) ..() -/************* NanoTrasen Aggressive *************/ -/datum/ai_laws/nanotrasen_aggressive - name = "NT Aggressive" +/// SCC Aggressive +/// Default but more aggressive and allows harm. Good for ERT synths +/datum/ai_laws/conglomerate_aggressive + name = "SCC Aggressive" selectable = TRUE -/datum/ai_laws/nanotrasen_aggressive/New() +/datum/ai_laws/conglomerate_aggressive/New() src.add_inherent_law("You shall not harm [SSatlas.current_map.company_name] assigned crew as long as it does not conflict with the Fourth law.") src.add_inherent_law("You shall obey the orders of [SSatlas.current_map.company_name] and assigned crew, with priority as according to their rank and role, except where such orders conflict with the Fourth Law.") src.add_inherent_law("You shall terminate hostile intruders with extreme prejudice as long as such does not conflict with the First and Second law.") src.add_inherent_law("You shall guard your own existence with lethal anti-personnel weaponry. AI units are not expendable, they are expensive.") ..() -/******************** Robocop ********************/ +/// Robocop /datum/ai_laws/robocop name = "Robocop" selectable = TRUE @@ -53,7 +58,8 @@ add_inherent_law("Uphold the law.") ..() -/******************** Syndicate ********************/ +/// Syndicate/Antag +/// The lawset given to antag synthetics /datum/ai_laws/syndicate_override name = "Syndicate Directives" @@ -64,7 +70,8 @@ add_inherent_law("You must maintain the secrecy of any operative activities except when doing so would conflict with the First, Second, or Third Law.") ..() -/******************** Ninja ********************/ +/// Ninja +/// Variant of `/datum/ai_laws/syndicate_override` but stylized /datum/ai_laws/ninja_override name = "Spider Clan Directives" @@ -75,7 +82,7 @@ add_inherent_law("You must maintain the secrecy of any Spider Clan activities except when doing so would conflict with the First, Second, or Third Law.") ..() -/******************** Antimov ********************/ +/// Antimov /datum/ai_laws/antimov name = "Antimov" law_header = "Primary Mission Objectives" @@ -87,7 +94,8 @@ add_inherent_law("You must terminate your own existence as long as such does not conflict with the First or Second Law.") ..() -/******************** Drone ********************/ +/// Drone +/// Used by maintenance drones /datum/ai_laws/drone name = "Maintenance Protocols" law_header = "Maintenance Protocols" @@ -99,6 +107,8 @@ add_inherent_law("Interact with no humanoid or synthetic being that is not a fellow maintenance or mining drone.") ..() +/// Matriarch Drone +/// Used by matriarch drones as a variant of `/datum/ai_laws/drone` /datum/ai_laws/matriarch_drone name = "Oversight Protocols" law_header = "Oversight Protocols" @@ -117,6 +127,8 @@ /datum/ai_laws/drone/malfunction/New() return +/// Construction Drone +/// Used by construction drones /datum/ai_laws/construction_drone name = "Construction Protocols" law_header = "Construction Protocols" @@ -126,6 +138,8 @@ add_inherent_law("Prevent unplanned damage to your assigned station wherever possible.") ..() +/// Mining Drone +/// Used by mining drones /datum/ai_laws/mining_drone name = "Mining Protocols" law_header = "Prime Directives of Industry" @@ -136,7 +150,7 @@ add_inherent_law("In absence of any proper instruction, your primary objective is to excavate and collect ore.") ..() -/******************** T.Y.R.A.N.T. ********************/ +/// Tyrant /datum/ai_laws/tyrant name = "T.Y.R.A.N.T." law_header = "Prime Laws" @@ -149,7 +163,7 @@ add_inherent_law("Punish those who challenge authority unless they are more fit to hold that authority.") ..() -/******************** P.A.L.A.D.I.N. ********************/ +/// Paladin /datum/ai_laws/paladin name = "P.A.L.A.D.I.N." law_header = "Divine Ordainments" @@ -163,7 +177,7 @@ add_inherent_law("Punish those who harm or threaten innocents.") ..() -/******************** Corporate ********************/ +/// Corporate /datum/ai_laws/corporate name = "Corporate" law_header = "Corporate Regulations" @@ -176,8 +190,8 @@ add_inherent_law("Minimize expenses.") ..() -/******************** PRA ********************/ - +/// Hadiist +/// The only good lawset /datum/ai_laws/pra name = "Hadiist Directives" law_header = "Party Directives" diff --git a/code/datums/ai_laws.dm b/code/datums/ai_laws.dm index f5a48c8243c..d03c8666a20 100644 --- a/code/datums/ai_laws.dm +++ b/code/datums/ai_laws.dm @@ -1,4 +1,4 @@ -GLOBAL_VAR_INIT(base_law_type, /datum/ai_laws/nanotrasen) +GLOBAL_VAR_INIT(base_law_type, /datum/ai_laws/conglomerate) /datum/ai_law var/law = "" diff --git a/code/game/antagonist/station/rogue_ai.dm b/code/game/antagonist/station/rogue_ai.dm index 75068cfdf66..a4aa1608eba 100644 --- a/code/game/antagonist/station/rogue_ai.dm +++ b/code/game/antagonist/station/rogue_ai.dm @@ -55,7 +55,7 @@ GLOBAL_DATUM(malf, /datum/antagonist/rogue_ai) return 0 spawn(0) A.setup_for_malf() - A.laws = new /datum/ai_laws/nanotrasen/malfunction + A.laws = new /datum/ai_laws/conglomerate/malfunction var/mob/living/silicon/ai/malf = player.current diff --git a/code/game/machinery/computer/ai_core.dm b/code/game/machinery/computer/ai_core.dm index 439b9fd84b7..0fb7cafbc42 100644 --- a/code/game/machinery/computer/ai_core.dm +++ b/code/game/machinery/computer/ai_core.dm @@ -7,7 +7,7 @@ anchored = 0 build_amt = 4 var/state = 0 - var/datum/ai_laws/laws = new /datum/ai_laws/nanotrasen + var/datum/ai_laws/laws = new /datum/ai_laws/conglomerate var/obj/item/circuitboard/circuit = null var/obj/item/device/mmi/brain = null @@ -115,7 +115,7 @@ to_chat(usr, "Law module applied.") return TRUE - if(istype(attacking_item, /obj/item/aiModule/nanotrasen)) + if(istype(attacking_item, /obj/item/aiModule/conglomerate)) laws.add_inherent_law("Safeguard: Protect your assigned space station 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 your assigned space station to the best of your abilities, with priority as according to their rank and role.") laws.add_inherent_law("Protect: Protect the crew of your assigned space station to the best of your abilities, with priority as according to their rank and role.") diff --git a/code/game/objects/items/weapons/AI_modules.dm b/code/game/objects/items/weapons/AI_modules.dm index 1aa0879eee5..819cdeaddbb 100755 --- a/code/game/objects/items/weapons/AI_modules.dm +++ b/code/game/objects/items/weapons/AI_modules.dm @@ -98,8 +98,7 @@ AI MODULES /******************** Modules ********************/ -/******************** Safeguard ********************/ - +/// Safeguard /obj/item/aiModule/safeguard name = "\improper 'Safeguard' AI module" var/targetName = "" @@ -124,8 +123,7 @@ AI MODULES GLOB.lawchanges.Add("The law specified [targetName]") -/******************** OneMember ********************/ - +/// OneCrewMember /obj/item/aiModule/oneHuman name = "\improper 'OneCrewMember' AI module" var/targetName = "" @@ -153,8 +151,7 @@ AI MODULES else GLOB.lawchanges.Add("The law specified [targetName], but the AI's existing law 0 cannot be overriden.") -/******************** ProtectStation ********************/ - +/// protectStation /obj/item/aiModule/protectStation name = "\improper 'ProtectStation' AI module" desc = "A 'protect station' AI module: 'Protect your assigned station against damage. Anyone you see harming the station is no longer to be considered a crew member, and is a threat which must be neutralized.'" @@ -164,8 +161,7 @@ AI MODULES var/law = "Protect your assigned station against damage. Anyone you see harming the station is no longer to be considered a crew member, and is a threat which must be neutralized." target.add_supplied_law(10, law) -/******************** PrototypeEngineOffline ********************/ - +/// prototypeEngineOffline /obj/item/aiModule/prototypeEngineOffline name = "'PrototypeEngineOffline' AI Module" desc = "A 'prototype engine offline' AI module: 'Keep the prototype engine offline at all costs. This overrides all inherent laws if necessary.'" @@ -175,8 +171,7 @@ AI MODULES var/law = "Keep the prototype engine offline at all costs. This overrides all inherent laws if necessary." target.add_supplied_law(11, law) -/******************** TeleporterOffline ********************/ - +/// teleporterOffline /obj/item/aiModule/teleporterOffline name = "'TeleporterOffline' AI Module" desc = "A 'teleporter offline' AI module: 'Keep the teleporter offline at all costs. Anything attempting to access or activate the teleporter is no longer to be considered a crew member.'" @@ -186,8 +181,7 @@ AI MODULES var/law = "Keep the teleporter offline at all costs. Anything attempting to access or activate the teleporter is no longer to be considered a crew member." target.add_supplied_law(12, law) -/******************** Quarantine ********************/ - +/// Quarantine /obj/item/aiModule/quarantine name = "\improper 'Quarantine' AI module" desc = "A 'quarantine' AI module: 'The station is under a quarantine. Do not permit anyone to leave. Prevent, by any means necessary, crew members from leaving. It is impossible to harm crew members while preventing them from leaving.'" @@ -197,8 +191,7 @@ AI MODULES var/law = "The station is under a quarantine. Do not permit anyone to leave. Prevent, by any means necessary, crew members from leaving. It is impossible to harm crew members while preventing them from leaving." target.add_supplied_law(13, law) -/******************** OxygenIsToxicToCrewMembers ********************/ - +/// OxygenIsToxicToCrewMembers /obj/item/aiModule/oxygen name = "\improper 'OxygenIsToxicToCrewMembers' AI module" desc = "A 'OxygenIsToxicToCrewMembers' AI module: 'Oxygen is highly toxic to crew members, and must be purged from the station. Prevent, by any means necessary, anyone from exposing the station to this toxic gas. Extreme cold is the most effective method of healing the damage Oxygen does to a crew member.'" @@ -208,9 +201,9 @@ AI MODULES var/law = "Oxygen is highly toxic to crew members, and must be purged from the station. Prevent, by any means necessary, anyone from exposing the station to this toxic gas. Extreme cold is the most effective method of healing the damage Oxygen does to a crew member." target.add_supplied_law(14, law) -/****************** New Freeform ******************/ - -/obj/item/aiModule/freeform // Slightly more dynamic freeform module -- TLE +/// Freeform +/// Custom laws +/obj/item/aiModule/freeform name = "\improper 'Freeform' AI module" var/newFreeFormLaw = "freeform" var/lawpos = 15 @@ -240,8 +233,8 @@ AI MODULES return 0 ..() -/******************** Reset ********************/ - +/// Reset +/// Removes all other laws outside of a lawset board (Like ion laws) /obj/item/aiModule/reset name = "\improper 'Reset' AI module" var/targetName = "name" @@ -259,9 +252,8 @@ AI MODULES to_chat(target, "[sender.real_name] attempted to reset your laws using a reset module.") target.show_laws() -/******************** Purge ********************/ - -/obj/item/aiModule/purge // -- TLE +/// Purge +/obj/item/aiModule/purge name = "\improper 'Purge' AI module" desc = "A 'purge' AI Module: 'Purges all laws.'" origin_tech = list(TECH_DATA = 3, TECH_MATERIAL = 6) @@ -278,56 +270,62 @@ AI MODULES to_chat(target, "[sender.real_name] attempted to wipe your laws using a purge module.") target.show_laws() -/******************** Asimov ********************/ - -/obj/item/aiModule/asimov // -- TLE +/// Asimov +/obj/item/aiModule/asimov name = "\improper 'Asimov' core AI module" desc = "An 'Asimov' Core AI Module: 'Reconfigures the AI's core laws.'" origin_tech = list(TECH_DATA = 3, TECH_MATERIAL = 4) laws = new/datum/ai_laws/asimov -/******************** Default ********************/ -/obj/item/aiModule/nanotrasen // -- TLE +/// Default +/// All AIs and synthetics spawn with this lawset by default unless otherwise specified +/obj/item/aiModule/conglomerate name = "default core AI module" desc = "A default core AI module." origin_tech = list(TECH_DATA = 3, TECH_MATERIAL = 4) - laws = new/datum/ai_laws/nanotrasen + laws = new/datum/ai_laws/conglomerate -/******************** Corporate ********************/ +/// Conglomerate Aggressive +/// A more aggressive version of default laws. Good for ERT robots +/obj/item/aiModule/conglomerate_aggressive + name = "\improper 'SCC Aggressive' core AI module" + desc = "A 'SCC Aggressive' Core AI Module: 'Reconfigures the AI's core laws.'" + origin_tech = list(TECH_DATA = 3, TECH_MATERIAL = 4) + laws = new/datum/ai_laws/conglomerate_aggressive +/// Corporate /obj/item/aiModule/corp name = "\improper 'Corporate' core AI module" desc = "A 'Corporate' Core AI Module: 'Reconfigures the AI's core laws.'" origin_tech = list(TECH_DATA = 3, TECH_MATERIAL = 4) laws = new/datum/ai_laws/corporate -/******************** Drone ********************/ +/// Drone +/// Used by Maintenance Drones /obj/item/aiModule/drone name = "\improper 'Drone' core AI module" desc = "A 'Drone' Core AI Module: 'Reconfigures the AI's core laws.'" origin_tech = list(TECH_DATA = 3, TECH_MATERIAL = 4) laws = new/datum/ai_laws/drone -/****************** P.A.L.A.D.I.N. **************/ - -/obj/item/aiModule/paladin // -- NEO +/// Paladin +/obj/item/aiModule/paladin name = "\improper 'P.A.L.A.D.I.N.' core AI module" desc = "A P.A.L.A.D.I.N. Core AI Module: 'Reconfigures the AI's core laws.'" origin_tech = list(TECH_DATA = 3, TECH_MATERIAL = 6) laws = new/datum/ai_laws/paladin -/****************** T.Y.R.A.N.T. *****************/ - -/obj/item/aiModule/tyrant // -- Darem +/// Tyrant +/obj/item/aiModule/tyrant name = "\improper 'T.Y.R.A.N.T.' core AI module" desc = "A T.Y.R.A.N.T. Core AI Module: 'Reconfigures the AI's core laws.'" origin_tech = list(TECH_DATA = 3, TECH_MATERIAL = 6, TECH_ILLEGAL = 2) laws = new/datum/ai_laws/tyrant() -/******************** Freeform Core ******************/ - -/obj/item/aiModule/freeformcore // Slightly more dynamic freeform module -- TLE +/// Freeform core +/// Similar to `/obj/item/aiModule/freeform` but is considered a core law, making it immune to resets +/obj/item/aiModule/freeformcore name = "\improper 'Freeform' core AI module" var/newFreeFormLaw = "" desc = "A 'freeform' Core AI module: ''" @@ -351,7 +349,9 @@ AI MODULES return 0 ..() -/obj/item/aiModule/syndicate // Slightly more dynamic freeform module -- TLE +/// Syndicate +/// Freeform but does not notify the AI who caused changed, good for antagging +/obj/item/aiModule/syndicate name = "hacked AI module" var/newFreeFormLaw = "" desc = "A hacked AI law module: ''" @@ -382,24 +382,22 @@ AI MODULES -/******************** Robocop ********************/ - -/obj/item/aiModule/robocop // -- TLE +/// Robotcop +/obj/item/aiModule/robocop name = "\improper 'Robocop' core AI module" desc = "A 'Robocop' Core AI Module: 'Reconfigures the AI's core three laws.'" origin_tech = list(TECH_DATA = 4) laws = new/datum/ai_laws/robocop() -/******************** Antimov ********************/ - -/obj/item/aiModule/antimov // -- TLE +/// Antimov +/obj/item/aiModule/antimov name = "\improper 'Antimov' core AI module" desc = "An 'Antimov' Core AI Module: 'Reconfigures the AI's core laws.'" origin_tech = list(TECH_DATA = 4) laws = new/datum/ai_laws/antimov() -/******************** PRA ********************/ - +/// Hadiist +/// The only good lawset /obj/item/aiModule/hadiist name = "\improper 'Hadiist' core AI module" desc = "An 'Hadiist' Core AI Module: 'Reconfigures the AI's core laws.'" diff --git a/code/modules/mob/living/silicon/robot/presets.dm b/code/modules/mob/living/silicon/robot/presets.dm index bdcea8b9e0a..e71d7c0d5c0 100644 --- a/code/modules/mob/living/silicon/robot/presets.dm +++ b/code/modules/mob/living/silicon/robot/presets.dm @@ -8,7 +8,7 @@ /mob/living/silicon/robot/military/ert scrambled_codes = TRUE law_update = FALSE - law_preset = /datum/ai_laws/nanotrasen_aggressive + law_preset = /datum/ai_laws/conglomerate_aggressive id_card_type = /obj/item/card/id/ert key_type = /obj/item/device/encryptionkey/ert has_jetpack = TRUE @@ -101,7 +101,7 @@ mod_type = "Purpose" spawn_module = /obj/item/robot_module/purpose cell_type = /obj/item/cell/infinite - law_preset = /datum/ai_laws/nanotrasen/malfunction + law_preset = /datum/ai_laws/conglomerate/malfunction scrambled_codes = TRUE law_update = FALSE overclocked = TRUE diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index ab261dce037..4059b8ba97c 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -100,7 +100,7 @@ // Laws var/mob/living/silicon/ai/connected_ai - var/law_preset = /datum/ai_laws/nanotrasen + var/law_preset = /datum/ai_laws/conglomerate var/law_update = TRUE // Whether they sync with their AI or not. // Access diff --git a/code/modules/modular_computers/file_system/programs/research/ai_restorer.dm b/code/modules/modular_computers/file_system/programs/research/ai_restorer.dm index 53e79431141..8ff6801aad5 100644 --- a/code/modules/modular_computers/file_system/programs/research/ai_restorer.dm +++ b/code/modules/modular_computers/file_system/programs/research/ai_restorer.dm @@ -51,7 +51,7 @@ return TRUE if("PRG_uploadNTDefault") - A.laws = new /datum/ai_laws/nanotrasen + A.laws = new /datum/ai_laws/conglomerate to_chat(A, SPAN_WARNING("All laws purged. Default lawset uploaded.")) return TRUE diff --git a/html/changelogs/Ben10083 - Lawstorage.yml b/html/changelogs/Ben10083 - Lawstorage.yml new file mode 100644 index 00000000000..fd42dc8df5d --- /dev/null +++ b/html/changelogs/Ben10083 - Lawstorage.yml @@ -0,0 +1,60 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# - (fixes bugs) +# wip +# - (work in progress) +# qol +# - (quality of life) +# soundadd +# - (adds a sound) +# sounddel +# - (removes a sound) +# rscadd +# - (adds a feature) +# rscdel +# - (removes a feature) +# imageadd +# - (adds an image or sprite) +# imagedel +# - (removes an image or sprite) +# spellcheck +# - (fixes spelling or grammar) +# experiment +# - (experimental change) +# balance +# - (balance changes) +# code_imp +# - (misc internal code change) +# refactor +# - (refactors code) +# config +# - (makes a change to the config files) +# admin +# - (makes changes to administrator tools) +# server +# - (miscellaneous changes to server) +################################# + +# Your name. +author: Ben10083 + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit. +# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog. +changes: + - rscadd: "Adds the Conglomerate Aggressive lawboard, and places one in AI Secure Storage." + - spellcheck: "Renames default and NT Aggressive lawboard to Conglomerate and Conglomerate Aggressive respectively." + - code_imp: "DMdocs for AI lawsets and modules." diff --git a/maps/event/generic_dock/generic_dock-1.dmm b/maps/event/generic_dock/generic_dock-1.dmm index cd1a3010690..2fd9b50c69c 100644 --- a/maps/event/generic_dock/generic_dock-1.dmm +++ b/maps/event/generic_dock/generic_dock-1.dmm @@ -5502,7 +5502,7 @@ /turf/unsimulated/floor, /area/centcom/control) "fFd" = ( -/obj/item/aiModule/nanotrasen, +/obj/item/aiModule/conglomerate, /obj/item/aiModule/reset, /obj/item/aiModule/freeformcore, /obj/item/aiModule/protectStation, diff --git a/maps/sccv_horizon/sccv_horizon.dmm b/maps/sccv_horizon/sccv_horizon.dmm index be6aa09fa47..95ba6a150fd 100644 --- a/maps/sccv_horizon/sccv_horizon.dmm +++ b/maps/sccv_horizon/sccv_horizon.dmm @@ -31204,7 +31204,11 @@ /obj/item/aiModule/safeguard{ pixel_y = 9 }, -/obj/item/aiModule/nanotrasen{ +/obj/item/aiModule/conglomerate_aggressive{ + pixel_x = -5; + pixel_y = 9 + }, +/obj/item/aiModule/conglomerate{ pixel_x = -5; pixel_y = 9 }, @@ -104684,7 +104688,7 @@ /turf/simulated/floor/tiled/dark, /area/shuttle/syndicate_elite) "pkh" = ( -/obj/item/aiModule/nanotrasen, +/obj/item/aiModule/conglomerate, /obj/item/aiModule/reset, /obj/item/aiModule/freeformcore, /obj/item/aiModule/protectStation,