RoosterDragon
61b124ddf5
Add UnpackMapCommand
...
This command allows either unpacking oramap files into folders, or packing folders into oramap files.
Example invocations:
"d2k --unpack-map unpack" to unpack maps of the d2k mod into folders.
"cnc --unpack-map repack" to repack maps of the cnc mod into oramap files (but will only pack folders that were unpacked previously).
2023-11-25 16:45:05 +01:00
RoosterDragon
e6914f707a
Introduce FirstOrDefault extensions method for Array.Find and List.Find.
...
This allows the LINQ spelling to be used, but benefits from the performance improvement of the specific methods for these classes that provide the same result.
2023-11-19 19:28:57 +02:00
RoosterDragon
330ca92045
Fix RCS1077
2023-11-19 19:28:57 +02:00
RoosterDragon
2996a1ddde
Fix CA1868
2023-11-16 09:29:17 +02:00
RoosterDragon
2ea2106eca
Fix CA1865
2023-11-16 09:29:17 +02:00
RoosterDragon
9a3c39878d
Fix RCS1236
2023-11-10 10:38:41 +02:00
RoosterDragon
4dd787be13
Fix RCS1061
2023-11-10 10:38:41 +02:00
RoosterDragon
5d91b678bb
Use spans to improve performance in StreamExts.
...
Also avoid ReadBytes calls that allocate a buffer by either updating the stream position (if not interested in the bytes), by reusing an input buffer (if interested in the bytes), or using a stackalloc buffer to avoid the allocation (for small reads).
2023-11-10 10:25:39 +02:00
abcdefg30
88f830a9e5
Fix Folder.GetStream using FileNotFoundExceptions to detect if a file exists
2023-08-20 17:44:31 +03:00
RoosterDragon
285443f10f
Fix CA1310, CA1311
2023-08-07 21:38:09 +02:00
RoosterDragon
a50e72f68d
Fix CA1802
2023-06-20 17:57:40 +02:00
RoosterDragon
f4af5c1764
Fix CA1852
2023-06-06 11:51:47 +03:00
RoosterDragon
8a285f9b19
Fix IDE0090
2023-04-08 16:51:51 +03:00
RoosterDragon
164abfdae1
Fix IDE0083
2023-04-08 16:51:51 +03:00
RoosterDragon
023d80b94d
Fix IDE0057
2023-04-08 16:51:51 +03:00
RoosterDragon
bcfa0c9ae9
Review StyleCop rules.
...
- Enforce SA1604 ElementDocumentationShouldHaveSummary.
- Enforce SA1629 DocumentationTextShouldEndWithAPeriod.
- Turn off some rules covered by IDExxxx rules.
- Remaining rules are treated as part of OpenRA style.
2023-03-18 12:46:10 +02:00
RoosterDragon
98c4eaca83
Fix IDE0032
2023-03-14 13:41:25 +02:00
Dean Simmons
e1b78c4821
Only return file paths when returning zip contents
2023-01-26 19:25:58 +02:00
abcdefg30
5bf7fe852c
Remove the copyright year numbers
2023-01-11 11:58:54 +02:00
IceReaper
8ae5383698
Made installer asset resolving case insensitive.
2022-11-17 00:16:59 +02:00
IceReaper
98e7058486
ZipFile is now determined by a zip header, not the file extensions, as it may be a temp file.
2022-11-17 00:16:59 +02:00
abcdefg30
6a31b1f9f3
Update the copyright header year
2022-05-28 00:35:10 -05:00
Eduardo Cáceres
7eb64ea6fc
Use read-only autoimplemented property when possible
2022-05-18 11:42:36 -05:00
Matthias Mailänder
af3362c62f
Use string.Contains(char) instead of string.Contains(string)
...
with single characters
2022-04-13 20:09:57 +02:00
Andre Mohren
6810469634
Updated copyright years.
2021-06-29 18:33:21 -05:00
teinarss
10676be377
Replace F extension with string interpolation
2021-05-08 22:20:59 +02:00
teinarss
4a1e4f3e16
Use expression body syntax
2021-03-07 13:00:52 +00:00
Paul Chote
dd0b08d54a
Replace ^ and . in platform paths with ^SupportDir and ^EngineDir.
2020-11-24 17:53:48 +01:00
Matthias Mailänder
b16cbeacb6
Sort contents before merging to unify UIDs across filesystems.
2020-09-07 17:25:24 +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
Andre Mohren
006a87692a
Removed unused imports.
2020-07-28 18:22:51 +02:00
abcdefg30
23b3c237b7
Update the year numbers in all license headers to 2020
2020-01-05 17:00:34 +00:00
Paul Chote
353db73381
Fix a collection of minor style violations.
...
This enables several new StyleCopAnalyzer rules to
be enabled immediately during migration.
2019-05-09 20:40:08 +02:00
Paul Chote
f69c6ab3fb
Update SharpZipLib to 1.1.0.
...
The default code page has been changed to UTF8
so our workarounds are no longer needed.
2019-03-30 20:47:22 +01: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
91295f9c68
Add IReadOnlyFileSystem.IsExternalModFile.
2018-05-01 00:46:57 +02:00
IceReaper
12407ae995
Fix asset browser displaying wrong file
...
If multiple files with same filename are present.
2018-03-31 16:08:35 +02:00
Arular101
8a60918841
Update copyright notice year to 2018
2018-01-17 00:47:34 +01:00
RoosterDragon
ca01a1f186
Presize MemoryStream when possible.
...
Also use GetBuffer when we know we have presized the stream to the exact required size to prevent a needless copy.
2017-12-19 00:59:11 +01:00
Paul Chote
93fcfbb131
Fix ReadWriteZipFile crashing on update.
2017-07-18 00:10:07 +02:00
Paul Chote
daf8f8d956
Throw a FileNotFoundException if source zip file isn't found.
2017-07-08 23:22:44 +02:00
Paul Chote
f7c57cfc6f
Fix crash when loading read-only ReadWriteZipFiles.
2017-07-08 16:45:44 +01:00
RoosterDragon
297f4ad9ed
Ensure we set ZipConstants.DefaultCodePage by using a helper method.
...
We were currently dealing with this terrible global variable in FileSystem/ZipFile.cs previously, but other parts of the code such as DownloadPackageLogic were creating these files too, and may not have executed the static ctors that fixed the encoding yet.
2017-07-05 22:45:15 +01:00
Paul Chote
69587a2128
Move InstallShieldPackage to Mods.Common.
2017-05-29 12:41:28 +02:00
Paul Chote
ba7290cc2c
Move classic-mod package loaders and support files to Mods.Cnc.
2017-05-29 12:41:28 +02:00
Paul Chote
8321d1f3e3
Remove legacy FileSystem.OpenPackage(string, IReadOnlyPackage).
2017-05-29 12:27:24 +02:00
Paul Chote
df40d38b91
Rework read/write zip file loading/saving.
2017-05-29 12:20:32 +02:00
Paul Chote
a3f7641b68
Move D2kSoundResources to Mods.D2k dll.
2017-05-07 13:25:43 +01:00
Paul Chote
0222ea675c
Implement mod-defined package loaders.
2017-05-07 13:25:38 +01:00