Commit Graph

539 Commits

Author SHA1 Message Date
reaperrr
0eb0a5a2bd Add WithHarvesterSpriteBody
And move PrefixByFullness there.
Also put it into Mods.Cnc, as RA is the only shipping mod
using this.
2019-04-14 19:09:28 +02:00
reaperrr
404eee23f9 Adapt WithMoveAnimation to INotifyMoving
And add ValidMovementTypes for configurability.
2019-03-30 16:24:47 +00:00
reaperrr
a10af382b4 Add plumbing for notifying traits of movement
More precisely, about start and stop of movement.
2019-03-30 16:24:47 +00:00
Mustafa Alperen Seki
6c9d961bb5 Polishing Hovers 2019-03-22 21:12:36 +01:00
Mustafa Alperen Seki
b8a85091d4 Make WithRangeCircle conditional 2019-03-10 02:39:27 +01:00
Paul Chote
3e404f6ac2 Remove HSLColor. 2019-03-04 18:26:42 +00:00
Paul Chote
ab4a7e3558 Replace System.Drawing primitives with our own. 2019-03-04 18:26:42 +00:00
Andre Mohren
42446ac9ba Implemented trait defined Rollovers. 2019-02-22 21:15:33 +00:00
Paul Chote
c627a59b54 Fix self parameter name in DrawLineToTarget. 2019-01-26 22:53:46 +00:00
Paul Chote
7d85c1e81f Remove FrameEndTask from DrawLineToTarget.
This is no longer needed and causes ordering
issues when the unit becomes idle in the same
tick that SetTargetLine is called.
2019-01-26 22:53:46 +00:00
abcdefg30
cadbd0d9ab Change the year number in all cs headers from 2018 to 2019 2019-01-26 23:15:21 +01:00
reaperrr
54c2894b4e Split off last bot modules
And dissolve AI namespace.
There would have been so little left in Common.AI,
that keeping it made no sense anymore.
2018-12-31 10:56:01 +00:00
reaperrr
be310ab6a6 Streamline resource anim traits
- Replaces WithSiloAnimation with
  WithResourceLevelSpriteBody.

PlayFetchIndex on a With*Animation trait conflicts
with the animation concept, as it's bound to conflict
with pretty much all 'normal' animation traits and
blocks progress on the animation priority system.

We also already have multiple similar SpriteBody traits,
like WithGateSpriteBody and WithWallSpriteBody.

- Rename WithResources to WithResourceLevelOverlay

Make name more accurate and consistent with sprite body
equivalent.
Also fix TS silo yaml setup (bleed setup stems from times
before WithResources was introduced).
2018-12-24 21:29:42 +13:00
reaperrr
305d82f887 Replace WithChargeAnimation with -SpriteBody
PlayFetchIndex on a With*Animation trait conflicts with the animation
concept, as it's bound to conflict with pretty much all 'normal'
animation traits and blocks progress on the animation priority system.

We also already have multiple precedent SpriteBody traits of similar kind,
like WithGateSpriteBody and WithWallSpriteBody.
2018-12-24 21:29:42 +13:00
reaperrr
7ed67338f3 Allow forcing sprite body Z position to ground 2018-12-23 17:16:06 +13:00
Andre Mohren
b1a44086a0 Removed unused using directives. 2018-11-17 17:23:22 +00:00
Ivaylo Draganov
31f2441709 Draw target lines for allied players and observers 2018-11-04 06:34:43 +01:00
abcdefg30
c0ee199ad1 Support multiple Production traits in WithProductionOverlay. 2018-11-03 17:30:05 +01:00
abcdefg30
5e5183549c Overhaul ProductionBar:
- Is now a conditional trait
- Now respects multiple Production trait instances
- ProductionType is now required
2018-11-03 17:30:05 +01:00
Paul Chote
fc6ada38f4 Revoke WithMakeAnimation condition at the end of the tick.
This fixes traits becoming enabled for a tick
between the animation completing and the actor
being removed from the world.
2018-11-03 15:28:05 +01:00
Paul Chote
47a470e945 Remove legacy Building plumbing. 2018-11-03 15:09:14 +01:00
abcdefg30
7e20bdd7ea Introduce a new CarryableHarvester trait 2018-11-02 22:24:56 +00:00
abcdefg30
d46e47d16d Fix target lines still being visible after an owner change 2018-11-01 02:09:36 +01:00
abcdefg30
9cbe7bc62d Fix infantry getting stuck in the last attack frame 2018-10-28 02:13:18 +01:00
reaperrr
3e73357619 Remove IsIdle check from DrawLineToTarget.OnBecomingIdle
OnBecomingIdle is triggered when IsIdle becomes true, so this check is bogus.
2018-10-15 22:53:57 +02:00
Paul Chote
14607f55c5 Replace INotifyBuildComplete in render traits with conditions. 2018-10-07 19:29:34 +02:00
Mustafa Alperen Seki
536f5f05a8 Make WithBuildingPlacedAnimation conditional 2018-10-06 13:31:47 +01:00
Andre Mohren
3bfcecd539 Refactored ProductionQueue to support different production styles. 2018-09-30 16:58:49 +02:00
Andre Mohren
28623ce54c Allow usage of different palette for WithSpriteTurret 2018-09-29 19:47:47 +02:00
reaperrr
8144fca5be Merge repair and rearm anim traits into WithResupplyAnimation
This is the safest approach to avoid conflicts/visual glitches when the host is responsible for both resupply types.
The new trait will simply play a looping animation as long as the actor is resupplying in any form.
2018-09-27 16:38:08 +02:00
reaperrr
1098804f9b Make WithSpriteBody always use Animation.PlayRepeating
... for looped sequences.

