mirror of
https://github.com/NohamR/Pocket-Bird.git
synced 2026-05-25 12:17:22 +00:00
Enforce enum types
This commit is contained in:
@@ -152,8 +152,9 @@ function getColor(part) {
|
||||
if (currentSpecies.colors[part]) {
|
||||
return currentSpecies.colors[part];
|
||||
}
|
||||
if (DEFAULT_COLOR_OVERRIDES[part]) {
|
||||
return getColor(DEFAULT_COLOR_OVERRIDES[part]);
|
||||
const override = DEFAULT_COLOR_OVERRIDES[/** @type {keyof typeof DEFAULT_COLOR_OVERRIDES} */ (part)];
|
||||
if (override) {
|
||||
return getColor(override);
|
||||
}
|
||||
for (const [color, partName] of Object.entries(COLOR_MAP)) {
|
||||
if (partName === part) {
|
||||
|
||||
Reference in New Issue
Block a user