Commit Graph

6433 Commits

Author SHA1 Message Date
abcdefg30
bf7ec4aec1 Update nuget packages 2022-01-04 12:34:30 +01:00
abcdefg30
b12c15ea9d Update to .NET 6 2022-01-04 12:34:30 +01:00
Matthias Mailänder
bc52e8b6a9 Bump Mono.NAT 2021-12-27 22:33:06 +01:00
Matthias Mailänder
fb296d7dcb Bump Fluent.Net 2021-12-27 22:33:06 +01:00
Matthias Mailänder
5fcc049040 Fix a null reference exception. 2021-12-08 21:07:19 +01:00
Matthias Mailänder
9d905d8291 Remove unused parameters and variables. 2021-12-06 13:19:28 +01:00
Matthias Mailänder
07815143f1 Fix CA1825 warnings on empty array initialisation. 2021-12-06 13:19:28 +01:00
RoosterDragon
727084c5fc Run spell check over solution 2021-12-05 19:23:43 +01:00
Matthias Mailänder
c9022bcb73 Add support for superweapon detected sounds. 2021-12-05 13:02:15 +01:00
darkademic
c51327c4cc Make yaml check utility load each map separately to reduce memory usage. 2021-12-04 20:07:19 +01:00
Ivaylo Draganov
695b7865d3 fixup! Add support for non-overlapping sound notifications 2021-11-29 23:44:59 +01:00
Ivaylo Draganov
fa6ff32f65 Add support for non-overlapping sound notifications 2021-11-29 23:44:59 +01:00
RoosterDragon
137d384304 Remove path caching.
The path cache was originally a moderate benefit, but over time a couple of things have conspired against it:

- Only paths with BlockedByActor.None are cached. Originally all paths regardless of blocking were cached but this was deemed unacceptable due to potentially returning outdated paths as actors move about. Paths with BlockedByActor.None are only invalidated if terrain conditions change, which are rarer.
- Move will try and find a path 4 times, trying with a different BlockedByActor check each time. BlockedByActor.None is the last check and only reached if the other searches fail. This is a rare scenario.

Overall, this means the hit rate for the cache is almost non-existent. Given the constraints on path validity it seems unlikely that the hit rate could be improved significantly, therefore it seems reasonable to remove the cache entirely to remove the overhead of cache management.
2021-11-29 01:03:14 +01:00
GeorgeD64
e00efbf53d Added map name support to Launch.Map command line parameter
Fixed code based on feedback

Replaced try/catch block with a null check and exception throw

Fixed code based on feedback

Fixed code based on feedback

Simplified Launch.Map parameter to use map name directly
2021-11-28 23:06:26 +01:00
RoosterDragon
a59f4b2c4a Add a helper for multiplying by sqrt(2) 2021-11-25 22:50:22 +01:00
RoosterDragon
31267aa22d Fix some incorrect logic in PathGraph.GetConnections.PathGraph
Firstly, when dealing with maps with height discontinuities, the neighbouring cells we need to search are more that the set we need to search on flat maps. We ensure that as we traverse a map with varying height, we now consider cells "behind" us that may have become accessible due to a height change.

