Skip to content
This repository was archived by the owner on Feb 10, 2025. It is now read-only.
This repository was archived by the owner on Feb 10, 2025. It is now read-only.

World Items object adds unnecessary information to items #83

Open
@djasnowski

Description

@djasnowski

What is the current behavior?

The world.items object on the server (can be accessed via http://localhost:4000/world/items populates the items on the map. When viewed, some items have extraneous information like so:

[
  {
    "id": "bronze-pickaxe",
    "respawnIn": "8s",
    "x": 20,
    "y": 112,
    "uuid": "26a4ead5-4fd1-49bd-b2bc-6db2d792f613",
    "respawn": true,
    "pickedUp": false,
    "timestamp": 1558666693612
  },
  {
    "id": "bronze-shield",
    "respawnIn": "1m 30s",
    "x": 18,
    "y": 113,
    "uuid": "fa4990da-859a-46b3-b2e2-93aa5517933d",
    "respawn": true,
    "pickedUp": false,
    "timestamp": 1558666693612,
    "context": "item",
    "name": "Bronze Shield",
    "examine": "Reliable shield for all-around combat made of Bronze.",
    "price": 41,
    "type": "armor",
    "slot": "left_hand",
    "stats": {
      "attack": {
        "stab": 0,
        "slash": 0,
        "crush": 0,
        "range": 0
      },
      "defense": {
        "stab": 3,
        "slash": 5,
        "crush": 10,
        "range": 6
      }
    },
    "graphics": {
      "tileset": "armor",
      "row": 6,
      "column": 0
    },
    "actions": [
      "take",
      "examine",
      "drop",
      "equip",
      "unequip",
      "deposit",
      "withdraw",
      "buy",
      "sell",
      "value"
    ]
  }
]

If the current behavior is a bug, please provide the exact steps to reproduce.

Drop items. Observe world.items value. (itemsDropped)

What is the expected behavior?

To only contain needed information.

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    HacktoberfestbackendNode.js-related or anything to do in the serverbug"Hey, that's not suppose to happen."easyIssue/feature that is easy to fix or implement. Good for 1st-time contributors.help wantedIssues that we need multiple opinions on.low priorityNice-to-have issues and features.mapIssues or features relating to the game map (canvas or code).playerFeatures/issues relating to the player of Delaford.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions