Commit Graph

29039 Commits

Author SHA1 Message Date
Gustas
63b76d1b53 Select LastModifiedMap when entering LobbyLogic 2022-09-09 14:31:25 +03:00
Gustas
02b6a260af Make IngameMenuLogic use ShowMenu 2022-09-09 14:31:25 +03:00
Zachary Schirm
9a5d352e41 Disallow saving the game with an empty name field 2022-09-09 11:39:31 +03:00
Zachary Schirm
125a7b8c88 Disallow Join button without IP address input
Disallow join button without IP address Input

Closes #20234

Trying to join a server with an empty address crashes the game. This fix disallows pressing join button without ip address field input.  Updated to reuse search for joinButton vs 2 separate calls to search.
2022-09-09 11:22:52 +03:00
Gustas
ee0d958cd1 Fixed incorect fluent name in MissionBrowserLogic 2022-09-08 23:45:11 +02:00
Gustas
9ae27b8e60 Fix team 0 being translated in SpawnSelectorTooltipLogic 2022-09-08 23:45:11 +02:00
Gustas
1b00cef30f Fix a few tooltip translations being called every frame
in WorldTooltipLogic and IngamePowerBarLogic
2022-09-08 23:45:11 +02:00
Ivaylo Draganov
56a9acd035 Extract a couple of untranslated strings 2022-09-08 23:45:11 +02:00
dnqbob
6ccd000257 Make building and bridge repair traits public 2022-09-07 14:04:23 +02:00
Matthias Mailänder
fb5624880b Fix sorting. 2022-09-06 20:52:04 +03:00
Matthias Mailänder
67aa0cdede Avoid Count() when Any() could be used (CA1827) 2022-09-06 20:52:04 +03:00
Matthias Mailänder
7ba6a49378 Avoid using LINQ on indexable collections (CA1826) 2022-09-06 18:02:39 +02:00
Matthias Mailänder
68ca09e896 Fixed "bots" not getting translated in Lobby dropdowns 2022-09-05 22:35:50 +02:00
reaperrr
145f6abc09 Add option to limit render fps to game tick rate
This helps slow systems that struggle to render 2 frames per game tick.
2022-09-04 17:00:37 +03:00
penev92
216029dc27 Fix a crash with BlockingCollection in Connection
The BlockingCollection would have `IsAddingCompleted` to true, but `IsComplete` to false, slipping through the cracks and causing an InvalidOperationException ("The collection has been marked as complete with regards to additions.") when trying to add to it.
We now add a check on `(Try)SendData` to only try to add if we can. The collection is still viable for reading until empty/`IsComplete`.
2022-09-04 13:04:17 +03:00
RoosterDragon
2a681d3791 Fix HierarchicalPathFinder considering some unreachable cells as reachable.
When using the internal AbstractCellForLocalCell method to check if a local cell is reachable, this should return null when the cell is unreachable. If multiple abstract cells were required for that grid, this worked as intended. Only reachable cells are stored in the localCellToAbstractCell mapping. For a grid that required only a single abstract cell, which is the common case, we optimize this to store only the single abstract cell rather than the whole mapping for potentially 100 cells in that grid. However this makes no distinction between the reachable and unreachable cells, so when we check later we get incorrect results. If a cell is unreachable but belongs to the same grid as a single group of reachable cells then we incorrectly report it as reachable. The easiest way to see this incorrect behaviour is when the PathExists is called and can sometimes indicate a path exists when it does not.

To fix this, we now ensure we perform a check to see if the cell is reachable in this single layer case, this allows us to retain the optimization where we don't need to store the whole mapping, but allows us to correctly indicate when cells are unreachable.
2022-09-03 19:28:47 +02:00
Vapre
63499c6334 ShroudRenderer, fix, no shroud or fog in editor. 2022-09-03 19:20:25 +02:00
Vapre
57ce88cc9a ShroudRenderer, fix, render Shroud if fog disabled. 2022-09-02 20:13:56 -05:00
Matthias Mailänder
e2284f660c Add documentation to TeslaZap. 2022-09-02 19:58:48 -05:00
Matthias Mailänder
3513d37702 Fix a line break. 2022-09-02 19:58:48 -05:00
penev92
737cdd7851 Reworked trait documentation generation
Switched the Utility's ExtractTraitDocsCommand output to JSON.
Updated documentation generation to use that and the new Python script to generate the Markdown file, same as the Weapon documentation.
2022-09-02 20:56:55 +02:00
penev92
a522457bb6 Reworked weapon documentation generation
Switched the Utility's ExtractWeaponDocsCommand output to JSON.
Added a Python script to generate documentation Markdown from JSON.
2022-09-02 20:56:55 +02:00
penev92
c21bf31ebc Fixed weapon docs not including WeaponInfo
Also made some code cleanups in the weapon docs export code.
2022-09-02 20:56:55 +02:00
penev92
a73d710bec Added Util.InternalTypeName() 2022-09-02 20:56:55 +02:00
penev92
9ed2e699c6 Fix tiny error in output string 2022-09-02 20:56:55 +02:00
penev92
2f0f5f4cda Fixed ScrollPanelWidget not resetting on Clear 2022-09-02 16:16:45 +02:00
Gustas
8402d7d476 Improved Widget.RemoveChildren performance
Modifying the list potentially several thousand times is really slow, so notify the child elements that they are being removed and then clear the list in one go.
2022-09-02 16:16:45 +02:00
penev92
378c447ded Misc fixes in AssetBrowserLogic and MapOverlaysLogic 2022-09-02 16:16:45 +02:00
penev92
df836620dc Added missing spacing to map editor dropdowns 2022-09-02 16:16:45 +02:00
Ivaylo Draganov
c1e1765c2f Move game speed lobby dropdown before time limit dropdown
Game speed is the more frequently changed option and with the current
layout it was buried below the fold.
2022-09-02 16:09:05 +02:00
Matthias Mailänder
0b67b5bfae Extract translation strings. 2022-09-02 14:41:24 +03:00
Gustas
dfd5a960ed Fix RepairableBuilding never stopping repair 2022-09-01 18:30:47 +03:00
RoosterDragon
2d45e67bca Teach HierarchicalPathFinder about Immovable actors.
By tracking updates on the ActorMap the HierarchicalPathFinder can be aware of actors moving around the map. We track a subset of immovable actors that always block. These actors can be treated as impassable obstacles just like terrain. When a path needs to be found the abstract path will guide the search around this subset of immovable actors just like it can guide the search around impassable terrain. For path searches that were previously imperformant because some immovable actors created a bottleneck that needed to be routed around, these will now be performant instead. Path searches with bottlenecks created by items such as trees, walls and buildings should see a performance improvement. Bottlenecks created by other units will not benefit.

