Merge branch 'develop' of https://github.com/DFHack/dfhack into develop

develop
Japa 2017-05-14 11:17:09 +05:30
commit 4ec42f7994
22 changed files with 58 additions and 1917 deletions

@ -1,28 +0,0 @@
#=============================================================================
# Copyright 2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
# We use MSBuild as the build tool for VS 10
FIND_PROGRAM(CMAKE_MAKE_PROGRAM
NAMES MSBuild
HINTS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0\\Setup\\VS;ProductDir]
"$ENV{SYSTEMROOT}/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0;CLR Version]/"
"c:/WINDOWS/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0;CLR Version]/"
"$ENV{SYSTEMROOT}/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\10.0;CLR Version]/"
)
MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)
SET(MSVC10 1)
SET(MSVC_VERSION 1600)

@ -1,23 +0,0 @@
IF(Curses_FOUND)
SET(Curses_FIND_QUIETLY TRUE)
ENDIF()
FIND_PATH(Curses_INCLUDE_PATH
NAMES ncurses.h curses.h
PATH_SUFFIXES ncurses
PATHS /usr/include/ncursesw /usr/include /usr/local/include /usr/pkg/include
)
FIND_LIBRARY(Curses_LIBRARY
NAMES ncursesw
PATHS /lib /usr/lib /usr/local/lib /usr/pkg/lib
)
IF (Curses_INCLUDE_PATH AND Curses_LIBRARY)
SET(Curses_FOUND TRUE)
ENDIF()
MARK_AS_ADVANCED(
Curses_INCLUDE_PATH
Curses_LIBRARY
)

@ -1,3 +0,0 @@
FIND_PROGRAM(RST2HTML_EXECUTABLE NAMES rst2html rst2html.py)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Docutils DEFAULT_MSG RST2HTML_EXECUTABLE)

