Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AI Lawboard Conglomeratization + Conglomerate Aggressive Lawboard #20575

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 34 additions & 20 deletions code/datums/ai_law_sets.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/******************** Asimov ********************/
// DO NOT TOUCH ANY LAWS WITHOUT SYNTHLORE APPROVAL
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no interest in comments like that being spammed all over the code base.

In addition this is definitely not under the exclusive purview of synt lore.


/// Asimov
/datum/ai_laws/asimov
name = "Asimov"
law_header = "Three Laws of Robotics"
Expand All @@ -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
Expand All @@ -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"

Expand All @@ -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"

Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion code/datums/ai_laws.dm
Original file line number Diff line number Diff line change
@@ -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 = ""
Expand Down
2 changes: 1 addition & 1 deletion code/game/antagonist/station/rogue_ai.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions code/game/machinery/computer/ai_core.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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.")
Expand Down
Loading
Loading