implement AddServerPackages

not very beautiful but .. will do the job
This commit is contained in:
2022-06-10 23:06:37 +00:00
parent c1a8610208
commit 59f545b250

View File

@@ -42,18 +42,28 @@ class GameOptionINI:
elif self.TValueType == OptionType.OT_FLOAT:
value = float(value)
else:
raise RuntimeError("Invalid Option TValueType")
raise RuntimeError("Invalid Option TValueType")
self.setAddKeyValue(value)
def setAddKeyValue(value)
inifile.setAddKeyValue(self.szSectionName,self.szKeyName,value)
def get(self,inifile:ChaChaSimpleINI):
print("get option <{0}>".format(self.szOptionName))
return inifile.getKeyValue(self.szSectionName,self.szKeyName)
class GameOptions_UT99_Add(GameOptionINI):
def setAddKeyValue(value)
inifile.setAddKeyValue(self.szSectionName,self.szKeyName,value,True)
class GameOptions_UT99_AddServerPackages(GameOptions_UT99_Add):
def __init__(self):
super().__init__( "AddServerPackages","Engine.GameEngine","ServerPackages",OptionType.OT_INTEGER,7777,"Server Listening port",False)
class GameOptions_UT99_Port(GameOptionINI):
def __init__(self):
super().__init__( "Port","URL","Port",OptionType.OT_INTEGER,7777,"Server Listening port",False)
class GameOptions_UT99_Map(GameOptionINI):
def __init__(self):
super().__init__( "Map","URL","Map",OptionType.OT_STRING,"dm-deck16][","Server Map",False)