From d82b463acaebc11f13910ee1c01abfbb77afbf44 Mon Sep 17 00:00:00 2001 From: "sentry[bot]" <39604003+sentry[bot]@users.noreply.github.com> Date: Mon, 1 Jun 2026 10:32:55 +0000 Subject: [PATCH] Fix rdconsole Protolathe menu null.mat_efficiency (#22555) * Please describe the intent of your changes in a clear fashion. This PR fixes a runtime error (`Cannot read null.mat_efficiency`) occurring in the R&D console's Protolathe menu (`/obj/structure/machinery/computer/rdconsole/attack_hand`). The root cause was a copy-paste error in `code/modules/research/rdconsole.dm`. Specifically, lines 719 and 721 within the `if(3.1)` block (Protolathe menu rendering) were incorrectly referencing `linked_imprinter.mat_efficiency` instead of `linked_lathe.mat_efficiency`. When a robotics R&D console was linked to a protolathe but not a circuit imprinter, `linked_imprinter` would be null, causing the error when attempting to display material costs for designs. The fix replaces `linked_imprinter.mat_efficiency` with `linked_lathe.mat_efficiency` at these two lines, ensuring the Protolathe menu correctly uses the linked protolathe's material efficiency. * Please make sure that, in the case of mapping changes, you include images of these changes in the PR's description. * Please make sure to mark your PR as wip or review required by making a comment with !wip or !review required * If you include sprites/sounds/... (assets) that you have not created yourself specify the license and original author below. * Ensure that you also credit them in the appropriate location / changelog as specified in the contributor guidelines ### Asset Licenses The following assets that **have not** been created by myself are included in this PR: | Path | Original Author | License | | --- | --- | --- | | icons/example.dmi | ExamplePerson (Example Station) | CC0 | Fixes SERVER-PROD-39 --------- Co-authored-by: sentry[bot] <39604003+sentry[bot]@users.noreply.github.com> Co-authored-by: VMSolidus --- code/modules/research/rdconsole.dm | 4 ++-- html/changelogs/hellfirejag-protolathe-fixes.yml | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 html/changelogs/hellfirejag-protolathe-fixes.yml diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index b07a7d4dc5b..6c872ca91ac 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -716,9 +716,9 @@ won't update every console in existence) but it's more of a hassle to do. Also, dat += "
  • [last_category]

    " var/temp_dat for(var/M in D.materials) - temp_dat += ", [D.materials[M]*linked_imprinter.mat_efficiency] [CallMaterialName(M)]" + temp_dat += ", [D.materials[M]*linked_lathe.mat_efficiency] [CallMaterialName(M)]" for(var/T in D.chemicals) - temp_dat += ", [D.chemicals[T]*linked_imprinter.mat_efficiency] [CallReagentName(T)]" + temp_dat += ", [D.chemicals[T]*linked_lathe.mat_efficiency] [CallReagentName(T)]" if(temp_dat) temp_dat = " \[[copytext(temp_dat, 3)]\]" if(linked_lathe.canBuild(D)) diff --git a/html/changelogs/hellfirejag-protolathe-fixes.yml b/html/changelogs/hellfirejag-protolathe-fixes.yml new file mode 100644 index 00000000000..8b0fe0bdb6b --- /dev/null +++ b/html/changelogs/hellfirejag-protolathe-fixes.yml @@ -0,0 +1,4 @@ +author: Hellfirejag +delete-after: True +changes: + - bugfix: "Fixed a runtime error caused by robotics consoles using a protolathe when no circuit imprinter is connected."