Skip to content

Feat/shop and inventory and egg api handling#23

Merged
Driedoutjerky merged 11 commits into
mainfrom
feat/refactoredEggAPI
Jun 7, 2026
Merged

Feat/shop and inventory and egg api handling#23
Driedoutjerky merged 11 commits into
mainfrom
feat/refactoredEggAPI

Conversation

@Driedoutjerky

Copy link
Copy Markdown
Owner

Summary

  • Egg stat calculation to depend only on the equipped decoration
  • Connected inventory equip/unequip flow to egg stat recalculation
  • Updated EggDashboardPage to display the current mock egg stats
  • Shop and Inventory works.

Notes

  • This is still frontend mock data only.
  • Background and music equipment do not affect egg stats.
  • Kept egg stage fixed at 1 for now
  • Only one item per item type can be equipped at a time.
  • Only equipped decoration affects glow, warmth, or weight.
  • Egg stage-up logic is intentionally not implemented yet.

Testing

Tested locally with:

npm run dev

Then in devtools, execute codes as below.

localStorage.removeItem("memory_egg_egg");
localStorage.removeItem("memory_egg_shop_items");
localStorage.removeItem("memory_egg_user_items");
localStorage.setItem(
  "memory_egg_user",
  JSON.stringify({
    user_id: 1,
    email: "demo@nacimiento.app",
    nickname: "Wanderer",
    will_balance: 1000,
    created_at: new Date().toISOString()
  })
);

Expected Output

1. Default egg stats

  • Go to /nest.
  • Egg status should show:
Stage 1
Glow 0
Warmth 0
Weight 0

2. Decoration affects egg stats

  • Go to /shop.
  • Buy Warm Blanket, Tiny Lamp, and Shell Ribbon.
  • Go to /inventory.
  • Open Decorations.
  • Equip Warm Blanket.
  • Return to /nest.

Expected:

Glow 0
Warmth 15
Weight 0

3. Equipping another decoration replaces the previous decoration effect

  • Go back to /inventory.
  • Equip Tiny Lamp.
  • Return to /nest.

Expected:

Glow 15
Warmth 0
Weight 0

4. Background/music do not affect stats

Equip a background or music item.
Return to /nest.

Expected: Egg stats should not change because only decorations affect stats.

5. Unequipping decoration clears stats

Unequip the currently equipped decoration.
Return to /nest.

Expected:

Glow 0
Warmth 0
Weight 0

6. Test purchasing item to see if it gets added to the inventory, and not repurchasable in shop

  • Lack of credits should also block the purchase button.

@A1VERMAN A1VERMAN left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No comment

@Driedoutjerky Driedoutjerky merged commit 3b0505e into main Jun 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: must type: api REST API endpoint task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants