Commit Graph

104 Commits

Author SHA1 Message Date
Paul Chote
ef69a3de66 Use nameof() in PaletteReference. 2020-08-15 13:41:45 +02:00
Paul Chote
75cb5c2166 Convert turret facings to WAngle relative to the body. 2020-08-09 19:43:53 +02:00
dnqbob
f67f8ed05e WithLandingCraftAnimation can stop on all movement 2020-08-09 13:22:56 +02:00
Andre Mohren
006a87692a Removed unused imports. 2020-07-28 18:22:51 +02:00
Paul Chote
aae497eff1 Pass pre-combined rotations into the rendering code. 2020-07-17 15:02:32 +02:00
Paul Chote
a2269e7ee7 Convert (Dynamic)FacingInit, (Dynamic)TurretFacingInit to WAngle. 2020-07-08 20:38:30 +02:00
Paul Chote
ae7cfa56b7 Restrict IActorPreviewInitInfo to ActorInit. 2020-06-19 17:57:56 +02:00
Paul Chote
b856613194 Add ISingleInstanceInit interface.
Inits that are logically singletons (e.g. actor
location or owner) should implement this interface
to avoid runtime inconsistencies.

Duplicate instances are rejected at init-time,
allowing simpler queries when they are used.
2020-06-19 17:57:56 +02:00
Paul Chote
6adf45bcb4 Convert IFacing.Facing and TurnSpeed to WAngle. 2020-06-12 18:35:41 +02:00
Paul Chote
b38018af9c Replace IActorInit with an abstract class.
A shared ValueActorInit<T> is introduced to reduce duplication
in the most common init cases, and an ActorInitActorReference
allow actors to be referenced by map.yaml name.
2020-06-08 19:18:38 +02:00
Paul Chote
c999b2d778 Convert QuantizeFacing to WAngle facings. 2020-05-28 21:23:51 +02:00
Paul Chote
7c6ec577dc Rewrite ActorInit queries. 2020-05-28 19:04:53 +02:00
Paul Chote
86f61298e6 Replace ITraitInfo interface with TraitInfo class. 2020-05-21 13:01:04 +02:00
Paul Chote
fe58ed1283 Animation facing -> WAngle. 2020-05-09 10:20:23 -05:00
Matthias Mailänder
86a7a0bd6c Move Render*Circle traits to their base traits. 2020-04-26 10:30:50 +02:00
Matthias Mailänder
b4edec215e Fix spy ignoring the target's faction. 2020-03-19 23:11:38 +01:00
Paul Chote
ce91c5a76f Fix WithDisguisingInfantryBody idle animation crash. 2020-03-01 14:43:12 +01:00
reaperrr
aa63696933 Update rule for WithPermanentInjury removal 2020-01-16 22:56:39 +01:00
Paul Chote
fe25fdf0ff Improve robustness of editor actor cell checks. 2020-01-12 18:30:50 +01:00
abcdefg30
23b3c237b7 Update the year numbers in all license headers to 2020 2020-01-05 17:00:34 +00:00
reaperrr
efc06a020b Move WithDeliveryAnimation to Mods.Common 2019-12-08 16:03:14 +00:00
Paul Chote
8e280ef0a7 Rename RangeCircleRenderable to RangeCircleAnnotationRenderable. 2019-10-20 23:46:33 +02:00
Paul Chote
0ff078968d Change IPlaceBuildingDecorationInfo to use annotations. 2019-10-20 23:46:33 +02:00
Paul Chote
1dc84f48de Migrate traits to IRenderAnnotations. 2019-10-20 23:46:33 +02:00
abcdefg30
1c965d812f Fix WithSpriteBody crashes 2019-05-29 20:58:45 +01:00
Paul Chote
78a70be0d4 Fix and enable SA1133, SA1134 style rules. 2019-05-24 10:47:57 +02:00
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
a10af382b4 Add plumbing for notifying traits of movement
More precisely, about start and stop of movement.
2019-03-30 16:24:47 +00: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
Chris Forbes
e292e88bff Improve RenderShroudCircle configuration. 2018-12-24 01:57:11 +01:00
Paul Chote
4723e5ddb9 Expose common actor Inits in the map editor. 2018-12-08 22:53:13 +01:00
Andre Mohren
b1a44086a0 Removed unused using directives. 2018-11-17 17:23:22 +00:00
Paul Chote
14607f55c5 Replace INotifyBuildComplete in render traits with conditions. 2018-10-07 19:29:34 +02:00
reaperrr
dd3c600258 Fix WithLandingCraftAnimation compatibility with elevated terrain 2018-10-06 13:11:10 +01:00
Paul Chote
d110a21bfe Add missing EnabledByDefault checks to WithSpriteBodyInfo subclasses. 2018-08-11 14:30:01 +02:00
reaperrr
496155ff0e Remove facing check from WithVoxelWalkerBody
`Mobile` now supports considering turning as `IsMoving`, so this check is no longer needed.
2018-07-19 22:09:43 +02:00
reaperrr
d060f885e8 Fix various Mods.Cnc animation traits not supporting actors having multiple sprite bodies 2018-07-01 13:16:07 +02:00
reaperrr
d90ff99e74 Replace WithReloadingSpriteTurret with conditions
WithReloadingSpriteTurret was bound to run into conflicts with any WithTurret*Animation traits due to overriding the turret sequence constantly via ITick.
Using (stacked) conditions instead avoids that.
2018-03-08 16:03:14 +01:00
Arular101
8a60918841 Update copyright notice year to 2018 2018-01-17 00:47:34 +01:00
Paul Chote
ee728be537 Fix WithCargo crash. 2018-01-01 19:25:50 +01:00
reaperrr
04fb0f209d Spatially partition some actor overlays 2017-12-23 17:56:11 +00:00
Paul Chote
c87409ed1a Remove legacy bounds code. 2017-12-11 19:45:07 +01:00
Paul Chote
6f5d035e79 Introduce IMouseBounds and split/rework mouse rectangles.
The render bounds for an actor now include the area covered
by bibs, shadows, and any other widgets. In many cases this
area is much larger than we really want to consider for
tooltips and mouse selection.

An optional Margin is added to Selectable to support cases
like infantry, where we want the mouse area of the actor
to be larger than the drawn selection box.
2017-12-11 19:45:07 +01:00
Paul Chote
8fcc80b05a Use IRender.ScreenBounds in ScreenMap.
Traits are now required to trigger a ScreenMap update whenever they
believe that their ScreenBounds have changed.
2017-12-11 19:45:07 +01:00
Paul Chote
86bfe28ade Add ScreenBounds method to IRender interface.
This method is expected to return Rectangles that cover
the region where Renderables returned by Render may exist.
2017-12-11 19:45:07 +01:00
reaperrr
c48ddbdfa5 Fix Mammoth Mk2 render bounds
And polish trait internals a little.
2017-11-29 11:39:24 +02:00
reaperrr
d21992130a Fix TS harvester render bounds 2017-11-29 11:39:24 +02:00
abcdefg30
4c707ad6a6 Fix WithDisguisingInfantryBody crashing when losing the disguise 2017-11-26 18:41:53 +01:00
Paul Chote
b898b5001a Rename AttackBase.IsAttacking to IsAiming to make its uses and assumptions clear. 2017-11-26 15:58:00 +01:00