Commit Graph

76 Commits

Author SHA1 Message Date
teinarss
4a1e4f3e16 Use expression body syntax 2021-03-07 13:00:52 +00:00
RoosterDragon
8fb65fd9bf Use string pooling in MiniYaml to de-duplicate strings in memory.
These config files often contain many repeated strings which result in different string references in memory. By using a pool, we can detect when the strings are equal and reuse an existing reference as strings are immutable.

The FromLines will now use a pool to de-duplicate strings for a single call. By allowing a pool to be provided as a parameter, we can reuse even more strings. The MapCache defines such a pool so that strings are reused across all maps in the cache for even more savings.
2020-10-12 21:57:08 +02:00
teinarss
9c4fd0e3d3 Use Null-Propagation Operator 2020-08-19 18:11:07 +01:00
teinarss
27f1a7ab27 Use out var syntax 2020-08-19 18:11:07 +01:00
teinarss
19b02875c7 Use Tuple syntax 2020-08-15 10:37:10 +01:00
Paul Chote
c6c3a8c60d Make ActorPreview and EditorActorPreview wrap ActorReference. 2020-06-19 17:57:56 +02:00
Paul Chote
7c6ec577dc Rewrite ActorInit queries. 2020-05-28 19:04:53 +02:00
abcdefg30
23b3c237b7 Update the year numbers in all license headers to 2020 2020-01-05 17:00:34 +00:00
Paul Chote
ab4a7e3558 Replace System.Drawing primitives with our own. 2019-03-04 18:26:42 +00:00
abcdefg30
cadbd0d9ab Change the year number in all cs headers from 2018 to 2019 2019-01-26 23:15:21 +01:00
Paul Chote
f65a777366 Remove System.Bitmap from map preview loading. 2019-01-08 21:20:06 +00:00
Andre Mohren
b1a44086a0 Removed unused using directives. 2018-11-17 17:23:22 +00:00
teinarss
cfaf5a6467 Updated CPos struct to use a bit field for all properties. 2018-10-02 00:54:45 +01:00
Paul Chote
91295f9c68 Add IReadOnlyFileSystem.IsExternalModFile. 2018-05-01 00:46:57 +02:00
Arular101
8a60918841 Update copyright notice year to 2018 2018-01-17 00:47:34 +01:00
dsimmons87
65a2410738 Fixed bug in map Retry Install
If the download failed, the map status would be MapStatus.DownloadError,
which would cause the Install method to return immediately. I've updated
the Install method now to account for MapStatus.DownloadError.
2017-11-27 15:18:33 +02:00
abcdefg30
27345c1f6a Fix map linting crashing for not existing directories 2017-10-08 18:23:25 +01:00
Paul Chote
17089f2aee Rename VoxelSequences to ModelSequences. 2017-06-14 18:56:06 +02:00
Paul Chote
e1cd00c1dd Add backend plumbing for model loaders. 2017-06-14 18:56:06 +02:00
Paul Chote
8321d1f3e3 Remove legacy FileSystem.OpenPackage(string, IReadOnlyPackage). 2017-05-29 12:27:24 +02:00
Paul Chote
1722f42f83 Move web urls from user config to mod config. 2017-04-17 12:00:41 +01:00
Taryn Hill
43317e0f5d Update copyright notice year to 2017 2016-12-31 23:46:13 -06:00
Chris Forbes
5b793e0455 server: Fix server getting wedged after map query with bad minimap
If the mapserver returned an unusable minimap blob, we'd end up dropping
the resulting exceptions on the floor, and committing a completely broken
MapPreview, which would then blow up the tail end of the map change
process, and all future ValidateClient calls after players join (which
itself was handled by kicking the player and logging some noise of dubious
value).

Adjusts exception handling in a number of places to log the exception
rather than dropping it on the floor, and makes the mapserver response
parsing tolerant of bogus minimap blobs -- in this case, we'd rather just
have no minimap.

