- Timestamp:
- Jul 31, 2023, 4:06:13 PM (16 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/AllocsCommands/Commands/RemoveLandProtection.cs
r420 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 RemoveLandProtection : ConsoleCmdAbstract { 7 9 protected override string getDescription () { … … 47 49 GameManager.Instance.SetBlocksRPC (changes); 48 50 49 SdtdConsole.Instance.Output ("Tried to remove #" + changes.Count + 50 " land protection blocks for player \"" + _id + "\". Note " + 51 "that only blocks in chunks that are currently loaded (close to any player) could be removed. " + 52 "Please check for remaining blocks by running:"); 53 SdtdConsole.Instance.Output (" listlandprotection " + _id); 51 SdtdConsole.Instance.Output ( 52 $"Tried to remove #{changes.Count} land protection blocks for player \"{_id}\". Note that only blocks in chunks that are currently loaded (close to any player) could be removed. Please check for remaining blocks by running:"); 53 SdtdConsole.Instance.Output ($" listlandprotection {_id}"); 54 54 } catch (Exception e) { 55 Log.Out ( "Error in RemoveLandProtection.removeById: " + e);55 Log.Out ($"Error in RemoveLandProtection.removeById: {e}"); 56 56 } 57 57 } 58 58 59 private void removeByPosition ( List<string> _coords) {59 private void removeByPosition (IReadOnlyList<string> _coords) { 60 60 int.TryParse (_coords [0], out int x); 61 61 int.TryParse (_coords [1], out int y); … … 84 84 GameManager.Instance.SetBlocksRPC (changes); 85 85 86 SdtdConsole.Instance.Output ( "Land protection block at (" + v + ") removed");86 SdtdConsole.Instance.Output ($"Land protection block at ({v}) removed"); 87 87 } 88 88 … … 125 125 } catch (Exception e) { 126 126 SdtdConsole.Instance.Output ("Error removing claims"); 127 Log.Out ( "Error in RemoveLandProtection.Run: " + e);127 Log.Out ($"Error in RemoveLandProtection.Run: {e}"); 128 128 } 129 129 } catch (Exception e) { 130 130 SdtdConsole.Instance.Output ("Error getting current player's position"); 131 Log.Out ( "Error in RemoveLandProtection.Run: " + e);131 Log.Out ($"Error in RemoveLandProtection.Run: {e}"); 132 132 } 133 133 } else if (_params.Count == 1) {
Note:
See TracChangeset
for help on using the changeset viewer.