Commit Graph

27557 Commits

Author SHA1 Message Date
RoosterDragon
de38313579 Cache VariableExpressions on load.
Compiling these expressions is sadly expensive, and we needed new ones for every trait on every actor each time one was generated. The expressions thankfully can be shared as they are pure functions, which removes this overhead.
2017-12-17 01:42:21 +01: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
Kevin Hinton
86f9b8807e Add EffectiveOwner to Lua Scripting API. 2017-12-16 18:00:41 +00:00
FrameLimiter
72a11ec2a5 Removed duplicate values in defaults.yaml 2017-12-16 17:45:33 +00:00
FrameLimiter
60633dfdf2 Removed duplicate values in civilian.yaml 2017-12-16 17:45:33 +00:00
FrameLimiter
a6dc9c3b21 Removed duplicate value in allies-01 rules.yaml 2017-12-16 17:45:33 +00:00
RoosterDragon
5b51f2a0fa Avoid format strings in some places.
Where it is possible to directly concat strings, prefer this in some often-called methods.
2017-12-16 17:26:29 +01:00
RoosterDragon
f78c3bef33 Allow VS 2017 to format solution file. 2017-12-16 17:25:55 +01:00
RoosterDragon
c8c7629bce Convert some stray spaces to tabs. 2017-12-16 15:53:03 +00:00
Paul Chote
502c3e2bf5 Remove global chat integration. 2017-12-13 21:04:16 +01:00
GSonderling
488cec64b8 Added support for filtering exits by production type. 2017-12-13 04:08:52 +01:00
Arular101
1bf59e885d Upgrade rules for increasing HP and damage by 10x for the D2K mod 2017-12-12 23:56:25 +01:00
Arular101
50185d3ccd Small adjustments 2017-12-12 23:56:25 +01:00
Arular101
64a3187fd1 Increase damage and HP by 10x 2017-12-12 23:56:25 +01:00
Arular101
a1b3fe2bda Parabombs tooltip for airfield
with selection grouping
2017-12-12 23:14:30 +01:00
Arular101
56634564f2 Parabomb tooltip fixes 2017-12-12 23:14:30 +01:00
Mustafa Alperen Seki
fd1aa07f83 Adjust D2K Building Selection Boxes 2017-12-12 23:02:55 +01:00
Paul Chote
3ad6a87920 Center the vertical alignment of lobby options if less than the panel height.
This also enables an extra row to be shown before triggering the scroll bar.
2017-12-12 22:43:11 +01:00
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
99908c4d80 Move hardcoded list of lobby options into 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
2c17780b94 Make ShroudInfo 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
Arular101
b71b2ad523 Upgrade rules for increasing HP and damage by 100x for the TD mod 2017-12-12 22:18:41 +01:00
Arular101
7ad989fc43 Adjust values in custom maps and missions 2017-12-12 22:18:41 +01:00
Arular101
4e62531b11 Adjust values to match current damage 2017-12-12 22:18:41 +01:00
Arular101
2e681ba674 Increase damage and HP by 100x 2017-12-12 22:18:41 +01:00
Arular101
917d6b7627 Upgrade rules for increasing HP and damage by 100x for the RA mod 2017-12-12 20:50:27 +01:00
Arular101
261126194c Balance changes from #14471 2017-12-12 20:50:27 +01:00
Arular101
8069247726 Adjust values in custom maps and missions 2017-12-12 20:50:27 +01:00
Arular101
a429a62bf9 Adjust values to match current damage 2017-12-12 20:50:27 +01:00
Arular101
e049452f22 Increase damage and HP by 100x 2017-12-12 20:50:27 +01:00
RoosterDragon
7760c41bd9 Avoid array resizing in OpenAlAsyncLoadSound.
- Where it is accessible, use the length of the stream to presize the MemoryStream to the correct size.
- Instead of copying out the result via ToArray, grab the underlying buffer via GetBuffer and use that to create the sound source.

This avoids extraneous copying of the array containing the audio.
2017-12-12 00:01:04 +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
Mustafa Alperen Seki
c69df4eedf Make subfactions use UI for their main faction
So it won't crash if a human player uses them.
2017-12-11 23:43:10 +01:00
Paul Chote
6633483d12 Increase infantry mouse bounds to improve usability. 2017-12-11 19:45:07 +01:00
Paul Chote
55b6084b60 Add a lint test for conflicting Interactable and Selectable. 2017-12-11 19:45:07 +01:00
Paul Chote
c87409ed1a Remove legacy bounds code. 2017-12-11 19:45:07 +01:00
Paul Chote
bf57eceeec Select highest priority actor when not drag selecting. 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