blahpers Posted June 3, 2015 Share Posted June 3, 2015 Greetings, The short of it: Anybody know offhand of a good Lua implementation of a heap or priority queue suitable for use in a DST script? (Bonus points if there's already one available in the code.) I'm feeling too lazy to write one from scratch but am having trouble finding one that isn't buggy or under some license or other. Don't dig too deep for this; I just want to avoid re-re-re-re-reinventing the wheel if possible. Thanks! Link to comment Share on other sites More sharing options...
rezecib Posted June 4, 2015 Share Posted June 4, 2015 @blahpers, A few results down on a google search for "Lua priority queue". Looks decent. I wouldn't call implementing a simple data structure like this reinventing the wheel, though. There are a few queue-like things in the code, but they're pretty embedded in their particular applications. I didn't see anything obviously usable. Link to comment Share on other sites More sharing options...
DarkXero Posted June 4, 2015 Share Posted June 4, 2015 @blahpers, yeah, what @rezecib said.http://forums.kleientertainment.com/topic/33373-question-cant-require-priority-queue/ You make your own, or you use a library/example from outside. Don't Starve's lua is basic. The closest thing to a priority queue you can use is a brain though. Link to comment Share on other sites More sharing options...
blahpers Posted June 4, 2015 Author Share Posted June 4, 2015 Alright, I'll stop being lazy then. Thanks! : D Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now