bobbens/naev — pull request #157 by MetaAmbience (2014-09-05 02:31:58+00:00)
Title: Adds ability to change planet faction and presence via LUA

This is some old code that I've had in my fork for awhile, so bear with me if I don;t explain it well enough.

This code adds the ability to change planet faction and presence via the LUA console using the "unistate" class. It adds three functions:

* unistate.changeFaction(,) changes planet_name's faction to faction_name,
* unistate.changePresence(, ) changes planet_name's presence to presence_amount, and
* unistate.dump() prints a nicely formatted list of all changes to the default universe to the LUA console.

This is accomplished via adding the changes to the uni to the current game save and loading it back up to memory upon game load. This should be compatible with future unis and such. I figured this could be really useful for mission design, especially for stuff like wars.