Secondly, when considering connections available via Custom Movement Layers, make sure the target cell on the new layer is actually enterable. Previously this cell would be reported as a valid connection, even if it wasn't actually possible to enter the cell as it was blocked. We also apply the same optimization of ignoring already closed cells.
2021-11-16 00:33:19 +01:00
RoosterDragon
1d23c23d06 Adjust span comparisons for clarity and add some test cases. 2021-11-15 13:20:34 +01:00
RoosterDragon
5416910249 Remove unused method in MiniYaml 2021-11-15 13:20:34 +01:00
RoosterDragon
73547c31ec Remove MiniYamlNodes alias in MiniYaml. 2021-11-15 13:20:34 +01:00
RoosterDragon
2db312a792 In MiniYaml, presize some collections and trim lists during parsing. 2021-11-15 13:20:34 +01:00
RoosterDragon
0f01df5474 Avoid string allocations in MiniYaml parsing.
- Stream lines in as memory rather than needing to realise a string for each line, via a new method in StreamExts.
- Use span to avoid string allocations during parsing until we want to realise the node itself, in MiniYaml.FromLines.
- Change several callsites to use the streaming extension method rather than string method where possible.
2021-11-15 13:20:34 +01:00
RoosterDragon
225bcbbd22 Normalize all support dir paths to end with a directory separator.
Previously, some paths used a separator and some did not. This broke some de-duplication logic in ExternalMods which tried to enumerate distinct paths but would end up running logic on the same directory more than one as it was provided both with and without a trailing directory separator. By normalizing the path this logic now works.
2021-11-13 22:24:43 +01:00
Vapre
d53601daa6 World, SyncHash, cache per tick. 2021-11-13 21:46:40 +01:00
Ivaylo Draganov
3310f14dea Use mission notifications pool with appropriate chat line template 2021-11-12 22:30:07 +01:00
Matthias Mailänder
9b1cec7712 Add support for gapless looping music. 2021-11-11 23:49:54 +01:00
abcdefg30
93c45255f1 Move a using into the Mono specific code path 2021-11-07 00:26:15 +01:00
Paul Chote
5d83706eae Require an explicit launch path for mod registrations.
This also removes a workaround that allowed the current mod to be
registered even if it defined a bogus path. Uses of Game.ExternalMods
should therefore always use TryGetValue and correctly handle it
returning false.
2021-11-06 11:21:13 +01:00
Matthias Mailänder
59bed108b1 Minor csharp warning fixes. 2021-10-30 13:11:14 +02:00
Ivaylo Draganov
9e92340ea7 Rework chat line templates and logic
- Extract chat line templates and logic so they can be reused across widgets
- Make text notification styling entirely template driven (by removing chat color configuration and making color optional for `TextNotification`)
- Add a new TextNotificationsDisplay widget (based on and replacing ChatDisplayWidget)
- Add timestamp support to text notifications
2021-10-29 20:55:41 +02:00
teinarss
1a56cee9a1 Add Tick scale plumbing 2021-10-26 22:40:15 +02:00
RoosterDragon
2ed4cb8aff Ensure Clear(T) also have a safety check to ensure no listener is attached.
Move related methods next to each other.
Change Clear(T) to use Array.Fill.
2021-10-23 15:43:47 +02:00
RoosterDragon
19760b04bd Allow the default value of a CellInfo to be an Unvisited location.
In CellInfoLayerPool, instead of having to store a layer with the default values, we know we can just clear the pooled layer in order to reset it. This saves on memory, and also makes resetting marginally faster.

In PathSearch, we need to amend a check to ensure a cell info is not Unvisited before we check on its cost.
2021-10-23 15:43:47 +02:00
Matthias Mailänder
3b5bfb4bf4 Avoid initialisation of empty arrays. 2021-10-22 22:02:15 +02:00
Matthias Mailänder
5ff9d9a1f1 Add missing flags attribute required for HasFlags. 2021-10-22 22:02:15 +02:00
penev92
8ba6d13b2f Removed unused using directives 2021-10-15 13:12:33 +02:00
abcdefg30
e8e0e155e5 Explain the try-finally clause in Sync.cs in a comment 2021-10-14 19:45:29 +02:00
abcdefg30
b366db7175 Revert "Directly run unsynced functions if we don't check sync hashes"
This reverts commit 1dc0a603c7.
2021-10-14 19:45:29 +02:00
abcdefg30
69248132ad Don't desync while the world is disposing 2021-10-09 21:13:35 +02:00
abcdefg30
1dc0a603c7 Directly run unsynced functions if we don't check sync hashes 2021-10-09 21:13:35 +02:00
RoosterDragon
6e0917169d Teach FieldLoader.ParseCPos about CPos.Layer. 2021-10-02 21:54:26 +01:00
RoosterDragon
4cc33b2871 Add some ToString overrides to improve debug experience. 2021-10-02 21:54:26 +01:00
RoosterDragon
6f3b4ecae9 Speed up Map.Contains checks for non-flat maps.
We observe that most cells within a map lie within a region where no matter their height, their projection would still remain in map bounds. We can utilise this to perform a fast check for such cells and skipping the expensive checks on their actual height. We only need to check the actual height of a cell if this could cause the projection to go out of bounds.
2021-10-02 21:43:11 +01:00
KonH
9ed809943d Just use Dispose methods without arguments (disposing always passed as true) 2021-10-02 22:14:08 +02:00
KonH
8bce6eb3ac Remove GC.SuppressFinalize calls from classes without destructors 2021-10-02 22:14:08 +02:00
Paul Chote
defaf92752 Send order queue length in ping responses. 2021-10-02 21:03:00 +02:00
Paul Chote
2d08f2bbfd Allow the server to ack no or multiple packets in the same frame. 2021-10-02 21:03:00 +02:00
RoosterDragon
3a7aeb5324 Ensure TargetLineRenderable width and marker size don't get lost.
By making the constructor take non-optional parameters, this highlights some calls sites which were forgetting to set these values. These are now fixed.

Set the path debug to have a marker size of 2 for better visibility.
2021-10-02 12:14:54 +01:00
teinarss
289c4ef2b7 Remove Microsoft.DotNet.PlatformAbstractions 2021-09-29 20:52:44 +02:00
teinarss
80b6a5a27f Update nuget packages 2021-09-29 20:52:44 +02:00
Matthias Mailänder
98b87004cc Bump SharpZipLib. 2021-09-26 11:18:15 +01:00