Changeset 86 for binary-improvements
- Timestamp:
- Jul 19, 2014, 1:17:49 PM (10 years ago)
- Location:
- binary-improvements
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/src/AdminToolsStuff.cs
r84 r86 11 11 List<string> allowed = new List<string> (); 12 12 13 ConsoleSdtd console = ConnectionManager.Instance.gameManager.m_GUIConsole; 14 13 15 foreach (AdminToolsCommandPermissions atcp in perms) { 14 16 if (tmpInfo.SteamID != null && tmpInfo.SteamID.Length > 0) { 15 17 if ((atcp.PermissionLevel >= tmpInfo.PermissionLevel) || (atcp.PermissionLevel >= 1000)) { 16 a llowed.Add (atcp.Command);18 addAllowed (console, allowed, atcp.Command); 17 19 } 18 20 } else { 19 21 if (atcp.PermissionLevel >= 1000) { 20 a llowed.Add (atcp.Command);22 addAllowed (console, allowed, atcp.Command); 21 23 } 22 24 } … … 25 27 return allowed.ToArray (); 26 28 } 29 30 private static void addAllowed (ConsoleSdtd console, List<string> list, string cmd) 31 { 32 ConsoleCommand cc = console.getCommand (cmd); 33 if (cc != null) { 34 foreach (string ccName in cc.Names()) { 35 if (!list.Contains (ccName)) { 36 list.Add (ccName); 37 } 38 } 39 } else { 40 list.Add (cmd); 41 } 42 } 27 43 } 28 44 -
binary-improvements/NamePatcher/NamePatcher.cs
r84 r86 86 86 foreach (FieldDefinition fd in mainModule.GetType ("ConnectionManager").Fields) { 87 87 TypeReference fdType = fd.FieldType; 88 if (fdType.FullName.Equals ("GameManager")) { 89 Console.WriteLine ("Renaming and making public ConnectionManager field -> gameManager"); 90 fd.Attributes = fd.Attributes & (~Mono.Cecil.FieldAttributes.Private) | Mono.Cecil.FieldAttributes.Public; 91 NameNormalizer.setName (fd, "gameManager"); 92 } 88 93 if (fdType.FullName.Contains ("Dictionary") && fdType.FullName.Contains ("ClientInfo")) { 89 94 Console.WriteLine ("Renaming and making public ConnectionManager field -> connectedClients"); … … 143 148 if (consoleCommandTypeName.Length > 0) { 144 149 foreach (MethodDefinition md in typeConsole.Methods) { 145 if (md.Parameters.Count == 1 && md.Parameters [0].ParameterType.Name.Equals (consoleCommandTypeName)) { 146 Console.WriteLine ("Renaming console method -> AddCommand"); 147 NameNormalizer.setName (md, "AddCommand"); 150 if (!md.IsConstructor) { 151 if (md.Parameters.Count == 1 && md.Parameters [0].ParameterType.Name.Equals (consoleCommandTypeName)) { 152 Console.WriteLine ("Renaming console method -> AddCommand"); 153 NameNormalizer.setName (md, "AddCommand"); 154 } 155 if (md.Parameters.Count == 1 && md.Parameters [0].ParameterType.FullName.Equals ("System.String") && md.ReturnType.FullName.Equals (consoleCommandTypeName)) { 156 Console.WriteLine ("Renaming console method -> getCommand"); 157 NameNormalizer.setName (md, "getCommand"); 158 } 148 159 } 149 160 } -
binary-improvements/NamePatcher/NamePatcher.userprefs
r84 r86 3 3 <MonoDevelop.Ide.Workbench ActiveDocument="NamePatcher.cs"> 4 4 <Files> 5 <File FileName="NamePatcher.cs" Line=" 109" Column="57" />5 <File FileName="NamePatcher.cs" Line="98" Column="5" /> 6 6 <File FileName="NameNormalizer.cs" Line="188" Column="1" /> 7 7 </Files> -
binary-improvements/assembly-patcher/Assembly-Patcher.userprefs
r84 r86 3 3 <MonoDevelop.Ide.Workbench ActiveDocument="Main.cs"> 4 4 <Files> 5 <File FileName="Main.cs" Line="2 9" Column="54" />5 <File FileName="Main.cs" Line="28" Column="4" /> 6 6 <File FileName="AssemblyInfo.cs" Line="21" Column="1" /> 7 7 </Files>
Note:
See TracChangeset
for help on using the changeset viewer.