diff --git a/README.rst b/README.rst index 19fc67472..36d932cea 100644 --- a/README.rst +++ b/README.rst @@ -280,14 +280,28 @@ Examples: digcircle ========= A command for easy designation of filled and hollow circles. +It has several types of options. -Options: +Shape: -------- :hollow: Set the circle to hollow (default) :filled: Set the circle to filled +:#: Diameter in tiles (default = 0, does nothing) + +Action: +------- :set: Set designation (default) :unset: Unset current designation -:#: Radius in tiles (default = 0) +:invert: Invert designations already present + +Designation types: +------------------ +:dig: Normal digging designation (default) +:ramp: Ramp digging +:ustair: Staircase up +:dstair: Staircase down +:xstair: Staircase up/down +:chan: Dig channel After you have set the options, the command called with no options repeats with the last selected parameters. diff --git a/Readme.html b/Readme.html index 4d7605155..ae5aaa377 100644 --- a/Readme.html +++ b/Readme.html @@ -318,7 +318,7 @@ ul.auto-toc {
-

Introduction

+

Introduction

DFHack is a Dwarf Fortress memory access library and a set of basic tools that use it. Tools come in the form of plugins or (not yet) external tools. It is an attempt to unite the various ways tools @@ -326,68 +326,70 @@ access DF memory and allow for easier development of new tools.

Contents

-

Getting DFHack

+

Getting DFHack

The project is currently hosted on github, for both source and binaries at http://github.com/peterix/dfhack

Releases can be downloaded from here: https://github.com/peterix/dfhack/downloads

All new releases are announced in the bay12 thread: http://tinyurl.com/dfhack-ng

-

Compatibility

+

Compatibility

DFHack works on Windows XP, Vista, 7 or any modern Linux distribution. OSX is not supported due to lack of developers with a Mac.

Currently, only the 31.25 version is supported. If you need DFHack @@ -412,7 +414,7 @@ for older versions, look for older releases.

It is possible to use the Windows DFHack under wine/OSX.

-

Installation/Removal

+

Installation/Removal

Installing DFhack involves copying files into your DF folder. Copy the files from a release archive so that:

@@ -438,7 +440,7 @@ Copy the files from a release archive so that:

If it refuses to load, check the stderr.log file created in your DF folder.

-

Using DFHack

+

Using DFHack

DFHack basically extends what DF can do with something similar to a quake console. On Windows, this is a separate command line window. On linux, the terminal used to launch the dfhack script is taken over (so, make sure you start from a terminal). Basic interaction with dfhack involves entering commands into the console. For some basic instroduction, use the 'help' command. To list all possible commands, use the 'ls' command. Many commands have their own help or detailed description. You can use 'command help' or 'command ?' to show that.

@@ -448,21 +450,21 @@ Some commands can't be used from hotkeys - this includes interactive commands li

Most of the commands come from plugins. Those reside in 'DF/plugins/'.

-

Something doesn't work, help!

+

Something doesn't work, help!

First, don't panic :) Second, dfhack keeps a few log files in DF's folder - stderr.log and stdout.log. You can look at those and possibly find out what's happening. If you found a bug, you can either report it in the bay12 DFHack thread, the issues tracker on github, contact me (peterix@gmail.com) or visit the #dfhack IRC channel on freenode.

-

Commands

+

Commands

Almost all the commands have a 'help'/'?' option that will give you further help without having to look at this document.

-

autodump

+

autodump

Automated item dumping tool. All loose items on the floor marked for dumping are insta-dumped to the position of the in-game cursor.

Cursor must be placed on a floor tile. Instadumped items may not show up in the cursor description list until you save/reload.

-

Options

+

Options

@@ -474,16 +476,16 @@ show up in the cursor description list until you save/reload.

-

cleanmap

+

cleanmap

Cleans all the splatter that get scattered all over the map. By default, it leaves mud and snow alone.

-

cleanowned

+

cleanowned

