Goober5000
88bf67a64f
Merge pull request #6104 from Goober5000/locations_to_enums
...
convert arrival/departure locations to enum classes
2024-04-18 03:53:30 -04:00
Goober5000
0a59c533c2
fix checkVisibility
...
The checkVisibility function did not check its arguments' validity, leaving open the possibility of a null pointer access.
2024-04-17 22:32:54 -04:00
Goober5000
3ad0d3713d
convert arrival/departure locations to enum classes
...
To enforce type safety for arrival and departure locations, this converts them to enum classes. Various casts are added when appropriate to convert between the indexed and enum values.
2024-04-17 15:05:48 -04:00
Goober5000
a5630d63a5
more electrical arc API features
...
Follow-up to #6034 . This slightly changes the function signature of `AddElectricArc` but it should be fine since it hasn't appeared in a stable release yet.
2024-04-03 20:27:14 -04:00
Goober5000
0bf0735cd9
Merge pull request #6034 from Baezon/scripted-model-arcs
...
Add scripted model 'lightning' arcs
2024-03-15 13:03:34 -04:00
Goober5000
45a434a60a
some parse upgrades
...
Turn `Parse_names` into a vector and add SCP_string overloads of ship registry functions. Refactor calling code to use registry as appropriate. Remove an unused overload of `mission_parse_get_parse_object`.
2024-03-12 14:30:07 -04:00
Asteroth
488ec8d5a8
review tweaks
2024-03-12 13:50:38 -04:00
Asteroth
b9169cc425
add some real docs
2024-03-09 21:27:32 -05:00
Asteroth
27925607b8
add scripted model arcs
2024-03-09 12:46:34 -05:00
Goober5000
c652d5a84c
another isValid fix
...
Another #6009 follow-up, this one from PR #5935 .
2024-02-28 12:51:49 -05:00
Goober5000
3e8a9d9738
Merge pull request #5935 from Goober5000/ship_to_parsed_ship_api
...
connect ship and parsed ship in Lua API
2024-02-28 12:39:03 -05:00
Goober5000
1313434e11
reconcile isValid between PRs
...
PRs #6009 and #5995 passed CI checking independently of each other, but compilation broke after merging. This patches things.
2024-02-28 02:01:30 -05:00
Goober5000
bf996313dc
Merge pull request #6009 from Goober5000/isValid_refactor
...
isValid refactor
2024-02-28 01:41:42 -05:00
Goober5000
be8725c6c6
change isSubsytemValid to isValid
2024-02-26 16:19:53 -05:00
Goober5000
15c921223b
compose object_h within the structs/classes that use it
2024-02-26 16:19:53 -05:00
Goober5000
ec241fcab3
standardize on isValid() and make validity member functions const
2024-02-26 15:56:41 -05:00
Goober5000
03696d07ca
cover all stages of ship warping in the Lua API
...
This improves the ability of Lua to check for ship arrival status:
1. Deprecates the `isWarpingIn` function, which can be misleading, and replaces it with the equivalent `isWarpingStage1`
2. Adds an `isWarpingStage2` function to fill a gap in functionality
3. Adds an `isArrivingWarp` function (complementing the existing `isDepartingWarp` function) to cover both stage 1 and stage 2
2024-02-19 22:08:15 -05:00
Goober5000
ba9285e09a
connect ship and parsed ship in Lua API
...
Add `getShip()` to parsed ships and `getParsedShip()` to ships to allow the two APIs to connect to one another.
2024-01-29 22:06:15 -05:00
Goober5000
301b9453b6
replace pointers with indexes in cockpit_display
2023-11-13 12:48:08 -05:00
JohnAFernandez
c30559a63a
Merge pull request #5698 from Goober5000/waypoints_upgrade
...
Waypoints upgrade
2023-11-02 19:24:55 -04:00
Sébastien Noel
f149c36b44
Fix a few typos ( #5598 )
2023-10-24 20:33:45 -04:00
Goober5000
c8d78816b0
remaining const updates
2023-10-20 15:32:46 -04:00
Goober5000
883ed32796
ai-disable-ship-tactical and ai-disarm-ship-tactical ( #5512 )
...
Add "tactical" versions of disable and disarm goals which only perform the specific task without implying anything else. The target ship is not protected and attack goals are not cleared from other ships.
There is also a new AI profiles flag to make this the default hud squad message command instead of the classic disable/disarm.
2023-10-19 07:50:49 -04:00
Goober5000
cb0e9ce601
sync setting and getting of collides and no_collide
...
The `collides` and `no_collide` flags are equivalent, but opposite. So when sexps or scripts get or set those flags, allow each to be used as an anti-synonym (not exactly an antonym) for the other.
2023-09-17 01:23:31 -04:00
Goober5000
eaf57bddf3
add ship:isPlayer()
...
Add Lua functions to check whether a ship or parse object is a player ship.
2023-05-12 00:35:29 -04:00
Asteroth
ac9636733f
ets fixes ( #5317 )
2023-04-11 06:31:04 +09:00
Goober5000
7ac37d45c3
enhance sendMessage to allow messages sent from ships
...
Allow `mn.sendMessage` to send from a ship source, not only a string source, by allowing the ship object to be specified as the first argument. Also add `ship:sendMessage` which is a more streamlined version of the same thing.
2022-12-06 16:40:00 -05:00
BMagnu
5bb869953e
Animate More Things ( #4936 )
...
* Add Cockpit AnimSet
* Add Skybox Animset
* Add cockpit model instanc
* Render ship cockpit with instance
* Finish scripting API
* Add moveables
* Fix Typo
* Fix moveable table value get
* Fix copy paste error
* Add Cockpit AnimSet
* Add Skybox Animset
* Add cockpit model instanc
* Render ship cockpit with instance
* Finish scripting API
* Add moveables
* Fix Typo
* Fix moveable table value get
* Fix copy paste error
* Add Animation Scripting Handle
* Add proper saving of skybox anim triggers
* Properly step non-obj animations
* Incorporate feedback
* Incorporate feedback
* Fix comparison
2022-12-05 10:00:29 +09: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
7c26c19671
add numDocked and isDocked
...
Two useful script functions.
2022-11-06 16:19:45 -05: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
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
473521f5ed
Merge pull request #4759 from Goober5000/wing_flags
...
add wing flags
2022-10-06 18:58:00 -04:00
Goober5000
364741ef8f
additional flag error checking
2022-10-05 11:40:54 -04:00
Goober5000
afeca7cc8f
add the same for ships and parse objects
2022-10-04 21:45:56 -04:00
Goober5000
f0542553d6
make animated ship effects use the new timestamps
...
In addition to type-safety, this now adjusts ship effects properly for time compression and pausing.
2022-10-04 21:42:47 -04:00
Goober5000
20653ece8e
add WaypointSpeedCap
...
As requested by FotG
2022-10-02 00:13:50 -04:00
Goober5000
c7b1092a96
a few more script enhancements
...
1) Add the "no-thrusters" ship flag to the list of flag that can be used by alter-ship-flag or the ship's setFlag function
2) Add a `FireRateMultiplier` virtvar to control the firing rate of turrets (fulfills #4300 )
3) Add a `setGlowPointBankActive` function to do the same thing as `activate-glow-point-bank`/`deactivate-glow-point-bank`
2022-09-22 02:12:17 -04:00
Goober5000
5e3f72229c
Merge pull request #4684 from Goober5000/set_and_get_ship_flags
...
add setFlag and getFlag for ships and parse objects
2022-09-21 12:39:00 -04:00
Goober5000
fdb5506d41
make autodoc happy
2022-09-20 20:16:54 -04:00
Goober5000
9c71a3a1a0
allow an arbitrary number of flag arguments
2022-09-20 20:06:11 -04:00
wookieejedi
7926366ee6
Update max priority for scripting AIgoals ( #4685 )
2022-09-20 19:09:16 -04:00
Goober5000
a89ba892a2
add setFlag and getFlag for ships and parse objects
...
This mirrors alter-ship-flag and are-ship-flags-set.
2022-09-20 14:43:24 -04:00
Goober5000
622c99fa2f
add stopLoopingSubmodelAnimation
...
A script command to mirror the SEXP operator.
2022-09-17 17:45:28 -04:00
wookieejedi
261dc508f8
Script function for turnTowardsOrientation ( #4578 )
...
A simple copy of the same function on `ai_helper`, now usable on plain ships too.
2022-08-23 22:23:30 -04:00
BMagnu
2557478d55
Allow changing Animation Instance speed ( #4572 )
...
* Allow changing animation speed
* Return nil from function
* address feedback
2022-08-22 03:14:34 +09:00
Goober5000
38fbe6311e
Merge pull request #4555 from MjnMixael/LuaPersonaAccess
...
Implement ability to get and set a ship's persona index
2022-08-21 00:54:50 -04:00
BMagnu
61197d4c12
Add SEXP to stop an animation after loop ( #4566 )
...
* Add Animation Instance Flags
* Add SEXP barebones
* Unify and simplify animation parsing
* Clean up animation calling and use new animationlist api
* Add missing break
2022-08-20 18:44:17 +09:00
mjn-mixael
1d5c457c83
Fix issue
2022-08-19 00:28:59 -05:00