Asteroth
219bcca23a
Implement gravity ( #4803 )
...
Adds gravity! Applies on a per-mission basis, and weapons, ships, debris, and asteroids now have a configurable "gravity const" which multiplies the effect of gravity on them, by default everything except debris is 0 (meaning no effect even when the mission has gravity). AI and the lead indicator will also lead for ballistic trajectories as well, given a gravity-affected weapon. No FRED support or gravity direction control yet, to come in later PRs.
2022-11-21 20:13:35 -05:00
John Fernandez
d29ead20f6
optional feedback
2022-11-20 17:03:20 -05:00
John Fernandez
760a91376c
Fix a warning
...
We shouldn't be checking that the `cci_h` is valid by seeing if it is greater than -1 because by that point it never will be. Instead, we should be checking that the incoming id is valid and setting to the invalid state if it is not.
2022-11-20 17:03:20 -05:00
Goober5000
98a3c64cc8
fix campaign loading in FRED
...
Load campaigns using the full path provided by the user, not just from the configured mod paths.
Also tweaks initialization based on the campaign having already been cleared in `mission_campaign_clear()`.
2022-11-15 20:40:33 -05:00
BMagnu
bd2c50aa1d
Refactor Lua Enums ( #4867 )
...
* Refactor bitfield enums
* Add default case for lua switch
* Add default case for more lua switches
* Fix Warnings
* constexpr
2022-11-14 17:31:50 +09:00
Goober5000
b2f5ea9065
Merge pull request #4764 from MjnMixael/3d_select_settings
...
3d select settings
2022-11-13 16:13:17 -05:00
Asteroth
e85fabf671
bugfix arg order ( #4882 )
2022-11-11 23:06:42 -05:00
mjn-mixael
35e6bc9df0
setup overhead style as a type enum
2022-11-09 09:16:57 -06:00
Goober5000
7c26c19671
add numDocked and isDocked
...
Two useful script functions.
2022-11-06 16:19:45 -05:00
Asteroth
2777e45a95
Add isMultipart and getModelFlag functions on subsystems ( #4846 )
...
* add `getModelFlag` function
* add ismultipartturret function
* fix
* fix link
2022-11-06 23:59:54 +09:00
Asteroth
924013b521
add burst shots and delay to scripts ( #4847 )
2022-11-06 23:59:34 +09:00
Asteroth
18d3c01576
Allow overriding gvec in fireWeapon on subsystems ( #4852 )
...
* allow for overriding of gvec
* update docs
* fix docs
2022-11-05 14:13:01 -04:00
MjnMixael
bff3d433e2
properly get badge name ( #4853 )
2022-11-05 10:01:44 -04:00
BMagnu
d85c1431a4
libRocket Texture Passthrough ( #4822 )
...
* Properly handle lua texture refcounting
* Add linkTexture ui method
* Incorporate feedback
2022-11-02 18:25:22 +09:00
Goober5000
5f54188e5b
add a few scripting dock functions ( #4839 )
...
* add a few scripting dock functions
Add setDocked, setUndocked, and jettison.
* address feedback
2022-11-01 21:45:49 +09:00
Asteroth
a29378d245
Clearable Ship/Subsystem Targets via script ( #4842 )
...
* make sure Targets can be cleared with `nil`
* move `set_targeted_subsys` calls
2022-11-01 21:43:26 +09:00
MjnMixael
346817f3d0
Further limit what built-in UI elements can be setup when using SCPUI ( #4824 )
...
* Further limit what built-in UI elements can be setup when using SCPUI
* remove superfluous declaration
2022-11-01 21:43:14 +09:00
Goober5000
11b37bbeae
Merge pull request #4787 from Goober5000/createdebris
...
create debris using script functions
2022-10-21 23:24:47 -04:00
Goober5000
41074956a8
more fixes
2022-10-21 12:01:25 -04:00
MjnMixael
c63ce5de8c
Allow writing to player mission specific stats ( #4801 )
...
* Allow writing to player mission specific stats
* Documentation
* return false
2022-10-21 20:25:35 +09:00
Goober5000
debedf26ef
partial fix
2022-10-20 23:32:30 -04:00
MjnMixael
90c4316a5e
Update scpui documentation ( #4802 )
...
* Update documentation
* Typo
2022-10-20 19:13:03 +09:00
Goober5000
9782f191b9
Merge pull request #4789 from Goober5000/timestamps_3
...
music and training message timestamp conversion
2022-10-19 20:02:47 -04:00
Goober5000
49fb2f07c0
refactor per feedback, tweak to fix circular #include, use accessor, reorder, fix namespaces, fix API documentation
2022-10-19 14:44:57 -04:00
Goober5000
f24277c39e
make clang happy
2022-10-19 14:22:10 -04:00
Goober5000
77179dc183
add mn.createDebris
...
This is a new Lua API function that allows creation of arbitrary debris pieces, whether chunks of a ship's hull or shards of shrapnel. All of the parameters are optional, and a wide variety of situations are possible ranging from vaporized bits to static chunks to chunks propelled by an explosion.
2022-10-19 14:22:10 -04:00
Goober5000
d37a446894
music and training message timestamp conversion
2022-10-19 14:11:23 -04:00
MjnMixael
50cd91bd86
Damage, swarm, corkscrew info virtvars ( #4798 )
...
* Add access to damage type, swarm, and corkscrew data
* Also return if the weapons have the appropriate flags
* Return nil for invalid handle and clarify documentation
2022-10-19 21:51:22 +09:00
Asteroth
4c6f043274
Add a bunch of movement stats to ship class script api ( #4797 )
...
* add a bunch of script physics values
* fix
* small doc fix (its just called "damp" barely worth mentioning)
2022-10-18 20:54:30 -04:00
Fabian Woltermann
9e56ba43a5
Merge pull request #4783 from MjnMixael/render_no_lighting
...
Allow option to choose to render with no lighting
2022-10-17 19:30:40 +02:00
mjn-mixael
64bd233c49
API to access the new 3d select settings in game_settings.tbl
2022-10-17 09:58:15 -05:00
mjn-mixael
2d4d886a6a
Add Game Settings options for 3d ship and weapon select
2022-10-17 09:58:15 -05:00
mjn-mixael
32b059ae07
fix documentation
2022-10-17 08:09:26 -05:00
mjn-mixael
1af0a1082b
int to bool
2022-10-17 08:04:02 -05:00
MjnMixael
09a307b17d
Virtvar to access the energy a weapon consumes ( #4784 )
...
* Virtvar to access the energy a weapon consumes
* quick fix
2022-10-15 09:54:44 -04:00
Goober5000
848d133fe3
Merge pull request #4767 from Goober5000/enhanced_print
...
enhance ba.print and add ba.println
2022-10-14 21:40:11 -04:00
Goober5000
8f8a6ca527
warning tweak
2022-10-14 21:08:47 -04:00
mjn-mixael
7a5a54d009
Allow option to choose to render with no lighting
2022-10-14 09:00:35 -05:00
Goober5000
da7228cedb
model.Submodels fix
...
Guard against the indexer being invalid, e.g. if the model isn't loaded yet.
2022-10-14 02:07:35 -04:00
MjnMixael
d323421817
Use a local int for model storage in renderTechModel ( #4779 )
...
* Use a local int for model storage here
* null -> nullptr
2022-10-13 17:06:03 +00:00
MjnMixael
7ab80a0162
Toggle cockpit ( #4772 )
...
* proof of concept
* Account for shadows
* Option to tie individual HUD gauges to the cockpit option
* Do this in a more user-friendly way
* Address feedback
2022-10-13 19:42:00 +09:00
Goober5000
e95d214143
Merge pull request #4756 from Goober5000/ship_entry_and_related
...
Add Lua API for ship registry
2022-10-11 19:24:54 -04:00
MjnMixael
6ae8674615
Correctly set credits default even for scpui access ( #4768 )
...
* Correctly set credits default even for scpui access
* These also need to move up for the same reason
* Match retail functionality
2022-10-11 16:47:10 +09:00
Goober5000
3850acdd23
documentation updates
2022-10-10 22:45:14 -04:00
MjnMixael
bc6282b34b
These were reversed ( #4770 )
2022-10-10 17:48:47 +09:00
Goober5000
663474516f
Merge pull request #4752 from Goober5000/arrival_departure_info
...
add arrival and departure info for wings, ships, and parse objects
2022-10-07 12:26:59 -04:00
Goober5000
d73ac59383
enhance ba.print and add ba.println
...
There was code that could interpret any Lua type as an argument for printing, so I adapted it to be used in ba.print(), ba.warning(), and ba.error(). Also ba.println() seemed like a useful thing to add.
2022-10-06 22:52:58 -04:00
Goober5000
a47b2440d3
add ship registry
2022-10-06 20:43:09 -04:00
Goober5000
7d6f261221
add getWing() to parse_object
2022-10-06 20:43:09 -04:00
Goober5000
473521f5ed
Merge pull request #4759 from Goober5000/wing_flags
...
add wing flags
2022-10-06 18:58:00 -04:00