[aquaria] [PATCH] Backward compatibility for scripts
Andrew Church
achurch+aquaria at achurch.org
Wed May 4 00:18:26 EDT 2011
Sorry, that patch was bzip2-compressed -- forgot to change the filename.
--Andrew Church
achurch at achurch.org
http://achurch.org/
>I really, really wish I had thought of this _before_ the big merge, but
>I guess I'm too stupid. :P This changeset fixes up the script interface
>so that scripts can be written to run under both the commercial version
>of Aquaria and the modified open-source engine. The patch decompresses
>to around 500k, but the vast majority of that is just changing the
>boilerplate code in all the game and mod scripts.
>
>Among other things, this gets rid of the getVars() function I told
>everybody to start using, so any scripts that call getVars() will stop
>working as of this changeset. Since it's 100% my fault for not thinking
>far enough ahead, I'm willing to update scripts for mods so that they
>conform to this interface and will run under both commercial Aquaria
>versions and the new icculus build. If you're developing a mod and you
>want me to fix up the scripts, send me a zip containing the script files
>(privately, of course) and I'll fix them up and mail them back ASAP.
>
> --Andrew Church
> achurch at achurch.org
> http://achurch.org/
>
>(Commit log follows:)
>
>Improve backward compatibility for scripts.
>
>This changeset updates the single-Lua-state script interface to allow
>scripts to be written in a manner compatible with the original Aquaria
>engine. In particular:
>
>- The "v = getVars()" boilerplate line at the top of each script has
> been changed to read "if not v then v = {} end".
>
>- The getVars() script function, added as part of the single Lua state
> implementation, has been removed as it no longer serves any purpose.
>
>- Scripts which previously included the "entityinclude.lua" file (which
> was removed as part of the change to a single Lua state) have been
> modified to once more include that file, but only when running under
> an earlier version of the Aquaria engine. The entityinclude.lua file
> itself has also been restored from the _unused subdirectory for use
> by earlier versions of Aquaria.
>
>All scripts have been updated accordingly; as of this changeset, the
>scripts should work with a vanilla (pre-open-source) Aquaria build.
More information about the aquaria
mailing list