Commit Graph
2255 Commits
Author SHA1 Message Date
Goober5000 d8012d4ff0 miscellaneous scripting and ship-destruction enhancements 2020-08-23 20:44:25 -04:00
Goober5000 b6998a3e21 make Intel stuff dynamic
1) Make Intel_info a vector instead of a fixed-size array
2) Make intel descriptions SCP_string so they can be any length
2020-08-18 14:53:01 -04:00
Goober5000 1f4ff04890 handle SEXP_NAN_FOREVER 2020-08-14 16:25:11 -04:00
Goober5000 e4cd5675d0 handle SEXP_KNOWN_* 2020-08-14 15:53:02 -04:00
Goober5000 b6b7487db1 add LuaSEXP support for soundentry (OPF_GAME_SND) 2020-08-14 01:18:34 -04:00
Goober5000 de8164aa9c add for-ship-class and for-ship-type sexps
These sexps work just like for-counter, supplying arguments for when-argument.  They will list all ships that are present in the mission and are of a certain class or type.
2020-08-13 14:15:25 -04:00
Goober5000 83d9d352ff Merge pull request #2604 from Baezon/consistent-apply-whack-args
Supply world coordinates in whack function calls
2020-08-09 15:32:41 -04:00
Goober5000 0ed13a69e7 add the ability to use multiple sexp parameter variants
This is specifically for OPF_SHIP.  Currently if you specify a LuaSEXP with OPF_SHIP, it only works for ships that are present in the mission when the SEXP is called.  This is my attempt at a LuaSEXP parameter variant that will return a valid ship name regardless of the ship status.  It required a bit of finagling the existing API.
2020-08-03 21:26:39 -04:00
Goober5000 0177ebd66f add new versions of the collision group sexps
In most cases you have one group to/from which you are adding or removing several ships, but the existing sexps are designed for one ship and many groups.  This adds new sexps designed for one group and many ships.
2020-08-01 00:15:52 -04:00
Baezon 20acea31f2 review changes 2020-07-30 15:06:36 -04:00
Goober5000 2fde6aa69c add sanity check 2020-07-29 21:27:38 -04:00
Baezon f95f48448e world coords for all whacks 2020-07-27 01:11:00 -04:00
Goober5000 8ca10d46be fix line number counting
When I rewrote `strip_comments()` to take quotes into account, I didn't correspondingly update `get_line_num()`.  This fixes that.  I discovered that a Lua file with a lot of semicolons inside quotes was erroneously getting the past-EOF warning.

Also, in the event that the warning *is* tripped, this exits the loop instead of repeatedly displaying the warning.
2020-07-23 23:46:12 -04:00
Goober5000 cd2a0437e0 Merge pull request #2573 from Goober5000/tech_db_scripting_vars
cleanup of tech room, and scripting stuff
2020-07-21 22:38:58 -04:00
Goober5000 f8f6bbc53c fix show-subtitle
For older campaigns which used show-subtitle, the eval_num conversion inadvertently changed the rgb to default to 0, instead of 255.  This restores the default to 255.
2020-07-16 15:30:52 -04:00
Goober5000 31fa2ac444 cleanup of tech room, and scripting stuff
1) Upgrade the pilot file code to correctly save flags whether entries are added *or* removed
2) Make the tech-db/tech-db-multi ship flag handling consistent
3) Add scripting support for intel entries
4) Add scripting support for adding and removing entries from the tech room
5) Minor cleanup
2020-07-15 13:27:27 -04:00
Goober5000 4bd49c2b95 address feedback 2020-07-13 15:43:47 -04:00
Goober5000 c13a3330f6 some UTF-8 improvements
1) Write all non-UTF-8 strings to JSON, either by converting or truncating
2) Add `coerce_to_utf8` function
3) Tweak `read_raw_file_text` because the function returns length on success, not 0
2020-07-13 14:33:28 -04:00
Goober5000 a5b8c7b376 add debriefing persona sexp and make a few additional tweaks 2020-07-09 12:49:38 -04:00
Goober5000 d4053ea2e9 fix <argument> in numeric nodes, and also fix more error printing 2020-07-08 14:51:52 -04:00
Goober5000 4250a4e2bb fix error variable printing 2020-07-08 13:50:12 -04:00
Goober5000 36bd7d4c61 Merge pull request #2542 from Goober5000/clear_debris_sexp
add clear-debris sexp
2020-07-06 21:10:17 -04:00
Goober5000 5480c004f5 Merge pull request #2548 from Goober5000/fix_endgame
fix the special-warpout-name sexp
2020-07-06 20:29:30 -04:00
Goober5000 d7832b4b39 fix the special-warpout-name sexp
grrr...
2020-07-06 18:42:35 -04:00
Goober5000 4e85009596 fix copy-paste mistake 2020-07-04 15:09:56 -04:00
Goober5000 9337c8a4b3 fix compilation 2020-07-03 16:09:59 -04:00
m!m 7cd9359dec Merge pull request #2519 from asarium/feature/externalSexps
Add system for adding SEXPs externally
2020-07-03 19:56:11 +02:00
Goober5000 ef1f462c3b add clear-debris sexp
Simiar to the clear-weapons sexp (renamed from remove-weapons).
2020-07-03 13:34:39 -04:00
asarium 62d6b3c834 Add system for adding SEXPs externally
This adds a "clear-debris" SEXP with a new system for declaring SEXPs
outside of sexp.cpp. This makes it easier to keep code modules self
contained since they do not need to export previously private
functionality just for having missiong being able to interface with it.

