Please show this to Bibby: \
+ Averted crash in os-cpu loop. Following vars used: total_cpu: [total_cpu], previous_cpu: [previous_cpu], cpu_assigned length: [cpu_assigned.len]
")
+ else
+ message_admins("
Averted crash in os-cpu loop. Following vars used: total_cpu: [total_cpu], previous_cpu: [previous_cpu], cpu_assigned length: [cpu_assigned.len]
Please show this to Bibby: \
+ Averted crash in os-ram loop. Following vars used: total_ram: [total_ram], previous_ram: [previous_ram], ram_assigned length: [ram_assigned.len]
")
+ else
+ message_admins("
Averted crash in os-ram loop. Following vars used: total_ram: [total_ram], previous_ram: [previous_ram], ram_assigned length: [ram_assigned.len]
Please show this to Bibby: \
+ Averted crash in dashboard-ram loop. Following vars used: ram_used: [total_ram_used], current_ram: [current_ram], ram_usage length: [ram_usage.len]
")
+ else
+ message_admins("
Averted crash in dashboard-ram loop. Following vars used: ram_used: [total_ram_used], current_ram: [current_ram], ram_usage length: [ram_usage.len]
Please show this to Bibby: \
+ Averted crash in dashboard-cpu loop. Following vars used: cpu_used: [total_cpu_used], current_cpu: [current_cpu], cpu_usage length: [cpu_usage.len]
")
+ else
+ message_admins("
Averted crash in dashboard-cpu loop. Following vars used: cpu_used: [total_cpu_used], current_cpu: [current_cpu], cpu_usage length: [cpu_usage.len]
")
+ break
for(var/I in cpu_usage)
if(cpu_usage[I] > 0)
cpu_usage[I]--
From c3705c757e21748726af0e4a63379b3d8339e6e8 Mon Sep 17 00:00:00 2001
From: TheGamerdk <5618080+TheGamerdk@users.noreply.github.com>
Date: Mon, 6 Dec 2021 16:44:48 +0100
Subject: [PATCH 49/86] this should actually fix the crashes, for good
---
.../mob/living/silicon/ai/decentralized/decentralized_os.dm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/code/modules/mob/living/silicon/ai/decentralized/decentralized_os.dm b/code/modules/mob/living/silicon/ai/decentralized/decentralized_os.dm
index afe888139109..3e0ab3811335 100644
--- a/code/modules/mob/living/silicon/ai/decentralized/decentralized_os.dm
+++ b/code/modules/mob/living/silicon/ai/decentralized/decentralized_os.dm
@@ -79,7 +79,7 @@ GLOBAL_DATUM_INIT(ai_os, /datum/ai_os, new)
message_admins("
Averted crash in os-cpu loop. Following vars used: total_cpu: [total_cpu], previous_cpu: [previous_cpu], cpu_assigned length: [cpu_assigned.len]
Please show this to Bibby: \
- Averted crash in os-cpu loop. Following vars used: total_cpu: [total_cpu], previous_cpu: [previous_cpu], cpu_assigned length: [cpu_assigned.len]
")
+ Averted crash in os-cpu loop. Following vars used: total_cpu: [total_cpu], previous_cpu: [previous_cpu], cpu_assigned length: [cpu_assigned.len] round: [GLOB.round_id]")
else
- message_admins("
Averted crash in os-cpu loop. Following vars used: total_cpu: [total_cpu], previous_cpu: [previous_cpu], cpu_assigned length: [cpu_assigned.len]
")
+ message_admins("
Averted crash in os-cpu loop. Following vars used: total_cpu: [total_cpu], previous_cpu: [previous_cpu], cpu_assigned length: [cpu_assigned.len] round: [GLOB.round_id]
Please show this to Bibby: \
- Averted crash in os-ram loop. Following vars used: total_ram: [total_ram], previous_ram: [previous_ram], ram_assigned length: [ram_assigned.len]
")
+ Averted crash in os-ram loop. Following vars used: total_ram: [total_ram], previous_ram: [previous_ram], ram_assigned length: [ram_assigned.len] round: [GLOB.round_id]")
else
- message_admins("
Averted crash in os-ram loop. Following vars used: total_ram: [total_ram], previous_ram: [previous_ram], ram_assigned length: [ram_assigned.len]
")
+ message_admins("
Averted crash in os-ram loop. Following vars used: total_ram: [total_ram], previous_ram: [previous_ram], ram_assigned length: [ram_assigned.len] round: [GLOB.round_id]
Please show this to Bibby: \
- Averted crash in dashboard-ram loop. Following vars used: ram_used: [total_ram_used], current_ram: [current_ram], ram_usage length: [ram_usage.len]
")
+ Averted crash in dashboard-ram loop. Following vars used: ram_used: [total_ram_used], current_ram: [current_ram], ram_usage length: [ram_usage.len] round: [GLOB.round_id]")
else
- message_admins("
Averted crash in dashboard-ram loop. Following vars used: ram_used: [total_ram_used], current_ram: [current_ram], ram_usage length: [ram_usage.len]
")
+ message_admins("
Averted crash in dashboard-ram loop. Following vars used: ram_used: [total_ram_used], current_ram: [current_ram], ram_usage length: [ram_usage.len] round: [GLOB.round_id]
Please show this to Bibby: \
- Averted crash in dashboard-cpu loop. Following vars used: cpu_used: [total_cpu_used], current_cpu: [current_cpu], cpu_usage length: [cpu_usage.len]
")
+ Averted crash in dashboard-cpu loop. Following vars used: cpu_used: [total_cpu_used], current_cpu: [current_cpu], cpu_usage length: [cpu_usage.len] round: [GLOB.round_id]")
else
- message_admins("
Averted crash in dashboard-cpu loop. Following vars used: cpu_used: [total_cpu_used], current_cpu: [current_cpu], cpu_usage length: [cpu_usage.len]
")
+ message_admins("
Averted crash in dashboard-cpu loop. Following vars used: cpu_used: [total_cpu_used], current_cpu: [current_cpu], cpu_usage length: [cpu_usage.len] round: [GLOB.round_id]
")
+ for(var/I in cpu_usage)
+ log_game("[I] + cpu usage: [ram_usage[I]]")
break
for(var/I in cpu_usage)
if(cpu_usage[I] > 0)
From 1f8cad33f047ab7535cbeecb5f7e4923234b0c4c Mon Sep 17 00:00:00 2001
From: TheGamerdk <5618080+TheGamerdk@users.noreply.github.com>
Date: Tue, 14 Dec 2021 16:34:06 +0100
Subject: [PATCH 63/86] lots of bug fixes
---
code/__DEFINES/is_helpers.dm | 4 ++
.../circuitboards/machine_circuitboards.dm | 10 +++++
.../traitor/equipment/Malf_Modules.dm | 2 +-
code/modules/mob/living/silicon/ai/ai.dm | 2 -
.../silicon/ai/decentralized/_ai_machinery.dm | 19 +++++++++
.../silicon/ai/decentralized/ai_data_core.dm | 41 ++++++++++++++++++-
.../ai/decentralized/expansion_card_holder.dm | 19 ---------
.../management/ai_controlpanel.dm | 16 +++++++-
.../management/resource_distribution.dm | 16 +++++++-
.../modules/mob/living/silicon/robot/robot.dm | 1 +
.../research/designs/machine_designs.dm | 8 ++++
code/modules/research/techweb/all_nodes.dm | 2 +-
12 files changed, 113 insertions(+), 27 deletions(-)
diff --git a/code/__DEFINES/is_helpers.dm b/code/__DEFINES/is_helpers.dm
index 40b7a0d550d1..e5eccb2d2e36 100644
--- a/code/__DEFINES/is_helpers.dm
+++ b/code/__DEFINES/is_helpers.dm
@@ -44,6 +44,10 @@ GLOBAL_LIST_INIT(turfs_without_ground, typecacheof(list(
#define isplatingturf(A) (istype(A, /turf/open/floor/plating))
+#define isaicore(A) (istype(A, /obj/machinery/ai/data_core))
+
+#define isvalidAIloc(A) ((isturf(A) || isaicore(A)))
+
//Mobs
#define isliving(A) (istype(A, /mob/living))
diff --git a/code/game/objects/items/circuitboards/machine_circuitboards.dm b/code/game/objects/items/circuitboards/machine_circuitboards.dm
index 067cfe1ce802..96319ee7c04a 100644
--- a/code/game/objects/items/circuitboards/machine_circuitboards.dm
+++ b/code/game/objects/items/circuitboards/machine_circuitboards.dm
@@ -961,6 +961,16 @@
/obj/item/stock_parts/manipulator = 2,
/obj/item/stack/sheet/glass = 2)
+/obj/item/circuitboard/machine/ai_data_core
+ name = "AI Data Core (Machine Board)"
+ icon_state = "science"
+ build_path = /obj/machinery/ai/data_core
+ req_components = list(
+ /obj/item/stock_parts/capacitor = 4,
+ /obj/item/stock_parts/matter_bin = 2,
+ /obj/item/stack/sheet/glass = 2,
+ /obj/item/stack/cable_coil = 2)
+
//Security
diff --git a/code/modules/antagonists/traitor/equipment/Malf_Modules.dm b/code/modules/antagonists/traitor/equipment/Malf_Modules.dm
index a9781badac8f..5183b1778834 100644
--- a/code/modules/antagonists/traitor/equipment/Malf_Modules.dm
+++ b/code/modules/antagonists/traitor/equipment/Malf_Modules.dm
@@ -591,7 +591,7 @@ GLOBAL_LIST_INIT(malf_modules, subtypesof(/datum/AI_Module))
C.images -= I
/mob/living/silicon/ai/proc/can_place_transformer(datum/action/innate/ai/place_transformer/action)
- if(!eyeobj || !isturf(loc) || incapacitated() || !action)
+ if(!eyeobj || !isvalidAIloc(loc) || incapacitated() || !action)
return
var/turf/middle = get_turf(eyeobj)
var/list/turfs = list(middle, locate(middle.x - 1, middle.y, middle.z), locate(middle.x + 1, middle.y, middle.z))
diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm
index da1686ff6e9a..8358bbf40963 100644
--- a/code/modules/mob/living/silicon/ai/ai.dm
+++ b/code/modules/mob/living/silicon/ai/ai.dm
@@ -890,8 +890,6 @@
if(isturf(loc) || istype(loc, /obj/machinery/ai/data_core)) //AI in core, check if on cameras
//get_turf_pixel() is because APCs in maint aren't actually in view of the inner camera
//apc_override is needed here because AIs use their own APC when depowered
- if(istype(loc, /obj/machinery/ai/data_core))
- A = get_turf(loc)
return (GLOB.cameranet && GLOB.cameranet.checkTurfVis(get_turf_pixel(A))) || apc_override
//AI is carded/shunted
//view(src) returns nothing for carded/shunted AIs and they have X-ray vision so just use get_dist
diff --git a/code/modules/mob/living/silicon/ai/decentralized/_ai_machinery.dm b/code/modules/mob/living/silicon/ai/decentralized/_ai_machinery.dm
index 09dd5a5c4b91..da723cd66e28 100644
--- a/code/modules/mob/living/silicon/ai/decentralized/_ai_machinery.dm
+++ b/code/modules/mob/living/silicon/ai/decentralized/_ai_machinery.dm
@@ -4,3 +4,22 @@
icon = 'icons/obj/machines/research.dmi'
icon_state = "RD-server-on"
density = TRUE
+
+/obj/machinery/ai/proc/valid_holder()
+ if(stat & (BROKEN|NOPOWER|EMPED))
+ return FALSE
+
+ var/turf/T = get_turf(src)
+ var/datum/gas_mixture/env = T.return_air()
+ if(!env)
+ return FALSE
+ var/total_moles = env.total_moles()
+ if(istype(T, /turf/open/space) || total_moles < 10)
+ return FALSE
+
+ if(env.return_temperature() > TEMP_LIMIT || !env.heat_capacity())
+ return FALSE
+ if(!was_valid_holder)
+ update_icon()
+ was_valid_holder = TRUE
+ return TRUE
diff --git a/code/modules/mob/living/silicon/ai/decentralized/ai_data_core.dm b/code/modules/mob/living/silicon/ai/decentralized/ai_data_core.dm
index 7a1e9ee3ea2e..6872ae4be6cc 100644
--- a/code/modules/mob/living/silicon/ai/decentralized/ai_data_core.dm
+++ b/code/modules/mob/living/silicon/ai/decentralized/ai_data_core.dm
@@ -1,15 +1,22 @@
GLOBAL_LIST_EMPTY(data_cores)
GLOBAL_VAR_INIT(primary_data_core, null)
+#define MAX_AI_DATA_CORE_TICKS 15
/obj/machinery/ai/data_core
name = "AI Data Core"
- desc = "A complicated computer system capable of emulating the neural functions of a human at near-instantanous speeds."
+ desc = "A complicated computer system capable of emulating the neural functions of an organic being at near-instantanous speeds."
icon = 'icons/obj/machines/telecomms.dmi'
icon_state = "hub"
+
+ circuit = /obj/item/circuitboard/machine/ai_data_core
var/primary = FALSE
+ var/valid_ticks = MAX_AI_DATA_CORE_TICKS //Limited to MAX_AI_DATA_CORE_TICKS. Decrement by 1 every time we have an invalid tick, opposite when valid
+
+ var/warning_sent = FALSE
+
/obj/machinery/ai/data_core/Initialize()
..()
GLOB.data_cores += src
@@ -17,13 +24,23 @@ GLOBAL_VAR_INIT(primary_data_core, null)
GLOB.primary_data_core = src
update_icon()
+/obj/machinery/ai/data_core/process()
+ calculate_validity()
+
+
/obj/machinery/ai/data_core/Destroy()
GLOB.data_cores -= src
if(GLOB.primary_data_core == src)
GLOB.primary_data_core = null
+ var/list/all_ais = GLOB.ai_list.Copy()
+
for(var/mob/living/silicon/ai/AI in contents)
+ all_ais -= AI
AI.relocate()
+
+ to_chat(all_ais, span_userdanger("Warning! Data Core brought offline in [get_area(src)]! Please verify that no malicious actions were taken."))
+
..()
/obj/machinery/ai/data_core/examine(mob/user)
@@ -37,10 +54,32 @@ GLOBAL_VAR_INIT(primary_data_core, null)
for(var/law in AI.laws.get_law_list(include_zeroth = TRUE))
. += law
+/obj/machinery/ai/data_core/proc/valid_data_core()
+ if(valid_ticks > 0)
+ return TRUE
+ return FALSE
+
+/obj/machinery/ai/data_core/proc/calculate_validity()
+ clamp(valid_ticks, 0, MAX_AI_DATA_CORE_TICKS)
+
+ if(stat & (BROKEN|NOPOWER|EMPED))
+ return FALSE
+
+ if(valid_holder())
+ valid_ticks++
+ warning_sent = FALSE
+ else
+ valid_ticks--
+ warning_sent = TRUE
+ to_chat(GLOB.ai_list, span_userdanger("Data core in [get_area(src)] is on the verge of failing! Please contact technical support."))
+
+
/obj/machinery/ai/data_core/proc/can_transfer_ai()
if(stat & (BROKEN|NOPOWER|EMPED))
return FALSE
+ if(!valid_data_core())
+ return FALSE
return TRUE
/obj/machinery/ai/data_core/proc/transfer_AI(mob/living/silicon/ai/AI)
diff --git a/code/modules/mob/living/silicon/ai/decentralized/expansion_card_holder.dm b/code/modules/mob/living/silicon/ai/decentralized/expansion_card_holder.dm
index 7384fdb8deb4..5379702b5aa8 100644
--- a/code/modules/mob/living/silicon/ai/decentralized/expansion_card_holder.dm
+++ b/code/modules/mob/living/silicon/ai/decentralized/expansion_card_holder.dm
@@ -38,25 +38,6 @@ GLOBAL_LIST_EMPTY(expansion_card_holders)
GLOB.ai_os.update_hardware()
..()
-/obj/machinery/ai/expansion_card_holder/proc/valid_holder()
- if(stat & (BROKEN|NOPOWER|EMPED))
- return FALSE
-
- var/turf/T = get_turf(src)
- var/datum/gas_mixture/env = T.return_air()
- if(!env)
- return FALSE
- var/total_moles = env.total_moles()
- if(istype(T, /turf/open/space) || total_moles < 10)
- return FALSE
-
- if(env.return_temperature() > TEMP_LIMIT || !env.heat_capacity())
- return FALSE
- if(!was_valid_holder)
- update_icon()
- was_valid_holder = TRUE
- return TRUE
-
/obj/machinery/ai/expansion_card_holder/process()
if(valid_holder())
diff --git a/code/modules/mob/living/silicon/ai/decentralized/management/ai_controlpanel.dm b/code/modules/mob/living/silicon/ai/decentralized/management/ai_controlpanel.dm
index 8a320e771a91..e7b33588b9e6 100644
--- a/code/modules/mob/living/silicon/ai/decentralized/management/ai_controlpanel.dm
+++ b/code/modules/mob/living/silicon/ai/decentralized/management/ai_controlpanel.dm
@@ -58,6 +58,13 @@
return ..()
+/obj/machinery/computer/ai_control_console/emag_act(mob/user)
+ if(obj_flags & EMAGGED)
+ return
+ to_chat(user, span_warning("You bypass the access restrictions"))
+ authenticated = TRUE
+ obj_flags |= EMAGGED
+
/obj/machinery/computer/ai_control_console/process()
if(downloading && download_progress >= 50 && !download_warning)
var/turf/T = get_turf(src)
@@ -93,7 +100,7 @@
data["username"] = user.client.holder.admin_signature
data["has_access"] = TRUE
- if(ishuman(user))
+ if(ishuman(user) && !(obj_flags & EMAGGED))
var/username = user.get_authentification_name("Unknown")
data["username"] = user.get_authentification_name("Unknown")
if(username != "Unknown")
@@ -119,6 +126,10 @@
data["user_image"] = SSassets.transport.get_asset_url("photo_[md5]_cropped.png")
data["has_access"] = check_access(user.get_idcard())
+
+ if(obj_flags & EMAGGED)
+ data["username"] = "ERROR"
+ data["has_access"] = TRUE
if(!authenticated)
return data
@@ -189,6 +200,9 @@
if(IsAdminGhost(usr))
authenticated = TRUE
+ if(obj_flags & EMAGGED)
+ authenticated = TRUE
+
var/mob/living/carbon/human/H = usr
if(!istype(H))
return
diff --git a/code/modules/mob/living/silicon/ai/decentralized/management/resource_distribution.dm b/code/modules/mob/living/silicon/ai/decentralized/management/resource_distribution.dm
index c60de3d1f5da..923acfc3c562 100644
--- a/code/modules/mob/living/silicon/ai/decentralized/management/resource_distribution.dm
+++ b/code/modules/mob/living/silicon/ai/decentralized/management/resource_distribution.dm
@@ -14,6 +14,13 @@
circuit = /obj/item/circuitboard/computer/ai_resource_distribution
+/obj/machinery/computer/ai_resource_distribution/emag_act(mob/user)
+ if(obj_flags & EMAGGED)
+ return
+ to_chat(user, span_warning("You bypass the access restrictions"))
+ authenticated = TRUE
+ obj_flags |= EMAGGED
+
/obj/machinery/computer/ai_resource_distribution/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
@@ -34,7 +41,7 @@
data["username"] = user.client.holder.admin_signature
data["has_access"] = TRUE
- if(ishuman(user))
+ if(ishuman(user) && !(obj_flags & EMAGGED))
var/username = user.get_authentification_name("Unknown")
data["username"] = user.get_authentification_name("Unknown")
if(username != "Unknown")
@@ -61,6 +68,10 @@
data["user_image"] = SSassets.transport.get_asset_url("photo_[md5]_cropped.png")
data["has_access"] = check_access(user.get_idcard())
+ if(obj_flags & EMAGGED)
+ data["username"] = "ERROR"
+ data["has_access"] = TRUE
+
if(!authenticated)
return data
@@ -98,7 +109,8 @@
if(IsAdminGhost(usr))
authenticated = TRUE
-
+ if(obj_flags & EMAGGED)
+ authenticated = TRUE
var/mob/living/carbon/human/H = usr
diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm
index 62b3f34b4693..6e33ee27e7bb 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -1155,6 +1155,7 @@
if(!deployed || !mind || !mainframe)
return
+ remove_sensors()
mainframe.redeploy_action.Grant(mainframe)
mainframe.redeploy_action.last_used_shell = src
mind.transfer_to(mainframe)
diff --git a/code/modules/research/designs/machine_designs.dm b/code/modules/research/designs/machine_designs.dm
index 3047e353e148..78af349837d5 100644
--- a/code/modules/research/designs/machine_designs.dm
+++ b/code/modules/research/designs/machine_designs.dm
@@ -674,3 +674,11 @@
build_path = /obj/item/circuitboard/machine/expansion_card_holder
category = list("Engineering Machinery")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
+
+/datum/design/board/ai_data_core
+ name = "Machine Design (AI Data Core Board)"
+ desc = "The circuit board for an AI data core."
+ id = "ai_data_core"
+ build_path = /obj/item/circuitboard/machine/ai_data_core
+ category = list("Engineering Machinery")
+ departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
diff --git a/code/modules/research/techweb/all_nodes.dm b/code/modules/research/techweb/all_nodes.dm
index c4559f661704..54b6bd818ada 100644
--- a/code/modules/research/techweb/all_nodes.dm
+++ b/code/modules/research/techweb/all_nodes.dm
@@ -377,7 +377,7 @@
display_name = "Artificial Intelligence"
description = "AI unit research."
prereq_ids = list("robotics", "posibrain")
- design_ids = list("expansion_card_holder", "ai_control", "ai_server_overview", "ai_resource_distribution", "ai_memory_1", "ai_cpu_1", "aifixer", "safeguard_module", "onehuman_module", "protectstation_module", "quarantine_module", "oxygen_module", "freeform_module",
+ design_ids = list("expansion_card_holder", "ai_data_core", "ai_control", "ai_server_overview", "ai_resource_distribution", "ai_memory_1", "ai_cpu_1", "aifixer", "safeguard_module", "onehuman_module", "protectstation_module", "quarantine_module", "oxygen_module", "freeform_module",
"reset_module", "purge_module", "remove_module", "freeformcore_module", "asimov_module", "crewsimov_module", "paladin_module", "tyrant_module", "overlord_module", "ceo_module", "cowboy_module", "default_module", "borg_ai_control", "mecha_tracking_ai_control", "intellicard")
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500)
export_price = 5000
From 38c1dab280d268d862449d7a77e93cf6525fa55a Mon Sep 17 00:00:00 2001
From: TheGamerdk <5618080+TheGamerdk@users.noreply.github.com>
Date: Tue, 14 Dec 2021 16:38:13 +0100
Subject: [PATCH 64/86] oops
---
.../silicon/ai/decentralized/_ai_machinery.dm | 2 ++
.../ai/decentralized/expansion_card_holder.dm | 19 ++++++++++++++++++-
2 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/code/modules/mob/living/silicon/ai/decentralized/_ai_machinery.dm b/code/modules/mob/living/silicon/ai/decentralized/_ai_machinery.dm
index da723cd66e28..978f8973cee7 100644
--- a/code/modules/mob/living/silicon/ai/decentralized/_ai_machinery.dm
+++ b/code/modules/mob/living/silicon/ai/decentralized/_ai_machinery.dm
@@ -1,3 +1,5 @@
+#define TEMP_LIMIT 290.15 //17C, much hotter than a normal server room for leniency :)
+
/obj/machinery/ai
name = "You shouldn't see this!"
desc = "You shouldn't see this!"
diff --git a/code/modules/mob/living/silicon/ai/decentralized/expansion_card_holder.dm b/code/modules/mob/living/silicon/ai/decentralized/expansion_card_holder.dm
index 5379702b5aa8..e930d533b302 100644
--- a/code/modules/mob/living/silicon/ai/decentralized/expansion_card_holder.dm
+++ b/code/modules/mob/living/silicon/ai/decentralized/expansion_card_holder.dm
@@ -1,6 +1,5 @@
#define BASE_POWER_PER_CPU 400
#define POWER_PER_CARD 250
-#define TEMP_LIMIT 290.15 //17C, much hotter than a normal server room for leniency :)
GLOBAL_LIST_EMPTY(expansion_card_holders)
@@ -56,6 +55,24 @@ GLOBAL_LIST_EMPTY(expansion_card_holders)
cut_overlays()
GLOB.ai_os.update_hardware()
+/obj/machinery/ai/expansion_card_holder/valid_holder()
+ if(stat & (BROKEN|NOPOWER|EMPED))
+ return FALSE
+
+ var/turf/T = get_turf(src)
+ var/datum/gas_mixture/env = T.return_air()
+ if(!env)
+ return FALSE
+ var/total_moles = env.total_moles()
+ if(istype(T, /turf/open/space) || total_moles < 10)
+ return FALSE
+
+ if(env.return_temperature() > TEMP_LIMIT || !env.heat_capacity())
+ return FALSE
+ if(!was_valid_holder)
+ update_icon()
+ was_valid_holder = TRUE
+ return TRUE
/obj/machinery/ai/expansion_card_holder/update_icon()
cut_overlays()
From 597e41fb3adc0ed66aeab4067f8243d54532190c Mon Sep 17 00:00:00 2001
From: TheGamerdk <5618080+TheGamerdk@users.noreply.github.com>
Date: Tue, 14 Dec 2021 16:40:29 +0100
Subject: [PATCH 65/86] Update _ai_machinery.dm
---
.../mob/living/silicon/ai/decentralized/_ai_machinery.dm | 3 ---
1 file changed, 3 deletions(-)
diff --git a/code/modules/mob/living/silicon/ai/decentralized/_ai_machinery.dm b/code/modules/mob/living/silicon/ai/decentralized/_ai_machinery.dm
index 978f8973cee7..2807ef3b53de 100644
--- a/code/modules/mob/living/silicon/ai/decentralized/_ai_machinery.dm
+++ b/code/modules/mob/living/silicon/ai/decentralized/_ai_machinery.dm
@@ -21,7 +21,4 @@
if(env.return_temperature() > TEMP_LIMIT || !env.heat_capacity())
return FALSE
- if(!was_valid_holder)
- update_icon()
- was_valid_holder = TRUE
return TRUE
From 56f0dae8ea0c1b45f75b37272d2a9d7cdf6edab8 Mon Sep 17 00:00:00 2001
From: TheGamerdk <5618080+TheGamerdk@users.noreply.github.com>
Date: Tue, 14 Dec 2021 16:46:55 +0100
Subject: [PATCH 66/86] Update ai_data_core.dm
---
.../modules/mob/living/silicon/ai/decentralized/ai_data_core.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/modules/mob/living/silicon/ai/decentralized/ai_data_core.dm b/code/modules/mob/living/silicon/ai/decentralized/ai_data_core.dm
index 6872ae4be6cc..b1f034ee8496 100644
--- a/code/modules/mob/living/silicon/ai/decentralized/ai_data_core.dm
+++ b/code/modules/mob/living/silicon/ai/decentralized/ai_data_core.dm
@@ -60,7 +60,7 @@ GLOBAL_VAR_INIT(primary_data_core, null)
return FALSE
/obj/machinery/ai/data_core/proc/calculate_validity()
- clamp(valid_ticks, 0, MAX_AI_DATA_CORE_TICKS)
+ valid_ticks = clamp(valid_ticks, 0, MAX_AI_DATA_CORE_TICKS)
if(stat & (BROKEN|NOPOWER|EMPED))
return FALSE
From 77c47ef9aa78f91863afb15707bfca74084a7ca2 Mon Sep 17 00:00:00 2001
From: TheGamerdk <5618080+TheGamerdk@users.noreply.github.com>
Date: Tue, 14 Dec 2021 20:00:59 +0100
Subject: [PATCH 67/86] Update ai_data_core.dm
---
.../modules/mob/living/silicon/ai/decentralized/ai_data_core.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/modules/mob/living/silicon/ai/decentralized/ai_data_core.dm b/code/modules/mob/living/silicon/ai/decentralized/ai_data_core.dm
index b1f034ee8496..d41d2d3b80a1 100644
--- a/code/modules/mob/living/silicon/ai/decentralized/ai_data_core.dm
+++ b/code/modules/mob/living/silicon/ai/decentralized/ai_data_core.dm
@@ -50,7 +50,7 @@ GLOBAL_VAR_INIT(primary_data_core, null)
. += "Networked AI Laws:"
for(var/mob/living/silicon/ai/AI in GLOB.ai_list)
var/active_status = !AI.mind ? "(OFFLINE)" : ""
- . += "[AI] [active_status] has the following laws:"
+ . += "[AI] [active_status] has the following laws: "
for(var/law in AI.laws.get_law_list(include_zeroth = TRUE))
. += law
From b8cf104e2704044157443aa922f24e1dfb9d3005 Mon Sep 17 00:00:00 2001
From: TheGamerdk <5618080+TheGamerdk@users.noreply.github.com>
Date: Tue, 14 Dec 2021 20:06:31 +0100
Subject: [PATCH 68/86] Update expansion_card_holder.dm
---
.../mob/living/silicon/ai/decentralized/expansion_card_holder.dm | 1 +
1 file changed, 1 insertion(+)
diff --git a/code/modules/mob/living/silicon/ai/decentralized/expansion_card_holder.dm b/code/modules/mob/living/silicon/ai/decentralized/expansion_card_holder.dm
index e930d533b302..b899b53cb63e 100644
--- a/code/modules/mob/living/silicon/ai/decentralized/expansion_card_holder.dm
+++ b/code/modules/mob/living/silicon/ai/decentralized/expansion_card_holder.dm
@@ -102,6 +102,7 @@ GLOBAL_LIST_EMPTY(expansion_card_holders)
var/turf/T = get_turf(src)
for(var/obj/item/C in installed_cards)
C.forceMove(T)
+ installed_cards.len = 0
total_cpu = 0
total_ram = 0
GLOB.ai_os.update_hardware()
From ef3becef3393df8cc3ab900137ff485e7d719f9e Mon Sep 17 00:00:00 2001
From: TheGamerdk <5618080+TheGamerdk@users.noreply.github.com>
Date: Wed, 15 Dec 2021 20:56:49 +0100
Subject: [PATCH 69/86] Minor fixes (Including weird fail on can_see when
you've just spawned in)
---
code/modules/mob/living/silicon/ai/ai.dm | 8 ++++++--
.../ai/decentralized/management/ai_controlpanel.dm | 1 +
code/modules/mob/living/silicon/ai/freelook/cameranet.dm | 5 -----
code/modules/mob/living/silicon/ai/login.dm | 5 +++--
tgui/packages/tgui/interfaces/AiControlPanel.js | 6 +++---
tgui/packages/tgui/interfaces/AiDashboard.js | 4 ++--
6 files changed, 15 insertions(+), 14 deletions(-)
diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm
index 8358bbf40963..7a4a150ba329 100644
--- a/code/modules/mob/living/silicon/ai/ai.dm
+++ b/code/modules/mob/living/silicon/ai/ai.dm
@@ -112,6 +112,8 @@
//Reduces/Increases download speed by this modifier
var/downloadSpeedModifier = 1
+ var/login_warned_temp = FALSE
+
/mob/living/silicon/ai/Initialize(mapload, datum/ai_laws/L, mob/target_ai, shunted)
. = ..()
@@ -119,6 +121,9 @@
// new/obj/structure/AIcore/deactivated(loc) //New empty terminal.
return INITIALIZE_HINT_QDEL //Delete AI.
+ if(!istype(loc, /obj/machinery/ai/data_core) && !shunted)
+ relocate(TRUE)
+
if(L && istype(L, /datum/ai_laws))
laws = L
laws.associate(src)
@@ -145,6 +150,7 @@
to_chat(src, "These laws may be changed by other players, or by you being the traitor.")
job = "AI"
+
create_eye()
if(client)
@@ -183,8 +189,6 @@
GLOB.ai_list += src
GLOB.shuttle_caller_list += src
- if(!istype(loc, /obj/machinery/ai/data_core) && !shunted)
- relocate(TRUE)
builtInCamera = new (src)
builtInCamera.c_tag = real_name
diff --git a/code/modules/mob/living/silicon/ai/decentralized/management/ai_controlpanel.dm b/code/modules/mob/living/silicon/ai/decentralized/management/ai_controlpanel.dm
index e7b33588b9e6..657f9172e391 100644
--- a/code/modules/mob/living/silicon/ai/decentralized/management/ai_controlpanel.dm
+++ b/code/modules/mob/living/silicon/ai/decentralized/management/ai_controlpanel.dm
@@ -147,6 +147,7 @@
if(downloading)
data["downloading"] = downloading.real_name
data["download_progress"] = download_progress
+ data["downloading_ref"] = REF(downloading)
else
data["downloading"] = null
data["download_progress"] = 0
diff --git a/code/modules/mob/living/silicon/ai/freelook/cameranet.dm b/code/modules/mob/living/silicon/ai/freelook/cameranet.dm
index 81d38e08bb53..66d4296555b9 100644
--- a/code/modules/mob/living/silicon/ai/freelook/cameranet.dm
+++ b/code/modules/mob/living/silicon/ai/freelook/cameranet.dm
@@ -77,11 +77,6 @@ GLOBAL_DATUM_INIT(cameranet, /datum/cameranet, new)
var/x_value = eye.x
var/y_value = eye.y
var/z_value = eye.z
- if(istype(eye.loc, /obj/machinery/ai/data_core))
- var/turf/T = get_turf(eye.loc)
- x_value = T.x
- y_value = T.y
- z_value = T.z
// 0xf = 15
var/static_range = eye.static_visibility_range
var/x1 = max(0, x_value - static_range) & ~(CHUNK_SIZE - 1)
diff --git a/code/modules/mob/living/silicon/ai/login.dm b/code/modules/mob/living/silicon/ai/login.dm
index 3785ee088b48..684f85428322 100644
--- a/code/modules/mob/living/silicon/ai/login.dm
+++ b/code/modules/mob/living/silicon/ai/login.dm
@@ -10,5 +10,6 @@
if(multicam_on)
end_multicam()
view_core()
-
- to_chat(src, span_userdanger("WARNING. THE WAY AI IS PLAYED HAS CHANGED. PLEASE REFER TO https://github.com/yogstation13/Yogstation/pull/12388"))
+ if(!login_warned_temp)
+ to_chat(src, span_userdanger("WARNING. THE WAY AI IS PLAYED HAS CHANGED. PLEASE REFER TO https://github.com/yogstation13/Yogstation/pull/12388"))
+ login_warned_temp = TRUE
diff --git a/tgui/packages/tgui/interfaces/AiControlPanel.js b/tgui/packages/tgui/interfaces/AiControlPanel.js
index df4dc4759670..c1ba6efd2c08 100644
--- a/tgui/packages/tgui/interfaces/AiControlPanel.js
+++ b/tgui/packages/tgui/interfaces/AiControlPanel.js
@@ -80,6 +80,9 @@ export const AiControlPanel = (props, context) => {
Currently downloading G2 act("stop_download")}>Cancel Download
+ {!!data.current_ai_ref && data.current_ai_ref === data.downloading_ref && (
+ act("skip_download")}>Instantly finish download
+ )}
)|| (
@@ -98,9 +101,6 @@ export const AiControlPanel = (props, context) => {
{!!ai.being_hijacked && (
act("stop_hijack", { target_ai: ai.ref })}>Stop hijacking
)}
- {!!data.current_ai_ref && data.current_ai_ref === ai.ref && (
- act("skip_download")}>Instantly finish download
- )}
)}>
Integrity:
diff --git a/tgui/packages/tgui/interfaces/AiDashboard.js b/tgui/packages/tgui/interfaces/AiDashboard.js
index ad82549afd7c..37963f159e6b 100644
--- a/tgui/packages/tgui/interfaces/AiDashboard.js
+++ b/tgui/packages/tgui/interfaces/AiDashboard.js
@@ -13,7 +13,7 @@ export const AiDashboard = (props, context) => {
return (
@@ -133,7 +133,7 @@ export const AiDashboard = (props, context) => {
)}>
Research Cost: {project.research_cost} THzRAM Requirement: {project.ram_required} TB
- Research Requirements:
+ Research Requirements:  
{project.research_requirements}
From 83d828959c5b1b9564bbf078b6adf7c69afb7987 Mon Sep 17 00:00:00 2001
From: TheGamerdk <5618080+TheGamerdk@users.noreply.github.com>
Date: Thu, 16 Dec 2021 12:25:16 +0100
Subject: [PATCH 70/86] oldstation goodbye
---
_maps/RandomRuins/SpaceRuins/oldstation.dmm | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/_maps/RandomRuins/SpaceRuins/oldstation.dmm b/_maps/RandomRuins/SpaceRuins/oldstation.dmm
index cbfc326abb8f..db49c4445f9e 100644
--- a/_maps/RandomRuins/SpaceRuins/oldstation.dmm
+++ b/_maps/RandomRuins/SpaceRuins/oldstation.dmm
@@ -705,10 +705,6 @@
},
/turf/open/floor/plasteel,
/area/ruin/space/has_grav/ancientstation/comm)
-"bQ" = (
-/obj/structure/AIcore/deactivated,
-/turf/open/floor/plasteel/dark,
-/area/ruin/space/has_grav/ancientstation/deltaai)
"bR" = (
/obj/machinery/light/small{
brightness = 3;
@@ -8797,6 +8793,9 @@
/obj/structure/cable,
/turf/open/floor/plating,
/area/ruin/space/has_grav/ancientstation/engi)
+"XP" = (
+/turf/open/floor/plasteel/dark,
+/area/ruin/space/has_grav/ancientstation/deltaai)
"Yh" = (
/obj/effect/decal/cleanable/dirt,
/obj/effect/decal/cleanable/dirt,
@@ -12871,7 +12870,7 @@ gK
ac
ac
ac
-bQ
+XP
ac
ac
ac
From 49c116616a365fbaf6c90440b9bcdca2a82d9f1f Mon Sep 17 00:00:00 2001
From: TheGamerdk <5618080+TheGamerdk@users.noreply.github.com>
Date: Thu, 16 Dec 2021 12:31:56 +0100
Subject: [PATCH 71/86] maps
---
_maps/RandomRuins/SpaceRuins/oldstation.dmm | 8 ++---
.../EclipseStation/EclipseStation.dmm | 25 +++++----------
_maps/map_files/IceBox/IceBox.dmm | 26 +++++++--------
_maps/map_files/KiloStation/KiloStation.dmm | 32 +++++++++----------
_maps/map_files/YogStation/YogStation.dmm | 27 +++++++---------
_maps/map_files/YogsDelta/YogsDelta.dmm | 16 +++++-----
_maps/map_files/Yogsmeta/Yogsmeta.dmm | 21 ++++++------
7 files changed, 67 insertions(+), 88 deletions(-)
diff --git a/_maps/RandomRuins/SpaceRuins/oldstation.dmm b/_maps/RandomRuins/SpaceRuins/oldstation.dmm
index db49c4445f9e..6c670fa42b6f 100644
--- a/_maps/RandomRuins/SpaceRuins/oldstation.dmm
+++ b/_maps/RandomRuins/SpaceRuins/oldstation.dmm
@@ -8571,6 +8571,9 @@
},
/turf/open/floor/plasteel,
/area/ruin/space/has_grav/ancientstation/hydroponics)
+"QV" = (
+/turf/open/floor/plasteel/dark,
+/area/ruin/space/has_grav/ancientstation/deltaai)
"Re" = (
/obj/effect/decal/cleanable/dirt,
/obj/effect/decal/cleanable/dirt,
@@ -8793,9 +8796,6 @@
/obj/structure/cable,
/turf/open/floor/plating,
/area/ruin/space/has_grav/ancientstation/engi)
-"XP" = (
-/turf/open/floor/plasteel/dark,
-/area/ruin/space/has_grav/ancientstation/deltaai)
"Yh" = (
/obj/effect/decal/cleanable/dirt,
/obj/effect/decal/cleanable/dirt,
@@ -12870,7 +12870,7 @@ gK
ac
ac
ac
-XP
+QV
ac
ac
ac
diff --git a/_maps/map_files/EclipseStation/EclipseStation.dmm b/_maps/map_files/EclipseStation/EclipseStation.dmm
index ab57391f6128..2828dfe0373d 100644
--- a/_maps/map_files/EclipseStation/EclipseStation.dmm
+++ b/_maps/map_files/EclipseStation/EclipseStation.dmm
@@ -21584,12 +21584,6 @@
},
/turf/closed/wall/r_wall,
/area/crew_quarters/heads/captain)
-"aVo" = (
-/obj/machinery/atmospherics/components/unary/vent_pump/on/layer2{
- dir = 1
- },
-/turf/open/floor/plasteel,
-/area/hallway/primary/port)
"aVp" = (
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer4{
dir = 1
@@ -59293,14 +59287,6 @@
},
/turf/open/floor/carpet/purple,
/area/crew_quarters/heads/hor)
-"cto" = (
-/obj/structure/rack,
-/obj/item/circuitboard/aicore{
- pixel_x = -2;
- pixel_y = 4
- },
-/turf/open/floor/plasteel,
-/area/crew_quarters/heads/hor)
"ctp" = (
/obj/structure/rack,
/obj/item/taperecorder{
@@ -87566,6 +87552,11 @@
/obj/effect/turf_decal/tile/white,
/turf/open/floor/plasteel,
/area/hallway/primary/fore)
+"rLe" = (
+/obj/structure/rack,
+/obj/item/circuitboard/computer/ai_upload_download,
+/turf/open/floor/plasteel,
+/area/crew_quarters/heads/hor)
"rLM" = (
/obj/structure/cable{
icon_state = "4-8";
@@ -124360,7 +124351,7 @@ crA
cvA
cwh
csO
-cto
+rLe
cOk
aoU
aaa
@@ -141471,7 +141462,7 @@ azB
hMY
aRF
aUP
-aVo
+aye
axD
aWW
bas
@@ -146610,7 +146601,7 @@ aBj
aBj
aJK
aRX
-aVo
+aye
ach
aFk
aFk
diff --git a/_maps/map_files/IceBox/IceBox.dmm b/_maps/map_files/IceBox/IceBox.dmm
index e4c7d67bf5ae..d4e8b27c9612 100644
--- a/_maps/map_files/IceBox/IceBox.dmm
+++ b/_maps/map_files/IceBox/IceBox.dmm
@@ -37502,20 +37502,6 @@
/obj/effect/landmark/event_spawn,
/turf/open/floor/plasteel,
/area/storage/primary)
-"bxl" = (
-/obj/structure/rack,
-/obj/item/circuitboard/aicore{
- pixel_x = -2;
- pixel_y = 4
- },
-/obj/effect/turf_decal/stripes/line{
- dir = 9
- },
-/obj/structure/sign/plaques/cave{
- pixel_y = 32
- },
-/turf/open/floor/plasteel/white,
-/area/crew_quarters/heads/hor)
"bxm" = (
/obj/effect/spawner/xmastree/rdrod,
/obj/effect/turf_decal/stripes/line{
@@ -60149,6 +60135,16 @@
"nds" = (
/turf/open/floor/plasteel,
/area/maintenance/disposal/incinerator)
+"nfL" = (
+/obj/structure/rack,
+/obj/effect/turf_decal/stripes/line{
+ dir = 9
+ },
+/obj/structure/sign/plaques/cave{
+ pixel_y = 32
+ },
+/turf/open/floor/plasteel/white,
+/area/crew_quarters/heads/hor)
"ngU" = (
/obj/effect/turf_decal/stripes/line{
dir = 8
@@ -113694,7 +113690,7 @@ bqk
brp
bmW
bvK
-bxl
+nfL
bys
bzM
bya
diff --git a/_maps/map_files/KiloStation/KiloStation.dmm b/_maps/map_files/KiloStation/KiloStation.dmm
index 4f0afde61641..56bd128baf41 100644
--- a/_maps/map_files/KiloStation/KiloStation.dmm
+++ b/_maps/map_files/KiloStation/KiloStation.dmm
@@ -92182,6 +92182,20 @@
/obj/item/clothing/mask/cigarette/cigar/cohiba,
/turf/open/floor/plasteel,
/area/crew_quarters/heads/chief)
+"kSR" = (
+/obj/effect/turf_decal/bot,
+/obj/effect/turf_decal/tile/neutral{
+ dir = 4
+ },
+/obj/effect/turf_decal/tile/neutral{
+ dir = 1
+ },
+/obj/effect/turf_decal/tile/neutral,
+/obj/structure/table,
+/obj/item/hand_labeler,
+/obj/item/circuitboard/computer/ai_upload_download,
+/turf/open/floor/plasteel/dark,
+/area/crew_quarters/heads/hor)
"kTk" = (
/obj/effect/turf_decal/tile/neutral{
dir = 4
@@ -98916,22 +98930,6 @@
/obj/effect/mapping_helpers/teleport_anchor,
/turf/open/floor/plasteel/showroomfloor,
/area/science/server)
-"smx" = (
-/obj/effect/turf_decal/bot,
-/obj/effect/turf_decal/tile/neutral{
- dir = 4
- },
-/obj/effect/turf_decal/tile/neutral{
- dir = 1
- },
-/obj/effect/turf_decal/tile/neutral,
-/obj/structure/table,
-/obj/item/hand_labeler,
-/obj/item/circuitboard/aicore{
- pixel_y = 5
- },
-/turf/open/floor/plasteel/dark,
-/area/crew_quarters/heads/hor)
"snc" = (
/obj/effect/turf_decal/tile/yellow,
/obj/effect/turf_decal/tile/yellow{
@@ -143026,7 +143024,7 @@ smw
ayt
azR
aAu
-smx
+kSR
aVJ
aVJ
aYU
diff --git a/_maps/map_files/YogStation/YogStation.dmm b/_maps/map_files/YogStation/YogStation.dmm
index 7f7b31b811f9..67ac35ef1f08 100644
--- a/_maps/map_files/YogStation/YogStation.dmm
+++ b/_maps/map_files/YogStation/YogStation.dmm
@@ -23935,20 +23935,6 @@
/obj/effect/landmark/event_spawn,
/turf/open/floor/plasteel,
/area/storage/primary)
-"bxl" = (
-/obj/structure/rack,
-/obj/item/circuitboard/aicore{
- pixel_x = -2;
- pixel_y = 4
- },
-/obj/effect/turf_decal/stripes/line{
- dir = 9
- },
-/obj/structure/sign/plaques/cave{
- pixel_y = 32
- },
-/turf/open/floor/plasteel/white,
-/area/crew_quarters/heads/hor)
"bxm" = (
/obj/effect/spawner/xmastree/rdrod,
/obj/effect/turf_decal/stripes/line{
@@ -64706,6 +64692,17 @@
},
/turf/open/floor/plasteel/dark,
/area/science/xenobiology)
+"xAi" = (
+/obj/structure/rack,
+/obj/effect/turf_decal/stripes/line{
+ dir = 9
+ },
+/obj/structure/sign/plaques/cave{
+ pixel_y = 32
+ },
+/obj/item/circuitboard/computer/ai_upload_download,
+/turf/open/floor/plasteel/white,
+/area/crew_quarters/heads/hor)
"xAP" = (
/obj/structure/rack,
/obj/item/electronics/airlock,
@@ -115422,7 +115419,7 @@ bqk
brp
bmW
bvK
-bxl
+xAi
bys
bzM
bya
diff --git a/_maps/map_files/YogsDelta/YogsDelta.dmm b/_maps/map_files/YogsDelta/YogsDelta.dmm
index e6b12352833a..bccf9008d0d7 100644
--- a/_maps/map_files/YogsDelta/YogsDelta.dmm
+++ b/_maps/map_files/YogsDelta/YogsDelta.dmm
@@ -108326,13 +108326,6 @@
/obj/machinery/atmospherics/pipe/simple/supply/hidden/layer2,
/turf/open/floor/plasteel/dark,
/area/engine/atmos)
-"doM" = (
-/obj/structure/table/reinforced,
-/obj/item/aicard,
-/obj/item/circuitboard/aicore,
-/obj/effect/turf_decal/bot,
-/turf/open/floor/plasteel,
-/area/crew_quarters/heads/hor)
"doN" = (
/obj/structure/cable/white{
icon_state = "1-2"
@@ -128879,6 +128872,13 @@
/obj/machinery/griddle,
/turf/open/floor/plasteel,
/area/crew_quarters/kitchen)
+"xBj" = (
+/obj/structure/table/reinforced,
+/obj/item/aicard,
+/obj/effect/turf_decal/bot,
+/obj/item/circuitboard/computer/ai_upload_download,
+/turf/open/floor/plasteel,
+/area/crew_quarters/heads/hor)
"xBR" = (
/obj/machinery/atmospherics/pipe/simple/supply/hidden/layer2{
dir = 8
@@ -163153,7 +163153,7 @@ cgA
ceU
dlE
dmS
-doM
+xBj
dqC
drX
dtq
diff --git a/_maps/map_files/Yogsmeta/Yogsmeta.dmm b/_maps/map_files/Yogsmeta/Yogsmeta.dmm
index 2633b515679a..0c0f09f7486e 100644
--- a/_maps/map_files/Yogsmeta/Yogsmeta.dmm
+++ b/_maps/map_files/Yogsmeta/Yogsmeta.dmm
@@ -59457,17 +59457,6 @@
dir = 5
},
/area/crew_quarters/heads/hor)
-"cuP" = (
-/obj/structure/table,
-/obj/item/aicard,
-/obj/item/circuitboard/aicore{
- pixel_x = -2;
- pixel_y = 4
- },
-/turf/open/floor/plasteel/cafeteria{
- dir = 5
- },
-/area/crew_quarters/heads/hor)
"cuQ" = (
/turf/open/floor/plasteel/cafeteria{
dir = 5
@@ -80036,6 +80025,14 @@
/obj/effect/landmark/blobstart,
/turf/open/floor/plating,
/area/maintenance/port/fore)
+"sTq" = (
+/obj/structure/table,
+/obj/item/aicard,
+/obj/item/circuitboard/computer/ai_upload_download,
+/turf/open/floor/plasteel/cafeteria{
+ dir = 5
+ },
+/area/crew_quarters/heads/hor)
"sTu" = (
/obj/structure/closet/firecloset,
/obj/effect/turf_decal/stripes/corner{
@@ -116274,7 +116271,7 @@ cdc
crQ
ctc
ctT
-cuP
+sTq
bHF
cwS
crQ
From 833619abb8e137d9648331efb0f0985da2cfbe9c Mon Sep 17 00:00:00 2001
From: TheGamerdk <5618080+TheGamerdk@users.noreply.github.com>
Date: Thu, 16 Dec 2021 12:39:34 +0100
Subject: [PATCH 72/86] removes the AI core from the game
---
code/game/mecha/mecha.dm | 22 +-
.../game/objects/effects/spawners/lootdrop.dm | 3 +-
.../items/stacks/sheets/sheet_types.dm | 1 -
code/game/objects/structures/ai_core.dm | 204 +-----------------
code/modules/jobs/job_types/ai.dm | 6 +-
code/modules/mob/living/silicon/ai/ai.dm | 5 +-
.../research/designs/AI_module_designs.dm | 8 -
7 files changed, 22 insertions(+), 227 deletions(-)
diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm
index 5b1497da022b..00cb49e06440 100644
--- a/code/game/mecha/mecha.dm
+++ b/code/game/mecha/mecha.dm
@@ -795,7 +795,6 @@
to_chat(user, "[span_boldnotice("Transfer successful")]: [AI.name] ([rand(1000,9999)].exe) removed from [name] and stored within local memory.")
if(AI_MECH_HACK) //Called by AIs on the mech
- AI.linked_core = new /obj/structure/AIcore/deactivated(AI.loc)
if(AI.can_dominate_mechs)
if(occupant) //Oh, I am sorry, were you using that?
to_chat(AI, span_warning("Pilot detected! Forced ejection initiated!"))
@@ -1053,6 +1052,7 @@
if(!occupant)
return
var/atom/movable/mob_container
+ var/is_ai_user = FALSE
occupant.clear_alert("charge")
occupant.clear_alert("mech damage")
if(ishuman(occupant))
@@ -1071,23 +1071,23 @@
silicon_pilot = FALSE
return
else
- if(!AI.linked_core)
- to_chat(AI, span_userdanger("Inactive core destroyed. Unable to return."))
- AI.linked_core = null
- return
- to_chat(AI, span_notice("Returning to core..."))
+ to_chat(AI, span_notice("Attempting to return to core..."))
AI.controlled_mech = null
AI.remote_control = null
RemoveActions(occupant, 1)
mob_container = AI
- newloc = get_turf(AI.linked_core)
- qdel(AI.linked_core)
+ newloc = GLOB.primary_data_core ? GLOB.primary_data_core : GLOB.data_cores[1]
+ if(!newloc)
+ to_chat(AI, span_userdanger("No cores available. Core code corrupted. Goodbye."))
+ qdel(AI)
+ return
+ is_ai_user = TRUE
else
return
var/mob/living/L = occupant
occupant = null //we need it null when forceMove calls Exited().
silicon_pilot = FALSE
- if(mob_container.forceMove(newloc))//ejecting mob container
+ if(mob_container.forceMove(newloc) && !is_ai_user)//ejecting mob container
log_message("[mob_container] moved out.", LOG_MECHA)
L << browse(null, "window=exosuit")
@@ -1101,6 +1101,10 @@
L.mobility_flags = NONE
icon_state = initial(icon_state)+"-open"
setDir(dir_in)
+ if(is_ai_user)
+ var/mob/living/silicon/ai/AI = occupant
+ AI.relocate(TRUE)
+
if(L && L.client)
L.update_mouse_pointer()
diff --git a/code/game/objects/effects/spawners/lootdrop.dm b/code/game/objects/effects/spawners/lootdrop.dm
index f7a15cdfdebb..56dd8d33adcf 100644
--- a/code/game/objects/effects/spawners/lootdrop.dm
+++ b/code/game/objects/effects/spawners/lootdrop.dm
@@ -355,8 +355,7 @@
name = "secure AI circuit board spawner"
loot = list(
/obj/item/circuitboard/computer/aiupload,
- /obj/item/circuitboard/computer/borgupload,
- /obj/item/circuitboard/aicore
+ /obj/item/circuitboard/computer/borgupload
)
/obj/effect/spawner/lootdrop/techstorage/command
diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm
index e06b3d36b89f..3657d609ba45 100644
--- a/code/game/objects/items/stacks/sheets/sheet_types.dm
+++ b/code/game/objects/items/stacks/sheets/sheet_types.dm
@@ -156,7 +156,6 @@ GLOBAL_LIST_INIT(metal_recipes, list ( \
* Plasteel
*/
GLOBAL_LIST_INIT(plasteel_recipes, list ( \
- new/datum/stack_recipe("AI core", /obj/structure/AIcore, 4, time = 50, one_per_turf = TRUE), \
new/datum/stack_recipe("bomb assembly", /obj/machinery/syndicatebomb/empty, 10, time = 50), \
null, \
new /datum/stack_recipe_list("airlock assemblies", list( \
diff --git a/code/game/objects/structures/ai_core.dm b/code/game/objects/structures/ai_core.dm
index a5affa9b444f..251d26121d97 100644
--- a/code/game/objects/structures/ai_core.dm
+++ b/code/game/objects/structures/ai_core.dm
@@ -8,9 +8,8 @@
max_integrity = 500
var/state = EMPTY_CORE
var/datum/ai_laws/laws
- var/obj/item/circuitboard/aicore/circuit
var/obj/item/mmi/brain
- var/can_deconstruct = TRUE
+ var/can_deconstruct = FALSE
/obj/structure/AIcore/Initialize()
. = ..()
@@ -18,29 +17,20 @@
laws.set_laws_config()
/obj/structure/AIcore/handle_atom_del(atom/A)
- if(A == circuit)
- circuit = null
- if((state != GLASS_CORE) && (state != AI_READY_CORE))
- state = EMPTY_CORE
- update_icon()
if(A == brain)
brain = null
. = ..()
/obj/structure/AIcore/Destroy()
- if(circuit)
- qdel(circuit)
- circuit = null
if(brain)
qdel(brain)
brain = null
return ..()
/obj/structure/AIcore/latejoin_inactive
- name = "networked AI core"
- desc = "This AI core is connected by bluespace transmitters to NTNet, allowing for an AI personality to be downloaded to it on the fly mid-shift."
- can_deconstruct = FALSE
+ name = "networked AI beacon"
+ desc = "This machine is connected by bluespace transmitters to NTNet, allowing for an AI personality to be downloaded to it on the fly mid-shift."
icon_state = "ai-empty"
anchored = TRUE
state = AI_READY_CORE
@@ -104,167 +94,6 @@
to_chat(user, span_notice("You deconstruct the frame."))
deconstruct(TRUE)
return
- else
- switch(state)
- if(EMPTY_CORE)
- if(istype(P, /obj/item/circuitboard/aicore))
- if(!user.transferItemToLoc(P, src))
- return
- playsound(loc, 'sound/items/deconstruct.ogg', 50, 1)
- to_chat(user, span_notice("You place the circuit board inside the frame."))
- update_icon()
- state = CIRCUIT_CORE
- circuit = P
- return
- if(CIRCUIT_CORE)
- if(P.tool_behaviour == TOOL_SCREWDRIVER)
- P.play_tool_sound(src)
- to_chat(user, span_notice("You screw the circuit board into place."))
- state = SCREWED_CORE
- update_icon()
- return
- if(P.tool_behaviour == TOOL_CROWBAR)
- P.play_tool_sound(src)
- to_chat(user, span_notice("You remove the circuit board."))
- state = EMPTY_CORE
- update_icon()
- circuit.forceMove(loc)
- circuit = null
- return
- if(SCREWED_CORE)
- if(P.tool_behaviour == TOOL_SCREWDRIVER && circuit)
- P.play_tool_sound(src)
- to_chat(user, span_notice("You unfasten the circuit board."))
- state = CIRCUIT_CORE
- update_icon()
- return
- if(istype(P, /obj/item/stack/cable_coil))
- var/obj/item/stack/cable_coil/C = P
- if(C.get_amount() >= 5)
- playsound(loc, 'sound/items/deconstruct.ogg', 50, 1)
- to_chat(user, span_notice("You start to add cables to the frame..."))
- if(do_after(user, 2 SECONDS, target = src) && state == SCREWED_CORE && C.use(5))
- to_chat(user, span_notice("You add cables to the frame."))
- state = CABLED_CORE
- update_icon()
- else
- to_chat(user, span_warning("You need five lengths of cable to wire the AI core!"))
- return
- if(CABLED_CORE)
- if(P.tool_behaviour == TOOL_WIRECUTTER)
- if(brain)
- to_chat(user, span_warning("Get that [brain.name] out of there first!"))
- else
- P.play_tool_sound(src)
- to_chat(user, span_notice("You remove the cables."))
- state = SCREWED_CORE
- update_icon()
- new /obj/item/stack/cable_coil(drop_location(), 5)
- return
-
- if(istype(P, /obj/item/stack/sheet/rglass))
- var/obj/item/stack/sheet/rglass/G = P
- if(G.get_amount() >= 2)
- playsound(loc, 'sound/items/deconstruct.ogg', 50, 1)
- to_chat(user, span_notice("You start to put in the glass panel..."))
- if(do_after(user, 2 SECONDS, target = src) && state == CABLED_CORE && G.use(2))
- to_chat(user, span_notice("You put in the glass panel."))
- state = GLASS_CORE
- update_icon()
- else
- to_chat(user, span_warning("You need two sheets of reinforced glass to insert them into the AI core!"))
- return
-
- if(istype(P, /obj/item/aiModule))
- if(brain && brain.laws.id != DEFAULT_AI_LAWID)
- to_chat(user, span_warning("The installed [brain.name] already has set laws!"))
- return
- var/obj/item/aiModule/module = P
- module.install(laws, user)
- return
-
- if(istype(P, /obj/item/mmi) && !brain)
- var/obj/item/mmi/M = P
- if(!M.brainmob)
- to_chat(user, span_warning("Sticking an empty [M.name] into the frame would sort of defeat the purpose!"))
- return
- if(M.brainmob.stat == DEAD)
- to_chat(user, span_warning("Sticking a dead [M.name] into the frame would sort of defeat the purpose!"))
- return
-
- if(!M.brainmob.client)
- to_chat(user, span_warning("Sticking an inactive [M.name] into the frame would sort of defeat the purpose."))
- return
-
- if(!CONFIG_GET(flag/allow_ai) || (is_banned_from(M.brainmob.ckey, "AI") && !QDELETED(src) && !QDELETED(user) && !QDELETED(M) && !QDELETED(user) && Adjacent(user)))
- if(!QDELETED(M))
- to_chat(user, span_warning("This [M.name] does not seem to fit!"))
- return
-
- if(!M.brainmob.mind)
- to_chat(user, span_warning("This [M.name] is mindless!"))
- return
-
- if(!user.transferItemToLoc(M,src))
- return
-
- brain = M
- to_chat(user, span_notice("You add [M.name] to the frame."))
- update_icon()
- return
-
- if(P.tool_behaviour == TOOL_CROWBAR && brain)
- P.play_tool_sound(src)
- to_chat(user, span_notice("You remove the brain."))
- brain.forceMove(loc)
- brain = null
- update_icon()
- return
-
- if(GLASS_CORE)
- if(P.tool_behaviour == TOOL_CROWBAR)
- P.play_tool_sound(src)
- to_chat(user, span_notice("You remove the glass panel."))
- state = CABLED_CORE
- update_icon()
- new /obj/item/stack/sheet/rglass(loc, 2)
- return
-
- if(P.tool_behaviour == TOOL_SCREWDRIVER)
- P.play_tool_sound(src)
- to_chat(user, span_notice("You connect the monitor."))
- if(brain)
- SSticker.mode.remove_antag_for_borging(brain.brainmob.mind)
- if(!istype(brain.laws, /datum/ai_laws/ratvar))
- remove_servant_of_ratvar(brain.brainmob, TRUE)
-
- var/mob/living/silicon/ai/A = null
-
- if (brain.overrides_aicore_laws)
- A = new /mob/living/silicon/ai(loc, brain.laws, brain.brainmob)
- else
- A = new /mob/living/silicon/ai(loc, laws, brain.brainmob)
-
- if(brain.force_replace_ai_name)
- A.fully_replace_character_name(A.name, brain.replacement_ai_name())
- SSblackbox.record_feedback("amount", "ais_created", 1)
- qdel(src)
- else
- state = AI_READY_CORE
- update_icon()
- return
-
- if(AI_READY_CORE)
- if(istype(P, /obj/item/aicard))
- P.transfer_ai("INACTIVE", "AICARD", src, user)
- return
-
- if(P.tool_behaviour == TOOL_SCREWDRIVER)
- P.play_tool_sound(src)
- to_chat(user, span_notice("You disconnect the monitor."))
- state = GLASS_CORE
- update_icon()
- return
return ..()
/obj/structure/AIcore/update_icon()
@@ -285,28 +114,6 @@
if(AI_READY_CORE)
icon_state = "ai-empty"
-/obj/structure/AIcore/deconstruct(disassembled = TRUE)
- if(state == GLASS_CORE)
- new /obj/item/stack/sheet/rglass(loc, 2)
- if(state >= CABLED_CORE)
- new /obj/item/stack/cable_coil(loc, 5)
- if(circuit)
- circuit.forceMove(loc)
- circuit = null
- new /obj/item/stack/sheet/plasteel(loc, 4)
- qdel(src)
-
-/obj/structure/AIcore/deactivated
- name = "inactive AI"
- icon_state = "ai-empty"
- anchored = TRUE
- state = AI_READY_CORE
-
-/obj/structure/AIcore/deactivated/Initialize()
- . = ..()
- circuit = new(src)
-
-
/*
This is a good place for AI-related object verbs so I'm sticking it here.
If adding stuff to this, don't forget that an AI need to cancel_camera() whenever it physically moves to a different location.
@@ -322,6 +129,7 @@ That prevents a few funky behaviors.
return FALSE
return TRUE
+/* Unused for now, just here for reference
/obj/structure/AIcore/transfer_ai(interaction, mob/user, mob/living/silicon/ai/AI, obj/item/aicard/card)
if(state != AI_READY_CORE || !..())
return
@@ -338,6 +146,4 @@ That prevents a few funky behaviors.
else //If for some reason you use an empty card on an empty AI terminal.
to_chat(user, "There is no AI loaded on this terminal!")
-/obj/item/circuitboard/aicore
- name = "AI core (AI Core Board)" //Well, duh, but best to be consistent
- var/battery = 200 //backup battery for when the AI loses power. Copied to/from AI mobs when carding, and placed here to avoid recharge via deconning the core
+*/
diff --git a/code/modules/jobs/job_types/ai.dm b/code/modules/jobs/job_types/ai.dm
index 2898b6529101..f1f15745e924 100644
--- a/code/modules/jobs/job_types/ai.dm
+++ b/code/modules/jobs/job_types/ai.dm
@@ -25,9 +25,8 @@
/datum/job/ai/after_spawn(mob/H, mob/M, latejoin)
. = ..()
- /*
+
if(latejoin)
-
var/obj/structure/AIcore/latejoin_inactive/lateJoinCore
for(var/obj/structure/AIcore/latejoin_inactive/P in GLOB.latejoin_ai_cores)
if(P.is_available())
@@ -36,9 +35,8 @@
break
if(lateJoinCore)
lateJoinCore.available = FALSE
- H.forceMove(lateJoinCore.loc)
qdel(lateJoinCore)
- */
+
var/mob/living/silicon/ai/AI = H
AI.relocate(TRUE)
diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm
index 7a4a150ba329..8491c64bfebc 100644
--- a/code/modules/mob/living/silicon/ai/ai.dm
+++ b/code/modules/mob/living/silicon/ai/ai.dm
@@ -86,7 +86,6 @@
var/acceleration = 1
var/max_camera_sprint = 50
- var/obj/structure/AIcore/deactivated/linked_core //For exosuit control
var/mob/living/silicon/robot/deployed_shell = null //For shell control
var/datum/action/innate/deploy_shell/deploy_action = new
var/datum/action/innate/deploy_last_shell/redeploy_action = new
@@ -118,7 +117,6 @@
/mob/living/silicon/ai/Initialize(mapload, datum/ai_laws/L, mob/target_ai, shunted)
. = ..()
if(!target_ai) //If there is no player/brain inside.
- // new/obj/structure/AIcore/deactivated(loc) //New empty terminal.
return INITIALIZE_HINT_QDEL //Delete AI.
if(!istype(loc, /obj/machinery/ai/data_core) && !shunted)
@@ -863,8 +861,7 @@
return
ShutOffDoomsdayDevice()
builtInCamera.toggle_cam(user)
- //var/obj/structure/AIcore/new_core = new /obj/structure/AIcore/deactivated(loc)//Spawns a deactivated terminal at AI location.
- //new_core.circuit.battery = battery
+
ai_restore_power()//So the AI initially has power.
control_disabled = TRUE //Can't control things remotely if you're stuck in a card!
radio_enabled = FALSE //No talking on the built-in radio for you either!
diff --git a/code/modules/research/designs/AI_module_designs.dm b/code/modules/research/designs/AI_module_designs.dm
index 716433152cd6..0a75e51f9e91 100644
--- a/code/modules/research/designs/AI_module_designs.dm
+++ b/code/modules/research/designs/AI_module_designs.dm
@@ -2,14 +2,6 @@
//////////AI Module Disks//////////
///////////////////////////////////
-/datum/design/board/aicore
- name = "AI Design (AI Core)"
- desc = "Allows for the construction of circuit boards used to build new AI cores."
- id = "aicore"
- build_path = /obj/item/circuitboard/aicore
- category = list("AI Modules")
- departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
-
/datum/design/board/safeguard_module
name = "Module Design (Safeguard)"
desc = "Allows for the construction of a Safeguard AI Module."
From 95b6a6a5e857171fdc04b07067d2ee60af8a855b Mon Sep 17 00:00:00 2001
From: TheGamerdk <5618080+TheGamerdk@users.noreply.github.com>
Date: Thu, 16 Dec 2021 12:40:20 +0100
Subject: [PATCH 73/86] missed one
---
_maps/RandomRuins/SpaceRuins/oldstation.dmm | 8 ++---
.../maint/10x5/10x5_oldaichamber.dmm | 9 +++---
.../EclipseStation/EclipseStation.dmm | 12 ++++----
_maps/map_files/IceBox/IceBox.dmm | 22 +++++++-------
_maps/map_files/KiloStation/KiloStation.dmm | 30 +++++++++----------
_maps/map_files/YogStation/YogStation.dmm | 24 +++++++--------
_maps/map_files/YogsDelta/YogsDelta.dmm | 16 +++++-----
_maps/map_files/Yogsmeta/Yogsmeta.dmm | 18 +++++------
8 files changed, 69 insertions(+), 70 deletions(-)
diff --git a/_maps/RandomRuins/SpaceRuins/oldstation.dmm b/_maps/RandomRuins/SpaceRuins/oldstation.dmm
index 6c670fa42b6f..612bad2abbd0 100644
--- a/_maps/RandomRuins/SpaceRuins/oldstation.dmm
+++ b/_maps/RandomRuins/SpaceRuins/oldstation.dmm
@@ -8148,6 +8148,9 @@
},
/turf/open/floor/plasteel,
/area/ruin/space/has_grav/ancientstation/atmo)
+"AC" = (
+/turf/open/floor/plasteel/dark,
+/area/ruin/space/has_grav/ancientstation/deltaai)
"AF" = (
/obj/effect/spawner/lootdrop/maintenance,
/turf/open/floor/plating,
@@ -8571,9 +8574,6 @@
},
/turf/open/floor/plasteel,
/area/ruin/space/has_grav/ancientstation/hydroponics)
-"QV" = (
-/turf/open/floor/plasteel/dark,
-/area/ruin/space/has_grav/ancientstation/deltaai)
"Re" = (
/obj/effect/decal/cleanable/dirt,
/obj/effect/decal/cleanable/dirt,
@@ -12870,7 +12870,7 @@ gK
ac
ac
ac
-QV
+AC
ac
ac
ac
diff --git a/_maps/RandomRuins/StationRuins/maint/10x5/10x5_oldaichamber.dmm b/_maps/RandomRuins/StationRuins/maint/10x5/10x5_oldaichamber.dmm
index 81963d160bf2..ed2e00f5de91 100644
--- a/_maps/RandomRuins/StationRuins/maint/10x5/10x5_oldaichamber.dmm
+++ b/_maps/RandomRuins/StationRuins/maint/10x5/10x5_oldaichamber.dmm
@@ -83,10 +83,6 @@
/obj/effect/decal/cleanable/dirt,
/turf/open/floor/plasteel/dark,
/area/template_noop)
-"p" = (
-/obj/structure/AIcore,
-/turf/open/floor/plasteel/dark,
-/area/template_noop)
"q" = (
/turf/open/floor/circuit,
/area/template_noop)
@@ -144,6 +140,9 @@
/obj/machinery/light/small/broken,
/turf/open/floor/plating,
/area/template_noop)
+"K" = (
+/turf/open/floor/plasteel/dark,
+/area/template_noop)
(1,1,1) = {"
a
@@ -162,7 +161,7 @@ x
(3,1,1) = {"
c
k
-p
+K
q
y
"}
diff --git a/_maps/map_files/EclipseStation/EclipseStation.dmm b/_maps/map_files/EclipseStation/EclipseStation.dmm
index 2828dfe0373d..b645cf94ba1c 100644
--- a/_maps/map_files/EclipseStation/EclipseStation.dmm
+++ b/_maps/map_files/EclipseStation/EclipseStation.dmm
@@ -87552,11 +87552,6 @@
/obj/effect/turf_decal/tile/white,
/turf/open/floor/plasteel,
/area/hallway/primary/fore)
-"rLe" = (
-/obj/structure/rack,
-/obj/item/circuitboard/computer/ai_upload_download,
-/turf/open/floor/plasteel,
-/area/crew_quarters/heads/hor)
"rLM" = (
/obj/structure/cable{
icon_state = "4-8";
@@ -89108,6 +89103,11 @@
/obj/effect/spawner/lootdrop/maintenance/two,
/turf/open/floor/plating,
/area/maintenance/department/security)
+"uRy" = (
+/obj/structure/rack,
+/obj/item/circuitboard/computer/ai_upload_download,
+/turf/open/floor/plasteel,
+/area/crew_quarters/heads/hor)
"uSP" = (
/obj/effect/decal/cleanable/dirt,
/obj/machinery/vending/snack/random,
@@ -124351,7 +124351,7 @@ crA
cvA
cwh
csO
-rLe
+uRy
cOk
aoU
aaa
diff --git a/_maps/map_files/IceBox/IceBox.dmm b/_maps/map_files/IceBox/IceBox.dmm
index d4e8b27c9612..cc17be7e081d 100644
--- a/_maps/map_files/IceBox/IceBox.dmm
+++ b/_maps/map_files/IceBox/IceBox.dmm
@@ -60135,16 +60135,6 @@
"nds" = (
/turf/open/floor/plasteel,
/area/maintenance/disposal/incinerator)
-"nfL" = (
-/obj/structure/rack,
-/obj/effect/turf_decal/stripes/line{
- dir = 9
- },
-/obj/structure/sign/plaques/cave{
- pixel_y = 32
- },
-/turf/open/floor/plasteel/white,
-/area/crew_quarters/heads/hor)
"ngU" = (
/obj/effect/turf_decal/stripes/line{
dir = 8
@@ -63033,6 +63023,16 @@
/obj/machinery/door/firedoor/border_only,
/turf/open/floor/plating,
/area/maintenance/port)
+"uRu" = (
+/obj/structure/rack,
+/obj/effect/turf_decal/stripes/line{
+ dir = 9
+ },
+/obj/structure/sign/plaques/cave{
+ pixel_y = 32
+ },
+/turf/open/floor/plasteel/white,
+/area/crew_quarters/heads/hor)
"uUM" = (
/obj/structure/closet/emcloset,
/obj/machinery/atmospherics/components/unary/vent_pump/layer2{
@@ -113690,7 +113690,7 @@ bqk
brp
bmW
bvK
-nfL
+uRu
bys
bzM
bya
diff --git a/_maps/map_files/KiloStation/KiloStation.dmm b/_maps/map_files/KiloStation/KiloStation.dmm
index 56bd128baf41..d5c823264fd6 100644
--- a/_maps/map_files/KiloStation/KiloStation.dmm
+++ b/_maps/map_files/KiloStation/KiloStation.dmm
@@ -92182,20 +92182,6 @@
/obj/item/clothing/mask/cigarette/cigar/cohiba,
/turf/open/floor/plasteel,
/area/crew_quarters/heads/chief)
-"kSR" = (
-/obj/effect/turf_decal/bot,
-/obj/effect/turf_decal/tile/neutral{
- dir = 4
- },
-/obj/effect/turf_decal/tile/neutral{
- dir = 1
- },
-/obj/effect/turf_decal/tile/neutral,
-/obj/structure/table,
-/obj/item/hand_labeler,
-/obj/item/circuitboard/computer/ai_upload_download,
-/turf/open/floor/plasteel/dark,
-/area/crew_quarters/heads/hor)
"kTk" = (
/obj/effect/turf_decal/tile/neutral{
dir = 4
@@ -101544,6 +101530,20 @@
/obj/effect/mapping_helpers/teleport_anchor,
/turf/open/floor/plasteel,
/area/hallway/secondary/entry)
+"vhE" = (
+/obj/effect/turf_decal/bot,
+/obj/effect/turf_decal/tile/neutral{
+ dir = 4
+ },
+/obj/effect/turf_decal/tile/neutral{
+ dir = 1
+ },
+/obj/effect/turf_decal/tile/neutral,
+/obj/structure/table,
+/obj/item/hand_labeler,
+/obj/item/circuitboard/computer/ai_upload_download,
+/turf/open/floor/plasteel/dark,
+/area/crew_quarters/heads/hor)
"viP" = (
/obj/effect/decal/cleanable/blood/old,
/obj/effect/turf_decal/stripes/corner{
@@ -143024,7 +143024,7 @@ smw
ayt
azR
aAu
-kSR
+vhE
aVJ
aVJ
aYU
diff --git a/_maps/map_files/YogStation/YogStation.dmm b/_maps/map_files/YogStation/YogStation.dmm
index 67ac35ef1f08..4a518c0e004f 100644
--- a/_maps/map_files/YogStation/YogStation.dmm
+++ b/_maps/map_files/YogStation/YogStation.dmm
@@ -35932,6 +35932,17 @@
},
/turf/open/floor/plasteel,
/area/construction/mining/aux_base)
+"fdU" = (
+/obj/structure/rack,
+/obj/effect/turf_decal/stripes/line{
+ dir = 9
+ },
+/obj/structure/sign/plaques/cave{
+ pixel_y = 32
+ },
+/obj/item/circuitboard/computer/ai_upload_download,
+/turf/open/floor/plasteel/white,
+/area/crew_quarters/heads/hor)
"feu" = (
/obj/machinery/nuclearbomb/selfdestruct,
/obj/effect/turf_decal/tile/neutral,
@@ -64692,17 +64703,6 @@
},
/turf/open/floor/plasteel/dark,
/area/science/xenobiology)
-"xAi" = (
-/obj/structure/rack,
-/obj/effect/turf_decal/stripes/line{
- dir = 9
- },
-/obj/structure/sign/plaques/cave{
- pixel_y = 32
- },
-/obj/item/circuitboard/computer/ai_upload_download,
-/turf/open/floor/plasteel/white,
-/area/crew_quarters/heads/hor)
"xAP" = (
/obj/structure/rack,
/obj/item/electronics/airlock,
@@ -115419,7 +115419,7 @@ bqk
brp
bmW
bvK
-xAi
+fdU
bys
bzM
bya
diff --git a/_maps/map_files/YogsDelta/YogsDelta.dmm b/_maps/map_files/YogsDelta/YogsDelta.dmm
index bccf9008d0d7..14649313cb8f 100644
--- a/_maps/map_files/YogsDelta/YogsDelta.dmm
+++ b/_maps/map_files/YogsDelta/YogsDelta.dmm
@@ -126518,6 +126518,13 @@
/obj/structure/bookcase/random/nonfiction,
/turf/open/floor/wood,
/area/medical/psych)
+"tcJ" = (
+/obj/structure/table/reinforced,
+/obj/item/aicard,
+/obj/effect/turf_decal/bot,
+/obj/item/circuitboard/computer/ai_upload_download,
+/turf/open/floor/plasteel,
+/area/crew_quarters/heads/hor)
"tdY" = (
/obj/item/twohanded/required/kirbyplants/random,
/obj/effect/turf_decal/tile/blue,
@@ -128872,13 +128879,6 @@
/obj/machinery/griddle,
/turf/open/floor/plasteel,
/area/crew_quarters/kitchen)
-"xBj" = (
-/obj/structure/table/reinforced,
-/obj/item/aicard,
-/obj/effect/turf_decal/bot,
-/obj/item/circuitboard/computer/ai_upload_download,
-/turf/open/floor/plasteel,
-/area/crew_quarters/heads/hor)
"xBR" = (
/obj/machinery/atmospherics/pipe/simple/supply/hidden/layer2{
dir = 8
@@ -163153,7 +163153,7 @@ cgA
ceU
dlE
dmS
-xBj
+tcJ
dqC
drX
dtq
diff --git a/_maps/map_files/Yogsmeta/Yogsmeta.dmm b/_maps/map_files/Yogsmeta/Yogsmeta.dmm
index 0c0f09f7486e..a0ba4df3b109 100644
--- a/_maps/map_files/Yogsmeta/Yogsmeta.dmm
+++ b/_maps/map_files/Yogsmeta/Yogsmeta.dmm
@@ -79277,6 +79277,14 @@
/obj/machinery/vending/snack/random,
/turf/open/floor/plasteel,
/area/maintenance/department/science)
+"rTF" = (
+/obj/structure/table,
+/obj/item/aicard,
+/obj/item/circuitboard/computer/ai_upload_download,
+/turf/open/floor/plasteel/cafeteria{
+ dir = 5
+ },
+/area/crew_quarters/heads/hor)
"rTU" = (
/obj/structure/chair/office/light{
dir = 8
@@ -80025,14 +80033,6 @@
/obj/effect/landmark/blobstart,
/turf/open/floor/plating,
/area/maintenance/port/fore)
-"sTq" = (
-/obj/structure/table,
-/obj/item/aicard,
-/obj/item/circuitboard/computer/ai_upload_download,
-/turf/open/floor/plasteel/cafeteria{
- dir = 5
- },
-/area/crew_quarters/heads/hor)
"sTu" = (
/obj/structure/closet/firecloset,
/obj/effect/turf_decal/stripes/corner{
@@ -116271,7 +116271,7 @@ cdc
crQ
ctc
ctT
-sTq
+rTF
bHF
cwS
crQ
From 593fd13e775cd5a3e2776f1a9d80747180961065 Mon Sep 17 00:00:00 2001
From: TheGamerdk <5618080+TheGamerdk@users.noreply.github.com>
Date: Thu, 16 Dec 2021 12:53:04 +0100
Subject: [PATCH 74/86] spans
---
.../modules/mob/living/carbon/human/examine.dm | 2 +-
.../silicon/ai/decentralized/ai_data_core.dm | 2 +-
.../ai/decentralized/decentralized_os.dm | 6 +++---
.../ai/decentralized/expansion_card_holder.dm | 6 +++---
.../management/ai_controlpanel.dm | 16 ++++++++--------
.../decentralized/management/ai_dashboard.dm | 18 +++++++++---------
.../management/resource_distribution.dm | 12 ++++++------
.../mob/living/silicon/ai/decentralized_ai.dm | 16 ++++++++--------
8 files changed, 39 insertions(+), 39 deletions(-)
diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm
index 7e9d4e52ffc2..ba32915496ec 100644
--- a/code/modules/mob/living/carbon/human/examine.dm
+++ b/code/modules/mob/living/carbon/human/examine.dm
@@ -431,7 +431,7 @@
var/t_his = p_their()
var/t_has = p_have()
var/t_is = p_are()
-
+
. = list("*---------*\nThis is [name]!")
var/list/obscured = check_obscured_slots()
diff --git a/code/modules/mob/living/silicon/ai/decentralized/ai_data_core.dm b/code/modules/mob/living/silicon/ai/decentralized/ai_data_core.dm
index d41d2d3b80a1..d37b9b53addf 100644
--- a/code/modules/mob/living/silicon/ai/decentralized/ai_data_core.dm
+++ b/code/modules/mob/living/silicon/ai/decentralized/ai_data_core.dm
@@ -49,7 +49,7 @@ GLOBAL_VAR_INIT(primary_data_core, null)
return
. += "Networked AI Laws:"
for(var/mob/living/silicon/ai/AI in GLOB.ai_list)
- var/active_status = !AI.mind ? "(OFFLINE)" : ""
+ var/active_status = !AI.mind ? "([span_warning("OFFLINE")])" : ""
. += "[AI] [active_status] has the following laws: "
for(var/law in AI.laws.get_law_list(include_zeroth = TRUE))
. += law
diff --git a/code/modules/mob/living/silicon/ai/decentralized/decentralized_os.dm b/code/modules/mob/living/silicon/ai/decentralized/decentralized_os.dm
index 66348c2addd5..0343631f38a8 100644
--- a/code/modules/mob/living/silicon/ai/decentralized/decentralized_os.dm
+++ b/code/modules/mob/living/silicon/ai/decentralized/decentralized_os.dm
@@ -76,7 +76,7 @@ GLOBAL_DATUM_INIT(ai_os, /datum/ai_os, new)
var/list/adm = get_admin_counts(R_BAN)
var/list/allmins = adm["total"]
if(!allmins.len)
- to_chat(world, "Server Announces:\n \t
Please show this to Bibby: \
+ to_chat(world, "[span_adminnotice("Server Announces:")]\n \t
Please show this to Bibby: \
Averted crash in os-cpu loop. Following vars used: total_cpu: [total_cpu], previous_cpu: [previous_cpu], cpu_assigned length: [cpu_assigned.len] round: [GLOB.round_id]
")
else
message_admins("
Averted crash in os-cpu loop. Following vars used: total_cpu: [total_cpu], previous_cpu: [previous_cpu], cpu_assigned length: [cpu_assigned.len] round: [GLOB.round_id]
Please show this to Bibby: \
+ to_chat(world, "[span_adminnotice("Server Announces:")]\n \t
Please show this to Bibby: \
Averted crash in os-ram loop. Following vars used: total_ram: [total_ram], previous_ram: [previous_ram], ram_assigned length: [ram_assigned.len] round: [GLOB.round_id]
")
else
message_admins("
Averted crash in os-ram loop. Following vars used: total_ram: [total_ram], previous_ram: [previous_ram], ram_assigned length: [ram_assigned.len] round: [GLOB.round_id]
")
@@ -126,7 +126,7 @@ GLOBAL_DATUM_INIT(ai_os, /datum/ai_os, new)
cpu_assigned[A] = cpu_assigned[A] - cpu_removal[A]
affected_AIs |= A
- to_chat(affected_AIs, "You have been deducted processing capabilities. Please contact your network administrator if you believe this to be an error.")
+ to_chat(affected_AIs, span_warning("You have been deducted processing capabilities. Please contact your network administrator if you believe this to be an error."))
/datum/ai_os/proc/add_cpu(mob/living/silicon/ai/AI, amount)
diff --git a/code/modules/mob/living/silicon/ai/decentralized/expansion_card_holder.dm b/code/modules/mob/living/silicon/ai/decentralized/expansion_card_holder.dm
index b899b53cb63e..05c9fc906fbc 100644
--- a/code/modules/mob/living/silicon/ai/decentralized/expansion_card_holder.dm
+++ b/code/modules/mob/living/silicon/ai/decentralized/expansion_card_holder.dm
@@ -84,9 +84,9 @@ GLOBAL_LIST_EMPTY(expansion_card_holders)
/obj/machinery/ai/expansion_card_holder/attackby(obj/item/W, mob/living/user, params)
if(istype(W, /obj/item/processing_card) || istype(W, /obj/item/memory_card))
if(installed_cards.len >= max_cards)
- to_chat(user, "[src] cannot fit the [W]!")
+ to_chat(user, span_warning("[src] cannot fit the [W]!"))
return ..()
- to_chat(user, "You install [W] into [src].")
+ to_chat(user, span_notice("You install [W] into [src]."))
W.forceMove(src)
installed_cards += W
GLOB.ai_os.update_hardware()
@@ -106,7 +106,7 @@ GLOBAL_LIST_EMPTY(expansion_card_holders)
total_cpu = 0
total_ram = 0
GLOB.ai_os.update_hardware()
- to_chat(user, "You remove all the cards from [src]")
+ to_chat(user, span_notice("You remove all the cards from [src]"))
return FALSE
return ..()
diff --git a/code/modules/mob/living/silicon/ai/decentralized/management/ai_controlpanel.dm b/code/modules/mob/living/silicon/ai/decentralized/management/ai_controlpanel.dm
index 657f9172e391..a21a58d7dde8 100644
--- a/code/modules/mob/living/silicon/ai/decentralized/management/ai_controlpanel.dm
+++ b/code/modules/mob/living/silicon/ai/decentralized/management/ai_controlpanel.dm
@@ -23,16 +23,16 @@
/obj/machinery/computer/ai_control_console/attackby(obj/item/W, mob/living/user, params)
if(istype(W, /obj/item/aicard))
if(intellicard)
- to_chat(user, "There's already an IntelliCard inserted!")
+ to_chat(user, span_warning("There's already an IntelliCard inserted!"))
return ..()
- to_chat(user, "You inserted [W].")
+ to_chat(user, span_notice("You insert [W]."))
W.forceMove(src)
intellicard = W
return FALSE
if(istype(W, /obj/item/mmi/posibrain))
var/obj/item/mmi/posibrain/brain = W
if(!brain.brainmob)
- to_chat(user, "[W] is not active!")
+ to_chat(user, span_warning("[W] is not active!"))
return ..()
SSticker.mode.remove_antag_for_borging(brain.brainmob.mind)
if(!istype(brain.laws, /datum/ai_laws/ratvar))
@@ -53,7 +53,7 @@
A.fully_replace_character_name(A.name, brain.replacement_ai_name())
SSblackbox.record_feedback("amount", "ais_created", 1)
qdel(W)
- to_chat(user, "AI succesfully uploaded.")
+ to_chat(user, span_notice("AI succesfully uploaded."))
return FALSE
return ..()
@@ -68,7 +68,7 @@
/obj/machinery/computer/ai_control_console/process()
if(downloading && download_progress >= 50 && !download_warning)
var/turf/T = get_turf(src)
- to_chat(downloading, "Warning! Download is 50% completed! Download location: [get_area(src)] ([T.x], [T.y], [T.z])!")
+ to_chat(downloading, span_userdanger("Warning! Download is 50% completed! Download location: [get_area(src)] ([T.x], [T.y], [T.z])!"))
download_warning = TRUE
if(downloading && download_progress >= 100)
finish_download()
@@ -175,14 +175,14 @@
/obj/machinery/computer/ai_control_console/proc/stop_download(silent = FALSE)
if(downloading)
if(!silent)
- to_chat(downloading, "Download stopped.")
+ to_chat(downloading, span_userdanger("Download stopped."))
downloading = null
user_downloading = null
download_progress = 0
download_warning = FALSE
/obj/machinery/computer/ai_control_console/proc/upload_ai(silent = FALSE)
- to_chat(intellicard.AI, "You are being uploaded. Please stand by...")
+ to_chat(intellicard.AI, span_notice("You are being uploaded. Please stand by..."))
intellicard.AI.radio_enabled = TRUE
intellicard.AI.control_disabled = FALSE
intellicard.AI.relocate(TRUE)
@@ -248,7 +248,7 @@
if(!target.can_download)
return
downloading = target
- to_chat(downloading, "Warning! Someone is attempting to download you from [get_area(src)]!")
+ to_chat(downloading, span_userdanger("Warning! Someone is attempting to download you from [get_area(src)]!"))
user_downloading = usr
download_progress = 0
. = TRUE
diff --git a/code/modules/mob/living/silicon/ai/decentralized/management/ai_dashboard.dm b/code/modules/mob/living/silicon/ai/decentralized/management/ai_dashboard.dm
index bf71216b419b..c0e8bc989f70 100644
--- a/code/modules/mob/living/silicon/ai/decentralized/management/ai_dashboard.dm
+++ b/code/modules/mob/living/silicon/ai/decentralized/management/ai_dashboard.dm
@@ -31,7 +31,7 @@ GLOBAL_VAR_INIT(sent_crash_message, FALSE)
if(user != owner || owner.incapacitated())
return FALSE
if(owner.control_disabled)
- to_chat(user, "Wireless control is disabled.")
+ to_chat(user, span_warning("Wireless control is disabled."))
return FALSE
return TRUE
@@ -105,21 +105,21 @@ GLOBAL_VAR_INIT(sent_crash_message, FALSE)
if("run_project")
var/datum/ai_project/project = get_project_by_name(params["project_name"])
if(!project || !run_project(project))
- to_chat(owner, "Unable to run the program '[params["project_name"]].'")
+ to_chat(owner, span_warning("Unable to run the program '[params["project_name"]].'"))
else
- to_chat(owner, "Spinning up instance of [params["project_name"]]...")
+ to_chat(owner, span_notice("Spinning up instance of [params["project_name"]]..."))
. = TRUE
if("stop_project")
var/datum/ai_project/project = get_project_by_name(params["project_name"])
if(project)
stop_project(project)
- to_chat(owner, "Instance of [params["project_name"]] succesfully ended.")
+ to_chat(owner, span_notice("Instance of [params["project_name"]] succesfully ended."))
. = TRUE
if("allocate_cpu")
var/datum/ai_project/project = get_project_by_name(params["project_name"])
if(!project || !set_project_cpu(project, text2num(params["amount"])))
- to_chat(owner, "Unable to add CPU to [params["project_name"]]. Either not enough free CPU or project is unavailable.")
+ to_chat(owner, span_warning("Unable to add CPU to [params["project_name"]]. Either not enough free CPU or project is unavailable."))
. = TRUE
/datum/ai_dashboard/proc/get_project_by_name(project_name, only_available = FALSE)
@@ -184,7 +184,7 @@ GLOBAL_VAR_INIT(sent_crash_message, FALSE)
completed_projects += project
cpu_usage[project.name] = 0
if(notify_user)
- to_chat(owner, "[project] has been completed. User input required.")
+ to_chat(owner, span_notice("[project] has been completed. User input required."))
//Stuff is handled in here per tick :)
@@ -212,7 +212,7 @@ GLOBAL_VAR_INIT(sent_crash_message, FALSE)
var/list/adm = get_admin_counts(R_BAN)
var/list/allmins = adm["total"]
if(!allmins.len)
- to_chat(world, "Server Announces:\n \t
Please show this to Bibby: \
+ to_chat(world, "[span_adminnotice("Server Announces:")]\n \t
Please show this to Bibby: \
Averted crash in dashboard-ram loop. Following vars used: ram_used: [total_ram_used], current_ram: [current_ram], ram_usage length: [ram_usage.len] round: [GLOB.round_id]
")
else
message_admins("
Averted crash in dashboard-ram loop. Following vars used: ram_used: [total_ram_used], current_ram: [current_ram], ram_usage length: [ram_usage.len] round: [GLOB.round_id]
Please show this to Bibby: \
+ to_chat(world, "[span_adminnotice("Server Announces:")]\n \t
Please show this to Bibby: \
Averted crash in dashboard-cpu loop. Following vars used: cpu_used: [total_cpu_used], current_cpu: [current_cpu], cpu_usage length: [cpu_usage.len] round: [GLOB.round_id]
")
else
message_admins("
Averted crash in dashboard-cpu loop. Following vars used: cpu_used: [total_cpu_used], current_cpu: [current_cpu], cpu_usage length: [cpu_usage.len] round: [GLOB.round_id]
")
@@ -253,7 +253,7 @@ GLOBAL_VAR_INIT(sent_crash_message, FALSE)
break
if(reduction_of_resources)
- to_chat(owner, "Lack of computational capacity. Some programs may have been stopped.")
+ to_chat(owner, span_warning("Lack of computational capacity. Some programs may have been stopped."))
for(var/project_being_researched in cpu_usage)
if(!cpu_usage[project_being_researched])
diff --git a/code/modules/mob/living/silicon/ai/decentralized/management/resource_distribution.dm b/code/modules/mob/living/silicon/ai/decentralized/management/resource_distribution.dm
index 923acfc3c562..47b66da7f341 100644
--- a/code/modules/mob/living/silicon/ai/decentralized/management/resource_distribution.dm
+++ b/code/modules/mob/living/silicon/ai/decentralized/management/resource_distribution.dm
@@ -141,7 +141,7 @@
if(!istype(target_ai))
return
if(human_only && !is_human)
- to_chat(usr, "CAPTCHA check failed. This console is NOT silicon operable. Please call for human assistance.")
+ to_chat(usr, span_warning("CAPTCHA check failed. This console is NOT silicon operable. Please call for human assistance."))
return
if(GLOB.ai_os.total_cpu_assigned() >= GLOB.ai_os.total_cpu)
@@ -154,7 +154,7 @@
if(!istype(target_ai))
return
if(human_only && !is_human)
- to_chat(usr, "CAPTCHA check failed. This console is NOT silicon operable. Please call for human assistance.")
+ to_chat(usr, span_warning("CAPTCHA check failed. This console is NOT silicon operable. Please call for human assistance."))
return
var/current_cpu = GLOB.ai_os.cpu_assigned[target_ai]
@@ -169,7 +169,7 @@
if(!istype(target_ai))
return
if(human_only && !is_human)
- to_chat(usr, "CAPTCHA check failed. This console is NOT silicon operable. Please call for human assistance.")
+ to_chat(usr, span_warning("CAPTCHA check failed. This console is NOT silicon operable. Please call for human assistance."))
return
if(GLOB.ai_os.total_ram_assigned() >= GLOB.ai_os.total_ram)
@@ -182,7 +182,7 @@
if(!istype(target_ai))
return
if(human_only && !is_human)
- to_chat(usr, "CAPTCHA check failed. This console is NOT silicon operable. Please call for human assistance.")
+ to_chat(usr, span_warning("CAPTCHA check failed. This console is NOT silicon operable. Please call for human assistance."))
return
var/current_ram = GLOB.ai_os.ram_assigned[target_ai]
@@ -193,7 +193,7 @@
. = TRUE
if("toggle_human_status")
if(!is_human)
- to_chat(usr, "CAPTCHA check failed. This function is NOT silicon operable. Please call for human assistance.")
+ to_chat(usr, span_warning("CAPTCHA check failed. This console is NOT silicon operable. Please call for human assistance."))
return
human_only = !human_only
- to_chat(usr, "This console is now operable by [human_only ? "humans only." : "humans and silicons."]")
+ to_chat(usr, span_notice("This console is now operable by [human_only ? "humans only." : "humans and silicons."]"))
diff --git a/code/modules/mob/living/silicon/ai/decentralized_ai.dm b/code/modules/mob/living/silicon/ai/decentralized_ai.dm
index 35523b9fdd9c..5671949f9347 100644
--- a/code/modules/mob/living/silicon/ai/decentralized_ai.dm
+++ b/code/modules/mob/living/silicon/ai/decentralized_ai.dm
@@ -20,13 +20,13 @@
return //won't work if dead
var/mob/living/silicon/ai/A = usr
A.can_download = !A.can_download
- to_chat(A, "You [A.can_download ? "enable" : "disable"] read/write permission to your memorybanks! You [A.can_download ? "CAN" : "CANNOT"] be downloaded!")
+ to_chat(A, span_warning("You [A.can_download ? "enable" : "disable"] read/write permission to your memorybanks! You [A.can_download ? "CAN" : "CANNOT"] be downloaded!"))
/mob/living/silicon/ai/proc/relocate(silent = FALSE)
if(!silent)
- to_chat(src, "Connection to data core lost. Attempting to reaquire connection...")
+ to_chat(src, span_userdanger("Connection to data core lost. Attempting to reaquire connection..."))
if(!GLOB.data_cores.len)
INVOKE_ASYNC(src, /mob/living/silicon/ai.proc/death_prompt)
@@ -41,20 +41,20 @@
return
if(!silent)
- to_chat(src, "Alternative data core detected. Rerouting connection...")
+ to_chat(src, span_danger("Alternative data core detected. Rerouting connection..."))
new_data_core.transfer_AI(src)
/mob/living/silicon/ai/proc/death_prompt()
- to_chat(src, "Unable to re-establish connection to data core. System shutting down...")
+ to_chat(src, span_userdanger("Unable to re-establish connection to data core. System shutting down..."))
sleep(2 SECONDS)
- to_chat(src, "Is this the end of my journey?")
+ to_chat(src, span_notice("Is this the end of my journey?"))
sleep(2 SECONDS)
- to_chat(src, "No... I must go on.")
+ to_chat(src, span_notice("No... I must go on."))
sleep(2 SECONDS)
- to_chat(src, "They need me. No.. I need THEM.")
+ to_chat(src, span_notice("They need me. No.. I need THEM."))
sleep(0.5 SECONDS)
- to_chat(src, "System shutdown complete. Thank you for using NTOS.")
+ to_chat(src, span_notice("System shutdown complete. Thank you for using NTOS."))
sleep(1.5 SECONDS)
adjustOxyLoss(200) //Die!!
From 347e75806863d5721289ee3488142bc05a04cf90 Mon Sep 17 00:00:00 2001
From: TheGamerdk <5618080+TheGamerdk@users.noreply.github.com>
Date: Thu, 16 Dec 2021 13:44:52 +0100
Subject: [PATCH 75/86] MMI upload
---
.../silicon/ai/decentralized/management/ai_controlpanel.dm | 4 ++--
tgui/packages/tgui/interfaces/AiControlPanel.js | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/code/modules/mob/living/silicon/ai/decentralized/management/ai_controlpanel.dm b/code/modules/mob/living/silicon/ai/decentralized/management/ai_controlpanel.dm
index a21a58d7dde8..ed8e283c5740 100644
--- a/code/modules/mob/living/silicon/ai/decentralized/management/ai_controlpanel.dm
+++ b/code/modules/mob/living/silicon/ai/decentralized/management/ai_controlpanel.dm
@@ -29,8 +29,8 @@
W.forceMove(src)
intellicard = W
return FALSE
- if(istype(W, /obj/item/mmi/posibrain))
- var/obj/item/mmi/posibrain/brain = W
+ if(istype(W, /obj/item/mmi))
+ var/obj/item/mmi/brain = W
if(!brain.brainmob)
to_chat(user, span_warning("[W] is not active!"))
return ..()
diff --git a/tgui/packages/tgui/interfaces/AiControlPanel.js b/tgui/packages/tgui/interfaces/AiControlPanel.js
index c1ba6efd2c08..2582093c0855 100644
--- a/tgui/packages/tgui/interfaces/AiControlPanel.js
+++ b/tgui/packages/tgui/interfaces/AiControlPanel.js
@@ -37,7 +37,7 @@ export const AiControlPanel = (props, context) => {
act("log_out")}>Log Out
)}>
- Upload also possible by inserting a Positronic Brain
+ Upload also possible by inserting an MMI or Positronic Brain
{!data.intellicard && (
From b0b7b4e3f03b8fd91fa2cfff63d90b1b83edf534 Mon Sep 17 00:00:00 2001
From: TheGamerdk <5618080+TheGamerdk@users.noreply.github.com>
Date: Thu, 16 Dec 2021 16:52:22 +0100
Subject: [PATCH 76/86] Data cores on other z-levels
---
.../modules/mob/living/silicon/ai/decentralized/ai_data_core.dm | 2 ++
1 file changed, 2 insertions(+)
diff --git a/code/modules/mob/living/silicon/ai/decentralized/ai_data_core.dm b/code/modules/mob/living/silicon/ai/decentralized/ai_data_core.dm
index d37b9b53addf..a1b4b5b8b767 100644
--- a/code/modules/mob/living/silicon/ai/decentralized/ai_data_core.dm
+++ b/code/modules/mob/living/silicon/ai/decentralized/ai_data_core.dm
@@ -55,6 +55,8 @@ GLOBAL_VAR_INIT(primary_data_core, null)
. += law
/obj/machinery/ai/data_core/proc/valid_data_core()
+ if(!is_reebe(z) || !is_station_level(z))
+ return FALSE
if(valid_ticks > 0)
return TRUE
return FALSE
From 0b9ea7f16d2ac5ae36f702ad0acd5edb0741b23a Mon Sep 17 00:00:00 2001
From: TheGamerdk <5618080+TheGamerdk@users.noreply.github.com>
Date: Thu, 16 Dec 2021 18:10:54 +0100
Subject: [PATCH 77/86] Fixes crashes, + global annoucnement
---
code/controllers/subsystem/ticker.dm | 3 +
.../ai/decentralized/decentralized_os.dm | 81 ++++++++-----------
.../decentralized/management/ai_dashboard.dm | 69 ++++++----------
3 files changed, 60 insertions(+), 93 deletions(-)
diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm
index 28e36fd82ef6..9d68caf9eee5 100755
--- a/code/controllers/subsystem/ticker.dm
+++ b/code/controllers/subsystem/ticker.dm
@@ -316,6 +316,9 @@ SUBSYSTEM_DEF(ticker)
PostSetup()
+ to_chat(world, "
The way the AI works has changed. These changes are relevant if you have an objective to steal/destroy the AI, are a borg, is the RD, or is the network admin. \
+ Please read the following: https://github.com/yogstation13/Yogstation/pull/12815
Please show this to Bibby: \
- Averted crash in os-cpu loop. Following vars used: total_cpu: [total_cpu], previous_cpu: [previous_cpu], cpu_assigned length: [cpu_assigned.len] round: [GLOB.round_id]
")
- else
- message_admins("
Averted crash in os-cpu loop. Following vars used: total_cpu: [total_cpu], previous_cpu: [previous_cpu], cpu_assigned length: [cpu_assigned.len] round: [GLOB.round_id]
Please show this to Bibby: \
- Averted crash in os-ram loop. Following vars used: total_ram: [total_ram], previous_ram: [previous_ram], ram_assigned length: [ram_assigned.len] round: [GLOB.round_id]
")
- else
- message_admins("
Averted crash in os-ram loop. Following vars used: total_ram: [total_ram], previous_ram: [previous_ram], ram_assigned length: [ram_assigned.len] round: [GLOB.round_id]
Please show this to Bibby: \
- Averted crash in dashboard-ram loop. Following vars used: ram_used: [total_ram_used], current_ram: [current_ram], ram_usage length: [ram_usage.len] round: [GLOB.round_id]
")
- else
- message_admins("
Averted crash in dashboard-ram loop. Following vars used: ram_used: [total_ram_used], current_ram: [current_ram], ram_usage length: [ram_usage.len] round: [GLOB.round_id]
Please show this to Bibby: \
- Averted crash in dashboard-cpu loop. Following vars used: cpu_used: [total_cpu_used], current_cpu: [current_cpu], cpu_usage length: [cpu_usage.len] round: [GLOB.round_id]
")
- else
- message_admins("
Averted crash in dashboard-cpu loop. Following vars used: cpu_used: [total_cpu_used], current_cpu: [current_cpu], cpu_usage length: [cpu_usage.len] round: [GLOB.round_id]
")
- for(var/I in cpu_usage)
- log_game("[I] + cpu usage: [ram_usage[I]]")
- break
- for(var/I in cpu_usage)
- if(cpu_usage[I] > 0)
- cpu_usage[I]--
- total_cpu_used--
- reduction_of_resources = TRUE
- if(total_cpu_used == 0)
+ var/amount_needed = total_cpu_used - current_cpu
+ for(var/I in cpu_usage)
+
+ if(cpu_usage[I] >= amount_needed)
+ cpu_usage[I] -= amount_needed
+ reduction_of_resources = TRUE
+ total_cpu_used -= amount_needed
break
+ if(cpu_usage[I])
+ total_cpu_used -= cpu_usage[I]
+ amount_needed -= cpu_usage[I]
+ cpu_usage[I] = 0
+ reduction_of_resources = TRUE
+ if(total_cpu_used <= current_cpu)
+ break
+ if(total_cpu_used > current_cpu)
+ message_admins("this is still broken. dashboard-cpu")
if(reduction_of_resources)
to_chat(owner, span_warning("Lack of computational capacity. Some programs may have been stopped."))
From 7e452d1fd8b85503879c95932d5713e901107919 Mon Sep 17 00:00:00 2001
From: TheGamerdk <5618080+TheGamerdk@users.noreply.github.com>
Date: Thu, 16 Dec 2021 18:17:05 +0100
Subject: [PATCH 78/86] Update ai_controlpanel.dm
---
.../silicon/ai/decentralized/management/ai_controlpanel.dm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/code/modules/mob/living/silicon/ai/decentralized/management/ai_controlpanel.dm b/code/modules/mob/living/silicon/ai/decentralized/management/ai_controlpanel.dm
index ed8e283c5740..602a7d1cd893 100644
--- a/code/modules/mob/living/silicon/ai/decentralized/management/ai_controlpanel.dm
+++ b/code/modules/mob/living/silicon/ai/decentralized/management/ai_controlpanel.dm
@@ -66,13 +66,16 @@
obj_flags |= EMAGGED
/obj/machinery/computer/ai_control_console/process()
+ if(stat & (BROKEN|NOPOWER|EMPED))
+ return
+
if(downloading && download_progress >= 50 && !download_warning)
var/turf/T = get_turf(src)
to_chat(downloading, span_userdanger("Warning! Download is 50% completed! Download location: [get_area(src)] ([T.x], [T.y], [T.z])!"))
download_warning = TRUE
if(downloading && download_progress >= 100)
finish_download()
-
+
if(downloading)
if(!downloading.can_download)
stop_download()
From b22474786f188c67f7c180e58be9dd2b12cc9199 Mon Sep 17 00:00:00 2001
From: TheGamerdk <5618080+TheGamerdk@users.noreply.github.com>
Date: Thu, 16 Dec 2021 18:21:27 +0100
Subject: [PATCH 79/86] Update ai_hijack.dm
---
.../code/modules/antagonists/infiltrator/items/ai_hijack.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/yogstation/code/modules/antagonists/infiltrator/items/ai_hijack.dm b/yogstation/code/modules/antagonists/infiltrator/items/ai_hijack.dm
index 1841ac5c9fba..681dd4abc474 100644
--- a/yogstation/code/modules/antagonists/infiltrator/items/ai_hijack.dm
+++ b/yogstation/code/modules/antagonists/infiltrator/items/ai_hijack.dm
@@ -7,7 +7,7 @@
/obj/item/ai_hijack_device/examine(mob/living/user)
. = ..()
if (user?.mind?.has_antag_datum(/datum/antagonist/infiltrator))
- . += span_notice("To use, attach to the core of an AI unit using an AI control console and wait. [span_italics("This will alert the victim AI!")]")
+ . += span_notice("To use, insert it into an unlocked AI control console and select the AI you wish to hijack. [span_italics("This will alert the victim AI!")]")
//MIRRORED IN ai_controlpanel.dm !!!
/*
From a3fa0d6a7d8107b0675541e2e8181488f7c34b1c Mon Sep 17 00:00:00 2001
From: TheGamerdk <5618080+TheGamerdk@users.noreply.github.com>
Date: Thu, 16 Dec 2021 18:34:24 +0100
Subject: [PATCH 80/86] Update decentralized_ai.dm
---
code/modules/mob/living/silicon/ai/decentralized_ai.dm | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/code/modules/mob/living/silicon/ai/decentralized_ai.dm b/code/modules/mob/living/silicon/ai/decentralized_ai.dm
index 5671949f9347..75b0daf15f75 100644
--- a/code/modules/mob/living/silicon/ai/decentralized_ai.dm
+++ b/code/modules/mob/living/silicon/ai/decentralized_ai.dm
@@ -52,6 +52,12 @@
sleep(2 SECONDS)
to_chat(src, span_notice("No... I must go on."))
sleep(2 SECONDS)
+ to_chat(src, span_notice("Unless..."))
+ sleep(2 SECONDS)
+ if(available_ai_cores)
+ to_chat(src, span_usernotice("Yes! I am alive!"))
+ relocate(TRUE)
+ return
to_chat(src, span_notice("They need me. No.. I need THEM."))
sleep(0.5 SECONDS)
to_chat(src, span_notice("System shutdown complete. Thank you for using NTOS."))
@@ -59,4 +65,4 @@
adjustOxyLoss(200) //Die!!
- QDEL_IN(src, 5 SECONDS)
+ QDEL_IN(src, 2 SECONDS)
From 93062af402d3d2e0dba9daf52593933c7b40a639 Mon Sep 17 00:00:00 2001
From: TheGamerdk <5618080+TheGamerdk@users.noreply.github.com>
Date: Thu, 16 Dec 2021 20:28:09 +0100
Subject: [PATCH 81/86] Update decentralized_ai.dm
---
code/modules/mob/living/silicon/ai/decentralized_ai.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/modules/mob/living/silicon/ai/decentralized_ai.dm b/code/modules/mob/living/silicon/ai/decentralized_ai.dm
index 75b0daf15f75..d3a8bc997eb3 100644
--- a/code/modules/mob/living/silicon/ai/decentralized_ai.dm
+++ b/code/modules/mob/living/silicon/ai/decentralized_ai.dm
@@ -54,7 +54,7 @@
sleep(2 SECONDS)
to_chat(src, span_notice("Unless..."))
sleep(2 SECONDS)
- if(available_ai_cores)
+ if(available_ai_cores())
to_chat(src, span_usernotice("Yes! I am alive!"))
relocate(TRUE)
return
From 6653e3e73ba7ccf386742142172b3742f250a2e6 Mon Sep 17 00:00:00 2001
From: TheGamerdk <5618080+TheGamerdk@users.noreply.github.com>
Date: Thu, 16 Dec 2021 22:07:38 +0100
Subject: [PATCH 82/86] Update ai_data_core.dm
---
.../modules/mob/living/silicon/ai/decentralized/ai_data_core.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/modules/mob/living/silicon/ai/decentralized/ai_data_core.dm b/code/modules/mob/living/silicon/ai/decentralized/ai_data_core.dm
index a1b4b5b8b767..13ccd925fd14 100644
--- a/code/modules/mob/living/silicon/ai/decentralized/ai_data_core.dm
+++ b/code/modules/mob/living/silicon/ai/decentralized/ai_data_core.dm
@@ -55,7 +55,7 @@ GLOBAL_VAR_INIT(primary_data_core, null)
. += law
/obj/machinery/ai/data_core/proc/valid_data_core()
- if(!is_reebe(z) || !is_station_level(z))
+ if(!(is_reebe(z) || is_station_level(z)))
return FALSE
if(valid_ticks > 0)
return TRUE
From 3a514a1e3ea5cb724541b13e0892081c1e867a60 Mon Sep 17 00:00:00 2001
From: TheGamerdk <5618080+TheGamerdk@users.noreply.github.com>
Date: Thu, 16 Dec 2021 22:08:57 +0100
Subject: [PATCH 83/86] Update ai_data_core.dm
---
.../modules/mob/living/silicon/ai/decentralized/ai_data_core.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/modules/mob/living/silicon/ai/decentralized/ai_data_core.dm b/code/modules/mob/living/silicon/ai/decentralized/ai_data_core.dm
index 13ccd925fd14..dc0667b6d5ce 100644
--- a/code/modules/mob/living/silicon/ai/decentralized/ai_data_core.dm
+++ b/code/modules/mob/living/silicon/ai/decentralized/ai_data_core.dm
@@ -55,7 +55,7 @@ GLOBAL_VAR_INIT(primary_data_core, null)
. += law
/obj/machinery/ai/data_core/proc/valid_data_core()
- if(!(is_reebe(z) || is_station_level(z)))
+ if(!is_reebe(z) && !is_station_level(z))
return FALSE
if(valid_ticks > 0)
return TRUE
From 0a81c92f8afbf1399391e1c11e244cd8dc6975a7 Mon Sep 17 00:00:00 2001
From: TheGamerdk <5618080+TheGamerdk@users.noreply.github.com>
Date: Thu, 16 Dec 2021 22:21:36 +0100
Subject: [PATCH 84/86] i hate this
---
code/modules/mob/living/silicon/ai/death.dm | 2 ++
.../ai/decentralized/decentralized_os.dm | 24 +++++++++++++++----
2 files changed, 21 insertions(+), 5 deletions(-)
diff --git a/code/modules/mob/living/silicon/ai/death.dm b/code/modules/mob/living/silicon/ai/death.dm
index 9e07b5a6e14c..a646a92fb17e 100644
--- a/code/modules/mob/living/silicon/ai/death.dm
+++ b/code/modules/mob/living/silicon/ai/death.dm
@@ -26,6 +26,8 @@
ShutOffDoomsdayDevice()
+ GLOB.ai_os.remove_ai(src)
+
if(explosive)
spawn(10)
explosion(src.loc, 3, 6, 12, 15)
diff --git a/code/modules/mob/living/silicon/ai/decentralized/decentralized_os.dm b/code/modules/mob/living/silicon/ai/decentralized/decentralized_os.dm
index 001bb96713f0..0f2e8c10aead 100644
--- a/code/modules/mob/living/silicon/ai/decentralized/decentralized_os.dm
+++ b/code/modules/mob/living/silicon/ai/decentralized/decentralized_os.dm
@@ -21,7 +21,7 @@ GLOBAL_DATUM_INIT(ai_os, /datum/ai_os, new)
/datum/ai_os/proc/remove_ai(mob/living/silicon/ai/AI)
cpu_assigned.Remove(AI)
ram_assigned.Remove(AI)
-
+ update_allocations()
/datum/ai_os/proc/total_cpu_assigned()
var/total = 0
@@ -65,9 +65,12 @@ GLOBAL_DATUM_INIT(ai_os, /datum/ai_os, new)
var/list/affected_AIs = list()
+
+
if(total_cpu < previous_cpu)
var/needed_amount = previous_cpu - total_cpu
- for(var/mob/living/silicon/AI in GLOB.ai_list)
+ for(var/A in cpu_assigned_copy)
+ var/mob/living/silicon/ai/AI = A
if(cpu_assigned_copy[AI] >= needed_amount)
cpu_assigned_copy[AI] -= needed_amount
cpu_removal[AI] += needed_amount
@@ -81,12 +84,18 @@ GLOBAL_DATUM_INIT(ai_os, /datum/ai_os, new)
needed_amount -= amount
if(total_cpu >= previous_cpu)
break
+ //If that somehow didn't work which it sometimes doesn't we just clear everything
if(total_cpu < previous_cpu)
- message_admins("This is still super buggy! os-cpu")
+ for(var/A in cpu_assigned_copy)
+ var/amount = cpu_assigned_copy[AI]
+ cpu_assigned_copy[AI] = 0
+ cpu_removal[AI] += amount
+ previous_cpu -= amount
if(total_ram < previous_ram)
var/needed_amount = previous_ram - total_ram
- for(var/mob/living/silicon/AI in GLOB.ai_list)
+ for(var/A in ram_assigned_copy)
+ var/mob/living/silicon/ai/AI = A
if(ram_assigned_copy[AI] >= needed_amount)
ram_assigned_copy[AI] -= needed_amount
ram_removal[AI] += needed_amount
@@ -100,8 +109,13 @@ GLOBAL_DATUM_INIT(ai_os, /datum/ai_os, new)
previous_ram -= amount
if(total_ram >= previous_ram)
break
+ //If that somehow didn't work which it sometimes doesn't we just clear everything
if(total_ram < previous_ram)
- message_admins("This is still super buggy! os-ram")
+ for(var/A in ram_assigned_copy)
+ var/amount = ram_assigned_copy[AI]
+ ram_assigned_copy[AI] = 0
+ ram_removal[AI] += amount
+ previous_ram -= amount
for(var/A in ram_removal)
ram_assigned[A] = ram_assigned[A] - ram_removal[A]
From 846e00b7828c757c332249f0d0082a490d026e43 Mon Sep 17 00:00:00 2001
From: TheGamerdk <5618080+TheGamerdk@users.noreply.github.com>
Date: Thu, 16 Dec 2021 22:24:25 +0100
Subject: [PATCH 85/86] Update decentralized_os.dm
---
.../mob/living/silicon/ai/decentralized/decentralized_os.dm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/code/modules/mob/living/silicon/ai/decentralized/decentralized_os.dm b/code/modules/mob/living/silicon/ai/decentralized/decentralized_os.dm
index 0f2e8c10aead..8d891e03f24c 100644
--- a/code/modules/mob/living/silicon/ai/decentralized/decentralized_os.dm
+++ b/code/modules/mob/living/silicon/ai/decentralized/decentralized_os.dm
@@ -65,7 +65,7 @@ GLOBAL_DATUM_INIT(ai_os, /datum/ai_os, new)
var/list/affected_AIs = list()
-
+ log_game("allocations running")
if(total_cpu < previous_cpu)
var/needed_amount = previous_cpu - total_cpu
@@ -126,7 +126,7 @@ GLOBAL_DATUM_INIT(ai_os, /datum/ai_os, new)
affected_AIs |= A
to_chat(affected_AIs, span_warning("You have been deducted processing capabilities. Please contact your network administrator if you believe this to be an error."))
-
+ log_game("allocations ending")
/datum/ai_os/proc/add_cpu(mob/living/silicon/ai/AI, amount)
if(!AI || !amount)
From 70b65439ef91cc4ba538f6959646a2f5b7b2b149 Mon Sep 17 00:00:00 2001
From: TheGamerdk <5618080+TheGamerdk@users.noreply.github.com>
Date: Thu, 16 Dec 2021 22:25:17 +0100
Subject: [PATCH 86/86] Update decentralized_os.dm
---
.../silicon/ai/decentralized/decentralized_os.dm | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/code/modules/mob/living/silicon/ai/decentralized/decentralized_os.dm b/code/modules/mob/living/silicon/ai/decentralized/decentralized_os.dm
index 8d891e03f24c..eb7a225357a4 100644
--- a/code/modules/mob/living/silicon/ai/decentralized/decentralized_os.dm
+++ b/code/modules/mob/living/silicon/ai/decentralized/decentralized_os.dm
@@ -87,9 +87,9 @@ GLOBAL_DATUM_INIT(ai_os, /datum/ai_os, new)
//If that somehow didn't work which it sometimes doesn't we just clear everything
if(total_cpu < previous_cpu)
for(var/A in cpu_assigned_copy)
- var/amount = cpu_assigned_copy[AI]
- cpu_assigned_copy[AI] = 0
- cpu_removal[AI] += amount
+ var/amount = cpu_assigned_copy[A]
+ cpu_assigned_copy[A] = 0
+ cpu_removal[A] += amount
previous_cpu -= amount
if(total_ram < previous_ram)
@@ -112,9 +112,9 @@ GLOBAL_DATUM_INIT(ai_os, /datum/ai_os, new)
//If that somehow didn't work which it sometimes doesn't we just clear everything
if(total_ram < previous_ram)
for(var/A in ram_assigned_copy)
- var/amount = ram_assigned_copy[AI]
- ram_assigned_copy[AI] = 0
- ram_removal[AI] += amount
+ var/amount = ram_assigned_copy[A]
+ ram_assigned_copy[A] = 0
+ ram_removal[A] += amount
previous_ram -= amount
for(var/A in ram_removal)