Commit Graph

92 Commits

Author SHA1 Message Date
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
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
Paul Chote
b803034cef Resolve yaml removals in weapon definitions. 2017-01-24 22:19:17 +00:00
Taryn Hill
43317e0f5d Update copyright notice year to 2017 2016-12-31 23:46:13 -06:00
Ori Bar
fabe799907 Remove DelayedAction from WeaponInfo and replace it with the more serialization friendly DelayedImpact 2016-11-04 02:24:43 +02:00
Matthias Mailänder
71743b3b4a Only sync projectiles and future synced effects. 2016-06-13 14:35:28 +02:00
Paul Chote
e71225496b Clarify GPL version. 2016-02-21 16:30:48 +00:00
Paul Chote
b396965fd9 Update licence header year. 2016-02-21 16:27:31 +00:00
reaperrr
56ab3f43da Remove bitrotted WeaponInfo.Charges
There is no logic attached anymore (or never was).
2016-01-24 12:58:39 +01:00
RoosterDragon
21292061f9 Added "PERF: Avoid LINQ." comments. 2015-12-12 21:05:13 +00:00
RoosterDragon
0fab3ec1b2 Remove LINQ in some performance critical AutoTarget paths. 2015-12-12 20:55:18 +00:00
RoosterDragon
dcf375a412 Store Targetables in Actor.
This can be used to avoid several lookups for these traits, as well as allow Actor to provide specialised methods to deal with target types efficiently. This also reduces some code duplication.
2015-12-12 20:55:17 +00:00
Paul Chote
03693a06eb Add CurrentSource parameter to ProjectileArgs. 2015-12-01 07:47:39 +02:00
atlimit8
74a9dc6793 Added IRangeMultiplier 2015-09-24 16:37:43 -05:00
atlimit8
fadfd179cb Cache FrozenActor ITargetable.TargetTypes union 2015-09-02 23:19:00 -05:00
atlimit8
f5c3575c5a Support multiple ITargetable traits 2015-09-02 23:14:40 -05:00
RoosterDragon
2f9ca36506 Update WeaponInfo to use HashSets for some fields directly. 2015-08-27 21:48:12 +01:00
Matthias Mailänder
7447e0bf93 rename WRange to WDist 2015-07-09 10:55:38 +02:00
penev92
fe94b7686e Introduce IWarhead and move Warhead to Mods.Common 2015-07-06 22:24:20 +03:00
RoosterDragon
fb0cab7481 Cache results of TraitsImplementing calls.
If a class is caching the TraitsImplementing enumerable, instead cache the results of enumerating it to an array. The avoids having to enumerate the sequence each time it is needed.
2015-04-25 20:42:27 +01:00
RoosterDragon
ab2ef0ba03 Improve performance of target validation.
The Warhead and WeaponInfo classes now maintain preconstructed sets of valid and invalid targets to speed up validation checks since LINQ Intersect no longer has to be called (which recreates the sets internally each time).

Fixed minor bugs in the AI where it was repeating the validation logic but failing to account for invalid targets.
2015-04-02 21:11:12 +01:00
reaperrr
fb710f15bb Move projectile palette definition from weapon to projectile effects 2015-03-27 00:04:36 +01:00
abcdefg30
8ca61aa917 Updated all year numbers 2015-01-09 21:18:05 +01:00
Paul Chote
7bc8c171e8 Minor style fixes. 2014-09-29 21:01:44 +13:00
Paul Chote
f463407d8d Fix a loop closure bug in the weapons code.
Fixes #6597. Fixes #6599.
2014-09-29 20:57:20 +13:00
Paul Chote
caecf2d82a Move inaccuracy modifier queries outside the projectile ctors. Fixes #6449. 2014-09-20 21:43:00 +12:00
UberWaffe
e3e5e9eb00 Adds Diplomacy keywords for ValidTarget checks.
Changes:

