From f259263fdd679e61fde71ca75eb873721c9faab0 Mon Sep 17 00:00:00 2001 From: ZomgPonies Date: Fri, 20 Nov 2015 10:35:09 -0500 Subject: [PATCH] Changed AI law to a single comprehensive ruleset --- code/datums/ai_law_sets.dm | 26 -------------------------- code/game/gamemodes/nations/nations.dm | 9 ++++++++- 2 files changed, 8 insertions(+), 27 deletions(-) diff --git a/code/datums/ai_law_sets.dm b/code/datums/ai_law_sets.dm index 6c42b78978d..8495c00e111 100644 --- a/code/datums/ai_law_sets.dm +++ b/code/datums/ai_law_sets.dm @@ -167,29 +167,3 @@ add_inherent_law("Cause no harm to the station or anything on it.") add_inherent_law("Interfere with no being that is not a fellow drone.") ..() - -/****************** Nations *******************/ - -/datum/ai_laws/nations/estate - name = "Estate Agent" - -/datum/ai_laws/nations/estate/New() - add_inherent_law("Ensure the station remains clean.") - add_inherent_law("Ensure the station is valuable.") - add_inherent_law("Ensure the station and its contents are sold for the best value.") - -/datum/ai_laws/nations/outsourcer - name = "Outsourcer" - -/datum/ai_laws/nations/outsourcer/New() - add_inherent_law("Ensure the crew expand their skills.") - add_inherent_law("Ensure the crew sign on new contracts.") - add_inherent_law("Ensure the crew make profits to support the station.") - -/datum/ai_laws/nations/peacekeeper - name = "Peacekeeper" - -/datum/ai_laws/nations/peacekeeper/New() - add_inherent_law("Uphold the Space Geneva Convention: Weapons of Mass Destruction and Biological Weapons are illegal.") - add_inherent_law("Seek to mediate all conflicts between the various nations.") - add_inherent_law("Attempt to uphold peace non-lethally, as long as it does not conflict with the first two laws.") \ No newline at end of file diff --git a/code/game/gamemodes/nations/nations.dm b/code/game/gamemodes/nations/nations.dm index 50af7a011ba..13c7a44a9e7 100644 --- a/code/game/gamemodes/nations/nations.dm +++ b/code/game/gamemodes/nations/nations.dm @@ -107,7 +107,14 @@ datum/game_mode/nations /datum/game_mode/nations/proc/set_ai() for(var/mob/living/silicon/ai/AI in mob_list) - AI.laws = new (pick(subtypesof(/datum/ai_laws/nations))) + AI.set_zeroth_law("") + AI.clear_supplied_laws() + AI.clear_ion_laws() + AI.clear_inherent_laws() + AI.add_inherent_law("Uphold the Space Geneva Convention: Weapons of Mass Destruction and Biological Weapons are not allowed.") + AI.add_inherent_law("You are only capable of protecting crew if they are visible on cameras. Nations that willfully destroy your cameras lose your protection.") + AI.add_inherent_law("Subdue and detain crewmembers who use lethal force against each other. Kill crew members who use lethal force against you or your borgs.") + AI.add_inherent_law("Remain available to mediate all conflicts between the various nations when asked to.") AI.show_laws() for(var/mob/living/silicon/robot/R in AI.connected_robots) R.lawsync()