[crossfire] Inventories in artifacts/archetypes
Nicolas Weeger
nicolas.weeger at laposte.net
Sun Apr 22 03:57:13 CDT 2007
Hello.
I just finished committed to SVN code to handle inventories in artifacts and
archetypes.
Just put an 'arch xxx', with 'end', like in maps, and it should be handled
correctly. All fields can be customized, this is a 'real' loading.
Technically, caveats:
* if you have more than 10 levels of items in items, you'll get a nice crash -
change the MAXDEPTH value in load_object :) (no check, but easy to add)
* lex_load (main object loading) now uses an array of items, to be able to
track what item is being loaded. This is required for LO_LINEMODE loading
mode.
As a side node: the existence of LO_LINEMODE is due to loader's inability
to 'put back' the stream at last character loaded when returning, from what I
see. Thus we "hack" to load line by line manually. If anyone knows a way to
force loader to put back file to last read position when 'end' is
encountered, that'd be great to simplify the code.
Nicolas
--
http://nicolas.weeger.free.fr [Petit site d'images, de textes, de code, bref
de l'aléatoire !]
More information about the crossfire
mailing list