Skip to content

Commit

Permalink
Update winter event 2023
Browse files Browse the repository at this point in the history
Update winter event 2023
  • Loading branch information
romaniac01 committed Dec 19, 2023
1 parent 4f07b22 commit 7d73314
Show file tree
Hide file tree
Showing 12 changed files with 472 additions and 456 deletions.
2 changes: 1 addition & 1 deletion db/advisors/build.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { merge } from "lodash"

import { API, downloadIcon } from "../download"
import { Advisor, Vendor } from "../interfaces"
import { Advisor } from "../interfaces"
import { translateEn, convertCivilization } from "../shared/convert-text"
import { findVendors } from "../vendors"

Expand Down
8 changes: 8 additions & 0 deletions db/items/convert-event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import {

//no summer 2023
isHalloween2023Reward,
isWinter2023Reward,
} from "./source"

export function convertEvent(trait: Trait): Item["event"] | undefined {
Expand Down Expand Up @@ -132,4 +133,11 @@ export function convertEvent(trait: Trait): Item["event"] | undefined {
year: 2023,
}
}

if (isWinter2023Reward(trait)) {
return {
name: "winter",
year: 2023,
}
}
}
3 changes: 2 additions & 1 deletion db/items/convert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ export async function convertItem(trait: Trait): Promise<Item> {
const name = await translateEn(trait.displaynameid, trait.name)
const type = await translateEn(trait.rollovertextid, "")
const icon = await downloadIcon(`Art/${trait.icon}`, "items")



var visualfactor_text = ''

if (trait.traittype === "VanityHelm" || trait.traittype === "VanityShield" || trait.traittype === "VanityWeapon") {
Expand Down
6 changes: 6 additions & 0 deletions db/items/source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,11 @@ export function isHalloween2023Reward(trait: Trait) {
return trait.name.endsWith("_halloween2023")
}

export function isWinter2023Reward(trait: Trait) {
return trait.name.endsWith("_winter2023")
}


export function isEventReward(trait: Trait) {
return isHalloween2018Reward(trait)
//|| isWinterReward(trait)
Expand All @@ -285,6 +290,7 @@ export function isEventReward(trait: Trait) {
|| isWinter2022Reward(trait)
//no new summer 2023
|| isHalloween2023Reward(trait)
|| isWinter2023Reward(trait)
}

export function isBahramReward(trait: Trait) {
Expand Down
2 changes: 1 addition & 1 deletion db/shared/convert-text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export async function translateEn(id: number, fallback?: string) {

export function cleanFormat(translation: string) {
return translation ?
translation.replace(/\\n/g, "\n").replace(/<color="(.*?)">(.*?)<\/color>/g, "$2"):
translation.replace(/\\n/g, "\n").replace(/<color="(.*?)">(.*?)<\/color>/g, "$2").replace(/<color=(.*?)>/g, "- ").replace(/<\/color>/g,""):
translation
}

Expand Down
2 changes: 1 addition & 1 deletion src/assets/db/blueprints.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/assets/db/designs.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/assets/db/items.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/assets/db/materials.json

Large diffs are not rendered by default.

Binary file modified src/assets/sprites/items.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
899 changes: 450 additions & 449 deletions src/assets/sprites/items.scss

Large diffs are not rendered by default.

Binary file modified src/assets/sprites/items.webp
Binary file not shown.

0 comments on commit 7d73314

Please sign in to comment.