This is mostly a proof-of-concept which only supports basic parameter
types (booleans and integers).
2020-07-03 18:13:47 +02:00
Goober5000 4a21436b9a Merge pull request #2536 from Goober5000/change_background_sexp
allow switching between multiple backgrounds
2020-07-02 14:56:22 -04:00
Goober5000 595a2f884a make clang happy 2020-07-01 23:53:19 -04:00
Goober5000 c3f58c3cf5 fill in two missing error checks, and tweak a few others 2020-07-01 23:46:38 -04:00
Goober5000 7e947e522e allow switching between multiple backgrounds
For quite some time missions have had the ability to edit more than one background.  This was previously used for fallback loading in case the first background's bitmaps were not available, but I realized it would be very handy to allow switching between backgrounds for in-mission jumps.

The FRED background dialog can now add and remove backgrounds from the list.  Additionally, a new `change-background` sexp can instantly switch between backgrounds without messing around with bitmap references.
2020-07-01 23:32:12 -04:00
Goober5000 a8d0123d63 Merge pull request #2522 from CasparKielwein/ck/cleanup_sexp.cpp
small cleanup in  sexp.cpp
2020-06-30 13:33:07 -04:00
Goober5000 ec7bac99b5 handle vanished ships for sexps that check exited_index
When ships vanish, they are in the EXITED state but their `exited_index` is -1 *and* their `shipp` pointer is null.  So check for this.
2020-06-29 22:43:32 -04:00
CasparKielwein a8398629d7 in Sexp add to uncalled functions to list of multi_sexp_* calls.
Fix: Call multi_sexp_reset_time_compression instead of non-multi version
2020-06-29 21:58:45 +02:00
CasparKielwein cbb3fda960 in sexp.cpp use make indentation consistent using tabs 2020-06-29 21:58:45 +02:00
CasparKielwein cb5a406204 In sexp.cpp a bit of trivial cleanup as requested by clang-tidy. 2020-06-29 21:58:45 +02:00
CasparKielwein ad0b0ba07a In sexp.cpp remove a few unused functions and variable declarations.
Only code was removed where no reference in the whole project could be found.
Redundant declarations are already imported through inludes.
2020-06-29 21:58:45 +02:00
CasparKielwein 4f384d56ef in sexp.cpp replace NULL with nulltpr 2020-06-27 20:58:24 +02:00
Goober5000 7bb5a1d0fc fix CI complaints 2020-06-26 16:04:12 -04:00
Goober5000 51864a08ae reorder functions 2020-06-26 14:47:40 -04:00
Goober5000 5bc1d9da30 constify_ctext 2020-06-26 14:47:39 -04:00
Goober5000 39858fdfe0 giant refactor of sexps to use caching for ships and wings 2020-06-26 12:59:31 -04:00
Goober5000 a9122b7e93 Merge pull request #2511 from Goober5000/upgrade_misc_sexps_5
upgrade yet more miscellaneous sexps
2020-06-25 11:17:40 -04:00
Goober5000 233c86b0d4 Merge pull request #2506 from Goober5000/subsys_rotation
upgrade sexps affecting rotating submodels
2020-06-25 11:17:20 -04:00
Goober5000 0099e0a1c9 Merge pull request #2504 from Goober5000/upgrade_misc_sexps
upgrade misc sexps
2020-06-24 18:23:03 -04:00
Goober5000 6001065901 smol tweak 2020-06-24 14:06:56 -04:00
Goober5000 6d2e653dd1 upgrade yet more miscellaneous sexps 2020-06-24 14:05:27 -04:00
Goober5000 137090fd81 Merge pull request #2510 from Goober5000/upgrade_misc_sexps_4
upgrade some more miscellaneous sexps
2020-06-24 13:53:33 -04:00