Instructions/Get Resource Num

From Desynced Wiki


Get Resource Num
     
     Gets the amount of resource
Lua ID get_resource_num
Category Math
Icon Notify.png
Argument One: Type Input
Argument One: Name Resource
Argument One: Description Resource Node to check
Argument One: Data Type entity
Argument Two: Type Output
Argument Two: Name Result



Description[edit | edit source]

Gets the resource quantity of an ore node.

Uses[edit | edit source]

Used for obtaining the remaining quantity of a resource entity. This is valuable in scenarios where prioritization based on numerical quantity is desired or you have a regenerating resource and wish to build in a system to evaluate if a node is depleted below a threshold.Returns a Value of Type:Resource, which can be further refined into an item with Resource Type.

Similar Instructions[edit | edit source]

Resource Type