From cedb74519dc45bf864c3d2f10fb6962d5527d9ec Mon Sep 17 00:00:00 2001 From: larentoun <31931237+larentoun@users.noreply.github.com> Date: Wed, 17 Jul 2024 21:11:04 +0300 Subject: [PATCH] Fixes Research queue runtimes (#85020) ## About The Pull Request Research Queue now checks the correct datum instead of trying to call procs on keys. This fixes automatic research for free nodes. ## Why It's Good For The Game Fixes good, runtimes bad ## Changelog :cl: fix: Free items in research queue will now correctly be researched automatically. /:cl: --- code/controllers/subsystem/research.dm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/controllers/subsystem/research.dm b/code/controllers/subsystem/research.dm index ce4082d2d44..fe8a002d9c4 100644 --- a/code/controllers/subsystem/research.dm +++ b/code/controllers/subsystem/research.dm @@ -104,10 +104,11 @@ SUBSYSTEM_DEF(research) techweb_list.last_income = world.time - if(techweb_list.research_queue_nodes.len) + if(length(techweb_list.research_queue_nodes)) techweb_list.research_node_id(techweb_list.research_queue_nodes[1]) // Attempt to research the first node in queue if possible - for(var/datum/techweb_node/node as anything in techweb_list.research_queue_nodes) + for(var/node_id in techweb_list.research_queue_nodes) + var/datum/techweb_node/node = SSresearch.techweb_node_by_id(node_id) if(node.is_free(techweb_list)) // Automatically research all free nodes in queue if any techweb_list.research_node(node)