Commit Graph
250 Commits
Author SHA1 Message Date
asarium 059e149590 Add dynamic action programming system
This system adds the code necessary for letting content creators specify
complex events by specifying a simple, program-like sequence of
operations that will be executed by the engine when a certain event is
triggered.
2021-01-05 18:26:10 +01:00
Baezon 96bd94dfa5 lock restriction enhancements 2020-11-20 12:04:03 -05:00
Asteroth 498f82b0c4 Merge pull request #2823 from Baezon/continuous-spawn
Allow for continuously spawning weapons
2020-11-05 13:36:22 -05:00
Baezon b3a71e9cf3 add radius override 2020-10-30 02:10:56 -04:00
Baezon 3a83475c15 some fixes, added delay and minimum spawn interval 2020-10-25 00:44:14 -04:00
Baezon dbf0d0de0d accurate total spawn count 2020-10-23 20:43:53 -04:00
Baezon a55e331302 spawn_chance for detonate_spawn too 2020-10-22 18:48:58 -04:00
Baezon 1926fcc5cb total_children_spawned -> total_detonation_children_spawned 2020-10-22 17:58:43 -04:00
Baezon 6506d0a49c v1 2020-10-22 14:32:20 -04:00
Baezon ef65914129 v1 2020-10-19 13:40:25 -04:00
Baezon b360435719 v1 2020-10-11 02:34:59 -04:00
Goober5000 23b3aadf9b Message size fix (#2784)
* Fix underline length calculation in message scrollback
* Use SCP_string for message source (which allows ships with long display names to work without crashing) and message text
* Upgrade assorted functions to work with SCP_string
2020-10-06 14:31:03 -04:00
Baezon f66bd71a21 v1 2020-09-13 02:44:31 -04:00
Goober5000 2fee91cd4c Merge pull request #2674 from Goober5000/display_name
refactor display_name for ships, ship classes, and weapon classes
2020-08-30 09:21:32 -04:00
David Gibson c38b989bb7 Renamed free flight speed related tag and variable for clarity and safety 2020-08-29 13:20:51 -05:00
Goober5000 3d734948da Merge branch 'master' into display_name 2020-08-29 13:47:21 -04:00
m!m 415151fddc Merge pull request #2641 from EatThePath/free-flight-restoration
Restoring the free flight speed missile table value to functioning
2020-08-29 17:10:07 +02:00
Goober5000 3b2af702f7 refactor display_name for ships, ship classes, and weapon classes
Several things going on here:
1) refactor `get_display_string()` to `get_display_name()` to be more precise
2) likewise, refactor `alt_name` to `display_name`
3) automatically generate display names when parsing the ship, ship class, and weapon class for the first time
4) remove the on-the-fly truncation of names with hash symbols

Basically this subsumes the `end_string_at_first_hash_symbol` logic into the display name.  Rather than truncate the name every time it's displayed, truncate it once when it's parsed.  This takes advantage of the previous display name infrastructure, since display names are a superset of the case of truncating the hash symbol.

This also has the benefit of now allowing hash symbols within display names.  When updating Destiny of Peace, I noticed that "Lockheed Shuttle #4" would no longer display properly; and it was not previously possible to fix this even with display names.

I could pull out the `get_display_string()` and `alt_name` renaming into a separate PR if desired.
2020-08-21 00:15:38 -04:00
Baezon 1f62919a46 cleaner temp lists 2020-08-12 20:56:19 -04:00
David Gibson c432c1cce1 Reinstituted freeflight speed parsing and implemented it's use. 2020-08-10 11:18:44 -05:00
Baezon 48313c826f v2 2020-08-08 21:16:43 -04:00
Baezon 6927b5cef1 objectify 2020-08-07 23:28:43 -04:00
Baezon ededcd8156 v1 2020-08-07 03:20:26 -04:00
Baezon 860423b577 wip 2020-08-06 20:48:16 -04:00
Swifty 32c38e696d Initial commit of multilock missile features. 2020-07-26 18:38:56 -06:00
David Gibson bb76e2fdcd Implemented minimum angle option for spawned weapons, single player only currently. 2020-06-05 21:38:06 -05:00
Goober5000 a0951f4e28 derp 2020-03-15 00:28:07 -04:00
Goober5000 3da2b99144 maybe these need to be extern'd 2020-03-14 15:13:44 -04:00
Goober5000 c9df8a13f1 add functions to remove the clutter of static casts for ship and weapon info vectors 2020-03-14 13:02:12 -04:00
Goober5000 5b8e89f37d address feedback 2020-03-14 09:56:56 -04:00
Goober5000 fde7fdd854 address feedback 2020-03-07 13:35:17 -05:00
Goober5000 d8e88c1644 oof 2020-03-05 22:31:13 -05:00
Goober5000 1926d3c341 oof, more changes 2020-03-05 20:49:16 -05:00
Goober5000 20835adef6 convert Weapon_info to a SCP_vector 2020-03-05 19:12:43 -05:00
FSCyborg aef0e1f78a For Issue #1848 - Add option to change default rearm values
Although not technically a bug, several mods have been misled by the description of the "$Rearm Rate:" weapons table setting, and specifying an initial ammo value that is less than 100 for ballistic primaries would force the ballistic ammo to be loaded all at once, with "$Rearm Rate:" just specifying how long that one load would take.

