Commit Graph

87 Commits

Author SHA1 Message Date
Andre Mohren
6810469634 Updated copyright years. 2021-06-29 18:33:21 -05:00
Matthias Mailänder
5a0bcc01a6 Add a lint check for trait placement on hardcoded actor names. 2021-04-11 20:20:00 +02:00
Paul Chote
d52ba83f96 Replace terniary null checks with coalescing. 2021-03-08 18:11:25 +01:00
Paul Chote
fb0031d34a Rename remaining Stance references to PlayerRelationship. 2021-02-04 23:14:09 +01:00
Paul Chote
8c9b9df125 Change WithColoredOverlay to use a color instead of a palette. 2021-01-06 00:06:51 +01:00
Paul Chote
b88495c689 Remove palettes from base IRenderable. 2021-01-06 00:06:51 +01:00
abcdefg30
aac3174efc Rename Stances to Relationships in the yaml api 2020-12-11 17:13:02 +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
Andre Mohren
006a87692a Removed unused imports. 2020-07-28 18:22:51 +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
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
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
88cdad4189 Add support for polygon selection shapes. 2020-03-24 00:07:10 -05: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
Paul Chote
242ebc5da9 Fix FrozenUnderFog visibility calculation when fog is disabled. 2019-05-16 18:23:47 +02:00
Paul Chote
ab4a7e3558 Replace System.Drawing primitives with our own. 2019-03-04 18:26:42 +00:00
Oliver Brakmann
6841da286c Fix pre-placed frozen actors not being targetable 2019-02-20 16:31:13 +00:00
Paul Chote
95dc9cb1d2 Defer UpdateFrozenActor until the end of the tick.
Updating the frozen actor calls Actor.GetTargetablePositions,
and so we must guarantee that Created has been called for
the ITargetablePositions traits first.
2019-02-07 19:50:50 +00:00
Paul Chote
2b6ebcd09c Fix inconsistent FrozenActor state on capture/destruction. 2019-02-03 20:21:51 +01:00
Paul Chote
d6d1f3a06d Fix FrozenUnderFog / FrozenActor visibility consistency.
This fixes cases where both objects return visible / not
when queried at the wrong time during a tick.
2019-01-27 15:21:13 +01: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
224377f078 Track visibility modifiers on FrozenActors. 2018-12-17 22:19:26 +01:00
reaperrr
ccd070afd6 Make IRenderModifier require explicit implementation 2018-04-29 11:59:49 +01:00
Arular101
8a60918841 Update copyright notice year to 2018 2018-01-17 00:47:34 +01:00
Paul Chote
f8abd5d319 Serialize the correct player in FrozenActor-targeting orders. 2018-01-01 16:01:44 +01:00
Paul Chote
36fccbc453 Add Checkbox/Dropdown to lobby options yaml fields. 2017-12-12 22:43:11 +01: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
fa65fef4d1 Add IRenderModifier.ModifyScreenBounds to support WithShadow. 2017-12-11 19:45:07 +01:00
reaperrr
8ec3d5ddb8 Require explicit ITickRender 2017-10-07 10:17:11 +02:00
reaperrr
28e1f391e0 Make ITick require explicit implementation 2017-09-16 15:51:37 +02:00
reaperrr
fdb3866238 Remove FootprintUtils 2017-07-13 17:43:41 +02:00
abcdefg30
aecfff905d Throw a more detailed error message when creating invalid frozen actors 2017-05-28 14:02:18 +02:00
atlimit8
770efd710b Remove DisabledOverlay using WithColoredOverlay & remove IDisable from Husk 2017-04-30 09:46:21 -05:00
abc013
851c8e6075 Changed 'UpgradeOverlay' to 'WithColoredOverlay' 2017-02-03 18:09:56 +01: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
Oliver Brakmann
05c2081143 Merge pull request #12458 from pchote/map-top-targetability
Reduce aircraft not being targetable at the north edge of the map.
2016-12-21 21:14:19 +01:00
reaperrr
d9d1fe2e73 Move VisibilityType enum to TraitsInterfaces
VisibilityTypes are used by several other traits as well, so it makes more sense to move it to a common, shared location.
2016-12-10 13:45:12 +01:00
Paul Chote
fd1d030cb0 Add GroundPosition support to HiddenUnder(Shroud|Fog). 2016-12-08 18:16:30 +00:00
Paul Chote
b1f99dd601 Add GroundPosition VisibilityType. 2016-11-26 21:10:44 +00:00
Paul Chote
eb884ca76f Convert lobby checkboxes to new options backend. 2016-06-04 10:03:06 +01:00
reaperrr
e59c7a8b1f Make FrozenUnderFog count passable footprint cells
To avoid crashing on actors with only passable footprint cells.
2016-05-15 14:56:08 +02:00
Paul Chote
183e5ae7ab Generate initial frozen renderables for all map-placed actors. 2016-04-21 17:21:29 +01: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