Commit Graph

1698 Commits

Author SHA1 Message Date
Paul Chote
3f67feab0e Rename boolean LobbyOption fields. 2017-12-12 22:43:11 +01:00
Paul Chote
36fccbc453 Add Checkbox/Dropdown to lobby options yaml fields. 2017-12-12 22:43:11 +01:00
Paul Chote
ea32c758eb Expose default UI labels and tooltips to yaml. 2017-12-12 22:43:11 +01:00
Paul Chote
2c17780b94 Make ShroudInfo fields readonly. 2017-12-12 22:43:11 +01:00
Paul Chote
97cdce7448 Add additional metadata to lobby options. 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
ff5b4b15b3 Introduce IDecorationBounds to replace Actor.SelectionOverlayBounds. 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
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
Paul Chote
46f6263061 Update ScreenMap state in a single pass at the end of the tick. 2017-12-11 19:45:07 +01:00
Paul Chote
9e18ec7314 Simplify ScreenMap bounds checking. 2017-12-11 19:45:07 +01:00
RoosterDragon
7a7eed4fb7 Add FirstEnabledTraitOrDefault helper method.
This avoids the allocations caused by LINQ when using traits.FirstOrDefault(Exts.IsTraitEnabled). This is important in FrozenActorLayer.RefreshState which is called very often. We apply the new helper method to all areas using the old pattern. An overload that takes an array allows arrays to be enumerated without causing allocations.
2017-12-10 13:39:24 +00:00
RoosterDragon
62ab6ae6f1 OccupiedCells and TargetableCells must return arrays, not just enumerables.
This allows callers to efficiently enumerate these returned collections without the allocation and overhead imposed by the IEnumerable interface. All implementations were already returning arrays, so this only required a signature change.
2017-12-07 20:39:30 +02:00
Paul Chote
9d2935935c Add a debug visualization for screen map rectangles. 2017-12-04 23:10:23 +01:00
Paul Chote
1a1c6368fc Fix ScreenMap handling of flipped sprites. 2017-12-04 03:54:23 +02:00
reaperrr
56b6aabbb8 Use new IAutoRenderSize for determining actor render bounds 2017-11-21 01:00:09 +02:00
reaperrr
be290cfabd Split Actor.Bounds into RenderBounds and SelectableBounds
Additionally, internally renamed VisualBounds to SelectionOverlayBounds to avoid confusion with RenderBounds.

This step was necessary to prevent actors with selectable area smaller than their graphics to be removed too early from ScreenMap even though part of the graphics should still be visible.
RA cruisers were a prime example, but to a lesser extent several other actors were affected as well.

This separation also serves as preparation to determine the final RenderBounds from multiple source bounds later, to fix the remaining ScreenMap issues (building 'bibs', aircraft shadows).
2017-11-21 01:00:09 +02:00
Paul Chote
47634b25f9 Remove IFogVisibilityModifier. 2017-11-03 09:56:00 +01:00
Paul Chote
29c423772f Serialize order Target directly instead of TargetActor/TargetCell. 2017-10-26 18:48:41 +03:00
Paul Chote
4896a90b8d Add plumbing to issue orders against a generic Target. 2017-10-15 19:07:46 +02:00
reaperrr
8533debc44 Require explicit INotifyAddedToWorld and INotifyRemovedFromWorld 2017-10-07 10:17:11 +02:00
reaperrr
8ec3d5ddb8 Require explicit ITickRender 2017-10-07 10:17:11 +02:00
reaperrr
0ce3c113e1 Require explicit ITargetableCells 2017-10-07 10:17:11 +02:00
reaperrr
7ca9679b34 Require explicit ITargetablePositions 2017-10-07 10:17:11 +02:00
reaperrr
9aaf800bca Require explicit INotifyActorDisposing 2017-09-28 13:14:08 +02:00
reaperrr
5026dfe5d3 Require explicit INotifyCreated 2017-09-28 13:14:08 +02:00
reaperrr
6f790938d0 Require explicit IGameOver 2017-09-28 13:14:08 +02:00
reaperrr
2b391d5724 Require explicit ICreatePlayers 2017-09-28 13:14:08 +02:00
reaperrr
d7c2c6afc4 Require explicit INotifySelected and INotifySelection 2017-09-28 13:14:08 +02:00
reaperrr
a8e6cd2604 Require explicit IRenderOverlay 2017-09-28 13:14:08 +02:00
reaperrr
4ae92a5c22 Only add partitioned effects to ScreenMap if (current) bounds are valid
This serves to avoid adding effect where either width or height is 0.
2017-09-24 10:54:58 +01:00
Matthias Mailänder
1aebf9857c Add support for only rendering effects inside screen bounds 2017-09-17 12:52:04 +01:00
reaperrr
28e1f391e0 Make ITick require explicit implementation 2017-09-16 15:51:37 +02:00
reaperrr
03c3a5f310 Make ITick implementations explicit in OpenRA.Game 2017-09-16 15:51:37 +02:00
reaperrr
761a4f29ab Make INotifyIdle and INotifyBecomingIdle require explicit implementation 2017-09-16 15:51:37 +02:00
Paul Chote
f5e38a4e2c Move ISeedableResource interface to Mods.Common. 2017-09-10 18:36:39 +02:00
Paul Chote
1de767d9bf Move objectives interfaces to Mods.Common. 2017-09-10 18:36:39 +02:00
Paul Chote
3f72076e1a Move radar signature interfaces to Mods.Common. 2017-09-10 18:36:39 +02:00
Paul Chote
e54cf9acc3 Move linter interfaces to Mods.Common. 2017-09-10 18:36:39 +02:00
Paul Chote
0648fc9f31 Move damage notification interfaces to Mods.Common. 2017-09-10 18:36:39 +02:00
Paul Chote
e3212d1e64 Move the IMove interface to Mods.Common. 2017-09-10 18:36:39 +02:00
Matthias Mailänder
8ae2a65d9d Shroud is actually a player trait. 2017-08-26 22:47:48 +01:00
rob-v
97306f2bcd Move DeveloperMode trait to Mods.Common 2017-07-23 15:08:24 +02:00
rob-v
d4e9e0e069 Add Visualization chat commands 2017-07-23 15:08:24 +02:00
Paul Chote
b0906e1836 Add a bot type identifier. 2017-07-07 21:31:45 +01:00
reaperrr
9b137afa6d Add ITargetableCells interface 2017-07-06 01:42:55 +02:00
rob-v
78bedb0513 Fix IsSinglePlayer 2017-06-27 22:43:15 +01:00
reaperrr
82758a8bef Add TargetableOffsets to HitShape
And remove ITargetablePositions from Building.
Also, added UseFootprintOffsets to replicate the old Building behavior for easier setup of TargetablePositions for buildings.
2017-06-04 00:07:08 +02:00