- Timestamp:
- May 11, 2016, 8:54:19 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/AllocsCommands/Commands/ListLandProtection.cs
r253 r273 13 13 public override string GetHelp () { 14 14 return "Usage:\n" + 15 " 1. listlandprotection summary\n" + 16 " 2. listlandprotection <steam id>\n" + 17 " 3. listlandprotection <player name / entity id>\n" + 18 " 4. listlandprotection nearby\n" + 19 " 5. listlandprotection nearby <radius>\n" + 20 "1. Lists only players that own claimstones, the number they own and the protection status\n" + 21 "2. Lists only the claims of the player given by his SteamID including the individual claim positions\n" + 22 "3. Same as 2 but player given by his player name or entity id (as given by e.g. \"lpi\")\n" + 23 "4. Lists claims in a square with edge length of 64 around the executing player\n" + 24 "5. Same as 4 but square edge length can be specified"; 15 " 1. listlandprotection summary\n" + 16 " 2. listlandprotection <steam id / player name / entity id> [parseable]\n" + 17 " 3. listlandprotection nearby [length]\n" + 18 "1. Lists only players that own claimstones, the number they own and the protection status\n" + 19 "2. Lists only the claims of the player given by his SteamID / entity id / playername, including the individual claim positions.\n" + 20 " If \"parseable\" is specified the output of the individual claims will be in a format better suited for programmatical readout.\n" + 21 "3. Lists claims in a square with edge length of 64 (or the optionally specified size) around the executing player\n"; 25 22 } 26 23 … … 47 44 bool onlyCloseToPlayer = false; 48 45 int closeToDistance = 32; 46 bool parseableOutput = false; 47 48 if (_params.Contains ("parseable")) { 49 parseableOutput = true; 50 _params.Remove ("parseable"); 51 } 49 52 50 53 if (_params.Count == 1) { … … 69 72 if (_params.Count == 3) { 70 73 if (!int.TryParse (_params[1], out closeToDistance)) { 71 SdtdConsole.Instance.Output ("Given radius is not an integer!"); 74 SdtdConsole.Instance.Output ("Given length is not an integer!"); 75 return; 72 76 } 77 closeToDistance /= 2; 73 78 } 74 79 ClientInfo ci = ConsoleHelper.ParseParamSteamIdOnline (_params [_params.Count - 1]); … … 79 84 SdtdConsole.Instance.Output ("Error getting current player's position"); 80 85 Log.Out ("Error in ListLandProtection.Run: " + e); 86 return; 81 87 } 82 88 } else { … … 108 114 if (!summaryOnly) { 109 115 foreach (Vector3i v in kvp.Value) { 110 SdtdConsole.Instance.Output (" (" + v.ToString () + ")"); 116 if (parseableOutput) { 117 SdtdConsole.Instance.Output ("LandProtectionOf: id=" + kvp.Key.SteamID + ", playerName=" + kvp.Key.Name + ", location=" + v.ToString ()); 118 } else { 119 SdtdConsole.Instance.Output (" (" + v.ToString () + ")"); 120 } 111 121 } 112 122 }
Note:
See TracChangeset
for help on using the changeset viewer.