Skip to content

Commit c59a96f

Browse files
adding changePerSecond field to global resource
1 parent 3fba8ec commit c59a96f

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ classifiers = [
2222
keywords=['helldivers2','api']
2323
requires-python = ">=3.8.1"
2424

25-
version = '0.0.1.20.21'
25+
version = '0.0.1.20.22'
2626
dependencies= [
2727
"pydantic>=2.9.2",
2828
"httpx>=0.27.2"

src/hd2api/models/Base/GlobalResource.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ class GlobalResource(BaseApiModel):
1010
Raw object which represents a global resource.
1111
"""
1212

13-
id32: Optional[int] = Field(
14-
alias="id32", default=None, description="The 32-bit ID."
15-
)
13+
id32: Optional[int] = Field(alias="id32", default=None, description="The 32-bit ID.")
1614
currentValue: Optional[Union[int, float]] = Field(
1715
alias="currentValue",
1816
default=None,
@@ -28,13 +26,19 @@ class GlobalResource(BaseApiModel):
2826
default=None,
2927
description="Flags that indicate something about this resource.",
3028
)
29+
changePerSecond: Optional[Union[int, float]] = Field(
30+
alias="changePerSecond",
31+
default=None,
32+
description="The change per second of this global resource.",
33+
)
3134

3235
def __sub__(self, other: "GlobalResource") -> "GlobalResource":
3336
camp = GlobalResource(
3437
id32=self.id32,
3538
currentValue=self.currentValue - other.currentValue, # type: ignore
3639
maxValue=self.maxValue,
3740
flags=self.flags,
41+
changePerSecond=self.changePerSecond,
3842
)
3943
# camp.retrieved_at = self.retrieved_at - other.retrieved_at
4044
return camp

0 commit comments

Comments
 (0)