Commit Graph

2053 Commits

Author SHA1 Message Date
Paul Chote
5425a5a28e Replace CanPowerDown with ToggleConditionOnOrder. 2017-12-27 20:18:27 +01:00
Mustafa Alperen Seki
7f77e4cf40 Remove ProductionDoorOverlay while transforming 2017-12-27 13:50:58 +00:00
Mustafa Alperen Seki
acf25354b0 Consider BuildAtProductionType for exit types too for normal ProductionQueue 2017-12-27 13:46:20 +00:00
Mustafa Alperen Seki
f7de5d46be Allow GrantConditionOnPrerequisite to work on Player: 2017-12-27 02:31:07 +01:00
Paul Chote
ec97214c16 Fix ProductionOverlay crash. 2017-12-25 21:34:31 +01:00
Unknown
4be593123d add me (jongleur1983) to AUTHORS
#14558: MovingToRefinery takes actor instead of CPos

DeliveryOffset (previously added by the harvester) is now taken into account by the AutoCarryable
fix whitespaces
2017-12-25 03:52:44 +01:00
Peter Amrehn
73bd80ebc5 #14542: order CarrryAll to the target's location, not to 0,0
(which is in order.TargetLocation
#14542: don't use deprecated TargetActor property, replace by

Target.Actor.Location
2017-12-25 03:52:44 +01:00
abcdefg30
a6258485c9 Add a "EffectiveOwnerFromOwner" property to change the effective owner of a spawned actor 2017-12-24 00:41:15 +01:00
abcdefg30
b99d21b818 Add support for carrying effective owners over to husk actors 2017-12-24 00:41:15 +01:00
abcdefg30
b9987dcbda Add a fallback to InternalOwner if the victim was defeated 2017-12-24 00:41:15 +01:00
abcdefg30
d4d9959159 Let Husk implement IEffectiveOwner 2017-12-24 00:41:15 +01:00
abcdefg30
503b91d391 Remove an unused using 2017-12-24 00:41:15 +01:00
abcdefg30
bd52e56aaf Add the possibility to deny spawning actors for dead players 2017-12-24 00:41:15 +01:00
Mustafa Alperen Seki
e2f3989f46 Fix that conditions for InitialUnits are not given 2017-12-23 21:22:31 +01:00
reaperrr
04fb0f209d Spatially partition some actor overlays 2017-12-23 17:56:11 +00:00
Paul Chote
2794b14f52 Calculate actor preview bounds directly. 2017-12-23 17:16:13 +00:00
abcdefg30
3af3299921 Fix a crash in PlaceBuilding.cs 2017-12-22 09:06:27 +00:00
Paul Chote
1a73a2578b Make GivesBounty conditional. 2017-12-21 23:52:04 +01:00
Paul Chote
e79680e22c Add LobbyPrerequisiteCheckbox trait. 2017-12-21 23:52:04 +01:00
reaperrr
01a88862b3 Remove IDisable for good 2017-12-17 21:18:44 +00:00
reaperrr
c1cba4ecc1 Make Gate more independent from Building and pausable-conditional
Replace Gate IsDisabled checks with IsTraitDisabled/Paused checks
2017-12-17 21:18:44 +00:00
reaperrr
383840135f Replace IsDisabled checks in production with IsTraitPaused/Disabled checks
Note: We might want to separate IsTraitDisabled checks later (possibly make the latter cancel the currently produced item), but that can be done in a follow-up.
2017-12-17 21:18:44 +00:00
RoosterDragon
bf21fc5213 Use StringComparison.Ordinal for StartsWith checks in TechTree.cs. 2017-12-17 01:28:25 +01:00
RoosterDragon
13edaefcac Avoid LINQ when building map domains. 2017-12-17 01:28:25 +01:00
RoosterDragon
dd2ae9fe5e Avoid LINQ in some Tick methods.
As Tick is called often, avoiding allocation overhead in these methods is useful.
2017-12-17 01:28:25 +01:00
RoosterDragon
c8c7629bce Convert some stray spaces to tabs. 2017-12-16 15:53:03 +00:00
GSonderling
488cec64b8 Added support for filtering exits by production type. 2017-12-13 04:08:52 +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
2e24c14503 Make SpawnMPUnitsInfo fields readonly. 2017-12-12 22:43:11 +01:00
Paul Chote
763630f547 Make DeveloperInfo 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
RoosterDragon
0899d02377 Avoid allocations when generating RadarSignatureCells.
The RadarWidget can supply a reusable buffer to each trait to avoid individual traits having to return new enumerables. Additionally, this allows the two traits to avoid LINQ and further allocations as they can manually enumerate and populate the buffer themselves.
2017-12-12 00:00:51 +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
373aaee004 Use World.(AddTo|RemoveFrom)Maps in Immobile/Building. 2017-12-11 19:45:07 +01:00
Paul Chote
9e18ec7314 Simplify ScreenMap bounds checking. 2017-12-11 19:45:07 +01:00
reaperrr
85c5259361 Fix AI crashing when trying to make parachuted harvester search map for resources while mid-air 2017-12-11 01:55:18 +01:00
reaperrr
b5ffe17d60 Make AI skip harvester orders if map has no resources 2017-12-11 01:55:18 +01:00
reaperrr
9ad0d78cdd Make the AI only consider harvesters 'idle' if last resource search failed
Otherwise the AI would consider the harvester 'idle' in too many situations.
This way, the AI now only uses its own resource search algorithm if the next resource patch is too far away for the FindResources activity to find it.
2017-12-11 01:55:18 +01:00
RoosterDragon
ec84b61316 Reduce memory required in MovementClassDomainIndex
The number of distinct domains on a map is often dozens, or at most hundreds. We can use a ushort to represent this easily, and reduce the size of the backing storage required to track domain indicies over the whole map.
2017-12-11 01:41:07 +01:00
RoosterDragon
5338784e45 Fix bad uses of FirstEnabledTraitOrDefault on TraitInfos.
These are not traits so this method does not work. We can use EnabledByDefault on the ConditionalTraitInfo instead.
2017-12-10 13:39:24 +00: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
8fea476a0d Fix NRE when ProvidesPrerequisite is defined on the player actor. 2017-11-26 19:51:46 +01:00