This allows modders to use more realistic behavior for things like anti-turret ballistic primaries, where initial ammo could be in the thirties so that any number above zero can be added per load.
2019-10-24 01:10:52 -04:00
CasparKielwein 25029bfdf1 remove unused functions and defines in weapon code 2018-12-29 16:41:23 +01:00
asarium 2ded9aa35d Format changes with clang-format 2018-07-16 10:21:52 +02:00
asarium ad54f588bb Use strongly typed handles for sound handles
This is similar to the other changes I already posted. Here the sound
instance handles are converted to their own handle type which will make
it easier to use the sound API.
2018-07-16 10:21:52 +02:00
asarium c6e2f94d0b Use type-safe handles for particle effects
Nightmare discovered an off-by-one error when checking the validity of a
particle effect handle. Since the new ID system makes that much easier
and less error-prone I decided to go ahead and convert all handles to
an ID typedef which also fixes the reported bug.
2018-07-15 14:50:32 +02:00
Frans Elliott c6f75e7d14 Moved SUPERCAP_DAMAGE_SCALE macro from weapons.cpp to weapon.h so it can be used in shiphit.cpp. 2018-07-12 19:56:44 -05:00
TRBlount be8ea029da Resolve feedback 2018-06-29 11:19:56 -06:00
TRBlount 37453ae229 Add Failure Rate 2018-06-28 10:38:37 -06:00
asarium 120750ebd2 Adress code review feedback 2018-06-04 11:56:45 +02:00
asarium 3430a1c438 Disable hard-coded "cluster bomb" hack
This disables the old hack code if the weapon class has an alternate
name which may have been translated. See #1730 for more information.
2018-06-04 11:56:45 +02:00
asarium ae149b6061 Add convencience function for retrieving weapon alt name
I also fixed a few issues where the internal char array was used as a
mutable string which changed the string after it was parsed which is not
good(TM).

This also replaces all user-facing occurences of usages of name to use
the new function so that the correct, possibly translated, name is displayed
to the user.
2018-06-04 11:56:44 +02:00
asarium 8f06e338a4 Add typesafe handle types and use it in game sound system
This adds a new class which allows to create type safe resource handle
types. At the moment, the engine uses ints pretty much everywhere for
providing handles to resources created by the specific subsystems. Since
all ints are the same to the C/C++ typesystem it is perfectly legal to
pass a sound handle to the graphics API as a buffer handle which will
obviously cause issues.

This adds a new type called "ID" which is a wrapper class for a generic
handle but with added type safety. An instance of this class cannot be
passed to a function expecting another type of handle which provided
compile-time type safety for these APIs.

As an initial test I converted the game sound handles to this new type.
I already found a bug in the mainhall system thanks to this new type.
The mainhall used the game sound handles as sound instance handles which
probably meant that that specific code never really worked right. I
removed the code since there was no better alternative for fixing it.
2018-04-22 16:22:45 +02:00
asarium 99f69c903e Add screen space decal rendering system
This allows to render screen space decals into the deferred lighting
buffers no matter how complex the underlying geometry is.

Currently there is only limited support for using this in the engine.
Only weapon impact decals are supported at the moment for testing
purposes.
2018-01-12 17:09:49 +01:00
MageKing17 c890c0af1f Make shield impact sounds more intuitive.
Shield impact sounds now re-use the shield quadrant calculated by the collision code instead of naively recalculating based on global hitpos, allowing the hull impact sound to play if the shot pierces shields or was fired from within the shield mesh, and simplifying the relevant calculations in the process.
2017-10-03 09:06:34 -07:00
MageKing17 addc3ef383 Allow countermeasures to pulse at regular intervals instead of globally.
Adds a new "+Pulse Interval:" countermeasure field that enables the new behavior; all countermeasures that don't have this field defined still use the old behavior of the global frame counter.

This changes countermeasure logic quite a bit, but I attempted to mitigate performance implications by re-using an existing traversal of the object list in order to build the list of active countermeasures each frame. If any countermeasures are actively pulsing in a frame, the object list is traversed again, looking for homing weapons. Each homing weapon then goes through the active countermeasure list and checks to see if it got decoyed. Most of this central logic is unchanged from the old behavior, although no longer separated into two functions, and it should be more efficient since it's using a prepared list of active countermeasures instead of traversing the object list looking for countermeasures for every homing missile (which are themselves found by traversing the object list).
2017-08-23 03:39:48 -07:00
Fabian Woltermann 63e610e07d Rerstore the flag viewers 2017-03-07 22:31:33 +01:00