Mise à jour de 'DoConfig.py'
This commit is contained in:
87
DoConfig.py
87
DoConfig.py
@@ -62,7 +62,6 @@ class GameOption(metaclass=ABCMeta):
|
||||
self.ConfigFileRelPath = ConfigFileRelPath
|
||||
|
||||
def set(self,value:str):
|
||||
print("set option <{0}> to: {1}".format(self.szOptionName,value))
|
||||
if self.TValueType == OptionType.OT_STRING:
|
||||
value = str(value)
|
||||
elif self.TValueType == OptionType.OT_INTEGER:
|
||||
@@ -73,6 +72,7 @@ class GameOption(metaclass=ABCMeta):
|
||||
value = float(value)
|
||||
else:
|
||||
raise RuntimeError("Invalid Option TValueType")
|
||||
print("setting option <{0}> to: {1}".format(self.szOptionName,value))
|
||||
self.setAddKeyValue(value)
|
||||
|
||||
@abstractmethod
|
||||
@@ -280,6 +280,24 @@ class GameOption_UT99_MOTD2(GameOption_UT99):
|
||||
TValueType = OptionType.OT_STRING
|
||||
szDefaultValue = "Enjoy your stay and have fun"
|
||||
szHelp = "Message of the day (2)"
|
||||
|
||||
@GameOptions_Factory_Register
|
||||
class GameOption_UT99_MOTD3(GameOption_UT99):
|
||||
szOptionName = "MOTD3"
|
||||
szSectionName = "Engine.GameReplicationInfo"
|
||||
szKeyName = "MOTDLine3"
|
||||
TValueType = OptionType.OT_STRING
|
||||
szDefaultValue = ""
|
||||
szHelp = "Message of the day (3)"
|
||||
|
||||
@GameOptions_Factory_Register
|
||||
class GameOption_UT99_MOTD4(GameOption_UT99):
|
||||
szOptionName = "MOTD4"
|
||||
szSectionName = "Engine.GameReplicationInfo"
|
||||
szKeyName = "MOTDLine4"
|
||||
TValueType = OptionType.OT_STRING
|
||||
szDefaultValue = "Game Server by ChaCha"
|
||||
szHelp = "Message of the day (4)"
|
||||
|
||||
@GameOptions_Factory_Register
|
||||
class GameOption_UT99_AdminEmail(GameOption_UT99):
|
||||
@@ -377,7 +395,52 @@ class GameOption_UT99_MaxPlayers(GameOption_UT99):
|
||||
szKeyName = "MaxPlayers"
|
||||
TValueType = OptionType.OT_INTEGER
|
||||
szDefaultValue = "20"
|
||||
szHelp = "Max Players"
|
||||
szHelp = "Game Max Players"
|
||||
|
||||
@GameOptions_Factory_Register
|
||||
class GameOption_UT99_MaxSpectators(GameOption_UT99):
|
||||
szOptionName = "MaxSpectators"
|
||||
szSectionName = "Engine.GameInfo"
|
||||
szKeyName = "MaxSpectators"
|
||||
TValueType = OptionType.OT_INTEGER
|
||||
szDefaultValue = "20"
|
||||
szHelp = "Game Max Spectators"
|
||||
|
||||
@GameOptions_Factory_Register
|
||||
class GameOption_UT99_CTF_TimeLimit(GameOption_UT99):
|
||||
szOptionName = "CTF_TimeLimit"
|
||||
szSectionName = "Botpack.CTFGame"
|
||||
szKeyName = "TimeLimit"
|
||||
TValueType = OptionType.OT_INTEGER
|
||||
szDefaultValue = "20"
|
||||
szHelp = "Game Time Limit"
|
||||
|
||||
@GameOptions_Factory_Register
|
||||
class GameOption_UT99_CTF_GoalTeamScore(GameOption_UT99):
|
||||
szOptionName = "CTF_GoalTeamScore"
|
||||
szSectionName = "Botpack.CTFGame"
|
||||
szKeyName = "GoalTeamScore"
|
||||
TValueType = OptionType.OT_INTEGER
|
||||
szDefaultValue = "3"
|
||||
szHelp = "Game Score Limit"
|
||||
|
||||
@GameOptions_Factory_Register
|
||||
class GameOption_UT99_DM_TimeLimit(GameOption_UT99):
|
||||
szOptionName = "DM_TimeLimit"
|
||||
szSectionName = "Botpack.DeathMatchPlus"
|
||||
szKeyName = "TimeLimit"
|
||||
TValueType = OptionType.OT_INTEGER
|
||||
szDefaultValue = "10"
|
||||
szHelp = "Game Time Limit"
|
||||
|
||||
@GameOptions_Factory_Register
|
||||
class GameOption_UT99_DM_FragLimit(GameOption_UT99):
|
||||
szOptionName = "DM_FragLimit"
|
||||
szSectionName = "Botpack.DeathMatchPlus"
|
||||
szKeyName = "FragLimit"
|
||||
TValueType = OptionType.OT_INTEGER
|
||||
szDefaultValue = "10"
|
||||
szHelp = "Game Score Limit"
|
||||
|
||||
@GameOptions_Factory_Register
|
||||
class GameOption_UT99_ServerLogName(GameOption_UT99):
|
||||
@@ -404,7 +467,25 @@ class GameOption_UT99_WebServer(GameOption_UT99):
|
||||
else:
|
||||
inifile.setAddKeyValue("UWeb.WebServer","bEnabled","False")
|
||||
inifile.writeFile()
|
||||
|
||||
|
||||
@GameOptions_Factory_Register
|
||||
class GameOption_UT99_CTF_TournamentMode(GameOption_UT99):
|
||||
szOptionName = "CTF_TournamentMode"
|
||||
szSectionName = "Botpack.CTFGame"
|
||||
szKeyName = "bTournament"
|
||||
TValueType = OptionType.OT_BOOLEAN
|
||||
szDefaultValue = "False"
|
||||
szHelp = "Enable Tournament Mode"
|
||||
|
||||
@GameOptions_Factory_Register
|
||||
class GameOption_UT99_DM_TournamentMode(GameOption_UT99):
|
||||
szOptionName = "DM_TournamentMode"
|
||||
szSectionName = "Botpack.DeathMatchPlus"
|
||||
szKeyName = "bTournament"
|
||||
TValueType = OptionType.OT_BOOLEAN
|
||||
szDefaultValue = "False"
|
||||
szHelp = "Enable Tournament Mode"
|
||||
|
||||
@GameOptions_Factory_Register
|
||||
class GameOption_UT99_CTF_UseTranslocator(GameOption_UT99):
|
||||
szOptionName = "CTF_UseTranslocator"
|
||||
|
||||
Reference in New Issue
Block a user