This adds JSON as an additional scripting documentation output format.
This can be used by external tools to examine the scripting
documentation and generate interface declarations or documentation for
any language. The existing documentation code is left largely in place.
Adds 'On Goals Cleared' hook variable for scripting system. Previosly there was not scripting or sexp method to determine if a ship had all of it's goals cleared.
Implements the feature request from issue #610.
As an aside, this PR also patches the `ship_set_subsystem_strength` function (which is only used by the debug console and in the event you fire at your training instructor) to use the same code as the `set-subystem-strength` sexp. This properly handles submodels blown off, sounds, etc.
This can be used by the various subsystems for cleaning up Lua
references before the Lua state is destroyed. This avoids having
dangling references to the Lua state which would cause segfaults later
on.
The first subsystem to use this is the dynamic SEXP system which had
dangling references due to keeping Lua references to the SEXP functions.
This fixes#1954.
* Adds Accept Mission Outcome Event to Game Events
Adds Accept Mission Outcome Event to Game Events, so scritps and other things can be called only when a campaign mission is accepted.
* Fixed double entry
* Define CHA_CMISSIONACCEPT
Adds line to define new conditional hook, CHA_CMISSIONACCEPT
* Add flag_def_list for On Campaign Mission Accept
Adds the proper flag_def_list for "On Campaign Mission Accept" CHA_CMISSIONACCEPT
* Runs New Conditional Hook
Runs the new conditional hook for "On Campaign Mission Accept"
* Reverts event changes
* Reverts state changese
* Reverts post_event change
This maintains the type information which can be used for enforce
const-correctness and also for implementing more advanced ways of
handling the type information.
This adds empty lines to the beginning of the Lua source passed to the
interpreter so that the interpreter sees the lines in the source as they
appear in the table.
This might slow down parsing a bit since get_line_num is quite slow but
it should not be noticable in most instances since the script tables
tend to be quite short.
This fixes#1469.
Currently there are multiple locations in the code where the version is
constructed by printing the individual numbers together. This is mostly
sufficient but it hides information such as the commit hash or the build
name (e.g. RC1). These changes unify that behavior by always using the
version string generated by CMake.
This changes some functionality but it shouldn't cause too many issues
since the previous functionality was kind of a hack anyway.
This also adds a simulation conditional hook that has only been
available through global hooks before.
This adds a utility library for handling all the nasty lua referencing
stuff. It also provides functions for convienent usage of lua objects
such as tables and functions which allows to use them directly from C++
code without using the ugly Lua C-API.