Confiscates items owned by dwarfs. By default, owned food on the floor and rotten items are confistacted and dumped.

@@ -503,10 +505,10 @@ By default, owned food on the floor and rotten items are confistacted and dumped
-

colonies

+

colonies

Allows listing all the vermin colonies on the map and optionally turning them into honey bee colonies.

@@ -518,16 +520,16 @@ By default, owned food on the floor and rotten items are confistacted and dumped
-

deramp (by zilpin)

+

deramp (by zilpin)

Removes all ramps designated for removal from the map. This is useful for replicating the old channel digging designation. It also removes any and all 'down ramps' that can remain after a cave-in (you don't have to designate anything for that to happen).

-

dfusion

+

dfusion

This is the DFusion lua plugin system by warmist/darius, running as a DFHack plugin.

See the bay12 thread for details: http://www.bay12forums.com/smf/index.php?topic=69682.15

-

Confirmed working DFusion plugins:

+

Confirmed working DFusion plugins:

:simple_embark:allows changing the number of dwarves available on embark.

Note

@@ -540,19 +542,19 @@ It also removes any and all 'down ramps' that can remain after a cave-in (you do
-

flows

+

flows

A tool for checking how many tiles contain flowing liquids. If you suspect that your magma sea leaks into HFS, you can use this tool to be sure without revealing the map.

-

grow

+

grow

Makes all saplings present on the map grow into trees (almost) instantly.

-

extirpate

+

extirpate

A tool for getting rid of trees and shrubs. By default, it only kills a tree/shrub under the cursor. The plants are turned into ashes instantly.

@@ -568,11 +570,11 @@ The plants are turned into ashes instantly.

-

immolate

+

immolate

Very similar to extirpate, but additionally sets the plants on fire. The fires can and will spread ;)

-

liquids

+

liquids

Allows adding magma, water and obsidian to the game. It replaces the normal dfhack command line and can't be used from a hotkey. For more information, refer to the command's internal help.

@@ -582,7 +584,7 @@ temperatures (creating heat traps). You've been warned.

-

mode

+

mode

This command lets you see and change the game mode directly. Not all combinations are good for every situation and most of them will produce undesirable results. There are a few good ones though.

@@ -594,22 +596,22 @@ You just lost a fortress and gained an adventurer.

I take no responsibility of anything that happens as a result of using this tool :P

-

forcepause

+

forcepause

Forces DF to pause. This is useful when your FPS drops below 1 and you lose control of the game.

-

die

+

die

Instantly kills DF without saving.

-

probe

+

probe

Can be used to determine tile properties like temperature.

-

prospector

+

prospector

Lists all available minerals on the map and how much of them there is. By default, only processes the already discovered part of the map.

@@ -621,23 +623,23 @@ You just lost a fortress and gained an adventurer.

-

reveal

+

reveal

This reveals the map. By default, HFS will remain hidden so that the demons don't spawn. You can use 'reveal hell' to reveal everything. With hell revealed, you won't be able to unpause until you hide the map again.

-

unreveal

+

unreveal

Reverts the effects of 'reveal'.

-

revtoggle

+

revtoggle

Switches between 'reveal' and 'unreveal'.

-

revflood

+

revflood

This command will hide the whole map and then reveal all the tiles that have a path to the in-game cursor.

-

ssense / stonesense

+

ssense / stonesense

An isometric visualizer that runs in a second window. This requires working graphics acceleration and at least a dual core CPU (otherwise it will slow down DF).

Unfortunately currently fails to run on Windows XP and most Linux distributions.

All the data resides in the 'stonesense' directory.

@@ -647,24 +649,24 @@ You just lost a fortress and gained an adventurer.

http://df.magmawiki.com/index.php/Utility:Stonesense/Content_repository

-

tubefill

+

tubefill

Fills all the adamantine veins again. Veins that were empty will be filled in too, but might still trigger a demon invasion (this is a known bug).

-

vdig

+

vdig

Designates a whole vein for digging. Requires an active in-game cursor placed over a vein tile. With the 'x' option, it will traverse z-levels (putting stairs between the same-material tiles).

-

vdigx

+

vdigx

A permanent alias for 'vdig x'.

-

expdig

+

expdig

This command can be used for exploratory mining.

See: http://df.magmawiki.com/index.php/DF2010:Exploratory_mining

There are two variables that can be set: pattern and filter.

@@ -681,7 +683,7 @@ You just lost a fortress and gained an adventurer.

-

Filters:

+

Filters:

@@ -697,7 +699,7 @@ You just lost a fortress and gained an adventurer.

After you have a pattern set, you can use 'expdig' to apply it again.

-

Examples:

+

Examples:

  • 'expdig diag5 hidden' = designate the diagonal 5 patter over all hidden tiles.
  • 'expdig' = apply last used pattern and filter.
  • @@ -706,10 +708,11 @@ You just lost a fortress and gained an adventurer.

-

digcircle

-

A command for easy designation of filled and hollow circles.

-
-

Options:

+

digcircle

+

A command for easy designation of filled and hollow circles. +It has several types of options.

+
@@ -718,19 +721,51 @@ You just lost a fortress and gained an adventurer.

+ + + +
filled:Set the circle to filled
#:Diameter in tiles (default = 0, does nothing)
+
+
+

Action:

+ +++ - + + + +
set:Set designation (default)
unset:Unset current designation
#:Radius in tiles (default = 0)
invert:Invert designations already present
+
+
+

Designation types:

+ +++ + + + + + + + + + + +
dig:Normal digging designation (default)
ramp:Ramp digging
ustair:Staircase up
dstair:Staircase down
xstair:Staircase up/down
chan:Dig channel

After you have set the options, the command called with no options repeats with the last selected parameters.

-
-

Examples:

+
+

Examples:

  • 'digcircle filled 3' = Dig a filled circle with radius = 3.
  • 'digcircle' = Do it again.
  • @@ -738,11 +773,11 @@ repeats with the last selected parameters.

-

weather

+

weather

Prints the current weather map by default.

Also lets you change the current weather to 'clear sky', 'rainy' or 'snowing'.

-
-

Options:

+
+

Options:

diff --git a/library/include/dfhack/VersionInfo.h b/library/include/dfhack/VersionInfo.h index f230f00b0..dc084eaae 100644 --- a/library/include/dfhack/VersionInfo.h +++ b/library/include/dfhack/VersionInfo.h @@ -31,7 +31,7 @@ distribution. #include "dfhack/Pragma.h" #include "dfhack/Export.h" #include "dfhack/Types.h" -#include +#include #include #include diff --git a/plugins/vdig.cpp b/plugins/vdig.cpp index f8b2ea3fb..6da466ef9 100644 --- a/plugins/vdig.cpp +++ b/plugins/vdig.cpp @@ -56,6 +56,7 @@ enum circle_what { circle_set, circle_unset, + circle_invert, }; DFhackCExport command_result digcircle (Core * c, vector & parameters) @@ -88,6 +89,10 @@ DFhackCExport command_result digcircle (Core * c, vector & parameters) { what = circle_unset; } + else if(parameters[i] == "invert") + { + what = circle_invert; + } else if(parameters[i] == "dig") { type = designation_default; @@ -129,6 +134,7 @@ DFhackCExport command_result digcircle (Core * c, vector & parameters) "\n" " set = set designation\n" " unset = unset current designation\n" + " invert = invert current designation\n" "\n" " dig = normal digging\n" " ramp = ramp digging\n" @@ -226,6 +232,15 @@ DFhackCExport command_result digcircle (Core * c, vector & parameters) { des.bits.dig = designation_no; } + case circle_invert: + if(des.bits.dig == designation_no) + { + des.bits.dig = type; + } + else + { + des.bits.dig = designation_no; + } break; } std::cerr << "allowing tt" << tt << "\n";