Skip to content
This repository has been archived by the owner on Jun 9, 2022. It is now read-only.

Commit

Permalink
FIX - Chara info export entry JSON schema (#33)
Browse files Browse the repository at this point in the history
Signed-off-by: RaenonX <[email protected]>
  • Loading branch information
RaenonX committed May 22, 2021
1 parent 82e73c2 commit e8d1232
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion dlparse/export/entry/chara_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from dlparse.enums import Weapon
from dlparse.mono.asset import CharaDataEntry
from .base import UnitInfoEntryBase
from .base import JsonSchema, UnitInfoEntryBase

__all__ = ("CharaInfoEntry",)

Expand All @@ -23,6 +23,14 @@ def __post_init__(self):
self.weapon = self.unit_data.weapon
self.has_unique_dragon = self.unit_data.has_unique_dragon

@classmethod
@property
def json_schema(cls) -> JsonSchema:
return super().json_schema | {
"weapon": int,
"hasUniqueDragon": bool,
}

def to_json_entry(self) -> dict[str, Any]:
return super().to_json_entry() | {
"weapon": self.weapon.value,
Expand Down

0 comments on commit e8d1232

Please sign in to comment.