democratizedspace / dspace

Free, open source space exploration idle game. Build your home base on earth, gather resources, and launch into orbit.
https://democratized.space
BSD Zero Clause License
4 stars 2 forks source link

arbitrary key/value store on objects #28

Open futuroptimist opened 1 year ago

futuroptimist commented 1 year ago

something like:

{
    "kvStore": [
        "totalChargeWattHours": {
            "type": "number",
            "value": 1000
        }
   ]
}

types (may add more later):

futuroptimist commented 1 year ago

To make things more concrete:

    {
        "id": "21",
        "name": "Hypercar (80% charge)",
        "description": "A futuristic electric vehicle with Fully Supervised Driving (FSD) capabilities. 80% charged.",
        "image": "/assets/hypercar.jpg"
    },
    {
        "id": "74",
        "name": "Hypercar (20% charge)",
        "description": "A futuristic electric vehicle with Fully Supervised Driving (FSD) capabilities. 20% charged.",
        "image": "/assets/hypercar.jpg",
        "price": "30000 dUSD"
    },

Instead of 2 separate items, we should just have a kv pair for charge level (measured in Wh)