diff --git a/README.rst b/README.rst index 24a253e1e..766454f2f 100644 --- a/README.rst +++ b/README.rst @@ -222,9 +222,9 @@ This command will hide the whole map and then reveal all the tiles that have a p ssense / stonesense =================== -This is an isometric visualizer that is runs in a second window. +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). -This requires working graphics acceleration, at least a dual core CPU (otherwise it will slow down DF) and on Linux, the allegro 5 libraries installed (look for 'allegro5' in your package manager app). +Unfortunately currently fails to run on Windows XP and most Linux distributions. All the data resides in the 'stonesense' directory. @@ -277,5 +277,12 @@ Examples: weather ======= -Lets you change the current weather to 'clear sky', 'rainy' or 'snowing'. -Fill those ponds without mucking around with dfliquids :D Rain can also stop brush fires. \ No newline at end of file +Prints the current weather map by default. + +Also lets you change the current weather to 'clear sky', 'rainy' or 'snowing'. + +Options: +-------- +:snow: make it snow everywhere. +:rain: make it rain. +:clear: clear the sky. diff --git a/Readme.html b/Readme.html index f8cfa665d..58b26b2dc 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,76 +326,79 @@ 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 @@ -404,7 +407,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:

@@ -430,7 +433,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.

@@ -440,20 +443,20 @@ 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

-

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

@@ -465,16 +468,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.

@@ -494,10 +497,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.

@@ -509,16 +512,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

@@ -531,19 +534,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.

@@ -559,11 +562,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.

@@ -573,7 +576,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.

@@ -585,22 +588,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.

@@ -612,25 +615,25 @@ 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

-

This is an isometric visualizer that is runs in a second window.

-

This requires working graphics acceleration, at least a dual core CPU (otherwise it will slow down DF) and on Linux, the allegro 5 libraries installed (look for 'allegro5' in your package manager app).

+

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.

Older versions, support and extra graphics can be found in the bay12 forum thread: http://www.bay12forums.com/smf/index.php?topic=43260.0

@@ -638,24 +641,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.

@@ -672,7 +675,7 @@ You just lost a fortress and gained an adventurer.

-

Filters:

+

Filters:

@@ -688,7 +691,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.
  • @@ -697,9 +700,24 @@ You just lost a fortress and gained an adventurer.

-

weather

-

Lets you change the current weather to 'clear sky', 'rainy' or 'snowing'. -Fill those ponds without mucking around with dfliquids :D Rain can also stop brush fires.

+

weather

+

Prints the current weather map by default.

+

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

+
+++ + + + + + + + +
snow:make it snow everywhere.
rain:make it rain.
clear:clear the sky.
+
diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt index 47acbb3c9..ba796d8a5 100644 --- a/library/CMakeLists.txt +++ b/library/CMakeLists.txt @@ -4,6 +4,9 @@ cmake_minimum_required(VERSION 2.8) ## build options OPTION(BUILD_DEVEL "Install/package files required for development (For SDK)." OFF) OPTION(BUILD_DOXYGEN "Create/install/package doxygen documentation for DFHack (For SDK)." OFF) +IF(UNIX) + OPTION(CONSOLE_NO_CATCH "Make the console not catch 'CTRL+C' events for easier debugging." OFF) +ENDIF() include_directories (include) include_directories (depends/md5) @@ -117,6 +120,12 @@ LIST(APPEND PROJECT_SRCS ${PROJECT_HDRS}) ADD_DEFINITIONS(-DBUILD_DFHACK_LIB) +IF(UNIX) + IF(CONSOLE_NO_CATCH) + ADD_DEFINITIONS(-DCONSOLE_NO_CATCH) + ENDIF() +ENDIF() + IF(UNIX) add_definitions(-DLINUX_BUILD) SET(CMAKE_CXX_FLAGS_DEBUG "-g -Wall") diff --git a/library/Console-linux.cpp b/library/Console-linux.cpp index d599402a9..ab3a147a9 100644 --- a/library/Console-linux.cpp +++ b/library/Console-linux.cpp @@ -335,7 +335,11 @@ namespace DFHack raw.c_cflag |= (CS8); // local modes - choing off, canonical off, no extended functions, // no signal chars (^Z,^C) - raw.c_lflag &= ~(ECHO | ICANON | IEXTEN | ISIG); +#ifdef CONSOLE_NO_CATCH + raw.c_lflag &= ~( ECHO | ICANON | IEXTEN ); +#else + raw.c_lflag &= ~( ECHO | ICANON | IEXTEN | ISIG ); +#endif // control chars - set return condition: min number of bytes and timer. // We want read to return every single byte, without timeout. raw.c_cc[VMIN] = 1; raw.c_cc[VTIME] = 0;// 1 byte, no timer