@ -1,185 +0,0 @@
# - This module looks for Doxygen and the path to Graphviz's dot
# Doxygen is a documentation generation tool. Please see
# http://www.doxygen.org
#
# This module accepts the following optional variables:
#
# DOXYGEN_SKIP_DOT = If true this module will skip trying to find Dot
# (an optional component often used by Doxygen)
#
# This modules defines the following variables:
#
# DOXYGEN_EXECUTABLE = The path to the doxygen command.
# DOXYGEN_FOUND = Was Doxygen found or not?
#
# DOXYGEN_DOT_EXECUTABLE = The path to the dot program used by doxygen.
# DOXYGEN_DOT_FOUND = Was Dot found or not?
# DOXYGEN_DOT_PATH = The path to dot not including the executable
#
#
#Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
#All rights reserved.
#
#Redistribution and use in source and binary forms, with or without
#modification, are permitted provided that the following conditions
#are met:
#
#* Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
#* Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
#* Neither the names of Kitware, Inc., the Insight Software Consortium,
# nor the names of their contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
#"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
#LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
#A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
#HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
#SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
#LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
#DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
#THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
#(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
#OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
#-----------------------------------------------------------------------------
#
#The above copyright and license notice applies to distributions of
#CMake in source and binary form. Some source files contain additional
#notices of original copyright by their contributors; see each source
#for details. Third-party software packages supplied with CMake under
#compatible licenses provide their own copyright notices documented in
#corresponding subdirectories.
#
#-----------------------------------------------------------------------------
#
#CMake was initially developed by Kitware with the following sponsorship:
#
# * National Library of Medicine at the National Institutes of Health
# as part of the Insight Segmentation and Registration Toolkit (ITK).
#
# * US National Labs (Los Alamos, Livermore, Sandia) ASC Parallel
# Visualization Initiative.
#
# * National Alliance for Medical Image Computing (NAMIC) is funded by the
# National Institutes of Health through the NIH Roadmap for Medical Research,
# Grant U54 EB005149.
#
# * Kitware, Inc.
# For backwards compatibility support
IF(Doxygen_FIND_QUIETLY)
SET(DOXYGEN_FIND_QUIETLY TRUE)
ENDIF(Doxygen_FIND_QUIETLY)
# ===== Rationale for OS X AppBundle mods below =====
# With the OS X GUI version, Doxygen likes to be installed to /Applications and
# it contains the doxygen executable in the bundle. In the versions I've
# seen, it is located in Resources, but in general, more often binaries are
# located in MacOS.
#
# NOTE: The official Doxygen.app that is distributed for OS X uses non-standard
# conventions. Instead of the command-line "doxygen" tool being placed in
# Doxygen.app/Contents/MacOS, "Doxywizard" is placed there instead and
# "doxygen" is placed in Contents/Resources. This is most likely done
# so that something happens when people double-click on the Doxygen.app
# package. Unfortunately, CMake gets confused by this as when it sees the
# bundle it uses "Doxywizard" as the executable to use instead of
# "doxygen". Therefore to work-around this issue we temporarily disable
# the app-bundle feature, just for this CMake module:
if(APPLE)
# Save the old setting
SET(TEMP_DOXYGEN_SAVE_CMAKE_FIND_APPBUNDLE ${CMAKE_FIND_APPBUNDLE})
# Disable the App-bundle detection feature
SET(CMAKE_FIND_APPBUNDLE "NEVER")
endif()
# FYI:
# In the older versions of OS X Doxygen, dot was included with the
# Doxygen bundle. But the new versions require you to download
# Graphviz.app which contains "dot" in it's bundle.
# ============== End OSX stuff ================
#
# Find Doxygen...
#
FIND_PROGRAM(DOXYGEN_EXECUTABLE
NAMES doxygen
PATHS
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\doxygen_is1;Inno Setup: App Path]/bin"
/Applications/Doxygen.app/Contents/Resources
/Applications/Doxygen.app/Contents/MacOS
DOC "Doxygen documentation generation tool (http://www.doxygen.org)"
)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Doxygen DEFAULT_MSG DOXYGEN_EXECUTABLE)
#
# Find Dot...
#
IF(NOT DOXYGEN_SKIP_DOT)
FIND_PROGRAM(DOXYGEN_DOT_EXECUTABLE
NAMES dot
PATHS
"$ENV{ProgramFiles}/Graphviz2.26.3/bin"
"C:/Program Files/Graphviz2.26.3/bin"
"$ENV{ProgramFiles}/Graphviz 2.21/bin"
"C:/Program Files/Graphviz 2.21/bin"
"$ENV{ProgramFiles}/ATT/Graphviz/bin"
"C:/Program Files/ATT/Graphviz/bin"
[HKEY_LOCAL_MACHINE\\SOFTWARE\\ATT\\Graphviz;InstallPath]/bin
/Applications/Graphviz.app/Contents/MacOS
/Applications/Doxygen.app/Contents/Resources
/Applications/Doxygen.app/Contents/MacOS
DOC "Graphviz Dot tool for using Doxygen"
)
if(DOXYGEN_DOT_EXECUTABLE)
set(DOXYGEN_DOT_FOUND TRUE)
# The Doxyfile wants the path to Dot, not the entire path and executable
get_filename_component(DOXYGEN_DOT_PATH "${DOXYGEN_DOT_EXECUTABLE}" PATH CACHE)
endif()
endif(NOT DOXYGEN_SKIP_DOT)
#
# Backwards compatibility...
#
if(APPLE)
# Restore the old app-bundle setting setting
SET(CMAKE_FIND_APPBUNDLE ${TEMP_DOXYGEN_SAVE_CMAKE_FIND_APPBUNDLE})
endif()
# Maintain the _FOUND variables as "YES" or "NO" for backwards compatibility
# (allows people to stuff them directly into Doxyfile with configure_file())
if(DOXYGEN_FOUND)
set(DOXYGEN_FOUND "YES")
else()
set(DOXYGEN_FOUND "NO")
endif()
if(DOXYGEN_DOT_FOUND)
set(DOXYGEN_DOT_FOUND "YES")
else()
set(DOXYGEN_DOT_FOUND "NO")
endif()
# For backwards compatibility support
SET (DOXYGEN ${DOXYGEN_EXECUTABLE} )
SET (DOT ${DOXYGEN_DOT_EXECUTABLE} )
MARK_AS_ADVANCED(
DOXYGEN_EXECUTABLE
DOXYGEN_DOT_EXECUTABLE
DOXYGEN_DOT_PATH
)