We now maintain two sets of HPFs. One is aware of immovable actors and will be used for path searches that request BlockedByActor.Immovable, BlockedByActor.Stationary and BlockedByActor.All to guide that around the immovable obstacles. The other is aware of terrain only and will be used for searches that request BlockedByActor.None, or if an ignoreActor is provided. A new UI dropdown when using the `/hpf` command will allow switching between the visuals of the two sets.
2022-08-31 23:12:42 +02:00
RoosterDragon
7e7d94ca89 Fix Locomotor CellCache to not consider transit only cells as crushable.
When the UpdateCellBlocking encountered a transit-only cell (the bibs around a building) it would bail from the loop. This would leave the cellCrushablePlayers set to all players. It would update the cell cache and mark that cell as a crushable location.

When CanMoveFreelyInto would later evaluate a cell, it would consider it passable because the crushable check would pass (cellCache.Crushable.Overlaps(actor.Owner.PlayerMask)) rather than because the transit check (otherActor.OccupiesSpace is Building building && building.TransitOnlyCells().Contains(cell)) would pass.

Although this meant the cell was treated as passable in either scenario, it means the cache contained incorrect data. The cell does not contain any crushable actors but the cache would indicate it did. Correcting this means we can rely on the crushability information stored in the cache to be accurate.
2022-08-31 23:12:42 +02:00
RoosterDragon
77779023d5 Notify of shroud state changes when using DevVisibility cheat.
When this cheat is used by notifying of shroud changes we invoke the usual logic that would occur if the visibility had been granted by units. Without this change any cached information about the visibility is not refreshed. Without this refresh actors with different visibility may not act correctly.

One aspect this improves is frozen actors. Using the visibility cheat will show up all actors on the map. If the cheat is then disabled than frozen actors will appear in their place. Prior to this change a frozen actor would fail to appear if the cheat had caused it to be revealed. Healthbars and selection boxes are also made consistent for similar reasons.
2022-08-31 23:31:48 +03:00
RoosterDragon
1fc1bdc849 Fix frozen actors lacking tooltips if they have the cloak ability.
Since bbf5970bc1 we update frozen actors only when required.

In 8339c6843e a regression was fixed where actors created in line of sight would be invisible.

Here, we fix a related regression where cloaked units that are revealed, and then frozen when you move out of line of sight would lack tooltips.

The fix centers around the setting of the Hidden flag. In the old code this used CanBeViewedByPlayer which checks for visibility modifiers and then uses the default visibility. The bug with this code is that when a visibility modifier was not hiding the actor, then we would report the default visibility state instead. However the frozen visibility state applies here which means if the frozen actor is visible, then we consider the actor to be hidden and therefore tooltips will not appear. In the fixed version we only consider the modifiers. This means a visibility modifier such as Cloak can hide the frozen actor tooltips. But otherwise we do not consider the frozen actor to be hidden. This prevents a frozen actor from hiding its own tooltips in some unintended circular logic. Hidden now becomes just a flag to indicate if the visibility modifiers are overriding things, as intended.
2022-08-31 23:31:48 +03:00
Mustafa Alperen Seki
16babc1975 Fix Fog color on Radar. 2022-08-31 16:04:40 +03:00
Vapre
215898c7ec ScriptActorInterfaces, unbind on actor destroy. 2022-08-30 21:44:39 +02:00
Gustas
fc1d8d2355 Update RA maps to format 12 2022-08-30 20:03:40 +02:00
Gustas
f98a74f70d Update TD maps to format 12 2022-08-30 20:03:40 +02:00
Gustas
89bb800dbf Update D2K maps to format 12 2022-08-30 20:03:40 +02:00
Gustas
09cb38bc6e Update TS maps to format 12 2022-08-30 20:03:40 +02:00
Gustas
c40675cfba Include map.png into uid generation 2022-08-30 20:03:40 +02:00
RoosterDragon
bcf4ff3b7c Prevent radar crash when dealing with map height. 2022-08-30 19:58:48 +02:00
Gustas
539bb09d50 Fix shroud selector dropdown 2022-08-29 21:13:27 +03:00
Gustas
51c09ddae9 Fix Mission Group having all headers selected 2022-08-29 13:45:38 +03:00
Gustas
08dbfe0cbd Refactor ScrollItemWidget to use stateful image names 2022-08-29 13:45:38 +03:00
Gustas
11a2e6e19b Add more confirmation dialogue to the map editor
When saving on top of another map, or when saving on a map that has been edited outside the map editor
2022-08-29 12:31:01 +03:00
Gustas
d3589c051d Add descriptions to all projectiles and warheads 2022-08-29 12:26:33 +03:00
Vapre
6e547469d6 Shroud, combine IsVisible and IsExplored into a single function. 2022-08-28 18:50:51 +02:00