On Fri, Nov 26, 2010 at 6:23 AM, Tom Lippincott <thomas.lippinc...@cl.cam.ac.uk> wrote: > Again, my personal experience is with Python, but assuming it works as > smoothly for Lua, there is no need for touching the C++ code in a > significant way, and the glue is automatic. As for things that could be > exposed, I'm interested in this from a user-script perspective: there > are lots of things that aren't directly accessible from Lua, despite > being legitimate player-knowledge. For example, I should be able to get > the list of my current enchantments, which ones are expiring, etc, > without looking for a relevant warning message. This is also related to > the documentation issue: a clean approach to documenting the scripting > interface (e.g. generate API docs and put them on the wiki) would be far > better than going back and forth between the examples and source files!
Part of the issue here is that you can't just automatically expose player.duration without modification. The current situation with enchantments is that you know enchantments you have, and you know which ones are timing out, but you do not know the exact durations (and indeed, in a lot of instances, durations are slightly randomised). Therefore, you'd have to convert the information into 1) has/hasn't an enchantment, 2) enchant is/isn't expiring, and not give access to the actual duration information. This is possibly what you're talking about and I just totally misunderstood. However, for the already exposed functions and l_x.cc code aimed towards clue (and indeed, towards dlua), I think it would be great if we could convert these to SWIG and then use them to generation documentation, as the documentation is absolutely horrible. The only reason I know anything about them is constant trial and error, examples, and hand-holding from other developers. -Jude ------------------------------------------------------------------------------ Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev _______________________________________________ Crawl-ref-discuss mailing list Crawl-ref-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/crawl-ref-discuss