mjn-mixael
2bdf6c21f2
i pity the bool
2023-02-15 16:44:41 -06:00
mjn-mixael
8063fc3863
Unlimited Power
2023-02-15 16:34:15 -06:00
mjn-mixael
4924f56613
lua method to check if the game has focus
2023-02-15 10:01:59 -06:00
BMagnu
8731ad1448
Add option to deprecate hooks ( #5184 )
...
* Add hook deprecation to calls
* Deprecate hooks properly
* Change OnSplashScreen hook callig
* Check for deprecated hooks at script time
* include hooks directly
* Check deprecation for lua added hooks
* Write deprecation notice to docs
* rescope Target_version
* fix typo
2023-02-15 17:12:25 +09:00
Goober5000
fe4d93393b
Merge pull request #5122 from Goober5000/parse_object_colgroup
...
make collision_group_id accessible to parse objects
2023-02-14 18:45:06 -05:00
MjnMixael
f29c48965e
fictionviewer localization ( #5012 )
...
* fictionviewer localization
* Move this to it's own method
* C_str
2023-02-14 17:26:36 +09:00
Goober5000
6f7f9c2f48
Merge pull request #5120 from MjnMixael/scpui_pause_screen
...
funcs and virtvars for SCPUI pause screen
2023-02-13 21:45:12 -05:00
Goober5000
d398ce25fb
Merge pull request #5117 from MjnMixael/pause_weapon_sounds
...
Expose pausing weapon sounds
2023-02-13 21:39:39 -05:00
MjnMixael
58e7d50b1c
Add to description
2023-02-11 16:19:24 -06:00
mjn-mixael
041a390660
no team, dummy
2023-02-11 14:26:39 -06:00
mjn-mixael
de1215f64e
unused
2023-02-10 21:40:10 -06:00
mjn-mixael
d101227721
lua method to free all loaded models
2023-02-10 20:57:23 -06:00
mjn-mixael
13b7f626a9
appease etp
2023-02-10 09:30:38 -06:00
wookieejedi
9403f17fbb
Adds safety checks to scripting orders with waypoints ( #5173 )
...
* Adds safety checks to scripting orders with waypoints
Turns out setting a waypoint order then trying to get to target of that order in the same frame triggers a crash in the scripting API for ship orders (`order.cpp` line 295). This was due to invalid lookups which lacked safety checks.
This PR adds those safety checks. Now, if this situation is encountered, it leaves `objnum` at -1 and thus returns an object for which `isValid` is false.
Fix is tested and works as expected. Also fixes #5172
* appease clang
* cleanup thanks to Goober
* clang again
* forgot to re-add the nullptr
* remove redundant checks
2023-02-07 15:57:39 -05:00
mjn-mixael
289266d959
get audiostream duration in milliseconds
2023-02-07 13:18:53 -06:00
mjn-mixael
c5ea47fd05
clear credits before rebuilding
2023-02-04 01:26:04 -06:00
mjn-mixael
4a8991703f
missed comma
2023-02-01 12:17:58 -06:00
mjn-mixael
34232bd5d8
const char instead of SCP_string
2023-02-01 12:03:44 -06:00
mjn-mixael
7eca7febcb
expose setting discord presence
2023-02-01 11:52:41 -06:00
mjn-mixael
0ad91aaf3d
prevent line splitting if building credits for SCPUI
2023-01-31 16:19:40 -06:00
mjn-mixael
a568f514a3
add virtvars for goal satisfaction and score
2023-01-30 13:59:31 -06:00
Asteroth
3047a226a3
Better account for runtime gravity changes ( #5130 )
...
* better account for changing gravity
* use `obj_used_list`
* check should_be_dead
2023-01-22 14:40:13 -05:00
Goober5000
df8268368a
make collision_group_id accessible to parse objects
...
Add collision groups to parse objects so they can be set before arrival via script.
2023-01-21 18:10:51 -05:00
mjn-mixael
6b097be0a6
use me daddy
2023-01-16 14:15:56 -06:00
mjn-mixael
9980c3f5c5
funcs and virtvars for SCPUI pause screen
2023-01-16 14:02:01 -06:00
mjn-mixael
bd1a288cd9
expose pausing weapon sounds
2023-01-15 21:02:50 -06:00
mjn-mixael
2881482182
fix rendering of jump nodes
2023-01-07 11:11:02 -06:00
mjn-mixael
c6a1639a82
scpui methods required for handling closeup briefing icon stuff
2023-01-07 01:48:39 -06:00
Goober5000
a7b46dba58
Merge pull request #5060 from MjnMixael/fix_mainhall_anims
...
SCPUI needs to be able run game_close_level
2023-01-03 21:23:38 -05:00
mjn-mixael
1f7cdca5a9
optional
2023-01-03 19:56:56 -06:00
Goober5000
9ce7748c20
Merge pull request #5039 from Goober5000/object_iteration_fixes
...
more robust object iteration
2023-01-03 19:03:22 -05:00
mjn-mixael
c74d523e18
third attempt at getting past that one guy
2023-01-03 14:52:55 -06:00
Goober5000
85bb14898f
Merge pull request #5040 from Goober5000/ship_obj_list_iteration
...
add should-be-dead checks for all ship iterations
2022-12-26 22:28:00 -05:00
MjnMixael
a3bbf13da6
prevent access to goals outside the vector ( #5044 )
...
prevent access to goals outside the vector
2022-12-24 21:12:56 -05:00
JohnAFernandez
10d3bdda06
Merge pull request #5041 from MjnMixael/consolidate_tech_rendering
...
consolidation of tech rendering methods
2022-12-24 11:59:12 -05:00
Goober5000
46293ad0fe
add should-be-dead checks for all ship iterations
...
When iterating through `Ship_obj_list`, check the `Should_be_dead` flag before using the object. This fixes #4990 and adds defense-in-depth checks to guard against similar errors elsewhere.
I considered moving the `Ship_obj_list` removal from `obj_delete` to `ship_cleanup`, but decided it would be prudent to avoid fundamental changes to lifecycle management.
2022-12-23 00:51:31 -05:00
mjn-mixael
a662f8168c
consolidation of tech rendering methods
2022-12-21 20:45:40 -06:00
Goober5000
c2b93549a2
more robust object iteration
...
When iterating through various object collections, check for the should-be-dead flag to avoid returning objects that are on the verge of being deleted.
Separately, this adds the `isExpiring` function to check for should-be-dead objects.
This PR also makes object iteration consistent across all object types, both to reduce code duplication and to ensure that the length and iteration are done using the same algorithm. Furthermore, if the number of should-be-dead objects is nonzero, the Lua array count for that frame will be different from the internal array count for that frame.
Fixes #5034 .
2022-12-21 19:51:02 -05:00
mjn-mixael
3b3a45d2d8
fix documentation
2022-12-20 16:07:52 -06:00
mjn-mixael
9f1c00c581
allow scripts to read LuaEnums and add LuaEnums
2022-12-20 15:53:40 -06:00
Asteroth
0fb6b2ae0d
Update 22.4 version references to 23.0 ( #5025 )
...
* update references to 22.4 to 23.0
* fix a few more version references
2022-12-21 00:16:51 +09:00
Taylor Richards
c9291e3f1c
address issues related to cf.openFile() error handling ( #5030 )
...
- fix crash bug when path only contains dir separators
- fix error handling when no path is specified in write mode
- clarify function documentation
Fixes #5028
2022-12-20 01:27:51 -05:00
Goober5000
00f0cc4847
Merge pull request #5027 from Goober5000/comm_menu_open
...
add hu.isCommMenuOpen
2022-12-19 20:33:04 -05:00
Goober5000
e3fc5f8bc1
add hu.isCommMenuOpen
...
A script function to tell if the comms menu is open
2022-12-16 22:20:52 -05:00
mjn-mixael
84962ff33c
Remove model instances after rendering
2022-12-16 09:39:11 -06:00
mjn-mixael
3136e0debf
Use a model instance to prevent rendering destroyed subobjects
2022-12-16 09:31:19 -06:00
Goober5000
c3477e88a7
beam teams
...
Add a Team virtvar to beam objects in Lua.
2022-12-15 15:44:54 -05:00
BMagnu
af1f0eaeca
Rework Script Conditions ( #4960 )
...
* add skeleton for hook condition API
* Begin Scripting Hook refactor
* Program Hook Conditions for current new-style hooks
* Replace more hooks
* Fully transition global hooks
* Convert legacy hooks pt. 1
* Convert legacy hooks pt. 2
* Convert legacy hooks pt. 3
* Post-conversion cleanup
* restore parsing
* Add Documentation and fix parsing
* Fixup engine ingame hook adding
* Fixup engine ingame hook adding again
* Fix warnings
* Fix GCC unqualified template base lookup
* unqualified lookup v2
* Virtual Destrcutors
* Fix Clang
* Fix ship objp hook condition shadow
* Remove global hook include in ship.h
* Incorporate Feedback
* Incorporate Feedback 2
* Add revision to inline version specififer
2022-12-14 03:51:27 +09:00
MageKing17
7fde659b42
Add missing locale argument to std::isdigit() calls.
...
Much like a previous instance (fixed in #3281 , although the function in question was later removed), `std::isdigit()` without a locale argument prevents MSVC 2017 from compiling FSO.
2022-12-11 20:11:42 -08:00
Goober5000
4b172c0ca9
Merge pull request #4965 from Goober5000/sexp_category_bump
...
SEXP operators, categories, and subcategories refactoring
2022-12-10 15:18:53 -05:00