- Timestamp:
- Jul 31, 2023, 4:06:13 PM (16 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/AllocsCommands/Commands/ListLandProtection.cs
r446 r455 2 2 using System.Collections.Generic; 3 3 using AllocsFixes.PersistentData; 4 using JetBrains.Annotations; 4 5 5 6 namespace AllocsFixes.CustomCommands { 7 [UsedImplicitly] 6 8 public class ListLandProtection : ConsoleCmdAbstract { 7 9 protected override string getDescription () { … … 57 59 userIdFilter = ci.InternalId; 58 60 } else { 59 SdtdConsole.Instance.Output ( "Player name or entity id \"" + _params [0] + "\" not found.");61 SdtdConsole.Instance.Output ($"Player name or entity id \"{_params[0]}\" not found."); 60 62 return; 61 63 } … … 79 81 } catch (Exception e) { 80 82 SdtdConsole.Instance.Output ("Error getting current player's position"); 81 Log.Out ( "Error in ListLandProtection.Run: " + e);83 Log.Out ($"Error in ListLandProtection.Run: {e}"); 82 84 return; 83 85 } … … 102 104 103 105 foreach (KeyValuePair<Player, List<Vector3i>> kvp in claims) { 104 SdtdConsole.Instance.Output (string.Format ( 105 "Player \"{0} ({1})\" owns {4} keystones (protected: {2}, current hardness multiplier: {3})", 106 kvp.Key.Name, 107 kvp.Key.InternalId, 108 kvp.Key.LandProtectionActive, 109 kvp.Key.LandProtectionMultiplier, 110 kvp.Value.Count)); 111 if (!summaryOnly) { 112 foreach (Vector3i v in kvp.Value) { 113 if (parseableOutput) { 114 SdtdConsole.Instance.Output ("LandProtectionOf: id=" + kvp.Key.InternalId + 115 ", playerName=" + kvp.Key.Name + ", location=" + v); 116 } else { 117 SdtdConsole.Instance.Output (" (" + v + ")"); 118 } 106 SdtdConsole.Instance.Output ( 107 $"Player \"{kvp.Key.Name} ({kvp.Key.InternalId})\" owns {kvp.Value.Count} keystones (protected: {kvp.Key.LandProtectionActive}, current hardness multiplier: {kvp.Key.LandProtectionMultiplier})"); 108 if (summaryOnly) { 109 continue; 110 } 111 112 foreach (Vector3i v in kvp.Value) { 113 if (parseableOutput) { 114 SdtdConsole.Instance.Output ($"LandProtectionOf: id={kvp.Key.InternalId}, playerName={kvp.Key.Name}, location={v}"); 115 } else { 116 SdtdConsole.Instance.Output ($" ({v})"); 119 117 } 120 118 } … … 122 120 123 121 if (userIdFilter == null) { 124 SdtdConsole.Instance.Output ( "Total of " + ppl.m_lpBlockMap.Count + "keystones in the game");122 SdtdConsole.Instance.Output ($"Total of {ppl.m_lpBlockMap.Count} keystones in the game"); 125 123 } 126 124 }
Note:
See TracChangeset
for help on using the changeset viewer.