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 1 commit
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
16 changes: 8 additions & 8 deletions code/datums/ai_law_sets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,31 @@
..()

/******************** NanoTrasen/Malf ********************/
/datum/ai_laws/nanotrasen
/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 *************/
/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.")
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
12 changes: 10 additions & 2 deletions code/game/objects/items/weapons/AI_modules.dm
Original file line number Diff line number Diff line change
Expand Up @@ -288,11 +288,19 @@ AI MODULES

/******************** Default ********************/

/obj/item/aiModule/nanotrasen // -- TLE
/obj/item/aiModule/conglomerate // -- TLE
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

/******************** Default ********************/

/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 ********************/

Expand Down
4 changes: 2 additions & 2 deletions code/modules/mob/living/silicon/robot/presets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/silicon/robot/robot.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
59 changes: 59 additions & 0 deletions html/changelogs/Ben10083 - Lawstorage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
################################
# 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."
2 changes: 1 addition & 1 deletion maps/event/generic_dock/generic_dock-1.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
8 changes: 6 additions & 2 deletions maps/sccv_horizon/sccv_horizon.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
Expand Down Expand Up @@ -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,
Expand Down
Loading