Skip to content

Commit 4cfe83e

Browse files
committed
replace drain-aquifer with aquifer drain
1 parent f764269 commit 4cfe83e

File tree

6 files changed

+7
-147
lines changed

6 files changed

+7
-147
lines changed

changelog.txt

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Template for new versions:
4242
- `gui/reveal`: show aquifers even when not in mining mode
4343

4444
## Removed
45+
- `drain-aquifer`: replaced by ``aquifer drain --all``; an alias now exists so ``drain-aquifer`` will automatically run the new command
4546

4647
# 50.12-r2.1
4748

docs/drain-aquifer.rst

-46
This file was deleted.

docs/light-aquifers-only.rst

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ post-embark. Pre-embark, it changes all aquifers in the world to light ones,
1010
while post-embark it only modifies the active map tiles, leaving the rest of
1111
the world unchanged.
1212

13+
For more powerful aquifer editing, please see `aquifer` and `gui/aquifer`.
14+
1315
Usage
1416
-----
1517

drain-aquifer.lua

-89
This file was deleted.

internal/control-panel/registry.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,11 @@ COMMANDS_BY_IDX = {
8787

8888
-- gameplay tools
8989
{command='agitation-rebalance', group='gameplay', mode='enable'},
90+
{command='aquifer drain --all --skip-top 2', group='gameplay', mode='run',
91+
desc='Ensure that your maps have no more than 2 layers of aquifer.'},
9092
{command='combine', group='gameplay', mode='repeat',
9193
desc='Combine partial stacks in stockpiles into full stacks.',
9294
params={'--time', '7', '--timeUnits', 'days', '--command', '[', 'combine', 'all', '-q', ']'}},
93-
{command='drain-aquifer --top 2', group='gameplay', mode='run',
94-
desc='Ensure that your maps have no more than 2 layers of aquifer.'},
9595
{command='dwarfvet', group='gameplay', mode='enable'},
9696
{command='eggs-fertile', help_command='tweak', group='gameplay', mode='tweak', default=true,
9797
desc='Displays an indicator on fetile eggs.'},

light-aquifers-only.lua

+2-10
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,11 @@ if args[1] == 'help' then
88
end
99

1010
if not dfhack.isWorldLoaded() then
11-
qerror("Error: This script requires a world to be loaded.")
11+
qerror('This script requires a world to be loaded.')
1212
end
1313

1414
if dfhack.isMapLoaded() then
15-
for _, block in ipairs(df.global.world.map.map_blocks) do
16-
if block.flags.has_aquifer then
17-
for k = 0, 15 do
18-
for l = 0, 15 do
19-
block.occupancy[k][l].heavy_aquifer = false
20-
end
21-
end
22-
end
23-
end
15+
dfhack.run_command('aquifer', 'convert', 'light', '--all')
2416
return
2517
end
2618

0 commit comments

Comments
 (0)