mirror of
https://github.com/chase-manning/pokemon-js.git
synced 2025-08-19 17:47:05 +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 (
|
return (
|
||||||
<StyledItem x={item.pos.x} y={item.pos.y}>
|
<StyledItem x={item.pos.x} y={item.pos.y}>
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue