mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-21 20:11:04 +01:00
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 <evilexecutive@gmail.com>
This commit is contained in:
co-authored by
sentry[bot] <39604003+sentry[bot]@users.noreply.github.com>
VMSolidus
parent
b07b1a5c85
commit
d82b463aca
@@ -716,9 +716,9 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
dat += "<li><h3>[last_category]</h3>"
|
||||
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))
|
||||
|
||||
Reference in New Issue
Block a user