mirror of
https://github.com/chase-manning/pokemon-js.git
synced 2025-07-28 14:49:13 +00:00
❇️ add support for hidden items
This commit is contained in:
parent
b628698b83
commit
cc03db2eed
3 changed files with 3 additions and 1 deletions
src
|
@ -72,7 +72,7 @@ const Item = ({ item }: Props) => {
|
|||
}
|
||||
});
|
||||
|
||||
if (isCollected) return null;
|
||||
if (isCollected || item.hidden) return null;
|
||||
|
||||
return (
|
||||
<StyledItem x={item.pos.x} y={item.pos.y}>
|
||||
|
|
|
@ -94,6 +94,7 @@ export interface TrainerType {
|
|||
export interface MapItemType {
|
||||
pos: PosType;
|
||||
item: ItemType;
|
||||
hidden?: boolean;
|
||||
}
|
||||
|
||||
export interface MapWithPos {
|
||||
|
|
|
@ -301,6 +301,7 @@ const mtMoon1f: MapType = {
|
|||
},
|
||||
{
|
||||
item: ItemType.PokeBall, // TODO: should be MoonStone
|
||||
hidden: true,
|
||||
pos: {
|
||||
x: 2,
|
||||
y: 2,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue