Merge branch 'master' of git://github.com/peterix/dfhack

develop
jj 2012-04-18 18:50:48 +02:00
commit 0e10a8edff
12 changed files with 1668 additions and 588 deletions

@ -63,7 +63,7 @@ set(DF_VERSION_MINOR "34")
set(DF_VERSION_PATCH "07")
set(DF_VERSION "${DF_VERSION_MAJOR}.${DF_VERSION_MINOR}.${DF_VERSION_PATCH}")
SET(DFHACK_RELEASE "r1" CACHE STRING "Current release revision.")
SET(DFHACK_RELEASE "r2" CACHE STRING "Current release revision.")
set(DFHACK_VERSION "${DF_VERSION_MAJOR}.${DF_VERSION_MINOR}.${DF_VERSION_PATCH}-${DFHACK_RELEASE}")
add_definitions(-DDFHACK_VERSION="${DFHACK_VERSION}")

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -223,12 +223,13 @@ namespace DFHack
size_t plen = prompt.size();
const char * buf = raw_buffer.c_str();
size_t len = raw_buffer.size();
int cooked_cursor = raw_cursor;
while ((plen + raw_cursor) >= cols)
while ((plen + cooked_cursor) >= cols)
{
buf++;
len--;
raw_cursor--;
cooked_cursor--;
}
while (plen + len > cols)
{
@ -247,7 +248,7 @@ namespace DFHack
output(tmp, inf.dwSize.X - (plen + len), len + plen, inf.dwCursorPosition.Y);
free(tmp);
}
inf.dwCursorPosition.X = (SHORT)(raw_cursor + plen);
inf.dwCursorPosition.X = (SHORT)(cooked_cursor + plen);
SetConsoleCursorPosition(console_out, inf.dwCursorPosition);
}

@ -107,6 +107,8 @@ if (BUILD_SUPPORTED)
DFHACK_PLUGIN(feature feature.cpp)
DFHACK_PLUGIN(lair lair.cpp)
DFHACK_PLUGIN(zone zone.cpp)
DFHACK_PLUGIN(catsplosion catsplosion.cpp)
DFHACK_PLUGIN(regrass regrass.cpp)
# this one exports functions to lua
DFHACK_PLUGIN(burrows burrows.cpp LINK_LIBRARIES lua)
# not yet. busy with other crud again...

@ -35,9 +35,9 @@ DFhackCExport command_result plugin_init ( color_ostream &out, std::vector <Plug
{
// Fill the command list with your commands.
commands.push_back(PluginCommand(
"catsplosion", "Do nothing, look pretty.",
"catsplosion", "Make cats just /multiply/.",
catsplosion, false,
" This command does nothing at all. For now.\n"
" Makes cats abnormally abundant, if you provide some base population ;)\n"
));
return CR_OK;
}

@ -7,12 +7,10 @@ DFHACK_PLUGIN(kittens kittens.cpp)
#DFHACK_PLUGIN(itemhacks itemhacks.cpp)
DFHACK_PLUGIN(notes notes.cpp)
DFHACK_PLUGIN(memview memview.cpp)
DFHACK_PLUGIN(catsplosion catsplosion.cpp)
DFHACK_PLUGIN(buildprobe buildprobe.cpp)
DFHACK_PLUGIN(tilesieve tilesieve.cpp)
DFHACK_PLUGIN(frozen frozen.cpp)
DFHACK_PLUGIN(dumpmats dumpmats.cpp)
#DFHACK_PLUGIN(tiles tiles.cpp)
DFHACK_PLUGIN(regrass regrass.cpp)
DFHACK_PLUGIN(counters counters.cpp)

@ -122,6 +122,7 @@ command_result df_liquids (color_ostream &out_, vector <string> & parameters)
str << ":" << amount << ":" << flowmode << ":" << setmode << "]#";
if(out.lineedit(str.str(),command,liquids_hist) == -1)
return CR_FAILURE;
liquids_hist.add(command);
if(command=="help" || command == "?")
{

@ -1 +1 @@
Subproject commit cddc64777b8368e15c1a820ccd1cf56e11267e52
Subproject commit 15e3b726c3e68d2985aecd95d2a33bf4550caaa1

@ -859,6 +859,7 @@ command_result df_tiletypes (color_ostream &out_, vector <string> & parameters)
if (out.lineedit("tiletypes> ",input,tiletypes_hist) == -1)
return CR_FAILURE;
tiletypes_hist.add(input);
commands.clear();
Core::cheap_tokenise(input, commands);

@ -56,10 +56,17 @@ DFhackCExport command_result plugin_init (color_ostream &out, std::vector <Plugi
" Note that this is very dirty and possibly dangerous!\n"
" Most probably does not have the positive effect of a proper burial.\n"
" tweak fixmigrant\n"
" Forces the selected unit to become a member or your fortress.\n"
" Intended to fix bugged migrants and merchants who stay at the map edge.\n"
" Only works for units of your own race. Can be used for stealing caravan\n"
" traders and guards, but might result into weirdness during trading.\n"
" Remove the resident/merchant flag from the selected unit.\n"
" Intended to fix bugged migrants/traders who stay at the\n"
" map edge and don't enter your fort. Only works for\n"
" dwarves (or generally the player's race in modded games).\n"
" tweak makeown\n"
" Force selected unit to become a member of your fort.\n"
" Can be abused to grab caravan merchants and escorts, even if\n"
" they don't belong to the player's race. Foreign sentients\n"
" (humans, elves) can be put to work, but you can't assign rooms\n"
" to them and they don't show up in DwarfTherapist because the\n"
" game treats them like pets.\n"
));
return CR_OK;
}