mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-06 07:29:30 +02:00
Fixed objectValues
issues
This commit is contained in:
parent
5e7a5a7a94
commit
ad26adf426
@ -1,4 +1,4 @@
|
||||
import type { EnumValues } from "#types/enum-types";
|
||||
import type { ObjectValues } from "#types/type-helpers";
|
||||
|
||||
/**
|
||||
* Enum representing the various "classes" of item effects that can be applied.
|
||||
@ -34,4 +34,4 @@ export const HeldItemEffect = {
|
||||
INCREMENTING_STAT: 52,
|
||||
} as const;
|
||||
|
||||
export type HeldItemEffect = EnumValues<typeof HeldItemEffect>;
|
||||
export type HeldItemEffect = ObjectValues<typeof HeldItemEffect>;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import type { EnumValues } from "#types/enum-types";
|
||||
import type { ObjectValues } from "#types/type-helpers";
|
||||
|
||||
// TODO: make category the lower 2 bytes
|
||||
export const HeldItemId = {
|
||||
@ -94,7 +94,7 @@ export const HeldItemId = {
|
||||
GIMMIGHOUL_EVO_TRACKER: 0x0A01,
|
||||
} as const;
|
||||
|
||||
export type HeldItemId = EnumValues<typeof HeldItemId>;
|
||||
export type HeldItemId = ObjectValues<typeof HeldItemId>;
|
||||
|
||||
type HeldItemNameMap = {
|
||||
[k in HeldItemName as (typeof HeldItemId)[k]]: k
|
||||
@ -127,7 +127,7 @@ export const HeldItemCategoryId = {
|
||||
EVO_TRACKER: 0x0A00,
|
||||
} as const;
|
||||
|
||||
export type HeldItemCategoryId = EnumValues<typeof HeldItemCategoryId>;
|
||||
export type HeldItemCategoryId = ObjectValues<typeof HeldItemCategoryId>;
|
||||
|
||||
const ITEM_CATEGORY_MASK = 0xFF00
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import type { EnumValues } from "#types/enum-types";
|
||||
import type { ObjectValues } from "#types/type-helpers";
|
||||
|
||||
export const RewardId = {
|
||||
NONE: 0x0000,
|
||||
@ -69,7 +69,7 @@ export const RewardId = {
|
||||
RARE_FORM_CHANGE_ITEM: 0x2E02,
|
||||
} as const;
|
||||
|
||||
export type RewardId = EnumValues<typeof RewardId>;
|
||||
export type RewardId = ObjectValues<typeof RewardId>;
|
||||
|
||||
export const RewardCategoryId = {
|
||||
NONE: 0x0000,
|
||||
@ -90,7 +90,7 @@ export const RewardCategoryId = {
|
||||
FORM_CHANGE_ITEM: 0x0F00,
|
||||
} as const;
|
||||
|
||||
export type RewardCategoryId = EnumValues<typeof RewardCategoryId>;
|
||||
export type RewardCategoryId = ObjectValues<typeof RewardCategoryId>;
|
||||
|
||||
const ITEM_CATEGORY_MASK = 0xFF00
|
||||
|
||||
|
@ -7,11 +7,11 @@ import { BerryUsedEvent } from "#events/battle-scene";
|
||||
import type { Pokemon } from "#field/pokemon";
|
||||
import { ConsumableHeldItem } from "#items/held-item";
|
||||
import { TrainerItemEffect } from "#items/trainer-item";
|
||||
import type { EnumValues } from "#types/enum-types";
|
||||
import type { ObjectValues } from "#types/type-helpers";
|
||||
import { BooleanHolder } from "#utils/common";
|
||||
|
||||
type BerryTypeToHeldItemMap = {
|
||||
[key in EnumValues<typeof BerryType>]: HeldItemId;
|
||||
[key in ObjectValues<typeof BerryType>]: HeldItemId;
|
||||
};
|
||||
|
||||
// TODO: Rework this to use a bitwise XOR
|
||||
|
Loading…
Reference in New Issue
Block a user