@ -139,8 +139,8 @@ endif()
# set up versioning. # set up versioning.
set(DF_VERSION "0.43.05") set(DF_VERSION "0.43.05")
SET(DFHACK_RELEASE "beta2") SET(DFHACK_RELEASE "r1")
SET(DFHACK_PRERELEASE TRUE) SET(DFHACK_PRERELEASE FALSE)
set(DFHACK_VERSION "${DF_VERSION}-${DFHACK_RELEASE}") set(DFHACK_VERSION "${DF_VERSION}-${DFHACK_RELEASE}")

@ -117,13 +117,22 @@ Fixes
- Fixed crash when selecting a profession from an empty list - Fixed crash when selecting a profession from an empty list
- Custom professions are now sorted alphabetically more reliably - Custom professions are now sorted alphabetically more reliably
- `modtools/create-item`:
- made gloves usable by specifying handedness
- now creates pairs of boots and gloves
- `modtools/create-unit`: - `modtools/create-unit`:
- stopped permanently overwriting the creature creation menu in arena mode - stopped permanently overwriting the creature creation menu in arena mode
- now uses non-English names - now uses non-English names
- added ``-setUnitToFort`` option to make a unit a civ/group member more easily
- fixed some issues where units would appear in unrevealed areas of the map
- `modtools/item-trigger`: fixed errors with plant growths - `modtools/item-trigger`: fixed errors with plant growths
- `remotefortressreader`: fixed a crash when serializing the local map - `remotefortressreader`: fixed a crash when serializing the local map
- `ruby`: fixed a crash when unloading the plugin on Windows
- `stonesense`: disabled overlay in STANDARD-based print modes to prevent crashes
- `title-version`: now hidden when loading an arena - `title-version`: now hidden when loading an arena
Misc Improvements Misc Improvements
@ -177,6 +186,7 @@ Fixes
- `gui/create-item`: Fixed quality when creating multiple items - `gui/create-item`: Fixed quality when creating multiple items
- `gui/mod-manager`: Fixed error when mods folder doesn't exist - `gui/mod-manager`: Fixed error when mods folder doesn't exist
- `modtools/item-trigger`: Fixed handling of items with subtypes - `modtools/item-trigger`: Fixed handling of items with subtypes
- `reveal`: ``revflood`` now handles constructed stairs with floors in generated fortresses
- `stockflow`: - `stockflow`:
- Can order metal mechanisms - Can order metal mechanisms
@ -188,6 +198,8 @@ Misc Improvements
- `catsplosion`: now a lua script instead of a plugin - `catsplosion`: now a lua script instead of a plugin
- `fix/diplomats`: replaces ``fixdiplomats`` - `fix/diplomats`: replaces ``fixdiplomats``
- `fix/merchants`: replaces ``fixmerchants`` - `fix/merchants`: replaces ``fixmerchants``
- `prefchange`: added a ``help`` option
- `probe`: now displays raw tiletype names
- Unified script documentation and in-terminal help options - Unified script documentation and in-terminal help options
Removed Removed

@ -1 +1 @@
Subproject commit b08d765a7ddacf66693cb2721833b3b56b092aa3 Subproject commit d1565a3b711514048477e11bc04f60f6218af37f

@ -21,6 +21,7 @@ AtomicChicken AtomicChicken
belal jimhester belal jimhester
Ben Lubar BenLubar Ben Lubar BenLubar
Ben Rosser TC01 Ben Rosser TC01
brndd brndd
Caldfir caldfir Caldfir caldfir
Carter Bray Qartar Carter Bray Qartar
Chris Dombroski cdombroski Chris Dombroski cdombroski
@ -63,6 +64,7 @@ melkor217 melkor217
Meneth32 Meneth32
Meph Meph
Michael Casadevall NCommander Michael Casadevall NCommander
Michael Crouch creidieki
Michon van Dooren MaienM Michon van Dooren MaienM
miffedmap miffedmap miffedmap miffedmap
Mike Stewart thewonderidiot Mike Stewart thewonderidiot

@ -101,12 +101,16 @@ Examples:
Please report any living/active creatures with cursetype "unknown" - Please report any living/active creatures with cursetype "unknown" -
this is most likely with mods which introduce new types of curses. this is most likely with mods which introduce new types of curses.
.. _flows:
flows flows
===== =====
A tool for checking how many tiles contain flowing liquids. If you suspect that 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 your magma sea leaks into HFS, you can use this tool to be sure without
revealing the map. revealing the map.
.. _probe:
probe probe
===== =====
Can be used to determine tile properties like temperature. Can be used to determine tile properties like temperature.
@ -587,6 +591,8 @@ Usage:
:confirm enable option1 [option2...]: :confirm enable option1 [option2...]:
Enable (or disable) specific confirmation dialogues. Enable (or disable) specific confirmation dialogues.
.. _follow:
follow follow
====== ======
Makes the game view follow the currently highlighted unit after you exit from the Makes the game view follow the currently highlighted unit after you exit from the
@ -990,6 +996,8 @@ Options:
**item-type <item-idx> <type[:subtype]>** **item-type <item-idx> <type[:subtype]>**
Replace the exact item type id in the job item. Replace the exact item type id in the job item.
.. _job-material:
job-material job-material
============ ============
Alter the material of the selected job. Similar to ``job item-material ...`` Alter the material of the selected job. Similar to ``job item-material ...``
@ -1006,6 +1014,8 @@ Invoked as::
* In :kbd:`b` mode, during selection of building components positions the cursor * In :kbd:`b` mode, during selection of building components positions the cursor
over the first available choice with the matching material. over the first available choice with the matching material.
.. _job-duplicate:
job-duplicate job-duplicate
============= =============
In :kbd:`q` mode, when a job is highlighted within a workshop or furnace In :kbd:`q` mode, when a job is highlighted within a workshop or furnace
@ -1197,6 +1207,8 @@ Extra options for ``map``:
:mud: Remove mud in addition to the normal stuff. :mud: Remove mud in addition to the normal stuff.
:snow: Also remove snow coverings. :snow: Also remove snow coverings.
.. _spotclean:
spotclean spotclean
========= =========
Works like ``clean map snow mud``, but only for the tile under the cursor. Ideal Works like ``clean map snow mud``, but only for the tile under the cursor. Ideal
@ -1236,6 +1248,7 @@ in the :kbd:`k` list, or inside a container. If called again before the game
is resumed, cancels destruction of the item. is resumed, cancels destruction of the item.
:dfhack-keybind:`autodump-destroy-item` :dfhack-keybind:`autodump-destroy-item`
.. _cleanowned:
cleanowned cleanowned
========== ==========
@ -1534,6 +1547,8 @@ Examples
Stuff up to 50 owned tame male animals who are not grazers into cages built Stuff up to 50 owned tame male animals who are not grazers into cages built
on the current default zone. on the current default zone.
.. _autonestbox:
autonestbox autonestbox
=========== ===========
Assigns unpastured female egg-layers to nestbox zones. Requires that you create Assigns unpastured female egg-layers to nestbox zones. Requires that you create

