Commit Graph

28572 Commits

Author SHA1 Message Date
Gustas
13ee62c181 Make overlay dropdown optional 2022-02-06 19:21:43 +01:00
Gustas
addfdf50fa Crash when EditorWorld does not have BuildableTerrainOverlay 2022-02-06 19:21:43 +01:00
reaperrr
a17af87a5e Fix aircraft with TakeOffOnCreation=false not freeing exit
...when another actor gets produced.
2022-02-06 19:20:29 +01:00
reaperrr
44fc4a1d0f Fix random placement of AssociateWithAirfieldActivity
It doesn't belong to IMove, so it doesn't belong into that region.
Put it near ICreationActivity where it belongs.
2022-02-06 19:20:29 +01:00
darkademic
257ef95963 Suffix projectile shadow palettes with player name if IsPlayerPalette = true. 2022-02-06 19:18:59 +01:00
Matthias Mailänder
9bb41630e7 Update documentation action to .NET 6 2022-02-06 18:06:44 +01:00
Ivaylo Draganov
f5ab9d95fe Make remove from control group hotkey available only to players 2022-02-06 09:09:33 -06:00
Mustafa Alperen Seki
c096934db8 Fix projectile shadow alpha calculation. 2022-02-04 23:35:44 +01:00
Ivaylo Draganov
1813edc74b Add contexts for hotkey validation 2022-02-04 18:49:05 +01:00
RoosterDragon
1bc95a290f Preallocate dictionary size in ToDictionaryWithConflictLog 2022-02-02 15:10:37 +01:00
Smittytron
74cced319c Change terrain type of clear straight bridge tiles 2022-01-31 14:19:47 +01:00
RoosterDragon
bd30c66f95 Reuse object arrays in FieldLoader Parse methods 2022-01-30 19:47:06 +01:00
RoosterDragon
2ab3917f29 Clean up usage of DomainIndex
- When a path search is being performed the path search will not attempt route to inaccessible cells, so domain index checks to avoid inaccessible cells in the search predicate are redundant and can be removed.
- DomainIndex is a required world trait, so we don't need to use TraitOrDefault and therefore can avoid dealing with the null case.
2022-01-30 16:22:26 +01:00
Matthias Mailänder
4b4b0125a2 Make UnitsInRange accessible to mod code. 2022-01-30 11:56:43 +01:00
Matthias Mailänder
240c96b781 Expose sprite sequence to linting and documentation. 2022-01-30 11:56:43 +01:00
RoosterDragon
6dc189b7d1 Rearrange various API surfaces related to pathfinding.
The existing APIs surfaces for pathfinding are in a wonky shape. We rearrange various responsibilities to better locations and simplify some abstractions that aren't providing value.

