mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-16 04:35:49 +00:00
🐛 fix target particle_threshold & particle_drop_count type issue
This commit is contained in:
parent
a876033325
commit
cda7d5d814
@ -281,9 +281,9 @@ class GCSimConverter:
|
||||
elif key == "radius":
|
||||
target.radius = float(value)
|
||||
elif key == "particle_threshold":
|
||||
target.particle_threshold = int(value)
|
||||
target.particle_threshold = float(value)
|
||||
elif key == "particle_drop_count":
|
||||
target.particle_drop_count = int(value)
|
||||
target.particle_drop_count = float(value)
|
||||
elif key in ("pyro", "hydro", "dendro", "electro", "anemo", "cryo", "geo", "physical"):
|
||||
target.others[key] = float(value)
|
||||
else:
|
||||
|
@ -168,8 +168,8 @@ class GCSimTarget(BaseModel):
|
||||
radius: Optional[float] = None
|
||||
hp: Optional[int] = None
|
||||
amount: Optional[int] = None
|
||||
particle_threshold: Optional[int] = None
|
||||
particle_drop_count: Optional[int] = None
|
||||
particle_threshold: Optional[float] = None
|
||||
particle_drop_count: Optional[float] = None
|
||||
others: Dict[str, Any] = {}
|
||||
|
||||
def __str__(self) -> str:
|
||||
|
Loading…
Reference in New Issue
Block a user