Commit Graph
12697 Commits
Author SHA1 Message Date
Fabian Woltermann c19cfccdfa Remove more unused variables 2020-06-11 16:30:41 +02:00
Fabian Woltermann 531cb27254 Make weapon firing more elegant 2020-06-11 16:20:56 +02:00
Fabian Woltermann 69c511497d Remove unused variable 2020-06-11 14:47:34 +02:00
Fabian Woltermann 0c5040e6e1 Avoid int comparison warnings 2020-06-11 14:39:57 +02:00
Fabian Woltermann 779b45417c Use the correct import path 2020-06-11 14:28:55 +02:00
Fabian Woltermann 9f30736a1a Put the action window submenus into separate windows to avoid overlapping menu items. 2020-06-11 13:41:20 +02:00
Fabian Woltermann 1904979006 Get the external weapons display function back
Add action to switch loadouts
Add action to fire weapons
2020-06-11 11:18:08 +02:00
Goober5000 f962804b30 fix compact_multitext_string
This is a follow-up to PR #2373.  Tomimaki noticed that the first character was truncated in the cutscene description, and it turned out that the algorithm was slightly wrong.
2020-06-09 19:11:34 -04:00
Fabian Woltermann 84ee31f12a Merge pull request #2441 from EatThePath/min-angles
Settable minimum spawn angles.
2020-06-08 19:52:57 +02:00
Goober5000 92ffff7fac match strings.tbl 2020-06-08 00:18:58 -04:00
m!m 25d16c3102 Merge pull request #2446 from asarium/feature/scriptingArgParsing
Add parser for scripting argument documentation
2020-06-07 12:06:28 +02:00
m!m c3ac0a3461 Merge pull request #2421 from asarium/feature/luaExecutors
Add feature to execute Lua coroutines at specific points
2020-06-07 12:04:44 +02:00
Goober5000 fa4743a341 Merge pull request #2438 from Goober5000/get_player_from_ship_node
upgrade get_player_from_ship_node
2020-06-06 23:31:33 -04:00
asarium d54d7d41e6 Output parameter information to JSON
Also fixes the parameter strings which currently could not be parsed by
the argument parser.
2020-06-06 23:45:36 +02:00
asarium 614a636ed5 Fix clang-tidy issues
Not sure why travis saw these since I didn't change anything there but
fixing these is also good.
2020-06-06 23:24:08 +02:00
wookieejedi 812452c492 Merge pull request #2447 from The-E/fix/lab_issues
Fix a lab issue and add more explosions
2020-06-06 16:32:03 -04:00
asarium 016c07dc3a Add feature to execute Lua coroutines at specific points
This adds a mechanism for running generic operations at specific points
of the frame execution. This can be used by any part of the code an not
just Lua since it simply executes std::functions. It also adds an
"execution context" concept that specifies in which situation an
operation should be executed.

This is then used by the Lua Coroutines code for resuming coroutines at
specific points instead of always when the awaited promise resolves.
2020-06-06 21:29:48 +02:00
David Gibson 536e97592d minor style fixes 2020-06-06 13:17:12 -05:00
Goober5000 716cd15281 address feedback 2020-06-06 13:55:00 -04:00
Goober5000 56f3ffae11 convert to p_objp to be consistent 2020-06-06 13:55:00 -04:00
Goober5000 6d53697725 upgrade get_player_from_ship_node
This PR upgrades the function, and the sexps that use it, to take advantage of the new sexp caching.  It also makes `script_eval_multi` more robust in the face of players who might be respawning.
2020-06-06 13:54:59 -04:00
Goober5000 1b11d0d6a9 Merge pull request #2437 from Goober5000/oswpt_and_ship_flag_refactor
another stage of the sexp refactor
2020-06-06 13:53:42 -04:00
Fabian Woltermann 3ee7200ccd Make Travis happy, maybe? 2020-06-06 17:31:46 +02:00
David Gibson 025cf3c7b9 converted some NULL pointers to nullptr as travis commands 2020-06-06 10:11:46 -05:00
Fabian Woltermann c7d08eead3 Add an action to destroy individual subsystems 2020-06-06 15:00:49 +02:00
asarium 367564733e Add parser for scripting argument documentation
This adds a simple parser that takes the existing argument
documentations and parses them so that better documentation can be
generated from that information. This should be sufficient for providing
proper documentation generation for the most common and simple cases of
argument lists (type, name, possible default value, and optional
groups).
2020-06-06 14:02:33 +02:00
asarium 04174e00f8 Ensure Lua functions are executed in correct state
This will ensure that Lua functions will always be executed in the
correct Lua state. Since we now have multiple threads (which are
different lua_State objects) it is possible that the current code could
execute a Lua function in the main state instead of the thread that is
currently executing. This can lead to weird behavior and probably also
to issues inside Lua.
2020-06-06 14:00:23 +02:00
m!m 9e11710369 Merge pull request #2444 from asarium/feature/luaTracing
Add scripting API for tracing custom code
2020-06-06 13:54:11 +02:00
David Gibson b7aeb763f3 fixed my misunderstanding of the const changes in static_rand_cone 2020-06-05 21:38:06 -05:00
David Gibson 9ec63f0882 fixed inconsistent constness in the new overload for static_rand_cone, and added constness to the existing version. 2020-06-05 21:38:06 -05:00
David Gibson 64f61df93f added multiplayer versionof min angle spawn logic 2020-06-05 21:38:06 -05:00
David Gibson a20096abfa added min-angle supporting version of static_rand_cone 2020-06-05 21:38:06 -05:00
David Gibson bb76e2fdcd Implemented minimum angle option for spawned weapons, single player only currently. 2020-06-05 21:38:06 -05:00
Goober5000 13acf77f5a address feedback 2020-06-05 21:34:50 -04:00
Goober5000 5536fbf13b Merge pull request #2443 from Goober5000/refine_exited_state
refine ShipStatus::EXITED state
2020-06-05 20:36:29 -04:00
asarium e8e549ff08 Add scripting API for tracing custom code
This can be used by Lua code to trace the runtime of their code in the
same way the engine already is capable of doing for most in-mission and
mission loading code.

