mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Options: fix corner case where Toggle.value and Toggle.__int__ would be bool
Which lead to a connect failure in Raft
This commit is contained in:
@@ -298,7 +298,7 @@ class Toggle(NumericOption):
|
|||||||
if type(data) == str:
|
if type(data) == str:
|
||||||
return cls.from_text(data)
|
return cls.from_text(data)
|
||||||
else:
|
else:
|
||||||
return cls(data)
|
return cls(int(data))
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_option_name(cls, value):
|
def get_option_name(cls, value):
|
||||||
|
Reference in New Issue
Block a user