@ -8,7 +8,6 @@ ENDIF()
## build options ## build options
OPTION(BUILD_DEVEL "Install/package files required for development (For SDK)." OFF) 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) IF(UNIX)
OPTION(CONSOLE_NO_CATCH "Make the console not catch 'CTRL+C' events for easier debugging." OFF) OPTION(CONSOLE_NO_CATCH "Make the console not catch 'CTRL+C' events for easier debugging." OFF)
ENDIF() ENDIF()
@ -437,8 +436,4 @@ if(BUILD_DEVEL)
install(DIRECTORY include/ install(DIRECTORY include/
DESTINATION ${DFHACK_INCLUDES_DESTINATION} DESTINATION ${DFHACK_INCLUDES_DESTINATION}
FILES_MATCHING PATTERN "*.h" PATTERN "*.inc" ) #linux: include FILES_MATCHING PATTERN "*.h" PATTERN "*.inc" ) #linux: include
# Building the docs
IF(BUILD_DOXYGEN)
add_subdirectory (doc)
ENDIF()
endif() endif()

@ -1,55 +0,0 @@
# repurposed from libnoise: http://github.com/qknight/libnoise/tree/master/doc/
# following code and comments is by the original author, with some changes by
# me (peterix)
# ------------------------------------------------------------------------------
#
# many thanks go to Philippe Poilbarbe for writing the code this file is based on
# http://www.cmake.org/pipermail/cmake/2006-August/010794.html
#
# much later i also found this:
# http://tobias.rautenkranz.ch/cmake/doxygen/
# but it is hard to understand...
FIND_PACKAGE(Doxygen QUIET)
IF(DOXYGEN_FOUND)
SET(DOXYGEN_LANGUAGE "English" CACHE STRING "Language used by doxygen")
MARK_AS_ADVANCED(DOXYGEN_LANGUAGE)
# you could also set the version with this, see Doxygen.in
# there you will find a line like this:
# PROJECT_NUMBER = @DFHACK_VERSION@
# @DFHACK_VERSION@ is then replaced by our global DFHACK_VERSION
#
# for instance you could uncomment the next 3 lines and change the version for testing
# SET(DFHACK_VERSION
# "1.2.3-foo500"
# )
# doxygen can reference external images with IMAGE_PATH, this is how we set it dynamically
SET( CMAKE_DOXYGEN_IMAGE_PATH
"${CMAKE_CURRENT_SOURCE_DIR}/img"
)
# doxygen searches for source code (defined in FILE_PATTERNS, for example: *.cpp *.h)
# with DOXYGEN_SOURCE_DIR we fill a list of directories and later we write it into
# the Doxyfile with a REGEX REPLACE (see below)
SET( DOXYGEN_SOURCE_DIR
"${dfhack_SOURCE_DIR}/library"
)
STRING(REGEX REPLACE ";" " " CMAKE_DOXYGEN_INPUT_LIST "${DOXYGEN_SOURCE_DIR}")
set(DOXYFILE_DOT "NO")
if(DOXYGEN_DOT_EXECUTABLE)
set(DOXYFILE_DOT "YES")
endif()
CONFIGURE_FILE(Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
ADD_CUSTOM_TARGET(doxygen ALL
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
INSTALL( DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html/" DESTINATION ${DFHACK_DEVDOC_DESTINATION}/doxygen )
INSTALL( FILES "Doxygen.html" DESTINATION ${DFHACK_DEVDOC_DESTINATION})
ELSE(DOXYGEN_FOUND)
MESSAGE (WARNING "Doxygen binary couldn't be found. Can't build development documentation.'")
ENDIF(DOXYGEN_FOUND)

File diff suppressed because it is too large Load Diff

@ -1,9 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>REDIRECT!</title>
<meta http-equiv="REFRESH" content="0;url=./doxygen/index.html"></HEAD>
<BODY>
This is a redirect to <a href="./doxygen/index.html">the doxygen stuff.</a>
</BODY>
</HTML>

@ -1,42 +0,0 @@
/*******************************************************************************
www.sourceforge.net/projects/dfhack
Copyright (c) 2009 Petr Mrázek (peterix)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
damages arising from the use of this software.
Permission is granted to anyone to use this software for any
purpose, including commercial applications, and to alter it and
redistribute it freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must
not claim that you wrote the original software. If you use this
software in a product, an acknowledgment in the product documentation
would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and
must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.
*/
/*! \page index
<center>
\htmlonly
<h1>DFHack</h1>
<!--<img src="logo.png" alt="DFHack"/><br/>-->
\endhtmlonly
</center>
<h2>Introduction</h2>
DFHack is a Dwarf Fortress memory access library and a set of basic tools using
this library. The library is a work in progress, so things might change as more
tools are written for it.
It is an attempt to unite the various ways tools access DF memory and allow for
easier development of new tools. In general, you can use it to move memory
objects in and out of Dwarf Fortress really fast, regardless of DF version or OS.
*/

@ -659,15 +659,17 @@ df_env = df_shortcut_env()
function df_expr_to_ref(expr) function df_expr_to_ref(expr)
expr = expr:gsub('%["(.-)"%]', function(field) return '.' .. field end) expr = expr:gsub('%["(.-)"%]', function(field) return '.' .. field end)
:gsub('%[\'(.-)\'%]', function(field) return '.' .. field end) :gsub('%[\'(.-)\'%]', function(field) return '.' .. field end)
:gsub('%[(%d+)]', function(field) return '.' .. field end)
local parts = split_string(expr, '%.') local parts = split_string(expr, '%.')
local obj = df_env[parts[1]] local obj = df_env[parts[1]]
for i = 2, #parts do for i = 2, #parts do
local cur = obj[parts[i]] local key = tonumber(parts[i]) or parts[i]
local cur = obj[key]
if i == #parts and ((type(cur) ~= 'userdata') or if i == #parts and ((type(cur) ~= 'userdata') or
type(cur) == 'userdata' and getmetatable(cur) == nil) then type(cur) == 'userdata' and getmetatable(cur) == nil) then
obj = obj:_field(parts[i]) obj = obj:_field(key)
else else
obj = obj[parts[i]] obj = obj[key]
end end
end end
return obj return obj

@ -1 +1 @@
Subproject commit b48397cf5b4c954a098151943f7314a1a6eacf90 Subproject commit a8e80088b9cc934da993dc244ece2d0ae14143da

@ -119,6 +119,7 @@ void describeTile(color_ostream &out, df::tiletype tiletype)
out.print("%d", tiletype); out.print("%d", tiletype);
if(tileName(tiletype)) if(tileName(tiletype))
out.print(" = %s",tileName(tiletype)); out.print(" = %s",tileName(tiletype));
out.print(" (%s)", ENUM_KEY_STR(tiletype, tiletype).c_str());
out.print("\n"); out.print("\n");
df::tiletype_shape shape = tileShape(tiletype); df::tiletype_shape shape = tileShape(tiletype);

@ -401,12 +401,25 @@ command_result revflood(color_ostream &out, vector<string> & params)
if(!MCache->testCoord(current)) if(!MCache->testCoord(current))
continue; continue;
df::tiletype tt = MCache->baseTiletypeAt(current);
df::tile_designation des = MCache->designationAt(current); df::tile_designation des = MCache->designationAt(current);
if(!des.bits.hidden) if(!des.bits.hidden)
{ {
continue; continue;
} }
// use base tile (beneath constructions/ice), to avoid bug #1871
df::tiletype tt = MCache->baseTiletypeAt(current);
// unless the actual tile is a downward stairway
df::tiletype ctt = MCache->tiletypeAt(current);
switch (tileShape(ctt))
{
case tiletype_shape::STAIR_UPDOWN:
case tiletype_shape::STAIR_DOWN:
tt = ctt;
break;
}
bool below = 0; bool below = 0;
bool above = 0; bool above = 0;
bool sides = 0; bool sides = 0;

@ -296,7 +296,7 @@ void (*ruby_sysinit)(int *, const char ***);
void (*ruby_init)(void); void (*ruby_init)(void);
void (*ruby_init_loadpath)(void); void (*ruby_init_loadpath)(void);
void (*ruby_script)(const char*); void (*ruby_script)(const char*);
void (*ruby_finalize)(void); int (*ruby_cleanup)(int);
ID (*rb_intern)(const char*); ID (*rb_intern)(const char*);
VALUE (*rb_funcall)(VALUE, ID, int, ...); VALUE (*rb_funcall)(VALUE, ID, int, ...);
VALUE (*rb_define_module)(const char*); VALUE (*rb_define_module)(const char*);
@ -351,7 +351,7 @@ static int df_loadruby(void)
rbloadsym(ruby_init); rbloadsym(ruby_init);
rbloadsym(ruby_init_loadpath); rbloadsym(ruby_init_loadpath);
rbloadsym(ruby_script); rbloadsym(ruby_script);
rbloadsym(ruby_finalize); rbloadsym(ruby_cleanup);
rbloadsym(rb_intern); rbloadsym(rb_intern);
rbloadsym(rb_funcall); rbloadsym(rb_funcall);
rbloadsym(rb_define_module); rbloadsym(rb_define_module);
@ -476,7 +476,7 @@ static void df_rubythread(void *p)
case RB_DIE: case RB_DIE:
running = 0; running = 0;
ruby_finalize(); ruby_cleanup(0);
break; break;
case RB_EVAL: case RB_EVAL:

@ -1 +1 @@
Subproject commit 1ffdc984d0c3d50e790b9ff5991c02fb21dec463 Subproject commit efe406b77ba864eb2a7ca66d1f16816c6e0fab7a

@ -1 +1 @@
Subproject commit e9c3119e751c3e2073eb02bbcda01d140cc6ae4a Subproject commit 0e41c190d3f22c71aa7f8e3090d1b7d53c944495