❇️ add support for hidden items

This commit is contained in:
Chase Manning 2023-10-13 16:51:07 +01:00
commit cc03db2eed
3 changed files with 3 additions and 1 deletions

View file

@ -72,7 +72,7 @@ const Item = ({ item }: Props) => {
} }
}); });
if (isCollected) return null; if (isCollected || item.hidden) return null;
return ( return (
<StyledItem x={item.pos.x} y={item.pos.y}> <StyledItem x={item.pos.x} y={item.pos.y}>

View file

@ -94,6 +94,7 @@ export interface TrainerType {
export interface MapItemType { export interface MapItemType {
pos: PosType; pos: PosType;
item: ItemType; item: ItemType;
hidden?: boolean;
} }
export interface MapWithPos { export interface MapWithPos {

View file

@ -301,6 +301,7 @@ const mtMoon1f: MapType = {
}, },
{ {
item: ItemType.PokeBall, // TODO: should be MoonStone item: ItemType.PokeBall, // TODO: should be MoonStone
hidden: true,
pos: { pos: {
x: 2, x: 2,
y: 2, y: 2,