mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-02 05:58:10 +00:00
bugfix: support pattern:* flare (#1973)
## Description: The pattern:* flare now allows all flares in the frotend ## 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: evan
This commit is contained in:
@@ -13,10 +13,11 @@ export async function fetchPatterns(
|
||||
|
||||
const patterns: Map<string, Pattern> = new Map();
|
||||
const playerFlares = new Set(userMe?.player?.flares ?? []);
|
||||
const hasAllPatterns = playerFlares.has("pattern:*");
|
||||
|
||||
for (const name in cosmetics.patterns) {
|
||||
const patternData = cosmetics.patterns[name];
|
||||
const hasAccess = playerFlares.has(`pattern:${name}`);
|
||||
const hasAccess = hasAllPatterns || playerFlares.has(`pattern:${name}`);
|
||||
if (hasAccess) {
|
||||
// Remove product info because player already has access.
|
||||
patternData.product = null;
|
||||
|
||||
Reference in New Issue
Block a user