mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Core: downgrade item classification to int before writing to file
This commit is contained in:
@@ -1150,7 +1150,7 @@ class ItemClassification(IntFlag):
|
|||||||
|
|
||||||
def as_flag(self) -> int:
|
def as_flag(self) -> int:
|
||||||
"""As Network API flag int."""
|
"""As Network API flag int."""
|
||||||
return self & 0b0111
|
return int(self & 0b0111)
|
||||||
|
|
||||||
|
|
||||||
class Item:
|
class Item:
|
||||||
@@ -1207,10 +1207,7 @@ class Item:
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def flags(self) -> int:
|
def flags(self) -> int:
|
||||||
new = self.classification.as_flag()
|
return self.classification.as_flag()
|
||||||
old = self.advancement + (self.useful << 1) + (self.trap << 2)
|
|
||||||
assert new == old
|
|
||||||
return new
|
|
||||||
|
|
||||||
def __eq__(self, other):
|
def __eq__(self, other):
|
||||||
return self.name == other.name and self.player == other.player
|
return self.name == other.name and self.player == other.player
|
||||||
|
Reference in New Issue
Block a user