Colony Integrator - Add "needed" field to getBuilderResources()
adkinss opened this issue ยท 3 comments
Describe your idea
When calling getBuildResources()
, it returns a list of work requests needed to fulfill the task the builder has assigned. The requests contains all the building materials needed to complete the task. Some requests may be fulfillable from stock already in the Warehouse and some may need the Player's involvement.
The information returned from getBuildResources()
contains all the information requested by the builder, except for the number of items actually needed. The information includes how much is available and how much is going to be delivered, but without knowing how many items are needed, there is no way to determine how many items need to be pulled from RS/ME or needs to be autocrafted.
Here is an example of a single item returned by getBuildResources()
:
{
delivering = 0,
status = "DONT_HAVE",
available = 0,
displayName = "Chiseled Quartz Block",
}
If I look at the Resource Scroll for that builder, I can see he needs 2 of those Chiseled Quart Blocks. If I look at the Clipboard, I can also see he needs 2 of those blocks.
I would like to see a needed
field added to each returned request. For example, the above request would have one additional field as follows:
needed = 2,
I believe this field used to be included in the returned data, but somewhere along the line disappeared. I didn't know if this was intentional or if this was a bug.
Describe alternatives you've considered if you've any
No response
Additional context
I am currently relying on getRequests()
to do the work. However, that function returns the list of requests for everyone in the colony, not just the Builders. It also only shows what has actually been requested. When a Builder is assigned a new task, it's own work requests contain all the items needed to complete the task. The Builder will only request items from the Warehouse when it is near time to use those items and it has space in its inventory (on its person or in its hut).
Linked Issues
No response
advancedperipherals-1.16.5-0.7.2r.zip
I added the needed key in this version. You can test it
Unzip the file before using