Also adds some tracing scopes to the libRocket code
2020-06-05 22:14:55 +02:00
Goober5000 d0f1519f60 refine ShipStatus::EXITED state
There is a slight discontinuity where ships that are destroyed have their mission log entries added a bit before `ship_cleanup` is called.  This addresses that.
2020-06-05 14:20:35 -04:00
Fabian Woltermann 67d048aa6c further improvements 2020-06-05 16:26:57 +02:00
wookieejedi 59073533a8 Fix minor missetting of script function for displaying armor string
Previosuly, using the script function ArmorClass did not properly display the actual armor class, instead it always displayed -1. This PR fixes that. I have tested these changes and they now proprely display the armor class.
2020-06-04 18:06:03 -04:00
Goober5000 f7b43e5fd0 convert to p_objp to be consistent 2020-06-04 13:06:06 -04:00
m!m 2e8fc3264d Merge pull request #2430 from asarium/feature/libRocketCampaign
Make the campaign room API available to scripting
2020-06-04 16:55:27 +02:00
Goober5000 77d26970ff and another one 2020-06-04 01:58:35 -04:00
Goober5000 57d2cb2871 deal with clang 2020-06-04 01:28:21 -04:00
Goober5000 a5be6ed2ea another stage of the sexp refactor
This PR uses `eval_ship` and `eval_wing` to optimize `object_ship_wing_point_team` and `sexp_deal_with_ship_flags`.  The API changed a bit, but to ensure compatibility, there are fields and functions to support the old behavior.  These are temporary and will be removed when all changes have been merged via PRs.
2020-06-04 00:44:32 -04:00
wookieejedi b2489eff7d add comments 2020-06-04 00:31:10 -04:00
wookieejedi e850f043f7 Fix Pilot and Subsytem Weapon Loading
This PR fixes the logic for setting weapon amounts for both the pilot and subsystems of a ship. Previoisly in #PR 2318 this distinction was not checked, so this PR properly adds that check and distinction.
2020-06-03 23:35:27 -04:00
asarium bf521f1c6b Make the campaign room API available to scripting
This makes the necessary campaign room API available to the scripting
API so that it can be implemented using libRocket. Also adds an
engine.sleep function which I needed for making my Lua debugger work
reliably.
2020-06-03 17:49:15 +02:00
Fabian Woltermann ee3da1cb55 Merge pull request #2435 from Goober5000/constify_autopilot
add const-correctness to the autopilot API
2020-06-03 10:40:31 +02:00
Goober5000 70ee8461ab add const-correctness to the autopilot API
This was suggested by the sexp overhaul but is useful on its own too.  Some of the `const` changes cascade a bit.
2020-06-02 23:06:48 -04:00
Tyler Blount 4b49f49206 Merge pull request #2434 from TRBlount/fix/thruster_depth
Temporary fix for thrusters rendering through ship geometry
2020-06-02 15:28:17 -06:00