Detecting goals from within a script

Winterbay

Active member
Is there any way of detecting what is currently set as a goal from within a script without iterating over every item in the game and using "is_goal()" on them?

If not would a "string get_goals()" that returns a string of the current goals as shown on the adventure tab, or something similar, be a worthy feature request?
 

Bale

Minion
No and yes. I think that zarqon already made that feature request so if you cannot find it, then I guess that was on the old bug tracker.
 

zarqon

Well-known member
I think the feature request was not discarded, but neither was it implemented because no one could convince Jason of a good format for the function's return value, given wildcards and non-items like meat and stats (and now insults and flyerML).

I would love an int[string] current_goals() myself -- the key could contain "meat"/"muscle"/item name/etc, and the number would be the number additionally needed. Wildcards could simply be expanded, so if someone set a goal of "+1 any shovel" the return value would contain 1 of every shovel. In use, I don't see that causing a problem -- I can't think of an excusable situation where a script would want to use count(goals), and then not check it again after goals were met.

If my feature request no longer exists due to being in the old tracker, I vote in favor of making a new one. But maybe wait till after Crimbo -- our devs are working hard!
 
Top