Commit Graph

75 Commits

Author SHA1 Message Date
Matthias Mailänder
bbbed49f82 Add a lint check for cursor definitions. 2021-03-20 17:37:16 +01:00
Paul Chote
d52ba83f96 Replace terniary null checks with coalescing. 2021-03-08 18:11:25 +01:00
teinarss
4a1e4f3e16 Use expression body syntax 2021-03-07 13:00:52 +00:00
abcdefg30
aac3174efc Rename Stances to Relationships in the yaml api 2020-12-11 17:13:02 +01:00
abcdefg30
eda9966d27 Rename Stance to PlayerRelationship 2020-11-14 11:04:41 +00:00
teinarss
13581c030d Use in parameter for Target 2020-11-06 22:02:24 +01:00
Matthias Mailänder
c48eb572e3 Remove MuzzleSplitFacings and expose MuzzleSequence to testing. 2020-09-01 18:53:43 +02:00
teinarss
27f1a7ab27 Use out var syntax 2020-08-19 18:11:07 +01:00
teinarss
19b02875c7 Use Tuple syntax 2020-08-15 10:37:10 +01:00
Paul Chote
75cb5c2166 Convert turret facings to WAngle relative to the body. 2020-08-09 19:43:53 +02:00
Paul Chote
2cfacc2c7d ProjectileArgs facing -> WAngle. 2020-06-01 21:34:32 +02:00
Ivaylo Draganov
b8a9f41892 Add missing trait descriptions for cursors and unify the language 2020-05-31 00:12:04 +02:00
atlimit8
259c8d2c98 Merge ConditionManager trait directly into Actor 2020-05-09 15:46:11 +02:00
abcdefg30
23b3c237b7 Update the year numbers in all license headers to 2020 2020-01-05 17:00:34 +00:00
Paul Chote
78a70be0d4 Fix and enable SA1133, SA1134 style rules. 2019-05-24 10:47:57 +02:00
abcdefg30
1bb319425b Add Sound.Play overloads that play a random sound from a list 2019-04-20 01:22:30 +02:00
abcdefg30
cadbd0d9ab Change the year number in all cs headers from 2018 to 2019 2019-01-26 23:15:21 +01:00
Paul Chote
807a40c209 Remove IExplodeModifier interface. 2018-11-22 22:16:56 +01:00
Andre Mohren
6cd1919cca Calling PreparingAttack before calculating Muzzle. 2018-09-30 15:34:08 +02:00
reaperrr
28c89920ac Add dynamic muzzle LaunchEffect facing plumbing 2018-09-28 21:32:34 +02:00
reaperrr
a784081973 Add ReloadingCondition to Armament
Allows to grant condition while reloading.
2018-06-03 12:23:54 +01:00
Arular101
8a60918841 Update copyright notice year to 2018 2018-01-17 00:47:34 +01:00
reaperrr
cefe3d2c8f When Armament has multiple LocalOffsets but weapon has Burst: 1, cycle through offsets 2017-12-29 15:28:34 +00:00
reaperrr
8b7a71685c Remove AmmoPool-awareness from Armament 2017-11-12 19:48:06 +00:00
reaperrr
6f95080aa4 Add ReloadAmmoPool and adapt AmmoPool
Refactored and simplified Rearm activity.
Uses local Reload now.

Removed AmmoPool.SelfReloads.
2017-11-12 19:48:06 +00:00
reaperrr
834a40b18d Refactor BurstDelay to BurstDelays
Allowing to set custom per-burst delays.
2017-08-20 20:48:25 +02:00
reaperrr
8ee742d66a Split MuzzleOffset and MuzzleOrientation calcs to protected methods
To make overriding easier for downstream traits inheriting Armament.
2017-07-29 22:14:58 +02:00
reaperrr
26be2a3e99 Split Burst updating to separate method 2017-07-29 22:14:58 +02:00
reaperrr
e847f49256 Split barrel firing to separate method 2017-07-29 22:14:58 +02:00
reaperrr
514bd12885 Merge some Armament CanFire checks 2017-07-29 22:14:58 +02:00
reaperrr
bdfa8a361b Split Barrel can-fire checks to separate CanFire method 2017-07-29 22:14:58 +02:00
reaperrr
07edf2f7c6 Reset burst counter if ReloadDelay has passed since last shot
This fixes the following issues:
- units like mammoth tanks sometimes at first only fired 1 shot on new encounter because they only depleted 1 burst before previous target was killed
- weapons that use strafing logic would not reset the offset multiplier after passing the target once, leading to wrong offsets on following attacks
2017-07-13 19:12:16 +02:00
reaperrr
afa8d3522c Add strafing support to weapons 2017-07-13 19:12:16 +02:00
reaperrr
edffaa4987 Introduce Weapon.TargetActorCenter and adapt projectiles
This also fixes issues with attackers that don't have their own Attack
trait.
2017-06-24 11:24:17 +01:00
reaperrr
8e9f20cf4b Cache traits implementing INotifyAttack 2017-06-22 04:13:47 -05:00
reaperrr
779218f381 Cache traits implementing modifiers 2017-06-22 04:13:47 -05:00
reaperrr
243ed3d76a Cache traits implementing INotifyBurstComplete 2017-06-22 04:13:47 -05:00
reaperrr
da7433a95f Add plumbing for targeting of target center instead of closest targetable position
Note: Projectiles that can track their target need minor additional changes, but for InstantHit (which already implemented support for this) and unguided projectiles (Bullet, GravityBomb) this commit is already sufficient.
2017-06-15 01:32:37 +02:00
reaperrr
7acc6dacbc Fix armaments/projectiles to aim at closest Target.Positions
Instead of CenterPosition.
TargetablePositions were already used for targeting/attack decisions, but not armaments/projectiles.
2017-06-05 14:22:47 +02:00
reaperrr
b8c251cf41 Add StartBurstReport to WeaponInfo
The FS Juggernaut firing sound already contains 3 shots, so without this, players would hear a total of 9(!) shots per salvo.
2017-05-14 11:49:38 +01:00
Andre Mohren
d68bc48ba5 Added ReloadSound and ReloadSoundDelay to weapon declarations. 2017-04-30 22:43:32 +02:00
Taryn Hill
43317e0f5d Update copyright notice year to 2017 2016-12-31 23:46:13 -06:00
Paul Chote
268ed016ab Rename UpgradableTrait to ConditionalTrait. 2016-12-23 23:28:34 +00:00
Paul Chote
9ddfdc45b3 Introduce SoundType enum. 2016-12-23 11:34:23 +00:00
Paul Chote
3f0b33992c Rewrite UpgradeManager implementation to suit conditions. 2016-11-20 13:55:47 +00:00
Paul Chote
23f4ae5027 Replace UpgradeMinEnabledLevel checks with an EnabledByDefault shim. 2016-11-19 17:19:25 +00:00
reaperrr
3fca63e9a2 Make Armament implement interfaces explicitly 2016-10-30 19:17:45 +01:00
reaperrr
19c3e7c9e3 Make Armament elements as overridable as possible
To allow downstream mods to ship customised Armament-derivatives.
2016-08-20 15:06:18 +02:00
reaperrr
75c49620d1 Introduce INotifyAttack.PreparingAttack
And use it to allow triggering attack animations/overlays at a different point
than the actual weapon firing.
2016-07-02 16:02:00 +02:00
reaperrr
4f55b088eb Check if weapon without self-reloading is out of ammo when deciding validity
This should prevent attacking helicopters (or other actors) staying at the range to target of a weapon that is out of ammo and needs manual reloading at a RearmBuilding or via upgrades.
2016-06-23 14:47:41 +02:00