mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 14:10:45 +00:00
Bring dev pattern back (#3495)
## Description:
Dev pattern support was removed in
97d0a05d58
This PR brings it back to allow testing new skins.
## Please complete the following:
- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
## Please put your Discord username so you can be contacted if a bug or
regression is found:
deshack_82603
This commit is contained in:
committed by
GitHub
parent
136c1b97a0
commit
e3a14671ab
@@ -178,6 +178,7 @@ export async function getPlayerCosmetics(): Promise<PlayerCosmetics> {
|
||||
|
||||
if (refs.patternName && cosmetics) {
|
||||
const pattern = cosmetics.patterns[refs.patternName];
|
||||
|
||||
if (pattern) {
|
||||
result.pattern = {
|
||||
name: refs.patternName,
|
||||
@@ -187,6 +188,16 @@ export async function getPlayerCosmetics(): Promise<PlayerCosmetics> {
|
||||
: undefined,
|
||||
};
|
||||
}
|
||||
} else {
|
||||
const devPattern = new UserSettings().getDevOnlyPattern();
|
||||
|
||||
if (devPattern) {
|
||||
result.pattern = {
|
||||
name: devPattern.name,
|
||||
patternData: devPattern.patternData,
|
||||
colorPalette: devPattern.colorPalette,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user