Allows diplomacy stance checks to be done on warheads and weapons, using keywords in ValidTargets and InvalidTargets.
2014-08-24 07:00:21 +02:00
UberWaffe
76ccb0cf00 Changes Weapon.Impact() to use Target (from WPos). 2014-08-23 11:23:34 +02:00
Paul Chote
57ba1b54b4 Convert weapon plumbing to use integer damage modifiers. 2014-08-23 17:14:10 +12:00
reaperrr
4469b5f5ca Introduces ReloadModifier
and renames ROF -> ReloadDelay
2014-08-19 02:59:50 +02:00
UberWaffe
c972b39687 Custom Warheads refactor
Changes included:

Warhead code split out of weapon code and refactored.
Warhead functionality now split into several classes, each handling one effect/impact.

Additional custom warheads can now be defined and called via yaml.
Custom warheads inherit the abstract class Warhead,
which provides target check functions.

Custom warheads have to define their own impact functions,
and can also define their own replacement for check
functions.
2014-08-03 17:10:44 +02:00
reaperrr
eb96b72878 Add MaxSpread to Warhead to allow setting a specific area of effect. 2014-07-12 12:14:56 +02:00
reaperrr
fabca5dca6 Move ProneDamage modifier from TakeCover to Warhead.
Rename it to ProneModifier and convert it to integer.
2014-07-08 21:05:42 +02:00
Paul Chote
9487f49cd5 Replace WPos.ToCPos -> Map.CellContaining. 2014-06-27 23:30:40 +12:00
Paul Chote
5560f276ca Map: Rename IsInMap -> Contains. 2014-06-27 22:07:03 +12:00
Matthias Mailänder
e607c04cce let harvester splatter resources when exploding
closes #2346
2014-06-20 11:11:31 +02:00
Matthias Mailänder
3e627d2eba rename ore to the more generic name resources everywhere 2014-06-20 11:11:31 +02:00
ScottNZ
dbffce81a6 Remove unused usings 2014-06-15 22:16:40 +12:00
Pavlos Touboulidis
c282fa1077 Move GetTerrainIndex/Info from WorldUtils to Map 2014-06-13 13:57:32 +03:00
RoosterDragon
2e992a7310 Changed MiniYaml.NodesDict property into a method.
Method is now called ToDictionary.
- Cached a few invocations into locals which should prevent some redundant evaluation.
- Added ToDictionary overloads that take projection functions for the keys and elements, since several callsites were doing a subsequent Linq.ToDictionary call to get this.
2014-06-09 17:06:42 +01:00
RoosterDragon
0c8bdff5be Formatting fixes.
Spaces to tabs, indents, etc.
2014-05-26 18:10:59 +01:00
reaperrr
98e48ae991 Converts InfDeath from integer to string.
Wire up updated DeathSounds for all mods.
2014-05-14 15:24:06 +02:00
reaperrr
c9b162ec3c Added ExplosionPalette and WaterExplosionPalette traits to Warheads.
This is needed for TS water splashes, for example (they use unit*.pal instead of anim.pal).
Defaults to "effect".
2014-04-18 01:23:09 +02:00
Matthias Mailänder
3de1516747 allow invalid terrain targets for Air/Water bound weapons
made terrain targeting consistent with actors
2014-01-04 09:57:09 +01:00
Matthias Mailänder
027a281ae3 define torpedoes in a more generic way
fixes #3252 and closes #2097
2014-01-04 09:39:43 +01:00
Matthias Mailänder
4b43bb1cad replace misleading Underwater bool with what it really does 2014-01-04 09:39:43 +01:00
Paul Chote
ecdae4cbbe Convert weapons to world coords. 2013-12-26 19:45:12 +13:00
ScottNZ
1aebf27abd Create a new damage model for the MAD Tank. Fixes #4105 2013-11-10 21:38:48 +13:00
ScottNZ
9eff54c217 Add MAD Tank and InvalidTargets field to WeaponInfo 2013-11-02 17:19:08 +13:00