Carbon Copy plugin for VS
修訂 | c2157c0ab1ba7a61d6e97a39baca0e9dc318bd7e (tree) |
---|---|
時間 | 2020-04-18 08:15:48 |
作者 | melchior <melchior@user...> |
Commiter | melchior |
Fixed bad refactoring...
@@ -21,20 +21,15 @@ namespace CarbonCopy | ||
21 | 21 | private BlockPos start; |
22 | 22 | private BlockPos end; |
23 | 23 | private bool validSelection; |
24 | - private List<BlockPos> markedBlocks; | |
25 | - private List<int> colorList; | |
24 | + private List<BlockPos> markedBlocks = new List<BlockPos>( ); | |
25 | + private List<int> colorList = new List<int> { ColorUtil.ToRgba(180, 0, 195, 0) }; | |
26 | 26 | |
27 | - public CarbonCopyCommand( ) | |
28 | - { | |
29 | - this.markedBlocks = new List<BlockPos>( ); | |
30 | - this.colorList = new List<int> { ColorUtil.ToRgba(180, 0, 195, 0) }; | |
31 | - } | |
32 | 27 | |
33 | 28 | public CarbonCopyCommand(ICoreClientAPI clientAPI) |
34 | - { | |
29 | + { | |
35 | 30 | this.Command = _name; |
36 | 31 | this.Syntax = @"mark: start/end/ (x/y/z), save [name], clear; dump {items/blocks}"; |
37 | - this.Description = "Export crbon-copies of block selections locally.(as 'mex' file)"; | |
32 | + this.Description = "Export carbon-copies of block selections locally.(as json export schematic)"; | |
38 | 33 | |
39 | 34 | ClientAPI = clientAPI; |
40 | 35 | Logger = clientAPI.Logger; |
@@ -63,9 +58,7 @@ namespace CarbonCopy | ||
63 | 58 | switch (command) { |
64 | 59 | |
65 | 60 | case "mark": |
66 | - | |
67 | 61 | Process_MarkSubcommand(args); |
68 | - | |
69 | 62 | break; |
70 | 63 | |
71 | 64 | case "save": |
@@ -85,19 +78,19 @@ namespace CarbonCopy | ||
85 | 78 | break; |
86 | 79 | |
87 | 80 | default: |
88 | - ClientAPI.ShowChatMessage("Unrecognised argument..."); | |
81 | + ClientAPI.ShowChatMessage($"Unrecognised command: {command}"); | |
89 | 82 | break; |
90 | 83 | } |
91 | 84 | } |
92 | 85 | else { |
93 | - ClientAPI.ShowChatMessage("Needs a command: mark/save/clear/dump"); | |
86 | + ClientAPI.ShowChatMessage("Needs a command (parameter): mark/save/clear/dump"); | |
94 | 87 | } |
95 | 88 | } |
96 | 89 | |
97 | 90 | private void Process_MarkSubcommand(CmdArgs args) |
98 | 91 | { |
99 | 92 | if (args.Length > 0) { |
100 | - string subCommand = args.PopWord( ).ToLowerInvariant( ); | |
93 | + string subCommand = args.PopWord("?").ToLowerInvariant( ); | |
101 | 94 | |
102 | 95 | |
103 | 96 | switch (subCommand) { |