mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-06 06:52:39 +00:00
Research queue (#84731)
## About The Pull Request <img alt="2dZbpr8MK1" src="https://github.com/tgstation/tgstation/assets/3625094/dd78feba-224a-41a1-8d4a-83af3a8b68df"> Added an ability to queue up to one node per player in a techweb for an automatic research. You can queue up a node only when all requirements are met, but there are not enough points. People can't research when there is something in the queue, only add things to the queue. So a 40 points node can't be researched if someone queued up a 200 points node ahead of it. When a node is enqueued by RD, it is placed in front of the queue. The research button is available when the queue is empty. TODO: - [x] Bypass queue when the node cost is zero ## Why It's Good For The Game No need to stay at the console to wait for the points. No "Research" button spamming. ## Changelog 🆑 qol: Research nodes can be queued, one per player. RDs can place their node at the beginning of the queue. /🆑
This commit is contained in:
@@ -36,7 +36,7 @@ SUBSYSTEM_DEF(research)
|
||||
var/list/techweb_nodes_experimental = list()
|
||||
///path = list(point type = value)
|
||||
var/list/techweb_point_items = list(
|
||||
/obj/item/assembly/signaler/anomaly = list(TECHWEB_POINT_TYPE_GENERIC = 10000)
|
||||
/obj/item/assembly/signaler/anomaly = list(TECHWEB_POINT_TYPE_GENERIC = TECHWEB_TIER_5_POINTS)
|
||||
)
|
||||
var/list/errored_datums = list()
|
||||
///Associated list of all point types that techwebs will have and their respective 'abbreviated' name.
|
||||
@@ -102,6 +102,13 @@ SUBSYSTEM_DEF(research)
|
||||
|
||||
techweb_list.last_income = world.time
|
||||
|
||||
if(techweb_list.research_queue_nodes.len)
|
||||
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)
|
||||
if(node.is_free(techweb_list)) // Automatically research all free nodes in queue if any
|
||||
techweb_list.research_node(node)
|
||||
|
||||
/datum/controller/subsystem/research/proc/autosort_categories()
|
||||
for(var/i in techweb_nodes)
|
||||
var/datum/techweb_node/I = techweb_nodes[i]
|
||||
|
||||
Reference in New Issue
Block a user