Goober5000
d217873281
update flags with enums
2021-06-09 10:44:40 -04:00
Asteroth
4328b66a28
fix offset initialization ( #3468 )
2021-06-09 01:38:09 -04:00
Goober5000
373a8b940a
add scripting functions to assign and remove sounds on objects
2021-06-05 20:03:35 -04:00
Joshua Glatt
df1c518c3b
Validate user-provided values passed to Random::next() ( #3464 )
...
* Validate user-provided values passed to Random::next()
* return low value on invalid range
* call LuaError() instead of Warning() in rand32() script function
2021-06-02 12:52:30 -04:00
BMagnu
6c2ebab01c
Fix erroneous line break generation for non-ASCII string and high resolutions ( #3439 )
...
* Added a byte limit for line length in split function
* Fix call error
* Ádd missing limits import
* Change hardcoded values into defines
* Cleanup default argument
2021-05-24 17:38:58 -04:00
Goober5000
2e272cce2d
Merge pull request #3360 from EatThePath/stricmp-begone
...
Remove string comparisons and switch to vector in script conditions
2021-05-10 19:58:20 -04:00
Joshua Glatt
144d484c85
Replace rand() calls with a Random class ( #3332 )
2021-05-04 18:26:06 -07:00
David Gibson
743989525b
Implemented index caching for hooks refering to ship or weapon info objects.
2021-04-10 20:41:22 -05:00
David Gibson
5bca1417c2
Vectorized the hook condition lists and began chaching information inside the hook at creation to avoid string comparisons in play. CHC_VERSION, CHC_STATE, and CHC_APPLICATION converted.
2021-04-10 20:18:29 -05:00
Baezon
b57573c439
remove unecessary ship-get-subsys
2021-04-06 02:24:05 -04:00
Baezon
5e10fccdbf
Merge remote-tracking branch 'upstream/master' into turret-alt-math-fix
2021-03-27 21:12:30 -04:00
JohnAFernandez
c14653b391
Whitespace Adjustments
2021-03-23 20:31:04 -04:00
JohnAFernandez
42c19cdfee
Fix Missile Syncing Between Server and Client
2021-03-23 20:31:04 -04:00
the-maddin
b253442545
Add -pilot cmdline flag ( #3316 )
...
* Cmdline parsing for `-pilot "<name>"`
Add cmdline parameter `-pilot` with required
argument name and export name as global var
`Cmdline_pilot`.
* Expose to scripting `isAutoselect`
Setting `-pilot` flag sets `ui.isAutoselect()` true
(as does `-benchmark_mode`).
* Skip pilot selection
and call `player_finish_select` with the given
player instead.
* More useful error message on pilot load error
Also display callsign
* Add pilot name as scripting variable
* Don't expose pilot flag to launchers
* make stored flag param `const`
2021-03-22 21:14:57 +00:00
Asteroth
8b94e58596
Merge pull request #3284 from Baezon/fix-rand-circle-sphere-bias
...
Fix probability distribution of vm_vec_random_in_circle/sphere
2021-03-19 02:23:31 -04:00
Baezon
eb538ffba8
update turret_alt_math for moving subsystems
2021-03-19 02:13:20 -04:00
JohnAFernandez
609ed4ed94
Remove the fireball limit ( #3224 )
...
* Remove the fireball limit
* Handle Feedback
(Without the main PC, so really hoping I don't do any typos)
2021-03-17 14:21:06 -04:00
Baezon
643cb6a2be
update scripting functions
2021-03-14 15:37:43 -04:00
Goober5000
5bb9f427b4
a few turret fixes
...
This correctly calculates the turret position from the center (zero position) of its submodel instead of using the offset from the main model.
This patches a few more parts of the code and also adds a missing locale argument.
2021-03-09 22:39:13 -05:00
Goober5000
a12a33b189
Merge pull request #3277 from Goober5000/movable_turret_fov_fix
...
Turrets on movable submodels
2021-03-07 21:29:28 -05:00
Goober5000
9a3fc507d6
Merge pull request #3261 from BMagnu/lua_campaignswitch
...
Lua add campaign switch function
2021-03-07 13:10:01 -05:00
Goober5000
d75b0f4b4b
additional minor cleanup
2021-03-06 20:03:59 -05:00
Goober5000
ec1d2e091e
Merge pull request #3262 from Goober5000/enable_multi_for_two_sexps
...
allow two SEXPs to be used in multiplayer that previously couldn't be
2021-03-03 13:59:21 -05:00
Goober5000
106da3c95f
allow two SEXPs to be used in multiplayer that previously couldn't be
...
1) The ship-vanish SEXP (and script function) was already multiplayer-ready
2) The is-ship-visible SEXP was enhanced to add a second argument, which defaults to the player's ship in single-player mode
2021-03-03 13:22:50 -05:00
m!m
1561a75b13
Merge pull request #3260 from BMagnu/simulatedspeedoverrides_tb
...
Add scripting API for accessing registered Simulated Speech Overrides
2021-03-02 17:51:49 +01:00
BMagnu and m!m
9a854a7066
Add change to correct typecast
...
Co-authored-by: m!m <[email protected] >
2021-03-02 17:09:20 +09:00
Goober5000
3b1aac26e8
remove most of turret_matrix stuff
2021-02-28 23:41:56 -05:00
Birk Magnussen
2233d2eb9b
Reflect used player object
2021-03-01 01:32:13 +09:00
Birk Magnussen
e9b2047769
Add function to switch campaign
2021-03-01 01:27:14 +09:00
Birk Magnussen
781aa5c638
Fix warning
2021-03-01 00:55:05 +09:00
Birk Magnussen
03eb74e616
Add scripting API for accessing registeres sso's
2021-03-01 00:32:42 +09:00
Birk Magnussen
f0d5c5a499
Remove redundant close
2021-03-01 00:13:49 +09:00
Birk Magnussen
530916e0fa
Changed File not closed error to a warning and automatic file close
2021-02-28 23:47:07 +09:00
m!m
e393503eb2
Merge pull request #3244 from the-maddin/default_volume_issue
...
Set default volume on audiostream creation
2021-02-27 22:41:03 +01:00
asarium
0fb712ed39
Add full type coverage for return types and variables
...
This introduces type parsing for all types used within the scripting
documentation. This improves the generated JSON output and also
validates new code via the unit test.
2021-02-26 22:37:37 +01:00
the-maddin
26aab09b8e
Update scripting documentation audio_stream:play()
...
to reflect what the implementation actually does.
2021-02-24 02:16:01 +01:00
Martin Merget
c715cf5c65
Merge remote-tracking branch 'refs/remotes/upstream/master'
2021-02-23 00:04:54 +01:00
the-maddin
ab7e6cbbe1
add LuaErrors for invalid input, fix off-by-one
2021-02-21 20:37:02 +01:00
BMagnu
fd60dd342f
Add vanish Lua function to some objects ( #3238 )
...
* Add vanish function to some objects
* Modify vanish function return. Modify fireball access
* Remove dedunant check for ship vanish
2021-02-21 11:59:49 +00:00
JohnAFernandez
19b3f85eea
Merge pull request #3220 from Baezon/turret-inaccuracy
...
Add turret-set-inaccuracy SEXP
2021-02-20 21:07:47 -05:00
Goober5000
69c1398368
add SimHitpointsLeft
2021-02-20 16:13:14 -05:00
the-maddin
366a96bdd4
Expose audiostreams from memory to LUA
...
Allow scripts to play any LUA binary string containing valid WAV data.
Useful for TTS data passed in via LUASockets.
2021-02-19 01:22:24 +01:00
Baezon
592855c35d
NULL -> nullptr
2021-02-16 02:27:11 -05:00
Baezon
3797171fb0
Merge remote-tracking branch 'upstream/master' into turret-inaccuracy
2021-02-16 02:23:45 -05:00
Baezon
028e40a43b
add turret-set-inaccuracy sexp
2021-02-16 02:21:54 -05:00
Goober5000
303787d97c
Merge pull request #3206 from Goober5000/retail_hybrid_translation_behavior
...
restore retail behavior of XSTR
2021-02-12 17:48:23 -05:00
Goober5000
1e756d1a67
restore retail behavior of XSTR
...
This is a follow-up to #2390 . Retail used a weird hybrid approach where internal strings were translated but external strings were not. This restores that behavior by adding another language, LCL_RETAIL_HYBRID, which is the default. The game can still be run in completely untranslated or completely translated mode.
All three modes have been tested and translate strings, or not, as expected. The `$Use tabled strings for the default language:` flag has also been tested and still works.
2021-02-11 19:47:12 -05:00
JohnAFernandez
bd7450c4e6
Merge pull request #3198 from Baezon/landmark-logging
...
Add 'landmark' logging
2021-02-10 20:40:40 -05:00
Goober5000
dd92a0f0bb
add vm_vec_is_normalized and use it in several places
2021-02-06 13:46:54 -05:00
Goober5000
e699d991d1
add useful function
2021-02-06 00:19:57 -05:00