Merge branch 'master' of http://gitea.dmz.chacha.home/gitea/chacha/UT99-Official.git into master
This commit is contained in:
44
DoConfig.py
44
DoConfig.py
@@ -12,7 +12,7 @@ from os.path import join
|
||||
|
||||
|
||||
from pprint import pprint
|
||||
from ChaChaSimpleINI import ChaChaSimpleINI
|
||||
from ChaChaSimpleINI import ChaChaSimpleINI,ChaChaINI_KeyNotFoundException
|
||||
from abc import ABCMeta,abstractmethod
|
||||
|
||||
class OptionType(Enum):
|
||||
@@ -138,6 +138,12 @@ class GameOption_UT99(GameOption):
|
||||
|
||||
class GameOption_UT99_GenAdd(GameOption_UT99):
|
||||
bForceAdd = True
|
||||
def set(self,value:str):
|
||||
try:
|
||||
self.rem(value)
|
||||
except ChaChaINI_KeyNotFoundException:
|
||||
pass
|
||||
super().set(value)
|
||||
|
||||
@GameOptions_Factory_Register
|
||||
class GameOption_UT99_ServerPackages(GameOption_UT99_GenAdd):
|
||||
@@ -340,6 +346,42 @@ class GameOption_UT99_WebServer(GameOption_UT99):
|
||||
inifile.setAddKeyValue("UWeb.WebServer","bEnabled","False")
|
||||
inifile.writeFile()
|
||||
|
||||
@GameOptions_Factory_Register
|
||||
class GameOption_UT99_CTF_UseTranslocator(GameOption_UT99):
|
||||
szOptionName = "CTF_UseTranslocator"
|
||||
szSectionName = "Botpack.CTFGame"
|
||||
szKeyName = "bUseTranslocator"
|
||||
TValueType = OptionType.OT_BOOLEAN
|
||||
szDefaultValue = "True"
|
||||
szHelp = "Enable Translocator"
|
||||
|
||||
@GameOptions_Factory_Register
|
||||
class GameOption_UT99_DM_UseTranslocator(GameOption_UT99):
|
||||
szOptionName = "DM_UseTranslocator"
|
||||
szSectionName = "Botpack.DeathMatchPlus"
|
||||
szKeyName = "bUseTranslocator"
|
||||
TValueType = OptionType.OT_BOOLEAN
|
||||
szDefaultValue = "True"
|
||||
szHelp = "Enable Translocator"
|
||||
|
||||
@GameOptions_Factory_Register
|
||||
class GameOption_UT99_DOM_UseTranslocator(GameOption_UT99):
|
||||
szOptionName = "DOM_UseTranslocator"
|
||||
szSectionName = "Botpack.Domination"
|
||||
szKeyName = "bUseTranslocator"
|
||||
TValueType = OptionType.OT_BOOLEAN
|
||||
szDefaultValue = "True"
|
||||
szHelp = "Enable Translocator"
|
||||
|
||||
@GameOptions_Factory_Register
|
||||
class GameOption_UT99_AS_UseTranslocator(GameOption_UT99):
|
||||
szOptionName = "AS_UseTranslocator"
|
||||
szSectionName = "Botpack.Assault"
|
||||
szKeyName = "bUseTranslocator"
|
||||
TValueType = OptionType.OT_BOOLEAN
|
||||
szDefaultValue = "True"
|
||||
szHelp = "Enable Translocator"
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument("-v", "--verbosity", action="count", default=0,
|
||||
|
||||
Reference in New Issue
Block a user