fix SetItem creation
This commit is contained in:
parent
81490da6a5
commit
9fef1daf87
|
@ -24,14 +24,20 @@ SETTINGS = (
|
|||
)
|
||||
|
||||
|
||||
class SetItem:
|
||||
class SetItem(int):
|
||||
'Represents a game setting.'
|
||||
|
||||
def __init__(self, name, value, *options):
|
||||
self.name = name
|
||||
self.value = value
|
||||
self.options = options
|
||||
|
||||
## keep for compat reasons
|
||||
self.value = value
|
||||
|
||||
|
||||
def __new__(cls, name, value, *options):
|
||||
return int.__new__(cls, value)
|
||||
|
||||
|
||||
def __repr__(self):
|
||||
return f'SetItem("{self.name}", "{self.value_string}")'
|
||||
|
@ -62,7 +68,10 @@ class Settings:
|
|||
'''
|
||||
|
||||
def __init__(self):
|
||||
self._set = unrealsdk.FindObject('WillowSystemSettings', 'WillowGame.Default__WillowSystemSettings')
|
||||
self._set = unrealsdk.FindObject(
|
||||
'WillowSystemSettings',
|
||||
'WillowGame.Default__WillowSystemSettings'
|
||||
)
|
||||
|
||||
if is_in_game():
|
||||
self._set.LoadSystemSettings(False)
|
||||
|
|
Loading…
Reference in a new issue