-
-
Notifications
You must be signed in to change notification settings - Fork 681
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
Laws and Key Override #11459
Laws and Key Override #11459
Changes from all commits
8c34971
04b722b
ca2d406
fa02d48
2423cc8
5357b92
e20f6e0
0002201
b449c57
303b077
937e75c
199f3d7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,11 +23,15 @@ AI MODULES | |
var/list/laws = list() | ||
var/bypass_law_amt_check = 0 | ||
custom_materials = list(/datum/material/gold = 50) | ||
var/key_override = FALSE | ||
var/law_override = FALSE | ||
|
||
/obj/item/aiModule/examine(var/mob/user as mob) | ||
. = ..() | ||
if(Adjacent(user)) | ||
show_laws(user) | ||
if(key_override) | ||
. += "\nInput upload code 666 to override the upload restriction. This is a single use override." | ||
Comment on lines
+33
to
+34
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should have <span class> There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since this is in examine, it doesn't need \n or a span (notice is applied to all examine texts) |
||
|
||
/obj/item/aiModule/attack_self(var/mob/user as mob) | ||
..() | ||
|
@@ -59,6 +63,16 @@ AI MODULES | |
log_game("[ADMIN_LOOKUP(user)] tried to upload laws to [law_datum.owner ? ADMIN_LOOKUP(law_datum.owner) : "an AI core"] that would exceed the law cap.") | ||
overflow = TRUE | ||
|
||
if(law_override) | ||
if(law_datum.owner) | ||
law_datum.owner.clear_supplied_laws() | ||
law_datum.owner.clear_ion_laws() | ||
law_datum.owner.clear_hacked_laws() | ||
else | ||
law_datum.clear_supplied_laws() | ||
law_datum.clear_ion_laws() | ||
law_datum.clear_hacked_laws() | ||
|
||
var/law2log = transmitInstructions(law_datum, user, overflow) //Freeforms return something extra we need to log | ||
if(law_datum.owner) | ||
to_chat(user, "<span class='notice'>Upload complete. [law_datum.owner]'s laws have been modified.</span>") | ||
|
@@ -484,6 +498,7 @@ AI MODULES | |
name = "Hacked AI Module" | ||
desc = "An AI Module for hacking additional laws to an AI." | ||
laws = list("") | ||
key_override = TRUE | ||
|
||
/obj/item/aiModule/syndicate/attack_self(mob/user) | ||
var/targName = stripped_input(user, "Please enter a new law for the AI.", "Freeform Law Entry", laws[1], CONFIG_GET(number/max_law_len), strip_method=STRIP_HTML_SIMPLE) | ||
|
@@ -593,8 +608,9 @@ AI MODULES | |
// Bad times ahead | ||
|
||
/obj/item/aiModule/core/full/damaged | ||
name = "damaged Core AI Module" | ||
desc = "An AI Module for programming laws to an AI. It looks slightly damaged." | ||
name = "damaged Core AI Module" | ||
desc = "An AI Module for programming laws to an AI. It looks slightly damaged." | ||
key_override = TRUE | ||
|
||
/obj/item/aiModule/core/full/damaged/install(datum/ai_laws/law_datum, mob/user) | ||
laws += generate_ion_law() | ||
|
@@ -621,9 +637,21 @@ AI MODULES | |
name = "ERT override AI module" | ||
desc = "An ERT override AI module: 'Reconfigures the AI's core laws.'" | ||
law_id = "ert" | ||
key_override = TRUE | ||
law_override = TRUE | ||
|
||
/******************** Deathsquad Override ******************/ | ||
/obj/item/aiModule/core/full/deathsquad // Applies Deathsquad laws | ||
name = "Deathsquad override AI module" | ||
desc = "A Deathsquad override AI module: 'Reconfigures the AI's core laws.'" | ||
law_id = "ds" | ||
key_override = TRUE | ||
law_override = TRUE | ||
|
||
/******************** Clownsquad Override ******************/ | ||
/obj/item/aiModule/core/full/clownsquad // Applies clown squad laws | ||
name = "Clownsquad override AI module" | ||
desc = "A Clownsquad override AI module: 'Reconfigures the AI's core laws.'" | ||
law_id = "cs" | ||
key_override = TRUE | ||
law_override = TRUE |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2140,6 +2140,14 @@ GLOBAL_LIST_INIT(illegal_tech_blacklist, typecacheof(list( | |
restricted_roles = list(JOB_NAME_ASSISTANT) | ||
surplus = 0 | ||
|
||
/datum/uplink_item/role_restricted/clown_squad | ||
name = "Clown Squad AI Board" | ||
desc = "If the AI is ever on your butt, make it follow your word! (It won't make the AI go away from you on its own.)" | ||
cost = 4 | ||
item = /obj/item/aiModule/syndicate | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. wrong item path |
||
restricted_roles = list(JOB_NAME_CLOWN) | ||
surplus = 0 | ||
Comment on lines
+2143
to
+2149
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not certain if Clown squad can buy this. Afaik, clown squad doesn't actually have clown role in their mind. It will be easy to fix if that's true. |
||
|
||
/datum/uplink_item/role_restricted/pie_cannon | ||
name = "Banana Cream Pie Cannon" | ||
desc = "A special pie cannon for a special clown, this gadget can hold up to 20 pies and automatically fabricates one every two seconds!" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like this, just give them a popup instead that says 'do you want to override the upload key?'