- IPathSearch, BasePathSearch and PathSearch are combined into only PathSearch. Its role is now to run a search space over a graph, maintaining the open queue and evaluating the provided heuristic function. The builder-like methods (WithHeuristic, Reverse, FromPoint, etc) are removed in favour of optional parameters in static creation methods. This removes confusion between the builder-aspect and the search function itself. It also becomes responsible for applying the heuristic weight to the heuristic. This fixes an issue where an externally provided heuristic ignored the weighting adjustment, as previously the weight was baked into the default heuristic only.
- Reduce the IGraph interface to the concepts of nodes and edges. Make it non-generic as it is specifically for pathfinding, and rename to IPathGraph accordingly. This is sufficient for a PathSearch to perform a search over any given IGraph. The various customization options are concrete properties of PathGraph only.
- PathFinder does not need to deal with disposal of the search/graph, that is the caller's responsibility.
- Remove CustomBlock from PathGraph as it was unused.
- Remove FindUnitPathToRange as it was unused.
- Use PathFinder.NoPath as the single helper to represent no/empty paths.
2022-01-30 11:47:52 +01:00
Matthias Mailänder
cd1fe2d23b Fix saving into writable system directories. 2022-01-30 11:46:42 +01:00
abcdefg30
2af8296f48 Add the possibility to always show detection circles 2022-01-30 11:41:02 +01:00
abcdefg30
7c085e49c7 Cache DetectCloaked traits in RenderDetectionCircle 2022-01-30 11:41:02 +01:00
xan2622
13fbc412d2 removal 2022-01-30 11:28:16 +01:00
abcdefg30
a9cd2d41c7 Fix ToAhsv using the wrong type for alpha 2022-01-29 13:44:02 +01:00
Ivaylo Draganov
7a93b9ea8c Make control group hotkeys configurable
- Split control groups management to its own interface
- Add hotkeys for selecting, creating, adding to and combining with control groups
- Add a ControlGroups widget to manage the player interaction
2022-01-28 18:38:18 +01:00
Gustas
04b456d6c2 Create overlays dropdown 2022-01-26 23:09:18 +01:00
Gustas
2f130b17ba Fix buildable overlay not updating and make ramps unbuildable 2022-01-23 22:37:02 +01:00
penev92
9cc631ca7e Added a rule about using object initializers 2022-01-23 13:14:57 +01:00
penev92
ab09ce21b4 Changed code to use object initializers everywhere 2022-01-23 13:14:57 +01:00
penev92
70e2769a85 Added a rule about the readonly modifier
Also added a rule to silence StyleCop complaining about StaticReadonlyFieldsMustBeginWithUpperCaseLetter to match what we already have configured for the IDE.
2022-01-22 18:47:06 +00:00
penev92
bf332b6619 Fixed fields missing the readonly modifier 2022-01-22 18:47:06 +00:00
Piotr Usewicz
f83e27d647 Point towards arm libraries
When compiling for macOS using `unix-generic` on Apple M1 processors, point sarchdirs towards the correct location in Homebrew for arm64.
2022-01-22 18:21:36 +00:00
penev92
a67cfabd1e Reordered code style rules
To order them by their number.
2022-01-20 22:10:28 +01:00
penev92
8dbaa0c49f Added more explanations to .editorconfig 2022-01-20 22:10:28 +01:00
penev92
92d1d64dce Changed one-liner braces rule to silent
Having this set to "none" disabled the IDE's option to add braces, whereas "silent" lets it do it on the user's request while still not suggesting it on its own.
2022-01-20 22:10:28 +01:00
penev92
31b3647c09 Added a rule about unordered modifiers 2022-01-20 22:10:28 +01:00
penev92
d37336456d Fixed inconsistent declaration modifier order 2022-01-20 22:10:28 +01:00
penev92
3bacd81b8b Added a rule about zero-length array allocations 2022-01-20 22:10:28 +01:00
penev92
0d24ccc47a Fixed unnecessary zero-length array allocations
Changed all currently present zero-length array allocations in the codebase to use `Array.Empty` instead.
2022-01-20 22:10:28 +01:00
Paul Chote
1312c1aa72 Rename macOS compat packages to mono. 2022-01-20 19:31:43 +01:00
penev92
19dd23e349 Beautified the .editorconfig file 2022-01-19 14:37:14 +01:00
dnqbob
242d589c45 Make AI airstrike aircraft spawns randomly 2022-01-17 15:43:20 +01:00
Mustafa Alperen Seki
d149624b84 Add Lua Scripting for Carryall. 2022-01-12 14:24:13 +01:00
penev92
860ec642b8 Addressed review comments
- Renamed `IVideo.CurrentFrameNumber` to `CurrentFrameIndex`
 - Improved logged error message in VideoPlayerWidget
 - Renumbered fields in ThreadedGraphicsContext
2022-01-11 18:16:31 +01:00
penev92
248b8d1102 Renamed IVideo implementations
To match the interface they are implementing.
2022-01-11 18:16:31 +01:00
penev92
6f0509d235 Removed now-unused ITexture.SetData() overload 2022-01-11 18:16:31 +01:00
penev92
cb8530fbae Reworked internal palettes in video reader classes
This removes the need to pack & unpack color bytes as uints for no gain.
2022-01-11 18:16:31 +01:00
penev92
c4ab7041b8 Updated VideoPlayerWidget to play new IVideo data
Added optional padding to video frames because that's what VideoPlayerWidget expects.
Keeping the option to not use padding for other use-cases like converting frames to PNG.
2022-01-11 18:16:31 +01:00
penev92
ee29d0f9c7 Changed IVideo.CurrentFrameData uint[,] -> byte[] 2022-01-11 18:16:31 +01:00
penev92
1b5f2f1b39 Removed caching properties from video readers
Those seem redundant since the frame number is guaranteed to match the loaded data inside CurrentFrameData.
2022-01-11 18:16:31 +01:00
penev92
0df3b34c52 Did a beautification pass on IVideo and family
Removed property backing fields where applicable, introduced C#7 syntax for properties.
Renamed a bunch of interface properties and class private members with more descriptive names.
Did some inconsequential reordering.
2022-01-11 18:16:31 +01:00
abcdefg30
556413c91d Add whitespace fixes from the automatic update rule run 2022-01-11 18:09:05 +01:00
abcdefg30
f3bc450e20 Fix an oversight in the update rule for AttackBomber's FacingTolerance 2022-01-11 18:09:05 +01:00