Candidate for stable, as it fixes a bug present in the current release and
the current playtest series.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
2016-09-20 19:28:31 +12:00
RoosterDragon
3b5798b5e8 Fix cancellation of downloads.
The Download class cancels asynchronously, which means callers must handle cancellation inside the completion event, and not after requesting cancellation.
2016-07-30 16:27:45 +01:00
Paul Chote
55cd2ca8f5 Move initial map suitability calculation to MapCache.
This was previously trying to use values that had
not yet been initialised, which meant that *all*
maps were treated as unsuitable.  This would cause
the mod to always fall back to the first installed
map.
2016-06-18 11:04:37 +01:00
Matthias Mailänder
48ea9dc300 Fix NRE if package download fails or is corrupted. 2016-04-17 15:57:00 +02:00
Oliver Brakmann
b25eb81a42 Fix ready checkbox in the lobby being unusable after installing a map 2016-04-12 18:30:37 +02:00
Paul Chote
923883fad7 Fix and improve custom rule detection. 2016-04-09 13:40:44 -04:00
Paul Chote
65f7d46025 Parse map rules and players from remote maps. 2016-03-31 21:08:36 +01:00
Paul Chote
81f22f8871 Remove Game.RunAfterTick from UpdateRemoteSearch.
RunAfterTick isn't available from the Server.
2016-03-31 21:08:36 +01:00
Pavel Penev
c78ad58e4b Merge pull request #10948 from pchote/custom-map-merger
Add --map-rules utility command for the resource center
2016-03-27 22:12:47 +03:00
Paul Chote
96eda08677 Replace map type with a category list. 2016-03-27 12:16:55 +01:00
Paul Chote
c696c318c4 Log rule errors when loading from MapPreview. 2016-03-26 17:26:51 +00:00
Paul Chote
0dc939e0e8 Notify the server after installing a map. 2016-03-18 20:53:48 +00:00
Paul Chote
d40bff3fd9 Support map-defined AI in the lobby. 2016-03-16 21:03:31 +00:00
Paul Chote
ab6a9597bb Remove Map usage from LobbyLogic. 2016-03-16 21:03:31 +00:00
Paul Chote
be5eee0227 Allow rules to be constructed from a MapPreview. 2016-03-12 20:01:39 +00:00
Paul Chote
9c4dd54fa3 Generate map previews on save. 2016-03-08 21:13:38 +00:00
Paul Chote
21d19e65a5 Unhardcode map installation directory. 2016-02-28 19:34:56 +00:00
Paul Chote
be52c1cb72 Properly use the virtual filesystem for map loading and saving. 2016-02-28 19:27:33 +00:00
Paul Chote
bee3eb2c0a Dispose MapPreviews and map packages. 2016-02-28 10:18:49 +00:00
Oliver Brakmann
4f1fa3acec Merge pull request #10786 from pchote/mappreview-packages
Remove internal use of map paths.
2016-02-23 22:52:54 +01:00
Paul Chote
e71225496b Clarify GPL version. 2016-02-21 16:30:48 +00:00
Paul Chote
b396965fd9 Update licence header year. 2016-02-21 16:27:31 +00:00
Paul Chote
d492c23a6d Store map packages in MapPreview. 2016-02-21 16:11:36 +00:00
Paul Chote
02ab54c9bc Load MapPreview data without initialising a full Map. 2016-02-18 20:19:44 +00:00
Paul Chote
7b00da04ca Remove MapPreview.Map. 2016-02-06 22:30:50 +00:00
Paul Chote
3708a7649d Remove MapPreview.CacheRules. 2016-02-06 22:30:49 +00:00
Paul Chote
d5e3fbf452 Store map path in MapPreview. 2016-02-06 22:30:49 +00:00
Paul Chote
7a5678ec39 Move MapVisibility to MapPreview. 2016-02-06 22:28:35 +00:00