Command to delete grids that fail an IsWorking check for a specified block.#166
Command to delete grids that fail an IsWorking check for a specified block.#166kontu wants to merge 2 commits intoTorchAPI:masterfrom kontu:master
Conversation
Update from essentials master
LordTylus
left a comment
There was a problem hiding this comment.
As commented an the file I would like that feature to be a condition instead of a separate command with duplicated deletion logic.
Unless Jim is fine with doing it that way.
| Log.Info($"Cleanup deleted {count} grids matching conditions {string.Join(", ", Context.Args)}"); | ||
| } | ||
|
|
||
| [Command("delete offtype", "Deletes grids with specified blocks toggled off.")] |
There was a problem hiding this comment.
Why is this a separate command tho?
I personally prefer it to keep it as !cleanup list or !cleanup delete
Instead you could have added a new condition you can see how for example HasType is implemented in line 385
As it is implemented now I have not the ability to just "list" which grids would be affected. And since I cannot see what would be affected I cannot check if my filter is correct or I for example need to exclude something with other conditions.
There was a problem hiding this comment.
5 years late but I agree with LordTylus
Commit 911b610 is just updating my fork to the current TorchAPI/Essentials master.
Commit 6aafed3 adds a "delete offtype" command to "!cleanup" to delete grids based on whether a specified blocktype is non-functional
isWorking == falseCode originally written by Teknikal (AdamOckley), he just asked me to put in a clean pull request for it for him.