I would like to enable and code scripting access to the ai goals list to check which goals are currently queued up. Someone had already created the basic elements some time ago but made then unusable.
Now is there anyone interested and/or would like to see a specific functionality? I'm open for any suggestions.
This is what I currently have (taken from scripting.html):
ship:object
Ship handle
shiporders Shiporders = shiporders
Array of ship orders
Value: Ship orders, or invalid handle if ship handle is invalid
order
order handle
number Priority = number
Priority of the given order
Value: Order priority or 0 if invalid
boolean remove()
Removes the given order from the ship's priority queue.
Returns: True if order was successfully removed, otherwise false or nil.
enumeration getGoal()
Gets the order enumeration
Returns: Enumeration or invalid enumeration if handle is invalid.
object Target = object
Target of the order. Value may also be a derivative of the 'object' class, such as 'ship'.
Value: Target object or invalid object handle if order handle is invalid or order requires no target.
subsystem TargetSubsystem = subsystem
Target subsystem of the order.
Value: Target subsystem, or invalid subsystem handle if order handle is invalid or order requires no subsystem target.
shiporders
Ship orders
number #
Number of ship orders
Returns: Number of ship orders, or 0 if handle is invalid
order [] number Index
Array of ship orders
Returns: Order, or invalid order handle on failure
boolean isValid()
Detects whether handle is valid
Returns: true if valid, false if handle is invalid, nil if a syntax/type error occurs