Paul Chote
80e92849da
Replace ResourceType with strings in interfaces/public methods.
2021-03-20 16:45:41 +01:00
Paul Chote
dcd8eccee4
Replace ResourceLayer references with IResourceLayer in traits/warheads.
2021-03-20 16:45:41 +01:00
Paul Chote
0b93556c06
Add resource updating methods to IResourceLayer.
2021-03-20 16:45:41 +01:00
teinarss
4a1e4f3e16
Use expression body syntax
2021-03-07 13:00:52 +00:00
Paul Chote
fb0031d34a
Rename remaining Stance references to PlayerRelationship.
2021-02-04 23:14:09 +01:00
abcdefg30
aac3174efc
Rename Stances to Relationships in the yaml api
2020-12-11 17:13:02 +01:00
reaperrr
cac9940736
Support 'inaccuracy' on effect warhead
...
Purely cosmetic, allows to 'fake' slight inaccuracy without
affecting game balance on weapons like light machine guns.
2020-11-14 16:06:21 +01:00
abcdefg30
10f645bf77
Replace usage of the Stances dict by a method call
2020-11-14 11:04:41 +00: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
Paul Chote
cd9bf53e1a
Use nameof() to reference image fields.
2020-09-12 17:52:46 +02:00
Paul Chote
7803686aec
Rewrite sequence linting / missing file handling.
...
- Distinguish between missing sequences and missing sprites
- Lint default sequences as well as maps
- Improved performance
- Correctly handle null images
2020-09-12 17:52:46 +02:00
reaperrr
4505053618
Simplify CreateEffectWarhead code
...
Simplified and streamlined code,
based on past feedback and suggestions.
Note: The new methods will move to
Warhead later, once they're used by more
than one warhead.
2020-08-20 20:46:58 +02:00
teinarss
9c4fd0e3d3
Use Null-Propagation Operator
2020-08-19 18:11:07 +01:00
teinarss
27f1a7ab27
Use out var syntax
2020-08-19 18:11:07 +01:00
Paul Chote
ef69a3de66
Use nameof() in PaletteReference.
2020-08-15 13:41:45 +02:00
teinarss
19b02875c7
Use Tuple syntax
2020-08-15 10:37:10 +01:00
Mustafa Alperen Seki
1ae53220d6
Add CurrentMuzzleFacing to FireClusterWarhead.
2020-08-09 13:18:39 +02:00
Mustafa Alperen Seki
04bfd62f2f
Fix FireClusterWarhead playing wrong Report sound.
2020-07-15 23:55:01 +02:00
reaperrr
baf58f53b3
Adapt SpreadDamageWH to ImpactOrientation
...
The ImpactOrientation needs to be computed from
point of impact to target if the target wasn't hit directly.
Also adapted warhead code to use WarheadArgs consistently,
as well as pass HitShape instead of just HitShapeInfo
(both needed for future and/or downstream features).
2020-07-12 19:52:55 +02:00
Pavel Penev
8c394a4cb5
Created FlashPaletteEffectWarhead and removed the hardcoded flashing from NukeLaunch
...
Not actually hardcoded, but there was a hard dependency in NukeLaunch on FlashPaletteEffect and explicit flashing checks.
2020-07-10 13:22:54 +02:00
Paul Chote
2cfacc2c7d
ProjectileArgs facing -> WAngle.
2020-06-01 21:34:32 +02:00
Pavel Penev
4740266308
Added DamageCalculationType enum to SpreadDamageWarhead
2020-05-27 10:28:25 +02:00
Pavel Penev
78139413d7
Equalized the DoImpact methods in damage warheads
2020-05-27 10:28:25 +02:00
Pavel Penev
f0578a75f4
Cleaned up DamageWarhead
...
Reordered methods and fixed access modifiers. Also removed unused using statements from warheads.
2020-05-27 10:28:25 +02:00
reaperrr
a68467292e
Use TargetType.Invalid checks instead of IsValidFor
2020-05-09 17:59:23 +02:00
reaperrr
978c69d0c3
Make Warhead.IsValidTarget method protected
...
IsValidTarget is never called from outside warheads.
2020-05-09 17:59:23 +02:00
reaperrr
3eabc59921
Make resource warheads AirThreshold-aware
2020-05-09 17:59:23 +02:00
reaperrr
2b3d99fac2
Sanitize resource warheads
...
- Fix potential crash due to invalid target (no CenterPosition)
- Fix potential crash on multiple ResourceLayers
2020-05-09 17:59:23 +02:00
reaperrr
2bdefe0e9e
Move AirThreshold to Warhead
...
To reduce duplication and for later use in more warheads.
2020-05-09 17:59:23 +02:00
reaperrr
de81fc2aca
Minor CreateEffectWarhead optimization
...
Palette only matters if we actually display an explosion.
2020-05-09 17:59:23 +02:00
reaperrr
715dfa4541
Use args in FireClusterWarhead methods
...
Instead of directly passing damage modifiers.
2020-05-09 17:56:08 +02:00
reaperrr
ac57a37224
DamageWarhead polish
...
Use BitSet.IsEmpty.
2020-05-09 17:56:08 +02:00
reaperrr
2b4035979b
Make all warheads use WarheadArgs
...
Instead of passing damageModifiers directly.
2020-05-02 03:09:18 +03:00
Matthias Mailänder
70babb4067
Validate the target before querying it's center position.
2020-05-01 16:53:29 +02:00
Matthias Mailänder
3603e6373d
Check for invalid targets.
2020-04-30 01:42:19 -05:00
reaperrr
9dcba8710b
Add turret-linking support to HitShape
...
Allows to link a HitShape to the
position and facing of a turret.
2020-01-25 13:38:35 +01:00
Pavel Penev
b00154e2bc
Created ShakeScreenWarhead and removed the hardcoded shaking from NukeLaunch and MadTank
2020-01-24 13:09:37 +01:00
reaperrr
6220d7e62e
Introduce WarheadArgs
...
- Passes additional arguments to warheads on impact
- Uses that to reduce parameter count of DoImpact by 1
2020-01-21 19:31:34 +01:00
abcdefg30
23b3c237b7
Update the year numbers in all license headers to 2020
2020-01-05 17:00:34 +00:00
reaperrr
8edd202b64
Move InflictDamage method back to DamageWarhead
...
From TargetDamageWarhead.
Saves a few lines and allows warheads that are not
TargetDamageWarhead-based to use it.
2019-08-27 23:05:19 +02:00
reaperrr
1c03fb9e51
Revert Simplify CreateEffectWarhead
...
Reverts #16312 .
2019-07-07 19:15:08 +02:00
reaperrr
3735c60533
Simplify CreateEffectWarhead
2019-05-24 20:08:33 +01:00
Paul Chote
78a70be0d4
Fix and enable SA1133, SA1134 style rules.
2019-05-24 10:47:57 +02:00
Zimmermann Gyula
2648764ee3
Add FireClusterWarhead
2019-05-09 22:28:46 +01:00
Paul Chote
ab4a7e3558
Replace System.Drawing primitives with our own.
2019-03-04 18:26:42 +00:00
abcdefg30
cadbd0d9ab
Change the year number in all cs headers from 2018 to 2019
2019-01-26 23:15:21 +01:00
rob-v
9ed2ffea91
Fix Warhead.IsValidAgainst (FrozenActor.Owner null)
2019-01-19 12:03:15 +00:00
Mustafa Alperen Seki
6a599e57f6
Remove check for full health for negative damage warheads
2018-11-21 19:25:45 +01:00
Andre Mohren
99de33bbe3
Added smudge chance.
2018-11-21 18:00:11 +01:00