Skip to content

[1.21.1-0.8.1a] Colony Integrator getWorkOrderResources(), 'needed' property returns a nil value #851

Description

@ToastyJacks

Describe

When using the Colony Integrator the 'needed' property when called from getWorkOrderResources returns a value of 'nil' instead of the expected value. All of the other properties seem to report back the correct values as expected.

local colony = peripheral.find("colony_integrator")

local work = colony.getWorkOrders()

for i, val in pairs(work) do
    textutils.pagedPrint("--------------------------")
    textutils.pagedPrint(val.displayName.." Level: "..val.level.." to "..val.targetLevel)
    textutils.pagedPrint(val.isClaimed)
    local idstr = val.id
    local id = tonumber(idstr)
    local orders = colony.getWorkOrderResources(id)
    for i, val2 in pairs(orders) do
        textutils.pagedPrint(val2.displayName)
        textutils.pagedPrint(val2.status)
        textutils.pagedPrint(val2.available.."/"..tostring(val2.needed))
        textutils.pagedPrint(val2.delivering)   
    end
end
Image Image

Steps to reproduce

  1. Obtain Advanced Colony Pocket Computer.
  2. Use the code above to print the 'needed' value from getWorkOrderResources (or write your own).
  3. Ensure a build job is currently underway in the colony.
  4. Run code and the 'needed' property will return as 'nil' instead of the expected value.

Multiplayer?

Yes

Version

1.21.1-0.8.1a (Latest 1.21.1)

Minecraft, Forge and maybe other related mods versions

NeoForge 21.1.249 Minecraft 1.21.1

Screenshots or Videos

No response

Crashlog/log

No response

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds reviewNeeds review from an Contributor

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions