Skip to content

[BUG]: The Health isn't shown for planetRegions. #142

Closed
@CrosswaveOmega

Description

@CrosswaveOmega

Link to faulty endpoint

https://api.helldivers2.dev/api/v1/planets

The name of your client/application

(this isn't a problem with my app, specific.)

Request information

Accessed through the openapi Swagger documentation on the app.

Steps to reproduce

Call endpoint, go to a planet that should have an active region (is Available==True and present in Status), the health value that should be in the object is not there.

What is expected?

In raw Status endpoint:

planetRegions": [
      {
        "planetIndex": 131,
        "regionIndex": 1,
        "owner": 2,
        "health": 381953,
        "regerPerSecond": 0,
        "availabilityFactor": 0.6501389,
        "isAvailable": true,
        "players": 0
      },
      {
        "planetIndex": 131,
        "regionIndex": 2,
        "owner": 2,
        "health": 391464,
        "regerPerSecond": 0,
        "availabilityFactor": 1,
        "isAvailable": true,
        "players": 0
      },
      {
        "planetIndex": 131,
        "regionIndex": 0,
        "owner": 2,
        "health": 200000,
        "regerPerSecond": 1,
        "availabilityFactor": 0.25248578,
        "isAvailable": false,
        "players": 12
      },

In raw WarInfo Endpoint

        "planetIndex": 131,
        "regionIndex": 2,
        "settingsHash": 1978368732,
        "maxHealth": 400000,
        "regionSize": 2
      },
      {
        "planetIndex": 131,
        "regionIndex": 0,
        "settingsHash": 2634421583,
        "maxHealth": 200000,
        "regionSize": 1
      },
     {
        "planetIndex": 131,
        "regionIndex": 1,
        "settingsHash": 1872830438,
        "maxHealth": 400000,
        "regionSize": 2
      },

What is returned by the v1 planets and campaigns. the health value isn't present!
"regions": [
{
"name": "APPROVAL CITY",
"description": null,
"maxHealth": 400000,
"size": "City",
"regenPerSecond": 0,
"availabilityFactor": 0.6501389,
"isAvailable": true,
"players": 0
},
{
"name": "OLD BRANCH",
"description": null,
"maxHealth": 400000,
"size": "City",
"regenPerSecond": 0,
"availabilityFactor": 1,
"isAvailable": true,
"players": 0
},
{
"name": "TIMELY",
"description": null,
"maxHealth": 200000,
"size": "Town",
"regenPerSecond": 1,
"availabilityFactor": 0.25248578,
"isAvailable": false,
"players": 10
}
]

What is actually happening?

It doesn't look like "health" was ever added to the Region Object.  It's missing.

System Info

Any additional comments?

I'd include planetIndex and regionIndex within the Region object as well, as the primary key of each region is a tuple of planetIndex and regionIndex. it helps when debugging (and the PlanetRegions in Status and WarInfo aren't always sorted).

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions