I love the smell of UnrealEd crashing in the morning. – tarquin

Legacy:CommandLineParams

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search


  1. //-----------------------------------------------------------
  2. //	Ladder.CommandLineParams
  3. //
  4. //	This class is used to simplify adding command line parameters to Ladder Profiles
  5. //-----------------------------------------------------------
  6. class CommandLineParams extends Info
  7. 	config
  8. 	abstract
  9. 	notplaceable;
  10.  
  11. var bool				bRejectPlayInfo;
  12. var string 				TeamSymbolData;
  13. var array<string> 		TeamSymbols;
  14. var array<string>		TeamAIClasses;
  15.  
  16. var private config string 	AdminUserName, AdminPassword, AccessControl, GameRules;
  17. var private config string 	RedTeamAI, BlueTeamAI, RedTeamSymbol, BlueTeamSymbol;
  18. var private config bool 	GameStats, DemoRec, bAutoNumBots, QuickStart;
  19.  
  20. var localized string 	DisplayText[8];
  21. var localized string 	Extra;
  22.  
  23. static event bool AcceptPlayInfoProperty(string PropertyName)
  24. {
  25. 	return !default.bRejectPlayInfo;
  26. }
  27.  
  28. static function FillPlayInfo(PlayInfo PI)
  29. {
  30. 	local int i;
  31.  
  32. 	Super.FillPlayInfo(PI);
  33. 	GenerateTeamSymbolExtras();
  34.  
  35. 	PI.AddSetting("Command Line", "GameRules", 		default.DisplayText[i],   1, i++, "Text", "16","Mu|L|Lm");
  36. 	PI.AddSetting("Command Line", "DemoRec", 		default.DisplayText[i], 100, i++, "Check",,"L|Lm");
  37. 	PI.AddSetting("Command Line", "bAutoNumBots", 	default.DisplayText[i],   2, i++, "Check",,"L|Lm|Ms");
  38. 	PI.AddSetting("Command Line", "QuickStart", 	default.DisplayText[i],   2, i++, "Check",,"L|Lm|Mb");
  39. 	PI.AddSetting("Command Line", "RedTeamSymbol", 	default.DisplayText[i],   1, i++, "Select", default.TeamSymbolData, "L|Lm");
  40. 	PI.AddSetting("Command Line", "BlueTeamSymbol", default.DisplayText[i],   1,   i, "Select", default.TeamSymbolData, "L|Lm");
  41. }
  42.  
  43. static function GenerateTeamSymbolExtras()
  44. {
  45. 	local int i;
  46. 	local array<string> Ar;
  47. 	local string S;
  48.  
  49. 	Ar = default.TeamSymbols;
  50. 	for (i = 0; i < Ar.Length; i++)
  51. 	{
  52. 		Ar[i] = Ar[i] $ ";" $ ItemName(Ar[i]);
  53. 		if (S != "") S = S $ ";";
  54. 		S = S $ Ar[i];
  55. 	}
  56.  
  57. 	default.TeamSymbolData = S;
  58. }
  59.  
  60. // Same as Actor.GetItemName()  (why didn't they make that function static?)
  61. static function string ItemName(string FullName)
  62. {
  63. 	local int pos;
  64.  
  65. 	pos = InStr(FullName, ".");
  66. 	While ( pos != -1 )
  67. 	{
  68. 		FullName = Right(FullName, Len(FullName) - pos - 1);
  69. 		pos = InStr(FullName, ".");
  70. 	}
  71.  
  72. 	return FullName;
  73. }
  74.  
  75. DefaultProperties
  76. {
  77. 	Extra="UnrealGame.TeamAI;Default AI;UnrealGame.CTFTeamAI;CTF Team AI;UnrealGame.BombingRunTeamAI;BR Team AI;UnrealGame.DOMTeamAI;DOM Team AI;SkaarjPack.InvasionTeamAI;Invasion Team AI"
  78. 	TeamSymbols[0]="TeamSymbols_UT2003.sym02"
  79. 	TeamSymbols[1]="TeamSymbols_UT2003.sym01"
  80. 	TeamSymbols[2]="TeamSymbols_UT2003.Apocalypse"
  81. 	TeamSymbols[3]="TeamSymbols_UT2003.BlackLegion"
  82. 	TeamSymbols[4]="TeamSymbols_UT2003.BoneCrushers"
  83. 	TeamSymbols[5]="TeamSymbols_UT2003.CampingWhores"
  84. 	TeamSymbols[6]="TeamSymbols_UT2003.ChildrenoftheSun"
  85. 	TeamSymbols[7]="TeamSymbols_UT2003.Crusaders"
  86. 	TeamSymbols[8]="TeamSymbols_UT2003.DarkProvince"
  87. 	TeamSymbols[9]="TeamSymbols_UT2003.Demolition"
  88. 	TeamSymbols[10]="TeamSymbols_UT2003.DrunkenMasters"
  89. 	TeamSymbols[11]="TeamSymbols_UT2003.DuneRiders"
  90. 	TeamSymbols[12]="TeamSymbols_UT2003.GearHeads"
  91. 	TeamSymbols[13]="TeamSymbols_UT2003.HappyDead"
  92. 	TeamSymbols[14]="TeamSymbols_UT2003.HappySmooth"
  93. 	TeamSymbols[15]="TeamSymbols_UT2003.HotDog"
  94. 	TeamSymbols[16]="TeamSymbols_UT2003.IronGuard"
  95. 	TeamSymbols[17]="TeamSymbols_UT2003.IronSkull"
  96. 	TeamSymbols[18]="TeamSymbols_UT2003.LordsOfPain"
  97. 	TeamSymbols[19]="TeamSymbols_UT2003.NightStalkers"
  98. 	TeamSymbols[20]="TeamSymbols_UT2003.PainMachine"
  99. 	TeamSymbols[21]="TeamSymbols_UT2003.Roswell"
  100. 	TeamSymbols[22]="TeamSymbols_UT2003.StrangeLove"
  101. 	TeamSymbols[23]="TeamSymbols_UT2003.SunBlades"
  102. 	TeamSymbols[24]="TeamSymbols_UT2003.SuperNova"
  103. 	TeamSymbols[25]="TeamSymbols_UT2003.Turtle"
  104. 	TeamSymbols[26]="TeamSymbols_UT2003.Venom"
  105. 	TeamSymbols[27]="TeamSymbols_UT2003.WrathofGod"
  106. 	TeamSymbols[28]="TeamSymbols_UT2003.Poo"
  107. 	TeamSymbols[29]="TeamSymbols_UT2003.ProfessorDeath"
  108. 	TeamSymbols[30]="TeamSymbols_UT2003.PeePee"
  109. 	TeamSymbols[31]="TeamSymbols_UT2003.PillPoppers"
  110. 	TeamSymbols[32]="TeamSymbols_UT2003.LANplay"
  111. 	TeamSymbols[33]="TeamSymbols_UT2003.sym05"
  112. 	TeamSymbols[34]="TeamSymbols_UT2003.sym06"
  113. 	TeamSymbols[35]="TeamSymbols_UT2003.sym08"
  114. 	TeamSymbols[36]="TeamSymbols_UT2003.sym07"
  115. 	TeamSymbols[37]="TeamSymbols_UT2003.sym03"
  116. 	TeamSymbols[38]="TeamSymbols_UT2003.sym09"
  117. 	TeamSymbols[39]="TeamSymbols_UT2003.sym04"
  118. 	TeamSymbols[40]="TeamSymbols_UT2003.sym10"
  119. 	TeamSymbols[41]="TeamSymbols_UT2003.sym11"
  120. 	TeamSymbols[42]="TeamSymbols_UT2003.sym12"
  121. 	TeamSymbols[43]="TeamSymbols_UT2003.sym13"
  122. 	TeamSymbols[44]="TeamSymbols_UT2003.sym14"
  123. 	TeamSymbols[45]="TeamSymbols_UT2003.sym16"
  124. 	TeamSymbols[46]="TeamSymbols_UT2003.sym15"
  125. 	TeamSymbols[47]="TeamSymbols_UT2003.Warcry"
  126. 	TeamSymbols[48]="TeamSymbols_UT2003.BloodFists"
  127. 	TeamSymbols[49]="TeamSymbols_UT2003.DragonBreath"
  128. 	TeamSymbols[50]="TeamSymbols_UT2003.ColdSteel"
  129. 	TeamSymbols[51]="TeamSymbols_UT2003.sym18"
  130. 	TeamSymbols[52]="TeamSymbols_UT2003.sym17"
  131. 	TeamSymbols[53]="TeamSymbols_UT2003.sym19"
  132. 	TeamSymbols[54]="TeamSymbols_UT2003.ZPenguin"
  133. 	TeamSymbols[55]="TeamSymbols.LinkBeaconT"
  134. 	TeamSymbols[56]="TeamSymbols.TeamBeaconT"
  135. 	DisplayText(0)="Game Rule Mutators"
  136. 	DisplayText(1)="Enable Server Demos"
  137. 	DisplayText(2)="Per-map minimum players"
  138. 	DisplayText(3)="Allow bots to begin match"
  139. 	DisplayText(4)="AI for Red team"
  140. 	DisplayText(5)="AI for Blue team"
  141. 	DisplayText(6)="Red Team Symbol"
  142. 	DisplayText(7)="Blue Team Symbol"
  143. }

Tarquin: What is this page about?