Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 501
Overhaul cleaners plugin; Add Maps::isPlantInBox#4949
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Bumber64
wants to merge
53
commits into
DFHack:developChoose a base branch
from
Bumber64:cleaners_etc
base:develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Uh oh!
There was an error while loading. Please reload this page.
Open
Changes from all commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
79364de
Update Lua API.rst - maps.isPlantInBox
Bumber64 8081985
Update cleaners.rst
Bumber64 174aa2e
Update regrass.rst - Talk about cleaners remove grass
Bumber64 96ab31d
Update LuaApi.cpp - Add maps.isPlantInBox
Bumber64 da108ee
Update Maps.h - isPlantInBox
Bumber64 b5dbea2
Update tile-material.lua - Use getPlantAtTile; handle roots
Bumber64 8f10e8e
Update Maps.cpp - isPlantInBox
Bumber64 ad11f48
Update CMakeLists.txt - cleaners link lua
Bumber64 e3a529a
Update burrow.cpp - Use Maps::forCoord; use using better
Bumber64 d165e27
Update plant.cpp - Move utility fn to Maps module
Bumber64 86f98b0
Update regrass.cpp - Maps::isValid is cleaner
Bumber64 4bd5bec
Create cleaners.lua
Bumber64 a4ccb44
Update cleaners.cpp
Bumber64 9ac1ded
Update cleaners.cpp - Remove plant cleaning (just rainwater)
Bumber64 f910c0c
Update changelog.txt
Bumber64 6375c92
Update changelog.txt
Bumber64 f89fc3c
Update cleaners.cpp - Fix print size_t
Bumber64 961ceb8
Update cleaners.cpp - Really fix print size_t
Bumber64 3876041
Merge branch 'DFHack:develop' into cleaners_etc
Bumber64 317eaf3
Merge branch 'DFHack:develop' into cleaners_etc
Bumber64 244e848
Tidy up docs
Bumber64 9b1b880
More doc tidying
Bumber64 ed4e3e0
Update regrass.rst - Minor wording change
Bumber64 6d26265
Update regrass.rst
Bumber64 e121d8f
Fix changelog.txt
Bumber64 a2e1e68
Merge branch 'develop' into cleaners_etc
Bumber64 0c651d7
Merge branch 'develop' into cleaners_etc
Bumber64 7b30129
Fix changelog.txt
Bumber64 82ec22e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 82738b4
Merge branch 'develop' into cleaners_etc
Bumber64 28f7fca
Update cleaners.cpp
Bumber64 7ecb7b7
Requested changes
Bumber64 79bdff8
Merge branch 'develop' into cleaners_etc
Bumber64 2519439
Update cleaners.cpp
Bumber64 9f73167
Update cleaners.cpp
Bumber64 16b311b
Merge branch 'develop' into cleaners_etc
Bumber64 100985a
Merge branch 'develop' into cleaners_etc
Bumber64 df3bbe4
Fix changelog
Bumber64 d2a8313
Fix changelog again
Bumber64 fc7563e
Merge branch 'develop' into cleaners_etc
Bumber64 843484a
Fix changelog.txt
Bumber64 1d35778
Update cleaners.cpp - DataDefs.h
Bumber64 547f686
Update cleaners.cpp - PluginLua.h
Bumber64 16359ec
Update cleaners.cpp
Bumber64 5f60c00
Don't need to convert search normalized to upper
Bumber64 c6e5336
Merge branch 'develop' into cleaners_etc
Bumber64 a323584
Merge branch 'develop' into cleaners_etc
Bumber64 de46ae8
Fix changelog
Bumber64 21b80bb
Handle tree/root tiles a bit cleaner
Bumber64 54b92fc
Fix tree tile mask
Bumber64 66a2915
Merge branch 'develop' into cleaners_etc
Bumber64 f23b2c2
Fix changelog.txt
Bumber64 62b5cc5
Fix printing pointer
Bumber64 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -5,57 +5,142 @@ cleaners | ||
| ======== | ||
| .. dfhack-tool:: | ||
| :summary: Provides commands for cleaning spatter from the map. | ||
| :tags: adventure fort armok fps items map units | ||
| :summary: Cleans spatter and/or grass from map tiles. | ||
| :tags: adventure fort armok fps items map plants units | ||
| :no-command: | ||
| .. dfhack-command:: clean | ||
| :summary: Removes contaminants. | ||
| .. dfhack-command:: spotclean | ||
| :summary: Remove all contaminants from the tile under the cursor. | ||
| :summary: Remove contaminants from the tile under the cursor. | ||
Bumber64 marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| This plugin provides commands that clean the splatter that get scattered all | ||
| This plugin provides commands that clean the spatter that gets scattered all | ||
| over the map and that clings to your items and units. In an old fortress, | ||
| cleaning with this tool can significantly reduce FPS lag! It can also spoil your | ||
| !!FUN!!, so think before you use it. | ||
| cleaning with this tool can significantly reduce FPS lag! It can also spoil | ||
| your !!FUN!!, so think before you use it. | ||
| This plugin can also be used to remove grass in an area you don't want it | ||
| (including those hard to reach areas like stairs and under buildings). | ||
| Use it if you messed up with the `regrass` tool, or grass grew in your | ||
| dining hall after a flooding mishap. Grass may eventually regrow if the tile | ||
| remains soil, so `gui/tiletypes` may come in handy to change it to an | ||
| appropriate stone type. | ||
| Usage | ||
| ----- | ||
| :: | ||
| clean all|map|items|units|plants [<options>] | ||
| clean [<pos> [<pos>]] [<options>] | ||
| spotclean | ||
| By default, cleaning the map leaves mud and snow alone. Note that cleaning units | ||
| includes hostiles, and that cleaning items removes poisons from weapons. | ||
| By default, cleaning the map leaves mud, snow, and item spatter (e.g., tree | ||
| droppings) alone. Note that cleaning units includes hostiles, and that | ||
| cleaning items removes poisons from weapons. | ||
| Mud will not be cleaned out from under farm plots unless the tile is furrowed | ||
| soil, since that would render the plot inoperable. | ||
| Operates on the entire map unless otherwise specified. Supplying a ``pos`` | ||
| argument can limit operation to a single tile. Supplying both can operate on | ||
| a cuboid region. ``pos`` should normally be in the form ``0,0,0``, without | ||
| spaces. The string ``here`` can be used in place of numeric coordinates to use | ||
| the position of the keyboard cursor, if active. The ``--zlevel`` option uses | ||
| the ``pos`` values differently. | ||
| ``spotclean`` works like ``clean map snow mud``, removing all contaminants from | ||
| the tile under the keyboard cursor. This is ideal if you just want to clean a | ||
| specific tile but don't want the `clean <cleaners>` command to remove all the | ||
| glorious blood from your entranceway. | ||
| ``spotclean`` works like ``clean here --map --mud --snow``, removing all | ||
| contaminants from a specific tile quickly. Intended as a hotkey command. | ||
| Mud will not be cleaned out from under farm plots, since that would render the | ||
| plot inoperable. | ||
| Examples | ||
| -------- | ||
| ``clean all`` | ||
| Clean everything that can be cleaned (except mud and snow). | ||
| ``clean map mud item snow`` | ||
| Removes all spatter, including mud, leaves, and snow from map tiles. Farm | ||
| plots will retain their mud. | ||
| ``clean --all`` | ||
| Clean most spatter from all map tiles (excluding mud, snow, and item | ||
| spatter), as well as all contaminants from units and items. | ||
| ``clean --map --mud --snow --item`` | ||
| Removes all spatter, including mud, snow, and tree droppings from map | ||
| tiles. Farm plots will retain their mud as needed. | ||
| ``clean --map --item --only --items`` | ||
| Remove only tree droppings from the map (leaving blood and other | ||
| contaminants untouched). Clean all items of their contaminants. | ||
| ``clean here -mdstu`` | ||
| Clean any sort of contaminant from the map tile under the keyboard cursor, | ||
| as well as any contaminant found on a unit there, but don't touch contaminants | ||
| on any item (e.g., the unit's poisoned weapon). | ||
| ``clean 0,0,90 0,0,120 -uiz`` | ||
| Clean all contaminants from units and items on z-levels 90 through 120. | ||
| Don't touch map spatter at all. | ||
| ``clean -mgxoz`` | ||
| Reduce all grass on the current z-level to barren soil. Don't touch | ||
| any contaminants. | ||
| ``clean 0,0,100 19,19,119 -adstg`` | ||
| Remove all contaminants of any type from the 20 x 20 x 20 cube defined | ||
| by the coords, including on any units, items, and ground spatter | ||
| (excluding mud for farms). Also remove any unused grass type events from | ||
| the affected map blocks, but don't remove any grass present. | ||
| Options | ||
| ------- | ||
| When cleaning the map, you can specify extra options for extra cleaning: | ||
| ``mud`` | ||
| Also remove mud. | ||
| ``item`` | ||
| Also remove item spatter, like fallen leaves and flowers. | ||
| ``snow`` | ||
| Also remove snow coverings. | ||
| ``-a``, ``--all`` | ||
| Equivalent to ``--map --units --items``. | ||
| ``-m``, ``--map`` | ||
| Clean selected map tiles. Cleans most spatter by default, but not mud, | ||
| snow, or item spatter. | ||
| ``-d``, ``--mud`` | ||
| Also remove mud from map tiles. Excludes mud required for farm plots. | ||
| ``-s``, ``--snow`` | ||
| Also remove snow coverings from map tiles. | ||
| ``-t``, ``--item`` | ||
| Also remove item spatter (e.g., fallen leaves, flowers, and gatherable | ||
| tree fruit) from map tiles. Not to be confused with ``--items``, which | ||
| cleans contaminants *off* of items. | ||
| ``-g``, ``--grass`` | ||
| Remove unused (entirely depleted) grass events from map blocks. DF will | ||
| create a grass event for each type of grass that grows in a block, but | ||
| doesn't remove them if you pave over the block or if the grass got | ||
| depleted and entirely replaced with a different type. Could possibly | ||
| improve FPS if you had a ton of unused grass events everywhere (a likely | ||
| outcome of using ``regrass --new``). Requires ``--map`` option to be | ||
| specified. | ||
| ``-x``, ``--desolate`` | ||
| Use with caution! Remove grass from the selected area. You probably don't | ||
| want to use this on the entire map, so make sure to use ``pos`` arguments. | ||
| Requires ``--map`` and ``--grass`` options to be specified. | ||
| ``-o``, ``--only`` | ||
| Ignore most spatter (e.g., blood, vomit, and ooze) and focus only on the | ||
| other specified options. Requires ``--map`` and at least one of: ``--mud``, | ||
| ``--snow``, ``--item``, or ``--grass``. | ||
| ``-u``, ``--units`` | ||
| Clean all contaminants off of units in the selected area. Not affected by | ||
| map options that specify spatter types (e.g., snow). Units will always be | ||
| completely cleaned. | ||
| ``-i``, ``--items`` | ||
| Clean all contaminants off of items in the selected area (including those | ||
| held by units). Not affected by map options that specify spatter types. | ||
| Not to be confused with ``--item``, which removes tree droppings found on | ||
| the ground. | ||
| ``-z``, ``--zlevel`` | ||
| Select entire z-levels. Will do all z-levels between ``pos`` arguments if | ||
| both are given, z-level of first ``pos`` if one is given, else z-level of | ||
| current view if no ``pos`` is given. | ||
| Troubleshooting | ||
| --------------- | ||
| Use ``debugfilter set Debug cleaners log`` (or | ||
| ``debugfilter set Trace cleaners log`` for more detail) to help diagnose | ||
| issues. (Avoid cleaning large parts of the map using many options with | ||
| Trace enabled, as it could make the game unresponsive and flood the console | ||
| for a good minute.) | ||
| Disable with ``debugfilter set Info cleaners log``. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.