PlayCustomAnimationRepeating looping back into itself via Action instead of simply using Animation.PlayRepeating is weird, and in fact causes a slight 'desync' in animation speed with Animation.PlayRepeating in at least one downstream mod.
2018-09-24 22:06:10 +02:00
Matthias Mailänder
cb05d8a98d Fix CustomTerrainDebugOverlay not rendered in isometric mods 2018-09-19 20:04:41 +02:00
reaperrr
bbf6e38faa Always leave trails when no TerrainTypes are defined
Requiring terrain types is bogus, as it unnecessarily complicates using this trait for airborne units.
2018-09-10 19:45:02 +02:00
Paul Chote
1b1521812c Add EnabledByDefault check to WithInfantryBody. 2018-08-11 14:30:01 +02:00
Paul Chote
d110a21bfe Add missing EnabledByDefault checks to WithSpriteBodyInfo subclasses. 2018-08-11 14:30:01 +02:00
Chris Forbes
51e000599a Convert crushclasses to bitset 2018-07-28 21:28:46 +01:00
Chris Forbes
d4ef841678 Convert masses of HashSet<string> to BitSet<DamageType> 2018-07-28 20:12:42 +01:00
Mustafa Alperen Seki
f05fc0cae8 Add WithProductionOverlay>Queues 2018-07-28 16:17:47 +01:00
reaperrr
9d24c40f92 Fix various Mods.Common animation traits not supporting actors having multiple sprite bodies 2018-07-01 13:16:07 +02:00
reaperrr
0d0d2e0ae3 Play WithAcceptDeliveredCashAnimation only on the assigned WithSpriteBody 2018-07-01 13:16:07 +02:00
Paul Chote
6b6167d37c Use the default sprite sequence for automatic mouse bounds. 2018-07-01 01:20:55 +02:00
reaperrr
2136d6dc4a Split and refactor aim animation from WithAttackAnimation
Splitting it from the attack animation, triggering start and end of the aiming animation via interface, as well as removing ReloadPrefix (in favor of switching sprite bodies via condition when reloading) allows us to drop updating via ITick, which in turn will make it much easier to ultimately make this trait compatible with other animation traits, once the priority system lands.
2018-06-03 12:23:54 +01:00
reaperrr
7d4956e309 Refactor WithTurretAimAnimation using INotifyAiming
Triggering start and end of the aiming animation via interface, as well as removing ReloadPrefix (in favor of switching sprite bodies via condition when reloading), allows us to drop updating via ITick, which in turn will make it much easier to ultimately make this trait compatible with other animation traits, once the priority system lands.
2018-06-03 12:23:54 +01:00
Paul Chote
eccfac7840 Add blink parameters to WithDecoration. 2018-06-02 18:12:08 +02:00
Paul Chote
bb34d4de49 Add conditional offset support to WithDecoration. 2018-06-02 18:12:08 +02:00
Paul Chote
2ef6f7c0cc Replace repair indicator effect with a Decoration subclass. 2018-06-02 18:12:08 +02:00
Paul Chote
768265bbd2 Unify TargetFlash handling around Targets. 2018-05-30 18:06:59 +02:00
reaperrr
3a82b13093 Make INotifyKilled require explicit implementation 2018-04-29 11:59:49 +01:00
reaperrr
7ca9aa5e0b Make INotifyDamage require explicit implementation 2018-04-29 11:59:49 +01:00
reaperrr
ccd070afd6 Make IRenderModifier require explicit implementation 2018-04-29 11:59:49 +01:00