Dean Herbert
59e763467f
Move StoragePath
implementation to an extension method
2021-11-19 16:08:38 +09:00
smoogipoo
1e9211c00b
Use explicit type
2021-11-02 15:41:25 +09:00
Dean Herbert
5d784b2ef8
Perform a consistency check by decoding the newly written skin.ini
during ComputeHash
...
As this has regressed twice now, let's play it safe and bail rather than
stack overflowing. Note that as all the underlying issues that could
trigger this have been fixed, no additional tests have been added. To
test, comment out `SkinManager.cs` line 228-229 to cause a failure. The
new logic will kick in and show a log output message, but all tests will
still (correctly) pass.
2021-11-02 14:11:25 +09:00
Dean Herbert
2e66ab453d
Always write automated changes to skin metadata at the end of the file
...
Apart from being cleaner (and allowing removal at the point of export,
if that is ever requires), this also gives us a better guarantee that
the metadata is going to take effect.
By writing the `[General]` section ourselves, we avoid any issues that
may be present from a user constructing the file (incorrectly)
themselves, such as multiple `Title:` entries or a malformed `[General]`
marker.
The main goal is to ensure that the name is updated to what we expect it
to be.
2021-11-02 14:11:25 +09:00
Dean Herbert
6b250955d7
Add missing verbatim string markers
2021-11-01 14:24:38 +09:00
Dean Herbert
5bfb16efe2
Ignore case when searching for existing skin.ini
2021-11-01 14:24:38 +09:00
Dean Herbert
26cf5370c3
Remove unused reader
parameter
2021-10-24 23:48:46 +09:00
Bartłomiej Dach
051cc2cd92
Update reference to configuration population process in comment
2021-10-24 12:47:17 +02:00
Dean Herbert
93482414d6
Remove SkinConfiguration
subclasses and allow configuration parsing for all skin types
2021-10-22 14:42:23 +09:00
Dean Herbert
82d0a6515f
Fix incorrect conditional for checking whether import (would fail for default skin)
2021-10-22 14:08:12 +09:00
Dean Herbert
e5b73f25cd
Ensure newly created skin.ini
files are set to latest version
2021-10-22 12:56:05 +09:00
Dean Herbert
a5088cac27
Fix default metadata propagation when no files are present
2021-10-21 13:43:42 +09:00
Dean Herbert
59b7210efa
Revert disallowing imports with no files
...
While it is logical that we want this, from a testing perspective this is a bit of a nightmare to fix. Let's revisit at a later point in time.
2021-10-21 13:43:42 +09:00
Dean Herbert
68c01fc204
Fix infinite loop on default skin (it can't have a skin.ini
)
2021-10-20 17:56:45 +09:00
Dean Herbert
9e6e41d7c0
Add migration to reset and repopulate existing skin hashes
2021-10-20 17:56:45 +09:00
Dean Herbert
602303e947
Add test coverage for skin.ini
contents
2021-10-20 17:56:45 +09:00
Dean Herbert
a95c754fd3
Fix multiple issues and make metadata fallback process more logical
2021-10-20 17:56:45 +09:00
Dean Herbert
fa542f2547
Include json
files in skin hashing
...
This covers the new layout storage we are doing.
2021-10-20 17:45:06 +09:00
Dean Herbert
789c715f13
Add skin.ini
write support to allow for more correct hashing
2021-10-20 17:45:06 +09:00
Dean Herbert
a2e61883e3
Initial push to use ILive
in import process
2021-09-30 22:55:25 +09:00
Dean Herbert
a2484692b3
Change brackets to square
2021-08-23 20:37:19 +09:00
Dean Herbert
7b3f7cc7c1
Change skin import to also include directory names in the skin name where appropriate
2021-08-23 20:24:00 +09:00
Bartłomiej Dach
58ecee543a
Trim redundant default argument value
2021-08-17 23:00:10 +02:00
Dean Herbert
d66f7cb6b5
Fix tests by allowing retrieval with files where required
2021-08-17 19:21:22 +09:00
Dean Herbert
4bf22db4ff
Attempt to reduce skin lookup overhead where file access is not required
2021-08-17 00:23:30 +09:00
Dan Balasescu
92fcf90768
Merge branch 'master' into import-early-checksum-abort
2021-06-28 19:29:08 +09:00
Dean Herbert
44f875b802
Bypass optimised existing check in SkinManager
(due to custom hashing function)
2021-06-27 16:35:13 +09:00
Dean Herbert
d1f852d102
Make Populate
abstract to avoid unnecessary base call async complexity
2021-06-27 14:29:02 +09:00
Salman Ahmed
71e2815e7e
Update and improve code documentation
...
Co-authored-by: Dean Herbert <pe@ppy.sh>
2021-06-22 12:05:17 +03:00
Salman Ahmed
c1284940e1
Fix potentially providing the same skin instance twice in AllSources
2021-06-22 10:49:37 +03:00
Salman Ahmed
d0cdc07b11
Reuse AllSources
when looking up on FindProvider
2021-06-22 10:49:21 +03:00
Dean Herbert
0ad189e357
Expose skin sources via ISkinSource
and revert to consuming based on hierarchy
2021-06-22 16:19:55 +09:00
Salman Ahmed
9e5bb146d3
Add xmldoc to SkinManager
...
The `<summary>` part comes from `BeatmapManager`, which I believe works correctly here as well, as this does handle the "storage and retrieval" of skins.
2021-06-22 03:07:31 +03:00
Salman Ahmed
2e01e61177
Move TODO comment to correct location
2021-06-11 11:46:30 +03:00
Dean Herbert
debd359d2e
Update xmldoc
2021-06-11 14:50:21 +09:00
Dean Herbert
b9050f91a4
Expose as Skin
s and consume SkinInfo
from instances
2021-06-11 14:49:35 +09:00
Salman Ahmed
c3a2f2c2a4
Expose default SkinManager
providers for use in RulesetSkinProvidingContainer
2021-06-10 13:07:32 +03:00
Dean Herbert
0cf7c56e7e
Add fallback lookup support for DefaultSkin
2021-06-09 18:51:42 +09:00
Dean Herbert
e0f568aa8f
Merge branch 'legacy-skin-default-fallback' into fix-skin-sample-lookup
2021-06-08 15:19:52 +09:00
Dean Herbert
27e3de3ea3
Add TODO about beatmap skin fallback support
2021-06-08 12:12:14 +09:00
Dean Herbert
e7e9197f03
Fix FindProvider
not correctly checking legacy default in SkinManager
2021-06-08 00:42:50 +09:00
Dean Herbert
d26c9a66c2
Merge branch 'legacy-skin-default-fallback' into fix-skin-sample-lookup
2021-06-07 12:01:19 +09:00
Dean Herbert
b87a5956dd
Add fallback logic to SkinManager
2021-06-06 12:17:55 +09:00
Dean Herbert
39f99bf785
Move FindProvider
to ISkinSource
2021-06-06 12:17:32 +09:00
Dean Herbert
00b3eea840
Merge branch 'legacy-skin-default-fallback' into fix-skin-sample-lookup
2021-05-31 21:39:04 +09:00
Dean Herbert
3ff9f9c89d
Make FindProvider
non-default
2021-05-31 21:29:47 +09:00
Dean Herbert
65709ec7d7
Move leagcy resource store construction local to DefaultLegacySkin
2021-05-31 19:14:49 +09:00
Dean Herbert
b16d10bd95
Provide game-wide resources via IStorageResourceProvider
2021-05-31 18:57:47 +09:00
Dean Herbert
70a844ac10
Remove allowFallback
parameters completely
2021-05-27 14:50:42 +09:00
Dean Herbert
4fd89faaa4
Fix default skin not having resources or providing samples
2021-05-27 14:09:01 +09:00