CanProduceForWorkshop - ObjectReference
Revision as of 15:15, 2 December 2015 by imported>Plplecuyer
Member of: ObjectReference Script
Indicates whether or not the reference can currently produce resources for its Workshop.
Syntax
bool Function CanProduceForWorkshop() native
Return Value
True if the reference can produce resources, false if not.
Examples
; Can MyMutFruit currently produce resources?
bool bcanProduce = MyMutFruit.CanProduceForWorkshop()
Notes
CanProduceForWorkshop is true by default. The following will cause a reference to NOT be able to produce:
- An object requires power (has the WorkshopCanBePowered keyword), but is not powered.
- An object is destroyed.
- An object requires an actor (has the WorkshopWorkObject keyword), but has no actor assigned (meaning it is not owned by an actor), OR the assigned actor is wounded (actor value WorkshopActorWounded > 0) or dead.
This is only valid if the workshop is currently loaded. Calling this on unloaded objects or an unloaded workshop will produce invalid results.