diff options
95 files changed, 7398 insertions, 38439 deletions
@@ -35,6 +35,7 @@ build/library build/tools build/plugins build/depends +build/install_manifest.txt #ignore Kdevelop stuff .kdev4 diff --git a/CMakeLists.txt b/CMakeLists.txt index f77a6c3b..dfb13cd5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -111,6 +111,9 @@ IF(UNIX) SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g -Wall -Wno-unused-variable") SET(CMAKE_CXX_FLAGS "-fvisibility=hidden -m32 -march=i686 -mtune=generic -std=c++0x") SET(CMAKE_C_FLAGS "-fvisibility=hidden -m32 -march=i686 -mtune=generic") +ELSEIF(MSVC) + # for msvc, tell it to always use 8-byte pointers to member functions to avoid confusion + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /vmg /vmm") ENDIF() # use shared libraries for protobuf diff --git a/LUA_API.rst b/LUA_API.rst index 5fc653bb..a7dab21b 100644 --- a/LUA_API.rst +++ b/LUA_API.rst @@ -17,7 +17,7 @@ are treated by DFHack command line prompt almost as native C++ commands, and invoked by plugins written in c++. This document describes native API available to Lua in detail. -For the most part it does not describe utility functions +It does not describe all of the utility functions implemented by Lua files located in hack/lua/... @@ -724,15 +724,20 @@ can be omitted. Gui module ---------- -* ``dfhack.gui.getCurViewscreen()`` +* ``dfhack.gui.getCurViewscreen([skip_dismissed])`` - Returns the viewscreen that is current in the core. + Returns the topmost viewscreen. If ``skip_dismissed`` is *true*, + ignores screens already marked to be removed. * ``dfhack.gui.getFocusString(viewscreen)`` Returns a string representation of the current focus position in the ui. The string has a "screen/foo/bar/baz..." format. +* ``dfhack.gui.getCurFocus([skip_dismissed])`` + + Returns the focus string of the current viewscreen. + * ``dfhack.gui.getSelectedWorkshopJob([silent])`` When a job is selected in *'q'* mode, returns the job, else @@ -875,6 +880,15 @@ Units module Retrieves the profession name for the given race/caste using raws. +* ``dfhack.units.getProfessionColor(unit[,ignore_noble])`` + + Retrieves the color associated with the profession, using noble assignments + or raws. The ``ignore_noble`` boolean disables the use of noble positions. + +* ``dfhack.units.getCasteProfessionColor(race,caste,prof_id)`` + + Retrieves the profession color for the given race/caste using raws. + Items module ------------ @@ -1027,6 +1041,11 @@ Burrows module Buildings module ---------------- +* ``dfhack.buildings.setOwner(item,unit)`` + + Replaces the owner of the building. If unit is *nil*, removes ownership. + Returns *false* in case of error. + * ``dfhack.buildings.getSize(building)`` Returns *width, height, centerx, centery*. @@ -1204,6 +1223,165 @@ Constructions module Returns *true, was_only_planned* if removed; or *false* if none found. +Screen API +---------- + +The screen module implements support for drawing to the tiled screen of the game. +Note that drawing only has any effect when done from callbacks, so it can only +be feasibly used in the core context. + +Basic painting functions: + +* ``dfhack.screen.getWindowSize()`` + + Returns *width, height* of the screen. + +* ``dfhack.screen.getMousePos()`` + + Returns *x,y* of the tile the mouse is over. + +* ``dfhack.screen.inGraphicsMode()`` + + Checks if [GRAPHICS:YES] was specified in init. + +* ``dfhack.screen.paintTile(pen,x,y[,char,tile])`` + + Paints a tile using given parameters. Pen is a table with following possible fields: + + ``ch`` + Provides the ordinary tile character, as either a 1-character string or a number. + Can be overridden with the ``char`` function parameter. + ``fg`` + Foreground color for the ordinary tile. Defaults to COLOR_GREY (7). + ``bg`` + Background color for the ordinary tile. Defaults to COLOR_BLACK (0). + ``bold`` + Bright/bold text flag. If *nil*, computed based on (fg & 8); fg is masked to 3 bits. + Otherwise should be *true/false*. + ``tile`` + Graphical tile id. Ignored unless [GRAPHICS:YES] was in init.txt. + ``tile_color = true`` + Specifies that the tile should be shaded with *fg/bg*. + ``tile_fg, tile_bg`` + If specified, overrides *tile_color* and supplies shading colors directly. + + Returns *false* if coordinates out of bounds, or other error. + +* ``dfhack.screen.paintString(pen,x,y,text)`` + + Paints the string starting at *x,y*. Uses the string characters + in sequence to override the ``ch`` field of pen. + + Returns *true* if painting at least one character succeeded. + +* ``dfhack.screen.fillRect(pen,x1,y1,x2,y2)`` + + Fills the rectangle specified by the coordinates with the given pen. + Returns *true* if painting at least one character succeeded. + +* ``dfhack.screen.findGraphicsTile(pagename,x,y)`` + + Finds a tile from a graphics set (i.e. the raws used for creatures), + if in graphics mode and loaded. + + Returns: *tile, tile_grayscale*, or *nil* if not found. + The values can then be used for the *tile* field of *pen* structures. + +* ``dfhack.screen.clear()`` + + Fills the screen with blank background. + +* ``dfhack.screen.invalidate()`` + + Requests repaint of the screen by setting a flag. Unlike other + functions in this section, this may be used at any time. + +In order to actually be able to paint to the screen, it is necessary +to create and register a viewscreen (basically a modal dialog) with +the game. + +**NOTE**: As a matter of policy, in order to avoid user confusion, all +interface screens added by dfhack should bear the "DFHack" signature. + +Screens are managed with the following functions: + +* ``dfhack.screen.show(screen[,below])`` + + Displays the given screen, possibly placing it below a different one. + The screen must not be already shown. Returns *true* if success. + +* ``dfhack.screen.dismiss(screen[,to_first])`` + + Marks the screen to be removed when the game enters its event loop. + If ``to_first`` is *true*, all screens up to the first one will be deleted. + +* ``dfhack.screen.isDismissed(screen)`` + + Checks if the screen is already marked for removal. + +Apart from a native viewscreen object, these functions accept a table +as a screen. In this case, ``show`` creates a new native viewscreen +that delegates all processing to methods stored in that table. + +**NOTE**: Lua-implemented screens are only supported in the core context. + +Supported callbacks and fields are: + +* ``screen._native`` + + Initialized by ``show`` with a reference to the backing viewscreen + object, and removed again when the object is deleted. + +* ``function screen:onShow()`` + + Called by ``dfhack.screen.show`` if successful. + +* ``function screen:onDismiss()`` + + Called by ``dfhack.screen.dismiss`` if successful. + +* ``function screen:onDestroy()`` + + Called from the destructor when the viewscreen is deleted. + +* ``function screen:onResize(w, h)`` + + Called before ``onRender`` or ``onIdle`` when the window size has changed. + +* ``function screen:onRender()`` + + Called when the viewscreen should paint itself. This is the only context + where the above painting functions work correctly. + + If omitted, the screen is cleared; otherwise it should do that itself. + In order to make a see-through dialog, call ``self._native.parent:render()``. + +* ``function screen:onIdle()`` + + Called every frame when the screen is on top of the stack. + +* ``function screen:onHelp()`` + + Called when the help keybinding is activated (usually '?'). + +* ``function screen:onInput(keys)`` + + Called when keyboard or mouse events are available. + If any keys are pressed, the keys argument is a table mapping them to *true*. + Note that this refers to logical keybingings computed from real keys via + options; if multiple interpretations exist, the table will contain multiple keys. + + The table also may contain special keys: + + ``_STRING`` + Maps to an integer in range 0-255. Duplicates a separate "STRING_A???" code for convenience. + + ``_MOUSE_L, _MOUSE_R`` + If the left or right mouse button is pressed. + + If this method is omitted, the screen is dismissed on receival of the ``LEAVESCREEN`` key. + + Internal API ------------ @@ -1235,6 +1413,12 @@ and are only documented here for completeness: Returns a sequence of tables describing virtual memory ranges of the process. +* ``dfhack.internal.patchMemory(dest,src,count)`` + + Like memmove below, but works even if dest is read-only memory, e.g. code. + If destination overlaps a completely invalid memory region, or another error + occurs, returns false. + * ``dfhack.internal.memmove(dest,src,count)`` Wraps the standard memmove function. Accepts both numbers and refs as pointers. @@ -1296,8 +1480,8 @@ Core context specific functions: Event type ---------- -An event is just a lua table with a predefined metatable that -contains a __call metamethod. When it is invoked, it loops +An event is a native object transparently wrapping a lua table, +and implementing a __call metamethod. When it is invoked, it loops through the table with next and calls all contained values. This is intended as an extensible way to add listeners. @@ -1312,10 +1496,18 @@ Features: * ``event[key] = function`` - Sets the function as one of the listeners. + Sets the function as one of the listeners. Assign *nil* to remove it. **NOTE**: The ``df.NULL`` key is reserved for the use by - the C++ owner of the event, and has some special semantics. + the C++ owner of the event; it is an error to try setting it. + +* ``#event`` + + Returns the number of non-nil listeners. + +* ``pairs(event)`` + + Iterates over all listeners in the table. * ``event(args...)`` @@ -1323,9 +1515,9 @@ Features: order using ``dfhack.safecall``. -======= -Modules -======= +=========== +Lua Modules +=========== DFHack sets up the lua interpreter so that the built-in ``require`` function can be used to load shared lua code from hack/lua/. @@ -1333,7 +1525,7 @@ The ``dfhack`` namespace reference itself may be obtained via ``require('dfhack')``, although it is initially created as a global by C++ bootstrap code. -The following functions are provided: +The following module management functions are provided: * ``mkmodule(name)`` @@ -1357,6 +1549,194 @@ The following functions are provided: should be kept limited to the standard Lua library and API described in this document. +Global environment +================== + +A number of variables and functions are provided in the base global +environment by the mandatory init file dfhack.lua: + +* Color constants + + These are applicable both for ``dfhack.color()`` and color fields + in DF functions or structures: + + COLOR_RESET, COLOR_BLACK, COLOR_BLUE, COLOR_GREEN, COLOR_CYAN, + COLOR_RED, COLOR_MAGENTA, COLOR_BROWN, COLOR_GREY, COLOR_DARKGREY, + COLOR_LIGHTBLUE, COLOR_LIGHTGREEN, COLOR_LIGHTCYAN, COLOR_LIGHTRED, + COLOR_LIGHTMAGENTA, COLOR_YELLOW, COLOR_WHITE + +* ``dfhack.onStateChange`` event codes + + Available only in the core context, as is the event itself: + + SC_WORLD_LOADED, SC_WORLD_UNLOADED, SC_MAP_LOADED, + SC_MAP_UNLOADED, SC_VIEWSCREEN_CHANGED, SC_CORE_INITIALIZED + +* Functions already described above + + safecall, qerror, mkmodule, reload + +* ``printall(obj)`` + + If the argument is a lua table or DF object reference, prints all fields. + +* ``copyall(obj)`` + + Returns a shallow copy of the table or reference as a lua table. + +* ``pos2xyz(obj)`` + + The object must have fields x, y and z. Returns them as 3 values. + If obj is *nil*, or x is -30000 (the usual marker for undefined + coordinates), returns *nil*. + +* ``xyz2pos(x,y,z)`` + + Returns a table with x, y and z as fields. + +* ``safe_index(obj,index...)`` + + Walks a sequence of dereferences, which may be represented by numbers or strings. + Returns *nil* if any of obj or indices is *nil*, or a numeric index is out of array bounds. + +utils +===== + +* ``utils.compare(a,b)`` + + Comparator function; returns *-1* if a<b, *1* if a>b, *0* otherwise. + +* ``utils.compare_name(a,b)`` + + Comparator for names; compares empty string last. + +* ``utils.is_container(obj)`` + + Checks if obj is a container ref. + +* ``utils.make_index_sequence(start,end)`` + + Returns a lua sequence of numbers in start..end. + +* ``utils.make_sort_order(data, ordering)`` + + Computes a sorted permutation of objects in data, as a table of integer + indices into the data sequence. Uses ``data.n`` as input length + if present. + + The ordering argument is a sequence of ordering specs, represented + as lua tables with following possible fields: + + ord.key = *function(value)* + Computes comparison key from input data value. Not called on nil. + If omitted, the comparison key is the value itself. + ord.key_table = *function(data)* + Computes a key table from the data table in one go. + ord.compare = *function(a,b)* + Comparison function. Defaults to ``utils.compare`` above. + Called on non-nil keys; nil sorts last. + ord.nil_first = *true/false* + If true, nil keys are sorted first instead of last. + ord.reverse = *true/false* + If true, sort non-nil keys in descending order. + + For every comparison during sorting the specs are applied in + order until an unambiguous decision is reached. Sorting is stable. + + Example of sorting a sequence by field foo:: + + local spec = { key = function(v) return v.foo end } + local order = utils.make_sort_order(data, { spec }) + local output = {} + for i = 1,#order do output[i] = data[order[i]] end + + Separating the actual reordering of the sequence in this + way enables applying the same permutation to multiple arrays. + This function is used by the sort plugin. + +* ``utils.assign(tgt, src)`` + + Does a recursive assignment of src into tgt. + Uses ``df.assign`` if tgt is a native object ref; otherwise + recurses into lua tables. + +* ``utils.clone(obj, deep)`` + + Performs a shallow, or semi-deep copy of the object as a lua table tree. + The deep mode recurses into lua tables and subobjects, except pointers + to other heap objects. + Null pointers are represented as df.NULL. Zero-based native containers + are converted to 1-based lua sequences. + +* ``utils.clone_with_default(obj, default, force)`` + + Copies the object, using the ``default`` lua table tree + as a guide to which values should be skipped as uninteresting. + The ``force`` argument makes it always return a non-*nil* value. + +* ``utils.sort_vector(vector,field,cmpfun)`` + + Sorts a native vector or lua sequence using the comparator function. + If ``field`` is not *nil*, applies the comparator to the field instead + of the whole object. + +* ``utils.binsearch(vector,key,field,cmpfun,min,max)`` + + Does a binary search in a native vector or lua sequence for + ``key``, using ``cmpfun`` and ``field`` like sort_vector. + If ``min`` and ``max`` are specified, they are used as the + search subrange bounds. + + If found, returns *item, true, idx*. Otherwise returns + *nil, false, insert_idx*, where *insert_idx* is the correct + insertion point. + +* ``utils.insert_sorted(vector,item,field,cmpfun)`` + + Does a binary search, and inserts item if not found. + Returns *did_insert, vector[idx], idx*. + +* ``utils.insert_or_update(vector,item,field,cmpfun)`` + + Like ``insert_sorted``, but also assigns the item into + the vector cell if insertion didn't happen. + + As an example, you can use this to set skill values:: + + utils.insert_or_update(soul.skills, {new=true, id=..., rating=...}, 'id') + + (For an explanation of ``new=true``, see table assignment in the wrapper section) + +* ``utils.prompt_yes_no(prompt, default)`` + + Presents a yes/no prompt to the user. If ``default`` is not *nil*, + allows just pressing Enter to submit the default choice. + If the user enters ``'abort'``, throws an error. + +* ``utils.prompt_input(prompt, checkfun, quit_str)`` + + Presents a prompt to input data, until a valid string is entered. + Once ``checkfun(input)`` returns *true, ...*, passes the values + through. If the user enters the quit_str (defaults to ``'~~~'``), + throws an error. + +* ``utils.check_number(text)`` + + A ``prompt_input`` ``checkfun`` that verifies a number input. + +dumper +====== + +A third-party lua table dumper module from +http://lua-users.org/wiki/DataDumper. Defines one +function: + +* ``dumper.DataDumper(value, varname, fastmode, ident, indent_step)`` + + Returns ``value`` converted to a string. The ``indent_step`` + argument specifies the indentation step size in spaces. For + the other arguments see the original documentation link above. + ======= Plugins @@ -1430,6 +1810,9 @@ are automatically used by the DFHack core as commands. The matching command name consists of the name of the file sans the extension. +If the first line of the script is a one-line comment, it is +used by the built-in ``ls`` and ``help`` commands. + **NOTE:** Scripts placed in subdirectories still can be accessed, but do not clutter the ``ls`` command list; thus it is preferred for obscure developer-oriented scripts and scripts used by tools. diff --git a/Lua API.html b/Lua API.html index 04e89936..b9f09cf9 100644 --- a/Lua API.html +++ b/Lua API.html @@ -3,7 +3,7 @@ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<meta name="generator" content="Docutils 0.9: http://docutils.sourceforge.net/" /> +<meta name="generator" content="Docutils 0.8.1: http://docutils.sourceforge.net/" /> <title>DFHack Lua API</title> <style type="text/css"> @@ -351,22 +351,28 @@ ul.auto-toc { <li><a class="reference internal" href="#burrows-module" id="id23">Burrows module</a></li> <li><a class="reference internal" href="#buildings-module" id="id24">Buildings module</a></li> <li><a class="reference internal" href="#constructions-module" id="id25">Constructions module</a></li> -<li><a class="reference internal" href="#internal-api" id="id26">Internal API</a></li> +<li><a class="reference internal" href="#screen-api" id="id26">Screen API</a></li> +<li><a class="reference internal" href="#internal-api" id="id27">Internal API</a></li> </ul> </li> -<li><a class="reference internal" href="#core-interpreter-context" id="id27">Core interpreter context</a><ul> -<li><a class="reference internal" href="#event-type" id="id28">Event type</a></li> +<li><a class="reference internal" href="#core-interpreter-context" id="id28">Core interpreter context</a><ul> +<li><a class="reference internal" href="#event-type" id="id29">Event type</a></li> </ul> </li> </ul> </li> -<li><a class="reference internal" href="#modules" id="id29">Modules</a></li> -<li><a class="reference internal" href="#plugins" id="id30">Plugins</a><ul> -<li><a class="reference internal" href="#burrows" id="id31">burrows</a></li> -<li><a class="reference internal" href="#sort" id="id32">sort</a></li> +<li><a class="reference internal" href="#lua-modules" id="id30">Lua Modules</a><ul> +<li><a class="reference internal" href="#global-environment" id="id31">Global environment</a></li> +<li><a class="reference internal" href="#utils" id="id32">utils</a></li> +<li><a class="reference internal" href="#dumper" id="id33">dumper</a></li> </ul> </li> -<li><a class="reference internal" href="#scripts" id="id33">Scripts</a></li> +<li><a class="reference internal" href="#plugins" id="id34">Plugins</a><ul> +<li><a class="reference internal" href="#burrows" id="id35">burrows</a></li> +<li><a class="reference internal" href="#sort" id="id36">sort</a></li> +</ul> +</li> +<li><a class="reference internal" href="#scripts" id="id37">Scripts</a></li> </ul> </div> <p>The current version of DFHack has extensive support for @@ -381,7 +387,7 @@ structures, and interaction with dfhack itself.</li> are treated by DFHack command line prompt almost as native C++ commands, and invoked by plugins written in c++.</p> <p>This document describes native API available to Lua in detail. -For the most part it does not describe utility functions +It does not describe all of the utility functions implemented by Lua files located in hack/lua/...</p> <div class="section" id="df-data-structure-wrapper"> <h1><a class="toc-backref" href="#id1">DF data structure wrapper</a></h1> @@ -981,13 +987,17 @@ can be omitted.</p> <div class="section" id="gui-module"> <h3><a class="toc-backref" href="#id18">Gui module</a></h3> <ul> -<li><p class="first"><tt class="docutils literal">dfhack.gui.getCurViewscreen()</tt></p> -<p>Returns the viewscreen that is current in the core.</p> +<li><p class="first"><tt class="docutils literal"><span class="pre">dfhack.gui.getCurViewscreen([skip_dismissed])</span></tt></p> +<p>Returns the topmost viewscreen. If <tt class="docutils literal">skip_dismissed</tt> is <em>true</em>, +ignores screens already marked to be removed.</p> </li> <li><p class="first"><tt class="docutils literal">dfhack.gui.getFocusString(viewscreen)</tt></p> <p>Returns a string representation of the current focus position in the ui. The string has a "screen/foo/bar/baz..." format.</p> </li> +<li><p class="first"><tt class="docutils literal"><span class="pre">dfhack.gui.getCurFocus([skip_dismissed])</span></tt></p> +<p>Returns the focus string of the current viewscreen.</p> +</li> <li><p class="first"><tt class="docutils literal"><span class="pre">dfhack.gui.getSelectedWorkshopJob([silent])</span></tt></p> <p>When a job is selected in <em>'q'</em> mode, returns the job, else prints error unless silent and returns <em>nil</em>.</p> @@ -1103,6 +1113,13 @@ or raws. The <tt class="docutils literal">ignore_noble</tt> boolean disables the <li><p class="first"><tt class="docutils literal"><span class="pre">dfhack.units.getCasteProfessionName(race,caste,prof_id[,plural])</span></tt></p> <p>Retrieves the profession name for the given race/caste using raws.</p> </li> +<li><p class="first"><tt class="docutils literal"><span class="pre">dfhack.units.getProfessionColor(unit[,ignore_noble])</span></tt></p> +<p>Retrieves the color associated with the profession, using noble assignments +or raws. The <tt class="docutils literal">ignore_noble</tt> boolean disables the use of noble positions.</p> +</li> +<li><p class="first"><tt class="docutils literal">dfhack.units.getCasteProfessionColor(race,caste,prof_id)</tt></p> +<p>Retrieves the profession color for the given race/caste using raws.</p> +</li> </ul> </div> <div class="section" id="items-module"> @@ -1227,6 +1244,10 @@ burrows, or the presence of invaders.</p> <div class="section" id="buildings-module"> <h3><a class="toc-backref" href="#id24">Buildings module</a></h3> <ul> +<li><p class="first"><tt class="docutils literal">dfhack.buildings.setOwner(item,unit)</tt></p> +<p>Replaces the owner of the building. If unit is <em>nil</em>, removes ownership. +Returns <em>false</em> in case of error.</p> +</li> <li><p class="first"><tt class="docutils literal">dfhack.buildings.getSize(building)</tt></p> <p>Returns <em>width, height, centerx, centery</em>.</p> </li> @@ -1380,8 +1401,147 @@ Returns <em>true, was_only_planned</em> if removed; or <em>false</em> if none fo </li> </ul> </div> +<div class="section" id="screen-api"> +<h3><a class="toc-backref" href="#id26">Screen API</a></h3> +<p>The screen module implements support for drawing to the tiled screen of the game. +Note that drawing only has any effect when done from callbacks, so it can only +be feasibly used in the core context.</p> +<p>Basic painting functions:</p> +<ul> +<li><p class="first"><tt class="docutils literal">dfhack.screen.getWindowSize()</tt></p> +<p>Returns <em>width, height</em> of the screen.</p> +</li> +<li><p class="first"><tt class="docutils literal">dfhack.screen.getMousePos()</tt></p> +<p>Returns <em>x,y</em> of the tile the mouse is over.</p> +</li> +<li><p class="first"><tt class="docutils literal">dfhack.screen.inGraphicsMode()</tt></p> +<p>Checks if [GRAPHICS:YES] was specified in init.</p> +</li> +<li><p class="first"><tt class="docutils literal"><span class="pre">dfhack.screen.paintTile(pen,x,y[,char,tile])</span></tt></p> +<p>Paints a tile using given parameters. Pen is a table with following possible fields:</p> +<dl class="docutils"> +<dt><tt class="docutils literal">ch</tt></dt> +<dd><p class="first last">Provides the ordinary tile character, as either a 1-character string or a number. +Can be overridden with the <tt class="docutils literal">char</tt> function parameter.</p> +</dd> +<dt><tt class="docutils literal">fg</tt></dt> +<dd><p class="first last">Foreground color for the ordinary tile. Defaults to COLOR_GREY (7).</p> +</dd> +<dt><tt class="docutils literal">bg</tt></dt> +<dd><p class="first last">Background color for the ordinary tile. Defaults to COLOR_BLACK (0).</p> +</dd> +<dt><tt class="docutils literal">bold</tt></dt> +<dd><p class="first last">Bright/bold text flag. If <em>nil</em>, computed based on (fg & 8); fg is masked to 3 bits. +Otherwise should be <em>true/false</em>.</p> +</dd> +<dt><tt class="docutils literal">tile</tt></dt> +<dd><p class="first last">Graphical tile id. Ignored unless [GRAPHICS:YES] was in init.txt.</p> +</dd> +<dt><tt class="docutils literal">tile_color = true</tt></dt> +<dd><p class="first last">Specifies that the tile should be shaded with <em>fg/bg</em>.</p> +</dd> +<dt><tt class="docutils literal">tile_fg, tile_bg</tt></dt> +<dd><p class="first last">If specified, overrides <em>tile_color</em> and supplies shading colors directly.</p> +</dd> +</dl> +<p>Returns <em>false</em> if coordinates out of bounds, or other error.</p> +</li> +<li><p class="first"><tt class="docutils literal">dfhack.screen.paintString(pen,x,y,text)</tt></p> +<p>Paints the string starting at <em>x,y</em>. Uses the string characters +in sequence to override the <tt class="docutils literal">ch</tt> field of pen.</p> +<p>Returns <em>true</em> if painting at least one character succeeded.</p> +</li> +<li><p class="first"><tt class="docutils literal">dfhack.screen.fillRect(pen,x1,y1,x2,y2)</tt></p> +<p>Fills the rectangle specified by the coordinates with the given pen. +Returns <em>true</em> if painting at least one character succeeded.</p> +</li> +<li><p class="first"><tt class="docutils literal">dfhack.screen.findGraphicsTile(pagename,x,y)</tt></p> +<p>Finds a tile from a graphics set (i.e. the raws used for creatures), +if in graphics mode and loaded.</p> +<p>Returns: <em>tile, tile_grayscale</em>, or <em>nil</em> if not found. +The values can then be used for the <em>tile</em> field of <em>pen</em> structures.</p> +</li> +<li><p class="first"><tt class="docutils literal">dfhack.screen.clear()</tt></p> +<p>Fills the screen with blank background.</p> +</li> +<li><p class="first"><tt class="docutils literal">dfhack.screen.invalidate()</tt></p> +<p>Requests repaint of the screen by setting a flag. Unlike other +functions in this section, this may be used at any time.</p> +</li> +</ul> +<p>In order to actually be able to paint to the screen, it is necessary +to create and register a viewscreen (basically a modal dialog) with +the game.</p> +<p><strong>NOTE</strong>: As a matter of policy, in order to avoid user confusion, all +interface screens added by dfhack should bear the "DFHack" signature.</p> +<p>Screens are managed with the following functions:</p> +<ul> +<li><p class="first"><tt class="docutils literal"><span class="pre">dfhack.screen.show(screen[,below])</span></tt></p> +<p>Displays the given screen, possibly placing it below a different one. +The screen must not be already shown. Returns <em>true</em> if success.</p> +</li> +<li><p class="first"><tt class="docutils literal"><span class="pre">dfhack.screen.dismiss(screen[,to_first])</span></tt></p> +<p>Marks the screen to be removed when the game enters its event loop. +If <tt class="docutils literal">to_first</tt> is <em>true</em>, all screens up to the first one will be deleted.</p> +</li> +<li><p class="first"><tt class="docutils literal">dfhack.screen.isDismissed(screen)</tt></p> +<p>Checks if the screen is already marked for removal.</p> +</li> +</ul> +<p>Apart from a native viewscreen object, these functions accept a table +as a screen. In this case, <tt class="docutils literal">show</tt> creates a new native viewscreen +that delegates all processing to methods stored in that table.</p> +<p><strong>NOTE</strong>: Lua-implemented screens are only supported in the core context.</p> +<p>Supported callbacks and fields are:</p> +<ul> +<li><p class="first"><tt class="docutils literal">screen._native</tt></p> +<p>Initialized by <tt class="docutils literal">show</tt> with a reference to the backing viewscreen +object, and removed again when the object is deleted.</p> +</li> +<li><p class="first"><tt class="docutils literal">function screen:onShow()</tt></p> +<p>Called by <tt class="docutils literal">dfhack.screen.show</tt> if successful.</p> +</li> +<li><p class="first"><tt class="docutils literal">function screen:onDismiss()</tt></p> +<p>Called by <tt class="docutils literal">dfhack.screen.dismiss</tt> if successful.</p> +</li> +<li><p class="first"><tt class="docutils literal">function screen:onDestroy()</tt></p> +<p>Called from the destructor when the viewscreen is deleted.</p> +</li> +<li><p class="first"><tt class="docutils literal">function screen:onResize(w, h)</tt></p> +<p>Called before <tt class="docutils literal">onRender</tt> or <tt class="docutils literal">onIdle</tt> when the window size has changed.</p> +</li> +<li><p class="first"><tt class="docutils literal">function screen:onRender()</tt></p> +<p>Called when the viewscreen should paint itself. This is the only context +where the above painting functions work correctly.</p> +<p>If omitted, the screen is cleared; otherwise it should do that itself. +In order to make a see-through dialog, call <tt class="docutils literal">self._native.parent:render()</tt>.</p> +</li> +<li><p class="first"><tt class="docutils literal">function screen:onIdle()</tt></p> +<p>Called every frame when the screen is on top of the stack.</p> +</li> +<li><p class="first"><tt class="docutils literal">function screen:onHelp()</tt></p> +<p>Called when the help keybinding is activated (usually '?').</p> +</li> +<li><p class="first"><tt class="docutils literal">function screen:onInput(keys)</tt></p> +<p>Called when keyboard or mouse events are available. +If any keys are pressed, the keys argument is a table mapping them to <em>true</em>. +Note that this refers to logical keybingings computed from real keys via +options; if multiple interpretations exist, the table will contain multiple keys.</p> +<p>The table also may contain special keys:</p> +<dl class="docutils"> +<dt><tt class="docutils literal">_STRING</tt></dt> +<dd><p class="first last">Maps to an integer in range 0-255. Duplicates a separate "STRING_A???" code for convenience.</p> +</dd> +<dt><tt class="docutils literal">_MOUSE_L, _MOUSE_R</tt></dt> +<dd><p class="first last">If the left or right mouse button is pressed.</p> +</dd> +</dl> +<p>If this method is omitted, the screen is dismissed on receival of the <tt class="docutils literal">LEAVESCREEN</tt> key.</p> +</li> +</ul> +</div> <div class="section" id="internal-api"> -<h3><a class="toc-backref" href="#id26">Internal API</a></h3> +<h3><a class="toc-backref" href="#id27">Internal API</a></h3> <p>These functions are intended for the use by dfhack developers, and are only documented here for completeness:</p> <ul> @@ -1404,6 +1564,11 @@ global environment, persistent between calls to the script.</p> <li><p class="first"><tt class="docutils literal">dfhack.internal.getMemRanges()</tt></p> <p>Returns a sequence of tables describing virtual memory ranges of the process.</p> </li> +<li><p class="first"><tt class="docutils literal">dfhack.internal.patchMemory(dest,src,count)</tt></p> +<p>Like memmove below, but works even if dest is read-only memory, e.g. code. +If destination overlaps a completely invalid memory region, or another error +occurs, returns false.</p> +</li> <li><p class="first"><tt class="docutils literal">dfhack.internal.memmove(dest,src,count)</tt></p> <p>Wraps the standard memmove function. Accepts both numbers and refs as pointers.</p> </li> @@ -1424,7 +1589,7 @@ Returns: <em>found_index</em>, or <em>nil</em> if end reached.</p> </div> </div> <div class="section" id="core-interpreter-context"> -<h2><a class="toc-backref" href="#id27">Core interpreter context</a></h2> +<h2><a class="toc-backref" href="#id28">Core interpreter context</a></h2> <p>While plugins can create any number of interpreter instances, there is one special context managed by dfhack core. It is the only context that can receive events from DF and plugins.</p> @@ -1455,9 +1620,9 @@ Using <tt class="docutils literal">timeout_active(id,nil)</tt> cancels the timer </li> </ul> <div class="section" id="event-type"> -<h3><a class="toc-backref" href="#id28">Event type</a></h3> -<p>An event is just a lua table with a predefined metatable that -contains a __call metamethod. When it is invoked, it loops +<h3><a class="toc-backref" href="#id29">Event type</a></h3> +<p>An event is a native object transparently wrapping a lua table, +and implementing a __call metamethod. When it is invoked, it loops through the table with next and calls all contained values. This is intended as an extensible way to add listeners.</p> <p>This type itself is available in any context, but only the @@ -1468,9 +1633,15 @@ core context has the actual events defined by C++ code.</p> <p>Creates a new instance of an event.</p> </li> <li><p class="first"><tt class="docutils literal">event[key] = function</tt></p> -<p>Sets the function as one of the listeners.</p> +<p>Sets the function as one of the listeners. Assign <em>nil</em> to remove it.</p> <p><strong>NOTE</strong>: The <tt class="docutils literal">df.NULL</tt> key is reserved for the use by -the C++ owner of the event, and has some special semantics.</p> +the C++ owner of the event; it is an error to try setting it.</p> +</li> +<li><p class="first"><tt class="docutils literal">#event</tt></p> +<p>Returns the number of non-nil listeners.</p> +</li> +<li><p class="first"><tt class="docutils literal">pairs(event)</tt></p> +<p>Iterates over all listeners in the table.</p> </li> <li><p class="first"><tt class="docutils literal"><span class="pre">event(args...)</span></tt></p> <p>Invokes all listeners contained in the event in an arbitrary @@ -1480,14 +1651,14 @@ order using <tt class="docutils literal">dfhack.safecall</tt>.</p> </div> </div> </div> -<div class="section" id="modules"> -<h1><a class="toc-backref" href="#id29">Modules</a></h1> +<div class="section" id="lua-modules"> +<h1><a class="toc-backref" href="#id30">Lua Modules</a></h1> <p>DFHack sets up the lua interpreter so that the built-in <tt class="docutils literal">require</tt> function can be used to load shared lua code from hack/lua/. The <tt class="docutils literal">dfhack</tt> namespace reference itself may be obtained via <tt class="docutils literal"><span class="pre">require('dfhack')</span></tt>, although it is initially created as a global by C++ bootstrap code.</p> -<p>The following functions are provided:</p> +<p>The following module management functions are provided:</p> <ul> <li><p class="first"><tt class="docutils literal">mkmodule(name)</tt></p> <p>Creates an environment table for the module. Intended to be used as:</p> @@ -1509,16 +1680,183 @@ should be kept limited to the standard Lua library and API described in this document.</p> </li> </ul> +<div class="section" id="global-environment"> +<h2><a class="toc-backref" href="#id31">Global environment</a></h2> +<p>A number of variables and functions are provided in the base global +environment by the mandatory init file dfhack.lua:</p> +<ul> +<li><p class="first">Color constants</p> +<p>These are applicable both for <tt class="docutils literal">dfhack.color()</tt> and color fields +in DF functions or structures:</p> +<p>COLOR_RESET, COLOR_BLACK, COLOR_BLUE, COLOR_GREEN, COLOR_CYAN, +COLOR_RED, COLOR_MAGENTA, COLOR_BROWN, COLOR_GREY, COLOR_DARKGREY, +COLOR_LIGHTBLUE, COLOR_LIGHTGREEN, COLOR_LIGHTCYAN, COLOR_LIGHTRED, +COLOR_LIGHTMAGENTA, COLOR_YELLOW, COLOR_WHITE</p> +</li> +<li><p class="first"><tt class="docutils literal">dfhack.onStateChange</tt> event codes</p> +<p>Available only in the core context, as is the event itself:</p> +<p>SC_WORLD_LOADED, SC_WORLD_UNLOADED, SC_MAP_LOADED, +SC_MAP_UNLOADED, SC_VIEWSCREEN_CHANGED, SC_CORE_INITIALIZED</p> +</li> +<li><p class="first">Functions already described above</p> +<p>safecall, qerror, mkmodule, reload</p> +</li> +<li><p class="first"><tt class="docutils literal">printall(obj)</tt></p> +<p>If the argument is a lua table or DF object reference, prints all fields.</p> +</li> +<li><p class="first"><tt class="docutils literal">copyall(obj)</tt></p> +<p>Returns a shallow copy of the table or reference as a lua table.</p> +</li> +<li><p class="first"><tt class="docutils literal">pos2xyz(obj)</tt></p> +<p>The object must have fields x, y and z. Returns them as 3 values. +If obj is <em>nil</em>, or x is -30000 (the usual marker for undefined +coordinates), returns <em>nil</em>.</p> +</li> +<li><p class="first"><tt class="docutils literal">xyz2pos(x,y,z)</tt></p> +<p>Returns a table with x, y and z as fields.</p> +</li> +<li><p class="first"><tt class="docutils literal"><span class="pre">safe_index(obj,index...)</span></tt></p> +<p>Walks a sequence of dereferences, which may be represented by numbers or strings. +Returns <em>nil</em> if any of obj or indices is <em>nil</em>, or a numeric index is out of array bounds.</p> +</li> +</ul> +</div> +<div class="section" id="utils"> +<h2><a class="toc-backref" href="#id32">utils</a></h2> +<ul> +<li><p class="first"><tt class="docutils literal">utils.compare(a,b)</tt></p> +<p>Comparator function; returns <em>-1</em> if a<b, <em>1</em> if a>b, <em>0</em> otherwise.</p> +</li> +<li><p class="first"><tt class="docutils literal">utils.compare_name(a,b)</tt></p> +<p>Comparator for names; compares empty string last.</p> +</li> +<li><p class="first"><tt class="docutils literal">utils.is_container(obj)</tt></p> +<p>Checks if obj is a container ref.</p> +</li> +<li><p class="first"><tt class="docutils literal">utils.make_index_sequence(start,end)</tt></p> +<p>Returns a lua sequence of numbers in start..end.</p> +</li> +<li><p class="first"><tt class="docutils literal">utils.make_sort_order(data, ordering)</tt></p> +<p>Computes a sorted permutation of objects in data, as a table of integer +indices into the data sequence. Uses <tt class="docutils literal">data.n</tt> as input length +if present.</p> +<p>The ordering argument is a sequence of ordering specs, represented +as lua tables with following possible fields:</p> +<dl class="docutils"> +<dt>ord.key = <em>function(value)</em></dt> +<dd><p class="first last">Computes comparison key from input data value. Not called on nil. +If omitted, the comparison key is the value itself.</p> +</dd> +<dt>ord.key_table = <em>function(data)</em></dt> +<dd><p class="first last">Computes a key table from the data table in one go.</p> +</dd> +<dt>ord.compare = <em>function(a,b)</em></dt> +<dd><p class="first last">Comparison function. Defaults to <tt class="docutils literal">utils.compare</tt> above. +Called on non-nil keys; nil sorts last.</p> +</dd> +<dt>ord.nil_first = <em>true/false</em></dt> +<dd><p class="first last">If true, nil keys are sorted first instead of last.</p> +</dd> +<dt>ord.reverse = <em>true/false</em></dt> +<dd><p class="first last">If true, sort non-nil keys in descending order.</p> +</dd> +</dl> +<p>For every comparison during sorting the specs are applied in +order until an unambiguous decision is reached. Sorting is stable.</p> +<p>Example of sorting a sequence by field foo:</p> +<pre class="literal-block"> +local spec = { key = function(v) return v.foo end } +local order = utils.make_sort_order(data, { spec }) +local output = {} +for i = 1,#order do output[i] = data[order[i]] end +</pre> +<p>Separating the actual reordering of the sequence in this +way enables applying the same permutation to multiple arrays. +This function is used by the sort plugin.</p> +</li> +<li><p class="first"><tt class="docutils literal">utils.assign(tgt, src)</tt></p> +<p>Does a recursive assignment of src into tgt. +Uses <tt class="docutils literal">df.assign</tt> if tgt is a native object ref; otherwise +recurses into lua tables.</p> +</li> +<li><p class="first"><tt class="docutils literal">utils.clone(obj, deep)</tt></p> +<p>Performs a shallow, or semi-deep copy of the object as a lua table tree. +The deep mode recurses into lua tables and subobjects, except pointers +to other heap objects. +Null pointers are represented as df.NULL. Zero-based native containers +are converted to 1-based lua sequences.</p> +</li> +<li><p class="first"><tt class="docutils literal">utils.clone_with_default(obj, default, force)</tt></p> +<p>Copies the object, using the <tt class="docutils literal">default</tt> lua table tree +as a guide to which values should be skipped as uninteresting. +The <tt class="docutils literal">force</tt> argument makes it always return a non-<em>nil</em> value.</p> +</li> +<li><p class="first"><tt class="docutils literal">utils.sort_vector(vector,field,cmpfun)</tt></p> +<p>Sorts a native vector or lua sequence using the comparator function. +If <tt class="docutils literal">field</tt> is not <em>nil</em>, applies the comparator to the field instead +of the whole object.</p> +</li> +<li><p class="first"><tt class="docutils literal">utils.binsearch(vector,key,field,cmpfun,min,max)</tt></p> +<p>Does a binary search in a native vector or lua sequence for +<tt class="docutils literal">key</tt>, using <tt class="docutils literal">cmpfun</tt> and <tt class="docutils literal">field</tt> like sort_vector. +If <tt class="docutils literal">min</tt> and <tt class="docutils literal">max</tt> are specified, they are used as the +search subrange bounds.</p> +<p>If found, returns <em>item, true, idx</em>. Otherwise returns +<em>nil, false, insert_idx</em>, where <em>insert_idx</em> is the correct +insertion point.</p> +</li> +<li><p class="first"><tt class="docutils literal">utils.insert_sorted(vector,item,field,cmpfun)</tt></p> +<p>Does a binary search, and inserts item if not found. +Returns <em>did_insert, vector[idx], idx</em>.</p> +</li> +<li><p class="first"><tt class="docutils literal">utils.insert_or_update(vector,item,field,cmpfun)</tt></p> +<p>Like <tt class="docutils literal">insert_sorted</tt>, but also assigns the item into +the vector cell if insertion didn't happen.</p> +<p>As an example, you can use this to set skill values:</p> +<pre class="literal-block"> +utils.insert_or_update(soul.skills, {new=true, id=..., rating=...}, 'id') +</pre> +<p>(For an explanation of <tt class="docutils literal">new=true</tt>, see table assignment in the wrapper section)</p> +</li> +<li><p class="first"><tt class="docutils literal">utils.prompt_yes_no(prompt, default)</tt></p> +<p>Presents a yes/no prompt to the user. If <tt class="docutils literal">default</tt> is not <em>nil</em>, +allows just pressing Enter to submit the default choice. +If the user enters <tt class="docutils literal">'abort'</tt>, throws an error.</p> +</li> +<li><p class="first"><tt class="docutils literal">utils.prompt_input(prompt, checkfun, quit_str)</tt></p> +<p>Presents a prompt to input data, until a valid string is entered. +Once <tt class="docutils literal">checkfun(input)</tt> returns <em>true, ...</em>, passes the values +through. If the user enters the quit_str (defaults to <tt class="docutils literal"><span class="pre">'~~~'</span></tt>), +throws an error.</p> +</li> +<li><p class="first"><tt class="docutils literal">utils.check_number(text)</tt></p> +<p>A <tt class="docutils literal">prompt_input</tt> <tt class="docutils literal">checkfun</tt> that verifies a number input.</p> +</li> +</ul> +</div> +<div class="section" id="dumper"> +<h2><a class="toc-backref" href="#id33">dumper</a></h2> +<p>A third-party lua table dumper module from +<a class="reference external" href="http://lua-users.org/wiki/DataDumper">http://lua-users.org/wiki/DataDumper</a>. Defines one +function:</p> +<ul> +<li><p class="first"><tt class="docutils literal">dumper.DataDumper(value, varname, fastmode, ident, indent_step)</tt></p> +<p>Returns <tt class="docutils literal">value</tt> converted to a string. The <tt class="docutils literal">indent_step</tt> +argument specifies the indentation step size in spaces. For +the other arguments see the original documentation link above.</p> +</li> +</ul> +</div> </div> <div class="section" id="plugins"> -<h1><a class="toc-backref" href="#id30">Plugins</a></h1> +<h1><a class="toc-backref" href="#id34">Plugins</a></h1> <p>DFHack plugins may export native functions and events to lua contexts. They are automatically imported by <tt class="docutils literal"><span class="pre">mkmodule('plugins.<name>')</span></tt>; this means that a lua module file is still necessary for <tt class="docutils literal">require</tt> to read.</p> <p>The following plugins have lua support.</p> <div class="section" id="burrows"> -<h2><a class="toc-backref" href="#id31">burrows</a></h2> +<h2><a class="toc-backref" href="#id35">burrows</a></h2> <p>Implements extended burrow manipulations.</p> <p>Events:</p> <ul> @@ -1556,17 +1894,19 @@ set is the same as used by the command line.</p> <p>The lua module file also re-exports functions from <tt class="docutils literal">dfhack.burrows</tt>.</p> </div> <div class="section" id="sort"> -<h2><a class="toc-backref" href="#id32">sort</a></h2> +<h2><a class="toc-backref" href="#id36">sort</a></h2> <p>Does not export any native functions as of now. Instead, it calls lua code to perform the actual ordering of list items.</p> </div> </div> <div class="section" id="scripts"> -<h1><a class="toc-backref" href="#id33">Scripts</a></h1> +<h1><a class="toc-backref" href="#id37">Scripts</a></h1> <p>Any files with the .lua extension placed into hack/scripts/* are automatically used by the DFHack core as commands. The matching command name consists of the name of the file sans the extension.</p> +<p>If the first line of the script is a one-line comment, it is +used by the built-in <tt class="docutils literal">ls</tt> and <tt class="docutils literal">help</tt> commands.</p> <p><strong>NOTE:</strong> Scripts placed in subdirectories still can be accessed, but do not clutter the <tt class="docutils literal">ls</tt> command list; thus it is preferred for obscure developer-oriented scripts and scripts used by tools. @@ -1377,8 +1377,6 @@ For exemple, to grow 40 plump helmet spawn: growcrops plump 40 -This is a ruby script and needs the ruby plugin. - removebadthoughts ================= @@ -1396,8 +1394,6 @@ you unpause. With the optional ``-v`` parameter, the script will dump the negative thoughts it removed. -This is a ruby script and needs the ruby plugin. - slayrace ======== @@ -1405,16 +1401,48 @@ Kills any unit of a given race. With no argument, lists the available races. +With the special argument 'him', targets only the selected creature. + Any non-dead non-caged unit of the specified race gets its ``blood_count`` -set to 0, which means immediate death at the next game tick. May not work -on vampires and other weird creatures. +set to 0, which means immediate death at the next game tick. For creatures +such as vampires, also set animal.vanish_countdown to 2. + +An alternate mode is selected by adding a 2nd argument to the command, +``magma``. In this case, a column of 7/7 magma is generated on top of the +targets until they die (Warning: do not call on magma-safe creatures. Also, +using this mode for birds is not recommanded.) -Targets any unit on a revealed tile of the map, including ambushers. Ex: +Will target any unit on a revealed tile of the map, including ambushers. + +Ex: :: slayrace gob -To kill a single creature in the same way, you can use the following line, -after selecting the unit with the 'v' cursor: +To kill a single creature, select the unit with the 'v' cursor and: +:: + slayrace him + +To purify all elves on the map with fire (may have side-effects): +:: + slayrace elve magma + + +magmasource +=========== +Create an infinite magma source on a tile. + +This script registers a map tile as a magma source, and every 12 game ticks +that tile receives 1 new unit of flowing magma. + +Place the game cursor where you want to create the source (must be a +flow-passable tile, and not too high in the sky) and call :: - rb_eval df.unit_find.body.blood_count = 0 + magmasource here + +To add more than 1 unit everytime, call the command again. + +To delete one source, place the cursor over its tile and use ``delete-here``. +To remove all placed sources, call ``magmasource stop``. + +With no argument, this command shows an help message and list existing sources. diff --git a/depends/protobuf/CMakeLists.txt b/depends/protobuf/CMakeLists.txt index 8cd5febc..5034f00f 100644 --- a/depends/protobuf/CMakeLists.txt +++ b/depends/protobuf/CMakeLists.txt @@ -72,13 +72,13 @@ ELSE() SET(HASH_SET_CLASS hash_set)
ENDIF()
-CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/config.h.in" "${CMAKE_CURRENT_SOURCE_DIR}/config.h")
+CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/config.h.in" "${CMAKE_CURRENT_BINARY_DIR}/config.h")
SET(LIBPROTOBUF_LITE_HDRS
google/protobuf/io/coded_stream.h
google/protobuf/io/coded_stream_inl.h
google/protobuf/stubs/common.h
-config.h
+${CMAKE_CURRENT_BINARY_DIR}/config.h
google/protobuf/extension_set.h
google/protobuf/generated_message_util.h
google/protobuf/stubs/hash.h
@@ -207,6 +207,7 @@ ENDIF() INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
SET(PROTOBUF_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR})
INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIRS})
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
# Protobuf shared libraries
diff --git a/dfhack.init-example b/dfhack.init-example index 4af4246f..c9408e37 100644 --- a/dfhack.init-example +++ b/dfhack.init-example @@ -42,3 +42,9 @@ keybinding add Shift-I "job-material CINNABAR" keybinding add Shift-B "job-material COBALTITE" keybinding add Shift-O "job-material OBSIDIAN" keybinding add Shift-G "job-material GLASS_GREEN" + +# browse linked mechanisms +keybinding add Ctrl-M@dwarfmode/QueryBuilding/Some gui/mechanisms + +# browse rooms of same owner +keybinding add Alt-R@dwarfmode/QueryBuilding/Some gui/room-list.work diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt index 75485ff2..109a97e7 100644 --- a/library/CMakeLists.txt +++ b/library/CMakeLists.txt @@ -27,6 +27,7 @@ include/Core.h include/ColorText.h include/DataDefs.h include/DataIdentity.h +include/VTableInterpose.h include/LuaWrapper.h include/LuaTools.h include/Error.h @@ -53,6 +54,7 @@ SET(MAIN_SOURCES Core.cpp ColorText.cpp DataDefs.cpp +VTableInterpose.cpp LuaWrapper.cpp LuaTypes.cpp LuaTools.cpp @@ -117,6 +119,7 @@ include/modules/Maps.h include/modules/MapCache.h include/modules/Materials.h include/modules/Notes.h +include/modules/Screen.h include/modules/Translation.h include/modules/Vegetation.h include/modules/Vermin.h @@ -137,6 +140,7 @@ modules/kitchen.cpp modules/Maps.cpp modules/Materials.cpp modules/Notes.cpp +modules/Screen.cpp modules/Translation.cpp modules/Vegetation.cpp modules/Vermin.cpp @@ -330,7 +334,10 @@ install(DIRECTORY lua/ FILES_MATCHING PATTERN "*.lua") install(DIRECTORY ${dfhack_SOURCE_DIR}/scripts - DESTINATION ${DFHACK_DATA_DESTINATION}) + DESTINATION ${DFHACK_DATA_DESTINATION} + FILES_MATCHING PATTERN "*.lua" + PATTERN "*.rb" + ) # Unused for so long that it's not even relevant now... if(BUILD_DEVEL) diff --git a/library/Console-darwin.cpp b/library/Console-darwin.cpp index c547f841..86cd657a 100644 --- a/library/Console-darwin.cpp +++ b/library/Console-darwin.cpp @@ -275,7 +275,7 @@ namespace DFHack /// Reset color to default void reset_color(void) { - color(Console::COLOR_RESET); + color(COLOR_RESET); if(!rawmode) fflush(dfout_C); } diff --git a/library/Console-linux.cpp b/library/Console-linux.cpp index 6b4de736..f32fa1c2 100644 --- a/library/Console-linux.cpp +++ b/library/Console-linux.cpp @@ -62,7 +62,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // George Vulov for MacOSX #ifndef __LINUX__ -#define TEMP_FAILURE_RETRY(expr) \ +#define TMP_FAILURE_RETRY(expr) \ ({ long int _res; \ do _res = (long int) (expr); \ while (_res == -1L && errno == EINTR); \ @@ -155,7 +155,7 @@ namespace DFHack FD_ZERO(&descriptor_set); FD_SET(STDIN_FILENO, &descriptor_set); FD_SET(exit_pipe[0], &descriptor_set); - int ret = TEMP_FAILURE_RETRY( + int ret = TMP_FAILURE_RETRY( select (FD_SETSIZE,&descriptor_set, NULL, NULL, NULL) ); if(ret == -1) @@ -165,7 +165,7 @@ namespace DFHack if (FD_ISSET(STDIN_FILENO, &descriptor_set)) { // read byte from stdin - ret = TEMP_FAILURE_RETRY( + ret = TMP_FAILURE_RETRY( read(STDIN_FILENO, &out, 1) ); if(ret == -1) @@ -245,7 +245,8 @@ namespace DFHack if(rawmode) { const char * clr = "\033c\033[3J\033[H"; - ::write(STDIN_FILENO,clr,strlen(clr)); + if (::write(STDIN_FILENO,clr,strlen(clr)) == -1) + ; } else { @@ -269,13 +270,14 @@ namespace DFHack { const char * colstr = getANSIColor(index); int lstr = strlen(colstr); - ::write(STDIN_FILENO,colstr,lstr); + if (::write(STDIN_FILENO,colstr,lstr) == -1) + ; } } /// Reset color to default void reset_color(void) { - color(Console::COLOR_RESET); + color(COLOR_RESET); if(!rawmode) fflush(dfout_C); } @@ -656,7 +658,8 @@ bool Console::init(bool sharing) inited = false; return false; } - freopen("stdout.log", "w", stdout); + if (!freopen("stdout.log", "w", stdout)) + ; d = new Private(); // make our own weird streams so our IO isn't redirected d->dfout_C = fopen("/dev/tty", "w"); @@ -664,7 +667,8 @@ bool Console::init(bool sharing) clear(); d->supported_terminal = !isUnsupportedTerm() && isatty(STDIN_FILENO); // init the exit mechanism - pipe(d->exit_pipe); + if (pipe(d->exit_pipe) == -1) + ; FD_ZERO(&d->descriptor_set); FD_SET(STDIN_FILENO, &d->descriptor_set); FD_SET(d->exit_pipe[0], &d->descriptor_set); diff --git a/library/Console-windows.cpp b/library/Console-windows.cpp index d4d47303..f0cdda38 100644 --- a/library/Console-windows.cpp +++ b/library/Console-windows.cpp @@ -179,7 +179,7 @@ namespace DFHack void color(int index) { HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE); - SetConsoleTextAttribute(hConsole, index == color_ostream::COLOR_RESET ? default_attributes : index); + SetConsoleTextAttribute(hConsole, index == COLOR_RESET ? default_attributes : index); } void reset_color( void ) diff --git a/library/Core.cpp b/library/Core.cpp index 09344135..6a0dea7c 100644 --- a/library/Core.cpp +++ b/library/Core.cpp @@ -281,7 +281,7 @@ static command_result runLuaScript(color_ostream &out, std::string name, vector< return ok ? CR_OK : CR_FAILURE; } -static command_result runRubyScript(PluginManager *plug_mgr, std::string name, vector<string> &args) +static command_result runRubyScript(color_ostream &out, PluginManager *plug_mgr, std::string name, vector<string> &args) { std::string rbcmd = "$script_args = ["; for (size_t i = 0; i < args.size(); i++) @@ -290,7 +290,7 @@ static command_result runRubyScript(PluginManager *plug_mgr, std::string name, v rbcmd += "load './hack/scripts/" + name + ".rb'"; - return plug_mgr->eval_ruby(rbcmd.c_str()); + return plug_mgr->eval_ruby(out, rbcmd.c_str()); } command_result Core::runCommand(color_ostream &out, const std::string &command) @@ -358,7 +358,7 @@ command_result Core::runCommand(color_ostream &con, const std::string &first, ve continue; if (pcmd.isHotkeyCommand()) - con.color(Console::COLOR_CYAN); + con.color(COLOR_CYAN); con.print("%s: %s\n",pcmd.name.c_str(), pcmd.description.c_str()); con.reset_color(); if (!pcmd.usage.empty()) @@ -481,7 +481,7 @@ command_result Core::runCommand(color_ostream &con, const std::string &first, ve { const PluginCommand & pcmd = (plug->operator[](j)); if (pcmd.isHotkeyCommand()) - con.color(Console::COLOR_CYAN); + con.color(COLOR_CYAN); con.print(" %-22s - %s\n",pcmd.name.c_str(), pcmd.description.c_str()); con.reset_color(); } @@ -519,7 +519,7 @@ command_result Core::runCommand(color_ostream &con, const std::string &first, ve for(auto iter = out.begin();iter != out.end();iter++) { if ((*iter).recolor) - con.color(Console::COLOR_CYAN); + con.color(COLOR_CYAN); con.print(" %-22s- %s\n",(*iter).name.c_str(), (*iter).description.c_str()); con.reset_color(); } @@ -632,7 +632,7 @@ command_result Core::runCommand(color_ostream &con, const std::string &first, ve if (fileExists(filename + ".lua")) res = runLuaScript(con, first, parts); else if (plug_mgr->eval_ruby && fileExists(filename + ".rb")) - res = runRubyScript(plug_mgr, first, parts); + res = runRubyScript(con, plug_mgr, first, parts); else con.printerr("%s is not a recognized command.\n", first.c_str()); } @@ -752,6 +752,7 @@ Core::Core() misc_data_mutex=0; last_world_data_ptr = NULL; last_local_map_ptr = NULL; + last_pause_state = false; top_viewscreen = NULL; screen_window = NULL; server = NULL; @@ -1026,35 +1027,41 @@ int Core::TileUpdate() return true; } -// should always be from simulation thread! -int Core::Update() +int Core::ClaimSuspend(bool force_base) { - if(errorstate) - return -1; + auto tid = this_thread::get_id(); + lock_guard<mutex> lock(d->AccessMutex); - // Pretend this thread has suspended the core in the usual way + if (force_base || d->df_suspend_depth <= 0) { - lock_guard<mutex> lock(d->AccessMutex); - assert(d->df_suspend_depth == 0); - d->df_suspend_thread = this_thread::get_id(); - d->df_suspend_depth = 1000; - } - // Initialize the core - bool first_update = false; - - if(!started) + d->df_suspend_thread = tid; + d->df_suspend_depth = 1000000; + return 1000000; + } + else { - first_update = true; - Init(); - if(errorstate) - return -1; - Lua::Core::Reset(con, "core init"); + assert(d->df_suspend_thread == tid); + return ++d->df_suspend_depth; } +} - color_ostream_proxy out(con); +void Core::DisclaimSuspend(int level) +{ + auto tid = this_thread::get_id(); + lock_guard<mutex> lock(d->AccessMutex); + + assert(d->df_suspend_depth == level && d->df_suspend_thread == tid); + if (level == 1000000) + d->df_suspend_depth = 0; + else + --d->df_suspend_depth; +} + +void Core::doUpdate(color_ostream &out, bool first_update) +{ Lua::Core::Reset(out, "DF code execution"); if (first_update) @@ -1116,18 +1123,48 @@ int Core::Update() } } + if (df::global::pause_state) + { + if (*df::global::pause_state != last_pause_state) + { + onStateChange(out, last_pause_state ? SC_UNPAUSED : SC_PAUSED); + last_pause_state = *df::global::pause_state; + } + } + // Execute per-frame handlers onUpdate(out); - // Release the fake suspend lock + out << std::flush; +} + +// should always be from simulation thread! +int Core::Update() +{ + if(errorstate) + return -1; + + color_ostream_proxy out(con); + + // Pretend this thread has suspended the core in the usual way, + // and run various processing hooks. { - lock_guard<mutex> lock(d->AccessMutex); + CoreSuspendClaimer suspend(true); - assert(d->df_suspend_depth == 1000); - d->df_suspend_depth = 0; - } + // Initialize the core + bool first_update = false; - out << std::flush; + if(!started) + { + first_update = true; + Init(); + if(errorstate) + return -1; + Lua::Core::Reset(con, "core init"); + } + + doUpdate(out, first_update); + } // wake waiting tools // do not allow more tools to join in while we process stuff here @@ -1148,7 +1185,7 @@ int Core::Update() // destroy condition delete nc; // check lua stack depth - Lua::Core::Reset(con, "suspend"); + Lua::Core::Reset(out, "suspend"); } return 0; @@ -1188,6 +1225,7 @@ int Core::Shutdown ( void ) if(errorstate) return true; errorstate = 1; + CoreSuspendClaimer suspend; if(plug_mgr) { delete plug_mgr; @@ -1222,7 +1260,7 @@ bool Core::ncurses_wgetch(int in, int & out) // FIXME: copypasta, push into a method! if(df::global::ui && df::global::gview) { - df::viewscreen * ws = Gui::GetCurrentScreen(); + df::viewscreen * ws = Gui::getCurViewscreen(); if (strict_virtual_cast<df::viewscreen_dwarfmodest>(ws) && df::global::ui->main.mode != ui_sidebar_mode::Hotkeys && df::global::ui->main.hotkeys[idx].cmd == df::ui_hotkey::T_cmd::None) @@ -1538,6 +1576,56 @@ void ClassNameCheck::getKnownClassNames(std::vector<std::string> &names) names.push_back(*it); } +bool Process::patchMemory(void *target, const void* src, size_t count) +{ + uint8_t *sptr = (uint8_t*)target; + uint8_t *eptr = sptr + count; + + // Find the valid memory ranges + std::vector<t_memrange> ranges; + getMemRanges(ranges); + + unsigned start = 0; + while (start < ranges.size() && ranges[start].end <= sptr) + start++; + if (start >= ranges.size() || ranges[start].start > sptr) + return false; + + unsigned end = start+1; + while (end < ranges.size() && ranges[end].start < eptr) + { + if (ranges[end].start != ranges[end-1].end) + return false; + end++; + } + if (ranges[end-1].end < eptr) + return false; + + // Verify current permissions + for (unsigned i = start; i < end; i++) + if (!ranges[i].valid || !(ranges[i].read || ranges[i].execute) || ranges[i].shared) + return false; + + // Apply writable permissions & update + bool ok = true; + + for (unsigned i = start; i < end && ok; i++) + { + t_memrange perms = ranges[i]; + perms.write = perms.read = true; + if (!setPermisions(perms, perms)) + ok = false; + } + + if (ok) + memmove(target, src, count); + + for (unsigned i = start; i < end && ok; i++) + setPermisions(ranges[i], ranges[i]); + + return ok; +} + /******************************************************************************* M O D U L E S *******************************************************************************/ diff --git a/library/DataDefs.cpp b/library/DataDefs.cpp index 7f0bacc9..d6604cdb 100644 --- a/library/DataDefs.cpp +++ b/library/DataDefs.cpp @@ -35,6 +35,7 @@ distribution. // must be last due to MS stupidity #include "DataDefs.h" #include "DataIdentity.h" +#include "VTableInterpose.h" #include "MiscUtils.h" @@ -214,6 +215,13 @@ virtual_identity::virtual_identity(size_t size, TAllocateFn alloc, { } +virtual_identity::~virtual_identity() +{ + // Remove interpose entries, so that they don't try accessing this object later + for (int i = interpose_list.size()-1; i >= 0; i--) + interpose_list[i]->remove(); +} + /* Vtable name to identity lookup. */ static std::map<std::string, virtual_identity*> name_lookup; diff --git a/library/LuaApi.cpp b/library/LuaApi.cpp index b0a085ec..00d4c517 100644 --- a/library/LuaApi.cpp +++ b/library/LuaApi.cpp @@ -39,6 +39,7 @@ distribution. #include "modules/World.h" #include "modules/Gui.h" +#include "modules/Screen.h" #include "modules/Job.h" #include "modules/Translation.h" #include "modules/Units.h" @@ -84,6 +85,8 @@ distribution. using namespace DFHack; using namespace DFHack::LuaWrapper; +using Screen::Pen; + void dfhack_printerr(lua_State *S, const std::string &str); void Lua::Push(lua_State *state, const Units::NoblePosition &pos) @@ -179,6 +182,68 @@ static df::coord CheckCoordXYZ(lua_State *state, int base, bool vararg = false) return p; } +template<class T> +static bool get_int_field(lua_State *L, T *pf, int idx, const char *name, int defval) +{ + lua_getfield(L, idx, name); + bool nil = lua_isnil(L, -1); + if (nil) *pf = T(defval); + else if (lua_isnumber(L, -1)) *pf = T(lua_tointeger(L, -1)); + else luaL_error(L, "Field %s is not a number.", name); + lua_pop(L, 1); + return !nil; +} + +static bool get_char_field(lua_State *L, char *pf, int idx, const char *name, char defval) +{ + lua_getfield(L, idx, name); + + if (lua_type(L, -1) == LUA_TSTRING) + { + *pf = lua_tostring(L, -1)[0]; + lua_pop(L, 1); + return true; + } + else + { + lua_pop(L, 1); + return get_int_field(L, pf, idx, name, defval); + } +} + +static void decode_pen(lua_State *L, Pen &pen, int idx) +{ + idx = lua_absindex(L, idx); + + get_char_field(L, &pen.ch, idx, "ch", 0); + + get_int_field(L, &pen.fg, idx, "fg", 7); + get_int_field(L, &pen.bg, idx, "bg", 0); + + lua_getfield(L, idx, "bold"); + if (lua_isnil(L, -1)) + { + pen.bold = (pen.fg & 8) != 0; + pen.fg &= 7; + } + else pen.bold = lua_toboolean(L, -1); + lua_pop(L, 1); + + get_int_field(L, &pen.tile, idx, "tile", 0); + + bool tcolor = get_int_field(L, &pen.tile_fg, idx, "tile_fg", 7); + tcolor = get_int_field(L, &pen.tile_bg, idx, "tile_bg", 0) || tcolor; + + if (tcolor) + pen.tile_mode = Pen::TileColor; + else + { + lua_getfield(L, idx, "tile_color"); + pen.tile_mode = (lua_toboolean(L, -1) ? Pen::CharColor : Pen::AsIs); + lua_pop(L, 1); + } +} + /************************************************** * Per-world persistent configuration storage API * **************************************************/ @@ -684,6 +749,7 @@ static const LuaWrapper::FunctionReg dfhack_module[] = { static const LuaWrapper::FunctionReg dfhack_gui_module[] = { WRAPM(Gui, getCurViewscreen), WRAPM(Gui, getFocusString), + WRAPM(Gui, getCurFocus), WRAPM(Gui, getSelectedWorkshopJob), WRAPM(Gui, getSelectedJob), WRAPM(Gui, getSelectedUnit), @@ -749,6 +815,8 @@ static const LuaWrapper::FunctionReg dfhack_units_module[] = { WRAPM(Units, getAge), WRAPM(Units, getProfessionName), WRAPM(Units, getCasteProfessionName), + WRAPM(Units, getProfessionColor), + WRAPM(Units, getCasteProfessionColor), { NULL, NULL } }; @@ -919,6 +987,7 @@ static bool buildings_containsTile(df::building *bld, int x, int y, bool room) { } static const LuaWrapper::FunctionReg dfhack_buildings_module[] = { + WRAPM(Buildings, setOwner), WRAPM(Buildings, allocInstance), WRAPM(Buildings, checkFreeTiles), WRAPM(Buildings, countExtentTiles), @@ -1019,6 +1088,164 @@ static const luaL_Reg dfhack_constructions_funcs[] = { { NULL, NULL } }; +/***** Screen module *****/ + +static const LuaWrapper::FunctionReg dfhack_screen_module[] = { + WRAPM(Screen, inGraphicsMode), + WRAPM(Screen, clear), + WRAPM(Screen, invalidate), + { NULL, NULL } +}; + +static int screen_getMousePos(lua_State *L) +{ + auto pos = Screen::getMousePos(); + lua_pushinteger(L, pos.x); + lua_pushinteger(L, pos.y); + return 2; +} + +static int screen_getWindowSize(lua_State *L) +{ + auto pos = Screen::getWindowSize(); + lua_pushinteger(L, pos.x); + lua_pushinteger(L, pos.y); + return 2; +} + +static int screen_paintTile(lua_State *L) +{ + Pen pen; + decode_pen(L, pen, 1); + int x = luaL_checkint(L, 2); + int y = luaL_checkint(L, 3); + if (lua_gettop(L) >= 4 && !lua_isnil(L, 4)) + { + if (lua_type(L, 4) == LUA_TSTRING) + pen.ch = lua_tostring(L, 4)[0]; + else + pen.ch = luaL_checkint(L, 4); + } + if (lua_gettop(L) >= 5 && !lua_isnil(L, 5)) + pen.tile = luaL_checkint(L, 5); + lua_pushboolean(L, Screen::paintTile(pen, x, y)); + return 1; +} + +static int screen_paintString(lua_State *L) +{ + Pen pen; + decode_pen(L, pen, 1); + int x = luaL_checkint(L, 2); + int y = luaL_checkint(L, 3); + const char *text = luaL_checkstring(L, 4); + lua_pushboolean(L, Screen::paintString(pen, x, y, text)); + return 1; +} + +static int screen_fillRect(lua_State *L) +{ + Pen pen; + decode_pen(L, pen, 1); + int x1 = luaL_checkint(L, 2); + int y1 = luaL_checkint(L, 3); + int x2 = luaL_checkint(L, 4); + int y2 = luaL_checkint(L, 5); + lua_pushboolean(L, Screen::fillRect(pen, x1, y1, x2, y2)); + return 1; +} + +static int screen_findGraphicsTile(lua_State *L) +{ + auto str = luaL_checkstring(L, 1); + int x = luaL_checkint(L, 2); + int y = luaL_checkint(L, 3); + int tile, tile_gs; + if (Screen::findGraphicsTile(str, x, y, &tile, &tile_gs)) + { + lua_pushinteger(L, tile); + lua_pushinteger(L, tile_gs); + return 2; + } + else + { + lua_pushnil(L); + return 1; + } +} + +namespace { + +int screen_show(lua_State *L) +{ + df::viewscreen *before = NULL; + if (lua_gettop(L) >= 2) + before = Lua::CheckDFObject<df::viewscreen>(L, 2); + + df::viewscreen *screen = dfhack_lua_viewscreen::get_pointer(L, 1, true); + + bool ok = Screen::show(screen, before); + + // If it is a table, get_pointer created a new object. Don't leak it. + if (!ok && lua_istable(L, 1)) + delete screen; + + lua_pushboolean(L, ok); + return 1; +} + +static int screen_dismiss(lua_State *L) +{ + df::viewscreen *screen = dfhack_lua_viewscreen::get_pointer(L, 1, false); + Screen::dismiss(screen); + return 0; +} + +static int screen_isDismissed(lua_State *L) +{ + df::viewscreen *screen = dfhack_lua_viewscreen::get_pointer(L, 1, false); + lua_pushboolean(L, Screen::isDismissed(screen)); + return 1; +} + +static int screen_doSimulateInput(lua_State *L) +{ + auto screen = Lua::CheckDFObject<df::viewscreen>(L, 1); + luaL_checktype(L, 2, LUA_TTABLE); + + if (!screen) + luaL_argerror(L, 1, "NULL screen"); + + int sz = lua_rawlen(L, 2); + std::set<df::interface_key> keys; + + for (int j = 1; j <= sz; j++) + { + lua_rawgeti(L, 2, j); + keys.insert((df::interface_key)lua_tointeger(L, -1)); + lua_pop(L, 1); + } + + screen->feed(&keys); + return 0; +} + +} + +static const luaL_Reg dfhack_screen_funcs[] = { + { "getMousePos", screen_getMousePos }, + { "getWindowSize", screen_getWindowSize }, + { "paintTile", screen_paintTile }, + { "paintString", screen_paintString }, + { "fillRect", screen_fillRect }, + { "findGraphicsTile", screen_findGraphicsTile }, + { "show", &Lua::CallWithCatchWrapper<screen_show> }, + { "dismiss", screen_dismiss }, + { "isDismissed", screen_isDismissed }, + { "_doSimulateInput", screen_doSimulateInput }, + { NULL, NULL } +}; + /***** Internal module *****/ static void *checkaddr(lua_State *L, int idx, bool allow_null = false) @@ -1124,6 +1351,17 @@ static int internal_getMemRanges(lua_State *L) return 1; } +static int internal_patchMemory(lua_State *L) +{ + void *dest = checkaddr(L, 1); + void *src = checkaddr(L, 2); + int size = luaL_checkint(L, 3); + if (size < 0) luaL_argerror(L, 1, "negative size"); + bool ok = Core::getInstance().p->patchMemory(dest, src, size); + lua_pushboolean(L, ok); + return 1; +} + static int internal_memmove(lua_State *L) { void *dest = checkaddr(L, 1); @@ -1214,6 +1452,7 @@ static const luaL_Reg dfhack_internal_funcs[] = { { "setAddress", internal_setAddress }, { "getVTable", internal_getVTable }, { "getMemRanges", internal_getMemRanges }, + { "patchMemory", internal_patchMemory }, { "memmove", internal_memmove }, { "memcmp", internal_memcmp }, { "memscan", internal_memscan }, @@ -1240,5 +1479,6 @@ void OpenDFHackApi(lua_State *state) OpenModule(state, "burrows", dfhack_burrows_module, dfhack_burrows_funcs); OpenModule(state, "buildings", dfhack_buildings_module, dfhack_buildings_funcs); OpenModule(state, "constructions", dfhack_constructions_module); + OpenModule(state, "screen", dfhack_screen_module, dfhack_screen_funcs); OpenModule(state, "internal", dfhack_internal_module, dfhack_internal_funcs); } diff --git a/library/LuaTools.cpp b/library/LuaTools.cpp index 28571a0f..7c2c8f8d 100644 --- a/library/LuaTools.cpp +++ b/library/LuaTools.cpp @@ -68,6 +68,11 @@ lua_State *DFHack::Lua::Core::State = NULL; void dfhack_printerr(lua_State *S, const std::string &str); +inline bool is_null_userdata(lua_State *L, int idx) +{ + return lua_islightuserdata(L, idx) && !lua_touserdata(L, idx); +} + inline void AssertCoreSuspend(lua_State *state) { assert(!Lua::IsCoreContext(state) || DFHack::Core::getInstance().isSuspended()); @@ -252,7 +257,7 @@ static int lua_dfhack_color(lua_State *S) { int cv = luaL_optint(S, 1, -1); - if (cv < -1 || cv > color_ostream::COLOR_MAX) + if (cv < -1 || cv > COLOR_MAX) luaL_argerror(S, 1, "invalid color value"); color_ostream *out = Lua::GetOutput(S); @@ -1244,14 +1249,123 @@ static const luaL_Reg dfhack_coro_funcs[] = { static int DFHACK_EVENT_META_TOKEN = 0; -int DFHack::Lua::NewEvent(lua_State *state) +namespace { + struct EventObject { + int item_count; + Lua::Event::Owner *owner; + }; +} + +void DFHack::Lua::Event::New(lua_State *state, Owner *owner) { - lua_newtable(state); + auto obj = (EventObject *)lua_newuserdata(state, sizeof(EventObject)); + obj->item_count = 0; + obj->owner = owner; + lua_rawgetp(state, LUA_REGISTRYINDEX, &DFHACK_EVENT_META_TOKEN); lua_setmetatable(state, -2); + lua_newtable(state); + lua_setuservalue(state, -2); +} + +void DFHack::Lua::Event::SetPrivateCallback(lua_State *L, int event) +{ + lua_getuservalue(L, event); + lua_swap(L); + lua_rawsetp(L, -2, NULL); + lua_pop(L, 1); +} + +static int dfhack_event_new(lua_State *L) +{ + Lua::Event::New(L); return 1; } +static int dfhack_event_len(lua_State *L) +{ + luaL_checktype(L, 1, LUA_TUSERDATA); + auto obj = (EventObject *)lua_touserdata(L, 1); + lua_pushinteger(L, obj->item_count); + return 1; +} + +static int dfhack_event_tostring(lua_State *L) +{ + luaL_checktype(L, 1, LUA_TUSERDATA); + auto obj = (EventObject *)lua_touserdata(L, 1); + lua_pushfstring(L, "<event: %d listeners>", obj->item_count); + return 1; +} + +static int dfhack_event_index(lua_State *L) +{ + luaL_checktype(L, 1, LUA_TUSERDATA); + lua_getuservalue(L, 1); + lua_pushvalue(L, 2); + lua_rawget(L, -2); + return 1; +} + +static int dfhack_event_next(lua_State *L) +{ + luaL_checktype(L, 1, LUA_TUSERDATA); + lua_getuservalue(L, 1); + lua_pushvalue(L, 2); + while (lua_next(L, -2)) + { + if (is_null_userdata(L, -2)) + lua_pop(L, 1); + else + return 2; + } + lua_pushnil(L); + return 1; +} + +static int dfhack_event_pairs(lua_State *L) +{ + luaL_checktype(L, 1, LUA_TUSERDATA); + lua_pushcfunction(L, dfhack_event_next); + lua_pushvalue(L, 1); + lua_pushnil(L); + return 3; +} + +static int dfhack_event_newindex(lua_State *L) +{ + luaL_checktype(L, 1, LUA_TUSERDATA); + if (is_null_userdata(L, 2)) + luaL_argerror(L, 2, "Key NULL is reserved in events."); + + lua_settop(L, 3); + lua_getuservalue(L, 1); + bool new_nil = lua_isnil(L, 3); + + lua_pushvalue(L, 2); + lua_rawget(L, 4); + bool old_nil = lua_isnil(L, -1); + lua_settop(L, 4); + + lua_pushvalue(L, 2); + lua_pushvalue(L, 3); + lua_rawset(L, 4); + + int delta = 0; + if (old_nil && !new_nil) delta = 1; + else if (new_nil && !old_nil) delta = -1; + + if (delta != 0) + { + auto obj = (EventObject *)lua_touserdata(L, 1); + obj->item_count += delta; + if (obj->owner) + obj->owner->on_count_changed(obj->item_count, delta); + } + + return 0; +} + static void do_invoke_event(lua_State *L, int argbase, int num_args, int errorfun) { for (int i = 0; i < num_args; i++) @@ -1292,7 +1406,7 @@ static void dfhack_event_invoke(lua_State *L, int base, bool from_c) while (lua_next(L, event)) { // Skip the NULL key in the main loop - if (lua_islightuserdata(L, -2) && !lua_touserdata(L, -2)) + if (is_null_userdata(L, -2)) lua_pop(L, 1); else do_invoke_event(L, argbase, num_args, errorfun); @@ -1303,14 +1417,20 @@ static void dfhack_event_invoke(lua_State *L, int base, bool from_c) static int dfhack_event_call(lua_State *state) { - luaL_checktype(state, 1, LUA_TTABLE); + luaL_checktype(state, 1, LUA_TUSERDATA); luaL_checkstack(state, lua_gettop(state)+2, "stack overflow in event dispatch"); + auto obj = (EventObject *)lua_touserdata(state, 1); + if (obj->owner) + obj->owner->on_invoked(state, lua_gettop(state)-1, false); + + lua_getuservalue(state, 1); + lua_replace(state, 1); dfhack_event_invoke(state, 0, false); return 0; } -void DFHack::Lua::InvokeEvent(color_ostream &out, lua_State *state, void *key, int num_args) +void DFHack::Lua::Event::Invoke(color_ostream &out, lua_State *state, void *key, int num_args) { AssertCoreSuspend(state); @@ -1325,7 +1445,7 @@ void DFHack::Lua::InvokeEvent(color_ostream &out, lua_State *state, void *key, i lua_rawgetp(state, LUA_REGISTRYINDEX, key); - if (!lua_istable(state, -1)) + if (!lua_isuserdata(state, -1)) { if (!lua_isnil(state, -1)) out.printerr("Invalid event object in Lua::InvokeEvent"); @@ -1333,22 +1453,29 @@ void DFHack::Lua::InvokeEvent(color_ostream &out, lua_State *state, void *key, i return; } + auto obj = (EventObject *)lua_touserdata(state, -1); lua_insert(state, base+1); + if (obj->owner) + obj->owner->on_invoked(state, num_args, true); + + lua_getuservalue(state, base+1); + lua_replace(state, base+1); + color_ostream *cur_out = Lua::GetOutput(state); set_dfhack_output(state, &out); dfhack_event_invoke(state, base, true); set_dfhack_output(state, cur_out); } -void DFHack::Lua::MakeEvent(lua_State *state, void *key) +void DFHack::Lua::Event::Make(lua_State *state, void *key, Owner *owner) { lua_rawgetp(state, LUA_REGISTRYINDEX, key); if (lua_isnil(state, -1)) { lua_pop(state, 1); - NewEvent(state); + New(state, owner); } lua_dup(state); @@ -1358,7 +1485,7 @@ void DFHack::Lua::MakeEvent(lua_State *state, void *key) void DFHack::Lua::Notification::invoke(color_ostream &out, int nargs) { assert(state); - InvokeEvent(out, state, key, nargs); + Event::Invoke(out, state, key, nargs); } void DFHack::Lua::Notification::bind(lua_State *state, void *key) @@ -1369,12 +1496,12 @@ void DFHack::Lua::Notification::bind(lua_State *state, void *key) void DFHack::Lua::Notification::bind(lua_State *state, const char *name) { - MakeEvent(state, this); + Event::Make(state, this); if (handler) { PushFunctionWrapper(state, 0, name, handler); - lua_rawsetp(state, -2, NULL); + Event::SetPrivateCallback(state, -2); } this->state = state; @@ -1435,11 +1562,26 @@ lua_State *DFHack::Lua::Open(color_ostream &out, lua_State *state) lua_newtable(state); lua_pushcfunction(state, dfhack_event_call); lua_setfield(state, -2, "__call"); - lua_pushcfunction(state, Lua::NewEvent); - lua_setfield(state, -2, "new"); + lua_pushcfunction(state, dfhack_event_len); + lua_setfield(state, -2, "__len"); + lua_pushcfunction(state, dfhack_event_tostring); + lua_setfield(state, -2, "__tostring"); + lua_pushcfunction(state, dfhack_event_index); + lua_setfield(state, -2, "__index"); + lua_pushcfunction(state, dfhack_event_newindex); + lua_setfield(state, -2, "__newindex"); + lua_pushcfunction(state, dfhack_event_pairs); + lua_setfield(state, -2, "__pairs"); lua_dup(state); lua_rawsetp(state, LUA_REGISTRYINDEX, &DFHACK_EVENT_META_TOKEN); - lua_setfield(state, -2, "event"); + + lua_newtable(state); + lua_pushcfunction(state, dfhack_event_new); + lua_setfield(state, -2, "new"); + lua_dup(state); + lua_setfield(state, -3, "__metatable"); + lua_setfield(state, -3, "event"); + lua_pop(state, 1); // Initialize the dfhack global luaL_setfuncs(state, dfhack_funcs, 0); @@ -1599,7 +1741,7 @@ void DFHack::Lua::Core::onStateChange(color_ostream &out, int code) { } Lua::Push(State, code); - Lua::InvokeEvent(out, State, (void*)onStateChange, 1); + Lua::Event::Invoke(out, State, (void*)onStateChange, 1); } static void run_timers(color_ostream &out, lua_State *L, @@ -1653,7 +1795,7 @@ void DFHack::Lua::Core::Init(color_ostream &out) // Register events lua_rawgetp(State, LUA_REGISTRYINDEX, &DFHACK_DFHACK_TOKEN); - MakeEvent(State, (void*)onStateChange); + Event::Make(State, (void*)onStateChange); lua_setfield(State, -2, "onStateChange"); lua_pushcfunction(State, dfhack_timeout); diff --git a/library/LuaTypes.cpp b/library/LuaTypes.cpp index 8548c5d0..e7197796 100644 --- a/library/LuaTypes.cpp +++ b/library/LuaTypes.cpp @@ -37,6 +37,7 @@ distribution. #include "DataDefs.h" #include "DataIdentity.h" #include "LuaWrapper.h" +#include "LuaTools.h" #include "DataFuncs.h" #include "MiscUtils.h" @@ -285,6 +286,9 @@ void container_identity::lua_item_read(lua_State *state, int fname_idx, void *pt void container_identity::lua_item_write(lua_State *state, int fname_idx, void *ptr, int idx, int val_index) { + if (is_readonly()) + field_error(state, fname_idx, "container is read-only", "write"); + auto id = (type_identity*)lua_touserdata(state, UPVAL_ITEM_ID); void *pitem = item_pointer(id, ptr, idx); id->lua_write(state, fname_idx, pitem, val_index); @@ -1064,6 +1068,27 @@ int LuaWrapper::method_wrapper_core(lua_State *state, function_identity_base *id return 1; } +int Lua::CallWithCatch(lua_State *state, int (*fn)(lua_State*), const char *context) +{ + if (!context) + context = "native code"; + + try { + return fn(state); + } + catch (Error::NullPointer &e) { + const char *vn = e.varname(); + return luaL_error(state, "%s: NULL pointer: %s", context, vn ? vn : "?"); + } + catch (Error::InvalidArgument &e) { + const char *vn = e.expr(); + return luaL_error(state, "%s: Invalid argument; expected: %s", context, vn ? vn : "?"); + } + catch (std::exception &e) { + return luaL_error(state, "%s: C++ exception: %s", context, e.what()); + } +} + /** * Push a closure invoking the given function. */ diff --git a/library/PluginManager.cpp b/library/PluginManager.cpp index a314883e..d8b9ff27 100644 --- a/library/PluginManager.cpp +++ b/library/PluginManager.cpp @@ -108,6 +108,50 @@ struct Plugin::RefAutoinc ~RefAutoinc(){ lock->lock_sub(); }; }; +struct Plugin::LuaCommand { + Plugin *owner; + std::string name; + int (*command)(lua_State *state); + + LuaCommand(Plugin *owner, std::string name) + : owner(owner), name(name), command(NULL) {} +}; + +struct Plugin::LuaFunction { + Plugin *owner; + std::string name; + function_identity_base *identity; + bool silent; + + LuaFunction(Plugin *owner, std::string name) + : owner(owner), name(name), identity(NULL), silent(false) {} +}; + +struct Plugin::LuaEvent : public Lua::Event::Owner { + LuaFunction handler; + Lua::Notification *event; + bool active; + int count; + + LuaEvent(Plugin *owner, std::string name) + : handler(owner,name), event(NULL), active(false), count(0) + { + handler.silent = true; + } + + void on_count_changed(int new_cnt, int delta) { + RefAutoinc lock(handler.owner->access); + count = new_cnt; + if (event) + event->on_count_changed(new_cnt, delta); + } + void on_invoked(lua_State *state, int nargs, bool from_c) { + RefAutoinc lock(handler.owner->access); + if (event) + event->on_invoked(state, nargs, from_c); + } +}; + Plugin::Plugin(Core * core, const std::string & filepath, const std::string & _filename, PluginManager * pm) { filename = filepath; @@ -151,6 +195,9 @@ bool Plugin::load(color_ostream &con) { return true; } + // enter suspend + CoreSuspender suspend; + // open the library, etc DFLibrary * plug = OpenPlugin(filename.c_str()); if(!plug) { @@ -188,7 +235,7 @@ bool Plugin::load(color_ostream &con) plugin_shutdown = (command_result (*)(color_ostream &)) LookupPlugin(plug, "plugin_shutdown"); plugin_onstatechange = (command_result (*)(color_ostream &, state_change_event)) LookupPlugin(plug, "plugin_onstatechange"); plugin_rpcconnect = (RPCService* (*)(color_ostream &)) LookupPlugin(plug, "plugin_rpcconnect"); - plugin_eval_ruby = (command_result (*)(const char*)) LookupPlugin(plug, "plugin_eval_ruby"); + plugin_eval_ruby = (command_result (*)(color_ostream &, const char*)) LookupPlugin(plug, "plugin_eval_ruby"); index_lua(plug); this->name = *plug_name; plugin_lib = plug; @@ -226,6 +273,8 @@ bool Plugin::unload(color_ostream &con) } // wait for all calls to finish access->wait(); + // enter suspend + CoreSuspender suspend; // notify plugin about shutdown, if it has a shutdown function command_result cr = CR_OK; if(plugin_shutdown) @@ -439,7 +488,11 @@ void Plugin::index_lua(DFLibrary *lib) cmd->handler.identity = evlist->event->get_handler(); cmd->event = evlist->event; if (cmd->active) + { cmd->event->bind(Lua::Core::State, cmd); + if (cmd->count > 0) + cmd->event->on_count_changed(cmd->count, 0); + } } } } @@ -467,7 +520,7 @@ int Plugin::lua_cmd_wrapper(lua_State *state) luaL_error(state, "plugin command %s() has been unloaded", (cmd->owner->name+"."+cmd->name).c_str()); - return cmd->command(state); + return Lua::CallWithCatch(state, cmd->command, cmd->name.c_str()); } int Plugin::lua_fun_wrapper(lua_State *state) @@ -477,8 +530,13 @@ int Plugin::lua_fun_wrapper(lua_State *state) RefAutoinc lock(cmd->owner->access); if (!cmd->identity) + { + if (cmd->silent) + return 0; + luaL_error(state, "plugin function %s() has been unloaded", (cmd->owner->name+"."+cmd->name).c_str()); + } return LuaWrapper::method_wrapper_core(state, cmd->identity); } @@ -506,14 +564,14 @@ void Plugin::open_lua(lua_State *state, int table) { for (auto it = lua_events.begin(); it != lua_events.end(); ++it) { - Lua::MakeEvent(state, it->second); + Lua::Event::Make(state, it->second, it->second); push_function(state, &it->second->handler); - lua_rawsetp(state, -2, NULL); + Lua::Event::SetPrivateCallback(state, -2); it->second->active = true; if (it->second->event) - it->second->event->bind(state, it->second); + it->second->event->bind(Lua::Core::State, it->second); lua_setfield(state, table, it->first.c_str()); } diff --git a/library/VTableInterpose.cpp b/library/VTableInterpose.cpp new file mode 100644 index 00000000..3725ccba --- /dev/null +++ b/library/VTableInterpose.cpp @@ -0,0 +1,249 @@ +/* +https://github.com/peterix/dfhack +Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com) + +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. +*/ + +#include "Internal.h" + +#include <string> +#include <vector> +#include <map> + +#include "MemAccess.h" +#include "Core.h" +#include "VersionInfo.h" +#include "VTableInterpose.h" + +#include "MiscUtils.h" + +using namespace DFHack; + +/* + * Code for accessing method pointers directly. Very compiler-specific. + */ + +#if defined(_MSC_VER) + +struct MSVC_MPTR { + void *method; + intptr_t this_shift; +}; + +bool DFHack::is_vmethod_pointer_(void *pptr) +{ + auto pobj = (MSVC_MPTR*)pptr; + if (!pobj->method) return false; + + // MSVC implements pointers to vmethods via thunks. + // This expects that they all follow a very specific pattern. + auto pval = (unsigned*)pobj->method; + switch (pval[0]) { + case 0x20FF018BU: // mov eax, [ecx]; jmp [eax] + case 0x60FF018BU: // mov eax, [ecx]; jmp [eax+0x??] + case 0xA0FF018BU: // mov eax, [ecx]; jmp [eax+0x????????] + return true; + default: + return false; + } +} + +int DFHack::vmethod_pointer_to_idx_(void *pptr) +{ + auto pobj = (MSVC_MPTR*)pptr; + if (!pobj->method || pobj->this_shift != 0) return -1; + + auto pval = (unsigned*)pobj->method; + switch (pval[0]) { + case 0x20FF018BU: // mov eax, [ecx]; jmp [eax] + return 0; + case 0x60FF018BU: // mov eax, [ecx]; jmp [eax+0x??] + return ((int8_t)pval[1])/sizeof(void*); + case 0xA0FF018BU: // mov eax, [ecx]; jmp [eax+0x????????] + return ((int32_t)pval[1])/sizeof(void*); + default: + return -1; + } +} + +void* DFHack::method_pointer_to_addr_(void *pptr) +{ + if (is_vmethod_pointer_(pptr)) return NULL; + auto pobj = (MSVC_MPTR*)pptr; + return pobj->method; +} + +void DFHack::addr_to_method_pointer_(void *pptr, void *addr) +{ + auto pobj = (MSVC_MPTR*)pptr; + pobj->method = addr; + pobj->this_shift = 0; +} + +#elif defined(__GXX_ABI_VERSION) + +struct GCC_MPTR { + intptr_t method; + intptr_t this_shift; +}; + +bool DFHack::is_vmethod_pointer_(void *pptr) +{ + auto pobj = (GCC_MPTR*)pptr; + return (pobj->method & 1) != 0; +} + +int DFHack::vmethod_pointer_to_idx_(void *pptr) +{ + auto pobj = (GCC_MPTR*)pptr; + if ((pobj->method & 1) == 0 || pobj->this_shift != 0) + return -1; + return (pobj->method-1)/sizeof(void*); +} + +void* DFHack::method_pointer_to_addr_(void *pptr) +{ + auto pobj = (GCC_MPTR*)pptr; + if ((pobj->method & 1) != 0 || pobj->this_shift != 0) + return NULL; + return (void*)pobj->method; +} + +void DFHack::addr_to_method_pointer_(void *pptr, void *addr) +{ + auto pobj = (GCC_MPTR*)pptr; + pobj->method = (intptr_t)addr; + pobj->this_shift = 0; +} + +#else +#error Unknown compiler type +#endif + +void *virtual_identity::get_vmethod_ptr(int idx) +{ + assert(idx >= 0); + void **vtable = (void**)vtable_ptr; + if (!vtable) return NULL; + return vtable[idx]; +} + +bool virtual_identity::set_vmethod_ptr(int idx, void *ptr) +{ + assert(idx >= 0); + void **vtable = (void**)vtable_ptr; + if (!vtable) return NULL; + return Core::getInstance().p->patchMemory(&vtable[idx], &ptr, sizeof(void*)); +} + +void VMethodInterposeLinkBase::set_chain(void *chain) +{ + saved_chain = chain; + addr_to_method_pointer_(chain_mptr, chain); +} + +VMethodInterposeLinkBase::VMethodInterposeLinkBase(virtual_identity *host, int vmethod_idx, void *interpose_method, void *chain_mptr) + : host(host), vmethod_idx(vmethod_idx), interpose_method(interpose_method), chain_mptr(chain_mptr), + saved_chain(NULL), next(NULL), prev(NULL) +{ + if (vmethod_idx < 0 || interpose_method == NULL) + { + fprintf(stderr, "Bad VMethodInterposeLinkBase arguments: %d %08x\n", + vmethod_idx, unsigned(interpose_method)); + fflush(stderr); + abort(); + } +} + +VMethodInterposeLinkBase::~VMethodInterposeLinkBase() +{ + if (is_applied()) + remove(); +} + +bool VMethodInterposeLinkBase::apply() +{ + if (is_applied()) + return true; + if (!host->vtable_ptr) + return false; + + // Retrieve the current vtable entry + void *old_ptr = host->get_vmethod_ptr(vmethod_idx); + assert(old_ptr != NULL); + + // Check if there are other interpose entries for the same slot + VMethodInterposeLinkBase *old_link = NULL; + + for (int i = host->interpose_list.size()-1; i >= 0; i--) + { + if (host->interpose_list[i]->vmethod_idx != vmethod_idx) + continue; + + old_link = host->interpose_list[i]; + assert(old_link->next == NULL && old_ptr == old_link->interpose_method); + break; + } + + // Apply the new method ptr + if (!host->set_vmethod_ptr(vmethod_idx, interpose_method)) + return false; + + set_chain(old_ptr); + host->interpose_list.push_back(this); + + // Link into the chain if any + if (old_link) + { + old_link->next = this; + prev = old_link; + } + + return true; +} + +void VMethodInterposeLinkBase::remove() +{ + if (!is_applied()) + return; + + // Remove from the list in the identity + for (int i = host->interpose_list.size()-1; i >= 0; i--) + if (host->interpose_list[i] == this) + vector_erase_at(host->interpose_list, i); + + // Remove from the chain + if (prev) + prev->next = next; + + if (next) + { + next->set_chain(saved_chain); + next->prev = prev; + } + else + { + host->set_vmethod_ptr(vmethod_idx, saved_chain); + } + + prev = next = NULL; + set_chain(NULL); +} diff --git a/library/include/ColorText.h b/library/include/ColorText.h index 0cc286dc..50d1f362 100644 --- a/library/include/ColorText.h +++ b/library/include/ColorText.h @@ -41,30 +41,32 @@ namespace dfproto namespace DFHack { + enum color_value + { + COLOR_RESET = -1, + COLOR_BLACK = 0, + COLOR_BLUE, + COLOR_GREEN, + COLOR_CYAN, + COLOR_RED, + COLOR_MAGENTA, + COLOR_BROWN, + COLOR_GREY, + COLOR_DARKGREY, + COLOR_LIGHTBLUE, + COLOR_LIGHTGREEN, + COLOR_LIGHTCYAN, + COLOR_LIGHTRED, + COLOR_LIGHTMAGENTA, + COLOR_YELLOW, + COLOR_WHITE, + COLOR_MAX = COLOR_WHITE + }; + class DFHACK_EXPORT color_ostream : public std::ostream { public: - enum color_value - { - COLOR_RESET = -1, - COLOR_BLACK = 0, - COLOR_BLUE, - COLOR_GREEN, - COLOR_CYAN, - COLOR_RED, - COLOR_MAGENTA, - COLOR_BROWN, - COLOR_GREY, - COLOR_DARKGREY, - COLOR_LIGHTBLUE, - COLOR_LIGHTGREEN, - COLOR_LIGHTCYAN, - COLOR_LIGHTRED, - COLOR_LIGHTMAGENTA, - COLOR_YELLOW, - COLOR_WHITE, - COLOR_MAX = COLOR_WHITE - }; + typedef DFHack::color_value color_value; private: color_value cur_color; diff --git a/library/include/Core.h b/library/include/Core.h index 653298d8..e1f1cf3f 100644 --- a/library/include/Core.h +++ b/library/include/Core.h @@ -75,7 +75,9 @@ namespace DFHack SC_MAP_UNLOADED = 3, SC_VIEWSCREEN_CHANGED = 4, SC_CORE_INITIALIZED = 5, - SC_BEGIN_UNLOAD = 6 + SC_BEGIN_UNLOAD = 6, + SC_PAUSED = 7, + SC_UNPAUSED = 8 }; // Core is a singleton. Why? Because it is closely tied to SDL calls. It tracks the global state of DF. @@ -172,6 +174,10 @@ namespace DFHack struct Private; Private *d; + friend class CoreSuspendClaimer; + int ClaimSuspend(bool force_base); + void DisclaimSuspend(int level); + bool Init(); int Update (void); int TileUpdate (void); @@ -179,6 +185,7 @@ namespace DFHack int DFH_SDL_Event(SDL::Event* event); bool ncurses_wgetch(int in, int & out); + void doUpdate(color_ostream &out, bool first_update); void onUpdate(color_ostream &out); void onStateChange(color_ostream &out, state_change_event event); @@ -228,6 +235,7 @@ namespace DFHack // for state change tracking void *last_local_map_ptr; df::viewscreen *top_viewscreen; + bool last_pause_state; // Very important! bool started; @@ -246,4 +254,20 @@ namespace DFHack CoreSuspender(Core *core) : core(core) { core->Suspend(); } ~CoreSuspender() { core->Resume(); } }; + + /** Claims the current thread already has the suspend lock. + * Strictly for use in callbacks from DF. + */ + class CoreSuspendClaimer { + Core *core; + int level; + public: + CoreSuspendClaimer(bool base = false) : core(&Core::getInstance()) { + level = core->ClaimSuspend(base); + } + CoreSuspendClaimer(Core *core, bool base = false) : core(core) { + level = core->ClaimSuspend(base); + } + ~CoreSuspendClaimer() { core->DisclaimSuspend(level); } + }; } diff --git a/library/include/DataDefs.h b/library/include/DataDefs.h index 7f4d94c8..6b3aeb3e 100644 --- a/library/include/DataDefs.h +++ b/library/include/DataDefs.h @@ -28,6 +28,7 @@ distribution. #include <sstream> #include <vector> #include <map> +#include <set> #include "Core.h" #include "BitArray.h" @@ -292,6 +293,8 @@ namespace DFHack typedef virtual_class *virtual_ptr; #endif + class DFHACK_EXPORT VMethodInterposeLinkBase; + class DFHACK_EXPORT virtual_identity : public struct_identity { static std::map<void*, virtual_identity*> known; @@ -299,6 +302,9 @@ namespace DFHack void *vtable_ptr; + friend class VMethodInterposeLinkBase; + std::vector<VMethodInterposeLinkBase*> interpose_list; + protected: virtual void doInit(Core *core); @@ -306,10 +312,14 @@ namespace DFHack bool can_allocate() { return struct_identity::can_allocate() && (vtable_ptr != NULL); } + void *get_vmethod_ptr(int index); + bool set_vmethod_ptr(int index, void *ptr); + public: virtual_identity(size_t size, TAllocateFn alloc, const char *dfhack_name, const char *original_name, virtual_identity *parent, const struct_field_info *fields); + ~virtual_identity(); virtual identity_type type() { return IDTYPE_CLASS; } @@ -337,6 +347,8 @@ namespace DFHack : (this == get(instance_ptr)); } + template<class P> static P get_vmethod_ptr(P selector); + public: bool can_instantiate() { return can_allocate(); } virtual_ptr instantiate() { return can_instantiate() ? (virtual_ptr)do_allocate() : NULL; } diff --git a/library/include/DataFuncs.h b/library/include/DataFuncs.h index 637a532f..52039566 100644 --- a/library/include/DataFuncs.h +++ b/library/include/DataFuncs.h @@ -75,28 +75,31 @@ namespace df { cur_lua_ostream_argument name(state); #define INSTANTIATE_RETURN_TYPE(FArgs) \ - template<FW_TARGSC class RT> struct return_type<RT (*) FArgs> { typedef RT type; }; \ - template<FW_TARGSC class RT, class CT> struct return_type<RT (CT::*) FArgs> { typedef RT type; }; + template<FW_TARGSC class RT> struct return_type<RT (*) FArgs> { \ + typedef RT type; \ + static const bool is_method = false; \ + }; \ + template<FW_TARGSC class RT, class CT> struct return_type<RT (CT::*) FArgs> { \ + typedef RT type; \ + typedef CT class_type; \ + static const bool is_method = true; \ + }; #define INSTANTIATE_WRAPPERS(Count, FArgs, Args, Loads) \ template<FW_TARGS> struct function_wrapper<void (*) FArgs, true> { \ - static const bool is_method = false; \ static const int num_args = Count; \ static void execute(lua_State *state, int base, void (*cb) FArgs) { Loads; INVOKE_VOID(cb Args); } \ }; \ template<FW_TARGSC class RT> struct function_wrapper<RT (*) FArgs, false> { \ - static const bool is_method = false; \ static const int num_args = Count; \ static void execute(lua_State *state, int base, RT (*cb) FArgs) { Loads; INVOKE_RV(cb Args); } \ }; \ template<FW_TARGSC class CT> struct function_wrapper<void (CT::*) FArgs, true> { \ - static const bool is_method = true; \ static const int num_args = Count+1; \ static void execute(lua_State *state, int base, void (CT::*cb) FArgs) { \ LOAD_CLASS() Loads; INVOKE_VOID((self->*cb) Args); } \ }; \ template<FW_TARGSC class RT, class CT> struct function_wrapper<RT (CT::*) FArgs, false> { \ - static const bool is_method = true; \ static const int num_args = Count+1; \ static void execute(lua_State *state, int base, RT (CT::*cb) FArgs) { \ LOAD_CLASS(); Loads; INVOKE_RV((self->*cb) Args); } \ diff --git a/library/include/DataIdentity.h b/library/include/DataIdentity.h index dcd0ae97..0f5fd9e7 100644 --- a/library/include/DataIdentity.h +++ b/library/include/DataIdentity.h @@ -115,6 +115,8 @@ namespace DFHack virtual void lua_item_read(lua_State *state, int fname_idx, void *ptr, int idx); virtual void lua_item_write(lua_State *state, int fname_idx, void *ptr, int idx, int val_index); + virtual bool is_readonly() { return false; } + virtual bool resize(void *ptr, int size) { return false; } virtual bool erase(void *ptr, int index) { return false; } virtual bool insert(void *ptr, int index, void *pitem) { return false; } @@ -343,6 +345,33 @@ namespace df } }; + template<class T> + class ro_stl_container_identity : public container_identity { + const char *name; + + public: + ro_stl_container_identity(const char *name, type_identity *item, enum_identity *ienum = NULL) + : container_identity(sizeof(T), &allocator_fn<T>, item, ienum), name(name) + {} + + std::string getFullName(type_identity *item) { + return name + container_identity::getFullName(item); + } + + virtual bool is_readonly() { return true; } + virtual bool resize(void *ptr, int size) { return false; } + virtual bool erase(void *ptr, int size) { return false; } + virtual bool insert(void *ptr, int idx, void *item) { return false; } + + protected: + virtual int item_count(void *ptr, CountMode) { return ((T*)ptr)->size(); } + virtual void *item_pointer(type_identity *item, void *ptr, int idx) { + auto iter = (*(T*)ptr).begin(); + for (; idx > 0; idx--) ++iter; + return (void*)&*iter; + } + }; + class bit_array_identity : public bit_container_identity { public: /* @@ -517,6 +546,10 @@ namespace df static container_identity *get(); }; + template<class T> struct identity_traits<std::set<T> > { + static container_identity *get(); + }; + template<> struct identity_traits<BitArray<int> > { static bit_array_identity identity; static bit_container_identity *get() { return &identity; } @@ -580,6 +613,13 @@ namespace df } template<class T> + inline container_identity *identity_traits<std::set<T> >::get() { + typedef std::set<T> container; + static ro_stl_container_identity<container> identity("set", identity_traits<T>::get()); + return &identity; + } + + template<class T> inline bit_container_identity *identity_traits<BitArray<T> >::get() { static bit_array_identity identity(identity_traits<T>::get()); return &identity; diff --git a/library/include/LuaTools.h b/library/include/LuaTools.h index d3c7a65d..6b1afb88 100644 --- a/library/include/LuaTools.h +++ b/library/include/LuaTools.h @@ -192,6 +192,16 @@ namespace DFHack {namespace Lua { } /** + * Call through to the function with try/catch for C++ exceptions. + */ + DFHACK_EXPORT int CallWithCatch(lua_State *, int (*fn)(lua_State*), const char *context = NULL); + + template<int (*cb)(lua_State*)> + int CallWithCatchWrapper(lua_State *state) { + return CallWithCatch(state, cb); + } + + /** * Invoke lua function via pcall. Returns true if success. * If an error is signalled, and perr is true, it is printed and popped from the stack. */ @@ -300,9 +310,18 @@ namespace DFHack {namespace Lua { DFHACK_EXPORT bool IsCoreContext(lua_State *state); - DFHACK_EXPORT int NewEvent(lua_State *state); - DFHACK_EXPORT void MakeEvent(lua_State *state, void *key); - DFHACK_EXPORT void InvokeEvent(color_ostream &out, lua_State *state, void *key, int num_args); + namespace Event { + struct DFHACK_EXPORT Owner { + virtual ~Owner() {} + virtual void on_count_changed(int new_cnt, int delta) {} + virtual void on_invoked(lua_State *state, int nargs, bool from_c) {} + }; + + DFHACK_EXPORT void New(lua_State *state, Owner *owner = NULL); + DFHACK_EXPORT void Make(lua_State *state, void *key, Owner *owner = NULL); + DFHACK_EXPORT void SetPrivateCallback(lua_State *state, int ev_idx); + DFHACK_EXPORT void Invoke(color_ostream &out, lua_State *state, void *key, int num_args); + } class StackUnwinder { lua_State *state; @@ -355,18 +374,24 @@ namespace DFHack {namespace Lua { } } - class DFHACK_EXPORT Notification { + class DFHACK_EXPORT Notification : public Event::Owner { lua_State *state; void *key; function_identity_base *handler; + int count; public: Notification(function_identity_base *handler = NULL) - : state(NULL), key(NULL), handler(handler) {} + : state(NULL), key(NULL), handler(handler), count(0) {} + int get_listener_count() { return count; } lua_State *get_state() { return state; } function_identity_base *get_handler() { return handler; } + lua_State *state_if_count() { return (count > 0) ? state : NULL; } + + void on_count_changed(int new_cnt, int) { count = new_cnt; } + void invoke(color_ostream &out, int nargs); void bind(lua_State *state, const char *name); @@ -378,7 +403,7 @@ namespace DFHack {namespace Lua { static DFHack::Lua::Notification name##_event(df::wrap_function(handler, true)); \ void name(color_ostream &out) { \ handler(out); \ - if (name##_event.get_state()) { \ + if (name##_event.state_if_count()) { \ name##_event.invoke(out, 0); \ } \ } @@ -387,7 +412,7 @@ namespace DFHack {namespace Lua { static DFHack::Lua::Notification name##_event(df::wrap_function(handler, true)); \ void name(color_ostream &out, arg_type1 arg1) { \ handler(out, arg1); \ - if (auto state = name##_event.get_state()) { \ + if (auto state = name##_event.state_if_count()) { \ DFHack::Lua::Push(state, arg1); \ name##_event.invoke(out, 1); \ } \ @@ -397,7 +422,7 @@ namespace DFHack {namespace Lua { static DFHack::Lua::Notification name##_event(df::wrap_function(handler, true)); \ void name(color_ostream &out, arg_type1 arg1, arg_type2 arg2) { \ handler(out, arg1, arg2); \ - if (auto state = name##_event.get_state()) { \ + if (auto state = name##_event.state_if_count()) { \ DFHack::Lua::Push(state, arg1); \ DFHack::Lua::Push(state, arg2); \ name##_event.invoke(out, 2); \ @@ -408,7 +433,7 @@ namespace DFHack {namespace Lua { static DFHack::Lua::Notification name##_event(df::wrap_function(handler, true)); \ void name(color_ostream &out, arg_type1 arg1, arg_type2 arg2, arg_type3 arg3) { \ handler(out, arg1, arg2, arg3); \ - if (auto state = name##_event.get_state()) { \ + if (auto state = name##_event.state_if_count()) { \ DFHack::Lua::Push(state, arg1); \ DFHack::Lua::Push(state, arg2); \ DFHack::Lua::Push(state, arg3); \ @@ -420,7 +445,7 @@ namespace DFHack {namespace Lua { static DFHack::Lua::Notification name##_event(df::wrap_function(handler, true)); \ void name(color_ostream &out, arg_type1 arg1, arg_type2 arg2, arg_type3 arg3, arg_type4 arg4) { \ handler(out, arg1, arg2, arg3, arg4); \ - if (auto state = name##_event.get_state()) { \ + if (auto state = name##_event.state_if_count()) { \ DFHack::Lua::Push(state, arg1); \ DFHack::Lua::Push(state, arg2); \ DFHack::Lua::Push(state, arg3); \ @@ -433,7 +458,7 @@ namespace DFHack {namespace Lua { static DFHack::Lua::Notification name##_event(df::wrap_function(handler, true)); \ void name(color_ostream &out, arg_type1 arg1, arg_type2 arg2, arg_type3 arg3, arg_type4 arg4, arg_type5 arg5) { \ handler(out, arg1, arg2, arg3, arg4, arg5); \ - if (auto state = name##_event.get_state()) { \ + if (auto state = name##_event.state_if_count()) { \ DFHack::Lua::Push(state, arg1); \ DFHack::Lua::Push(state, arg2); \ DFHack::Lua::Push(state, arg3); \ diff --git a/library/include/MemAccess.h b/library/include/MemAccess.h index c51df3c6..0e5f618e 100644 --- a/library/include/MemAccess.h +++ b/library/include/MemAccess.h @@ -283,6 +283,9 @@ namespace DFHack /// modify permisions of memory range bool setPermisions(const t_memrange & range,const t_memrange &trgrange); + + /// write a possibly read-only memory area + bool patchMemory(void *target, const void* src, size_t count); private: VersionInfo * my_descriptor; PlatformSpecific *d; diff --git a/library/include/PluginManager.h b/library/include/PluginManager.h index 5da9fc92..25b05ad4 100644 --- a/library/include/PluginManager.h +++ b/library/include/PluginManager.h @@ -173,31 +173,16 @@ namespace DFHack PluginManager * parent; plugin_state state; - struct LuaCommand { - Plugin *owner; - std::string name; - int (*command)(lua_State *state); - LuaCommand(Plugin *owner, std::string name) : owner(owner), name(name) {} - }; + struct LuaCommand; std::map<std::string, LuaCommand*> lua_commands; static int lua_cmd_wrapper(lua_State *state); - struct LuaFunction { - Plugin *owner; - std::string name; - function_identity_base *identity; - LuaFunction(Plugin *owner, std::string name) : owner(owner), name(name) {} - }; + struct LuaFunction; std::map<std::string, LuaFunction*> lua_functions; static int lua_fun_wrapper(lua_State *state); void push_function(lua_State *state, LuaFunction *fn); - struct LuaEvent { - LuaFunction handler; - Lua::Notification *event; - bool active; - LuaEvent(Plugin *owner, std::string name) : handler(owner,name), active(false) {} - }; + struct LuaEvent; std::map<std::string, LuaEvent*> lua_events; void index_lua(DFLibrary *lib); @@ -209,7 +194,7 @@ namespace DFHack command_result (*plugin_onupdate)(color_ostream &); command_result (*plugin_onstatechange)(color_ostream &, state_change_event); RPCService* (*plugin_rpcconnect)(color_ostream &); - command_result (*plugin_eval_ruby)(const char*); + command_result (*plugin_eval_ruby)(color_ostream &, const char*); }; class DFHACK_EXPORT PluginManager { @@ -238,7 +223,7 @@ namespace DFHack { return all_plugins.size(); } - command_result (*eval_ruby)(const char*); + command_result (*eval_ruby)(color_ostream &, const char*); // DATA private: tthread::mutex * cmdlist_mutex; diff --git a/library/include/VTableInterpose.h b/library/include/VTableInterpose.h new file mode 100644 index 00000000..bb7a37ce --- /dev/null +++ b/library/include/VTableInterpose.h @@ -0,0 +1,173 @@ +/* +https://github.com/peterix/dfhack +Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com) + +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. +*/ + +#pragma once + +#include "DataFuncs.h" + +namespace DFHack +{ + template<bool> struct StaticAssert; + template<> struct StaticAssert<true> {}; + +#define STATIC_ASSERT(condition) { StaticAssert<(condition)>(); } + + /* Wrapping around compiler-specific representation of pointers to methods. */ + +#if defined(_MSC_VER) +#define METHOD_POINTER_SIZE (sizeof(void*)*2) +#elif defined(__GXX_ABI_VERSION) +#define METHOD_POINTER_SIZE (sizeof(void*)*2) +#else +#error Unknown compiler type +#endif + +#define ASSERT_METHOD_POINTER(type) \ + STATIC_ASSERT(df::return_type<type>::is_method && sizeof(type)==METHOD_POINTER_SIZE); + + DFHACK_EXPORT bool is_vmethod_pointer_(void*); + DFHACK_EXPORT int vmethod_pointer_to_idx_(void*); + DFHACK_EXPORT void* method_pointer_to_addr_(void*); + DFHACK_EXPORT void addr_to_method_pointer_(void*,void*); + + template<class T> bool is_vmethod_pointer(T ptr) { + ASSERT_METHOD_POINTER(T); + return is_vmethod_pointer_(&ptr); + } + template<class T> int vmethod_pointer_to_idx(T ptr) { + ASSERT_METHOD_POINTER(T); + return vmethod_pointer_to_idx_(&ptr); + } + template<class T> void *method_pointer_to_addr(T ptr) { + ASSERT_METHOD_POINTER(T); + return method_pointer_to_addr_(&ptr); + } + template<class T> T addr_to_method_pointer(void *addr) { + ASSERT_METHOD_POINTER(T); + T rv; + addr_to_method_pointer_(&rv, addr); + return rv; + } + + /* Access to vmethod pointers from the vtable. */ + + template<class P> + P virtual_identity::get_vmethod_ptr(P selector) + { + typedef typename df::return_type<P>::class_type host_class; + virtual_identity &identity = host_class::_identity; + int idx = vmethod_pointer_to_idx(selector); + return addr_to_method_pointer<P>(identity.get_vmethod_ptr(idx)); + } + + /* VMethod interpose API. + + This API allows replacing an entry in the original vtable + with code defined by DFHack, while retaining ability to + call the original code. The API can be safely used from + plugins, and multiple hooks for the same vmethod are + automatically chained in undefined order. + + Usage: + + struct my_hack : df::someclass { + typedef df::someclass interpose_base; + + DEFINE_VMETHOD_INTERPOSE(void, foo, (int arg)) { + // If needed by the code, claim the suspend lock. + // DO NOT USE THE USUAL CoreSuspender, OR IT WILL DEADLOCK! + // CoreSuspendClaimer suspend; + ... + INTERPOSE_NEXT(foo)(arg) // call the original + ... + } + }; + + IMPLEMENT_VMETHOD_INTERPOSE(my_hack, foo); + + void init() { + if (!INTERPOSE_HOOK(my_hack, foo).apply()) + error(); + } + + void shutdown() { + INTERPOSE_HOOK(my_hack, foo).remove(); + } + */ + +#define DEFINE_VMETHOD_INTERPOSE(rtype, name, args) \ + typedef rtype (interpose_base::*interpose_ptr_##name)args; \ + static DFHack::VMethodInterposeLink<interpose_base,interpose_ptr_##name> interpose_##name; \ + rtype interpose_fn_##name args + +#define IMPLEMENT_VMETHOD_INTERPOSE(class,name) \ + DFHack::VMethodInterposeLink<class::interpose_base,class::interpose_ptr_##name> \ + class::interpose_##name(&class::interpose_base::name, &class::interpose_fn_##name); + +#define INTERPOSE_NEXT(name) (this->*interpose_##name.chain) +#define INTERPOSE_HOOK(class, name) (class::interpose_##name) + + class DFHACK_EXPORT VMethodInterposeLinkBase { + /* + These link objects try to: + 1) Allow multiple hooks into the same vmethod + 2) Auto-remove hooks when a plugin is unloaded. + */ + + virtual_identity *host; // Class with the vtable + int vmethod_idx; + void *interpose_method; // Pointer to the code of the interposing method + void *chain_mptr; // Pointer to the chain field below + + void *saved_chain; // Previous pointer to the code + VMethodInterposeLinkBase *next, *prev; // Other hooks for the same method + + void set_chain(void *chain); + public: + VMethodInterposeLinkBase(virtual_identity *host, int vmethod_idx, void *interpose_method, void *chain_mptr); + ~VMethodInterposeLinkBase(); + + bool is_applied() { return saved_chain != NULL; } + bool apply(); + void remove(); + }; + + template<class Base, class Ptr> + class VMethodInterposeLink : public VMethodInterposeLinkBase { + public: + Ptr chain; + + operator Ptr () { return chain; } + + template<class Ptr2> + VMethodInterposeLink(Ptr target, Ptr2 src) + : VMethodInterposeLinkBase( + &Base::_identity, + vmethod_pointer_to_idx(target), + method_pointer_to_addr(src), + &chain + ) + { src = target; /* check compatibility */ } + }; +} diff --git a/library/include/modules/Buildings.h b/library/include/modules/Buildings.h index 6e0a2205..639df686 100644 --- a/library/include/modules/Buildings.h +++ b/library/include/modules/Buildings.h @@ -93,6 +93,11 @@ DFHACK_EXPORT bool Read (const uint32_t index, t_building & building); DFHACK_EXPORT bool ReadCustomWorkshopTypes(std::map <uint32_t, std::string> & btypes); /** + * Sets the owner unit for the building. + */ +DFHACK_EXPORT bool setOwner(df::building *building, df::unit *owner); + +/** * Find the building located at the specified tile. * Does not work on civzones. */ diff --git a/library/include/modules/Gui.h b/library/include/modules/Gui.h index e7155c43..273d84ce 100644 --- a/library/include/modules/Gui.h +++ b/library/include/modules/Gui.h @@ -55,8 +55,6 @@ namespace DFHack */ namespace Gui { - inline df::viewscreen *getCurViewscreen() { return Core::getTopViewscreen(); } - DFHACK_EXPORT std::string getFocusString(df::viewscreen *top); // Full-screen item details view @@ -113,7 +111,11 @@ namespace DFHack * Gui screens */ /// Get the current top-level view-screen - DFHACK_EXPORT df::viewscreen * GetCurrentScreen(); + DFHACK_EXPORT df::viewscreen *getCurViewscreen(bool skip_dismissed = false); + + inline std::string getCurFocus(bool skip_dismissed = false) { + return getFocusString(getCurViewscreen(skip_dismissed)); + } /// get the size of the window buffer DFHACK_EXPORT bool getWindowSize(int32_t & width, int32_t & height); diff --git a/library/include/modules/Screen.h b/library/include/modules/Screen.h new file mode 100644 index 00000000..492e1eec --- /dev/null +++ b/library/include/modules/Screen.h @@ -0,0 +1,176 @@ +/* +https://github.com/peterix/dfhack +Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com) + +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. +*/ + +#pragma once +#include "Export.h" +#include "Module.h" +#include "BitArray.h" +#include "ColorText.h" +#include <string> + +#include "DataDefs.h" +#include "df/graphic.h" +#include "df/viewscreen.h" + +/** + * \defgroup grp_screen utilities for painting to the screen + * @ingroup grp_screen + */ + +namespace DFHack +{ + class Core; + + /** + * The Screen module + * \ingroup grp_modules + * \ingroup grp_screen + */ + namespace Screen + { + /// Data structure describing all properties a screen tile can have + struct Pen { + // Ordinary text symbol + char ch; + int8_t fg, bg; + bool bold; + + // Graphics tile + int tile; + enum TileMode { + AsIs, // Tile colors used without modification + CharColor, // The fg/bg pair is used + TileColor // The fields below are used + } tile_mode; + int8_t tile_fg, tile_bg; + + Pen(char ch = 0, int8_t fg = 7, int8_t bg = 0, int tile = 0, bool color_tile = false) + : ch(ch), fg(fg&7), bg(bg), bold(!!(fg&8)), + tile(tile), tile_mode(color_tile ? CharColor : AsIs), tile_fg(0), tile_bg(0) + {} + Pen(char ch, int8_t fg, int8_t bg, bool bold, int tile = 0, bool color_tile = false) + : ch(ch), fg(fg), bg(bg), bold(bold), + tile(tile), tile_mode(color_tile ? CharColor : AsIs), tile_fg(0), tile_bg(0) + {} + Pen(char ch, int8_t fg, int8_t bg, int tile, int8_t tile_fg, int8_t tile_bg) + : ch(ch), fg(fg&7), bg(bg), bold(!!(fg&8)), + tile(tile), tile_mode(TileColor), tile_fg(tile_fg), tile_bg(tile_bg) + {} + Pen(char ch, int8_t fg, int8_t bg, bool bold, int tile, int8_t tile_fg, int8_t tile_bg) + : ch(ch), fg(fg), bg(bg), bold(bold), + tile(tile), tile_mode(TileColor), tile_fg(tile_fg), tile_bg(tile_bg) + {} + }; + + DFHACK_EXPORT df::coord2d getMousePos(); + DFHACK_EXPORT df::coord2d getWindowSize(); + + /// Returns the state of [GRAPHICS:YES/NO] + DFHACK_EXPORT bool inGraphicsMode(); + + /// Paint one screen tile with the given pen + DFHACK_EXPORT bool paintTile(const Pen &pen, int x, int y); + + /// Paint a string onto the screen. Ignores ch and tile of pen. + DFHACK_EXPORT bool paintString(const Pen &pen, int x, int y, const std::string &text); + + /// Fills a rectangle with one pen. Possibly more efficient than a loop over paintTile. + DFHACK_EXPORT bool fillRect(const Pen &pen, int x1, int y1, int x2, int y2); + + /// Draws a standard dark gray window border with a title string + DFHACK_EXPORT bool drawBorder(const std::string &title); + + /// Wipes the screen to full black + DFHACK_EXPORT bool clear(); + + /// Requests repaint + DFHACK_EXPORT bool invalidate(); + + /// Find a loaded graphics tile from graphics raws. + DFHACK_EXPORT bool findGraphicsTile(const std::string &page, int x, int y, int *ptile, int *pgs = NULL); + + // Push and remove viewscreens + DFHACK_EXPORT bool show(df::viewscreen *screen, df::viewscreen *before = NULL); + DFHACK_EXPORT void dismiss(df::viewscreen *screen, bool to_first = false); + DFHACK_EXPORT bool isDismissed(df::viewscreen *screen); + } + + class DFHACK_EXPORT dfhack_viewscreen : public df::viewscreen { + df::coord2d last_size; + void check_resize(); + + protected: + bool text_input_mode; + + public: + dfhack_viewscreen(); + virtual ~dfhack_viewscreen(); + + static bool is_instance(df::viewscreen *screen); + + virtual void logic(); + virtual void render(); + + virtual int8_t movies_okay() { return 1; } + virtual bool key_conflict(df::interface_key key); + + virtual bool is_lua_screen() { return false; } + + virtual std::string getFocusString() = 0; + virtual void onShow() {}; + virtual void onDismiss() {}; + }; + + class DFHACK_EXPORT dfhack_lua_viewscreen : public dfhack_viewscreen { + std::string focus; + + void update_focus(lua_State *L, int idx); + + bool safe_call_lua(int (*pf)(lua_State *), int args, int rvs); + static dfhack_lua_viewscreen *get_self(lua_State *L); + + static int do_destroy(lua_State *L); + static int do_render(lua_State *L); + static int do_notify(lua_State *L); + static int do_input(lua_State *L); + + public: + dfhack_lua_viewscreen(lua_State *L, int table_idx); + virtual ~dfhack_lua_viewscreen(); + + static df::viewscreen *get_pointer(lua_State *L, int idx, bool make); + + virtual bool is_lua_screen() { return true; } + virtual std::string getFocusString() { return focus; } + + virtual void render(); + virtual void logic(); + virtual void help(); + virtual void resize(int w, int h); + virtual void feed(std::set<df::interface_key> *keys); + + virtual void onShow(); + virtual void onDismiss(); + }; +} diff --git a/library/include/modules/Units.h b/library/include/modules/Units.h index 7bf4f101..9003dc3a 100644 --- a/library/include/modules/Units.h +++ b/library/include/modules/Units.h @@ -226,6 +226,9 @@ DFHACK_EXPORT bool getNoblePositions(std::vector<NoblePosition> *pvec, df::unit DFHACK_EXPORT std::string getProfessionName(df::unit *unit, bool ignore_noble = false, bool plural = false); DFHACK_EXPORT std::string getCasteProfessionName(int race, int caste, df::profession pid, bool plural = false); + +DFHACK_EXPORT int8_t getProfessionColor(df::unit *unit, bool ignore_noble = false); +DFHACK_EXPORT int8_t getCasteProfessionColor(int race, int caste, df::profession pid); } } #endif diff --git a/library/lua/dfhack.lua b/library/lua/dfhack.lua index d56d4df6..2cbd019a 100644 --- a/library/lua/dfhack.lua +++ b/library/lua/dfhack.lua @@ -39,6 +39,8 @@ if dfhack.is_core_context then SC_MAP_UNLOADED = 3 SC_VIEWSCREEN_CHANGED = 4 SC_CORE_INITIALIZED = 5 + SC_PAUSED = 7 + SC_UNPAUSED = 8 end -- Error handling @@ -100,11 +102,39 @@ function reload(module) dofile(path) end +-- Trivial classes + +function rawset_default(target,source) + for k,v in pairs(source) do + if rawget(target,k) == nil then + rawset(target,k,v) + end + end +end + +function defclass(class,parent) + class = class or {} + rawset_default(class, { __index = class }) + if parent then + setmetatable(class, parent) + else + rawset_default(class, { init_fields = rawset_default }) + end + return class +end + +function mkinstance(class,table) + table = table or {} + setmetatable(table, class) + return table +end + -- Misc functions function printall(table) - if type(table) == 'table' or df.isvalid(table) == 'ref' then - for k,v in pairs(table) do + local ok,f,t,k = pcall(pairs,table) + if ok then + for k,v in f,t,k do print(string.format("%-23s\t = %s",tostring(k),tostring(v))) end end @@ -133,14 +163,6 @@ function xyz2pos(x,y,z) end end -function rawset_default(target,source) - for k,v in pairs(source) do - if rawget(target,k) == nil then - rawset(target,k,v) - end - end -end - function safe_index(obj,idx,...) if obj == nil or idx == nil then return nil @@ -158,10 +180,6 @@ end -- String conversions -function dfhack.event:__tostring() - return "<event>" -end - function dfhack.persistent:__tostring() return "<persistent "..self.entry_id..":"..self.key.."=\"" ..self.value.."\":"..table.concat(self.ints,",")..">" diff --git a/library/lua/gui.lua b/library/lua/gui.lua new file mode 100644 index 00000000..ac032166 --- /dev/null +++ b/library/lua/gui.lua @@ -0,0 +1,400 @@ +-- Viewscreen implementation utility collection. + +local _ENV = mkmodule('gui') + +local dscreen = dfhack.screen + +USE_GRAPHICS = dscreen.inGraphicsMode() + +CLEAR_PEN = {ch=32,fg=0,bg=0} + +function simulateInput(screen,...) + local keys = {} + local function push_key(arg) + local kv = arg + if type(arg) == 'string' then + kv = df.interface_key[arg] + if kv == nil then + error('Invalid keycode: '..arg) + end + end + if type(arg) == 'number' then + keys[#keys+1] = kv + end + end + for i = 1,select('#',...) do + local arg = select(i,...) + if arg ~= nil then + local t = type(arg) + if type(arg) == 'table' then + for k,v in pairs(arg) do + if v == true then + push_key(k) + else + push_key(v) + end + end + else + push_key(arg) + end + end + end + dscreen._doSimulateInput(screen, keys) +end + +function mkdims_xy(x1,y1,x2,y2) + return { x1=x1, y1=y1, x2=x2, y2=y2, width=x2-x1+1, height=y2-y1+1 } +end +function mkdims_wh(x1,y1,w,h) + return { x1=x1, y1=y1, x2=x1+w-1, y2=y1+h-1, width=w, height=h } +end +function inset(rect,dx1,dy1,dx2,dy2) + return mkdims_xy( + rect.x1+dx1, rect.y1+dy1, + rect.x2-(dx2 or dx1), rect.y2-(dy2 or dy1) + ) +end +function is_in_rect(rect,x,y) + return x and y and x >= rect.x1 and x <= rect.x2 and y >= rect.y1 and y <= rect.y2 +end + +local function to_pen(default, pen, bg, bold) + if pen == nil then + return default or {} + elseif type(pen) ~= 'table' then + return {fg=pen,bg=bg,bold=bold} + else + return pen + end +end + +---------------------------- +-- Clipped painter object -- +---------------------------- + +Painter = defclass(Painter, nil) + +function Painter.new(rect, pen) + rect = rect or mkdims_wh(0,0,dscreen.getWindowSize()) + local self = { + x1 = rect.x1, clip_x1 = rect.x1, + y1 = rect.y1, clip_y1 = rect.y1, + x2 = rect.x2, clip_x2 = rect.x2, + y2 = rect.y2, clip_y2 = rect.y2, + width = rect.x2-rect.x1+1, + height = rect.y2-rect.y1+1, + cur_pen = to_pen(nil, pen or COLOR_GREY) + } + return mkinstance(Painter, self):seek(0,0) +end + +function Painter:isValidPos() + return self.x >= self.clip_x1 and self.x <= self.clip_x2 + and self.y >= self.clip_y1 and self.y <= self.clip_y2 +end + +function Painter:viewport(x,y,w,h) + local x1,y1 = self.x1+x, self.y1+y + local x2,y2 = x1+w-1, y1+h-1 + local vp = { + -- Logical viewport + x1 = x1, y1 = y1, x2 = x2, y2 = y2, + width = w, height = h, + -- Actual clipping rect + clip_x1 = math.max(self.clip_x1, x1), + clip_y1 = math.max(self.clip_y1, y1), + clip_x2 = math.min(self.clip_x2, x2), + clip_y2 = math.min(self.clip_y2, y2), + -- Pen + cur_pen = self.cur_pen + } + return mkinstance(Painter, vp):seek(0,0) +end + +function Painter:localX() + return self.x - self.x1 +end + +function Painter:localY() + return self.y - self.y1 +end + +function Painter:seek(x,y) + if x then self.x = self.x1 + x end + if y then self.y = self.y1 + y end + return self +end + +function Painter:advance(dx,dy) + if dx then self.x = self.x + dx end + if dy then self.y = self.y + dy end + return self +end + +function Painter:newline(dx) + self.y = self.y + 1 + self.x = self.x1 + (dx or 0) + return self +end + +function Painter:pen(pen,...) + self.cur_pen = to_pen(self.cur_pen, pen, ...) + return self +end + +function Painter:color(fg,bold,bg) + self.cur_pen = copyall(self.cur_pen) + self.cur_pen.fg = fg + self.cur_pen.bold = bold + if bg then self.cur_pen.bg = bg end + return self +end + +function Painter:clear() + dscreen.fillRect(CLEAR_PEN, self.clip_x1, self.clip_y1, self.clip_x2, self.clip_y2) + return self +end + +function Painter:fill(x1,y1,x2,y2,pen,bg,bold) + if type(x1) == 'table' then + x1, y1, x2, y2, pen, bg, bold = x1.x1, x1.y1, x1.x2, x1.y2, y1, x2, y2 + end + x1 = math.max(x1,self.clip_x1) + y1 = math.max(y1,self.clip_y1) + x2 = math.min(x2,self.clip_x2) + y2 = math.min(y2,self.clip_y2) + dscreen.fillRect(to_pen(self.cur_pen,pen,bg,bold),x1,y1,x2,y2) + return self +end + +function Painter:char(char,pen,...) + if self:isValidPos() then + dscreen.paintTile(to_pen(self.cur_pen, pen, ...), self.x, self.y, char) + end + return self:advance(1, nil) +end + +function Painter:tile(char,tile,pen,...) + if self:isValidPos() then + dscreen.paintTile(to_pen(self.cur_pen, pen, ...), self.x, self.y, char, tile) + end + return self:advance(1, nil) +end + +function Painter:string(text,pen,...) + if self.y >= self.clip_y1 and self.y <= self.clip_y2 then + local dx = 0 + if self.x < self.clip_x1 then + dx = self.clip_x1 - self.x + end + local len = #text + if self.x + len - 1 > self.clip_x2 then + len = self.clip_x2 - self.x + 1 + end + if len > dx then + dscreen.paintString( + to_pen(self.cur_pen, pen, ...), + self.x+dx, self.y, + string.sub(text,dx+1,len) + ) + end + end + return self:advance(#text, nil) +end + +------------------------ +-- Base screen object -- +------------------------ + +Screen = defclass(Screen) + +Screen.text_input_mode = false + +function Screen:init() + self:updateLayout() + return self +end + +Screen.isDismissed = dscreen.isDismissed + +function Screen:isShown() + return self._native ~= nil +end + +function Screen:isActive() + return self:isShown() and not self:isDismissed() +end + +function Screen:invalidate() + dscreen.invalidate() +end + +function Screen:getWindowSize() + return dscreen.getWindowSize() +end + +function Screen:getMousePos() + return dscreen.getMousePos() +end + +function Screen:renderParent() + if self._native and self._native.parent then + self._native.parent:render() + else + dscreen.clear() + end +end + +function Screen:sendInputToParent(...) + if self._native and self._native.parent then + simulateInput(self._native.parent, ...) + end +end + +function Screen:show(below) + if self._native then + error("This screen is already on display") + end + self:onAboutToShow(below) + if not dscreen.show(self, below) then + error('Could not show screen') + end +end + +function Screen:onAboutToShow() +end + +function Screen:onShow() + self:updateLayout() +end + +function Screen:dismiss() + if self._native then + dscreen.dismiss(self) + end +end + +function Screen:onDismiss() +end + +function Screen:onResize(w,h) + self:updateLayout() +end + +function Screen:updateLayout() +end + +------------------------ +-- Framed screen object -- +------------------------ + +-- Plain grey-colored frame. +GREY_FRAME = { + frame_pen = { ch = ' ', fg = COLOR_BLACK, bg = COLOR_GREY }, + title_pen = { fg = COLOR_BLACK, bg = COLOR_WHITE }, + signature_pen = { fg = COLOR_BLACK, bg = COLOR_GREY }, +} + +-- The usual boundary used by the DF screens. Often has fancy pattern in tilesets. +BOUNDARY_FRAME = { + frame_pen = { ch = 0xDB, fg = COLOR_DARKGREY, bg = COLOR_BLACK }, + title_pen = { fg = COLOR_BLACK, bg = COLOR_GREY }, + signature_pen = { fg = COLOR_BLACK, bg = COLOR_DARKGREY }, +} + +GREY_LINE_FRAME = { + frame_pen = { ch = 206, fg = COLOR_GREY, bg = COLOR_BLACK }, + h_frame_pen = { ch = 205, fg = COLOR_GREY, bg = COLOR_BLACK }, + v_frame_pen = { ch = 186, fg = COLOR_GREY, bg = COLOR_BLACK }, + lt_frame_pen = { ch = 201, fg = COLOR_GREY, bg = COLOR_BLACK }, + lb_frame_pen = { ch = 200, fg = COLOR_GREY, bg = COLOR_BLACK }, + rt_frame_pen = { ch = 187, fg = COLOR_GREY, bg = COLOR_BLACK }, + rb_frame_pen = { ch = 188, fg = COLOR_GREY, bg = COLOR_BLACK }, + title_pen = { fg = COLOR_BLACK, bg = COLOR_GREY }, + signature_pen = { fg = COLOR_DARKGREY, bg = COLOR_BLACK }, +} + +function paint_frame(x1,y1,x2,y2,style,title) + local pen = style.frame_pen + dscreen.paintTile(style.lt_frame_pen or pen, x1, y1) + dscreen.paintTile(style.rt_frame_pen or pen, x2, y1) + dscreen.paintTile(style.lb_frame_pen or pen, x1, y2) + dscreen.paintTile(style.rb_frame_pen or pen, x2, y2) + dscreen.fillRect(style.t_frame_pen or style.h_frame_pen or pen,x1+1,y1,x2-1,y1) + dscreen.fillRect(style.b_frame_pen or style.h_frame_pen or pen,x1+1,y2,x2-1,y2) + dscreen.fillRect(style.l_frame_pen or style.v_frame_pen or pen,x1,y1+1,x1,y2-1) + dscreen.fillRect(style.r_frame_pen or style.v_frame_pen or pen,x2,y1+1,x2,y2-1) + dscreen.paintString(style.signature_pen or style.title_pen or pen,x2-7,y2,"DFHack") + + if title then + local x = math.max(0,math.floor((x2-x1-3-#title)/2)) + x1 + local tstr = ' '..title..' ' + if #tstr > x2-x1-1 then + tstr = string.sub(tstr,1,x2-x1-1) + end + dscreen.paintString(style.title_pen or pen, x, y1, tstr) + end +end + +FramedScreen = defclass(FramedScreen, Screen) + +FramedScreen.frame_style = BOUNDARY_FRAME + +local function hint_coord(gap,hint) + if hint and hint > 0 then + return math.min(hint,gap) + elseif hint and hint < 0 then + return math.max(0,gap-hint) + else + return math.floor(gap/2) + end +end + +function FramedScreen:updateFrameSize() + local sw, sh = dscreen.getWindowSize() + local iw, ih = sw-2, sh-2 + local width = math.min(self.frame_width or iw, iw) + local height = math.min(self.frame_height or ih, ih) + local gw, gh = iw-width, ih-height + local x1, y1 = hint_coord(gw,self.frame_xhint), hint_coord(gh,self.frame_yhint) + self.frame_rect = mkdims_wh(x1+1,y1+1,width,height) + self.frame_opaque = (gw == 0 and gh == 0) +end + +function FramedScreen:updateLayout() + self:updateFrameSize() +end + +function FramedScreen:getWindowSize() + local rect = self.frame_rect + return rect.width, rect.height +end + +function FramedScreen:getMousePos() + local rect = self.frame_rect + local x,y = dscreen.getMousePos() + if is_in_rect(rect,x,y) then + return x-rect.x1, y-rect.y1 + end +end + +function FramedScreen:onRender() + local rect = self.frame_rect + local x1,y1,x2,y2 = rect.x1-1, rect.y1-1, rect.x2+1, rect.y2+1 + + if self.frame_opaque then + dscreen.clear() + else + self:renderParent() + dscreen.fillRect(CLEAR_PEN,x1,y1,x2,y2) + end + + paint_frame(x1,y1,x2,y2,self.frame_style,self.frame_title) + + self:onRenderBody(Painter.new(rect)) +end + +function FramedScreen:onRenderBody(dc) +end + +return _ENV diff --git a/library/lua/gui/dwarfmode.lua b/library/lua/gui/dwarfmode.lua new file mode 100644 index 00000000..c1a8bcb9 --- /dev/null +++ b/library/lua/gui/dwarfmode.lua @@ -0,0 +1,279 @@ +-- Support for messing with the dwarfmode screen + +local _ENV = mkmodule('gui.dwarfmode') + +local gui = require('gui') +local utils = require('utils') + +local dscreen = dfhack.screen +local world_map = df.global.world.map + +AREA_MAP_WIDTH = 23 +MENU_WIDTH = 30 + +function getPanelLayout() + local sw, sh = dscreen.getWindowSize() + local view_height = sh-2 + local view_rb = sw-1 + local area_x2 = sw-AREA_MAP_WIDTH-2 + local menu_x2 = sw-MENU_WIDTH-2 + local menu_x1 = area_x2-MENU_WIDTH-1 + local area_pos = df.global.ui_area_map_width + local menu_pos = df.global.ui_menu_width + local rv = {} + + if area_pos < 3 then + rv.area_map = gui.mkdims_xy(area_x2+1,1,view_rb-1,view_height) + view_rb = area_x2 + end + if menu_pos < area_pos or df.global.ui.main.mode ~= 0 then + if menu_pos >= area_pos then + rv.menu_forced = true + menu_pos = area_pos-1 + end + local menu_x = menu_x2 + if menu_pos < 2 then menu_x = menu_x1 end + rv.menu = gui.mkdims_xy(menu_x+1,1,view_rb-1,view_height) + view_rb = menu_x + end + rv.area_pos = area_pos + rv.menu_pos = menu_pos + rv.map = gui.mkdims_xy(1,1,view_rb-1,view_height) + return rv +end + +function getCursorPos() + if df.global.cursor.x ~= -30000 then + return copyall(df.global.cursor) + end +end + +function setCursorPos(cursor) + df.global.cursor = cursor +end + +function clearCursorPos() + df.global.cursor = xyz2pos(nil) +end + +Viewport = defclass(Viewport) + +function Viewport.make(map,x,y,z) + local self = gui.mkdims_wh(x,y,map.width,map.height) + self.z = z + return mkinstance(Viewport, self) +end + +function Viewport.get(layout) + return Viewport.make( + (layout or getPanelLayout()).map, + df.global.window_x, + df.global.window_y, + df.global.window_z + ) +end + +function Viewport:resize(layout) + return Viewport.make( + (layout or getPanelLayout()).map, + self.x1, self.y1, self.z + ) +end + +function Viewport:set() + local vp = self:clip() + df.global.window_x = vp.x1 + df.global.window_y = vp.y1 + df.global.window_z = vp.z + return vp +end + +function Viewport:clip(x,y,z) + return self:make( + math.max(0, math.min(x or self.x1, world_map.x_count-self.width)), + math.max(0, math.min(y or self.y1, world_map.y_count-self.height)), + math.max(0, math.min(z or self.z, world_map.z_count-1)) + ) +end + +function Viewport:isVisibleXY(target,gap) + gap = gap or 0 + + return math.max(target.x-gap,0) >= self.x1 + and math.min(target.x+gap,world_map.x_count-1) <= self.x2 + and math.max(target.y-gap,0) >= self.y1 + and math.min(target.y+gap,world_map.y_count-1) <= self.y2 +end + +function Viewport:isVisible(target,gap) + gap = gap or 0 + + return self:isVisibleXY(target,gap) and target.z == self.z +end + +function Viewport:centerOn(target) + return self:clip( + target.x - math.floor(self.width/2), + target.y - math.floor(self.height/2), + target.z + ) +end + +function Viewport:scrollTo(target,gap) + gap = math.max(0, gap or 5) + if gap*2 >= math.min(self.width, self.height) then + gap = math.floor(math.min(self.width, self.height)/2) + end + local x = math.min(self.x1, target.x-gap) + x = math.max(x, target.x+gap+1-self.width) + local y = math.min(self.y1, target.y-gap) + y = math.max(y, target.y+gap+1-self.height) + return self:clip(x, y, target.z) +end + +function Viewport:reveal(target,gap,max_scroll,scroll_gap,scroll_z) + gap = math.max(0, gap or 5) + if self:isVisible(target, gap) then + return self + end + + max_scroll = math.max(0, max_scroll or 5) + if self:isVisibleXY(target, -max_scroll) + and (scroll_z or target.z == self.z) then + return self:scrollTo(target, scroll_gap or gap) + else + return self:centerOn(target) + end +end + +MOVEMENT_KEYS = { + CURSOR_UP = { 0, -1, 0 }, CURSOR_DOWN = { 0, 1, 0 }, + CURSOR_LEFT = { -1, 0, 0 }, CURSOR_RIGHT = { 1, 0, 0 }, + CURSOR_UPLEFT = { -1, -1, 0 }, CURSOR_UPRIGHT = { 1, -1, 0 }, + CURSOR_DOWNLEFT = { -1, 1, 0 }, CURSOR_DOWNRIGHT = { 1, 1, 0 }, + CURSOR_UP_FAST = { 0, -1, 0, true }, CURSOR_DOWN_FAST = { 0, 1, 0, true }, + CURSOR_LEFT_FAST = { -1, 0, 0, true }, CURSOR_RIGHT_FAST = { 1, 0, 0, true }, + CURSOR_UPLEFT_FAST = { -1, -1, 0, true }, CURSOR_UPRIGHT_FAST = { 1, -1, 0, true }, + CURSOR_DOWNLEFT_FAST = { -1, 1, 0, true }, CURSOR_DOWNRIGHT_FAST = { 1, 1, 0, true }, + CURSOR_UP_Z = { 0, 0, 1 }, CURSOR_DOWN_Z = { 0, 0, -1 }, + CURSOR_UP_Z_AUX = { 0, 0, 1 }, CURSOR_DOWN_Z_AUX = { 0, 0, -1 }, +} + +function Viewport:scrollByKey(key) + local info = MOVEMENT_KEYS[key] + if info then + local delta = 10 + if info[4] then delta = 20 end + + return self:clip( + self.x1 + delta*info[1], + self.y1 + delta*info[2], + self.z + info[3] + ) + else + return self + end +end + +DwarfOverlay = defclass(DwarfOverlay, gui.Screen) + +function DwarfOverlay:updateLayout() + self.df_layout = getPanelLayout() +end + +function DwarfOverlay:getViewport(old_vp) + if old_vp then + return old_vp:resize(self.df_layout) + else + return Viewport.get(self.df_layout) + end +end + +function DwarfOverlay:moveCursorTo(cursor,viewport) + setCursorPos(cursor) + self:getViewport(viewport):reveal(cursor, 5, 0, 10):set() +end + +function DwarfOverlay:selectBuilding(building,cursor,viewport) + cursor = cursor or utils.getBuildingCenter(building) + + df.global.world.selected_building = building + self:moveCursorTo(cursor, viewport) +end + +function DwarfOverlay:propagateMoveKeys(keys) + for code,_ in pairs(MOVEMENT_KEYS) do + if keys[code] then + self:sendInputToParent(code) + return code + end + end +end + +function DwarfOverlay:simulateViewScroll(keys, anchor, no_clip_cursor) + local layout = self.df_layout + local cursor = getCursorPos() + + anchor = anchor or cursor + + if anchor and keys.A_MOVE_SAME_SQUARE then + self:getViewport():centerOn(anchor):set() + return 'A_MOVE_SAME_SQUARE' + end + + for code,_ in pairs(MOVEMENT_KEYS) do + if keys[code] then + local vp = self:getViewport():scrollByKey(code) + if (cursor and not no_clip_cursor) or no_clip_cursor == false then + vp = vp:reveal(anchor,4,20,4,true) + end + vp:set() + + return code + end + end +end + +function DwarfOverlay:onAboutToShow(below) + local screen = dfhack.gui.getCurViewscreen() + if below then screen = below.parent end + if not df.viewscreen_dwarfmodest:is_instance(screen) then + error("This screen requires the main dwarfmode view") + end +end + +MenuOverlay = defclass(MenuOverlay, DwarfOverlay) + +function MenuOverlay:updateLayout() + DwarfOverlay.updateLayout(self) + self.frame_rect = self.df_layout.menu +end + +MenuOverlay.getWindowSize = gui.FramedScreen.getWindowSize +MenuOverlay.getMousePos = gui.FramedScreen.getMousePos + +function MenuOverlay:onAboutToShow(below) + DwarfOverlay.onAboutToShow(self,below) + + self:updateLayout() + if not self.df_layout.menu then + error("The menu panel of dwarfmode is not visible") + end +end + +function MenuOverlay:onRender() + self:renderParent() + + local menu = self.df_layout.menu + if menu then + -- Paint signature on the frame. + dscreen.paintString( + {fg=COLOR_BLACK,bg=COLOR_DARKGREY}, + menu.x1+1, menu.y2+1, "DFHack" + ) + + self:onRenderBody(gui.Painter.new(menu)) + end +end + +return _ENV diff --git a/library/lua/utils.lua b/library/lua/utils.lua index f303091d..19a4e6f6 100644 --- a/library/lua/utils.lua +++ b/library/lua/utils.lua @@ -57,10 +57,10 @@ function is_container(obj) end -- Make a sequence of numbers in 1..size -function make_index_sequence(size) +function make_index_sequence(istart,iend) local index = {} - for i=1,size do - index[i] = i + for i=istart,iend do + index[i-istart+1] = i end return index end @@ -114,7 +114,7 @@ function make_sort_order(data,ordering) end -- Make an order table - local index = make_index_sequence(size) + local index = make_index_sequence(1,size) -- Sort the ordering table table.sort(index, function(ia,ib) @@ -361,6 +361,26 @@ function insert_or_update(vector,item,field,cmp) return added,cur,pos end +-- Calls a method with a string temporary +function call_with_string(obj,methodname,...) + return dfhack.with_temp_object( + df.new "string", + function(str,obj,methodname,...) + obj[methodname](obj,str,...) + return str.value + end, + obj,methodname,... + ) +end + +function getBuildingName(building) + return call_with_string(building, 'getName') +end + +function getBuildingCenter(building) + return xyz2pos(building.centerx, building.centery, building.z) +end + -- Ask a yes-no question function prompt_yes_no(msg,default) local prompt = msg @@ -379,7 +399,7 @@ function prompt_yes_no(msg,default) elseif string.match(rv,'^[Nn]') then return false elseif rv == 'abort' then - qerror('User abort in utils.prompt_yes_no()') + qerror('User abort') elseif rv == '' and default ~= nil then return default end @@ -393,7 +413,7 @@ function prompt_input(prompt,check,quit_str) while true do local rv = dfhack.lineedit(prompt) if rv == quit_str then - return nil + qerror('User abort') end local rtbl = table.pack(check(rv)) if rtbl[1] then diff --git a/library/modules/Buildings.cpp b/library/modules/Buildings.cpp index e0afc56e..d1aed897 100644 --- a/library/modules/Buildings.cpp +++ b/library/modules/Buildings.cpp @@ -49,6 +49,7 @@ using namespace DFHack; #include "df/ui_look_list.h" #include "df/d_init.h" #include "df/item.h" +#include "df/unit.h" #include "df/job.h" #include "df/job_item.h" #include "df/general_ref_building_holderst.h" @@ -177,6 +178,44 @@ bool Buildings::ReadCustomWorkshopTypes(map <uint32_t, string> & btypes) return true; } +bool Buildings::setOwner(df::building *bld, df::unit *unit) +{ + CHECK_NULL_POINTER(bld); + + if (!bld->is_room) + return false; + if (bld->owner == unit) + return true; + + if (bld->owner) + { + auto &blist = bld->owner->owned_buildings; + vector_erase_at(blist, linear_index(blist, bld)); + + if (auto spouse = df::unit::find(bld->owner->relations.spouse_id)) + { + auto &blist = spouse->owned_buildings; + vector_erase_at(blist, linear_index(blist, bld)); + } + } + + bld->owner = unit; + + if (unit) + { + unit->owned_buildings.push_back(bld); + + if (auto spouse = df::unit::find(unit->relations.spouse_id)) + { + auto &blist = spouse->owned_buildings; + if (bld->canUseSpouseRoom() && linear_index(blist, bld) < 0) + blist.push_back(bld); + } + } + + return true; +} + df::building *Buildings::findAtTile(df::coord pos) { auto occ = Maps::getTileOccupancy(pos); @@ -991,7 +1030,7 @@ bool Buildings::deconstruct(df::building *bld) // Assume: no parties. unlinkRooms(bld); // Assume: not unit destroy target - vector_erase_at(ui->unk8.unk10, linear_index(ui->unk8.unk10, bld)); + vector_erase_at(ui->tax_collection.rooms, linear_index(ui->tax_collection.rooms, bld)); // Assume: not used in punishment // Assume: not used in non-own jobs // Assume: does not affect pathfinding diff --git a/library/modules/Gui.cpp b/library/modules/Gui.cpp index cd44401f..91a17e99 100644 --- a/library/modules/Gui.cpp +++ b/library/modules/Gui.cpp @@ -42,6 +42,7 @@ using namespace std; using namespace DFHack; #include "modules/Job.h" +#include "modules/Screen.h" #include "DataDefs.h" #include "df/world.h" @@ -466,6 +467,11 @@ std::string Gui::getFocusString(df::viewscreen *top) return name; } + else if (dfhack_viewscreen::is_instance(top)) + { + auto name = static_cast<dfhack_viewscreen*>(top)->getFocusString(); + return name.empty() ? "dfhack" : "dfhack/"+name; + } else { Core &core = Core::getInstance(); @@ -977,17 +983,19 @@ void Gui::showPopupAnnouncement(std::string message, int color, bool bright) world->status.popups.push_back(popup); } -df::viewscreen * Gui::GetCurrentScreen() +df::viewscreen *Gui::getCurViewscreen(bool skip_dismissed) { df::viewscreen * ws = &gview->view; - while(ws) + while (ws && ws->child) + ws = ws->child; + + if (skip_dismissed) { - if(ws->child) - ws = ws->child; - else - return ws; + while (ws && Screen::isDismissed(ws) && ws->parent) + ws = ws->parent; } - return 0; + + return ws; } bool Gui::getViewCoords (int32_t &x, int32_t &y, int32_t &z) diff --git a/library/modules/Job.cpp b/library/modules/Job.cpp index a5e73bf1..b74a4b73 100644 --- a/library/modules/Job.cpp +++ b/library/modules/Job.cpp @@ -189,7 +189,7 @@ void DFHack::Job::printJobDetails(color_ostream &out, df::job *job) { CHECK_NULL_POINTER(job); - out.color(job->flags.bits.suspend ? Console::COLOR_DARKGREY : Console::COLOR_GREY); + out.color(job->flags.bits.suspend ? COLOR_DARKGREY : COLOR_GREY); out << "Job " << job->id << ": " << ENUM_KEY_STR(job_type,job->job_type); if (job->flags.whole) out << " (" << bitfield_to_string(job->flags) << ")"; diff --git a/library/modules/Materials.cpp b/library/modules/Materials.cpp index f8f99f81..50cf21a9 100644 --- a/library/modules/Materials.cpp +++ b/library/modules/Materials.cpp @@ -293,6 +293,12 @@ std::string MaterialInfo::getToken() switch (mode) { case Builtin: + if (material->id == "COAL") { + if (index == 0) + return "COAL:COKE"; + else if (index == 1) + return "COAL:CHARCOAL"; + } return material->id; case Inorganic: return "INORGANIC:" + inorganic->id; diff --git a/library/modules/Screen.cpp b/library/modules/Screen.cpp new file mode 100644 index 00000000..c2377f2c --- /dev/null +++ b/library/modules/Screen.cpp @@ -0,0 +1,604 @@ +/* +https://github.com/peterix/dfhack +Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com) + +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. +*/ + + +#include "Internal.h" + +#include <string> +#include <vector> +#include <map> +using namespace std; + +#include "modules/Screen.h" +#include "MemAccess.h" +#include "VersionInfo.h" +#include "Types.h" +#include "Error.h" +#include "ModuleFactory.h" +#include "Core.h" +#include "PluginManager.h" +#include "LuaTools.h" + +#include "MiscUtils.h" + +using namespace DFHack; + +#include "DataDefs.h" +#include "df/init.h" +#include "df/texture_handler.h" +#include "df/tile_page.h" +#include "df/interfacest.h" +#include "df/enabler.h" + +using namespace df::enums; +using df::global::init; +using df::global::gps; +using df::global::texture; +using df::global::gview; +using df::global::enabler; + +using Screen::Pen; + +/* + * Screen painting API. + */ + +df::coord2d Screen::getMousePos() +{ + if (!gps || (enabler && !enabler->tracking_on)) + return df::coord2d(-1, -1); + + return df::coord2d(gps->mouse_x, gps->mouse_y); +} + +df::coord2d Screen::getWindowSize() +{ + if (!gps) return df::coord2d(80, 25); + + return df::coord2d(gps->dimx, gps->dimy); +} + +bool Screen::inGraphicsMode() +{ + return init && init->display.flag.is_set(init_display_flags::USE_GRAPHICS); +} + +static void doSetTile(const Pen &pen, int index) +{ + auto screen = gps->screen + index*4; + screen[0] = uint8_t(pen.ch); + screen[1] = uint8_t(pen.fg) & 15; + screen[2] = uint8_t(pen.bg) & 15; + screen[3] = uint8_t(pen.bold) & 1; + gps->screentexpos[index] = pen.tile; + gps->screentexpos_addcolor[index] = (pen.tile_mode == Screen::Pen::CharColor); + gps->screentexpos_grayscale[index] = (pen.tile_mode == Screen::Pen::TileColor); + gps->screentexpos_cf[index] = pen.tile_fg; + gps->screentexpos_cbr[index] = pen.tile_bg; +} + +bool Screen::paintTile(const Pen &pen, int x, int y) +{ + if (!gps) return false; + + int dimx = gps->dimx, dimy = gps->dimy; + if (x < 0 || x >= dimx || y < 0 || y >= dimy) return false; + + doSetTile(pen, x*dimy + y); + return true; +} + +bool Screen::paintString(const Pen &pen, int x, int y, const std::string &text) +{ + if (!gps || y < 0 || y >= gps->dimy) return false; + + Pen tmp(pen); + bool ok = false; + + for (size_t i = -std::min(0,x); i < text.size(); i++) + { + if (x + i >= size_t(gps->dimx)) + break; + + tmp.ch = text[i]; + tmp.tile = (pen.tile ? pen.tile + uint8_t(text[i]) : 0); + paintTile(tmp, x+i, y); + ok = true; + } + + return ok; +} + +bool Screen::fillRect(const Pen &pen, int x1, int y1, int x2, int y2) +{ + if (!gps) return false; + + if (x1 < 0) x1 = 0; + if (y1 < 0) y1 = 0; + if (x2 >= gps->dimx) x2 = gps->dimx-1; + if (y2 >= gps->dimy) y2 = gps->dimy-1; + if (x1 > x2 || y1 > y2) return false; + + for (int x = x1; x <= x2; x++) + { + int index = x*gps->dimy; + + for (int y = y1; y <= y2; y++) + doSetTile(pen, index+y); + } + + return true; +} + +bool Screen::drawBorder(const std::string &title) +{ + if (!gps) return false; + + int dimx = gps->dimx, dimy = gps->dimy; + Pen border(0xDB, 8); + Pen text(0, 0, 7); + Pen signature(0, 0, 8); + + for (int x = 0; x < dimx; x++) + { + doSetTile(border, x * dimy + 0); + doSetTile(border, x * dimy + dimy - 1); + } + for (int y = 0; y < dimy; y++) + { + doSetTile(border, 0 * dimy + y); + doSetTile(border, (dimx - 1) * dimy + y); + } + + paintString(signature, dimx-8, dimy-1, "DFHack"); + + return paintString(text, (dimx - title.length()) / 2, 0, title); +} + +bool Screen::clear() +{ + if (!gps) return false; + + return fillRect(Pen(' ',0,0,false), 0, 0, gps->dimx-1, gps->dimy-1); +} + +bool Screen::invalidate() +{ + if (!enabler) return false; + + enabler->flag.bits.render = true; + return true; +} + +bool Screen::findGraphicsTile(const std::string &pagename, int x, int y, int *ptile, int *pgs) +{ + if (!gps || !texture || x < 0 || y < 0) return false; + + for (size_t i = 0; i < texture->page.size(); i++) + { + auto page = texture->page[i]; + if (!page->loaded || page->token != pagename) continue; + + if (x >= page->page_dim_x || y >= page->page_dim_y) + break; + int idx = y*page->page_dim_x + x; + if (size_t(idx) >= page->texpos.size()) + break; + + if (ptile) *ptile = page->texpos[idx]; + if (pgs) *pgs = page->texpos_gs[idx]; + return true; + } + + return false; +} + +bool Screen::show(df::viewscreen *screen, df::viewscreen *before) +{ + CHECK_NULL_POINTER(screen); + CHECK_INVALID_ARGUMENT(!screen->parent && !screen->child); + + if (!gps || !gview) return false; + + df::viewscreen *parent = &gview->view; + while (parent && parent->child != before) + parent = parent->child; + + if (!parent) return false; + + gps->force_full_display_count += 2; + + screen->child = parent->child; + screen->parent = parent; + parent->child = screen; + if (screen->child) + screen->child->parent = screen; + + if (dfhack_viewscreen::is_instance(screen)) + static_cast<dfhack_viewscreen*>(screen)->onShow(); + + return true; +} + +void Screen::dismiss(df::viewscreen *screen, bool to_first) +{ + CHECK_NULL_POINTER(screen); + + if (screen->breakdown_level != interface_breakdown_types::NONE) + return; + + if (to_first) + screen->breakdown_level = interface_breakdown_types::TOFIRST; + else + screen->breakdown_level = interface_breakdown_types::STOPSCREEN; + + if (dfhack_viewscreen::is_instance(screen)) + static_cast<dfhack_viewscreen*>(screen)->onDismiss(); +} + +bool Screen::isDismissed(df::viewscreen *screen) +{ + CHECK_NULL_POINTER(screen); + + return screen->breakdown_level != interface_breakdown_types::NONE; +} + +/* + * Base DFHack viewscreen. + */ + +static std::set<df::viewscreen*> dfhack_screens; + +dfhack_viewscreen::dfhack_viewscreen() : text_input_mode(false) +{ + dfhack_screens.insert(this); + + last_size = Screen::getWindowSize(); +} + +dfhack_viewscreen::~dfhack_viewscreen() +{ + dfhack_screens.erase(this); +} + +bool dfhack_viewscreen::is_instance(df::viewscreen *screen) +{ + return dfhack_screens.count(screen) != 0; +} + +void dfhack_viewscreen::check_resize() +{ + auto size = Screen::getWindowSize(); + + if (size != last_size) + { + last_size = size; + resize(size.x, size.y); + } +} + +void dfhack_viewscreen::logic() +{ + check_resize(); + + // Various stuff works poorly unless always repainting + Screen::invalidate(); +} + +void dfhack_viewscreen::render() +{ + check_resize(); +} + +bool dfhack_viewscreen::key_conflict(df::interface_key key) +{ + if (key == interface_key::OPTIONS) + return true; + + if (text_input_mode) + { + if (key == interface_key::HELP || key == interface_key::MOVIES) + return true; + } + + return false; +} + +/* + * Lua-backed viewscreen. + */ + +static int DFHACK_LUA_VS_TOKEN = 0; + +df::viewscreen *dfhack_lua_viewscreen::get_pointer(lua_State *L, int idx, bool make) +{ + df::viewscreen *screen; + + if (lua_istable(L, idx)) + { + if (!Lua::IsCoreContext(L)) + luaL_error(L, "only the core context can create lua screens"); + + lua_rawgetp(L, idx, &DFHACK_LUA_VS_TOKEN); + + if (!lua_isnil(L, -1)) + { + if (make) + luaL_error(L, "this screen is already on display"); + + screen = (df::viewscreen*)lua_touserdata(L, -1); + } + else + { + if (!make) + luaL_error(L, "this screen is not on display"); + + screen = new dfhack_lua_viewscreen(L, idx); + } + + lua_pop(L, 1); + } + else + screen = Lua::CheckDFObject<df::viewscreen>(L, idx); + + return screen; +} + +bool dfhack_lua_viewscreen::safe_call_lua(int (*pf)(lua_State *), int args, int rvs) +{ + CoreSuspendClaimer suspend; + color_ostream_proxy out(Core::getInstance().getConsole()); + + auto L = Lua::Core::State; + lua_pushcfunction(L, pf); + if (args > 0) lua_insert(L, -args-1); + lua_pushlightuserdata(L, this); + if (args > 0) lua_insert(L, -args-1); + + return Lua::Core::SafeCall(out, args+1, rvs); +} + +dfhack_lua_viewscreen *dfhack_lua_viewscreen::get_self(lua_State *L) +{ + auto self = (dfhack_lua_viewscreen*)lua_touserdata(L, 1); + lua_rawgetp(L, LUA_REGISTRYINDEX, self); + if (!lua_istable(L, -1)) return NULL; + return self; +} + +int dfhack_lua_viewscreen::do_destroy(lua_State *L) +{ + auto self = get_self(L); + if (!self) return 0; + + lua_pushnil(L); + lua_rawsetp(L, LUA_REGISTRYINDEX, self); + + lua_pushnil(L); + lua_rawsetp(L, -2, &DFHACK_LUA_VS_TOKEN); + lua_pushnil(L); + lua_setfield(L, -2, "_native"); + + lua_getfield(L, -1, "onDestroy"); + if (lua_isnil(L, -1)) + return 0; + + lua_pushvalue(L, -2); + lua_call(L, 1, 0); + return 0; +} + +void dfhack_lua_viewscreen::update_focus(lua_State *L, int idx) +{ + lua_getfield(L, idx, "text_input_mode"); + text_input_mode = lua_toboolean(L, -1); + lua_pop(L, 1); + + lua_getfield(L, idx, "focus_path"); + auto str = lua_tostring(L, -1); + if (!str) str = ""; + focus = str; + lua_pop(L, 1); + + if (focus.empty()) + focus = "lua"; + else + focus = "lua/"+focus; +} + +int dfhack_lua_viewscreen::do_render(lua_State *L) +{ + auto self = get_self(L); + if (!self) return 0; + + lua_getfield(L, -1, "onRender"); + + if (lua_isnil(L, -1)) + { + Screen::clear(); + return 0; + } + + lua_pushvalue(L, -2); + lua_call(L, 1, 0); + return 0; +} + +int dfhack_lua_viewscreen::do_notify(lua_State *L) +{ + int args = lua_gettop(L); + + auto self = get_self(L); + if (!self) return 0; + + lua_pushvalue(L, 2); + lua_gettable(L, -2); + if (lua_isnil(L, -1)) + return 0; + + // self field args table fn -> table fn table args + lua_replace(L, 1); + lua_copy(L, -1, 2); + lua_insert(L, 1); + lua_call(L, args-1, 1); + + self->update_focus(L, 1); + return 1; +} + +int dfhack_lua_viewscreen::do_input(lua_State *L) +{ + auto self = get_self(L); + if (!self) return 0; + + auto keys = (std::set<df::interface_key>*)lua_touserdata(L, 2); + + lua_getfield(L, -1, "onInput"); + + if (lua_isnil(L, -1)) + { + if (keys->count(interface_key::LEAVESCREEN)) + Screen::dismiss(self); + + return 0; + } + + lua_pushvalue(L, -2); + + lua_createtable(L, 0, keys->size()+3); + + for (auto it = keys->begin(); it != keys->end(); ++it) + { + auto key = *it; + + if (auto name = enum_item_raw_key(key)) + lua_pushstring(L, name); + else + lua_pushinteger(L, key); + + lua_pushboolean(L, true); + lua_rawset(L, -3); + + if (key >= interface_key::STRING_A000 && + key <= interface_key::STRING_A255) + { + lua_pushinteger(L, key - interface_key::STRING_A000); + lua_setfield(L, -2, "_STRING"); + } + } + + if (enabler && enabler->tracking_on) + { + if (enabler->mouse_lbut) { + lua_pushboolean(L, true); + lua_setfield(L, -2, "_MOUSE_L"); + } + if (enabler->mouse_rbut) { + lua_pushboolean(L, true); + lua_setfield(L, -2, "_MOUSE_R"); + } + } + + lua_call(L, 2, 0); + self->update_focus(L, -1); + return 0; +} + +dfhack_lua_viewscreen::dfhack_lua_viewscreen(lua_State *L, int table_idx) +{ + assert(Lua::IsCoreContext(L)); + + Lua::PushDFObject(L, (df::viewscreen*)this); + lua_setfield(L, table_idx, "_native"); + lua_pushlightuserdata(L, this); + lua_rawsetp(L, table_idx, &DFHACK_LUA_VS_TOKEN); + + lua_pushvalue(L, table_idx); + lua_rawsetp(L, LUA_REGISTRYINDEX, this); + + update_focus(L, table_idx); +} + +dfhack_lua_viewscreen::~dfhack_lua_viewscreen() +{ + safe_call_lua(do_destroy, 0, 0); +} + +void dfhack_lua_viewscreen::render() +{ + if (Screen::isDismissed(this)) return; + + dfhack_viewscreen::render(); + + safe_call_lua(do_render, 0, 0); +} + +void dfhack_lua_viewscreen::logic() +{ + if (Screen::isDismissed(this)) return; + + dfhack_viewscreen::logic(); + + lua_pushstring(Lua::Core::State, "onIdle"); + safe_call_lua(do_notify, 1, 0); +} + +void dfhack_lua_viewscreen::help() +{ + if (Screen::isDismissed(this)) return; + + lua_pushstring(Lua::Core::State, "onHelp"); + safe_call_lua(do_notify, 1, 0); +} + +void dfhack_lua_viewscreen::resize(int w, int h) +{ + if (Screen::isDismissed(this)) return; + + auto L = Lua::Core::State; + lua_pushstring(L, "onResize"); + lua_pushinteger(L, w); + lua_pushinteger(L, h); + safe_call_lua(do_notify, 3, 0); +} + +void dfhack_lua_viewscreen::feed(std::set<df::interface_key> *keys) +{ + if (Screen::isDismissed(this)) return; + + lua_pushlightuserdata(Lua::Core::State, keys); + safe_call_lua(do_input, 1, 0); +} + +void dfhack_lua_viewscreen::onShow() +{ + lua_pushstring(Lua::Core::State, "onShow"); + safe_call_lua(do_notify, 1, 0); +} + +void dfhack_lua_viewscreen::onDismiss() +{ + lua_pushstring(Lua::Core::State, "onDismiss"); + safe_call_lua(do_notify, 1, 0); +} diff --git a/library/modules/Units.cpp b/library/modules/Units.cpp index 308700fb..282157a3 100644 --- a/library/modules/Units.cpp +++ b/library/modules/Units.cpp @@ -948,3 +948,40 @@ std::string DFHack::Units::getCasteProfessionName(int race, int casteid, df::pro return Translation::capitalize(prof, true); } + +int8_t DFHack::Units::getProfessionColor(df::unit *unit, bool ignore_noble) +{ + std::vector<NoblePosition> np; + + if (!ignore_noble && getNoblePositions(&np, unit)) + { + if (np[0].position->flags.is_set(entity_position_flags::COLOR)) + return np[0].position->color[0] + np[0].position->color[2] * 8; + } + + return getCasteProfessionColor(unit->race, unit->caste, unit->profession); +} + +int8_t DFHack::Units::getCasteProfessionColor(int race, int casteid, df::profession pid) +{ + // make sure it's an actual profession + if (pid < 0 || !is_valid_enum_item(pid)) + return 3; + + // If it's not a Peasant, it's hardcoded + if (pid != profession::STANDARD) + return ENUM_ATTR(profession, color, pid); + + if (auto creature = df::creature_raw::find(race)) + { + if (auto caste = vector_get(creature->caste, casteid)) + { + if (caste->flags.is_set(caste_raw_flags::CASTE_COLOR)) + return caste->caste_color[0] + caste->caste_color[2] * 8; + } + return creature->color[0] + creature->color[2] * 8; + } + + // default to dwarven peasant color + return 3; +} diff --git a/library/xml b/library/xml -Subproject ad38c5e96b05fedf16114fd16bd463e933f1358 +Subproject abcb667bc832048552d8cbc8f4830936f8b6339 diff --git a/package/linux/dfhack b/package/linux/dfhack index d8790eac..cfb57153 100755 --- a/package/linux/dfhack +++ b/package/linux/dfhack @@ -14,8 +14,6 @@ # DF_GDB_OPTS: Options to pass to gdb, if it's being run # DF_VALGRIND_OPTS: Options to pass to valgrind, if it's being run # DF_HELGRIND_OPTS: Options to pass to helgrind, if it's being run -# DF_RESET_OPTS: Options to pass the reset command at the end of -# this script # DF_POST_CMD: Shell command to be run at very end of script DF_DIR=$(dirname "$0") @@ -33,6 +31,9 @@ if [ -r "./$RC" ]; then . "./$RC" fi +# Save current terminal settings +old_tty_settings=$(stty -g) + # Now run export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"./stonesense/deplibs":"./hack" @@ -67,8 +68,9 @@ case "$1" in ;; esac -# Reset terminal to sane state in case of a crash -# reset $DF_RESET_OPTS +# Restore previous terminal settings +stty "$old_tty_settings" +echo -e "\n" if [ -n "$DF_POST_CMD" ]; then eval $DF_POST_CMD diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 6de03e49..023cd6e8 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -10,7 +10,7 @@ if(BUILD_DFUSION) add_subdirectory (Dfusion) endif() -OPTION(BUILD_STONESENSE "Build stonesense (needs a checkout first)." ON) +OPTION(BUILD_STONESENSE "Build stonesense (needs a checkout first)." OFF) if(BUILD_STONESENSE) add_subdirectory (stonesense) endif() @@ -110,6 +110,7 @@ if (BUILD_SUPPORTED) DFHACK_PLUGIN(catsplosion catsplosion.cpp) DFHACK_PLUGIN(regrass regrass.cpp) DFHACK_PLUGIN(forceequip forceequip.cpp) + DFHACK_PLUGIN(manipulator manipulator.cpp) # this one exports functions to lua DFHACK_PLUGIN(burrows burrows.cpp LINK_LIBRARIES lua) DFHACK_PLUGIN(sort sort.cpp LINK_LIBRARIES lua) diff --git a/plugins/Dfusion/dfusion.cpp b/plugins/Dfusion/dfusion.cpp index 2b36a974..78c3fa8d 100644 --- a/plugins/Dfusion/dfusion.cpp +++ b/plugins/Dfusion/dfusion.cpp @@ -1,5 +1,4 @@ #include "Core.h" -#include "Console.h" #include "Export.h" #include "PluginManager.h" #include "MemAccess.h" @@ -12,7 +11,6 @@ #include "luamain.h" -#include "lua_Console.h" #include "lua_Process.h" #include "lua_Hexsearch.h" #include "lua_Misc.h" @@ -50,7 +48,6 @@ DFhackCExport command_result plugin_init (color_ostream &out, std::vector <Plugi //maybe remake it to run automaticaly Lua::Open(out, st); - lua::RegisterConsole(st); lua::RegisterProcess(st); lua::RegisterHexsearch(st); lua::RegisterMisc(st); diff --git a/plugins/Dfusion/include/lua_Console.h b/plugins/Dfusion/include/lua_Console.h deleted file mode 100644 index c6ac5011..00000000 --- a/plugins/Dfusion/include/lua_Console.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef LUA_CONSOLE_H -#define LUA_CONSOLE_H -#include <Console.h> -#include "luamain.h" - -namespace lua -{ - -void RegisterConsole(lua::state &st); - -} - -#endif
\ No newline at end of file diff --git a/plugins/Dfusion/luafiles/common.lua b/plugins/Dfusion/luafiles/common.lua index 951468bc..7e621c4e 100644 --- a/plugins/Dfusion/luafiles/common.lua +++ b/plugins/Dfusion/luafiles/common.lua @@ -8,7 +8,7 @@ DOUBLE=5 FLOAT=6 getline=function (inp) -return Console.lineedit(inp or "") +return dfhack.lineedit(inp or "") end io.stdin=nil @@ -36,7 +36,7 @@ function GetTextRegion() --if num>=100 then --print(string.format("%d %x->%x %s %s",k,v["start"],v["end"],v.name or "",flgs)) --end - local pos=string.find(v.name,".text") or string.find(v.name,"libs/Dwarf_Fortress") + local pos=string.find(v.name,"Dwarf Fortress.exe") or string.find(v.name,"libs/Dwarf_Fortress") if(pos~=nil) and v["execute"] then __TEXT=v; return v; @@ -99,6 +99,7 @@ function SetExecute(pos) UpdateRanges() local reg=GetRegionIn(pos) reg.execute=true + reg["write"]=true Process.setPermisions(reg,reg) -- TODO maybe make a page with only execute permisions or sth end -- engine bindings @@ -224,6 +225,11 @@ function engine.LoadModData(file) end return T2 end +function engine.FindMarkerCall(moddata,name) + if moddata.symbols[name] ~=nil then + return moddata.symbols[name]+1 + end +end function engine.FindMarker(moddata,name) if moddata.symbols[name] ~=nil then return engine.findmarker(0xDEADBEEF,moddata.data,moddata.size,moddata.symbols[name]) diff --git a/plugins/Dfusion/luafiles/editor.lua b/plugins/Dfusion/luafiles/editor.lua index 1f004b2d..06b07ce5 100644 --- a/plugins/Dfusion/luafiles/editor.lua +++ b/plugins/Dfusion/luafiles/editor.lua @@ -127,7 +127,7 @@ function EditDF() tbl[i]={k,getTypename(v)} i=i+1 end - number=Console.lineedit("select item to edit (q to quit):") + number=dfhack.lineedit("select item to edit (q to quit):") if number and tonumber(number) then local entry=tbl[tonumber(number)] if entry==nil then diff --git a/plugins/Dfusion/luafiles/init.lua b/plugins/Dfusion/luafiles/init.lua index e68684bf..19f63d60 100644 --- a/plugins/Dfusion/luafiles/init.lua +++ b/plugins/Dfusion/luafiles/init.lua @@ -1,7 +1,3 @@ -Console.print = dfhack.print -Console.println = dfhack.println -Console.printerr = dfhack.printerr - function err(msg) --make local maybe... print(msg) print(debug.traceback()) @@ -30,13 +26,13 @@ function loadall(t1) --loads all non interactive plugin parts, so that later the end end function mainmenu(t1) - --Console.clear() + while true do print("No. Name Desc") for k,v in pairs(t1) do print(string.format("%3d %15s %s",k,v[1],v[2])) end - local q=Console.lineedit("Select plugin to run (q to quit):") + local q=dfhack.lineedit("Select plugin to run (q to quit):") if q=='q' then return end q=tonumber(q) if q~=nil then @@ -81,7 +77,7 @@ table.insert(plugins,{"migrants","multi race imigrations"}) --table.insert(plugins,{"onfunction","run lua on some df function"}) --table.insert(plugins,{"editor","edit internals of df",EditDF}) table.insert(plugins,{"saves","run current worlds's init.lua",RunSaved}) -table.insert(plugins,{"adv_tools","some tools for (mainly) advneturer hacking"}) +table.insert(plugins,{"adv_tools","some tools for (mainly) adventurer hacking"}) loadall(plugins) dofile_silent("dfusion/initcustom.lua") @@ -92,7 +88,7 @@ local f,err=load(table.concat(args,' ')) if f then f() else - Console.printerr(err) + dfhack.printerr(err) end if not INIT then diff --git a/plugins/Dfusion/luafiles/onfunction/compile.bat b/plugins/Dfusion/luafiles/onfunction/compile.bat deleted file mode 100644 index f06fb8c4..00000000 --- a/plugins/Dfusion/luafiles/onfunction/compile.bat +++ /dev/null @@ -1 +0,0 @@ -as -anl --32 -o functions.o functions.asm
\ No newline at end of file diff --git a/plugins/Dfusion/luafiles/onfunction/functions.asm b/plugins/Dfusion/luafiles/onfunction/functions.asm deleted file mode 100644 index 13ef2319..00000000 --- a/plugins/Dfusion/luafiles/onfunction/functions.asm +++ /dev/null @@ -1,23 +0,0 @@ -.intel_syntax -push eax -push ebp -push esp -push esi -push edi -push edx -push ecx -push ebx -push eax -mov eax,[esp+36] -push eax -function: -call 0xdeadbee0 -function2: -mov [0xdeadbeef],eax -pop eax -function3: -jmp [0xdeadbeef] - - - - diff --git a/plugins/Dfusion/luafiles/onfunction/functions.o b/plugins/Dfusion/luafiles/onfunction/functions.o Binary files differdeleted file mode 100644 index 7b7d4a33..00000000 --- a/plugins/Dfusion/luafiles/onfunction/functions.o +++ /dev/null diff --git a/plugins/Dfusion/luafiles/onfunction/init.lua b/plugins/Dfusion/luafiles/onfunction/init.lua deleted file mode 100644 index a32f6efc..00000000 --- a/plugins/Dfusion/luafiles/onfunction/init.lua +++ /dev/null @@ -1,68 +0,0 @@ -onfunction=onfunction or {} -function onfunction.install() - ModData=engine.installMod("dfusion/onfunction/functions.o","functions",4) - modpos=ModData.pos - modsize=ModData.size - onfunction.pos=modpos - trgpos=engine.getpushvalue() - print(string.format("Function installed in:%x function to call is: %x",modpos,trgpos)) - local firstpos=modpos+engine.FindMarker(ModData,"function") - engine.poked(firstpos,trgpos-firstpos-4) --call Lua-Onfunction - onfunction.fpos=modpos+engine.FindMarker(ModData,"function3") - engine.poked(modpos+engine.FindMarker(ModData,"function2"),modpos+modsize) - engine.poked(onfunction.fpos,modpos+modsize) - SetExecute(modpos) - onfunction.calls={} - onfunction.functions={} - onfunction.names={} - onfunction.hints={} -end -function OnFunction(values) - --[=[print("Onfunction called!") - print("Data:") - for k,v in pairs(values) do - print(string.format("%s=%x",k,v)) - end - print("stack:") - for i=0,3 do - print(string.format("%d %x",i,engine.peekd(values.esp+i*4))) - end - --]=] - if onfunction.functions[values.ret] ~=nil then - onfunction.functions[values.ret](values) - end - - return onfunction.calls[values.ret] --returns real function to call -end -function onfunction.patch(addr) - - if(engine.peekb(addr)~=0xe8) then - error("Incorrect address, not a function call") - else - onfunction.calls[addr+5]=addr+engine.peekd(addr+1)+5 --adds real function to call - engine.poked(addr+1,engine.getmod("functions")-addr-5) - end -end -function onfunction.AddFunction(addr,name,hints) - onfunction.patch(addr) - onfunction.names[name]=addr+5 - if hints~=nil then - onfunction.hints[name]=hints - end -end -function onfunction.ReadHint(values,name,hintname) - local hints=onfunction.hints[name] - if hints ==nil then return nil end - local hint=hints[hintname] - if type(hint)=="string" then return values[hint] end - local off=hint.off or 0 - return engine.peek(off+values[hint.reg],hints[hintname].rtype) -end -function onfunction.SetCallback(name,func) - if onfunction.names[name]==nil then - error("No such function:"..name) - else - onfunction.functions[onfunction.names[name]]=func - end -end - diff --git a/plugins/Dfusion/luafiles/onfunction/locations.lua b/plugins/Dfusion/luafiles/onfunction/locations.lua deleted file mode 100644 index 362bfd7a..00000000 --- a/plugins/Dfusion/luafiles/onfunction/locations.lua +++ /dev/null @@ -1,16 +0,0 @@ -if WINDOWS then --windows function defintions - --[=[onfunction.AddFunction(0x55499D+offsets.base(),"Move") --on creature move found with "watch mem=xcoord" - onfunction.AddFunction(0x275933+offsets.base(),"Die",{creature="edi"}) --on creature death? found by watching dead flag then stepping until new function - onfunction.AddFunction(0x2c1834+offsets.base(),"CreateCreature",{protocreature="eax"}) --arena - onfunction.AddFunction(0x349640+offsets.base(),"AddItem",{item="esp"}) --or esp - onfunction.AddFunction(0x26e840+offsets.base(),"Dig_Create",{item_type="esp"}) --esp+8 -> material esp->block type - onfunction.AddFunction(0x3d4301+offsets.base(),"Make_Item",{item_type="esp"}) - onfunction.AddFunction(0x5af826+offsets.base(),"Hurt",{target="esi",attacker={off=0x74,rtype=DWORD,reg="esp"}}) - onfunction.AddFunction(0x3D5886+offsets.base(),"Flip",{building="esi"}) - onfunction.AddFunction(0x35E340+offsets.base(),"ItemCreate")--]=] - --onfunction.AddFunction(0x4B34B6+offsets.base(),"ReactionFinish") --esp item. Ecx creature, edx? 0.34.07 - onfunction.AddFunction(0x72aB6+offsets.base(),"Die",{creature="edi"}) --0.34.07 -else --linux - --[=[onfunction.AddFunction(0x899befe+offsets.base(),"Move") -- found out by attaching watch... - onfunction.AddFunction(0x850eecd+offsets.base(),"Die",{creature="ebx"}) -- same--]=] -end diff --git a/plugins/Dfusion/luafiles/onfunction/plugin.lua b/plugins/Dfusion/luafiles/onfunction/plugin.lua deleted file mode 100644 index 60360817..00000000 --- a/plugins/Dfusion/luafiles/onfunction/plugin.lua +++ /dev/null @@ -1,15 +0,0 @@ -mypos=engine.getmod("functions") -function DeathMsg(values) - local name - local u=engine.cast(df.unit,values[onfunction.hints["Die"].creature]) - - print(u.name.first_name.." died") -end -if mypos then - print("Onfunction already installed") - --onfunction.patch(0x189dd6+offsets.base()) -else - onfunction.install() - dofile("dfusion/onfunction/locations.lua") - onfunction.SetCallback("Die",DeathMsg) -end diff --git a/plugins/Dfusion/src/lua_Console.cpp b/plugins/Dfusion/src/lua_Console.cpp deleted file mode 100644 index 1d52d615..00000000 --- a/plugins/Dfusion/src/lua_Console.cpp +++ /dev/null @@ -1,131 +0,0 @@ -#include "LuaTools.h" - -#include "lua_Console.h" - -#include <sstream> - -//TODO error management. Using lua error? or something other? -static DFHack::color_ostream* GetConsolePtr(lua::state &st) -{ - return DFHack::Lua::GetOutput(st); -} - -static int lua_Console_clear(lua_State *S) -{ - lua::state st(S); - DFHack::color_ostream* c=GetConsolePtr(st); - c->clear(); - return 0; -} -static int lua_Console_gotoxy(lua_State *S) -{ - lua::state st(S); - DFHack::color_ostream* c=GetConsolePtr(st); - if(c->is_console()) - { - DFHack::Console* con=static_cast<DFHack::Console*>(c); - con->gotoxy(st.as<int>(1,1),st.as<int>(1,2)); - } - return 0; -} -static int lua_Console_color(lua_State *S) -{ - lua::state st(S); - DFHack::color_ostream* c=GetConsolePtr(st); - c->color( static_cast<DFHack::Console::color_value>(st.as<int>(-1,1)) ); - return 0; -} -static int lua_Console_reset_color(lua_State *S) -{ - lua::state st(S); - DFHack::color_ostream* c=GetConsolePtr(st); - c->reset_color(); - return 0; -} -static int lua_Console_cursor(lua_State *S) -{ - lua::state st(S); - DFHack::color_ostream* c=GetConsolePtr(st); - if(c->is_console()) - { - DFHack::Console* con=static_cast<DFHack::Console*>(c); - con->cursor(st.as<bool>(1)); - } - return 0; -} -static int lua_Console_msleep(lua_State *S) -{ - lua::state st(S); - DFHack::color_ostream* c=GetConsolePtr(st); - if(c->is_console()) - { - DFHack::Console* con=static_cast<DFHack::Console*>(c); - con->msleep(st.as<unsigned>(1)); - } - return 0; -} -static int lua_Console_get_columns(lua_State *S) -{ - lua::state st(S); - DFHack::color_ostream* c=GetConsolePtr(st); - if(c->is_console()) - { - DFHack::Console* con=static_cast<DFHack::Console*>(c); - st.push(con->get_columns()); - } - return 1; -} -static int lua_Console_get_rows(lua_State *S) -{ - lua::state st(S); - DFHack::color_ostream* c=GetConsolePtr(st); - if(c->is_console()) - { - DFHack::Console* con=static_cast<DFHack::Console*>(c); - st.push(con->get_rows()); - } - return 1; -} -static int lua_Console_lineedit(lua_State *S) -{ - lua::state st(S); - DFHack::color_ostream* c=GetConsolePtr(st); - if(c->is_console()) - { - DFHack::Console* con=static_cast<DFHack::Console*>(c); - string ret; - DFHack::CommandHistory hist; - int i=con->lineedit(st.as<string>(1),ret,hist); - st.push(ret); - st.push(i); - return 2;// dunno if len is needed... - } - else - return 0; -} -const luaL_Reg lua_console_func[]= -{ - {"clear",lua_Console_clear}, - {"gotoxy",lua_Console_gotoxy}, - {"color",lua_Console_color}, - {"reset_color",lua_Console_reset_color}, - {"cursor",lua_Console_cursor}, - {"msleep",lua_Console_msleep}, - {"get_columns",lua_Console_get_columns}, - {"get_rows",lua_Console_get_rows}, - {"lineedit",lua_Console_lineedit}, - {NULL,NULL} -}; -void lua::RegisterConsole(lua::state &st) -{ - st.getglobal("Console"); - if(st.is<lua::nil>()) - { - st.pop(); - st.newtable(); - } - - lua::RegFunctionsLocal(st, lua_console_func); - //TODO add color consts - st.setglobal("Console"); -} diff --git a/plugins/advtools.cpp b/plugins/advtools.cpp index 4823d362..d674f552 100644 --- a/plugins/advtools.cpp +++ b/plugins/advtools.cpp @@ -462,7 +462,7 @@ void joinCounts(std::map<df::coord, int> &counts) static void printCompanionHeader(color_ostream &out, size_t i, df::unit *unit) { - out.color(Console::COLOR_GREY); + out.color(COLOR_GREY); if (i < 28) out << char('a'+i); diff --git a/plugins/autodump.cpp b/plugins/autodump.cpp index 536b2501..cfb73fa8 100644 --- a/plugins/autodump.cpp +++ b/plugins/autodump.cpp @@ -140,7 +140,7 @@ static command_result autodump_main(color_ostream &out, vector <string> & parame return CR_FAILURE; } df::tiletype ttype = MC.tiletypeAt(pos_cursor); - if(!DFHack::isFloorTerrain(ttype)) + if(!DFHack::isWalkable(ttype) || DFHack::isOpenTerrain(ttype)) { out.printerr("Cursor should be placed over a floor.\n"); return CR_FAILURE; diff --git a/plugins/autolabor.cpp b/plugins/autolabor.cpp index 5536335c..c3a2b313 100644 --- a/plugins/autolabor.cpp +++ b/plugins/autolabor.cpp @@ -31,9 +31,16 @@ #include <df/entity_position_assignment.h> #include <df/entity_position.h> #include <df/building_tradedepotst.h> +#include <df/building_stockpilest.h> +#include <df/items_other_id.h> +#include <df/ui.h> +#include <df/activity_info.h> #include <MiscUtils.h> +#include "modules/MapCache.h" +#include "modules/Items.h" + using std::string; using std::endl; using namespace DFHack; @@ -89,266 +96,268 @@ command_result autolabor (color_ostream &out, std::vector <std::string> & parame // The name string provided must correspond to the filename - autolabor.plug.so or autolabor.plug.dll in this case DFHACK_PLUGIN("autolabor"); +static void generate_labor_to_skill_map(); + enum labor_mode { - DISABLE, - HAULERS, - AUTOMATIC, + DISABLE, + HAULERS, + AUTOMATIC, }; enum dwarf_state { - // Ready for a new task - IDLE, + // Ready for a new task + IDLE, - // Busy with a useful task - BUSY, + // Busy with a useful task + BUSY, - // In the military, can't work - MILITARY, + // In the military, can't work + MILITARY, - // Child or noble, can't work - CHILD, + // Child or noble, can't work + CHILD, - // Doing something that precludes working, may be busy for a while - OTHER + // Doing something that precludes working, may be busy for a while + OTHER }; const int NUM_STATE = 5; static const char *state_names[] = { - "IDLE", - "BUSY", - "MILITARY", - "CHILD", - "OTHER", + "IDLE", + "BUSY", + "MILITARY", + "CHILD", + "OTHER", }; static const dwarf_state dwarf_states[] = { - BUSY /* CarveFortification */, - BUSY /* DetailWall */, - BUSY /* DetailFloor */, - BUSY /* Dig */, - BUSY /* CarveUpwardStaircase */, - BUSY /* CarveDownwardStaircase */, - BUSY /* CarveUpDownStaircase */, - BUSY /* CarveRamp */, - BUSY /* DigChannel */, - BUSY /* FellTree */, - BUSY /* GatherPlants */, - BUSY /* RemoveConstruction */, - BUSY /* CollectWebs */, - BUSY /* BringItemToDepot */, - BUSY /* BringItemToShop */, - OTHER /* Eat */, - OTHER /* GetProvisions */, - OTHER /* Drink */, - OTHER /* Drink2 */, - OTHER /* FillWaterskin */, - OTHER /* FillWaterskin2 */, - OTHER /* Sleep */, - BUSY /* CollectSand */, - BUSY /* Fish */, - BUSY /* Hunt */, - OTHER /* HuntVermin */, - BUSY /* Kidnap */, - BUSY /* BeatCriminal */, - BUSY /* StartingFistFight */, - BUSY /* CollectTaxes */, - BUSY /* GuardTaxCollector */, - BUSY /* CatchLiveLandAnimal */, - BUSY /* CatchLiveFish */, - BUSY /* ReturnKill */, - BUSY /* CheckChest */, - BUSY /* StoreOwnedItem */, - BUSY /* PlaceItemInTomb */, - BUSY /* StoreItemInStockpile */, - BUSY /* StoreItemInBag */, - BUSY /* StoreItemInHospital */, - BUSY /* StoreItemInChest */, - BUSY /* StoreItemInCabinet */, - BUSY /* StoreWeapon */, - BUSY /* StoreArmor */, - BUSY /* StoreItemInBarrel */, - BUSY /* StoreItemInBin */, - BUSY /* SeekArtifact */, - BUSY /* SeekInfant */, - OTHER /* AttendParty */, - OTHER /* GoShopping */, - OTHER /* GoShopping2 */, - BUSY /* Clean */, - OTHER /* Rest */, - BUSY /* PickupEquipment */, - BUSY /* DumpItem */, - OTHER /* StrangeMoodCrafter */, - OTHER /* StrangeMoodJeweller */, - OTHER /* StrangeMoodForge */, - OTHER /* StrangeMoodMagmaForge */, - OTHER /* StrangeMoodBrooding */, - OTHER /* StrangeMoodFell */, - OTHER /* StrangeMoodCarpenter */, - OTHER /* StrangeMoodMason */, - OTHER /* StrangeMoodBowyer */, - OTHER /* StrangeMoodTanner */, - OTHER /* StrangeMoodWeaver */, - OTHER /* StrangeMoodGlassmaker */, - OTHER /* StrangeMoodMechanics */, - BUSY /* ConstructBuilding */, - BUSY /* ConstructDoor */, - BUSY /* ConstructFloodgate */, - BUSY /* ConstructBed */, - BUSY /* ConstructThrone */, - BUSY /* ConstructCoffin */, - BUSY /* ConstructTable */, - BUSY /* ConstructChest */, - BUSY /* ConstructBin */, - BUSY /* ConstructArmorStand */, - BUSY /* ConstructWeaponRack */, - BUSY /* ConstructCabinet */, - BUSY /* ConstructStatue */, - BUSY /* ConstructBlocks */, - BUSY /* MakeRawGlass */, - BUSY /* MakeCrafts */, - BUSY /* MintCoins */, - BUSY /* CutGems */, - BUSY /* CutGlass */, - BUSY /* EncrustWithGems */, - BUSY /* EncrustWithGlass */, - BUSY /* DestroyBuilding */, - BUSY /* SmeltOre */, - BUSY /* MeltMetalObject */, - BUSY /* ExtractMetalStrands */, - BUSY /* PlantSeeds */, - BUSY /* HarvestPlants */, - BUSY /* TrainHuntingAnimal */, - BUSY /* TrainWarAnimal */, - BUSY /* MakeWeapon */, - BUSY /* ForgeAnvil */, - BUSY /* ConstructCatapultParts */, - BUSY /* ConstructBallistaParts */, - BUSY /* MakeArmor */, - BUSY /* MakeHelm */, - BUSY /* MakePants */, - BUSY /* StudWith */, - BUSY /* ButcherAnimal */, - BUSY /* PrepareRawFish */, - BUSY /* MillPlants */, - BUSY /* BaitTrap */, - BUSY /* MilkCreature */, - BUSY /* MakeCheese */, - BUSY /* ProcessPlants */, - BUSY /* ProcessPlantsBag */, - BUSY /* ProcessPlantsVial */, - BUSY /* ProcessPlantsBarrel */, - BUSY /* PrepareMeal */, - BUSY /* WeaveCloth */, - BUSY /* MakeGloves */, - BUSY /* MakeShoes */, - BUSY /* MakeShield */, - BUSY /* MakeCage */, - BUSY /* MakeChain */, - BUSY /* MakeFlask */, - BUSY /* MakeGoblet */, - BUSY /* MakeInstrument */, - BUSY /* MakeToy */, - BUSY /* MakeAnimalTrap */, - BUSY /* MakeBarrel */, - BUSY /* MakeBucket */, - BUSY /* MakeWindow */, - BUSY /* MakeTotem */, - BUSY /* MakeAmmo */, - BUSY /* DecorateWith */, - BUSY /* MakeBackpack */, - BUSY /* MakeQuiver */, - BUSY /* MakeBallistaArrowHead */, - BUSY /* AssembleSiegeAmmo */, - BUSY /* LoadCatapult */, - BUSY /* LoadBallista */, - BUSY /* FireCatapult */, - BUSY /* FireBallista */, - BUSY /* ConstructMechanisms */, - BUSY /* MakeTrapComponent */, - BUSY /* LoadCageTrap */, - BUSY /* LoadStoneTrap */, - BUSY /* LoadWeaponTrap */, - BUSY /* CleanTrap */, - BUSY /* CastSpell */, - BUSY /* LinkBuildingToTrigger */, - BUSY /* PullLever */, - BUSY /* BrewDrink */, - BUSY /* ExtractFromPlants */, - BUSY /* ExtractFromRawFish */, - BUSY /* ExtractFromLandAnimal */, - BUSY /* TameVermin */, - BUSY /* TameAnimal */, - BUSY /* ChainAnimal */, - BUSY /* UnchainAnimal */, - BUSY /* UnchainPet */, - BUSY /* ReleaseLargeCreature */, - BUSY /* ReleasePet */, - BUSY /* ReleaseSmallCreature */, - BUSY /* HandleSmallCreature */, - BUSY /* HandleLargeCreature */, - BUSY /* CageLargeCreature */, - BUSY /* CageSmallCreature */, - BUSY /* RecoverWounded */, - BUSY /* DiagnosePatient */, - BUSY /* ImmobilizeBreak */, - BUSY /* DressWound */, - BUSY /* CleanPatient */, - BUSY /* Surgery */, - BUSY /* Suture */, - BUSY /* SetBone */, - BUSY /* PlaceInTraction */, - BUSY /* DrainAquarium */, - BUSY /* FillAquarium */, - BUSY /* FillPond */, - BUSY /* GiveWater */, - BUSY /* GiveFood */, - BUSY /* GiveWater2 */, - BUSY /* GiveFood2 */, - BUSY /* RecoverPet */, - BUSY /* PitLargeAnimal */, - BUSY /* PitSmallAnimal */, - BUSY /* SlaughterAnimal */, - BUSY /* MakeCharcoal */, - BUSY /* MakeAsh */, - BUSY /* MakeLye */, - BUSY /* MakePotashFromLye */, - BUSY /* FertilizeField */, - BUSY /* MakePotashFromAsh */, - BUSY /* DyeThread */, - BUSY /* DyeCloth */, - BUSY /* SewImage */, - BUSY /* MakePipeSection */, - BUSY /* OperatePump */, - OTHER /* ManageWorkOrders */, - OTHER /* UpdateStockpileRecords */, - OTHER /* TradeAtDepot */, - BUSY /* ConstructHatchCover */, - BUSY /* ConstructGrate */, - BUSY /* RemoveStairs */, - BUSY /* ConstructQuern */, - BUSY /* ConstructMillstone */, - BUSY /* ConstructSplint */, - BUSY /* ConstructCrutch */, - BUSY /* ConstructTractionBench */, - BUSY /* CleanSelf */, - BUSY /* BringCrutch */, - BUSY /* ApplyCast */, - BUSY /* CustomReaction */, - BUSY /* ConstructSlab */, - BUSY /* EngraveSlab */, - BUSY /* ShearCreature */, - BUSY /* SpinThread */, - BUSY /* PenLargeAnimal */, - BUSY /* PenSmallAnimal */, - BUSY /* MakeTool */, - BUSY /* CollectClay */, - BUSY /* InstallColonyInHive */, - BUSY /* CollectHiveProducts */, - OTHER /* CauseTrouble */, - OTHER /* DrinkBlood */, - OTHER /* ReportCrime */, - OTHER /* ExecuteCriminal */, + BUSY /* CarveFortification */, + BUSY /* DetailWall */, + BUSY /* DetailFloor */, + BUSY /* Dig */, + BUSY /* CarveUpwardStaircase */, + BUSY /* CarveDownwardStaircase */, + BUSY /* CarveUpDownStaircase */, + BUSY /* CarveRamp */, + BUSY /* DigChannel */, + BUSY /* FellTree */, + BUSY /* GatherPlants */, + BUSY /* RemoveConstruction */, + BUSY /* CollectWebs */, + BUSY /* BringItemToDepot */, + BUSY /* BringItemToShop */, + OTHER /* Eat */, + OTHER /* GetProvisions */, + OTHER /* Drink */, + OTHER /* Drink2 */, + OTHER /* FillWaterskin */, + OTHER /* FillWaterskin2 */, + OTHER /* Sleep */, + BUSY /* CollectSand */, + BUSY /* Fish */, + BUSY /* Hunt */, + OTHER /* HuntVermin */, + BUSY /* Kidnap */, + BUSY /* BeatCriminal */, + BUSY /* StartingFistFight */, + BUSY /* CollectTaxes */, + BUSY /* GuardTaxCollector */, + BUSY /* CatchLiveLandAnimal */, + BUSY /* CatchLiveFish */, + BUSY /* ReturnKill */, + BUSY /* CheckChest */, + BUSY /* StoreOwnedItem */, + BUSY /* PlaceItemInTomb */, + BUSY /* StoreItemInStockpile */, + BUSY /* StoreItemInBag */, + BUSY /* StoreItemInHospital */, + BUSY /* StoreItemInChest */, + BUSY /* StoreItemInCabinet */, + BUSY /* StoreWeapon */, + BUSY /* StoreArmor */, + BUSY /* StoreItemInBarrel */, + BUSY /* StoreItemInBin */, + BUSY /* SeekArtifact */, + BUSY /* SeekInfant */, + OTHER /* AttendParty */, + OTHER /* GoShopping */, + OTHER /* GoShopping2 */, + BUSY /* Clean */, + OTHER /* Rest */, + BUSY /* PickupEquipment */, + BUSY /* DumpItem */, + OTHER /* StrangeMoodCrafter */, + OTHER /* StrangeMoodJeweller */, + OTHER /* StrangeMoodForge */, + OTHER /* StrangeMoodMagmaForge */, + OTHER /* StrangeMoodBrooding */, + OTHER /* StrangeMoodFell */, + OTHER /* StrangeMoodCarpenter */, + OTHER /* StrangeMoodMason */, + OTHER /* StrangeMoodBowyer */, + OTHER /* StrangeMoodTanner */, + OTHER /* StrangeMoodWeaver */, + OTHER /* StrangeMoodGlassmaker */, + OTHER /* StrangeMoodMechanics */, + BUSY /* ConstructBuilding */, + BUSY /* ConstructDoor */, + BUSY /* ConstructFloodgate */, + BUSY /* ConstructBed */, + BUSY /* ConstructThrone */, + BUSY /* ConstructCoffin */, + BUSY /* ConstructTable */, + BUSY /* ConstructChest */, + BUSY /* ConstructBin */, + BUSY /* ConstructArmorStand */, + BUSY /* ConstructWeaponRack */, + BUSY /* ConstructCabinet */, + BUSY /* ConstructStatue */, + BUSY /* ConstructBlocks */, + BUSY /* MakeRawGlass */, + BUSY /* MakeCrafts */, + BUSY /* MintCoins */, + BUSY /* CutGems */, + BUSY /* CutGlass */, + BUSY /* EncrustWithGems */, + BUSY /* EncrustWithGlass */, + BUSY /* DestroyBuilding */, + BUSY /* SmeltOre */, + BUSY /* MeltMetalObject */, + BUSY /* ExtractMetalStrands */, + BUSY /* PlantSeeds */, + BUSY /* HarvestPlants */, + BUSY /* TrainHuntingAnimal */, + BUSY /* TrainWarAnimal */, + BUSY /* MakeWeapon */, + BUSY /* ForgeAnvil */, + BUSY /* ConstructCatapultParts */, + BUSY /* ConstructBallistaParts */, + BUSY /* MakeArmor */, + BUSY /* MakeHelm */, + BUSY /* MakePants */, + BUSY /* StudWith */, + BUSY /* ButcherAnimal */, + BUSY /* PrepareRawFish */, + BUSY /* MillPlants */, + BUSY /* BaitTrap */, + BUSY /* MilkCreature */, + BUSY /* MakeCheese */, + BUSY /* ProcessPlants */, + BUSY /* ProcessPlantsBag */, + BUSY /* ProcessPlantsVial */, + BUSY /* ProcessPlantsBarrel */, + BUSY /* PrepareMeal */, + BUSY /* WeaveCloth */, + BUSY /* MakeGloves */, + BUSY /* MakeShoes */, + BUSY /* MakeShield */, + BUSY /* MakeCage */, + BUSY /* MakeChain */, + BUSY /* MakeFlask */, + BUSY /* MakeGoblet */, + BUSY /* MakeInstrument */, + BUSY /* MakeToy */, + BUSY /* MakeAnimalTrap */, + BUSY /* MakeBarrel */, + BUSY /* MakeBucket */, + BUSY /* MakeWindow */, + BUSY /* MakeTotem */, + BUSY /* MakeAmmo */, + BUSY /* DecorateWith */, + BUSY /* MakeBackpack */, + BUSY /* MakeQuiver */, + BUSY /* MakeBallistaArrowHead */, + BUSY /* AssembleSiegeAmmo */, + BUSY /* LoadCatapult */, + BUSY /* LoadBallista */, + BUSY /* FireCatapult */, + BUSY /* FireBallista */, + BUSY /* ConstructMechanisms */, + BUSY /* MakeTrapComponent */, + BUSY /* LoadCageTrap */, + BUSY /* LoadStoneTrap */, + BUSY /* LoadWeaponTrap */, + BUSY /* CleanTrap */, + BUSY /* CastSpell */, + BUSY /* LinkBuildingToTrigger */, + BUSY /* PullLever */, + BUSY /* BrewDrink */, + BUSY /* ExtractFromPlants */, + BUSY /* ExtractFromRawFish */, + BUSY /* ExtractFromLandAnimal */, + BUSY /* TameVermin */, + BUSY /* TameAnimal */, + BUSY /* ChainAnimal */, + BUSY /* UnchainAnimal */, + BUSY /* UnchainPet */, + BUSY /* ReleaseLargeCreature */, + BUSY /* ReleasePet */, + BUSY /* ReleaseSmallCreature */, + BUSY /* HandleSmallCreature */, + BUSY /* HandleLargeCreature */, + BUSY /* CageLargeCreature */, + BUSY /* CageSmallCreature */, + BUSY /* RecoverWounded */, + BUSY /* DiagnosePatient */, + BUSY /* ImmobilizeBreak */, + BUSY /* DressWound */, + BUSY /* CleanPatient */, + BUSY /* Surgery */, + BUSY /* Suture */, + BUSY /* SetBone */, + BUSY /* PlaceInTraction */, + BUSY /* DrainAquarium */, + BUSY /* FillAquarium */, + BUSY /* FillPond */, + BUSY /* GiveWater */, + BUSY /* GiveFood */, + BUSY /* GiveWater2 */, + BUSY /* GiveFood2 */, + BUSY /* RecoverPet */, + BUSY /* PitLargeAnimal */, + BUSY /* PitSmallAnimal */, + BUSY /* SlaughterAnimal */, + BUSY /* MakeCharcoal */, + BUSY /* MakeAsh */, + BUSY /* MakeLye */, + BUSY /* MakePotashFromLye */, + BUSY /* FertilizeField */, + BUSY /* MakePotashFromAsh */, + BUSY /* DyeThread */, + BUSY /* DyeCloth */, + BUSY /* SewImage */, + BUSY /* MakePipeSection */, + BUSY /* OperatePump */, + OTHER /* ManageWorkOrders */, + OTHER /* UpdateStockpileRecords */, + OTHER /* TradeAtDepot */, + BUSY /* ConstructHatchCover */, + BUSY /* ConstructGrate */, + BUSY /* RemoveStairs */, + BUSY /* ConstructQuern */, + BUSY /* ConstructMillstone */, + BUSY /* ConstructSplint */, + BUSY /* ConstructCrutch */, + BUSY /* ConstructTractionBench */, + BUSY /* CleanSelf */, + BUSY /* BringCrutch */, + BUSY /* ApplyCast */, + BUSY /* CustomReaction */, + BUSY /* ConstructSlab */, + BUSY /* EngraveSlab */, + BUSY /* ShearCreature */, + BUSY /* SpinThread */, + BUSY /* PenLargeAnimal */, + BUSY /* PenSmallAnimal */, + BUSY /* MakeTool */, + BUSY /* CollectClay */, + BUSY /* InstallColonyInHive */, + BUSY /* CollectHiveProducts */, + OTHER /* CauseTrouble */, + OTHER /* DrinkBlood */, + OTHER /* ReportCrime */, + OTHER /* ExecuteCriminal */, BUSY /* TrainAnimal */, BUSY /* CarveTrack */, BUSY /* PushTrackVehicle */, @@ -360,106 +369,108 @@ struct labor_info { PersistentDataItem config; - bool is_exclusive; - int active_dwarfs; + bool is_exclusive; + int active_dwarfs; - labor_mode mode() { return (labor_mode) config.ival(0); } - void set_mode(labor_mode mode) { config.ival(0) = mode; } + labor_mode mode() { return (labor_mode) config.ival(0); } + void set_mode(labor_mode mode) { config.ival(0) = mode; } - int minimum_dwarfs() { return config.ival(1); } - void set_minimum_dwarfs(int minimum_dwarfs) { config.ival(1) = minimum_dwarfs; } + int minimum_dwarfs() { return config.ival(1); } + void set_minimum_dwarfs(int minimum_dwarfs) { config.ival(1) = minimum_dwarfs; } - int maximum_dwarfs() { return config.ival(2); } - void set_maximum_dwarfs(int maximum_dwarfs) { config.ival(2) = maximum_dwarfs; } + int maximum_dwarfs() { return config.ival(2); } + void set_maximum_dwarfs(int maximum_dwarfs) { config.ival(2) = maximum_dwarfs; } }; struct labor_default { - labor_mode mode; - bool is_exclusive; - int minimum_dwarfs; - int maximum_dwarfs; - int active_dwarfs; + labor_mode mode; + bool is_exclusive; + int minimum_dwarfs; + int maximum_dwarfs; + int active_dwarfs; }; +static int hauler_pct = 33; + static std::vector<struct labor_info> labor_infos; static const struct labor_default default_labor_infos[] = { - /* MINE */ {AUTOMATIC, true, 2, 200, 0}, - /* HAUL_STONE */ {HAULERS, false, 1, 200, 0}, - /* HAUL_WOOD */ {HAULERS, false, 1, 200, 0}, - /* HAUL_BODY */ {HAULERS, false, 1, 200, 0}, - /* HAUL_FOOD */ {HAULERS, false, 1, 200, 0}, - /* HAUL_REFUSE */ {HAULERS, false, 1, 200, 0}, - /* HAUL_ITEM */ {HAULERS, false, 1, 200, 0}, - /* HAUL_FURNITURE */ {HAULERS, false, 1, 200, 0}, - /* HAUL_ANIMAL */ {HAULERS, false, 1, 200, 0}, - /* CLEAN */ {HAULERS, false, 1, 200, 0}, - /* CUTWOOD */ {AUTOMATIC, true, 1, 200, 0}, - /* CARPENTER */ {AUTOMATIC, false, 1, 200, 0}, - /* DETAIL */ {AUTOMATIC, false, 1, 200, 0}, - /* MASON */ {AUTOMATIC, false, 1, 200, 0}, - /* ARCHITECT */ {AUTOMATIC, false, 1, 200, 0}, - /* ANIMALTRAIN */ {AUTOMATIC, false, 1, 200, 0}, - /* ANIMALCARE */ {AUTOMATIC, false, 1, 200, 0}, - /* DIAGNOSE */ {AUTOMATIC, false, 1, 200, 0}, - /* SURGERY */ {AUTOMATIC, false, 1, 200, 0}, - /* BONE_SETTING */ {AUTOMATIC, false, 1, 200, 0}, - /* SUTURING */ {AUTOMATIC, false, 1, 200, 0}, - /* DRESSING_WOUNDS */ {AUTOMATIC, false, 1, 200, 0}, - /* FEED_WATER_CIVILIANS */ {AUTOMATIC, false, 200, 200, 0}, - /* RECOVER_WOUNDED */ {HAULERS, false, 1, 200, 0}, - /* BUTCHER */ {AUTOMATIC, false, 1, 200, 0}, - /* TRAPPER */ {AUTOMATIC, false, 1, 200, 0}, - /* DISSECT_VERMIN */ {AUTOMATIC, false, 1, 200, 0}, - /* LEATHER */ {AUTOMATIC, false, 1, 200, 0}, - /* TANNER */ {AUTOMATIC, false, 1, 200, 0}, - /* BREWER */ {AUTOMATIC, false, 1, 200, 0}, - /* ALCHEMIST */ {AUTOMATIC, false, 1, 200, 0}, - /* SOAP_MAKER */ {AUTOMATIC, false, 1, 200, 0}, - /* WEAVER */ {AUTOMATIC, false, 1, 200, 0}, - /* CLOTHESMAKER */ {AUTOMATIC, false, 1, 200, 0}, - /* MILLER */ {AUTOMATIC, false, 1, 200, 0}, - /* PROCESS_PLANT */ {AUTOMATIC, false, 1, 200, 0}, - /* MAKE_CHEESE */ {AUTOMATIC, false, 1, 200, 0}, - /* MILK */ {AUTOMATIC, false, 1, 200, 0}, - /* COOK */ {AUTOMATIC, false, 1, 200, 0}, - /* PLANT */ {AUTOMATIC, false, 1, 200, 0}, - /* HERBALIST */ {AUTOMATIC, false, 1, 200, 0}, - /* FISH */ {AUTOMATIC, false, 1, 1, 0}, - /* CLEAN_FISH */ {AUTOMATIC, false, 1, 200, 0}, - /* DISSECT_FISH */ {AUTOMATIC, false, 1, 200, 0}, - /* HUNT */ {AUTOMATIC, true, 1, 1, 0}, - /* SMELT */ {AUTOMATIC, false, 1, 200, 0}, - /* FORGE_WEAPON */ {AUTOMATIC, false, 1, 200, 0}, - /* FORGE_ARMOR */ {AUTOMATIC, false, 1, 200, 0}, - /* FORGE_FURNITURE */ {AUTOMATIC, false, 1, 200, 0}, - /* METAL_CRAFT */ {AUTOMATIC, false, 1, 200, 0}, - /* CUT_GEM */ {AUTOMATIC, false, 1, 200, 0}, - /* ENCRUST_GEM */ {AUTOMATIC, false, 1, 200, 0}, - /* WOOD_CRAFT */ {AUTOMATIC, false, 1, 200, 0}, - /* STONE_CRAFT */ {AUTOMATIC, false, 1, 200, 0}, - /* BONE_CARVE */ {AUTOMATIC, false, 1, 200, 0}, - /* GLASSMAKER */ {AUTOMATIC, false, 1, 200, 0}, - /* EXTRACT_STRAND */ {AUTOMATIC, false, 1, 200, 0}, - /* SIEGECRAFT */ {AUTOMATIC, false, 1, 200, 0}, - /* SIEGEOPERATE */ {AUTOMATIC, false, 1, 200, 0}, - /* BOWYER */ {AUTOMATIC, false, 1, 200, 0}, - /* MECHANIC */ {AUTOMATIC, false, 1, 200, 0}, - /* POTASH_MAKING */ {AUTOMATIC, false, 1, 200, 0}, - /* LYE_MAKING */ {AUTOMATIC, false, 1, 200, 0}, - /* DYER */ {AUTOMATIC, false, 1, 200, 0}, - /* BURN_WOOD */ {AUTOMATIC, false, 1, 200, 0}, - /* OPERATE_PUMP */ {AUTOMATIC, false, 1, 200, 0}, - /* SHEARER */ {AUTOMATIC, false, 1, 200, 0}, - /* SPINNER */ {AUTOMATIC, false, 1, 200, 0}, - /* POTTERY */ {AUTOMATIC, false, 1, 200, 0}, - /* GLAZING */ {AUTOMATIC, false, 1, 200, 0}, - /* PRESSING */ {AUTOMATIC, false, 1, 200, 0}, - /* BEEKEEPING */ {AUTOMATIC, false, 1, 1, 0}, // reduce risk of stuck beekeepers (see http://www.bay12games.com/dwarves/mantisbt/view.php?id=3981) - /* WAX_WORKING */ {AUTOMATIC, false, 1, 200, 0}, - /* PUSH_HAUL_VEHICLES */ {HAULERS, false, 1, 200, 0} + /* MINE */ {AUTOMATIC, true, 2, 200, 0}, + /* HAUL_STONE */ {HAULERS, false, 1, 200, 0}, + /* HAUL_WOOD */ {HAULERS, false, 1, 200, 0}, + /* HAUL_BODY */ {HAULERS, false, 1, 200, 0}, + /* HAUL_FOOD */ {HAULERS, false, 1, 200, 0}, + /* HAUL_REFUSE */ {HAULERS, false, 1, 200, 0}, + /* HAUL_ITEM */ {HAULERS, false, 1, 200, 0}, + /* HAUL_FURNITURE */ {HAULERS, false, 1, 200, 0}, + /* HAUL_ANIMAL */ {HAULERS, false, 1, 200, 0}, + /* CLEAN */ {HAULERS, false, 1, 200, 0}, + /* CUTWOOD */ {AUTOMATIC, true, 1, 200, 0}, + /* CARPENTER */ {AUTOMATIC, false, 1, 200, 0}, + /* DETAIL */ {AUTOMATIC, false, 1, 200, 0}, + /* MASON */ {AUTOMATIC, false, 1, 200, 0}, + /* ARCHITECT */ {AUTOMATIC, false, 1, 200, 0}, + /* ANIMALTRAIN */ {AUTOMATIC, false, 1, 200, 0}, + /* ANIMALCARE */ {AUTOMATIC, false, 1, 200, 0}, + /* DIAGNOSE */ {AUTOMATIC, false, 1, 200, 0}, + /* SURGERY */ {AUTOMATIC, false, 1, 200, 0}, + /* BONE_SETTING */ {AUTOMATIC, false, 1, 200, 0}, + /* SUTURING */ {AUTOMATIC, false, 1, 200, 0}, + /* DRESSING_WOUNDS */ {AUTOMATIC, false, 1, 200, 0}, + /* FEED_WATER_CIVILIANS */ {AUTOMATIC, false, 200, 200, 0}, + /* RECOVER_WOUNDED */ {HAULERS, false, 1, 200, 0}, + /* BUTCHER */ {AUTOMATIC, false, 1, 200, 0}, + /* TRAPPER */ {AUTOMATIC, false, 1, 200, 0}, + /* DISSECT_VERMIN */ {AUTOMATIC, false, 1, 200, 0}, + /* LEATHER */ {AUTOMATIC, false, 1, 200, 0}, + /* TANNER */ {AUTOMATIC, false, 1, 200, 0}, + /* BREWER */ {AUTOMATIC, false, 1, 200, 0}, + /* ALCHEMIST */ {AUTOMATIC, false, 1, 200, 0}, + /* SOAP_MAKER */ {AUTOMATIC, false, 1, 200, 0}, + /* WEAVER */ {AUTOMATIC, false, 1, 200, 0}, + /* CLOTHESMAKER */ {AUTOMATIC, false, 1, 200, 0}, + /* MILLER */ {AUTOMATIC, false, 1, 200, 0}, + /* PROCESS_PLANT */ {AUTOMATIC, false, 1, 200, 0}, + /* MAKE_CHEESE */ {AUTOMATIC, false, 1, 200, 0}, + /* MILK */ {AUTOMATIC, false, 1, 200, 0}, + /* COOK */ {AUTOMATIC, false, 1, 200, 0}, + /* PLANT */ {AUTOMATIC, false, 1, 200, 0}, + /* HERBALIST */ {AUTOMATIC, false, 1, 200, 0}, + /* FISH */ {AUTOMATIC, false, 1, 1, 0}, + /* CLEAN_FISH */ {AUTOMATIC, false, 1, 200, 0}, + /* DISSECT_FISH */ {AUTOMATIC, false, 1, 200, 0}, + /* HUNT */ {AUTOMATIC, true, 1, 1, 0}, + /* SMELT */ {AUTOMATIC, false, 1, 200, 0}, + /* FORGE_WEAPON */ {AUTOMATIC, false, 1, 200, 0}, + /* FORGE_ARMOR */ {AUTOMATIC, false, 1, 200, 0}, + /* FORGE_FURNITURE */ {AUTOMATIC, false, 1, 200, 0}, + /* METAL_CRAFT */ {AUTOMATIC, false, 1, 200, 0}, + /* CUT_GEM */ {AUTOMATIC, false, 1, 200, 0}, + /* ENCRUST_GEM */ {AUTOMATIC, false, 1, 200, 0}, + /* WOOD_CRAFT */ {AUTOMATIC, false, 1, 200, 0}, + /* STONE_CRAFT */ {AUTOMATIC, false, 1, 200, 0}, + /* BONE_CARVE */ {AUTOMATIC, false, 1, 200, 0}, + /* GLASSMAKER */ {AUTOMATIC, false, 1, 200, 0}, + /* EXTRACT_STRAND */ {AUTOMATIC, false, 1, 200, 0}, + /* SIEGECRAFT */ {AUTOMATIC, false, 1, 200, 0}, + /* SIEGEOPERATE */ {AUTOMATIC, false, 1, 200, 0}, + /* BOWYER */ {AUTOMATIC, false, 1, 200, 0}, + /* MECHANIC */ {AUTOMATIC, false, 1, 200, 0}, + /* POTASH_MAKING */ {AUTOMATIC, false, 1, 200, 0}, + /* LYE_MAKING */ {AUTOMATIC, false, 1, 200, 0}, + /* DYER */ {AUTOMATIC, false, 1, 200, 0}, + /* BURN_WOOD */ {AUTOMATIC, false, 1, 200, 0}, + /* OPERATE_PUMP */ {AUTOMATIC, false, 1, 200, 0}, + /* SHEARER */ {AUTOMATIC, false, 1, 200, 0}, + /* SPINNER */ {AUTOMATIC, false, 1, 200, 0}, + /* POTTERY */ {AUTOMATIC, false, 1, 200, 0}, + /* GLAZING */ {AUTOMATIC, false, 1, 200, 0}, + /* PRESSING */ {AUTOMATIC, false, 1, 200, 0}, + /* BEEKEEPING */ {AUTOMATIC, false, 1, 1, 0}, // reduce risk of stuck beekeepers (see http://www.bay12games.com/dwarves/mantisbt/view.php?id=3981) + /* WAX_WORKING */ {AUTOMATIC, false, 1, 200, 0}, + /* PUSH_HAUL_VEHICLES */ {HAULERS, false, 1, 200, 0} }; static const int responsibility_penalties[] = { @@ -492,15 +503,17 @@ static const int responsibility_penalties[] = { struct dwarf_info_t { - int highest_skill; - int total_skill; - int mastery_penalty; - int assigned_jobs; - dwarf_state state; - bool has_exclusive_labor; + int highest_skill; + int total_skill; + int mastery_penalty; + int assigned_jobs; + dwarf_state state; + bool has_exclusive_labor; int noble_penalty; // penalty for assignment due to noble status bool medical; // this dwarf has medical responsibility bool trader; // this dwarf has trade responsibility + bool diplomacy; // this dwarf meets with diplomats + int single_labor; // this dwarf will be exclusively assigned to one labor (-1/NONE for none) }; static bool isOptionEnabled(unsigned flag) @@ -521,14 +534,14 @@ static void setOptionEnabled(ConfigFlags flag, bool on) static void cleanup_state() { - labor_infos.clear(); + labor_infos.clear(); } static void reset_labor(df::enums::unit_labor::unit_labor labor) { - labor_infos[labor].set_minimum_dwarfs(default_labor_infos[labor].minimum_dwarfs); - labor_infos[labor].set_maximum_dwarfs(default_labor_infos[labor].maximum_dwarfs); - labor_infos[labor].set_mode(default_labor_infos[labor].mode); + labor_infos[labor].set_minimum_dwarfs(default_labor_infos[labor].minimum_dwarfs); + labor_infos[labor].set_maximum_dwarfs(default_labor_infos[labor].maximum_dwarfs); + labor_infos[labor].set_mode(default_labor_infos[labor].mode); } static void init_state() @@ -539,45 +552,84 @@ static void init_state() if (config.isValid() && config.ival(0) == -1) config.ival(0) = 0; - enable_autolabor = isOptionEnabled(CF_ENABLED); + enable_autolabor = isOptionEnabled(CF_ENABLED); + + if (!enable_autolabor) + return; - if (!enable_autolabor) - return; + auto cfg_haulpct = pworld->GetPersistentData("autolabor/haulpct"); + if (cfg_haulpct.isValid()) + { + hauler_pct = cfg_haulpct.ival(0); + } + else + { + hauler_pct = 33; + } - // Load labors from save - labor_infos.resize(ARRAY_COUNT(default_labor_infos)); + // Load labors from save + labor_infos.resize(ARRAY_COUNT(default_labor_infos)); - std::vector<PersistentDataItem> items; + std::vector<PersistentDataItem> items; pworld->GetPersistentData(&items, "autolabor/labors/", true); - for (auto p = items.begin(); p != items.end(); p++) - { - string key = p->key(); - df::enums::unit_labor::unit_labor labor = (df::enums::unit_labor::unit_labor) atoi(key.substr(strlen("autolabor/labors/")).c_str()); - if (labor >= 0 && labor <= labor_infos.size()) - { - labor_infos[labor].config = *p; - labor_infos[labor].is_exclusive = default_labor_infos[labor].is_exclusive; - labor_infos[labor].active_dwarfs = 0; - } - } - - // Add default labors for those not in save + for (auto p = items.begin(); p != items.end(); p++) + { + string key = p->key(); + df::enums::unit_labor::unit_labor labor = (df::enums::unit_labor::unit_labor) atoi(key.substr(strlen("autolabor/labors/")).c_str()); + if (labor >= 0 && labor <= labor_infos.size()) + { + labor_infos[labor].config = *p; + labor_infos[labor].is_exclusive = default_labor_infos[labor].is_exclusive; + labor_infos[labor].active_dwarfs = 0; + } + } + + // Add default labors for those not in save for (int i = 0; i < ARRAY_COUNT(default_labor_infos); i++) { - if (labor_infos[i].config.isValid()) - continue; + if (labor_infos[i].config.isValid()) + continue; - std::stringstream name; - name << "autolabor/labors/" << i; + std::stringstream name; + name << "autolabor/labors/" << i; - labor_infos[i].config = pworld->AddPersistentData(name.str()); + labor_infos[i].config = pworld->AddPersistentData(name.str()); - labor_infos[i].is_exclusive = default_labor_infos[i].is_exclusive; - labor_infos[i].active_dwarfs = 0; - reset_labor((df::enums::unit_labor::unit_labor) i); + labor_infos[i].is_exclusive = default_labor_infos[i].is_exclusive; + labor_infos[i].active_dwarfs = 0; + reset_labor((df::enums::unit_labor::unit_labor) i); } + + generate_labor_to_skill_map(); + } +static df::job_skill labor_to_skill[ENUM_LAST_ITEM(unit_labor) + 1]; + +static void generate_labor_to_skill_map() +{ + // Generate labor -> skill mapping + + for (int i = 0; i <= ENUM_LAST_ITEM(unit_labor); i++) + labor_to_skill[i] = df::enums::job_skill::NONE; + + FOR_ENUM_ITEMS(job_skill, skill) + { + int labor = ENUM_ATTR(job_skill, labor, skill); + if (labor != df::enums::unit_labor::NONE) + { + /* + assert(labor >= 0); + assert(labor < ARRAY_COUNT(labor_to_skill)); + */ + + labor_to_skill[labor] = skill; + } + } + +} + + static void enable_plugin(color_ostream &out) { auto pworld = Core::getInstance().getWorld(); @@ -592,8 +644,8 @@ static void enable_plugin(color_ostream &out) enable_autolabor = true; out << "Enabling the plugin." << endl; - cleanup_state(); - init_state(); + cleanup_state(); + init_state(); } DFhackCExport command_result plugin_init ( color_ostream &out, std::vector <PluginCommand> &commands) @@ -608,49 +660,49 @@ DFhackCExport command_result plugin_init ( color_ostream &out, std::vector <Plug autolabor, false, /* true means that the command can't be used from non-interactive user interface */ // Extended help string. Used by CR_WRONG_USAGE and the help command: " autolabor enable\n" - " autolabor disable\n" - " Enables or disables the plugin.\n" - " autolabor <labor> <minimum> [<maximum>]\n" - " Set number of dwarves assigned to a labor.\n" - " autolabor <labor> haulers\n" - " Set a labor to be handled by hauler dwarves.\n" - " autolabor <labor> disable\n" - " Turn off autolabor for a specific labor.\n" - " autolabor <labor> reset\n" - " Return a labor to the default handling.\n" - " autolabor reset-all\n" - " Return all labors to the default handling.\n" - " autolabor list\n" - " List current status of all labors.\n" - " autolabor status\n" - " Show basic status information.\n" - "Function:\n" - " When enabled, autolabor periodically checks your dwarves and enables or\n" - " disables labors. It tries to keep as many dwarves as possible busy but\n" - " also tries to have dwarves specialize in specific skills.\n" - " Warning: autolabor will override any manual changes you make to labors\n" - " while it is enabled.\n" - "Examples:\n" - " autolabor MINE 2\n" - " Keep at least 2 dwarves with mining enabled.\n" - " autolabor CUT_GEM 1 1\n" - " Keep exactly 1 dwarf with gemcutting enabled.\n" - " autolabor FEED_WATER_CIVILIANS haulers\n" - " Have haulers feed and water wounded dwarves.\n" - " autolabor CUTWOOD disable\n" - " Turn off autolabor for wood cutting.\n" + " autolabor disable\n" + " Enables or disables the plugin.\n" + " autolabor <labor> <minimum> [<maximum>]\n" + " Set number of dwarves assigned to a labor.\n" + " autolabor <labor> haulers\n" + " Set a labor to be handled by hauler dwarves.\n" + " autolabor <labor> disable\n" + " Turn off autolabor for a specific labor.\n" + " autolabor <labor> reset\n" + " Return a labor to the default handling.\n" + " autolabor reset-all\n" + " Return all labors to the default handling.\n" + " autolabor list\n" + " List current status of all labors.\n" + " autolabor status\n" + " Show basic status information.\n" + "Function:\n" + " When enabled, autolabor periodically checks your dwarves and enables or\n" + " disables labors. It tries to keep as many dwarves as possible busy but\n" + " also tries to have dwarves specialize in specific skills.\n" + " Warning: autolabor will override any manual changes you make to labors\n" + " while it is enabled.\n" + "Examples:\n" + " autolabor MINE 2\n" + " Keep at least 2 dwarves with mining enabled.\n" + " autolabor CUT_GEM 1 1\n" + " Keep exactly 1 dwarf with gemcutting enabled.\n" + " autolabor FEED_WATER_CIVILIANS haulers\n" + " Have haulers feed and water wounded dwarves.\n" + " autolabor CUTWOOD disable\n" + " Turn off autolabor for wood cutting.\n" )); - init_state(); + init_state(); return CR_OK; } DFhackCExport command_result plugin_shutdown ( color_ostream &out ) { - cleanup_state(); + cleanup_state(); - return CR_OK; + return CR_OK; } // sorting objects @@ -685,6 +737,181 @@ struct values_sorter std::vector<int> & values; }; + +static void assign_labor(unit_labor::unit_labor labor, + int n_dwarfs, + std::vector<dwarf_info_t>& dwarf_info, + bool trader_requested, + std::vector<df::unit *>& dwarfs, + bool has_butchers, + bool has_fishery, + color_ostream& out) +{ + df::job_skill skill = labor_to_skill[labor]; + + if (labor_infos[labor].mode() != AUTOMATIC) + return; + + int best_dwarf = 0; + int best_value = -10000; + + std::vector<int> values(n_dwarfs); + std::vector<int> candidates; + std::map<int, int> dwarf_skill; + std::vector<bool> previously_enabled(n_dwarfs); + + auto mode = labor_infos[labor].mode(); + + // Find candidate dwarfs, and calculate a preference value for each dwarf + for (int dwarf = 0; dwarf < n_dwarfs; dwarf++) + { + if (dwarf_info[dwarf].state == CHILD) + continue; + if (dwarf_info[dwarf].state == MILITARY) + continue; + if (dwarf_info[dwarf].trader && trader_requested) + continue; + if (dwarf_info[dwarf].diplomacy) + continue; + + if (labor_infos[labor].is_exclusive && dwarf_info[dwarf].has_exclusive_labor) + continue; + + int value = dwarf_info[dwarf].mastery_penalty; + + if (skill != df::enums::job_skill::NONE) + { + int skill_level = 0; + int skill_experience = 0; + + for (auto s = dwarfs[dwarf]->status.souls[0]->skills.begin(); s < dwarfs[dwarf]->status.souls[0]->skills.end(); s++) + { + if ((*s)->id == skill) + { + skill_level = (*s)->rating; + skill_experience = (*s)->experience; + break; + } + } + + dwarf_skill[dwarf] = skill_level; + + value += skill_level * 100; + value += skill_experience / 20; + if (skill_level > 0 || skill_experience > 0) + value += 200; + if (skill_level >= 15) + value += 1000 * (skill_level - 14); + } + else + { + dwarf_skill[dwarf] = 0; + } + + if (dwarfs[dwarf]->status.labors[labor]) + { + value += 5; + if (labor_infos[labor].is_exclusive) + value += 350; + } + + // bias by happiness + + value += dwarfs[dwarf]->status.happiness; + + values[dwarf] = value; + + candidates.push_back(dwarf); + + } + + // Sort candidates by preference value + values_sorter ivs(values); + std::sort(candidates.begin(), candidates.end(), ivs); + + // Disable the labor on everyone + for (int dwarf = 0; dwarf < n_dwarfs; dwarf++) + { + if (dwarf_info[dwarf].state == CHILD) + continue; + + previously_enabled[dwarf] = dwarfs[dwarf]->status.labors[labor]; + dwarfs[dwarf]->status.labors[labor] = false; + } + + int min_dwarfs = labor_infos[labor].minimum_dwarfs(); + int max_dwarfs = labor_infos[labor].maximum_dwarfs(); + + // Special - don't assign hunt without a butchers, or fish without a fishery + if (df::enums::unit_labor::HUNT == labor && !has_butchers) + min_dwarfs = max_dwarfs = 0; + if (df::enums::unit_labor::FISH == labor && !has_fishery) + min_dwarfs = max_dwarfs = 0; + + bool want_idle_dwarf = true; + if (state_count[IDLE] < 2) + want_idle_dwarf = false; + + /* + * Assign dwarfs to this labor. We assign at least the minimum number of dwarfs, in + * order of preference, and then assign additional dwarfs that meet any of these conditions: + * - The dwarf is idle and there are no idle dwarves assigned to this labor + * - The dwarf has nonzero skill associated with the labor + * - The labor is mining, hunting, or woodcutting and the dwarf currently has it enabled. + * We stop assigning dwarfs when we reach the maximum allowed. + * Note that only idle and busy dwarfs count towards the number of dwarfs. "Other" dwarfs + * (sleeping, eating, on break, etc.) will have labors assigned, but will not be counted. + * Military and children/nobles will not have labors assigned. + * Dwarfs with the "health management" responsibility are always assigned DIAGNOSIS. + */ + for (int i = 0; i < candidates.size() && labor_infos[labor].active_dwarfs < max_dwarfs; i++) + { + int dwarf = candidates[i]; + + assert(dwarf >= 0); + assert(dwarf < n_dwarfs); + + bool preferred_dwarf = false; + if (want_idle_dwarf && dwarf_info[dwarf].state == IDLE) + preferred_dwarf = true; + if (dwarf_skill[dwarf] > 0) + preferred_dwarf = true; + if (previously_enabled[dwarf] && labor_infos[labor].is_exclusive) + preferred_dwarf = true; + if (dwarf_info[dwarf].medical && labor == df::unit_labor::DIAGNOSE) + preferred_dwarf = true; + if (dwarf_info[dwarf].trader && trader_requested) + continue; + if (dwarf_info[dwarf].diplomacy) + continue; + + if (labor_infos[labor].active_dwarfs >= min_dwarfs && !preferred_dwarf) + continue; + + if (!dwarfs[dwarf]->status.labors[labor]) + dwarf_info[dwarf].assigned_jobs++; + + dwarfs[dwarf]->status.labors[labor] = true; + + if (labor_infos[labor].is_exclusive) + { + dwarf_info[dwarf].has_exclusive_labor = true; + // all the exclusive labors require equipment so this should force the dorf to reequip if needed + dwarfs[dwarf]->military.pickup_flags.bits.update = 1; + } + + if (print_debug) + out.print("Dwarf %i \"%s\" assigned %s: value %i %s %s\n", dwarf, dwarfs[dwarf]->name.first_name.c_str(), ENUM_KEY_STR(unit_labor, labor).c_str(), values[dwarf], dwarf_info[dwarf].trader ? "(trader)" : "", dwarf_info[dwarf].diplomacy ? "(diplomacy)" : ""); + + if (dwarf_info[dwarf].state == IDLE || dwarf_info[dwarf].state == BUSY) + labor_infos[labor].active_dwarfs++; + + if (dwarf_info[dwarf].state == IDLE) + want_idle_dwarf = false; + } +} + + DFhackCExport command_result plugin_onstatechange(color_ostream &out, state_change_event event) { switch (event) { @@ -704,7 +931,7 @@ DFhackCExport command_result plugin_onstatechange(color_ostream &out, state_chan DFhackCExport command_result plugin_onupdate ( color_ostream &out ) { - static int step_count = 0; + static int step_count = 0; // check run conditions if(!world || !world->map.block_index || !enable_autolabor) { @@ -712,61 +939,71 @@ DFhackCExport command_result plugin_onupdate ( color_ostream &out ) return CR_OK; } - if (++step_count < 60) - return CR_OK; - step_count = 0; + if (++step_count < 60) + return CR_OK; + step_count = 0; uint32_t race = ui->race_id; uint32_t civ = ui->civ_id; - std::vector<df::unit *> dwarfs; + std::vector<df::unit *> dwarfs; - bool has_butchers = false; - bool has_fishery = false; + bool has_butchers = false; + bool has_fishery = false; bool trader_requested = false; - for (int i = 0; i < world->buildings.all.size(); ++i) - { - df::building *build = world->buildings.all[i]; - auto type = build->getType(); - if (df::enums::building_type::Workshop == type) - { - auto subType = build->getSubtype(); - if ((short)df::enums::workshop_type::Butchers == subType) - has_butchers = true; - if ((short)df::enums::workshop_type::Fishery == subType) - has_fishery = true; - } + for (int i = 0; i < world->buildings.all.size(); ++i) + { + df::building *build = world->buildings.all[i]; + auto type = build->getType(); + if (df::enums::building_type::Workshop == type) + { + auto subType = build->getSubtype(); + if (df::enums::workshop_type::Butchers == subType) + has_butchers = true; + if (df::enums::workshop_type::Fishery == subType) + has_fishery = true; + } else if (df::enums::building_type::TradeDepot == type) { df::building_tradedepotst* depot = (df::building_tradedepotst*) build; - trader_requested = depot->flags.bits.trader_requested; + trader_requested = depot->trade_flags.bits.trader_requested; if (print_debug) - out.print("Trade depot found and trader requested, trader will be excluded from all labors.\n"); + { + if (trader_requested) + out.print("Trade depot found and trader requested, trader will be excluded from all labors.\n"); + else + out.print("Trade depot found but trader is not requested.\n"); + } } - } + } for (int i = 0; i < world->units.all.size(); ++i) { df::unit* cre = world->units.all[i]; - if (cre->race == race && cre->civ_id == civ && !cre->flags1.bits.marauder && !cre->flags1.bits.diplomat && !cre->flags1.bits.merchant && - !cre->flags1.bits.dead && !cre->flags1.bits.forest) { - dwarfs.push_back(cre); + if (cre->race == race && cre->civ_id == civ && !cre->flags1.bits.marauder && !cre->flags1.bits.diplomat && !cre->flags1.bits.merchant && + !cre->flags1.bits.dead && !cre->flags1.bits.forest) + { + if (cre->burrows.size() > 0) + continue; // dwarfs assigned to burrows are skipped entirely + dwarfs.push_back(cre); } } - int n_dwarfs = dwarfs.size(); + int n_dwarfs = dwarfs.size(); - if (n_dwarfs == 0) - return CR_OK; + if (n_dwarfs == 0) + return CR_OK; + + std::vector<dwarf_info_t> dwarf_info(n_dwarfs); - std::vector<dwarf_info_t> dwarf_info(n_dwarfs); + // Find total skill and highest skill for each dwarf. More skilled dwarves shouldn't be used for minor tasks. - // Find total skill and highest skill for each dwarf. More skilled dwarves shouldn't be used for minor tasks. + for (int dwarf = 0; dwarf < n_dwarfs; dwarf++) + { + dwarf_info[dwarf].single_labor = -1; - for (int dwarf = 0; dwarf < n_dwarfs; dwarf++) - { -// assert(dwarfs[dwarf]->status.souls.size() > 0); +// assert(dwarfs[dwarf]->status.souls.size() > 0); // assert fails can cause DF to crash, so don't do that if (dwarfs[dwarf]->status.souls.size() <= 0) @@ -777,13 +1014,15 @@ DFhackCExport command_result plugin_onupdate ( color_ostream &out ) int noble_penalty = 0; df::historical_figure* hf = df::historical_figure::find(dwarfs[dwarf]->hist_figure_id); - for (int i = 0; i < hf->entity_links.size(); i++) { + for (int i = 0; i < hf->entity_links.size(); i++) + { df::histfig_entity_link* hfelink = hf->entity_links.at(i); - if (hfelink->getType() == df::histfig_entity_link_type::POSITION) { - df::histfig_entity_link_positionst *epos = + if (hfelink->getType() == df::histfig_entity_link_type::POSITION) + { + df::histfig_entity_link_positionst *epos = (df::histfig_entity_link_positionst*) hfelink; df::historical_entity* entity = df::historical_entity::find(epos->entity_id); - if (!entity) + if (!entity) continue; df::entity_position_assignment* assignment = binsearch_in_vector(entity->positions.assignments, epos->assignment_id); if (!assignment) @@ -792,8 +1031,8 @@ DFhackCExport command_result plugin_onupdate ( color_ostream &out ) if (!position) continue; - for (int n = 0; n < 25; n++) - if (position->responsibilities[n]) + for (int n = 0; n < 25; n++) + if (position->responsibilities[n]) noble_penalty += responsibility_penalties[n]; if (position->responsibilities[df::entity_position_responsibility::HEALTH_MANAGEMENT]) @@ -803,425 +1042,294 @@ DFhackCExport command_result plugin_onupdate ( color_ostream &out ) dwarf_info[dwarf].trader = true; } - dwarf_info[dwarf].noble_penalty = noble_penalty; + } - for (auto s = dwarfs[dwarf]->status.souls[0]->skills.begin(); s != dwarfs[dwarf]->status.souls[0]->skills.end(); s++) - { - df::job_skill skill = (*s)->id; + dwarf_info[dwarf].noble_penalty = noble_penalty; - df::job_skill_class skill_class = ENUM_ATTR(job_skill, type, skill); + // identify dwarfs who are needed for meetings and mark them for exclusion - int skill_level = (*s)->rating; - int skill_experience = (*s)->experience; + for (int i = 0; i < ui->activities.size(); ++i) + { + df::activity_info *act = ui->activities[i]; + if (!act) continue; + bool p1 = act->person1 == dwarfs[dwarf]; + bool p2 = act->person2 == dwarfs[dwarf]; - // Track total & highest skill among normal/medical skills. (We don't care about personal or social skills.) + if (p1 || p2) + { + dwarf_info[dwarf].diplomacy = true; + if (print_debug) + out.print("Dwarf %i \"%s\" has a meeting, will be cleared of all labors\n", dwarf, dwarfs[dwarf]->name.first_name.c_str()); + break; + } + } + + for (auto s = dwarfs[dwarf]->status.souls[0]->skills.begin(); s != dwarfs[dwarf]->status.souls[0]->skills.end(); s++) + { + df::job_skill skill = (*s)->id; + + df::job_skill_class skill_class = ENUM_ATTR(job_skill, type, skill); - if (skill_class != df::enums::job_skill_class::Normal && skill_class != df::enums::job_skill_class::Medical) - continue; + int skill_level = (*s)->rating; + int skill_experience = (*s)->experience; - if (dwarf_info[dwarf].highest_skill < skill_level) - dwarf_info[dwarf].highest_skill = skill_level; - dwarf_info[dwarf].total_skill += skill_level; - } - } + // Track total & highest skill among normal/medical skills. (We don't care about personal or social skills.) + + if (skill_class != df::enums::job_skill_class::Normal && skill_class != df::enums::job_skill_class::Medical) + continue; + + if (dwarf_info[dwarf].highest_skill < skill_level) + dwarf_info[dwarf].highest_skill = skill_level; + dwarf_info[dwarf].total_skill += skill_level; + } + } - // Calculate a base penalty for using each dwarf for a task he isn't good at. + // Calculate a base penalty for using each dwarf for a task he isn't good at. - for (int dwarf = 0; dwarf < n_dwarfs; dwarf++) - { - dwarf_info[dwarf].mastery_penalty -= 40 * dwarf_info[dwarf].highest_skill; - dwarf_info[dwarf].mastery_penalty -= 10 * dwarf_info[dwarf].total_skill; + for (int dwarf = 0; dwarf < n_dwarfs; dwarf++) + { + dwarf_info[dwarf].mastery_penalty -= 40 * dwarf_info[dwarf].highest_skill; + dwarf_info[dwarf].mastery_penalty -= 10 * dwarf_info[dwarf].total_skill; dwarf_info[dwarf].mastery_penalty -= dwarf_info[dwarf].noble_penalty; - for (int labor = ENUM_FIRST_ITEM(unit_labor); labor <= ENUM_LAST_ITEM(unit_labor); labor++) - { - if (labor == df::enums::unit_labor::NONE) - continue; + for (int labor = ENUM_FIRST_ITEM(unit_labor); labor <= ENUM_LAST_ITEM(unit_labor); labor++) + { + if (labor == df::enums::unit_labor::NONE) + continue; /* - assert(labor >= 0); - assert(labor < ARRAY_COUNT(labor_infos)); - */ - - if (labor_infos[labor].is_exclusive && dwarfs[dwarf]->status.labors[labor]) - dwarf_info[dwarf].mastery_penalty -= 100; - } - } - - // Find the activity state for each dwarf. It's important to get this right - a dwarf who we think is IDLE but - // can't work will gum everything up. In the future I might add code to auto-detect slacker dwarves. - - state_count.clear(); - state_count.resize(NUM_STATE); - - for (int dwarf = 0; dwarf < n_dwarfs; dwarf++) - { - bool is_on_break = false; - - for (auto p = dwarfs[dwarf]->status.misc_traits.begin(); p < dwarfs[dwarf]->status.misc_traits.end(); p++) - { - // 7 / 0x7 = Newly arrived migrant, will not work yet - // 17 / 0x11 = On break - if ((*p)->id == (df::misc_trait_type)0x07 || (*p)->id == (df::misc_trait_type)0x11) - is_on_break = true; - } - - if (dwarfs[dwarf]->profession == df::enums::profession::BABY || - dwarfs[dwarf]->profession == df::enums::profession::CHILD || - dwarfs[dwarf]->profession == df::enums::profession::DRUNK) - { - dwarf_info[dwarf].state = CHILD; - } - else if (ENUM_ATTR(profession, military, dwarfs[dwarf]->profession)) - dwarf_info[dwarf].state = MILITARY; - else if (dwarfs[dwarf]->job.current_job == NULL) - { - if (is_on_break) - dwarf_info[dwarf].state = OTHER; - else if (dwarfs[dwarf]->specific_refs.size() > 0) - dwarf_info[dwarf].state = OTHER; - else - dwarf_info[dwarf].state = IDLE; - } - else - { - int job = dwarfs[dwarf]->job.current_job->job_type; + assert(labor >= 0); + assert(labor < ARRAY_COUNT(labor_infos)); + */ + + if (labor_infos[labor].is_exclusive && dwarfs[dwarf]->status.labors[labor]) + dwarf_info[dwarf].mastery_penalty -= 100; + } + } + + // Find the activity state for each dwarf. It's important to get this right - a dwarf who we think is IDLE but + // can't work will gum everything up. In the future I might add code to auto-detect slacker dwarves. + + state_count.clear(); + state_count.resize(NUM_STATE); + + for (int dwarf = 0; dwarf < n_dwarfs; dwarf++) + { + bool is_on_break = false; + + for (auto p = dwarfs[dwarf]->status.misc_traits.begin(); p < dwarfs[dwarf]->status.misc_traits.end(); p++) + { + // 7 / 0x7 = Newly arrived migrant, will not work yet + // 17 / 0x11 = On break + if ((*p)->id == 0x07 || (*p)->id == 0x11) + is_on_break = true; + } + + if (dwarfs[dwarf]->profession == df::enums::profession::BABY || + dwarfs[dwarf]->profession == df::enums::profession::CHILD || + dwarfs[dwarf]->profession == df::enums::profession::DRUNK) + { + dwarf_info[dwarf].state = CHILD; + } + else if (ENUM_ATTR(profession, military, dwarfs[dwarf]->profession)) + dwarf_info[dwarf].state = MILITARY; + else if (dwarfs[dwarf]->job.current_job == NULL) + { + if (is_on_break) + dwarf_info[dwarf].state = OTHER; + else if (dwarfs[dwarf]->specific_refs.size() > 0) + dwarf_info[dwarf].state = OTHER; + else + dwarf_info[dwarf].state = IDLE; + } + else + { + int job = dwarfs[dwarf]->job.current_job->job_type; /* - assert(job >= 0); - assert(job < ARRAY_COUNT(dwarf_states)); - */ + assert(job >= 0); + assert(job < ARRAY_COUNT(dwarf_states)); + */ if (job >= 0 && job < ARRAY_COUNT(dwarf_states)) dwarf_info[dwarf].state = dwarf_states[job]; - else + else { out.print("Dwarf %i \"%s\" has unknown job %i\n", dwarf, dwarfs[dwarf]->name.first_name.c_str(), job); dwarf_info[dwarf].state = OTHER; } - } - - state_count[dwarf_info[dwarf].state]++; - - if (print_debug) - out.print("Dwarf %i \"%s\": penalty %i, state %s\n", dwarf, dwarfs[dwarf]->name.first_name.c_str(), dwarf_info[dwarf].mastery_penalty, state_names[dwarf_info[dwarf].state]); - } - - // Generate labor -> skill mapping - - df::job_skill labor_to_skill[ENUM_LAST_ITEM(unit_labor) + 1]; - for (int i = 0; i <= ENUM_LAST_ITEM(unit_labor); i++) - labor_to_skill[i] = df::enums::job_skill::NONE; + } - FOR_ENUM_ITEMS(job_skill, skill) - { - int labor = ENUM_ATTR(job_skill, labor, skill); - if (labor != df::enums::unit_labor::NONE) - { - /* - assert(labor >= 0); - assert(labor < ARRAY_COUNT(labor_to_skill)); - */ + state_count[dwarf_info[dwarf].state]++; - labor_to_skill[labor] = skill; - } - } + if (print_debug) + out.print("Dwarf %i \"%s\": penalty %i, state %s\n", dwarf, dwarfs[dwarf]->name.first_name.c_str(), dwarf_info[dwarf].mastery_penalty, state_names[dwarf_info[dwarf].state]); + } - std::vector<df::unit_labor> labors; + std::vector<df::unit_labor> labors; - FOR_ENUM_ITEMS(unit_labor, labor) - { - if (labor == df::enums::unit_labor::NONE) - continue; + FOR_ENUM_ITEMS(unit_labor, labor) + { + if (labor == df::enums::unit_labor::NONE) + continue; /* - assert(labor >= 0); - assert(labor < ARRAY_COUNT(labor_infos)); - */ + assert(labor >= 0); + assert(labor < ARRAY_COUNT(labor_infos)); + */ - labor_infos[labor].active_dwarfs = 0; + labor_infos[labor].active_dwarfs = 0; - labors.push_back(labor); - } + labors.push_back(labor); + } laborinfo_sorter lasorter; - std::sort(labors.begin(), labors.end(), lasorter); - - // Handle DISABLED skills (just bookkeeping) - for (auto lp = labors.begin(); lp != labors.end(); ++lp) - { - auto labor = *lp; - - if (labor_infos[labor].mode() != DISABLE) - continue; - - for (int dwarf = 0; dwarf < n_dwarfs; dwarf++) - { - if (dwarfs[dwarf]->status.labors[labor]) - { - if (labor_infos[labor].is_exclusive) - dwarf_info[dwarf].has_exclusive_labor = true; + std::sort(labors.begin(), labors.end(), lasorter); - dwarf_info[dwarf].assigned_jobs++; - } - } - } - - // Handle all skills except those marked HAULERS + // Handle DISABLED skills (just bookkeeping) + for (auto lp = labors.begin(); lp != labors.end(); ++lp) + { + auto labor = *lp; - for (auto lp = labors.begin(); lp != labors.end(); ++lp) - { - auto labor = *lp; + if (labor_infos[labor].mode() != DISABLE) + continue; - /* - assert(labor >= 0); - assert(labor < ARRAY_COUNT(labor_infos)); - */ - - df::job_skill skill = labor_to_skill[labor]; - - if (labor_infos[labor].mode() != AUTOMATIC) - continue; - - int best_dwarf = 0; - int best_value = -10000; - - std::vector<int> values(n_dwarfs); - std::vector<int> candidates; - std::map<int, int> dwarf_skill; - std::vector<bool> previously_enabled(n_dwarfs); - - auto mode = labor_infos[labor].mode(); - - // Find candidate dwarfs, and calculate a preference value for each dwarf - for (int dwarf = 0; dwarf < n_dwarfs; dwarf++) - { - if (dwarf_info[dwarf].state == CHILD) - continue; - if (dwarf_info[dwarf].state == MILITARY) - continue; - - if (labor_infos[labor].is_exclusive && dwarf_info[dwarf].has_exclusive_labor) - continue; - - int value = dwarf_info[dwarf].mastery_penalty; - - if (skill != df::enums::job_skill::NONE) - { - int skill_level = 0; - int skill_experience = 0; - - for (auto s = dwarfs[dwarf]->status.souls[0]->skills.begin(); s < dwarfs[dwarf]->status.souls[0]->skills.end(); s++) - { - if ((*s)->id == skill) - { - skill_level = (*s)->rating; - skill_experience = (*s)->experience; - break; - } - } - - dwarf_skill[dwarf] = skill_level; - - value += skill_level * 100; - value += skill_experience / 20; - if (skill_level > 0 || skill_experience > 0) - value += 200; - if (skill_level >= 15) - value += 1000 * (skill_level - 14); - } - else - { - dwarf_skill[dwarf] = 0; - } - - if (dwarfs[dwarf]->status.labors[labor]) - { - value += 5; - if (labor_infos[labor].is_exclusive) - value += 350; - } - - values[dwarf] = value; - - candidates.push_back(dwarf); - - } - - // Sort candidates by preference value - values_sorter ivs(values); - std::sort(candidates.begin(), candidates.end(), ivs); - - // Disable the labor on everyone - for (int dwarf = 0; dwarf < n_dwarfs; dwarf++) - { - if (dwarf_info[dwarf].state == CHILD) - continue; - - previously_enabled[dwarf] = dwarfs[dwarf]->status.labors[labor]; - dwarfs[dwarf]->status.labors[labor] = false; - } - - int min_dwarfs = labor_infos[labor].minimum_dwarfs(); - int max_dwarfs = labor_infos[labor].maximum_dwarfs(); - - // Special - don't assign hunt without a butchers, or fish without a fishery - if (df::enums::unit_labor::HUNT == labor && !has_butchers) - min_dwarfs = max_dwarfs = 0; - if (df::enums::unit_labor::FISH == labor && !has_fishery) - min_dwarfs = max_dwarfs = 0; - - bool want_idle_dwarf = true; - if (state_count[IDLE] < 2) - want_idle_dwarf = false; - - /* - * Assign dwarfs to this labor. We assign at least the minimum number of dwarfs, in - * order of preference, and then assign additional dwarfs that meet any of these conditions: - * - The dwarf is idle and there are no idle dwarves assigned to this labor - * - The dwarf has nonzero skill associated with the labor - * - The labor is mining, hunting, or woodcutting and the dwarf currently has it enabled. - * We stop assigning dwarfs when we reach the maximum allowed. - * Note that only idle and busy dwarfs count towards the number of dwarfs. "Other" dwarfs - * (sleeping, eating, on break, etc.) will have labors assigned, but will not be counted. - * Military and children/nobles will not have labors assigned. - * Dwarfs with the "health management" responsibility are always assigned DIAGNOSIS. - */ - for (int i = 0; i < candidates.size() && labor_infos[labor].active_dwarfs < max_dwarfs; i++) - { - int dwarf = candidates[i]; - - assert(dwarf >= 0); - assert(dwarf < n_dwarfs); - - bool preferred_dwarf = false; - if (want_idle_dwarf && dwarf_info[dwarf].state == IDLE) - preferred_dwarf = true; - if (dwarf_skill[dwarf] > 0) - preferred_dwarf = true; - if (previously_enabled[dwarf] && labor_infos[labor].is_exclusive) - preferred_dwarf = true; - if (dwarf_info[dwarf].medical && labor == df::unit_labor::DIAGNOSE) - preferred_dwarf = true; - if (dwarf_info[dwarf].trader && trader_requested) - continue; + for (int dwarf = 0; dwarf < n_dwarfs; dwarf++) + { + if ((dwarf_info[dwarf].trader && trader_requested) || + dwarf_info[dwarf].diplomacy) + { + dwarfs[dwarf]->status.labors[labor] = false; + } - if (labor_infos[labor].active_dwarfs >= min_dwarfs && !preferred_dwarf) - continue; + if (dwarfs[dwarf]->status.labors[labor]) + { + if (labor_infos[labor].is_exclusive) + dwarf_info[dwarf].has_exclusive_labor = true; - if (!dwarfs[dwarf]->status.labors[labor]) - dwarf_info[dwarf].assigned_jobs++; + dwarf_info[dwarf].assigned_jobs++; + } + } + } - dwarfs[dwarf]->status.labors[labor] = true; + // Handle all skills except those marked HAULERS - if (labor_infos[labor].is_exclusive) - { - dwarf_info[dwarf].has_exclusive_labor = true; - // all the exclusive labors require equipment so this should force the dorf to reequip if needed - dwarfs[dwarf]->military.pickup_flags.bits.update = 1; - } + for (auto lp = labors.begin(); lp != labors.end(); ++lp) + { + auto labor = *lp; - if (print_debug) - out.print("Dwarf %i \"%s\" assigned %s: value %i\n", dwarf, dwarfs[dwarf]->name.first_name.c_str(), ENUM_KEY_STR(unit_labor, labor).c_str(), values[dwarf]); + /* + assert(labor >= 0); + assert(labor < ARRAY_COUNT(labor_infos)); + */ - if (dwarf_info[dwarf].state == IDLE || dwarf_info[dwarf].state == BUSY) - labor_infos[labor].active_dwarfs++; + assign_labor(labor, n_dwarfs, dwarf_info, trader_requested, dwarfs, has_butchers, has_fishery, out); + } - if (dwarf_info[dwarf].state == IDLE) - want_idle_dwarf = false; - } - } + // Set about 1/3 of the dwarfs as haulers. The haulers have all HAULER labors enabled. Having a lot of haulers helps + // make sure that hauling jobs are handled quickly rather than building up. - // Set about 1/3 of the dwarfs as haulers. The haulers have all HAULER labors enabled. Having a lot of haulers helps - // make sure that hauling jobs are handled quickly rather than building up. + int num_haulers = state_count[IDLE] + state_count[BUSY] * hauler_pct / 100; - int num_haulers = state_count[IDLE] + state_count[BUSY] / 3; - if (num_haulers < 1) - num_haulers = 1; + if (num_haulers < 1) + num_haulers = 1; - std::vector<int> hauler_ids; - for (int dwarf = 0; dwarf < n_dwarfs; dwarf++) - { - if (dwarf_info[dwarf].trader && trader_requested) + std::vector<int> hauler_ids; + for (int dwarf = 0; dwarf < n_dwarfs; dwarf++) + { + if ((dwarf_info[dwarf].trader && trader_requested) || + dwarf_info[dwarf].diplomacy) + { + FOR_ENUM_ITEMS(unit_labor, labor) + { + if (labor == df::enums::unit_labor::NONE) + continue; + if (labor_infos[labor].mode() != HAULERS) + continue; + dwarfs[dwarf]->status.labors[labor] = false; + } continue; - if (dwarf_info[dwarf].state == IDLE || dwarf_info[dwarf].state == BUSY) - hauler_ids.push_back(dwarf); - } + } + + if (dwarf_info[dwarf].state == IDLE || dwarf_info[dwarf].state == BUSY) + hauler_ids.push_back(dwarf); + } dwarfinfo_sorter sorter(dwarf_info); - // Idle dwarves come first, then we sort from least-skilled to most-skilled. - std::sort(hauler_ids.begin(), hauler_ids.end(), sorter); + // Idle dwarves come first, then we sort from least-skilled to most-skilled. + std::sort(hauler_ids.begin(), hauler_ids.end(), sorter); - // don't set any haulers if everyone is off drinking or something - if (hauler_ids.size() == 0) { - num_haulers = 0; - } + // don't set any haulers if everyone is off drinking or something + if (hauler_ids.size() == 0) { + num_haulers = 0; + } - FOR_ENUM_ITEMS(unit_labor, labor) - { - if (labor == df::enums::unit_labor::NONE) - continue; + FOR_ENUM_ITEMS(unit_labor, labor) + { + if (labor == df::enums::unit_labor::NONE) + continue; /* - assert(labor >= 0); - assert(labor < ARRAY_COUNT(labor_infos)); - */ + assert(labor >= 0); + assert(labor < ARRAY_COUNT(labor_infos)); + */ - if (labor_infos[labor].mode() != HAULERS) - continue; + if (labor_infos[labor].mode() != HAULERS) + continue; - for (int i = 0; i < num_haulers; i++) - { - assert(i < hauler_ids.size()); + for (int i = 0; i < num_haulers; i++) + { + assert(i < hauler_ids.size()); - int dwarf = hauler_ids[i]; + int dwarf = hauler_ids[i]; - assert(dwarf >= 0); - assert(dwarf < n_dwarfs); - dwarfs[dwarf]->status.labors[labor] = true; - dwarf_info[dwarf].assigned_jobs++; + assert(dwarf >= 0); + assert(dwarf < n_dwarfs); + dwarfs[dwarf]->status.labors[labor] = true; + dwarf_info[dwarf].assigned_jobs++; - if (dwarf_info[dwarf].state == IDLE || dwarf_info[dwarf].state == BUSY) - labor_infos[labor].active_dwarfs++; + if (dwarf_info[dwarf].state == IDLE || dwarf_info[dwarf].state == BUSY) + labor_infos[labor].active_dwarfs++; - if (print_debug) - out.print("Dwarf %i \"%s\" assigned %s: hauler\n", dwarf, dwarfs[dwarf]->name.first_name.c_str(), ENUM_KEY_STR(unit_labor, labor).c_str()); - } + if (print_debug) + out.print("Dwarf %i \"%s\" assigned %s: hauler\n", dwarf, dwarfs[dwarf]->name.first_name.c_str(), ENUM_KEY_STR(unit_labor, labor).c_str()); + } - for (int i = num_haulers; i < hauler_ids.size(); i++) - { - assert(i < hauler_ids.size()); + for (int i = num_haulers; i < hauler_ids.size(); i++) + { + assert(i < hauler_ids.size()); - int dwarf = hauler_ids[i]; - - assert(dwarf >= 0); - assert(dwarf < n_dwarfs); + int dwarf = hauler_ids[i]; - dwarfs[dwarf]->status.labors[labor] = false; - } - } + assert(dwarf >= 0); + assert(dwarf < n_dwarfs); - print_debug = 0; + dwarfs[dwarf]->status.labors[labor] = false; + } + } + + print_debug = 0; return CR_OK; } void print_labor (df::enums::unit_labor::unit_labor labor, color_ostream &out) { - string labor_name = ENUM_KEY_STR(unit_labor, labor); - out << labor_name << ": "; - for (int i = 0; i < 20 - (int)labor_name.length(); i++) - out << ' '; - if (labor_infos[labor].mode() == DISABLE) - out << "disabled" << endl; - else - { - if (labor_infos[labor].mode() == HAULERS) - out << "haulers"; - else - out << "minimum " << labor_infos[labor].minimum_dwarfs() << ", maximum " << labor_infos[labor].maximum_dwarfs(); - out << ", currently " << labor_infos[labor].active_dwarfs << " dwarfs" << endl; - } + string labor_name = ENUM_KEY_STR(unit_labor, labor); + out << labor_name << ": "; + for (int i = 0; i < 20 - (int)labor_name.length(); i++) + out << ' '; + if (labor_infos[labor].mode() == DISABLE) + out << "disabled" << endl; + else + { + if (labor_infos[labor].mode() == HAULERS) + out << "haulers"; + else + out << "minimum " << labor_infos[labor].minimum_dwarfs() << ", maximum " << labor_infos[labor].maximum_dwarfs(); + out << ", currently " << labor_infos[labor].active_dwarfs << " dwarfs" << endl; + } } + command_result autolabor (color_ostream &out, std::vector <std::string> & parameters) { CoreSuspender suspend; @@ -1231,139 +1339,364 @@ command_result autolabor (color_ostream &out, std::vector <std::string> & parame return CR_FAILURE; } - if (parameters.size() == 1 && - (parameters[0] == "0" || parameters[0] == "enable" || - parameters[0] == "1" || parameters[0] == "disable")) + if (parameters.size() == 1 && + (parameters[0] == "0" || parameters[0] == "enable" || + parameters[0] == "1" || parameters[0] == "disable")) { bool enable = (parameters[0] == "1" || parameters[0] == "enable"); if (enable && !enable_autolabor) { enable_plugin(out); } - else + else if(!enable && enable_autolabor) { - if (enable_autolabor) - { - enable_autolabor = false; - setOptionEnabled(CF_ENABLED, false); - } + enable_autolabor = false; + setOptionEnabled(CF_ENABLED, false); out << "The plugin is disabled." << endl; + } + + return CR_OK; + } + + else if (parameters.size() == 2 && parameters[0] == "haulpct") + { + if (!enable_autolabor) + { + out << "Error: The plugin is not enabled." << endl; + return CR_FAILURE; + } + + int pct = atoi (parameters[1].c_str()); + hauler_pct = pct; + return CR_OK; + } + else if (parameters.size() == 2 || parameters.size() == 3) { + + if (!enable_autolabor) + { + out << "Error: The plugin is not enabled." << endl; + return CR_FAILURE; + } + + df::enums::unit_labor::unit_labor labor = df::enums::unit_labor::NONE; + + FOR_ENUM_ITEMS(unit_labor, test_labor) + { + if (parameters[0] == ENUM_KEY_STR(unit_labor, test_labor)) + labor = test_labor; + } + + if (labor == df::enums::unit_labor::NONE) + { + out.printerr("Could not find labor %s.\n", parameters[0].c_str()); + return CR_WRONG_USAGE; + } + + if (parameters[1] == "haulers") + { + labor_infos[labor].set_mode(HAULERS); + print_labor(labor, out); return CR_OK; } + if (parameters[1] == "disable") + { + labor_infos[labor].set_mode(DISABLE); + print_labor(labor, out); + return CR_OK; + } + if (parameters[1] == "reset") + { + reset_labor(labor); + print_labor(labor, out); + return CR_OK; + } + + int minimum = atoi (parameters[1].c_str()); + int maximum = 200; + if (parameters.size() == 3) + maximum = atoi (parameters[2].c_str()); + + if (maximum < minimum || maximum < 0 || minimum < 0) + { + out.printerr("Syntax: autolabor <labor> <minimum> [<maximum>]\n", maximum, minimum); + return CR_WRONG_USAGE; + } - return CR_OK; + labor_infos[labor].set_minimum_dwarfs(minimum); + labor_infos[labor].set_maximum_dwarfs(maximum); + labor_infos[labor].set_mode(AUTOMATIC); + print_labor(labor, out); + + return CR_OK; } - - if (!enable_autolabor) - { - out << "Error: The plugin is not enabled." << endl; - return CR_FAILURE; - } - - if (parameters.size() == 2 || parameters.size() == 3) { - df::enums::unit_labor::unit_labor labor = df::enums::unit_labor::NONE; - - FOR_ENUM_ITEMS(unit_labor, test_labor) - { - if (parameters[0] == ENUM_KEY_STR(unit_labor, test_labor)) - labor = test_labor; - } - - if (labor == df::enums::unit_labor::NONE) - { - out.printerr("Could not find labor %s.\n", parameters[0].c_str()); - return CR_WRONG_USAGE; - } - - if (parameters[1] == "haulers") - { - labor_infos[labor].set_mode(HAULERS); - print_labor(labor, out); - return CR_OK; - } - if (parameters[1] == "disable") - { - labor_infos[labor].set_mode(DISABLE); - print_labor(labor, out); - return CR_OK; - } - if (parameters[1] == "reset") - { - reset_labor(labor); - print_labor(labor, out); - return CR_OK; - } - - int minimum = atoi (parameters[1].c_str()); - int maximum = 200; - if (parameters.size() == 3) - maximum = atoi (parameters[2].c_str()); - - if (maximum < minimum || maximum < 0 || minimum < 0) - { - out.printerr("Syntax: autolabor <labor> <minimum> [<maximum>]\n", maximum, minimum); - return CR_WRONG_USAGE; - } - - labor_infos[labor].set_minimum_dwarfs(minimum); - labor_infos[labor].set_maximum_dwarfs(maximum); - labor_infos[labor].set_mode(AUTOMATIC); - print_labor(labor, out); - - return CR_OK; - } - else if (parameters.size() == 1 && parameters[0] == "reset-all") { - for (int i = 0; i < labor_infos.size(); i++) - { - reset_labor((df::enums::unit_labor::unit_labor) i); - } - out << "All labors reset." << endl; - return CR_OK; - } - else if (parameters.size() == 1 && parameters[0] == "list" || parameters[0] == "status") { - if (!enable_autolabor) - { - out << "autolabor not activated." << endl; - return CR_OK; - } - - bool need_comma = 0; - for (int i = 0; i < NUM_STATE; i++) - { - if (state_count[i] == 0) - continue; - if (need_comma) - out << ", "; - out << state_count[i] << ' ' << state_names[i]; - need_comma = 1; - } - out << endl; - - if (parameters[0] == "list") - { - FOR_ENUM_ITEMS(unit_labor, labor) - { - if (labor == df::enums::unit_labor::NONE) - continue; - - print_labor(labor, out); - } - } - - return CR_OK; - } - else if (parameters.size() == 1 && parameters[0] == "debug") { - print_debug = 1; - - return CR_OK; - } - else + else if (parameters.size() == 1 && parameters[0] == "reset-all") { + if (!enable_autolabor) + { + out << "Error: The plugin is not enabled." << endl; + return CR_FAILURE; + } + + for (int i = 0; i < labor_infos.size(); i++) + { + reset_labor((df::enums::unit_labor::unit_labor) i); + } + out << "All labors reset." << endl; + return CR_OK; + } + else if (parameters.size() == 1 && parameters[0] == "list" || parameters[0] == "status") { + if (!enable_autolabor) + { + out << "Error: The plugin is not enabled." << endl; + return CR_FAILURE; + } + + bool need_comma = 0; + for (int i = 0; i < NUM_STATE; i++) + { + if (state_count[i] == 0) + continue; + if (need_comma) + out << ", "; + out << state_count[i] << ' ' << state_names[i]; + need_comma = 1; + } + out << endl; + + if (parameters[0] == "list") + { + FOR_ENUM_ITEMS(unit_labor, labor) + { + if (labor == df::enums::unit_labor::NONE) + continue; + + print_labor(labor, out); + } + } + + return CR_OK; + } + else if (parameters.size() == 1 && parameters[0] == "debug") + { + if (!enable_autolabor) + { + out << "Error: The plugin is not enabled." << endl; + return CR_FAILURE; + } + + print_debug = 1; + + return CR_OK; + } + else { out.print("Automatically assigns labors to dwarves.\n" "Activate with 'autolabor 1', deactivate with 'autolabor 0'.\n" "Current state: %d.\n", enable_autolabor); - return CR_OK; - } + return CR_OK; + } +} + +struct StockpileInfo { + df::building_stockpilest* sp; + int size; + int free; + int x1, x2, y1, y2, z; + +public: + StockpileInfo(df::building_stockpilest *sp_) : sp(sp_) + { + MapExtras::MapCache mc; + + z = sp_->z; + x1 = sp_->room.x; + x2 = sp_->room.x + sp_->room.width; + y1 = sp_->room.y; + y2 = sp_->room.y + sp_->room.height; + int e = 0; + size = 0; + free = 0; + for (int y = y1; y < y2; y++) + for (int x = x1; x < x2; x++) + if (sp_->room.extents[e++] == 1) + { + size++; + DFCoord cursor (x,y,z); + uint32_t blockX = x / 16; + uint32_t tileX = x % 16; + uint32_t blockY = y / 16; + uint32_t tileY = y % 16; + MapExtras::Block * b = mc.BlockAt(cursor/16); + if(b && b->is_valid()) + { + auto &block = *b->getRaw(); + df::tile_occupancy &occ = block.occupancy[tileX][tileY]; + if (!occ.bits.item) + free++; + } + } + } + + bool isFull() { return free == 0; } + + bool canHold(df::item *i) + { + return false; + } + + bool inStockpile(df::item *i) + { + df::item *container = Items::getContainer(i); + if (container) + return inStockpile(container); + + if (i->pos.z != z) return false; + if (i->pos.x < x1 || i->pos.x >= x2 || + i->pos.y < y1 || i->pos.y >= y2) return false; + int e = (i->pos.x - x1) + (i->pos.y - y1) * sp->room.width; + return sp->room.extents[e] == 1; + } + + int getId() { return sp->id; } +}; + +static int stockcheck(color_ostream &out, vector <string> & parameters) +{ + int count = 0; + + std::vector<StockpileInfo*> stockpiles; + + for (int i = 0; i < world->buildings.all.size(); ++i) + { + df::building *build = world->buildings.all[i]; + auto type = build->getType(); + if (df::enums::building_type::Stockpile == type) + { + df::building_stockpilest *sp = virtual_cast<df::building_stockpilest>(build); + StockpileInfo *spi = new StockpileInfo(sp); + stockpiles.push_back(spi); + } + + } + + std::vector<df::item*> &items = world->items.other[df::enums::items_other_id::ANY_FREE]; + + // Precompute a bitmask with the bad flags + df::item_flags bad_flags; + bad_flags.whole = 0; + +#define F(x) bad_flags.bits.x = true; + F(dump); F(forbid); F(garbage_collect); + F(hostile); F(on_fire); F(rotten); F(trader); + F(in_building); F(construction); F(artifact1); + F(spider_web); F(owned); F(in_job); +#undef F + + for (size_t i = 0; i < items.size(); i++) + { + df::item *item = items[i]; + if (item->flags.whole & bad_flags.whole) + continue; + + // we really only care about MEAT, FISH, FISH_RAW, PLANT, CHEESE, FOOD, and EGG + + df::item_type typ = item->getType(); + if (typ != df::enums::item_type::MEAT && + typ != df::enums::item_type::FISH && + typ != df::enums::item_type::FISH_RAW && + typ != df::enums::item_type::PLANT && + typ != df::enums::item_type::CHEESE && + typ != df::enums::item_type::FOOD && + typ != df::enums::item_type::EGG) + continue; + + df::item *container = 0; + df::unit *holder = 0; + df::building *building = 0; + + for (size_t i = 0; i < item->itemrefs.size(); i++) + { + df::general_ref *ref = item->itemrefs[i]; + + switch (ref->getType()) + { + case general_ref_type::CONTAINED_IN_ITEM: + container = ref->getItem(); + break; + + case general_ref_type::UNIT_HOLDER: + holder = ref->getUnit(); + break; + + case general_ref_type::BUILDING_HOLDER: + building = ref->getBuilding(); + break; + + default: + break; + } + } + + df::item *nextcontainer = container; + df::item *lastcontainer = 0; + + while(nextcontainer) { + df::item *thiscontainer = nextcontainer; + nextcontainer = 0; + for (size_t i = 0; i < thiscontainer->itemrefs.size(); i++) + { + df::general_ref *ref = thiscontainer->itemrefs[i]; + + switch (ref->getType()) + { + case general_ref_type::CONTAINED_IN_ITEM: + lastcontainer = nextcontainer = ref->getItem(); + break; + + case general_ref_type::UNIT_HOLDER: + holder = ref->getUnit(); + break; + + case general_ref_type::BUILDING_HOLDER: + building = ref->getBuilding(); + break; + + default: + break; + } + } + } + + if (holder) + continue; // carried items do not rot as far as i know + + if (building) { + df::building_type btype = building->getType(); + if (btype == df::enums::building_type::TradeDepot || + btype == df::enums::building_type::Wagon) + continue; // items in trade depot or the embark wagon do not rot + + if (typ == df::enums::item_type::EGG && btype ==df::enums::building_type::NestBox) + continue; // eggs in nest box do not rot + } + + int canHoldCount = 0; + StockpileInfo *current = 0; + + for (int idx = 0; idx < stockpiles.size(); idx++) + { + StockpileInfo *spi = stockpiles[idx]; + if (spi->canHold(item)) canHoldCount++; + if (spi->inStockpile(item)) current=spi; + } + + if (current) + continue; + + count++; + + } + + return count; } diff --git a/plugins/cleaners.cpp b/plugins/cleaners.cpp index fb436a6d..c0301de7 100644 --- a/plugins/cleaners.cpp +++ b/plugins/cleaners.cpp @@ -114,6 +114,28 @@ command_result cleanunits (color_ostream &out) return CR_OK; } +command_result cleanplants (color_ostream &out) +{ + // Invoked from clean(), already suspended + int cleaned_plants = 0, cleaned_total = 0; + for (size_t i = 0; i < world->plants.all.size(); i++) + { + df::plant *plant = world->plants.all[i]; + + if (plant->contaminants.size()) + { + for (size_t j = 0; j < plant->contaminants.size(); j++) + delete plant->contaminants[j]; + cleaned_plants++; + cleaned_total += plant->contaminants.size(); + plant->contaminants.clear(); + } + } + if (cleaned_total) + out.print("Removed %d contaminants from %d plants.\n", cleaned_total, cleaned_plants); + return CR_OK; +} + command_result spotclean (color_ostream &out, vector <string> & parameters) { // HOTKEY COMMAND: CORE ALREADY SUSPENDED @@ -153,6 +175,7 @@ command_result clean (color_ostream &out, vector <string> & parameters) bool mud = false; bool units = false; bool items = false; + bool plants = false; for(size_t i = 0; i < parameters.size();i++) { if(parameters[i] == "map") @@ -161,11 +184,14 @@ command_result clean (color_ostream &out, vector <string> & parameters) units = true; else if(parameters[i] == "items") items = true; + else if(parameters[i] == "plants") + plants = true; else if(parameters[i] == "all") { map = true; items = true; units = true; + plants = true; } else if(parameters[i] == "snow") snow = true; @@ -174,7 +200,7 @@ command_result clean (color_ostream &out, vector <string> & parameters) else return CR_WRONG_USAGE; } - if(!map && !units && !items) + if(!map && !units && !items && !plants) return CR_WRONG_USAGE; CoreSuspender suspend; @@ -185,6 +211,8 @@ command_result clean (color_ostream &out, vector <string> & parameters) cleanunits(out); if(items) cleanitems(out); + if(plants) + cleanplants(out); return CR_OK; } @@ -198,6 +226,7 @@ DFhackCExport command_result plugin_init ( color_ostream &out, std::vector <Plug " map - clean the map tiles\n" " items - clean all items\n" " units - clean all creatures\n" + " plants - clean all plants\n" " all - clean everything.\n" "More options for 'map':\n" " snow - also remove snow\n" diff --git a/plugins/devel/CMakeLists.txt b/plugins/devel/CMakeLists.txt index 5d1d585a..8274accf 100644 --- a/plugins/devel/CMakeLists.txt +++ b/plugins/devel/CMakeLists.txt @@ -17,3 +17,4 @@ DFHACK_PLUGIN(stockcheck stockcheck.cpp) DFHACK_PLUGIN(stripcaged stripcaged.cpp) DFHACK_PLUGIN(rprobe rprobe.cpp) DFHACK_PLUGIN(nestboxes nestboxes.cpp) +DFHACK_PLUGIN(vshook vshook.cpp) diff --git a/plugins/devel/kittens.cpp b/plugins/devel/kittens.cpp index 2e8e6eab..b610d474 100644 --- a/plugins/devel/kittens.cpp +++ b/plugins/devel/kittens.cpp @@ -257,7 +257,7 @@ command_result kittens (color_ostream &out, vector <string> & parameters) }; con.cursor(false); con.clear(); - Console::color_value color = Console::COLOR_BLUE; + Console::color_value color = COLOR_BLUE; while(1) { if(shutdown_flag) @@ -282,7 +282,7 @@ command_result kittens (color_ostream &out, vector <string> & parameters) con.flush(); con.msleep(60); ((int&)color) ++; - if(color > Console::COLOR_MAX) - color = Console::COLOR_BLUE; + if(color > COLOR_MAX) + color = COLOR_BLUE; } } diff --git a/plugins/devel/memview.cpp b/plugins/devel/memview.cpp index 5d8d6a9b..757b475d 100644 --- a/plugins/devel/memview.cpp +++ b/plugins/devel/memview.cpp @@ -73,7 +73,7 @@ void outputHex(uint8_t *buf,uint8_t *lbuf,size_t len,size_t start,color_ostream con.reset_color();
if(isAddr((uint32_t *)(buf+j+i),ranges))
- con.color(Console::COLOR_LIGHTRED); //coloring in the middle does not work
+ con.color(COLOR_LIGHTRED); //coloring in the middle does not work
//TODO make something better?
}
if(lbuf[j+i]!=buf[j+i])
diff --git a/plugins/devel/stripcaged.cpp b/plugins/devel/stripcaged.cpp index 7e492cb0..e3d2a82f 100644 --- a/plugins/devel/stripcaged.cpp +++ b/plugins/devel/stripcaged.cpp @@ -77,6 +77,13 @@ DFhackCExport command_result plugin_shutdown ( color_ostream &out ) command_result df_stripcaged(color_ostream &out, vector <string> & parameters) { CoreSuspender suspend; + bool keeparmor = true; + + if (parameters.size() == 1 && parameters[0] == "dumparmor") + { + out << "Dumping armor too" << endl; + keeparmor = false; + } size_t count = 0; for (size_t i=0; i < world->units.all.size(); i++) @@ -89,6 +96,11 @@ command_result df_stripcaged(color_ostream &out, vector <string> & parameters) df::unit_inventory_item* uii = unit->inventory[j]; if (uii->item) { + if (keeparmor && (uii->item->isArmorNotClothing() || uii->item->isClothing())) + continue; + std::string desc; + uii->item->getItemDescription(&desc,0); + out << "Item " << desc << " dumped." << endl; uii->item->flags.bits.forbid = 0; uii->item->flags.bits.dump = 1; count++; diff --git a/plugins/devel/vshook.cpp b/plugins/devel/vshook.cpp new file mode 100644 index 00000000..ceec2d08 --- /dev/null +++ b/plugins/devel/vshook.cpp @@ -0,0 +1,55 @@ +#include "Core.h" +#include <Console.h> +#include <Export.h> +#include <PluginManager.h> +#include <modules/Gui.h> +#include <modules/Screen.h> +#include <vector> +#include <cstdio> +#include <stack> +#include <string> +#include <cmath> + +#include <VTableInterpose.h> +#include "df/graphic.h" +#include "df/viewscreen_titlest.h" + +using std::vector; +using std::string; +using std::stack; +using namespace DFHack; + +using df::global::gps; + +DFHACK_PLUGIN("vshook"); + +struct title_hook : df::viewscreen_titlest { + typedef df::viewscreen_titlest interpose_base; + + DEFINE_VMETHOD_INTERPOSE(void, render, ()) + { + INTERPOSE_NEXT(render)(); + + Screen::Pen pen(' ',COLOR_WHITE,COLOR_BLACK); + Screen::paintString(pen,0,0,"DFHack " DFHACK_VERSION); + } +}; + +IMPLEMENT_VMETHOD_INTERPOSE(title_hook, render); + +DFhackCExport command_result plugin_init ( color_ostream &out, std::vector <PluginCommand> &commands) +{ + if (gps) + { + if (!INTERPOSE_HOOK(title_hook, render).apply()) + out.printerr("Could not interpose viewscreen_titlest::render\n"); + } + + return CR_OK; +} + +DFhackCExport command_result plugin_shutdown ( color_ostream &out ) +{ + INTERPOSE_HOOK(title_hook, render).remove(); + return CR_OK; +} diff --git a/plugins/fixpositions.cpp b/plugins/fixpositions.cpp index 086848fe..bd8fb279 100644 --- a/plugins/fixpositions.cpp +++ b/plugins/fixpositions.cpp @@ -80,9 +80,9 @@ command_result df_fixdiplomats (color_ostream &out, vector<string> ¶meters) pos->flags.set(entity_position_flags::IS_DIPLOMAT); pos->flags.set(entity_position_flags::IS_LEADER); // not sure what these flags do, but the game sets them for a valid diplomat - pos->flags.set(entity_position_flags::anon_1); - pos->flags.set(entity_position_flags::anon_3); - pos->flags.set(entity_position_flags::anon_4); + pos->flags.set(entity_position_flags::unk_12); + pos->flags.set(entity_position_flags::unk_1a); + pos->flags.set(entity_position_flags::unk_1b); pos->name[0] = "Diplomat"; pos->name[1] = "Diplomats"; pos->precedence = 70; @@ -183,9 +183,9 @@ command_result df_fixmerchants (color_ostream &out, vector<string> ¶meters) pos->flags.set(entity_position_flags::IS_DIPLOMAT); pos->flags.set(entity_position_flags::IS_LEADER); // not sure what these flags do, but the game sets them for a valid guild rep - pos->flags.set(entity_position_flags::anon_1); - pos->flags.set(entity_position_flags::anon_3); - pos->flags.set(entity_position_flags::anon_4); + pos->flags.set(entity_position_flags::unk_12); + pos->flags.set(entity_position_flags::unk_1a); + pos->flags.set(entity_position_flags::unk_1b); pos->name[0] = "Guild Representative"; pos->name[1] = "Guild Representatives"; pos->precedence = 40; diff --git a/plugins/manipulator.cpp b/plugins/manipulator.cpp new file mode 100644 index 00000000..434ba08c --- /dev/null +++ b/plugins/manipulator.cpp @@ -0,0 +1,661 @@ +// Dwarf Manipulator - a Therapist-style labor editor + +#include "Core.h" +#include <Console.h> +#include <Export.h> +#include <PluginManager.h> +#include <MiscUtils.h> +#include <modules/Screen.h> +#include <modules/Translation.h> +#include <modules/Units.h> +#include <vector> +#include <string> +#include <set> + +#include <VTableInterpose.h> +#include "df/world.h" +#include "df/ui.h" +#include "df/graphic.h" +#include "df/enabler.h" +#include "df/viewscreen_unitlistst.h" +#include "df/interface_key.h" +#include "df/unit.h" +#include "df/unit_soul.h" +#include "df/unit_skill.h" +#include "df/creature_raw.h" +#include "df/caste_raw.h" + +using std::set; +using std::vector; +using std::string; + +using namespace DFHack; +using namespace df::enums; + +using df::global::world; +using df::global::ui; +using df::global::gps; +using df::global::enabler; + +DFHACK_PLUGIN("manipulator"); + +struct SkillLevel +{ + const char *name; + int points; + char abbrev; +}; + +#define NUM_SKILL_LEVELS (sizeof(skill_levels) / sizeof(SkillLevel)) + +// The various skill rankings. Zero skill is hardcoded to "Not" and '-'. +const SkillLevel skill_levels[] = { + {"Dabbling", 500, '0'}, + {"Novice", 600, '1'}, + {"Adequate", 700, '2'}, + {"Competent", 800, '3'}, + {"Skilled", 900, '4'}, + {"Proficient", 1000, '5'}, + {"Talented", 1100, '6'}, + {"Adept", 1200, '7'}, + {"Expert", 1300, '8'}, + {"Professional",1400, '9'}, + {"Accomplished",1500, 'A'}, + {"Great", 1600, 'B'}, + {"Master", 1700, 'C'}, + {"High Master", 1800, 'D'}, + {"Grand Master",1900, 'E'}, + {"Legendary", 2000, 'U'}, + {"Legendary+1", 2100, 'V'}, + {"Legendary+2", 2200, 'W'}, + {"Legendary+3", 2300, 'X'}, + {"Legendary+4", 2400, 'Y'}, + {"Legendary+5", 0, 'Z'} +}; + +struct SkillColumn +{ + df::profession profession; + df::unit_labor labor; + df::job_skill skill; + char label[3]; + bool special; // specified labor is mutually exclusive with all other special labors +}; + +#define NUM_COLUMNS (sizeof(columns) / sizeof(SkillColumn)) + +// All of the skill/labor columns we want to display. Includes profession (for color), labor, skill, and 2 character label +const SkillColumn columns[] = { +// Mining + {profession::MINER, unit_labor::MINE, job_skill::MINING, "Mi", true}, +// Woodworking + {profession::WOODWORKER, unit_labor::CARPENTER, job_skill::CARPENTRY, "Ca"}, + {profession::WOODWORKER, unit_labor::BOWYER, job_skill::BOWYER, "Bw"}, + {profession::WOODWORKER, unit_labor::CUTWOOD, job_skill::WOODCUTTING, "WC", true}, +// Stoneworking + {profession::STONEWORKER, unit_labor::MASON, job_skill::MASONRY, "Ma"}, + {profession::STONEWORKER, unit_labor::DETAIL, job_skill::DETAILSTONE, "En"}, +// Hunting/Related + {profession::RANGER, unit_labor::ANIMALTRAIN, job_skill::ANIMALTRAIN, "Tr"}, + {profession::RANGER, unit_labor::ANIMALCARE, job_skill::ANIMALCARE, "Ca"}, + {profession::RANGER, unit_labor::HUNT, job_skill::SNEAK, "Hu", true}, + {profession::RANGER, unit_labor::TRAPPER, job_skill::TRAPPING, "Tr"}, + {profession::RANGER, unit_labor::DISSECT_VERMIN, job_skill::DISSECT_VERMIN, "Di"}, +// Healthcare + {profession::DOCTOR, unit_labor::DIAGNOSE, job_skill::DIAGNOSE, "Di"}, + {profession::DOCTOR, unit_labor::SURGERY, job_skill::SURGERY, "Su"}, + {profession::DOCTOR, unit_labor::BONE_SETTING, job_skill::SET_BONE, "Bo"}, + {profession::DOCTOR, unit_labor::SUTURING, job_skill::SUTURE, "St"}, + {profession::DOCTOR, unit_labor::DRESSING_WOUNDS, job_skill::DRESS_WOUNDS, "Dr"}, + {profession::DOCTOR, unit_labor::FEED_WATER_CIVILIANS, job_skill::NONE, "Fd"}, + {profession::DOCTOR, unit_labor::RECOVER_WOUNDED, job_skill::NONE, "Re"}, +// Farming/Related + {profession::FARMER, unit_labor::BUTCHER, job_skill::BUTCHER, "Bu"}, + {profession::FARMER, unit_labor::TANNER, job_skill::TANNER, "Ta"}, + {profession::FARMER, unit_labor::PLANT, job_skill::PLANT, "Gr"}, + {profession::FARMER, unit_labor::DYER, job_skill::DYER, "Dy"}, + {profession::FARMER, unit_labor::SOAP_MAKER, job_skill::SOAP_MAKING, "So"}, + {profession::FARMER, unit_labor::BURN_WOOD, job_skill::WOOD_BURNING, "WB"}, + {profession::FARMER, unit_labor::POTASH_MAKING, job_skill::POTASH_MAKING, "Po"}, + {profession::FARMER, unit_labor::LYE_MAKING, job_skill::LYE_MAKING, "Ly"}, + {profession::FARMER, unit_labor::MILLER, job_skill::MILLING, "Ml"}, + {profession::FARMER, unit_labor::BREWER, job_skill::BREWING, "Br"}, + {profession::FARMER, unit_labor::HERBALIST, job_skill::HERBALISM, "He"}, + {profession::FARMER, unit_labor::PROCESS_PLANT, job_skill::PROCESSPLANTS, "Th"}, + {profession::FARMER, unit_labor::MAKE_CHEESE, job_skill::CHEESEMAKING, "Ch"}, + {profession::FARMER, unit_labor::MILK, job_skill::MILK, "Mk"}, + {profession::FARMER, unit_labor::SHEARER, job_skill::SHEARING, "Sh"}, + {profession::FARMER, unit_labor::SPINNER, job_skill::SPINNING, "Sp"}, + {profession::FARMER, unit_labor::COOK, job_skill::COOK, "Co"}, + {profession::FARMER, unit_labor::PRESSING, job_skill::PRESSING, "Pr"}, + {profession::FARMER, unit_labor::BEEKEEPING, job_skill::BEEKEEPING, "Be"}, +// Fishing/Related + {profession::FISHERMAN, unit_labor::FISH, job_skill::FISH, "Fi"}, + {profession::FISHERMAN, unit_labor::CLEAN_FISH, job_skill::PROCESSFISH, "Cl"}, + {profession::FISHERMAN, unit_labor::DISSECT_FISH, job_skill::DISSECT_FISH, "Di"}, +// Metalsmithing + {profession::METALSMITH, unit_labor::SMELT, job_skill::SMELT, "Fu"}, + {profession::METALSMITH, unit_labor::FORGE_WEAPON, job_skill::FORGE_WEAPON, "We"}, + {profession::METALSMITH, unit_labor::FORGE_ARMOR, job_skill::FORGE_ARMOR, "Ar"}, + {profession::METALSMITH, unit_labor::FORGE_FURNITURE, job_skill::FORGE_FURNITURE, "Bl"}, + {profession::METALSMITH, unit_labor::METAL_CRAFT, job_skill::METALCRAFT, "Cr"}, +// Jewelry + {profession::JEWELER, unit_labor::CUT_GEM, job_skill::CUTGEM, "Cu"}, + {profession::JEWELER, unit_labor::ENCRUST_GEM, job_skill::ENCRUSTGEM, "Se"}, +// Crafts + {profession::CRAFTSMAN, unit_labor::LEATHER, job_skill::LEATHERWORK, "Le"}, + {profession::CRAFTSMAN, unit_labor::WOOD_CRAFT, job_skill::WOODCRAFT, "Wo"}, + {profession::CRAFTSMAN, unit_labor::STONE_CRAFT, job_skill::STONECRAFT, "St"}, + {profession::CRAFTSMAN, unit_labor::BONE_CARVE, job_skill::BONECARVE, "Bo"}, + {profession::CRAFTSMAN, unit_labor::GLASSMAKER, job_skill::GLASSMAKER, "Gl"}, + {profession::CRAFTSMAN, unit_labor::WEAVER, job_skill::WEAVING, "We"}, + {profession::CRAFTSMAN, unit_labor::CLOTHESMAKER, job_skill::CLOTHESMAKING, "Cl"}, + {profession::CRAFTSMAN, unit_labor::EXTRACT_STRAND, job_skill::EXTRACT_STRAND, "Ad"}, + {profession::CRAFTSMAN, unit_labor::POTTERY, job_skill::POTTERY, "Po"}, + {profession::CRAFTSMAN, unit_labor::GLAZING, job_skill::GLAZING, "Gl"}, + {profession::CRAFTSMAN, unit_labor::WAX_WORKING, job_skill::WAX_WORKING, "Wx"}, +// Engineering + {profession::ENGINEER, unit_labor::SIEGECRAFT, job_skill::SIEGECRAFT, "En"}, + {profession::ENGINEER, unit_labor::SIEGEOPERATE, job_skill::SIEGEOPERATE, "Op"}, + {profession::ENGINEER, unit_labor::MECHANIC, job_skill::MECHANICS, "Me"}, + {profession::ENGINEER, unit_labor::OPERATE_PUMP, job_skill::OPERATE_PUMP, "Pu"}, +// Hauling + {profession::STANDARD, unit_labor::HAUL_STONE, job_skill::NONE, "St"}, + {profession::STANDARD, unit_labor::HAUL_WOOD, job_skill::NONE, "Wo"}, + {profession::STANDARD, unit_labor::HAUL_ITEM, job_skill::NONE, "It"}, + {profession::STANDARD, unit_labor::HAUL_BODY, job_skill::NONE, "Bu"}, + {profession::STANDARD, unit_labor::HAUL_FOOD, job_skill::NONE, "Fo"}, + {profession::STANDARD, unit_labor::HAUL_REFUSE, job_skill::NONE, "Re"}, + {profession::STANDARD, unit_labor::HAUL_FURNITURE, job_skill::NONE, "Fu"}, + {profession::STANDARD, unit_labor::HAUL_ANIMAL, job_skill::NONE, "An"}, + {profession::STANDARD, unit_labor::PUSH_HAUL_VEHICLE, job_skill::NONE, "Ve"}, +// Other Jobs + {profession::CHILD, unit_labor::ARCHITECT, job_skill::DESIGNBUILDING, "Ar"}, + {profession::CHILD, unit_labor::ALCHEMIST, job_skill::ALCHEMY, "Al"}, + {profession::CHILD, unit_labor::CLEAN, job_skill::NONE, "Cl"}, +// Military + {profession::WRESTLER, unit_labor::NONE, job_skill::WRESTLING, "Wr"}, + {profession::WRESTLER, unit_labor::NONE, job_skill::AXE, "Ax"}, + {profession::WRESTLER, unit_labor::NONE, job_skill::SWORD, "Sw"}, + {profession::WRESTLER, unit_labor::NONE, job_skill::MACE, "Mc"}, + {profession::WRESTLER, unit_labor::NONE, job_skill::HAMMER, "Ha"}, + {profession::WRESTLER, unit_labor::NONE, job_skill::SPEAR, "Sp"}, + {profession::WRESTLER, unit_labor::NONE, job_skill::DAGGER, "Kn"}, + {profession::WRESTLER, unit_labor::NONE, job_skill::CROSSBOW, "Cb"}, + {profession::WRESTLER, unit_labor::NONE, job_skill::BOW, "Bo"}, + {profession::WRESTLER, unit_labor::NONE, job_skill::BLOWGUN, "Bl"}, + {profession::WRESTLER, unit_labor::NONE, job_skill::PIKE, "Pk"}, + {profession::WRESTLER, unit_labor::NONE, job_skill::WHIP, "La"}, + {profession::WRESTLER, unit_labor::NONE, job_skill::ARMOR, "Ar"}, + {profession::WRESTLER, unit_labor::NONE, job_skill::SHIELD, "Sh"}, + {profession::WRESTLER, unit_labor::NONE, job_skill::BITE, "Bi"}, + {profession::WRESTLER, unit_labor::NONE, job_skill::GRASP_STRIKE, "Pu"}, + {profession::WRESTLER, unit_labor::NONE, job_skill::STANCE_STRIKE, "Ki"}, + {profession::WRESTLER, unit_labor::NONE, job_skill::DODGING, "Do"}, + {profession::WRESTLER, unit_labor::NONE, job_skill::MISC_WEAPON, "Mi"}, + {profession::WRESTLER, unit_labor::NONE, job_skill::MELEE_COMBAT, "Fi"}, + {profession::WRESTLER, unit_labor::NONE, job_skill::RANGED_COMBAT, "Ar"}, + + {profession::RECRUIT, unit_labor::NONE, job_skill::LEADERSHIP, "Le"}, + {profession::RECRUIT, unit_labor::NONE, job_skill::TEACHING, "Te"}, + {profession::RECRUIT, unit_labor::NONE, job_skill::KNOWLEDGE_ACQUISITION, "Lr"}, + {profession::RECRUIT, unit_labor::NONE, job_skill::DISCIPLINE, "Di"}, + {profession::RECRUIT, unit_labor::NONE, job_skill::CONCENTRATION, "Co"}, + {profession::RECRUIT, unit_labor::NONE, job_skill::SITUATIONAL_AWARENESS, "Aw"}, + {profession::RECRUIT, unit_labor::NONE, job_skill::COORDINATION, "Cr"}, + {profession::RECRUIT, unit_labor::NONE, job_skill::BALANCE, "Ba"}, + +// Social + {profession::STANDARD, unit_labor::NONE, job_skill::PERSUASION, "Pe"}, + {profession::STANDARD, unit_labor::NONE, job_skill::NEGOTIATION, "Ne"}, + {profession::STANDARD, unit_labor::NONE, job_skill::JUDGING_INTENT, "Ju"}, + {profession::STANDARD, unit_labor::NONE, job_skill::LYING, "Ly"}, + {profession::STANDARD, unit_labor::NONE, job_skill::INTIMIDATION, "In"}, + {profession::STANDARD, unit_labor::NONE, job_skill::CONVERSATION, "Cn"}, + {profession::STANDARD, unit_labor::NONE, job_skill::COMEDY, "Cm"}, + {profession::STANDARD, unit_labor::NONE, job_skill::FLATTERY, "Fl"}, + {profession::STANDARD, unit_labor::NONE, job_skill::CONSOLE, "Cs"}, + {profession::STANDARD, unit_labor::NONE, job_skill::PACIFY, "Pc"}, + {profession::ADMINISTRATOR, unit_labor::NONE, job_skill::APPRAISAL, "Ap"}, + {profession::ADMINISTRATOR, unit_labor::NONE, job_skill::ORGANIZATION, "Or"}, + {profession::ADMINISTRATOR, unit_labor::NONE, job_skill::RECORD_KEEPING, "RK"}, + +// Miscellaneous + {profession::STANDARD, unit_labor::NONE, job_skill::THROW, "Th"}, + {profession::STANDARD, unit_labor::NONE, job_skill::CRUTCH_WALK, "CW"}, + {profession::STANDARD, unit_labor::NONE, job_skill::SWIMMING, "Sw"}, + {profession::STANDARD, unit_labor::NONE, job_skill::KNAPPING, "Kn"}, + + {profession::DRUNK, unit_labor::NONE, job_skill::WRITING, "Wr"}, + {profession::DRUNK, unit_labor::NONE, job_skill::PROSE, "Pr"}, + {profession::DRUNK, unit_labor::NONE, job_skill::POETRY, "Po"}, + {profession::DRUNK, unit_labor::NONE, job_skill::READING, "Rd"}, + {profession::DRUNK, unit_labor::NONE, job_skill::SPEAKING, "Sp"}, + + {profession::ADMINISTRATOR, unit_labor::NONE, job_skill::MILITARY_TACTICS, "MT"}, + {profession::ADMINISTRATOR, unit_labor::NONE, job_skill::TRACKING, "Tr"}, + {profession::ADMINISTRATOR, unit_labor::NONE, job_skill::MAGIC_NATURE, "Dr"}, +}; + +struct UnitInfo +{ + df::unit *unit; + bool allowEdit; + string name; + string transname; + string profession; + int8_t color; +}; + +#define FILTER_NONWORKERS 0x0001 +#define FILTER_NONDWARVES 0x0002 +#define FILTER_NONCIV 0x0004 +#define FILTER_ANIMALS 0x0008 +#define FILTER_LIVING 0x0010 +#define FILTER_DEAD 0x0020 + +class viewscreen_unitlaborsst : public dfhack_viewscreen { +public: + static viewscreen_unitlaborsst *create (char pushtype, df::viewscreen *scr = NULL); + + void feed(set<df::interface_key> *events); + + void render(); + void resize(int w, int h) { calcSize(); } + + void help() { } + + std::string getFocusString() { return "unitlabors"; } + + viewscreen_unitlaborsst(); + ~viewscreen_unitlaborsst() { }; + +protected: + vector<UnitInfo *> units; + int filter; + + int first_row, sel_row; + int first_column, sel_column; + + int height, name_width, prof_width, labors_width; + +// bool descending; +// int sort_skill; +// int sort_labor; + + void readUnits (); + void calcSize (); +}; + +viewscreen_unitlaborsst::viewscreen_unitlaborsst() +{ + filter = FILTER_LIVING; + first_row = sel_row = 0; + first_column = sel_column = 0; + calcSize(); + readUnits(); +} + +void viewscreen_unitlaborsst::readUnits () +{ + for (size_t i = 0; i < units.size(); i++) + delete units[i]; + units.clear(); + + UnitInfo *cur = new UnitInfo; + for (size_t i = 0; i < world->units.active.size(); i++) + { + df::unit *unit = world->units.active[i]; + cur->unit = unit; + cur->allowEdit = true; + + if (unit->race != ui->race_id) + { + cur->allowEdit = false; + if (!(filter & FILTER_NONDWARVES)) + continue; + } + + if (unit->civ_id != ui->civ_id) + { + cur->allowEdit = false; + if (!(filter & FILTER_NONCIV)) + continue; + } + + if (unit->flags1.bits.dead) + { + cur->allowEdit = false; + if (!(filter & FILTER_DEAD)) + continue; + } + else + { + if (!(filter & FILTER_LIVING)) + continue; + } + + if (!ENUM_ATTR(profession, can_assign_labor, unit->profession)) + { + cur->allowEdit = false; + if (!(filter & FILTER_NONWORKERS)) + continue; + } + + if (!unit->name.first_name.length()) + { + if (!(filter & FILTER_ANIMALS)) + continue; + } + + cur->name = Translation::TranslateName(&unit->name, false); + cur->transname = Translation::TranslateName(&unit->name, true); + cur->profession = Units::getProfessionName(unit); + cur->color = Units::getProfessionColor(unit); + + units.push_back(cur); + cur = new UnitInfo; + } + delete cur; +} + +void viewscreen_unitlaborsst::calcSize() +{ + height = gps->dimy - 10; + if (height > units.size()) + height = units.size(); + + name_width = prof_width = labors_width = 0; + for (int i = 4; i < gps->dimx; i++) + { + // 20% for Name, 20% for Profession, 60% for Labors + switch ((i - 4) % 5) + { + case 0: case 2: case 4: + labors_width++; + break; + case 1: + name_width++; + break; + case 3: + prof_width++; + break; + } + } + while (labors_width > NUM_COLUMNS) + { + if (labors_width & 1) + name_width++; + else + prof_width++; + labors_width--; + } + + // don't adjust scroll position immediately after the window opened + if (units.size() == 0) + return; + + // if the window grows vertically, scroll upward to eliminate blank rows from the bottom + if (first_row > units.size() - height) + first_row = units.size() - height; + + // if it shrinks vertically, scroll downward to keep the cursor visible + if (first_row < sel_row - height + 1) + first_row = sel_row - height + 1; + + // if the window grows horizontally, scroll to the left to eliminate blank columns from the right + if (first_column > NUM_COLUMNS - labors_width) + first_column = NUM_COLUMNS - labors_width; + + // if it shrinks horizontally, scroll to the right to keep the cursor visible + if (first_column < sel_column - labors_width + 1) + first_column = sel_column - labors_width + 1; +} + +void viewscreen_unitlaborsst::feed(set<df::interface_key> *events) +{ + if (events->count(interface_key::LEAVESCREEN)) + { + events->clear(); + Screen::dismiss(this); + return; + } + + // TODO - allow modifying filters + + if (!units.size()) + return; + + if (events->count(interface_key::CURSOR_UP) || events->count(interface_key::CURSOR_UPLEFT) || events->count(interface_key::CURSOR_UPRIGHT)) + sel_row--; + if (events->count(interface_key::CURSOR_UP_FAST) || events->count(interface_key::CURSOR_UPLEFT_FAST) || events->count(interface_key::CURSOR_UPRIGHT_FAST)) + sel_row -= 10; + if (events->count(interface_key::CURSOR_DOWN) || events->count(interface_key::CURSOR_DOWNLEFT) || events->count(interface_key::CURSOR_DOWNRIGHT)) + sel_row++; + if (events->count(interface_key::CURSOR_DOWN_FAST) || events->count(interface_key::CURSOR_DOWNLEFT_FAST) || events->count(interface_key::CURSOR_DOWNRIGHT_FAST)) + sel_row += 10; + + if (sel_row < 0) + sel_row = 0; + if (sel_row > units.size() - 1) + sel_row = units.size() - 1; + + if (sel_row < first_row) + first_row = sel_row; + if (first_row < sel_row - height + 1) + first_row = sel_row - height + 1; + + if (events->count(interface_key::CURSOR_LEFT) || events->count(interface_key::CURSOR_UPLEFT) || events->count(interface_key::CURSOR_DOWNLEFT)) + sel_column--; + if (events->count(interface_key::CURSOR_LEFT_FAST) || events->count(interface_key::CURSOR_UPLEFT_FAST) || events->count(interface_key::CURSOR_DOWNLEFT_FAST)) + sel_column -= 10; + if (events->count(interface_key::CURSOR_RIGHT) || events->count(interface_key::CURSOR_UPRIGHT) || events->count(interface_key::CURSOR_DOWNRIGHT)) + sel_column++; + if (events->count(interface_key::CURSOR_RIGHT_FAST) || events->count(interface_key::CURSOR_UPRIGHT_FAST) || events->count(interface_key::CURSOR_DOWNRIGHT_FAST)) + sel_column += 10; + + if ((sel_column != 0) && events->count(interface_key::CURSOR_UP_Z)) + { + // go to beginning of current column group; if already at the beginning, go to the beginning of the previous one + sel_column--; + df::profession cur = columns[sel_column].profession; + while ((sel_column > 0) && columns[sel_column - 1].profession == cur) + sel_column--; + } + if ((sel_column != NUM_COLUMNS - 1) && events->count(interface_key::CURSOR_DOWN_Z)) + { + // go to end of current column group; if already at the end, go to the end of the next one + sel_column++; + df::profession cur = columns[sel_column].profession; + while ((sel_column < NUM_COLUMNS - 1) && columns[sel_column + 1].profession == cur) + sel_column++; + } + + if (sel_column < 0) + sel_column = 0; + if (sel_column > NUM_COLUMNS - 1) + sel_column = NUM_COLUMNS - 1; + + if (sel_column < first_column) + first_column = sel_column; + if (first_column < sel_column - labors_width + 1) + first_column = sel_column - labors_width + 1; + + UnitInfo *cur = units[sel_row]; + if (events->count(interface_key::SELECT) && (cur->allowEdit) && (columns[sel_column].labor != unit_labor::NONE)) + { + df::unit *unit = cur->unit; + const SkillColumn &col = columns[sel_column]; + if (col.special) + { + if (!unit->status.labors[col.labor]) + { + for (int i = 0; i < NUM_COLUMNS; i++) + { + if ((columns[i].labor != unit_labor::NONE) && columns[i].special) + unit->status.labors[columns[i].labor] = false; + } + } + unit->military.pickup_flags.bits.update = true; + } + unit->status.labors[col.labor] = !unit->status.labors[col.labor]; + } + + // TODO: add sorting +} + +void viewscreen_unitlaborsst::render() +{ + if (Screen::isDismissed(this)) + return; + + dfhack_viewscreen::render(); + + Screen::clear(); + Screen::drawBorder(" Manage Labors "); + + for (int col = 0; col < labors_width; col++) + { + int col_offset = col + first_column; + if (col_offset >= NUM_COLUMNS) + break; + + int8_t fg = Units::getCasteProfessionColor(ui->race_id, -1, columns[col_offset].profession); + int8_t bg = 0; + + if (col_offset == sel_column) + { + fg = 0; + bg = 7; + } + Screen::paintTile(Screen::Pen(columns[col_offset].label[0], fg, bg), 1 + name_width + 1 + prof_width + 1 + col, 1); + Screen::paintTile(Screen::Pen(columns[col_offset].label[1], fg, bg), 1 + name_width + 1 + prof_width + 1 + col, 2); + } + + for (int row = 0; row < height; row++) + { + int row_offset = row + first_row; + if (row_offset >= units.size()) + break; + UnitInfo *cur = units[row_offset]; + df::unit *unit = cur->unit; + int8_t fg = 15, bg = 0; + if (row_offset == sel_row) + { + fg = 0; + bg = 7; + } + + string name = cur->name; + name.resize(name_width); + Screen::paintString(Screen::Pen(' ', fg, bg), 1, 3 + row, name); + + string profession = cur->profession; + profession.resize(prof_width); + fg = cur->color; + bg = 0; + Screen::paintString(Screen::Pen(' ', fg, bg), 1 + prof_width + 1, 3 + row, profession); + + // Print unit's skills and labor assignments + for (int col = 0; col < labors_width; col++) + { + int col_offset = col + first_column; + fg = 15; + bg = 0; + if ((col_offset == sel_column) && (row_offset == sel_row)) + fg = 9; + if ((columns[col_offset].labor != unit_labor::NONE) && (unit->status.labors[columns[col_offset].labor])) + bg = 7; + char c = '-'; + if (columns[col_offset].skill != job_skill::NONE) + { + df::unit_skill *skill = binsearch_in_vector<df::unit_skill,df::enum_field<df::job_skill,int16_t>>(unit->status.current_soul->skills, &df::unit_skill::id, columns[col_offset].skill); + if ((skill != NULL) && (skill->rating || skill->experience)) + { + int level = skill->rating; + if (level > NUM_SKILL_LEVELS - 1) + level = NUM_SKILL_LEVELS - 1; + c = skill_levels[level].abbrev; + } + } + Screen::paintTile(Screen::Pen(c, fg, bg), 1 + name_width + 1 + prof_width + 1 + col, 3 + row); + } + } + + UnitInfo *cur = units[sel_row]; + if (cur != NULL) + { + df::unit *unit = cur->unit; + string str = cur->transname; + if (str.length()) + str += ", "; + str += cur->profession; + str += ":"; + + Screen::paintString(Screen::Pen(' ', 15, 0), 1, 3 + height + 2, str); + int y = 1 + str.length() + 1; + + if (columns[sel_column].skill == job_skill::NONE) + { + str = ENUM_ATTR_STR(unit_labor, caption, columns[sel_column].labor); + if (unit->status.labors[columns[sel_column].labor]) + str += " Enabled"; + else + str += " Not Enabled"; + Screen::paintString(Screen::Pen(' ', 9, 0), y, 3 + height + 2, str); + } + else + { + df::unit_skill *skill = binsearch_in_vector<df::unit_skill,df::enum_field<df::job_skill,int16_t>>(unit->status.current_soul->skills, &df::unit_skill::id, columns[sel_column].skill); + if (skill) + { + int level = skill->rating; + if (level > NUM_SKILL_LEVELS - 1) + level = NUM_SKILL_LEVELS - 1; + str = stl_sprintf("%s %s", skill_levels[level].name, ENUM_ATTR_STR(job_skill, caption_noun, columns[sel_column].skill)); + if (level != NUM_SKILL_LEVELS - 1) + str += stl_sprintf(" (%d/%d)", skill->experience, skill_levels[level].points); + } + else + str = stl_sprintf("Not %s (0/500)", ENUM_ATTR_STR(job_skill, caption_noun, columns[sel_column].skill)); + Screen::paintString(Screen::Pen(' ', 9, 0), y, 3 + height + 2, str); + } + } + + // TODO - print command help info +} + +struct unitlist_hook : df::viewscreen_unitlistst +{ + typedef df::viewscreen_unitlistst interpose_base; + + DEFINE_VMETHOD_INTERPOSE(void, feed, (set<df::interface_key> *input)) + { + if (input->count(interface_key::UNITVIEW_PRF_PROF)) + { + Screen::dismiss(this); + Screen::show(new viewscreen_unitlaborsst()); + return; + } + INTERPOSE_NEXT(feed)(input); + } +}; + +IMPLEMENT_VMETHOD_INTERPOSE(unitlist_hook, feed); + +DFhackCExport command_result plugin_init ( color_ostream &out, vector <PluginCommand> &commands) +{ + if (gps) + { + if (!INTERPOSE_HOOK(unitlist_hook, feed).apply()) + out.printerr("Could not interpose viewscreen_unitlistst::feed\n"); + } + + return CR_OK; +} + +DFhackCExport command_result plugin_shutdown ( color_ostream &out ) +{ + INTERPOSE_HOOK(unitlist_hook, feed).remove(); + return CR_OK; +} diff --git a/plugins/probe.cpp b/plugins/probe.cpp index b7b7d298..2ae6846d 100644 --- a/plugins/probe.cpp +++ b/plugins/probe.cpp @@ -221,10 +221,11 @@ command_result df_probe (color_ostream &out, vector <string> & parameters) out.print("temperature2: %d U\n",mc.temperature2At(cursor)); int offset = block.region_offset[des.bits.biome]; - df::coord2d region_pos = block.region_pos + df::coord2d ((offset % 3) - 1, (offset / 3) -1); + int bx = clip_range(block.region_pos.x + (offset % 3) - 1, 0, world->world_data->world_width-1); + int by = clip_range(block.region_pos.y + (offset / 3) - 1, 0, world->world_data->world_height-1); df::world_data::T_region_map* biome = - &world->world_data->region_map[region_pos.x][region_pos.y]; + &world->world_data->region_map[bx][by]; int sav = biome->savagery; int evi = biome->evilness; diff --git a/plugins/ruby/CMakeLists.txt b/plugins/ruby/CMakeLists.txt index a9a85636..e10ee38b 100644 --- a/plugins/ruby/CMakeLists.txt +++ b/plugins/ruby/CMakeLists.txt @@ -1,29 +1,29 @@ OPTION(DL_RUBY "download libruby from the internet" ON) IF (DL_RUBY AND NOT APPLE) IF (UNIX) - FILE(DOWNLOAD http://cloud.github.com/downloads/jjyg/dfhack/libruby187.tar.gz ${CMAKE_CURRENT_SOURCE_DIR}/libruby187.tar.gz + FILE(DOWNLOAD http://cloud.github.com/downloads/jjyg/dfhack/libruby187.tar.gz ${CMAKE_CURRENT_BINARY_DIR}/libruby187.tar.gz EXPECTED_MD5 eb2adea59911f68e6066966c1352f291) EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E tar xzf libruby187.tar.gz - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) - FILE(RENAME libruby1.8.so.1.8.7 libruby.so) - SET(RUBYLIB libruby.so) + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + FILE(RENAME ${CMAKE_CURRENT_BINARY_DIR}/libruby1.8.so.1.8.7 ${CMAKE_CURRENT_BINARY_DIR}/libruby.so) + SET(RUBYLIB ${CMAKE_CURRENT_BINARY_DIR}/libruby.so) ELSE (UNIX) - FILE(DOWNLOAD http://cloud.github.com/downloads/jjyg/dfhack/msvcrtruby187.tar.gz ${CMAKE_CURRENT_SOURCE_DIR}/msvcrtruby187.tar.gz + FILE(DOWNLOAD http://cloud.github.com/downloads/jjyg/dfhack/msvcrtruby187.tar.gz ${CMAKE_CURRENT_BINARY_DIR}/msvcrtruby187.tar.gz EXPECTED_MD5 9f4a1659ac3a5308f32d3a1937bbeeae) EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E tar xzf msvcrtruby187.tar.gz - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) - FILE(RENAME msvcrt-ruby18.dll libruby.dll) - SET(RUBYLIB libruby.dll) + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + FILE(RENAME ${CMAKE_CURRENT_BINARY_DIR}/msvcrt-ruby18.dll ${CMAKE_CURRENT_BINARY_DIR}/libruby.dll) + SET(RUBYLIB ${CMAKE_CURRENT_BINARY_DIR}/libruby.dll) ENDIF(UNIX) ENDIF(DL_RUBY AND NOT APPLE) ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/ruby-autogen.rb - COMMAND ${PERL_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/codegen.pl ${dfhack_SOURCE_DIR}/library/include/df/codegen.out.xml ${CMAKE_CURRENT_SOURCE_DIR}/ruby-autogen.rb + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/ruby-autogen.rb + COMMAND ${PERL_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/codegen.pl ${dfhack_SOURCE_DIR}/library/include/df/codegen.out.xml ${CMAKE_CURRENT_BINARY_DIR}/ruby-autogen.rb DEPENDS ${dfhack_SOURCE_DIR}/library/include/df/codegen.out.xml ${CMAKE_CURRENT_SOURCE_DIR}/codegen.pl COMMENT ruby-autogen.rb ) -ADD_CUSTOM_TARGET(ruby-autogen-rb DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/ruby-autogen.rb) +ADD_CUSTOM_TARGET(ruby-autogen-rb DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/ruby-autogen.rb) INCLUDE_DIRECTORIES("${dfhack_SOURCE_DIR}/depends/tthread") @@ -32,6 +32,8 @@ ADD_DEPENDENCIES(ruby ruby-autogen-rb) INSTALL(FILES ${RUBYLIB} DESTINATION ${DFHACK_LIBRARY_DESTINATION}) +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/ruby-autogen.rb DESTINATION hack/ruby) + INSTALL(DIRECTORY . DESTINATION hack/ruby FILES_MATCHING PATTERN "*.rb") diff --git a/plugins/ruby/README b/plugins/ruby/README index 690e83ca..c9a84fb3 100644 --- a/plugins/ruby/README +++ b/plugins/ruby/README @@ -23,7 +23,7 @@ All ruby code runs while the main DF process and other plugins are suspended. DFHack console -------------- -The ruby plugin defines 1 dfhack console command: +The ruby plugin defines one new dfhack console command: rb_eval <ruby expression> ; evaluate a ruby expression and show the result in the console. Ex: rb_eval df.unit_find().name.first_name You can use single-quotes for strings ; avoid double-quotes that are parsed @@ -50,7 +50,7 @@ The script can access the console command arguments through the global variable '$script_args', which is an array of ruby Strings. The help string displayed in dfhack 'ls' command is the first line of the -script, if it is a comment (starts with '# '). +script, if it is a comment (ie starts with '# '). Ruby helper functions @@ -66,6 +66,11 @@ obj1 and 2 should respond to #pos and #x #y #z. df.map_block_at(pos) / map_block_at(x, y, z) Returns the MapBlock for the coordinates or nil. + df.map_tile_at(pos) +Returns a MapTile, holding all informations wrt the map tile (read&write). +This class is a ruby specific extention, to facilitate interaction with the +DF map data. Check out hack/ruby/map.rb. + df.each_map_block { |b| } df.each_map_block_z(zlevel) { |b| } Iterates over every map block (opt. on a single z-level). @@ -106,6 +111,14 @@ See buildings.rb/buildbed for an exemple. df.each_tree(material) { |t| } Iterates over every tree of the given material (eg 'maple'). + df.translate_name(name, in_english=true, only_lastpart=false) +Decode the LanguageName structure as a String as displayed in the game UI. +A shortcut is available through name.to_s + + df.decode_mat(obj) +Returns a MaterialInfo definition for the given object, using its mat_type +and mat_index fields. Also works with a token string argument ('STONE:DOLOMITE') + DFHack callbacks ---------------- @@ -113,6 +126,10 @@ DFHack callbacks The plugin interfaces with dfhack 'onupdate' hook. To register ruby code to be run every graphic frame, use: handle = df.onupdate_register { puts 'i love flooding the console' } +You can also rate-limit when your callback is called to a number of game ticks: + handle = df.onupdate_register(10) { puts '10 more in-game ticks elapsed' } +In this case, the callback is called immediately, and then every X in-game +ticks (advances only when the game is unpaused). To stop being called, use: df.onupdate_unregister handle @@ -127,9 +144,16 @@ The ruby classes defined in ruby-autogen.rb are accessors to the underlying df C++ objects in-memory. To allocate a new C++ object for use in DF, use the RubyClass.cpp_new method (see buildings.rb for exemples), works for Compounds only. +A special Compound DFHack::StlString is available for allocating a single c++ +stl::string, so that you can call vmethods that take a string pointer argument +(eg getName). + ex: s = DFHack::StlString.cpp_new ; df.building_find.getName(s) ; p s.str -Deallocation is not supported. You may manually call df.free if you know -what you are doing (maps directly to the native malloc/free) +Deallocation may work, using the compound method _cpp_delete. Use with caution, +may crash your DF session. It may be simpler to just leak the memory. +_cpp_delete will try to free all memory directly used by the compound, eg +strings and vectors. It will *not* call the class destructor, and will not free +stuff behind pointers. C++ std::string fields may be directly re-allocated using standard ruby strings, e.g. some_unit.name.nickname = 'moo' @@ -145,11 +169,13 @@ To delete an element, vector.delete_at(index) You can binary search an element in a vector for a given numeric field value: df.world.unit.all.binsearch(42, :id) -will find the element whose 'id' field is 42 (needs the vector to be initially +will find the entry whose 'id' field is 42 (needs the vector to be initially sorted by this field). The binsearch 2nd argument defaults to :id. Any numeric field defined as being an enum value will be converted to a ruby Symbol. This works for array indexes too. + ex: df.unit_find(:selected).status.labors[:HAUL_FOOD] = true + df.map_tile_at(df.cursor).designation.liquid_type = :Water Virtual method calls are supported for C++ objects, with a maximum of 4 arguments. Arguments / return value are interpreted as Compound/Enums as @@ -179,7 +205,7 @@ Change current unit profession Center the screen on unit ID '123' df.center_viewscreen(df.unit_find(123)) -Find an item at a given position, show its C++ classname +Find an item under the game cursor and show its C++ classname p df.item_find(df.cursor)._rtti_classname Find the raws name of the plant under cursor @@ -187,18 +213,31 @@ Find the raws name of the plant under cursor p df.world.raws.plants.all[plant.mat_index].id Dig a channel under the cursor - df.map_designation_at(df.cursor).dig = :Channel - df.map_block_at(df.cursor).flags.designated = true + df.map_tile_at(df.cursor).dig(:Channel) + +Spawn 2/7 magma on the tile of the dwarf nicknamed 'hotfeet' + hot = df.unit_citizens.find { |u| u.name.nickname == 'hotfeet' } + df.map_tile_at(hot).spawn_magma(2) Plugin compilation ------------------ -The plugin consists of the *.rb file including user comfort functions and -describing basic classes used by the autogenerated code, and ruby-autogen.rb, -the auto-generated code. +The plugin consists of the main ruby.cpp native plugin and the *.rb files. + +The native plugin handles only low-level ruby-to-df interaction (eg raw memory +read/write, and dfhack integration), and the .rb files hold end-user helper +functions. + +On dfhack start, the native plugin will initialize the ruby interpreter, and +load hack/ruby/ruby.rb. This one then loads all other .rb files. -autogen is output by codegen.pl from dfhack/library/include/df/codegen.out.xml +The DF internal structures are described in ruby-autogen.rb . +It is output by ruby/codegen.pl, from dfhack/library/include/df/codegen.out.xml +It contains architecture-specific data (eg DF internal structures field offsets, +which differ between Windows and Linux. Linux and Macosx are the same, as they +both use gcc). +It is stored inside the build directory (eg build/plugins/ruby/ruby-autogen.rb) For exemple, <ld:global-type ld:meta="struct-type" type-name="unit"> @@ -215,6 +254,7 @@ Will generate The syntax for the 'field' method in ruby-autogen.rb is: 1st argument = name of the method 2nd argument = offset of this field from the beginning of the current struct. + This field depends on the compiler used by Toady to generate DF. The block argument describes the type of the field: uint32, ptr to global... Primitive type access is done through native methods from ruby.cpp (vector length, diff --git a/plugins/ruby/building.rb b/plugins/ruby/building.rb index 826cd26b..af152e19 100644 --- a/plugins/ruby/building.rb +++ b/plugins/ruby/building.rb @@ -1,5 +1,45 @@ module DFHack class << self + def building_find(what=:selected, y=nil, z=nil) + if what == :selected + case ui.main.mode + when :LookAround + k = ui_look_list.items[ui_look_cursor] + k.building if k.type == :Building + when :BuildingItems, :QueryBuilding + world.selected_building + end + + elsif what.kind_of?(Integer) + # search by building.id + return world.buildings.all.binsearch(what) if not z + + # search by coordinates + x = what + world.buildings.all.find { |b| + b.z == z and + if b.room.extents + dx = x - b.room.x + dy = y - b.room.y + dx >= 0 and dx <= b.room.width and + dy >= 0 and dy <= b.room.height and + b.room.extents[ dy*b.room.width + dx ] > 0 + else + b.x1 <= x and b.x2 >= x and + b.y1 <= y and b.y2 >= y + end + } + + elsif what.respond_to?(:x) or what.respond_to?(:pos) + # find the building at the same position + what = what.pos if what.respond_to?(:pos) + building_find(what.x, what.y, what.z) + + else + raise "what what?" + end + end + # allocate a new building object def building_alloc(type, subtype=-1, custom=-1) cls = rtti_n2c[BuildingType::Classname[type].to_sym] @@ -239,21 +279,30 @@ module DFHack job = Job.cpp_new refbuildingholder = GeneralRefBuildingHolderst.cpp_new job.job_type = :DestroyBuilding - refbuildingholder.building_id = building.id + refbuildingholder.building_id = bld.id job.references << refbuildingholder - building.jobs << job + bld.jobs << job job_link job job end + # check item flags to see if it is suitable for use as a building material + def building_isitemfree(i) + !i.flags.in_job and + !i.flags.in_inventory and + !i.flags.removed and + !i.flags.in_building and + !i.flags.owned and + !i.flags.forbid + end + # exemple usage def buildbed(pos=cursor) raise 'where to ?' if pos.x < 0 item = world.items.all.find { |i| i.kind_of?(ItemBedst) and - i.itemrefs.empty? and - !i.flags.in_job + building_isitemfree(i) } raise 'no free bed, build more !' if not item diff --git a/plugins/ruby/codegen.pl b/plugins/ruby/codegen.pl index c7fb210c..593216d7 100755 --- a/plugins/ruby/codegen.pl +++ b/plugins/ruby/codegen.pl @@ -8,7 +8,7 @@ use XML::LibXML; our @lines_rb; my $os; -if ($^O =~ /linux/i) { +if ($^O =~ /linux/i or $^O =~ /darwin/i) { $os = 'linux'; } else { $os = 'windows'; @@ -175,10 +175,10 @@ sub render_bitfield_fields { if ($name) { - if ($count == 1) { - push @lines_rb, "field(:$name, 0) { bit $shift }"; - } elsif ($enum) { + if ($enum) { push @lines_rb, "field(:$name, 0) { bits $shift, $count, $enum }"; + } elsif ($count == 1) { + push @lines_rb, "field(:$name, 0) { bit $shift }"; } else { push @lines_rb, "field(:$name, 0) { bits $shift, $count }"; } @@ -298,8 +298,26 @@ sub render_field_reftarget { return if (!$tg); my $tgvec = $tg->getAttribute('instance-vector'); return if (!$tgvec); + my $idx = $tg->getAttribute('key-field'); + + $tgvec =~ s/^\$global/df/; + return if $tgvec !~ /^[\w\.]+$/; + + my $tgname = "${name}_tg"; + $tgname =~ s/_id(.?.?)_tg/_tg$1/; + + for my $othername (map { $_->getAttribute('name') } $parent->findnodes('child::ld:field')) { + $tgname .= '_' if ($othername and $tgname eq $othername); + } + + if ($idx) { + my $fidx = ''; + $fidx = ', :' . $idx if ($idx ne 'id'); + push @lines_rb, "def $tgname ; ${tgvec}.binsearch($name$fidx) ; end"; + } else { + push @lines_rb, "def $tgname ; ${tgvec}[$name] ; end"; + } - render_field_refto($parent, $name, $tgvec); } sub render_field_refto { @@ -329,9 +347,9 @@ sub render_container_reftarget { return if (!$tg); my $tgvec = $tg->getAttribute('instance-vector'); return if (!$tgvec); + my $idx = $tg->getAttribute('key-field'); $tgvec =~ s/^\$global/df/; - $tgvec =~ s/\[\$\]$//; return if $tgvec !~ /^[\w\.]+$/; my $tgname = "${name}_tg"; @@ -341,7 +359,13 @@ sub render_container_reftarget { $tgname .= '_' if ($othername and $tgname eq $othername); } - push @lines_rb, "def $tgname ; $name.map { |i| ${tgvec}[i] } ; end"; + if ($idx) { + my $fidx = ''; + $fidx = ', :' . $idx if ($idx ne 'id'); + push @lines_rb, "def $tgname ; $name.map { |i| $tgvec.binsearch(i$fidx) } ; end"; + } else { + push @lines_rb, "def $tgname ; $name.map { |i| ${tgvec}[i] } ; end"; + } } sub render_class_vmethods { @@ -516,7 +540,9 @@ sub get_field_align { if ($meta eq 'number') { $al = $field->getAttribute('ld:bits')/8; - $al = 4 if $al > 4; + # linux aligns int64_t to 4, windows to 8 + # floats are 4 bytes so no pb + $al = 4 if ($al > 4 and ($os eq 'linux' or $al != 8)); } elsif ($meta eq 'global') { $al = get_global_align($field); } elsif ($meta eq 'compound') { diff --git a/plugins/ruby/item.rb b/plugins/ruby/item.rb index cd95e82a..34b40450 100644 --- a/plugins/ruby/item.rb +++ b/plugins/ruby/item.rb @@ -2,15 +2,38 @@ module DFHack class << self # return an Item # arg similar to unit.rb/unit_find; no arg = 'k' menu - def item_find(what=:selected) + def item_find(what=:selected, y=nil, z=nil) if what == :selected - case ui.main.mode - when :LookAround - k = ui_look_list.items[ui_look_cursor] - k.item if k.type == :Item + if curview._rtti_classname == :viewscreen_itemst + ref = curview.entry_ref[curview.cursor_pos] + ref.item_tg if ref.kind_of?(GeneralRefItem) + else + case ui.main.mode + when :LookAround + k = ui_look_list.items[ui_look_cursor] + case k.type + when :Item + k.item + when :Building + # hilight a constructed bed/coffer + mats = k.building.contained_items.find_all { |i| i.use_mode == 2 } + mats[0].item if mats.length == 1 + end + when :BuildingItems + bld = world.selected_building + bld.contained_items[ui_building_item_cursor].item if bld + when :ViewUnits + u = world.units.active[ui_selected_unit] + u.inventory[ui_look_cursor].item if u and u.pos.z == cursor.z and + ui_unit_view_mode.value == :Inventory and u.inventory[ui_look_cursor] + end end elsif what.kind_of?(Integer) - world.items.all.binsearch(what) + # search by id + return world.items.all.binsearch(what) if not z + # search by position + x = what + world.items.all.find { |i| i.pos.x == x and i.pos.y == y and i.pos.z == z } elsif what.respond_to?(:x) or what.respond_to?(:pos) world.items.all.find { |i| same_pos?(what, i) } else diff --git a/plugins/ruby/map.rb b/plugins/ruby/map.rb index af9e8b80..dccea729 100644 --- a/plugins/ruby/map.rb +++ b/plugins/ruby/map.rb @@ -26,6 +26,13 @@ module DFHack end end + def map_tile_at(x, y=nil, z=nil) + x = x.pos if x.respond_to?(:pos) + x, y, z = x.x, x.y, x.z if x.respond_to?(:x) + b = map_block_at(x, y, z) + MapTile.new(b, x, y, z) if b + end + # yields every map block def each_map_block (0...world.map.x_count_block).each { |xb| @@ -51,4 +58,162 @@ module DFHack } end end + + class MapTile + attr_accessor :x, :y, :z, :dx, :dy, :mapblock + def initialize(b, x, y, z) + @x, @y, @z = x, y, z + @dx, @dy = @x&15, @y&15 + @mapblock = b + end + + def designation + @mapblock.designation[@dx][@dy] + end + + def occupancy + @mapblock.occupancy[@dx][@dy] + end + + def tiletype + @mapblock.tiletype[@dx][@dy] + end + + def tiletype=(t) + @mapblock.tiletype[@dx][@dy] = t + end + + def caption + Tiletype::Caption[tiletype] + end + + def shape + Tiletype::Shape[tiletype] + end + + def tilemat + Tiletype::Material[tiletype] + end + + def variant + Tiletype::Variant[tiletype] + end + + def special + Tiletype::Special[tiletype] + end + + def direction + Tiletype::Direction[tiletype] + end + + def shape_caption + TiletypeShape::Caption[shape] + end + + def shape_basic + TiletypeShape::BasicShape[shape] + end + + def shape_passablelow + TiletypeShape::PassableLow[shape] + end + + def shape_passablehigh + TiletypeShape::PassableHigh[shape] + end + + def shape_passableflow + TiletypeShape::PassableFlow[shape] + end + + def shape_walkable + TiletypeShape::Walkable[shape] + end + + + # return all veins for current mapblock + def all_veins + mapblock.block_events.grep(BlockSquareEventMineralst) + end + + # return the vein applicable to current tile + def vein + # last vein wins + all_veins.reverse.find { |v| + (v.tile_bitmask.bits[@dy] & (1 << @dx)) > 0 + } + end + + # return the mat_index for the current tile (if in vein) + def mat_index_vein + v = vein + v.inorganic_mat if v + end + + # return the world_data.geo_biome for current tile + def geo_biome + b = designation.biome + wd = df.world.world_data + + # region coords + [[-1, -1], [0, -1], ..., [1, 1]][b] + # clipped to world dimensions + rx = df.world.map.region_x/16 + rx -= 1 if b % 3 == 0 and rx > 0 + rx += 1 if b % 3 == 2 and rx < wd.world_width-1 + + ry = df.world.map.region_y/16 + ry -= 1 if b < 3 and ry > 0 + ry += 1 if b > 5 and ry < wd.world_height-1 + + wd.geo_biomes[ wd.region_map[rx][ry].geo_index ] + end + + # return the world_data.geo_biome.layer for current tile + def stone_layer + geo_biome.layers[designation.geolayer_index] + end + + # current tile mat_index (vein if applicable, or base material) + def mat_index + mat_index_vein or stone_layer.mat_index + end + + # MaterialInfo: inorganic token for current tile + def mat_info + MaterialInfo.new(0, mat_index) + end + + def inspect + "#<MapTile pos=[#@x, #@y, #@z] shape=#{shape} tilemat=#{tilemat} material=#{mat_info.token}>" + end + + def dig(mode=:Default) + designation.dig = mode + mapblock.flags.designated = true + end + + def spawn_liquid(quantity, is_magma=false, flowing=true) + designation.flow_size = quantity + designation.liquid_type = (is_magma ? :Magma : :Water) + designation.flow_forbid = true if is_magma or quantity >= 4 + + if flowing + mapblock.flags.update_liquid = true + mapblock.flags.update_liquid_twice = true + + zf = df.world.map.z_level_flags[z] + zf.update = true + zf.update_twice = true + end + end + + def spawn_water(quantity=7) + spawn_liquid(quantity) + end + + def spawn_magma(quantity=7) + spawn_liquid(quantity, true) + end + end end diff --git a/plugins/ruby/material.rb b/plugins/ruby/material.rb new file mode 100644 index 00000000..4a92118d --- /dev/null +++ b/plugins/ruby/material.rb @@ -0,0 +1,199 @@ +module DFHack + class MaterialInfo + attr_accessor :mat_type, :mat_index + attr_accessor :mode, :material, :creature, :figure, :plant, :inorganic + def initialize(what, idx=nil) + case what + when Integer + @mat_type, @mat_index = what, idx + decode_type_index + when String + decode_string(what) + else + @mat_type, @mat_index = what.mat_type, what.mat_index + decode_type_index + end + end + + CREATURE_BASE = 19 + FIGURE_BASE = CREATURE_BASE+200 + PLANT_BASE = FIGURE_BASE+200 + END_BASE = PLANT_BASE+200 + + # interpret the mat_type and mat_index fields + def decode_type_index + if @mat_index < 0 or @mat_type >= END_BASE + @mode = :Builtin + @material = df.world.raws.mat_table.builtin[@mat_type] + + elsif @mat_type >= PLANT_BASE + @mode = :Plant + @plant = df.world.raws.plants.all[@mat_index] + @material = @plant.material[@mat_type-PLANT_BASE] if @plant + + elsif @mat_type >= FIGURE_BASE + @mode = :Figure + @figure = df.world.history.figures.binsearch(@mat_index) + @creature = df.world.raws.creatures.all[@figure.race] if @figure + @material = @creature.material[@mat_type-FIGURE_BASE] if @creature + + elsif @mat_type >= CREATURE_BASE + @mode = :Creature + @creature = df.world.raws.creatures.all[@mat_index] + @material = @creature.material[@mat_type-CREATURE_BASE] if @creature + + elsif @mat_type > 0 + @mode = :Builtin + @material = df.world.raws.mat_table.builtin[@mat_type] + + elsif @mat_type == 0 + @mode = :Inorganic + @inorganic = df.world.raws.inorganics[@mat_index] + @material = @inorganic.material if @inorganic + end + end + + def decode_string(str) + parts = str.split(':') + case parts[0].chomp('_MAT') + when 'INORGANIC', 'STONE', 'METAL' + decode_string_inorganic(parts) + when 'PLANT' + decode_string_plant(parts) + when 'CREATURE' + if parts[3] and parts[3] != 'NONE' + decode_string_figure(parts) + else + decode_string_creature(parts) + end + when 'INVALID' + @mat_type = parts[1].to_i + @mat_index = parts[2].to_i + else + decode_string_builtin(parts) + end + end + + def decode_string_inorganic(parts) + @@inorganics_index ||= (0...df.world.raws.inorganics.length).inject({}) { |h, i| h.update df.world.raws.inorganics[i].id => i } + + @mode = :Inorganic + @mat_type = 0 + + if parts[1] and parts[1] != 'NONE' + @mat_index = @@inorganics_index[parts[1]] + raise "invalid inorganic token #{parts.join(':').inspect}" if not @mat_index + @inorganic = df.world.raws.inorganics[@mat_index] + @material = @inorganic.material + end + end + + def decode_string_builtin(parts) + @@builtins_index ||= (1...df.world.raws.mat_table.builtin.length).inject({}) { |h, i| b = df.world.raws.mat_table.builtin[i] ; b ? h.update(b.id => i) : h } + + @mode = :Builtin + @mat_index = -1 + @mat_type = @@builtins_index[parts[0]] + raise "invalid builtin token #{parts.join(':').inspect}" if not @mat_type + @material = df.world.raws.mat_table.builtin[@mat_type] + + if parts[0] == 'COAL' and parts[1] + @mat_index = ['COKE', 'CHARCOAL'].index(parts[1]) || -1 + end + end + + def decode_string_creature(parts) + @@creatures_index ||= (0...df.world.raws.creatures.all.length).inject({}) { |h, i| h.update df.world.raws.creatures.all[i].creature_id => i } + + @mode = :Creature + + if parts[1] and parts[1] != 'NONE' + @mat_index = @@creatures_index[parts[1]] + raise "invalid creature token #{parts.join(':').inspect}" if not @mat_index + @creature = df.world.raws.creatures.all[@mat_index] + end + + if @creature and parts[2] and parts[2] != 'NONE' + @mat_type = @creature.material.index { |m| m.id == parts[2] } + @material = @creature.material[@mat_type] + @mat_type += CREATURE_BASE + end + end + + def decode_string_figure(parts) + @mode = :Figure + @mat_index = parts[3].to_i + @figure = df.world.history.figures.binsearch(@mat_index) + raise "invalid creature histfig #{parts.join(':').inspect}" if not @figure + + @creature = df.world.raws.creatures.all[@figure.race] + if parts[1] and parts[1] != 'NONE' + raise "invalid histfig race #{parts.join(':').inspect}" if @creature.creature_id != parts[1] + end + + if @creature and parts[2] and parts[2] != 'NONE' + @mat_type = @creature.material.index { |m| m.id == parts[2] } + @material = @creature.material[@mat_type] + @mat_type += FIGURE_BASE + end + end + + def decode_string_plant(parts) + @@plants_index ||= (0...df.world.raws.plants.all.length).inject({}) { |h, i| h.update df.world.raws.plants.all[i].id => i } + + @mode = :Plant + + if parts[1] and parts[1] != 'NONE' + @mat_index = @@plants_index[parts[1]] + raise "invalid plant token #{parts.join(':').inspect}" if not @mat_index + @plant = df.world.raws.plants.all[@mat_index] + end + + if @plant and parts[2] and parts[2] != 'NONE' + @mat_type = @plant.material.index { |m| m.id == parts[2] } + raise "invalid plant type #{parts.join(':').inspect}" if not @mat_type + @material = @plant.material[@mat_type] + @mat_type += PLANT_BASE + end + end + + # delete the caches of raws id => index used in decode_string + def self.flush_raws_cache + @@inorganics_index = @@plants_index = @@creatures_index = @@builtins_index = nil + end + + def token + out = [] + case @mode + when :Builtin + out << (@material ? @material.id : 'NONE') + out << (['COKE', 'CHARCOAL'][@mat_index] || 'NONE') if @material and @material.id == 'COAL' and @mat_index >= 0 + when :Inorganic + out << 'INORGANIC' + out << @inorganic.id if @inorganic + when :Plant + out << 'PLANT_MAT' + out << @plant.id if @plant + out << @material.id if @plant and @material + when :Creature, :Figure + out << 'CREATURE_MAT' + out << @creature.creature_id if @creature + out << @material.id if @creature and @material + out << @figure.id.to_s if @creature and @material and @figure + else + out << 'INVALID' + out << @mat_type.to_s + out << @mat_index.to_s + end + out.join(':') + end + + def to_s ; token ; end + end + + class << self + def decode_mat(what, idx=nil) + MaterialInfo.new(what, idx) + end + end +end diff --git a/plugins/ruby/ruby-autogen-defs.rb b/plugins/ruby/ruby-autogen-defs.rb index 64da12ff..0cee6426 100644 --- a/plugins/ruby/ruby-autogen-defs.rb +++ b/plugins/ruby/ruby-autogen-defs.rb @@ -7,6 +7,7 @@ module DFHack def _at(addr) ; d = dup ; d._memaddr = addr ; d ; end def _get ; self ; end def _cpp_init ; end + def _cpp_delete ; end end class Compound < MemStruct @@ -34,8 +35,8 @@ module DFHack def float Float.new end - def bit(shift) - BitField.new(shift, 1) + def bit(shift, enum=nil) + BitField.new(shift, 1, enum) end def bits(shift, len, enum=nil) BitField.new(shift, len, enum) @@ -87,7 +88,7 @@ module DFHack def compound(name=nil, &b) m = Class.new(Compound) DFHack.const_set(name, m) if name - m.instance_eval(&b) + m.class_eval(&b) m.new end def rtti_classname(n) @@ -114,6 +115,11 @@ module DFHack def _cpp_init _fields_ancestors.each { |n, o, s| s._at(@_memaddr+o)._cpp_init } end + def _cpp_delete + _fields_ancestors.each { |n, o, s| s._at(@_memaddr+o)._cpp_delete } + DFHack.free(@_memaddr) + @_memaddr = nil # turn future segfaults in harmless ruby exceptions + end def _set(h) case h when Hash; h.each { |k, v| send("#{k}=", v) } @@ -147,7 +153,7 @@ module DFHack out << '>' end def inspect_field(n, o, s) - if s.kind_of?(BitField) and s._len == 1 + if s.kind_of?(BitField) and s._len == 1 and not s._enum send(n) ? n.to_s : '' elsif s.kind_of?(Pointer) "#{n}=#{s._at(@_memaddr+o).inspect}" @@ -242,7 +248,7 @@ module DFHack def _get v = DFHack.memory_read_int32(@_memaddr) >> @_shift - if @_len == 1 + if @_len == 1 and not @_enum ((v & 1) == 0) ? false : true else v &= _mask @@ -252,7 +258,7 @@ module DFHack end def _set(v) - if @_len == 1 + if @_len == 1 and (not @_enum or v == false or v == true) # allow 'bit = 0' v = (v && v != 0 ? 1 : 0) end @@ -277,6 +283,7 @@ module DFHack def _get addr = _getp return if addr == 0 + return addr if not @_tg @_tg._at(addr)._get end @@ -353,7 +360,10 @@ module DFHack end def empty? ; length == 0 ; end def flatten ; map { |e| e.respond_to?(:flatten) ? e.flatten : e }.flatten ; end - def index(elem=nil, &b) ; (0...length).find { |i| b ? b[self[i]] : self[i] == elem } ; end + def index(e=nil, &b) ; (0...length).find { |i| b ? b[self[i]] : self[i] == e } ; end + def map! ; (0...length).each { |i| self[i] = yield(self[i]) } ; end + def first ; self[0] ; end + def last ; self[length-1] ; end end class StaticArray < MemStruct attr_accessor :_tglen, :_length, :_indexenum, :_tg @@ -369,6 +379,9 @@ module DFHack def _cpp_init _length.times { |i| _tgat(i)._cpp_init } end + def _cpp_delete + _length.times { |i| _tgat(i)._cpp_delete } + end alias length _length alias size _length def _tgat(i) @@ -377,12 +390,18 @@ module DFHack def [](i) i = _indexenum.int(i) if _indexenum i += @_length if i < 0 - _tgat(i)._get + if t = _tgat(i) + t._get + end end def []=(i, v) i = _indexenum.int(i) if _indexenum i += @_length if i < 0 - _tgat(i)._set(v) + if t = _tgat(i) + t._set(v) + else + raise 'index out of bounds' + end end include Enumerable @@ -414,10 +433,10 @@ module DFHack DFHack.memory_vector32_ptrat(@_memaddr, idx) end def insert_at(idx, val) - DFHack.memory_vector32_insert(@_memaddr, idx, val) + DFHack.memory_vector32_insertat(@_memaddr, idx, val) end def delete_at(idx) - DFHack.memory_vector32_delete(@_memaddr, idx) + DFHack.memory_vector32_deleteat(@_memaddr, idx) end def _set(v) @@ -425,6 +444,12 @@ module DFHack v.each_with_index { |e, i| self[i] = e } # patch entries end + def self._cpp_new + new._at DFHack.memory_vector_new + end + def _cpp_delete + DFHack.memory_vector_delete(@_memaddr) + end def _cpp_init DFHack.memory_vector_init(@_memaddr) end @@ -441,7 +466,7 @@ module DFHack if idx >= length insert_at(idx, 0) elsif idx < 0 - raise 'invalid idx' + raise 'index out of bounds' end @_tg._at(valueptr_at(idx))._set(v) end @@ -487,10 +512,10 @@ module DFHack DFHack.memory_vector16_ptrat(@_memaddr, idx) end def insert_at(idx, val) - DFHack.memory_vector16_insert(@_memaddr, idx, val) + DFHack.memory_vector16_insertat(@_memaddr, idx, val) end def delete_at(idx) - DFHack.memory_vector16_delete(@_memaddr, idx) + DFHack.memory_vector16_deleteat(@_memaddr, idx) end end class StlVector8 < StlVector32 @@ -501,10 +526,10 @@ module DFHack DFHack.memory_vector8_ptrat(@_memaddr, idx) end def insert_at(idx, val) - DFHack.memory_vector8_insert(@_memaddr, idx, val) + DFHack.memory_vector8_insertat(@_memaddr, idx, val) end def delete_at(idx) - DFHack.memory_vector8_delete(@_memaddr, idx) + DFHack.memory_vector8_deleteat(@_memaddr, idx) end end class StlBitVector < StlVector32 @@ -513,10 +538,10 @@ module DFHack DFHack.memory_vectorbool_length(@_memaddr) end def insert_at(idx, val) - DFHack.memory_vectorbool_insert(@_memaddr, idx, val) + DFHack.memory_vectorbool_insertat(@_memaddr, idx, val) end def delete_at(idx) - DFHack.memory_vectorbool_delete(@_memaddr, idx) + DFHack.memory_vectorbool_deleteat(@_memaddr, idx) end def [](idx) idx += length if idx < 0 @@ -527,11 +552,17 @@ module DFHack if idx >= length insert_at(idx, v) elsif idx < 0 - raise 'invalid idx' + raise 'index out of bounds' else DFHack.memory_vectorbool_setat(@_memaddr, idx, v) end end + def self._cpp_new + new._at DFHack.memory_vectorbool_new + end + def _cpp_delete + DFHack.memory_vectorbool_delete(@_memaddr) + end end class StlString < MemStruct def _get @@ -542,6 +573,12 @@ module DFHack DFHack.memory_write_stlstring(@_memaddr, v) end + def self._cpp_new + new._at DFHack.memory_stlstring_new + end + def _cpp_delete + DFHack.memory_stlstring_delete(@_memaddr) + end def _cpp_init DFHack.memory_stlstring_init(@_memaddr) end @@ -565,7 +602,7 @@ module DFHack def length DFHack.memory_bitarray_length(@_memaddr) end - # TODO _cpp_init + # TODO _cpp_init, _cpp_delete def size ; length ; end def resize(len) DFHack.memory_bitarray_resize(@_memaddr, len) @@ -579,7 +616,7 @@ module DFHack idx = _indexenum.int(idx) if _indexenum idx += length if idx < 0 if idx >= length or idx < 0 - raise 'invalid idx' + raise 'index out of bounds' else DFHack.memory_bitarray_set(@_memaddr, idx, v) end @@ -599,17 +636,23 @@ module DFHack def length ; _length ; end def size ; _length ; end - # TODO _cpp_init + # TODO _cpp_init, _cpp_delete def _tgat(i) @_tg._at(_ptr + i*@_tglen) if i >= 0 and i < _length end def [](i) i += _length if i < 0 - _tgat(i)._get + if t = _tgat(i) + t._get + end end def []=(i, v) i += _length if i < 0 - _tgat(i)._set(v) + if t = _tgat(i) + t._set(v) + else + raise 'index out of bounds' + end end def _set(a) a.each_with_index { |v, i| self[i] = v } @@ -623,9 +666,9 @@ module DFHack @_tg = tg end - field(:_ptr, 0) { number 32, false } - field(:_prev, 4) { number 32, false } - field(:_next, 8) { number 32, false } + field(:_ptr, 0) { pointer } + field(:_prev, 4) { pointer } + field(:_next, 8) { pointer } def item # With the current xml structure, currently _tg designate @@ -639,22 +682,24 @@ module DFHack def item=(v) #addr = _ptr - #raise 'null pointer' if addr == 0 + #raise 'null pointer' if not addr #@_tg.at(addr)._set(v) raise 'null pointer' end def prev addr = _prev - return if addr == 0 + return if not addr @_tg._at(addr)._get end def next addr = _next - return if addr == 0 + return if not addr @_tg._at(addr)._get end + alias next= _next= + alias prev= _prev= include Enumerable def each @@ -687,6 +732,21 @@ module DFHack def self.sym(v) ; (!v || (v == 0)) ? false : true ; end end + class StlString < MemHack::Compound + field(:str, 0) { stl_string } + + def self.cpp_new(init=nil) + s = MemHack::StlString._cpp_new + s._set(init) if init + new._at(s._memaddr) + end + + def _cpp_delete + MemHack::StlString.new._at(@_memaddr+0)._cpp_delete + @_memaddr = nil + end + end + # cpp rtti name -> rb class @rtti_n2c = {} @rtti_c2n = {} diff --git a/plugins/ruby/ruby-autogen.rb b/plugins/ruby/ruby-autogen.rb deleted file mode 100644 index 3c2aea77..00000000 --- a/plugins/ruby/ruby-autogen.rb +++ /dev/null @@ -1,36842 +0,0 @@ -module DFHack -class ActivityEventType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :TrainingSession ; NUME[:TrainingSession] = 0 - ENUM[1] = :CombatTraining ; NUME[:CombatTraining] = 1 - ENUM[2] = :SkillDemonstration ; NUME[:SkillDemonstration] = 2 - ENUM[3] = :IndividualSkillDrill ; NUME[:IndividualSkillDrill] = 3 - ENUM[4] = :Sparring ; NUME[:Sparring] = 4 - ENUM[5] = :RangedPractice ; NUME[:RangedPractice] = 5 -end - -class AmmoFlags < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :HAS_EDGE_ATTACK ; NUME[:HAS_EDGE_ATTACK] = 0 -end - -class AnimalTrainingLevel < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :SemiWild ; NUME[:SemiWild] = 0 - ENUM[1] = :Trained ; NUME[:Trained] = 1 - ENUM[2] = :WellTrained ; NUME[:WellTrained] = 2 - ENUM[3] = :SkilfullyTrained ; NUME[:SkilfullyTrained] = 3 - ENUM[4] = :ExpertlyTrained ; NUME[:ExpertlyTrained] = 4 - ENUM[5] = :ExceptionallyTrained ; NUME[:ExceptionallyTrained] = 5 - ENUM[6] = :MasterfullyTrained ; NUME[:MasterfullyTrained] = 6 - ENUM[7] = :Domesticated ; NUME[:Domesticated] = 7 - ENUM[8] = :Unk8 ; NUME[:Unk8] = 8 - ENUM[9] = :WildUntamed ; NUME[:WildUntamed] = 9 -end - -class AnnouncementType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :REACHED_PEAK ; NUME[:REACHED_PEAK] = 0 - ENUM[1] = :ERA_CHANGE ; NUME[:ERA_CHANGE] = 1 - ENUM[2] = :FEATURE_DISCOVERY ; NUME[:FEATURE_DISCOVERY] = 2 - ENUM[3] = :STRUCK_DEEP_METAL ; NUME[:STRUCK_DEEP_METAL] = 3 - ENUM[4] = :STRUCK_MINERAL ; NUME[:STRUCK_MINERAL] = 4 - ENUM[5] = :STRUCK_ECONOMIC_MINERAL ; NUME[:STRUCK_ECONOMIC_MINERAL] = 5 - ENUM[6] = :COMBAT_TWIST_WEAPON ; NUME[:COMBAT_TWIST_WEAPON] = 6 - ENUM[7] = :COMBAT_LET_ITEM_DROP ; NUME[:COMBAT_LET_ITEM_DROP] = 7 - ENUM[8] = :COMBAT_START_CHARGE ; NUME[:COMBAT_START_CHARGE] = 8 - ENUM[9] = :COMBAT_SURPRISE_CHARGE ; NUME[:COMBAT_SURPRISE_CHARGE] = 9 - ENUM[10] = :COMBAT_JUMP_DODGE_PROJ ; NUME[:COMBAT_JUMP_DODGE_PROJ] = 10 - ENUM[11] = :COMBAT_JUMP_DODGE_STRIKE ; NUME[:COMBAT_JUMP_DODGE_STRIKE] = 11 - ENUM[12] = :COMBAT_DODGE ; NUME[:COMBAT_DODGE] = 12 - ENUM[13] = :COMBAT_COUNTERSTRIKE ; NUME[:COMBAT_COUNTERSTRIKE] = 13 - ENUM[14] = :COMBAT_BLOCK ; NUME[:COMBAT_BLOCK] = 14 - ENUM[15] = :COMBAT_PARRY ; NUME[:COMBAT_PARRY] = 15 - ENUM[16] = :COMBAT_CHARGE_COLLISION ; NUME[:COMBAT_CHARGE_COLLISION] = 16 - ENUM[17] = :COMBAT_CHARGE_DEFENDER_TUMBLES ; NUME[:COMBAT_CHARGE_DEFENDER_TUMBLES] = 17 - ENUM[18] = :COMBAT_CHARGE_DEFENDER_KNOCKED_OVER ; NUME[:COMBAT_CHARGE_DEFENDER_KNOCKED_OVER] = 18 - ENUM[19] = :COMBAT_CHARGE_ATTACKER_TUMBLES ; NUME[:COMBAT_CHARGE_ATTACKER_TUMBLES] = 19 - ENUM[20] = :COMBAT_CHARGE_ATTACKER_BOUNCE_BACK ; NUME[:COMBAT_CHARGE_ATTACKER_BOUNCE_BACK] = 20 - ENUM[21] = :COMBAT_CHARGE_TANGLE_TOGETHER ; NUME[:COMBAT_CHARGE_TANGLE_TOGETHER] = 21 - ENUM[22] = :COMBAT_CHARGE_TANGLE_TUMBLE ; NUME[:COMBAT_CHARGE_TANGLE_TUMBLE] = 22 - ENUM[23] = :COMBAT_CHARGE_RUSH_BY ; NUME[:COMBAT_CHARGE_RUSH_BY] = 23 - ENUM[24] = :COMBAT_CHARGE_MANAGE_STOP ; NUME[:COMBAT_CHARGE_MANAGE_STOP] = 24 - ENUM[25] = :COMBAT_CHARGE_OBSTACLE_SLAM ; NUME[:COMBAT_CHARGE_OBSTACLE_SLAM] = 25 - ENUM[26] = :COMBAT_WRESTLE_LOCK ; NUME[:COMBAT_WRESTLE_LOCK] = 26 - ENUM[27] = :COMBAT_WRESTLE_CHOKEHOLD ; NUME[:COMBAT_WRESTLE_CHOKEHOLD] = 27 - ENUM[28] = :COMBAT_WRESTLE_TAKEDOWN ; NUME[:COMBAT_WRESTLE_TAKEDOWN] = 28 - ENUM[29] = :COMBAT_WRESTLE_THROW ; NUME[:COMBAT_WRESTLE_THROW] = 29 - ENUM[30] = :COMBAT_WRESTLE_RELEASE_LOCK ; NUME[:COMBAT_WRESTLE_RELEASE_LOCK] = 30 - ENUM[31] = :COMBAT_WRESTLE_RELEASE_CHOKE ; NUME[:COMBAT_WRESTLE_RELEASE_CHOKE] = 31 - ENUM[32] = :COMBAT_WRESTLE_RELEASE_GRIP ; NUME[:COMBAT_WRESTLE_RELEASE_GRIP] = 32 - ENUM[33] = :COMBAT_WRESTLE_STRUGGLE ; NUME[:COMBAT_WRESTLE_STRUGGLE] = 33 - ENUM[34] = :COMBAT_WRESTLE_RELEASE_LATCH ; NUME[:COMBAT_WRESTLE_RELEASE_LATCH] = 34 - ENUM[35] = :COMBAT_WRESTLE_STRANGLE_KO ; NUME[:COMBAT_WRESTLE_STRANGLE_KO] = 35 - ENUM[36] = :COMBAT_WRESTLE_ADJUST_GRIP ; NUME[:COMBAT_WRESTLE_ADJUST_GRIP] = 36 - ENUM[37] = :COMBAT_GRAB_TEAR ; NUME[:COMBAT_GRAB_TEAR] = 37 - ENUM[38] = :COMBAT_STRIKE_DETAILS ; NUME[:COMBAT_STRIKE_DETAILS] = 38 - ENUM[39] = :COMBAT_STRIKE_DETAILS_2 ; NUME[:COMBAT_STRIKE_DETAILS_2] = 39 - ENUM[40] = :COMBAT_EVENT_ENRAGED ; NUME[:COMBAT_EVENT_ENRAGED] = 40 - ENUM[41] = :COMBAT_EVENT_STUCKIN ; NUME[:COMBAT_EVENT_STUCKIN] = 41 - ENUM[42] = :COMBAT_EVENT_LATCH_BP ; NUME[:COMBAT_EVENT_LATCH_BP] = 42 - ENUM[43] = :COMBAT_EVENT_LATCH_GENERAL ; NUME[:COMBAT_EVENT_LATCH_GENERAL] = 43 - ENUM[44] = :COMBAT_EVENT_PROPELLED_AWAY ; NUME[:COMBAT_EVENT_PROPELLED_AWAY] = 44 - ENUM[45] = :COMBAT_EVENT_KNOCKED_OUT ; NUME[:COMBAT_EVENT_KNOCKED_OUT] = 45 - ENUM[46] = :COMBAT_EVENT_STUNNED ; NUME[:COMBAT_EVENT_STUNNED] = 46 - ENUM[47] = :COMBAT_EVENT_WINDED ; NUME[:COMBAT_EVENT_WINDED] = 47 - ENUM[48] = :COMBAT_EVENT_NAUSEATED ; NUME[:COMBAT_EVENT_NAUSEATED] = 48 - ENUM[49] = :MIGRANT_ARRIVAL_NAMED ; NUME[:MIGRANT_ARRIVAL_NAMED] = 49 - ENUM[50] = :MIGRANT_ARRIVAL ; NUME[:MIGRANT_ARRIVAL] = 50 - ENUM[51] = :DIG_CANCEL_WARM ; NUME[:DIG_CANCEL_WARM] = 51 - ENUM[52] = :DIG_CANCEL_DAMP ; NUME[:DIG_CANCEL_DAMP] = 52 - ENUM[53] = :AMBUSH_DEFENDER ; NUME[:AMBUSH_DEFENDER] = 53 - ENUM[54] = :AMBUSH_RESIDENT ; NUME[:AMBUSH_RESIDENT] = 54 - ENUM[55] = :AMBUSH_THIEF ; NUME[:AMBUSH_THIEF] = 55 - ENUM[56] = :AMBUSH_THIEF_SUPPORT_SKULKING ; NUME[:AMBUSH_THIEF_SUPPORT_SKULKING] = 56 - ENUM[57] = :AMBUSH_THIEF_SUPPORT_NATURE ; NUME[:AMBUSH_THIEF_SUPPORT_NATURE] = 57 - ENUM[58] = :AMBUSH_THIEF_SUPPORT ; NUME[:AMBUSH_THIEF_SUPPORT] = 58 - ENUM[59] = :AMBUSH_MISCHIEVOUS ; NUME[:AMBUSH_MISCHIEVOUS] = 59 - ENUM[60] = :AMBUSH_SNATCHER ; NUME[:AMBUSH_SNATCHER] = 60 - ENUM[61] = :AMBUSH_SNATCHER_SUPPORT ; NUME[:AMBUSH_SNATCHER_SUPPORT] = 61 - ENUM[62] = :AMBUSH_AMBUSHER_NATURE ; NUME[:AMBUSH_AMBUSHER_NATURE] = 62 - ENUM[63] = :AMBUSH_AMBUSHER ; NUME[:AMBUSH_AMBUSHER] = 63 - ENUM[64] = :AMBUSH_INJURED ; NUME[:AMBUSH_INJURED] = 64 - ENUM[65] = :AMBUSH_OTHER ; NUME[:AMBUSH_OTHER] = 65 - ENUM[66] = :AMBUSH_INCAPACITATED ; NUME[:AMBUSH_INCAPACITATED] = 66 - ENUM[67] = :CARAVAN_ARRIVAL ; NUME[:CARAVAN_ARRIVAL] = 67 - ENUM[68] = :NOBLE_ARRIVAL ; NUME[:NOBLE_ARRIVAL] = 68 - ENUM[69] = :D_MIGRANTS_ARRIVAL ; NUME[:D_MIGRANTS_ARRIVAL] = 69 - ENUM[70] = :D_MIGRANT_ARRIVAL ; NUME[:D_MIGRANT_ARRIVAL] = 70 - ENUM[71] = :D_MIGRANT_ARRIVAL_DISCOURAGED ; NUME[:D_MIGRANT_ARRIVAL_DISCOURAGED] = 71 - ENUM[72] = :D_NO_MIGRANT_ARRIVAL ; NUME[:D_NO_MIGRANT_ARRIVAL] = 72 - ENUM[73] = :ANIMAL_TRAP_CATCH ; NUME[:ANIMAL_TRAP_CATCH] = 73 - ENUM[74] = :ANIMAL_TRAP_ROBBED ; NUME[:ANIMAL_TRAP_ROBBED] = 74 - ENUM[75] = :MISCHIEF_LEVER ; NUME[:MISCHIEF_LEVER] = 75 - ENUM[76] = :MISCHIEF_PLATE ; NUME[:MISCHIEF_PLATE] = 76 - ENUM[77] = :MISCHIEF_CAGE ; NUME[:MISCHIEF_CAGE] = 77 - ENUM[78] = :MISCHIEF_CHAIN ; NUME[:MISCHIEF_CHAIN] = 78 - ENUM[79] = :DIPLOMAT_ARRIVAL ; NUME[:DIPLOMAT_ARRIVAL] = 79 - ENUM[80] = :LIAISON_ARRIVAL ; NUME[:LIAISON_ARRIVAL] = 80 - ENUM[81] = :TRADE_DIPLOMAT_ARRIVAL ; NUME[:TRADE_DIPLOMAT_ARRIVAL] = 81 - ENUM[82] = :CAVE_COLLAPSE ; NUME[:CAVE_COLLAPSE] = 82 - ENUM[83] = :BIRTH_CITIZEN ; NUME[:BIRTH_CITIZEN] = 83 - ENUM[84] = :BIRTH_ANIMAL ; NUME[:BIRTH_ANIMAL] = 84 - ENUM[85] = :STRANGE_MOOD ; NUME[:STRANGE_MOOD] = 85 - ENUM[86] = :MADE_ARTIFACT ; NUME[:MADE_ARTIFACT] = 86 - ENUM[87] = :NAMED_ARTIFACT ; NUME[:NAMED_ARTIFACT] = 87 - ENUM[88] = :ITEM_ATTACHMENT ; NUME[:ITEM_ATTACHMENT] = 88 - ENUM[89] = :VERMIN_CAGE_ESCAPE ; NUME[:VERMIN_CAGE_ESCAPE] = 89 - ENUM[90] = :TRIGGER_WEB ; NUME[:TRIGGER_WEB] = 90 - ENUM[91] = :MOOD_BUILDING_CLAIMED ; NUME[:MOOD_BUILDING_CLAIMED] = 91 - ENUM[92] = :ARTIFACT_BEGUN ; NUME[:ARTIFACT_BEGUN] = 92 - ENUM[93] = :MEGABEAST_ARRIVAL ; NUME[:MEGABEAST_ARRIVAL] = 93 - ENUM[94] = :BERSERK_CITIZEN ; NUME[:BERSERK_CITIZEN] = 94 - ENUM[95] = :MAGMA_DEFACES_ENGRAVING ; NUME[:MAGMA_DEFACES_ENGRAVING] = 95 - ENUM[96] = :ENGRAVING_MELTS ; NUME[:ENGRAVING_MELTS] = 96 - ENUM[97] = :MASTERPIECE_ARCHITECTURE ; NUME[:MASTERPIECE_ARCHITECTURE] = 97 - ENUM[98] = :MASTERPIECE_CONSTRUCTION ; NUME[:MASTERPIECE_CONSTRUCTION] = 98 - ENUM[99] = :MASTER_ARCHITECTURE_LOST ; NUME[:MASTER_ARCHITECTURE_LOST] = 99 - ENUM[100] = :MASTER_CONSTRUCTION_LOST ; NUME[:MASTER_CONSTRUCTION_LOST] = 100 - ENUM[101] = :ADV_AWAKEN ; NUME[:ADV_AWAKEN] = 101 - ENUM[102] = :ADV_SLEEP_INTERRUPTED ; NUME[:ADV_SLEEP_INTERRUPTED] = 102 - ENUM[103] = :CANCEL_JOB ; NUME[:CANCEL_JOB] = 103 - ENUM[104] = :ADV_CREATURE_DEATH ; NUME[:ADV_CREATURE_DEATH] = 104 - ENUM[105] = :CITIZEN_DEATH ; NUME[:CITIZEN_DEATH] = 105 - ENUM[106] = :PET_DEATH ; NUME[:PET_DEATH] = 106 - ENUM[107] = :ENDGAME_EVENT_1 ; NUME[:ENDGAME_EVENT_1] = 107 - ENUM[108] = :ENDGAME_EVENT_2 ; NUME[:ENDGAME_EVENT_2] = 108 - ENUM[109] = :FALL_OVER ; NUME[:FALL_OVER] = 109 - ENUM[110] = :CAUGHT_IN_FLAMES ; NUME[:CAUGHT_IN_FLAMES] = 110 - ENUM[111] = :CAUGHT_IN_WEB ; NUME[:CAUGHT_IN_WEB] = 111 - ENUM[112] = :UNIT_PROJECTILE_SLAM_BLOW_APART ; NUME[:UNIT_PROJECTILE_SLAM_BLOW_APART] = 112 - ENUM[113] = :UNIT_PROJECTILE_SLAM ; NUME[:UNIT_PROJECTILE_SLAM] = 113 - ENUM[114] = :UNIT_PROJECTILE_SLAM_INTO_UNIT ; NUME[:UNIT_PROJECTILE_SLAM_INTO_UNIT] = 114 - ENUM[115] = :VOMIT ; NUME[:VOMIT] = 115 - ENUM[116] = :LOSE_HOLD_OF_ITEM ; NUME[:LOSE_HOLD_OF_ITEM] = 116 - ENUM[117] = :REGAIN_CONSCIOUSNESS ; NUME[:REGAIN_CONSCIOUSNESS] = 117 - ENUM[118] = :FREE_FROM_WEB ; NUME[:FREE_FROM_WEB] = 118 - ENUM[119] = :PARALYZED ; NUME[:PARALYZED] = 119 - ENUM[120] = :OVERCOME_PARALYSIS ; NUME[:OVERCOME_PARALYSIS] = 120 - ENUM[121] = :NOT_STUNNED ; NUME[:NOT_STUNNED] = 121 - ENUM[122] = :EXHAUSTION ; NUME[:EXHAUSTION] = 122 - ENUM[123] = :PAIN_KO ; NUME[:PAIN_KO] = 123 - ENUM[124] = :BREAK_GRIP ; NUME[:BREAK_GRIP] = 124 - ENUM[125] = :NO_BREAK_GRIP ; NUME[:NO_BREAK_GRIP] = 125 - ENUM[126] = :BLOCK_FIRE ; NUME[:BLOCK_FIRE] = 126 - ENUM[127] = :BREATHE_FIRE ; NUME[:BREATHE_FIRE] = 127 - ENUM[128] = :SHOOT_WEB ; NUME[:SHOOT_WEB] = 128 - ENUM[129] = :PULL_OUT_DROP ; NUME[:PULL_OUT_DROP] = 129 - ENUM[130] = :STAND_UP ; NUME[:STAND_UP] = 130 - ENUM[131] = :MARTIAL_TRANCE ; NUME[:MARTIAL_TRANCE] = 131 - ENUM[132] = :MAT_BREATH ; NUME[:MAT_BREATH] = 132 - ENUM[133] = :ADV_REACTION_PRODUCTS ; NUME[:ADV_REACTION_PRODUCTS] = 133 - ENUM[134] = :NIGHT_ATTACK_STARTS ; NUME[:NIGHT_ATTACK_STARTS] = 134 - ENUM[135] = :NIGHT_ATTACK_ENDS ; NUME[:NIGHT_ATTACK_ENDS] = 135 - ENUM[136] = :NIGHT_ATTACK_TRAVEL ; NUME[:NIGHT_ATTACK_TRAVEL] = 136 - ENUM[137] = :GHOST_ATTACK ; NUME[:GHOST_ATTACK] = 137 - ENUM[138] = :LAIR_HUNTER ; NUME[:LAIR_HUNTER] = 138 - ENUM[139] = :TRAVEL_SITE_DISCOVERY ; NUME[:TRAVEL_SITE_DISCOVERY] = 139 - ENUM[140] = :TRAVEL_SITE_BUMP ; NUME[:TRAVEL_SITE_BUMP] = 140 - ENUM[141] = :ADVENTURE_INTRO ; NUME[:ADVENTURE_INTRO] = 141 - ENUM[142] = :CREATURE_SOUND ; NUME[:CREATURE_SOUND] = 142 - ENUM[143] = :CREATURE_STEALS_OBJECT ; NUME[:CREATURE_STEALS_OBJECT] = 143 - ENUM[144] = :FOUND_TRAP ; NUME[:FOUND_TRAP] = 144 - ENUM[145] = :BODY_TRANSFORMATION ; NUME[:BODY_TRANSFORMATION] = 145 - ENUM[146] = :INTERACTION_ACTOR ; NUME[:INTERACTION_ACTOR] = 146 - ENUM[147] = :INTERACTION_TARGET ; NUME[:INTERACTION_TARGET] = 147 - ENUM[148] = :UNDEAD_ATTACK ; NUME[:UNDEAD_ATTACK] = 148 - ENUM[149] = :CITIZEN_MISSING ; NUME[:CITIZEN_MISSING] = 149 - ENUM[150] = :PET_MISSING ; NUME[:PET_MISSING] = 150 - ENUM[151] = :MARKET_CHATTER ; NUME[:MARKET_CHATTER] = 151 - ENUM[152] = :STRANGE_RAIN_SNOW ; NUME[:STRANGE_RAIN_SNOW] = 152 - ENUM[153] = :STRANGE_CLOUD ; NUME[:STRANGE_CLOUD] = 153 - ENUM[154] = :SIMPLE_ANIMAL_ACTION ; NUME[:SIMPLE_ANIMAL_ACTION] = 154 - ENUM[155] = :FLOUNDER_IN_LIQUID ; NUME[:FLOUNDER_IN_LIQUID] = 155 - ENUM[156] = :TRAINING_DOWN_TO_SEMI_WILD ; NUME[:TRAINING_DOWN_TO_SEMI_WILD] = 156 - ENUM[157] = :TRAINING_FULL_REVERSION ; NUME[:TRAINING_FULL_REVERSION] = 157 - ENUM[158] = :ANIMAL_TRAINING_KNOWLEDGE ; NUME[:ANIMAL_TRAINING_KNOWLEDGE] = 158 - ENUM[159] = :SKIP_ON_LIQUID ; NUME[:SKIP_ON_LIQUID] = 159 - ENUM[160] = :DODGE_FLYING_OBJECT ; NUME[:DODGE_FLYING_OBJECT] = 160 -end - -class ArmorFlags < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :METAL_ARMOR_LEVELS ; NUME[:METAL_ARMOR_LEVELS] = 0 -end - -class ArmorGeneralFlags < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :SOFT ; NUME[:SOFT] = 0 - ENUM[1] = :HARD ; NUME[:HARD] = 1 - ENUM[2] = :METAL ; NUME[:METAL] = 2 - ENUM[3] = :BARRED ; NUME[:BARRED] = 3 - ENUM[4] = :SCALED ; NUME[:SCALED] = 4 - ENUM[5] = :LEATHER ; NUME[:LEATHER] = 5 - ENUM[6] = :SHAPED ; NUME[:SHAPED] = 6 - ENUM[7] = :CHAIN_METAL_TEXT ; NUME[:CHAIN_METAL_TEXT] = 7 - ENUM[8] = :STRUCTURAL_ELASTICITY_WOVEN_THREAD ; NUME[:STRUCTURAL_ELASTICITY_WOVEN_THREAD] = 8 - ENUM[9] = :STRUCTURAL_ELASTICITY_CHAIN_METAL ; NUME[:STRUCTURAL_ELASTICITY_CHAIN_METAL] = 9 - ENUM[10] = :STRUCTURAL_ELASTICITY_CHAIN_ALL ; NUME[:STRUCTURAL_ELASTICITY_CHAIN_ALL] = 10 -end - -class ArtFacetType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :OWN_RACE ; NUME[:OWN_RACE] = 0 - ENUM[1] = :FANCIFUL ; NUME[:FANCIFUL] = 1 - ENUM[2] = :GOOD ; NUME[:GOOD] = 2 - ENUM[3] = :EVIL ; NUME[:EVIL] = 3 -end - -class ArtImageElementType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :CREATURE ; NUME[:CREATURE] = 0 - ENUM[1] = :PLANT ; NUME[:PLANT] = 1 - ENUM[2] = :TREE ; NUME[:TREE] = 2 - ENUM[3] = :SHAPE ; NUME[:SHAPE] = 3 - ENUM[4] = :ITEM ; NUME[:ITEM] = 4 -end - -class ArtImagePropertyType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :TransitiveVerb ; NUME[:TransitiveVerb] = 0 - ENUM[1] = :IntransitiveVerb ; NUME[:IntransitiveVerb] = 1 -end - -class ArtImagePropertyVerb < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :Withering ; NUME[:Withering] = 0 - ENUM[1] = :SurroundedBy ; NUME[:SurroundedBy] = 1 - ENUM[2] = :Massacring ; NUME[:Massacring] = 2 - ENUM[3] = :Fighting ; NUME[:Fighting] = 3 - ENUM[4] = :Laboring ; NUME[:Laboring] = 4 - ENUM[5] = :Greeting ; NUME[:Greeting] = 5 - ENUM[6] = :Refusing ; NUME[:Refusing] = 6 - ENUM[7] = :Speaking ; NUME[:Speaking] = 7 - ENUM[8] = :Embracing ; NUME[:Embracing] = 8 - ENUM[9] = :StrikingDown ; NUME[:StrikingDown] = 9 - ENUM[10] = :MenacingPose ; NUME[:MenacingPose] = 10 - ENUM[11] = :Traveling ; NUME[:Traveling] = 11 - ENUM[12] = :Raising ; NUME[:Raising] = 12 - ENUM[13] = :Hiding ; NUME[:Hiding] = 13 - ENUM[14] = :LookingConfused ; NUME[:LookingConfused] = 14 - ENUM[15] = :LookingTerrified ; NUME[:LookingTerrified] = 15 - ENUM[16] = :Devouring ; NUME[:Devouring] = 16 - ENUM[17] = :Admiring ; NUME[:Admiring] = 17 - ENUM[18] = :Burning ; NUME[:Burning] = 18 - ENUM[19] = :Weeping ; NUME[:Weeping] = 19 - ENUM[20] = :LookingDejected ; NUME[:LookingDejected] = 20 - ENUM[21] = :Cringing ; NUME[:Cringing] = 21 - ENUM[22] = :Screaming ; NUME[:Screaming] = 22 - ENUM[23] = :SubmissiveGesture ; NUME[:SubmissiveGesture] = 23 - ENUM[24] = :FetalPosition ; NUME[:FetalPosition] = 24 - ENUM[25] = :SmearedIntoSpiral ; NUME[:SmearedIntoSpiral] = 25 - ENUM[26] = :Falling ; NUME[:Falling] = 26 - ENUM[27] = :Dead ; NUME[:Dead] = 27 - ENUM[28] = :Laughing ; NUME[:Laughing] = 28 - ENUM[29] = :LookingOffended ; NUME[:LookingOffended] = 29 - ENUM[30] = :BeingShot ; NUME[:BeingShot] = 30 - ENUM[31] = :PlaintiveGesture ; NUME[:PlaintiveGesture] = 31 - ENUM[32] = :Melting ; NUME[:Melting] = 32 - ENUM[33] = :Shooting ; NUME[:Shooting] = 33 - ENUM[34] = :Torturing ; NUME[:Torturing] = 34 - ENUM[35] = :CommittingDepravedAct ; NUME[:CommittingDepravedAct] = 35 - ENUM[36] = :Praying ; NUME[:Praying] = 36 - ENUM[37] = :Contemplating ; NUME[:Contemplating] = 37 - ENUM[38] = :Cooking ; NUME[:Cooking] = 38 - ENUM[39] = :Engraving ; NUME[:Engraving] = 39 - ENUM[40] = :Prostrating ; NUME[:Prostrating] = 40 - ENUM[41] = :Suffering ; NUME[:Suffering] = 41 - ENUM[42] = :BeingImpaled ; NUME[:BeingImpaled] = 42 - ENUM[43] = :BeingContorted ; NUME[:BeingContorted] = 43 - ENUM[44] = :BeingFlayed ; NUME[:BeingFlayed] = 44 - ENUM[45] = :HangingFrom ; NUME[:HangingFrom] = 45 - ENUM[46] = :BeingMutilated ; NUME[:BeingMutilated] = 46 - ENUM[47] = :TriumphantPose ; NUME[:TriumphantPose] = 47 -end - -class BiomeType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :MOUNTAIN ; NUME[:MOUNTAIN] = 0 - ENUM[1] = :GLACIER ; NUME[:GLACIER] = 1 - ENUM[2] = :TUNDRA ; NUME[:TUNDRA] = 2 - ENUM[3] = :SWAMP_TEMPERATE_FRESHWATER ; NUME[:SWAMP_TEMPERATE_FRESHWATER] = 3 - ENUM[4] = :SWAMP_TEMPERATE_SALTWATER ; NUME[:SWAMP_TEMPERATE_SALTWATER] = 4 - ENUM[5] = :MARSH_TEMPERATE_FRESHWATER ; NUME[:MARSH_TEMPERATE_FRESHWATER] = 5 - ENUM[6] = :MARSH_TEMPERATE_SALTWATER ; NUME[:MARSH_TEMPERATE_SALTWATER] = 6 - ENUM[7] = :SWAMP_TROPICAL_FRESHWATER ; NUME[:SWAMP_TROPICAL_FRESHWATER] = 7 - ENUM[8] = :SWAMP_TROPICAL_SALTWATER ; NUME[:SWAMP_TROPICAL_SALTWATER] = 8 - ENUM[9] = :SWAMP_MANGROVE ; NUME[:SWAMP_MANGROVE] = 9 - ENUM[10] = :MARSH_TROPICAL_FRESHWATER ; NUME[:MARSH_TROPICAL_FRESHWATER] = 10 - ENUM[11] = :MARSH_TROPICAL_SALTWATER ; NUME[:MARSH_TROPICAL_SALTWATER] = 11 - ENUM[12] = :FOREST_TAIGA ; NUME[:FOREST_TAIGA] = 12 - ENUM[13] = :FOREST_TEMPERATE_CONIFER ; NUME[:FOREST_TEMPERATE_CONIFER] = 13 - ENUM[14] = :FOREST_TEMPERATE_BROADLEAF ; NUME[:FOREST_TEMPERATE_BROADLEAF] = 14 - ENUM[15] = :FOREST_TROPICAL_CONIFER ; NUME[:FOREST_TROPICAL_CONIFER] = 15 - ENUM[16] = :FOREST_TROPICAL_DRY_BROADLEAF ; NUME[:FOREST_TROPICAL_DRY_BROADLEAF] = 16 - ENUM[17] = :FOREST_TROPICAL_MOIST_BROADLEAF ; NUME[:FOREST_TROPICAL_MOIST_BROADLEAF] = 17 - ENUM[18] = :GRASSLAND_TEMPERATE ; NUME[:GRASSLAND_TEMPERATE] = 18 - ENUM[19] = :SAVANNA_TEMPERATE ; NUME[:SAVANNA_TEMPERATE] = 19 - ENUM[20] = :SHRUBLAND_TEMPERATE ; NUME[:SHRUBLAND_TEMPERATE] = 20 - ENUM[21] = :GRASSLAND_TROPICAL ; NUME[:GRASSLAND_TROPICAL] = 21 - ENUM[22] = :SAVANNA_TROPICAL ; NUME[:SAVANNA_TROPICAL] = 22 - ENUM[23] = :SHRUBLAND_TROPICAL ; NUME[:SHRUBLAND_TROPICAL] = 23 - ENUM[24] = :DESERT_BADLAND ; NUME[:DESERT_BADLAND] = 24 - ENUM[25] = :DESERT_ROCK ; NUME[:DESERT_ROCK] = 25 - ENUM[26] = :DESERT_SAND ; NUME[:DESERT_SAND] = 26 - ENUM[27] = :OCEAN_TROPICAL ; NUME[:OCEAN_TROPICAL] = 27 - ENUM[28] = :OCEAN_TEMPERATE ; NUME[:OCEAN_TEMPERATE] = 28 - ENUM[29] = :OCEAN_ARCTIC ; NUME[:OCEAN_ARCTIC] = 29 - ENUM[30] = :POOL_TEMPERATE_FRESHWATER ; NUME[:POOL_TEMPERATE_FRESHWATER] = 30 - ENUM[31] = :POOL_TEMPERATE_BRACKISHWATER ; NUME[:POOL_TEMPERATE_BRACKISHWATER] = 31 - ENUM[32] = :POOL_TEMPERATE_SALTWATER ; NUME[:POOL_TEMPERATE_SALTWATER] = 32 - ENUM[33] = :POOL_TROPICAL_FRESHWATER ; NUME[:POOL_TROPICAL_FRESHWATER] = 33 - ENUM[34] = :POOL_TROPICAL_BRACKISHWATER ; NUME[:POOL_TROPICAL_BRACKISHWATER] = 34 - ENUM[35] = :POOL_TROPICAL_SALTWATER ; NUME[:POOL_TROPICAL_SALTWATER] = 35 - ENUM[36] = :LAKE_TEMPERATE_FRESHWATER ; NUME[:LAKE_TEMPERATE_FRESHWATER] = 36 - ENUM[37] = :LAKE_TEMPERATE_BRACKISHWATER ; NUME[:LAKE_TEMPERATE_BRACKISHWATER] = 37 - ENUM[38] = :LAKE_TEMPERATE_SALTWATER ; NUME[:LAKE_TEMPERATE_SALTWATER] = 38 - ENUM[39] = :LAKE_TROPICAL_FRESHWATER ; NUME[:LAKE_TROPICAL_FRESHWATER] = 39 - ENUM[40] = :LAKE_TROPICAL_BRACKISHWATER ; NUME[:LAKE_TROPICAL_BRACKISHWATER] = 40 - ENUM[41] = :LAKE_TROPICAL_SALTWATER ; NUME[:LAKE_TROPICAL_SALTWATER] = 41 - ENUM[42] = :RIVER_TEMPERATE_FRESHWATER ; NUME[:RIVER_TEMPERATE_FRESHWATER] = 42 - ENUM[43] = :RIVER_TEMPERATE_BRACKISHWATER ; NUME[:RIVER_TEMPERATE_BRACKISHWATER] = 43 - ENUM[44] = :RIVER_TEMPERATE_SALTWATER ; NUME[:RIVER_TEMPERATE_SALTWATER] = 44 - ENUM[45] = :RIVER_TROPICAL_FRESHWATER ; NUME[:RIVER_TROPICAL_FRESHWATER] = 45 - ENUM[46] = :RIVER_TROPICAL_BRACKISHWATER ; NUME[:RIVER_TROPICAL_BRACKISHWATER] = 46 - ENUM[47] = :RIVER_TROPICAL_SALTWATER ; NUME[:RIVER_TROPICAL_SALTWATER] = 47 - ENUM[48] = :SUBTERRANEAN_WATER ; NUME[:SUBTERRANEAN_WATER] = 48 - ENUM[49] = :SUBTERRANEAN_CHASM ; NUME[:SUBTERRANEAN_CHASM] = 49 - ENUM[50] = :SUBTERRANEAN_LAVA ; NUME[:SUBTERRANEAN_LAVA] = 50 -end - -class BlockSquareEventType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :Mineral ; NUME[:Mineral] = 0 - ENUM[1] = :FrozenLiquid ; NUME[:FrozenLiquid] = 1 - ENUM[2] = :WorldConstruction ; NUME[:WorldConstruction] = 2 - ENUM[3] = :MaterialSpatter ; NUME[:MaterialSpatter] = 3 - ENUM[4] = :Grass ; NUME[:Grass] = 4 -end - -class BodyPartRawFlags < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :HEAD ; NUME[:HEAD] = 0 - ENUM[1] = :UPPERBODY ; NUME[:UPPERBODY] = 1 - ENUM[2] = :LOWERBODY ; NUME[:LOWERBODY] = 2 - ENUM[3] = :SIGHT ; NUME[:SIGHT] = 3 - ENUM[4] = :EMBEDDED ; NUME[:EMBEDDED] = 4 - ENUM[5] = :INTERNAL ; NUME[:INTERNAL] = 5 - ENUM[6] = :CIRCULATION ; NUME[:CIRCULATION] = 6 - ENUM[7] = :SKELETON ; NUME[:SKELETON] = 7 - ENUM[8] = :LIMB ; NUME[:LIMB] = 8 - ENUM[9] = :GRASP ; NUME[:GRASP] = 9 - ENUM[10] = :STANCE ; NUME[:STANCE] = 10 - ENUM[11] = :GUTS ; NUME[:GUTS] = 11 - ENUM[12] = :BREATHE ; NUME[:BREATHE] = 12 - ENUM[13] = :SMALL ; NUME[:SMALL] = 13 - ENUM[14] = :THROAT ; NUME[:THROAT] = 14 - ENUM[15] = :JOINT ; NUME[:JOINT] = 15 - ENUM[16] = :THOUGHT ; NUME[:THOUGHT] = 16 - ENUM[17] = :NERVOUS ; NUME[:NERVOUS] = 17 - ENUM[18] = :RIGHT ; NUME[:RIGHT] = 18 - ENUM[19] = :LEFT ; NUME[:LEFT] = 19 - ENUM[20] = :HEAR ; NUME[:HEAR] = 20 - ENUM[21] = :SMELL ; NUME[:SMELL] = 21 - ENUM[22] = :FLIER ; NUME[:FLIER] = 22 - ENUM[23] = :DIGIT ; NUME[:DIGIT] = 23 - ENUM[24] = :MOUTH ; NUME[:MOUTH] = 24 - ENUM[25] = :APERTURE ; NUME[:APERTURE] = 25 - ENUM[26] = :SOCKET ; NUME[:SOCKET] = 26 - ENUM[27] = :TOTEMABLE ; NUME[:TOTEMABLE] = 27 - ENUM[30] = :UNDER_PRESSURE ; NUME[:UNDER_PRESSURE] = 30 - ENUM[32] = :VERMIN_BUTCHER_ITEM ; NUME[:VERMIN_BUTCHER_ITEM] = 32 - ENUM[33] = :CONNECTOR ; NUME[:CONNECTOR] = 33 -end - -class BodyPartTemplateContype < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :UPPERBODY ; NUME[:UPPERBODY] = 0 - ENUM[1] = :LOWERBODY ; NUME[:LOWERBODY] = 1 - ENUM[2] = :HEAD ; NUME[:HEAD] = 2 - ENUM[3] = :GRASP ; NUME[:GRASP] = 3 - ENUM[4] = :STANCE ; NUME[:STANCE] = 4 -end - -class BodyPartTemplateFlags < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :HEAD ; NUME[:HEAD] = 0 - ENUM[1] = :UPPERBODY ; NUME[:UPPERBODY] = 1 - ENUM[2] = :LOWERBODY ; NUME[:LOWERBODY] = 2 - ENUM[3] = :SIGHT ; NUME[:SIGHT] = 3 - ENUM[4] = :EMBEDDED ; NUME[:EMBEDDED] = 4 - ENUM[5] = :INTERNAL ; NUME[:INTERNAL] = 5 - ENUM[6] = :CIRCULATION ; NUME[:CIRCULATION] = 6 - ENUM[7] = :SKELETON ; NUME[:SKELETON] = 7 - ENUM[8] = :LIMB ; NUME[:LIMB] = 8 - ENUM[9] = :GRASP ; NUME[:GRASP] = 9 - ENUM[10] = :STANCE ; NUME[:STANCE] = 10 - ENUM[11] = :GUTS ; NUME[:GUTS] = 11 - ENUM[12] = :BREATHE ; NUME[:BREATHE] = 12 - ENUM[13] = :SMALL ; NUME[:SMALL] = 13 - ENUM[14] = :THROAT ; NUME[:THROAT] = 14 - ENUM[15] = :JOINT ; NUME[:JOINT] = 15 - ENUM[16] = :THOUGHT ; NUME[:THOUGHT] = 16 - ENUM[17] = :NERVOUS ; NUME[:NERVOUS] = 17 - ENUM[18] = :RIGHT ; NUME[:RIGHT] = 18 - ENUM[19] = :LEFT ; NUME[:LEFT] = 19 - ENUM[20] = :HEAR ; NUME[:HEAR] = 20 - ENUM[21] = :SMELL ; NUME[:SMELL] = 21 - ENUM[22] = :FLIER ; NUME[:FLIER] = 22 - ENUM[23] = :DIGIT ; NUME[:DIGIT] = 23 - ENUM[24] = :MOUTH ; NUME[:MOUTH] = 24 - ENUM[25] = :APERTURE ; NUME[:APERTURE] = 25 - ENUM[26] = :SOCKET ; NUME[:SOCKET] = 26 - ENUM[27] = :TOTEMABLE ; NUME[:TOTEMABLE] = 27 - ENUM[28] = :UNDER_PRESSURE ; NUME[:UNDER_PRESSURE] = 28 - ENUM[29] = :VERMIN_BUTCHER_ITEM ; NUME[:VERMIN_BUTCHER_ITEM] = 29 - ENUM[30] = :CONNECTOR ; NUME[:CONNECTOR] = 30 -end - -class BuildReqChoiceType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :General ; NUME[:General] = 0 - ENUM[1] = :Specific ; NUME[:Specific] = 1 -end - -class BuildingType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - Classname = Hash.new - ENUM[-1] = :NONE ; NUME[:NONE] = -1 - ENUM[0] = :Chair ; NUME[:Chair] = 0 ; Classname[:Chair] = 'building_chairst' - ENUM[1] = :Bed ; NUME[:Bed] = 1 ; Classname[:Bed] = 'building_bedst' - ENUM[2] = :Table ; NUME[:Table] = 2 ; Classname[:Table] = 'building_tablest' - ENUM[3] = :Coffin ; NUME[:Coffin] = 3 ; Classname[:Coffin] = 'building_coffinst' - ENUM[4] = :FarmPlot ; NUME[:FarmPlot] = 4 ; Classname[:FarmPlot] = 'building_farmplotst' - ENUM[5] = :Furnace ; NUME[:Furnace] = 5 ; Classname[:Furnace] = 'building_furnacest' - ENUM[6] = :TradeDepot ; NUME[:TradeDepot] = 6 ; Classname[:TradeDepot] = 'building_tradedepotst' - ENUM[7] = :Shop ; NUME[:Shop] = 7 ; Classname[:Shop] = 'building_shopst' - ENUM[8] = :Door ; NUME[:Door] = 8 ; Classname[:Door] = 'building_doorst' - ENUM[9] = :Floodgate ; NUME[:Floodgate] = 9 ; Classname[:Floodgate] = 'building_floodgatest' - ENUM[10] = :Box ; NUME[:Box] = 10 ; Classname[:Box] = 'building_boxst' - ENUM[11] = :Weaponrack ; NUME[:Weaponrack] = 11 ; Classname[:Weaponrack] = 'building_weaponrackst' - ENUM[12] = :Armorstand ; NUME[:Armorstand] = 12 ; Classname[:Armorstand] = 'building_armorstandst' - ENUM[13] = :Workshop ; NUME[:Workshop] = 13 ; Classname[:Workshop] = 'building_workshopst' - ENUM[14] = :Cabinet ; NUME[:Cabinet] = 14 ; Classname[:Cabinet] = 'building_cabinetst' - ENUM[15] = :Statue ; NUME[:Statue] = 15 ; Classname[:Statue] = 'building_statuest' - ENUM[16] = :WindowGlass ; NUME[:WindowGlass] = 16 ; Classname[:WindowGlass] = 'building_window_glassst' - ENUM[17] = :WindowGem ; NUME[:WindowGem] = 17 ; Classname[:WindowGem] = 'building_window_gemst' - ENUM[18] = :Well ; NUME[:Well] = 18 ; Classname[:Well] = 'building_wellst' - ENUM[19] = :Bridge ; NUME[:Bridge] = 19 ; Classname[:Bridge] = 'building_bridgest' - ENUM[20] = :RoadDirt ; NUME[:RoadDirt] = 20 ; Classname[:RoadDirt] = 'building_road_dirtst' - ENUM[21] = :RoadPaved ; NUME[:RoadPaved] = 21 ; Classname[:RoadPaved] = 'building_road_pavedst' - ENUM[22] = :SiegeEngine ; NUME[:SiegeEngine] = 22 ; Classname[:SiegeEngine] = 'building_siegeenginest' - ENUM[23] = :Trap ; NUME[:Trap] = 23 ; Classname[:Trap] = 'building_trapst' - ENUM[24] = :AnimalTrap ; NUME[:AnimalTrap] = 24 ; Classname[:AnimalTrap] = 'building_animaltrapst' - ENUM[25] = :Support ; NUME[:Support] = 25 ; Classname[:Support] = 'building_supportst' - ENUM[26] = :ArcheryTarget ; NUME[:ArcheryTarget] = 26 ; Classname[:ArcheryTarget] = 'building_archerytargetst' - ENUM[27] = :Chain ; NUME[:Chain] = 27 ; Classname[:Chain] = 'building_chainst' - ENUM[28] = :Cage ; NUME[:Cage] = 28 ; Classname[:Cage] = 'building_cagest' - ENUM[29] = :Stockpile ; NUME[:Stockpile] = 29 ; Classname[:Stockpile] = 'building_stockpilest' - ENUM[30] = :Civzone ; NUME[:Civzone] = 30 ; Classname[:Civzone] = 'building_civzonest' - ENUM[31] = :Weapon ; NUME[:Weapon] = 31 ; Classname[:Weapon] = 'building_weaponst' - ENUM[32] = :Wagon ; NUME[:Wagon] = 32 ; Classname[:Wagon] = 'building_wagonst' - ENUM[33] = :ScrewPump ; NUME[:ScrewPump] = 33 ; Classname[:ScrewPump] = 'building_screw_pumpst' - ENUM[34] = :Construction ; NUME[:Construction] = 34 ; Classname[:Construction] = 'building_constructionst' - ENUM[35] = :Hatch ; NUME[:Hatch] = 35 ; Classname[:Hatch] = 'building_hatchst' - ENUM[36] = :GrateWall ; NUME[:GrateWall] = 36 ; Classname[:GrateWall] = 'building_grate_wallst' - ENUM[37] = :GrateFloor ; NUME[:GrateFloor] = 37 ; Classname[:GrateFloor] = 'building_grate_floorst' - ENUM[38] = :BarsVertical ; NUME[:BarsVertical] = 38 ; Classname[:BarsVertical] = 'building_bars_verticalst' - ENUM[39] = :BarsFloor ; NUME[:BarsFloor] = 39 ; Classname[:BarsFloor] = 'building_bars_floorst' - ENUM[40] = :GearAssembly ; NUME[:GearAssembly] = 40 ; Classname[:GearAssembly] = 'building_gear_assemblyst' - ENUM[41] = :AxleHorizontal ; NUME[:AxleHorizontal] = 41 ; Classname[:AxleHorizontal] = 'building_axle_horizontalst' - ENUM[42] = :AxleVertical ; NUME[:AxleVertical] = 42 ; Classname[:AxleVertical] = 'building_axle_verticalst' - ENUM[43] = :WaterWheel ; NUME[:WaterWheel] = 43 ; Classname[:WaterWheel] = 'building_water_wheelst' - ENUM[44] = :Windmill ; NUME[:Windmill] = 44 ; Classname[:Windmill] = 'building_windmillst' - ENUM[45] = :TractionBench ; NUME[:TractionBench] = 45 ; Classname[:TractionBench] = 'building_traction_benchst' - ENUM[46] = :Slab ; NUME[:Slab] = 46 ; Classname[:Slab] = 'building_slabst' - ENUM[47] = :Nest ; NUME[:Nest] = 47 ; Classname[:Nest] = 'building_nestst' - ENUM[48] = :NestBox ; NUME[:NestBox] = 48 ; Classname[:NestBox] = 'building_nest_boxst' - ENUM[49] = :Hive ; NUME[:Hive] = 49 ; Classname[:Hive] = 'building_hivest' - ENUM[50] = :Rollers ; NUME[:Rollers] = 50 ; Classname[:Rollers] = 'building_rollersst' -end - -class BuildingsOtherId < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - Building = Hash.new(:NONE) - GenericBuilding = Hash.new { |h, k| h[k] = [] } - Workshop = Hash.new { |h, k| h[k] = [] } - Furnace = Hash.new { |h, k| h[k] = [] } - Civzone = Hash.new { |h, k| h[k] = [] } - ENUM[-1] = :ANY ; NUME[:ANY] = -1 - ENUM[0] = :ANY_FREE ; NUME[:ANY_FREE] = 0 - ENUM[1] = :STOCKPILE ; NUME[:STOCKPILE] = 1 ; Building[:STOCKPILE] = :Stockpile - ENUM[2] = :ANY_ZONE ; NUME[:ANY_ZONE] = 2 ; Building[:ANY_ZONE] = :Civzone - ENUM[3] = :ACTIVITY_ZONE ; NUME[:ACTIVITY_ZONE] = 3 ; Building[:ACTIVITY_ZONE] = :Civzone ; Civzone[:ACTIVITY_ZONE] << :ActivityZone - ENUM[4] = :ANY_ACTUAL ; NUME[:ANY_ACTUAL] = 4 - ENUM[5] = :ANY_MACHINE ; NUME[:ANY_MACHINE] = 5 ; GenericBuilding[:ANY_MACHINE] << :ScrewPump ; GenericBuilding[:ANY_MACHINE] << :GearAssembly ; GenericBuilding[:ANY_MACHINE] << :AxleHorizontal ; GenericBuilding[:ANY_MACHINE] << :AxleVertical ; GenericBuilding[:ANY_MACHINE] << :WaterWheel ; GenericBuilding[:ANY_MACHINE] << :Windmill ; GenericBuilding[:ANY_MACHINE] << :Workshop ; Workshop[:ANY_MACHINE] << :Millstone - ENUM[6] = :ANY_HOSPITAL_STORAGE ; NUME[:ANY_HOSPITAL_STORAGE] = 6 ; GenericBuilding[:ANY_HOSPITAL_STORAGE] << :Box ; GenericBuilding[:ANY_HOSPITAL_STORAGE] << :Cabinet - ENUM[7] = :ANY_STORAGE ; NUME[:ANY_STORAGE] = 7 ; GenericBuilding[:ANY_STORAGE] << :Box ; GenericBuilding[:ANY_STORAGE] << :Cabinet ; GenericBuilding[:ANY_STORAGE] << :Weaponrack ; GenericBuilding[:ANY_STORAGE] << :Armorstand - ENUM[8] = :ANY_BARRACKS ; NUME[:ANY_BARRACKS] = 8 ; GenericBuilding[:ANY_BARRACKS] << :Bed ; GenericBuilding[:ANY_BARRACKS] << :Box ; GenericBuilding[:ANY_BARRACKS] << :Cabinet ; GenericBuilding[:ANY_BARRACKS] << :Weaponrack ; GenericBuilding[:ANY_BARRACKS] << :Armorstand - ENUM[9] = :ANY_NOBLE_ROOM ; NUME[:ANY_NOBLE_ROOM] = 9 ; GenericBuilding[:ANY_NOBLE_ROOM] << :Chair ; GenericBuilding[:ANY_NOBLE_ROOM] << :Bed ; GenericBuilding[:ANY_NOBLE_ROOM] << :Table ; GenericBuilding[:ANY_NOBLE_ROOM] << :Coffin - ENUM[10] = :ANY_HOSPITAL ; NUME[:ANY_HOSPITAL] = 10 ; GenericBuilding[:ANY_HOSPITAL] << :Bed ; GenericBuilding[:ANY_HOSPITAL] << :TractionBench - ENUM[11] = :BOX ; NUME[:BOX] = 11 ; Building[:BOX] = :Box - ENUM[12] = :CABINET ; NUME[:CABINET] = 12 ; Building[:CABINET] = :Cabinet - ENUM[13] = :TRAP ; NUME[:TRAP] = 13 ; Building[:TRAP] = :Trap - ENUM[14] = :DOOR ; NUME[:DOOR] = 14 ; Building[:DOOR] = :Door - ENUM[15] = :FLOODGATE ; NUME[:FLOODGATE] = 15 ; Building[:FLOODGATE] = :Floodgate - ENUM[16] = :HATCH ; NUME[:HATCH] = 16 ; Building[:HATCH] = :Hatch - ENUM[17] = :GRATE_WALL ; NUME[:GRATE_WALL] = 17 ; Building[:GRATE_WALL] = :GrateWall - ENUM[18] = :GRATE_FLOOR ; NUME[:GRATE_FLOOR] = 18 ; Building[:GRATE_FLOOR] = :GrateFloor - ENUM[19] = :BARS_VERTICAL ; NUME[:BARS_VERTICAL] = 19 ; Building[:BARS_VERTICAL] = :BarsVertical - ENUM[20] = :BARS_FLOOR ; NUME[:BARS_FLOOR] = 20 ; Building[:BARS_FLOOR] = :BarsFloor - ENUM[21] = :WINDOW_ANY ; NUME[:WINDOW_ANY] = 21 ; GenericBuilding[:WINDOW_ANY] << :WindowGlass ; GenericBuilding[:WINDOW_ANY] << :WindowGem - ENUM[22] = :WELL ; NUME[:WELL] = 22 ; Building[:WELL] = :Well - ENUM[23] = :TABLE ; NUME[:TABLE] = 23 ; Building[:TABLE] = :Table - ENUM[24] = :BRIDGE ; NUME[:BRIDGE] = 24 ; Building[:BRIDGE] = :Bridge - ENUM[25] = :CHAIR ; NUME[:CHAIR] = 25 ; Building[:CHAIR] = :Chair - ENUM[26] = :TRADE_DEPOT ; NUME[:TRADE_DEPOT] = 26 ; Building[:TRADE_DEPOT] = :TradeDepot - ENUM[27] = :NEST ; NUME[:NEST] = 27 ; Building[:NEST] = :Nest - ENUM[28] = :NEST_BOX ; NUME[:NEST_BOX] = 28 ; Building[:NEST_BOX] = :NestBox - ENUM[29] = :HIVE ; NUME[:HIVE] = 29 ; Building[:HIVE] = :Hive - ENUM[30] = :WAGON ; NUME[:WAGON] = 30 ; Building[:WAGON] = :Wagon - ENUM[31] = :SHOP ; NUME[:SHOP] = 31 ; Building[:SHOP] = :Shop - ENUM[32] = :BED ; NUME[:BED] = 32 ; Building[:BED] = :Bed - ENUM[33] = :TRACTION_BENCH ; NUME[:TRACTION_BENCH] = 33 ; Building[:TRACTION_BENCH] = :TractionBench - ENUM[34] = :ANY_ROAD ; NUME[:ANY_ROAD] = 34 ; GenericBuilding[:ANY_ROAD] << :RoadDirt ; GenericBuilding[:ANY_ROAD] << :RoadPaved - ENUM[35] = :FARM_PLOT ; NUME[:FARM_PLOT] = 35 ; Building[:FARM_PLOT] = :FarmPlot - ENUM[36] = :GEAR_ASSEMBLY ; NUME[:GEAR_ASSEMBLY] = 36 ; Building[:GEAR_ASSEMBLY] = :GearAssembly - ENUM[37] = :ROLLERS ; NUME[:ROLLERS] = 37 ; Building[:ROLLERS] = :Rollers - ENUM[38] = :AXLE_HORIZONTAL ; NUME[:AXLE_HORIZONTAL] = 38 ; Building[:AXLE_HORIZONTAL] = :AxleHorizontal - ENUM[39] = :AXLE_VERTICAL ; NUME[:AXLE_VERTICAL] = 39 ; Building[:AXLE_VERTICAL] = :AxleVertical - ENUM[40] = :SUPPORT ; NUME[:SUPPORT] = 40 ; Building[:SUPPORT] = :Support - ENUM[41] = :ARCHERY_TARGET ; NUME[:ARCHERY_TARGET] = 41 ; Building[:ARCHERY_TARGET] = :ArcheryTarget - ENUM[42] = :SCREW_PUMP ; NUME[:SCREW_PUMP] = 42 ; Building[:SCREW_PUMP] = :ScrewPump - ENUM[43] = :WATER_WHEEL ; NUME[:WATER_WHEEL] = 43 ; Building[:WATER_WHEEL] = :WaterWheel - ENUM[44] = :WINDMILL ; NUME[:WINDMILL] = 44 ; Building[:WINDMILL] = :Windmill - ENUM[45] = :CHAIN ; NUME[:CHAIN] = 45 ; Building[:CHAIN] = :Chain - ENUM[46] = :CAGE ; NUME[:CAGE] = 46 ; Building[:CAGE] = :Cage - ENUM[47] = :STATUE ; NUME[:STATUE] = 47 ; Building[:STATUE] = :Statue - ENUM[48] = :SLAB ; NUME[:SLAB] = 48 ; Building[:SLAB] = :Slab - ENUM[49] = :COFFIN ; NUME[:COFFIN] = 49 ; Building[:COFFIN] = :Coffin - ENUM[50] = :WEAPON_RACK ; NUME[:WEAPON_RACK] = 50 ; Building[:WEAPON_RACK] = :Weaponrack - ENUM[51] = :ARMOR_STAND ; NUME[:ARMOR_STAND] = 51 ; Building[:ARMOR_STAND] = :Armorstand - ENUM[52] = :FURNACE_ANY ; NUME[:FURNACE_ANY] = 52 ; Building[:FURNACE_ANY] = :Furnace - ENUM[53] = :FURNACE_WOOD ; NUME[:FURNACE_WOOD] = 53 ; Building[:FURNACE_WOOD] = :Furnace ; Furnace[:FURNACE_WOOD] << :WoodFurnace - ENUM[54] = :FURNACE_SMELTER_ANY ; NUME[:FURNACE_SMELTER_ANY] = 54 ; Building[:FURNACE_SMELTER_ANY] = :Furnace ; Furnace[:FURNACE_SMELTER_ANY] << :Smelter ; Furnace[:FURNACE_SMELTER_ANY] << :MagmaSmelter - ENUM[55] = :FURNACE_SMELTER_MAGMA ; NUME[:FURNACE_SMELTER_MAGMA] = 55 ; Building[:FURNACE_SMELTER_MAGMA] = :Furnace ; Furnace[:FURNACE_SMELTER_MAGMA] << :MagmaSmelter - ENUM[56] = :FURNACE_KILN_ANY ; NUME[:FURNACE_KILN_ANY] = 56 ; Building[:FURNACE_KILN_ANY] = :Furnace ; Furnace[:FURNACE_KILN_ANY] << :Kiln ; Furnace[:FURNACE_KILN_ANY] << :MagmaKiln - ENUM[57] = :FURNACE_GLASS_ANY ; NUME[:FURNACE_GLASS_ANY] = 57 ; Building[:FURNACE_GLASS_ANY] = :Furnace ; Furnace[:FURNACE_GLASS_ANY] << :GlassFurnace ; Furnace[:FURNACE_GLASS_ANY] << :MagmaGlassFurnace - ENUM[58] = :FURNACE_CUSTOM ; NUME[:FURNACE_CUSTOM] = 58 ; Building[:FURNACE_CUSTOM] = :Furnace ; Furnace[:FURNACE_CUSTOM] << :Custom - ENUM[59] = :WORKSHOP_ANY ; NUME[:WORKSHOP_ANY] = 59 ; Building[:WORKSHOP_ANY] = :Workshop - ENUM[60] = :WORKSHOP_BUTCHER ; NUME[:WORKSHOP_BUTCHER] = 60 ; Building[:WORKSHOP_BUTCHER] = :Workshop ; Workshop[:WORKSHOP_BUTCHER] << :Butchers - ENUM[61] = :WORKSHOP_MASON ; NUME[:WORKSHOP_MASON] = 61 ; Building[:WORKSHOP_MASON] = :Workshop ; Workshop[:WORKSHOP_MASON] << :Masons - ENUM[62] = :WORKSHOP_KENNEL ; NUME[:WORKSHOP_KENNEL] = 62 ; Building[:WORKSHOP_KENNEL] = :Workshop ; Workshop[:WORKSHOP_KENNEL] << :Kennels - ENUM[63] = :WORKSHOP_FISHERY ; NUME[:WORKSHOP_FISHERY] = 63 ; Building[:WORKSHOP_FISHERY] = :Workshop ; Workshop[:WORKSHOP_FISHERY] << :Fishery - ENUM[64] = :WORKSHOP_JEWELER ; NUME[:WORKSHOP_JEWELER] = 64 ; Building[:WORKSHOP_JEWELER] = :Workshop ; Workshop[:WORKSHOP_JEWELER] << :Jewelers - ENUM[65] = :WORKSHOP_LOOM ; NUME[:WORKSHOP_LOOM] = 65 ; Building[:WORKSHOP_LOOM] = :Workshop ; Workshop[:WORKSHOP_LOOM] << :Loom - ENUM[66] = :WORKSHOP_TANNER ; NUME[:WORKSHOP_TANNER] = 66 ; Building[:WORKSHOP_TANNER] = :Workshop ; Workshop[:WORKSHOP_TANNER] << :Tanners - ENUM[67] = :WORKSHOP_DYER ; NUME[:WORKSHOP_DYER] = 67 ; Building[:WORKSHOP_DYER] = :Workshop ; Workshop[:WORKSHOP_DYER] << :Dyers - ENUM[68] = :WORKSHOP_MILL_ANY ; NUME[:WORKSHOP_MILL_ANY] = 68 ; Building[:WORKSHOP_MILL_ANY] = :Workshop ; Workshop[:WORKSHOP_MILL_ANY] << :Quern ; Workshop[:WORKSHOP_MILL_ANY] << :Millstone - ENUM[69] = :WORKSHOP_QUERN ; NUME[:WORKSHOP_QUERN] = 69 ; Building[:WORKSHOP_QUERN] = :Workshop ; Workshop[:WORKSHOP_QUERN] << :Quern - ENUM[70] = :WORKSHOP_TOOL ; NUME[:WORKSHOP_TOOL] = 70 ; Building[:WORKSHOP_TOOL] = :Workshop ; Workshop[:WORKSHOP_TOOL] << :Tool - ENUM[71] = :WORKSHOP_MILLSTONE ; NUME[:WORKSHOP_MILLSTONE] = 71 ; Building[:WORKSHOP_MILLSTONE] = :Workshop ; Workshop[:WORKSHOP_MILLSTONE] << :Millstone - ENUM[72] = :WORKSHOP_KITCHEN ; NUME[:WORKSHOP_KITCHEN] = 72 ; Building[:WORKSHOP_KITCHEN] = :Workshop ; Workshop[:WORKSHOP_KITCHEN] << :Kitchen - ENUM[73] = :WORKSHOP_STILL ; NUME[:WORKSHOP_STILL] = 73 ; Building[:WORKSHOP_STILL] = :Workshop ; Workshop[:WORKSHOP_STILL] << :Still - ENUM[74] = :WORKSHOP_FARMER ; NUME[:WORKSHOP_FARMER] = 74 ; Building[:WORKSHOP_FARMER] = :Workshop ; Workshop[:WORKSHOP_FARMER] << :Farmers - ENUM[75] = :WORKSHOP_ASHERY ; NUME[:WORKSHOP_ASHERY] = 75 ; Building[:WORKSHOP_ASHERY] = :Workshop ; Workshop[:WORKSHOP_ASHERY] << :Ashery - ENUM[76] = :WORKSHOP_CARPENTER ; NUME[:WORKSHOP_CARPENTER] = 76 ; Building[:WORKSHOP_CARPENTER] = :Workshop ; Workshop[:WORKSHOP_CARPENTER] << :Carpenters - ENUM[77] = :WORKSHOP_CRAFTSDWARF ; NUME[:WORKSHOP_CRAFTSDWARF] = 77 ; Building[:WORKSHOP_CRAFTSDWARF] = :Workshop ; Workshop[:WORKSHOP_CRAFTSDWARF] << :Craftsdwarfs - ENUM[78] = :WORKSHOP_MECHANIC ; NUME[:WORKSHOP_MECHANIC] = 78 ; Building[:WORKSHOP_MECHANIC] = :Workshop ; Workshop[:WORKSHOP_MECHANIC] << :Mechanics - ENUM[79] = :WORKSHOP_SIEGE ; NUME[:WORKSHOP_SIEGE] = 79 ; Building[:WORKSHOP_SIEGE] = :Workshop ; Workshop[:WORKSHOP_SIEGE] << :Siege - ENUM[80] = :WORKSHOP_CLOTHIER ; NUME[:WORKSHOP_CLOTHIER] = 80 ; Building[:WORKSHOP_CLOTHIER] = :Workshop ; Workshop[:WORKSHOP_CLOTHIER] << :Clothiers - ENUM[81] = :WORKSHOP_LEATHER ; NUME[:WORKSHOP_LEATHER] = 81 ; Building[:WORKSHOP_LEATHER] = :Workshop ; Workshop[:WORKSHOP_LEATHER] << :Leatherworks - ENUM[82] = :WORKSHOP_BOWYER ; NUME[:WORKSHOP_BOWYER] = 82 ; Building[:WORKSHOP_BOWYER] = :Workshop ; Workshop[:WORKSHOP_BOWYER] << :Bowyers - ENUM[83] = :WORKSHOP_MAGMA_FORGE ; NUME[:WORKSHOP_MAGMA_FORGE] = 83 ; Building[:WORKSHOP_MAGMA_FORGE] = :Workshop ; Workshop[:WORKSHOP_MAGMA_FORGE] << :MagmaForge - ENUM[84] = :WORKSHOP_FORGE_ANY ; NUME[:WORKSHOP_FORGE_ANY] = 84 ; Building[:WORKSHOP_FORGE_ANY] = :Workshop ; Workshop[:WORKSHOP_FORGE_ANY] << :MetalsmithsForge ; Workshop[:WORKSHOP_FORGE_ANY] << :MagmaForge - ENUM[85] = :WORKSHOP_CUSTOM ; NUME[:WORKSHOP_CUSTOM] = 85 ; Building[:WORKSHOP_CUSTOM] = :Workshop ; Workshop[:WORKSHOP_CUSTOM] << :Custom - ENUM[86] = :WEAPON_UPRIGHT ; NUME[:WEAPON_UPRIGHT] = 86 ; Building[:WEAPON_UPRIGHT] = :Weapon -end - -class BuiltinMats < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :INORGANIC ; NUME[:INORGANIC] = 0 - ENUM[1] = :AMBER ; NUME[:AMBER] = 1 - ENUM[2] = :CORAL ; NUME[:CORAL] = 2 - ENUM[3] = :GLASS_GREEN ; NUME[:GLASS_GREEN] = 3 - ENUM[4] = :GLASS_CLEAR ; NUME[:GLASS_CLEAR] = 4 - ENUM[5] = :GLASS_CRYSTAL ; NUME[:GLASS_CRYSTAL] = 5 - ENUM[6] = :WATER ; NUME[:WATER] = 6 - ENUM[7] = :COAL ; NUME[:COAL] = 7 - ENUM[8] = :POTASH ; NUME[:POTASH] = 8 - ENUM[9] = :ASH ; NUME[:ASH] = 9 - ENUM[10] = :PEARLASH ; NUME[:PEARLASH] = 10 - ENUM[11] = :LYE ; NUME[:LYE] = 11 - ENUM[12] = :MUD ; NUME[:MUD] = 12 - ENUM[13] = :VOMIT ; NUME[:VOMIT] = 13 - ENUM[14] = :SALT ; NUME[:SALT] = 14 - ENUM[15] = :FILTH_B ; NUME[:FILTH_B] = 15 - ENUM[16] = :FILTH_Y ; NUME[:FILTH_Y] = 16 - ENUM[17] = :UNKNOWN_SUBSTANCE ; NUME[:UNKNOWN_SUBSTANCE] = 17 - ENUM[18] = :GRIME ; NUME[:GRIME] = 18 -end - -class CasteRawFlags < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :AMPHIBIOUS ; NUME[:AMPHIBIOUS] = 0 - ENUM[1] = :AQUATIC ; NUME[:AQUATIC] = 1 - ENUM[2] = :LOCKPICKER ; NUME[:LOCKPICKER] = 2 - ENUM[3] = :MISCHIEVOUS ; NUME[:MISCHIEVOUS] = 3 - ENUM[4] = :PATTERNFLIER ; NUME[:PATTERNFLIER] = 4 - ENUM[5] = :CURIOUSBEAST_ANY ; NUME[:CURIOUSBEAST_ANY] = 5 - ENUM[6] = :CURIOUSBEAST_ITEM ; NUME[:CURIOUSBEAST_ITEM] = 6 - ENUM[7] = :CURIOUSBEAST_GUZZLER ; NUME[:CURIOUSBEAST_GUZZLER] = 7 - ENUM[8] = :FLEEQUICK ; NUME[:FLEEQUICK] = 8 - ENUM[9] = :AT_PEACE_WITH_WILDLIFE ; NUME[:AT_PEACE_WITH_WILDLIFE] = 9 - ENUM[10] = :SWIMS_LEARNED ; NUME[:SWIMS_LEARNED] = 10 - ENUM[11] = :CANNOT_UNDEAD ; NUME[:CANNOT_UNDEAD] = 11 - ENUM[12] = :CURIOUSBEAST_EATER ; NUME[:CURIOUSBEAST_EATER] = 12 - ENUM[13] = :NO_EAT ; NUME[:NO_EAT] = 13 - ENUM[14] = :NO_DRINK ; NUME[:NO_DRINK] = 14 - ENUM[15] = :NO_SLEEP ; NUME[:NO_SLEEP] = 15 - ENUM[16] = :COMMON_DOMESTIC ; NUME[:COMMON_DOMESTIC] = 16 - ENUM[17] = :WAGON_PULLER ; NUME[:WAGON_PULLER] = 17 - ENUM[18] = :PACK_ANIMAL ; NUME[:PACK_ANIMAL] = 18 - ENUM[19] = :FLIER ; NUME[:FLIER] = 19 - ENUM[20] = :LARGE_PREDATOR ; NUME[:LARGE_PREDATOR] = 20 - ENUM[21] = :MAGMA_VISION ; NUME[:MAGMA_VISION] = 21 - ENUM[22] = :FIREIMMUNE ; NUME[:FIREIMMUNE] = 22 - ENUM[23] = :FIREIMMUNE_SUPER ; NUME[:FIREIMMUNE_SUPER] = 23 - ENUM[24] = :WEBBER ; NUME[:WEBBER] = 24 - ENUM[25] = :WEBIMMUNE ; NUME[:WEBIMMUNE] = 25 - ENUM[26] = :FISHITEM ; NUME[:FISHITEM] = 26 - ENUM[27] = :IMMOBILE_LAND ; NUME[:IMMOBILE_LAND] = 27 - ENUM[28] = :IMMOLATE ; NUME[:IMMOLATE] = 28 - ENUM[29] = :MILKABLE ; NUME[:MILKABLE] = 29 - ENUM[30] = :NO_SPRING ; NUME[:NO_SPRING] = 30 - ENUM[31] = :NO_SUMMER ; NUME[:NO_SUMMER] = 31 - ENUM[32] = :NO_AUTUMN ; NUME[:NO_AUTUMN] = 32 - ENUM[33] = :NO_WINTER ; NUME[:NO_WINTER] = 33 - ENUM[34] = :BENIGN ; NUME[:BENIGN] = 34 - ENUM[35] = :VERMIN_NOROAM ; NUME[:VERMIN_NOROAM] = 35 - ENUM[36] = :VERMIN_NOTRAP ; NUME[:VERMIN_NOTRAP] = 36 - ENUM[37] = :VERMIN_NOFISH ; NUME[:VERMIN_NOFISH] = 37 - ENUM[38] = :HAS_NERVES ; NUME[:HAS_NERVES] = 38 - ENUM[39] = :NO_DIZZINESS ; NUME[:NO_DIZZINESS] = 39 - ENUM[40] = :NO_FEVERS ; NUME[:NO_FEVERS] = 40 - ENUM[41] = :NO_PROFESSION_COLOR ; NUME[:NO_PROFESSION_COLOR] = 41 - ENUM[44] = :AMBUSHPREDATOR ; NUME[:AMBUSHPREDATOR] = 44 - ENUM[46] = :NOT_BUTCHERABLE ; NUME[:NOT_BUTCHERABLE] = 46 - ENUM[47] = :COOKABLE_LIVE ; NUME[:COOKABLE_LIVE] = 47 - ENUM[49] = :FIREBREATH ; NUME[:FIREBREATH] = 49 - ENUM[50] = :DRAGONFIREBREATH ; NUME[:DRAGONFIREBREATH] = 50 - ENUM[51] = :MEANDERER ; NUME[:MEANDERER] = 51 - ENUM[52] = :THICKWEB ; NUME[:THICKWEB] = 52 - ENUM[53] = :TRAINABLE_HUNTING ; NUME[:TRAINABLE_HUNTING] = 53 - ENUM[54] = :PET ; NUME[:PET] = 54 - ENUM[55] = :PET_EXOTIC ; NUME[:PET_EXOTIC] = 55 - ENUM[57] = :CAN_SPEAK ; NUME[:CAN_SPEAK] = 57 - ENUM[58] = :CAN_LEARN ; NUME[:CAN_LEARN] = 58 - ENUM[59] = :UTTERANCES ; NUME[:UTTERANCES] = 59 - ENUM[60] = :BONECARN ; NUME[:BONECARN] = 60 - ENUM[61] = :CARNIVORE ; NUME[:CARNIVORE] = 61 - ENUM[62] = :UNDERSWIM ; NUME[:UNDERSWIM] = 62 - ENUM[63] = :NOEXERT ; NUME[:NOEXERT] = 63 - ENUM[64] = :NOPAIN ; NUME[:NOPAIN] = 64 - ENUM[65] = :EXTRAVISION ; NUME[:EXTRAVISION] = 65 - ENUM[66] = :NOBREATHE ; NUME[:NOBREATHE] = 66 - ENUM[67] = :NOSTUN ; NUME[:NOSTUN] = 67 - ENUM[68] = :NONAUSEA ; NUME[:NONAUSEA] = 68 - ENUM[69] = :BLOOD ; NUME[:BLOOD] = 69 - ENUM[70] = :TRANCES ; NUME[:TRANCES] = 70 - ENUM[71] = :NOEMOTION ; NUME[:NOEMOTION] = 71 - ENUM[72] = :SLOW_LEARNER ; NUME[:SLOW_LEARNER] = 72 - ENUM[73] = :NOSTUCKINS ; NUME[:NOSTUCKINS] = 73 - ENUM[74] = :PUS ; NUME[:PUS] = 74 - ENUM[75] = :NOSKULL ; NUME[:NOSKULL] = 75 - ENUM[76] = :NOSKIN ; NUME[:NOSKIN] = 76 - ENUM[77] = :NOBONES ; NUME[:NOBONES] = 77 - ENUM[78] = :NOMEAT ; NUME[:NOMEAT] = 78 - ENUM[79] = :PARALYZEIMMUNE ; NUME[:PARALYZEIMMUNE] = 79 - ENUM[80] = :NOFEAR ; NUME[:NOFEAR] = 80 - ENUM[81] = :CANOPENDOORS ; NUME[:CANOPENDOORS] = 81 - ENUM[83] = :GETS_WOUND_INFECTIONS ; NUME[:GETS_WOUND_INFECTIONS] = 83 - ENUM[84] = :NOSMELLYROT ; NUME[:NOSMELLYROT] = 84 - ENUM[85] = :REMAINS_UNDETERMINED ; NUME[:REMAINS_UNDETERMINED] = 85 - ENUM[86] = :HASSHELL ; NUME[:HASSHELL] = 86 - ENUM[87] = :PEARL ; NUME[:PEARL] = 87 - ENUM[88] = :TRAINABLE_WAR ; NUME[:TRAINABLE_WAR] = 88 - ENUM[89] = :NO_THOUGHT_CENTER_FOR_MOVEMENT ; NUME[:NO_THOUGHT_CENTER_FOR_MOVEMENT] = 89 - ENUM[90] = :ARENA_RESTRICTED ; NUME[:ARENA_RESTRICTED] = 90 - ENUM[91] = :LAIR_HUNTER ; NUME[:LAIR_HUNTER] = 91 - ENUM[92] = :LIKES_FIGHTING ; NUME[:LIKES_FIGHTING] = 92 - ENUM[93] = :VERMIN_HATEABLE ; NUME[:VERMIN_HATEABLE] = 93 - ENUM[94] = :VEGETATION ; NUME[:VEGETATION] = 94 - ENUM[95] = :MAGICAL ; NUME[:MAGICAL] = 95 - ENUM[96] = :NATURAL ; NUME[:NATURAL] = 96 - ENUM[97] = :BABY ; NUME[:BABY] = 97 - ENUM[98] = :CHILD ; NUME[:CHILD] = 98 - ENUM[99] = :MULTIPLE_LITTER_RARE ; NUME[:MULTIPLE_LITTER_RARE] = 99 - ENUM[100] = :MOUNT ; NUME[:MOUNT] = 100 - ENUM[101] = :MOUNT_EXOTIC ; NUME[:MOUNT_EXOTIC] = 101 - ENUM[102] = :FEATURE_ATTACK_GROUP ; NUME[:FEATURE_ATTACK_GROUP] = 102 - ENUM[103] = :VERMIN_MICRO ; NUME[:VERMIN_MICRO] = 103 - ENUM[104] = :EQUIPS ; NUME[:EQUIPS] = 104 - ENUM[105] = :LAYS_EGGS ; NUME[:LAYS_EGGS] = 105 - ENUM[106] = :GRAZER ; NUME[:GRAZER] = 106 - ENUM[107] = :NOTHOUGHT ; NUME[:NOTHOUGHT] = 107 - ENUM[108] = :TRAPAVOID ; NUME[:TRAPAVOID] = 108 - ENUM[109] = :CAVE_ADAPT ; NUME[:CAVE_ADAPT] = 109 - ENUM[110] = :MEGABEAST ; NUME[:MEGABEAST] = 110 - ENUM[111] = :SEMIMEGABEAST ; NUME[:SEMIMEGABEAST] = 111 - ENUM[112] = :ALL_ACTIVE ; NUME[:ALL_ACTIVE] = 112 - ENUM[113] = :DIURNAL ; NUME[:DIURNAL] = 113 - ENUM[114] = :NOCTURNAL ; NUME[:NOCTURNAL] = 114 - ENUM[115] = :CREPUSCULAR ; NUME[:CREPUSCULAR] = 115 - ENUM[116] = :MATUTINAL ; NUME[:MATUTINAL] = 116 - ENUM[117] = :VESPERTINE ; NUME[:VESPERTINE] = 117 - ENUM[118] = :LIGHT_GEN ; NUME[:LIGHT_GEN] = 118 - ENUM[119] = :LISP ; NUME[:LISP] = 119 - ENUM[120] = :GETS_INFECTIONS_FROM_ROT ; NUME[:GETS_INFECTIONS_FROM_ROT] = 120 - ENUM[122] = :ALCOHOL_DEPENDENT ; NUME[:ALCOHOL_DEPENDENT] = 122 - ENUM[123] = :SWIMS_INNATE ; NUME[:SWIMS_INNATE] = 123 - ENUM[124] = :POWER ; NUME[:POWER] = 124 - ENUM[128] = :CASTE_COLOR ; NUME[:CASTE_COLOR] = 128 - ENUM[131] = :FEATURE_BEAST ; NUME[:FEATURE_BEAST] = 131 - ENUM[132] = :TITAN ; NUME[:TITAN] = 132 - ENUM[133] = :UNIQUE_DEMON ; NUME[:UNIQUE_DEMON] = 133 - ENUM[134] = :DEMON ; NUME[:DEMON] = 134 - ENUM[135] = :MANNERISM_LAUGH ; NUME[:MANNERISM_LAUGH] = 135 - ENUM[136] = :MANNERISM_SMILE ; NUME[:MANNERISM_SMILE] = 136 - ENUM[137] = :MANNERISM_WALK ; NUME[:MANNERISM_WALK] = 137 - ENUM[138] = :MANNERISM_SIT ; NUME[:MANNERISM_SIT] = 138 - ENUM[139] = :MANNERISM_BREATH ; NUME[:MANNERISM_BREATH] = 139 - ENUM[140] = :MANNERISM_POSTURE ; NUME[:MANNERISM_POSTURE] = 140 - ENUM[141] = :MANNERISM_STRETCH ; NUME[:MANNERISM_STRETCH] = 141 - ENUM[142] = :MANNERISM_EYELIDS ; NUME[:MANNERISM_EYELIDS] = 142 - ENUM[143] = :NIGHT_CREATURE_ANY ; NUME[:NIGHT_CREATURE_ANY] = 143 - ENUM[144] = :NIGHT_CREATURE_HUNTER ; NUME[:NIGHT_CREATURE_HUNTER] = 144 - ENUM[145] = :NIGHT_CREATURE_BOGEYMAN ; NUME[:NIGHT_CREATURE_BOGEYMAN] = 145 - ENUM[146] = :CONVERTED_SPOUSE ; NUME[:CONVERTED_SPOUSE] = 146 - ENUM[147] = :SPOUSE_CONVERTER ; NUME[:SPOUSE_CONVERTER] = 147 - ENUM[148] = :SPOUSE_CONVERSION_TARGET ; NUME[:SPOUSE_CONVERSION_TARGET] = 148 - ENUM[149] = :DIE_WHEN_VERMIN_BITE ; NUME[:DIE_WHEN_VERMIN_BITE] = 149 - ENUM[150] = :REMAINS_ON_VERMIN_BITE_DEATH ; NUME[:REMAINS_ON_VERMIN_BITE_DEATH] = 150 - ENUM[151] = :COLONY_EXTERNAL ; NUME[:COLONY_EXTERNAL] = 151 - ENUM[152] = :LAYS_UNUSUAL_EGGS ; NUME[:LAYS_UNUSUAL_EGGS] = 152 - ENUM[153] = :RETURNS_VERMIN_KILLS_TO_OWNER ; NUME[:RETURNS_VERMIN_KILLS_TO_OWNER] = 153 - ENUM[154] = :HUNTS_VERMIN ; NUME[:HUNTS_VERMIN] = 154 - ENUM[155] = :ADOPTS_OWNER ; NUME[:ADOPTS_OWNER] = 155 - ENUM[156] = :SOUND_ALERT ; NUME[:SOUND_ALERT] = 156 - ENUM[157] = :SOUND_PEACEFUL_INTERMITTENT ; NUME[:SOUND_PEACEFUL_INTERMITTENT] = 157 - ENUM[161] = :CRAZED ; NUME[:CRAZED] = 161 -end - -class CivzoneType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :Home ; NUME[:Home] = 0 - ENUM[1] = :CraftShop ; NUME[:CraftShop] = 1 - ENUM[2] = :Basement ; NUME[:Basement] = 2 - ENUM[3] = :WeaponsmithsShop ; NUME[:WeaponsmithsShop] = 3 - ENUM[4] = :ArmorsmithsShop ; NUME[:ArmorsmithsShop] = 4 - ENUM[5] = :GeneralStore ; NUME[:GeneralStore] = 5 - ENUM[6] = :FoodShop ; NUME[:FoodShop] = 6 - ENUM[7] = :MeadHall ; NUME[:MeadHall] = 7 - ENUM[8] = :ThroneRoom ; NUME[:ThroneRoom] = 8 - ENUM[9] = :ActivityZone ; NUME[:ActivityZone] = 9 - ENUM[10] = :Temple ; NUME[:Temple] = 10 - ENUM[11] = :Kitchen ; NUME[:Kitchen] = 11 - ENUM[12] = :CaptiveRoom ; NUME[:CaptiveRoom] = 12 - ENUM[13] = :TowerTop ; NUME[:TowerTop] = 13 - ENUM[14] = :Courtyard ; NUME[:Courtyard] = 14 - ENUM[15] = :Treasury ; NUME[:Treasury] = 15 - ENUM[16] = :GuardPost ; NUME[:GuardPost] = 16 - ENUM[17] = :Entrance ; NUME[:Entrance] = 17 - ENUM[18] = :SecretLibrary ; NUME[:SecretLibrary] = 18 - ENUM[19] = :Library ; NUME[:Library] = 19 - ENUM[20] = :Plot ; NUME[:Plot] = 20 - ENUM[21] = :MarketStall ; NUME[:MarketStall] = 21 -end - -class ConstructionType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :Fortification ; NUME[:Fortification] = 0 - ENUM[1] = :Wall ; NUME[:Wall] = 1 - ENUM[2] = :Floor ; NUME[:Floor] = 2 - ENUM[3] = :UpStair ; NUME[:UpStair] = 3 - ENUM[4] = :DownStair ; NUME[:DownStair] = 4 - ENUM[5] = :UpDownStair ; NUME[:UpDownStair] = 5 - ENUM[6] = :Ramp ; NUME[:Ramp] = 6 - ENUM[7] = :TrackN ; NUME[:TrackN] = 7 - ENUM[8] = :TrackS ; NUME[:TrackS] = 8 - ENUM[9] = :TrackE ; NUME[:TrackE] = 9 - ENUM[10] = :TrackW ; NUME[:TrackW] = 10 - ENUM[11] = :TrackNS ; NUME[:TrackNS] = 11 - ENUM[12] = :TrackNE ; NUME[:TrackNE] = 12 - ENUM[13] = :TrackNW ; NUME[:TrackNW] = 13 - ENUM[14] = :TrackSE ; NUME[:TrackSE] = 14 - ENUM[15] = :TrackSW ; NUME[:TrackSW] = 15 - ENUM[16] = :TrackEW ; NUME[:TrackEW] = 16 - ENUM[17] = :TrackNSE ; NUME[:TrackNSE] = 17 - ENUM[18] = :TrackNSW ; NUME[:TrackNSW] = 18 - ENUM[19] = :TrackNEW ; NUME[:TrackNEW] = 19 - ENUM[20] = :TrackSEW ; NUME[:TrackSEW] = 20 - ENUM[21] = :TrackNSEW ; NUME[:TrackNSEW] = 21 -end - -class CorpseMaterialType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :Plant ; NUME[:Plant] = 0 - ENUM[1] = :Silk ; NUME[:Silk] = 1 - ENUM[2] = :Leather ; NUME[:Leather] = 2 - ENUM[3] = :Bone ; NUME[:Bone] = 3 - ENUM[4] = :Shell ; NUME[:Shell] = 4 - ENUM[6] = :Soap ; NUME[:Soap] = 6 - ENUM[7] = :Tooth ; NUME[:Tooth] = 7 - ENUM[8] = :Horn ; NUME[:Horn] = 8 - ENUM[9] = :Pearl ; NUME[:Pearl] = 9 - ENUM[10] = :HairWool ; NUME[:HairWool] = 10 - ENUM[11] = :Yarn ; NUME[:Yarn] = 11 -end - -class CraftMaterialClass < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - MakeSkill = Hash.new(:NONE) - ImproveSkill = Hash.new(:NONE) - ENUM[-1] = :None ; NUME[:None] = -1 - ENUM[0] = :Metal ; NUME[:Metal] = 0 ; MakeSkill[:Metal] = :FORGE_FURNITURE ; ImproveSkill[:Metal] = :METALCRAFT - ENUM[1] = :Wood ; NUME[:Wood] = 1 ; MakeSkill[:Wood] = :CARPENTRY ; ImproveSkill[:Wood] = :WOODCRAFT - ENUM[2] = :Gem ; NUME[:Gem] = 2 ; MakeSkill[:Gem] = :CUTGEM ; ImproveSkill[:Gem] = :ENCRUSTGEM - ENUM[3] = :Glass ; NUME[:Glass] = 3 ; MakeSkill[:Glass] = :GLASSMAKER - ENUM[4] = :Stone ; NUME[:Stone] = 4 ; MakeSkill[:Stone] = :MASONRY - ENUM[5] = :Bone ; NUME[:Bone] = 5 ; MakeSkill[:Bone] = :BONECARVE ; ImproveSkill[:Bone] = :BONECARVE - ENUM[6] = :Ivory ; NUME[:Ivory] = 6 ; MakeSkill[:Ivory] = :BONECARVE ; ImproveSkill[:Ivory] = :BONECARVE - ENUM[7] = :Horn ; NUME[:Horn] = 7 ; MakeSkill[:Horn] = :BONECARVE ; ImproveSkill[:Horn] = :BONECARVE - ENUM[8] = :Pearl ; NUME[:Pearl] = 8 ; MakeSkill[:Pearl] = :BONECARVE ; ImproveSkill[:Pearl] = :BONECARVE - ENUM[9] = :Shell ; NUME[:Shell] = 9 ; MakeSkill[:Shell] = :BONECARVE ; ImproveSkill[:Shell] = :BONECARVE - ENUM[10] = :Leather ; NUME[:Leather] = 10 ; MakeSkill[:Leather] = :LEATHERWORK ; ImproveSkill[:Leather] = :LEATHERWORK - ENUM[11] = :Cloth ; NUME[:Cloth] = 11 ; MakeSkill[:Cloth] = :CLOTHESMAKING ; ImproveSkill[:Cloth] = :CLOTHESMAKING -end - -class CreatureInteractionEffectType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :PAIN ; NUME[:PAIN] = 0 - ENUM[1] = :SWELLING ; NUME[:SWELLING] = 1 - ENUM[2] = :OOZING ; NUME[:OOZING] = 2 - ENUM[3] = :BRUISING ; NUME[:BRUISING] = 3 - ENUM[4] = :BLISTERS ; NUME[:BLISTERS] = 4 - ENUM[5] = :NUMBNESS ; NUME[:NUMBNESS] = 5 - ENUM[6] = :PARALYSIS ; NUME[:PARALYSIS] = 6 - ENUM[7] = :FEVER ; NUME[:FEVER] = 7 - ENUM[8] = :BLEEDING ; NUME[:BLEEDING] = 8 - ENUM[9] = :COUGH_BLOOD ; NUME[:COUGH_BLOOD] = 9 - ENUM[10] = :VOMIT_BLOOD ; NUME[:VOMIT_BLOOD] = 10 - ENUM[11] = :NAUSEA ; NUME[:NAUSEA] = 11 - ENUM[12] = :UNCONSCIOUSNESS ; NUME[:UNCONSCIOUSNESS] = 12 - ENUM[13] = :NECROSIS ; NUME[:NECROSIS] = 13 - ENUM[14] = :IMPAIR_FUNCTION ; NUME[:IMPAIR_FUNCTION] = 14 - ENUM[15] = :DROWSINESS ; NUME[:DROWSINESS] = 15 - ENUM[16] = :DIZZINESS ; NUME[:DIZZINESS] = 16 - ENUM[17] = :ADD_TAG ; NUME[:ADD_TAG] = 17 - ENUM[18] = :REMOVE_TAG ; NUME[:REMOVE_TAG] = 18 - ENUM[19] = :DISPLAY_TILE ; NUME[:DISPLAY_TILE] = 19 - ENUM[20] = :FLASH_TILE ; NUME[:FLASH_TILE] = 20 - ENUM[21] = :SPEED_CHANGE ; NUME[:SPEED_CHANGE] = 21 - ENUM[22] = :CAN_DO_INTERACTION ; NUME[:CAN_DO_INTERACTION] = 22 - ENUM[23] = :SKILL_ROLL_ADJUST ; NUME[:SKILL_ROLL_ADJUST] = 23 - ENUM[24] = :BODY_TRANSFORMATION ; NUME[:BODY_TRANSFORMATION] = 24 - ENUM[25] = :PHYS_ATT_CHANGE ; NUME[:PHYS_ATT_CHANGE] = 25 - ENUM[26] = :MENT_ATT_CHANGE ; NUME[:MENT_ATT_CHANGE] = 26 - ENUM[27] = :MATERIAL_FORCE_MULTIPLIER ; NUME[:MATERIAL_FORCE_MULTIPLIER] = 27 - ENUM[28] = :BODY_MAT_INTERACTION ; NUME[:BODY_MAT_INTERACTION] = 28 - ENUM[29] = :BODY_APPEARANCE_MODIFIER ; NUME[:BODY_APPEARANCE_MODIFIER] = 29 - ENUM[30] = :BP_APPEARANCE_MODIFIER ; NUME[:BP_APPEARANCE_MODIFIER] = 30 - ENUM[31] = :DISPLAY_NAME ; NUME[:DISPLAY_NAME] = 31 -end - -class CreatureRawFlags < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[1] = :EQUIPMENT_WAGON ; NUME[:EQUIPMENT_WAGON] = 1 - ENUM[2] = :MUNDANE ; NUME[:MUNDANE] = 2 - ENUM[3] = :VERMIN_EATER ; NUME[:VERMIN_EATER] = 3 - ENUM[4] = :VERMIN_GROUNDER ; NUME[:VERMIN_GROUNDER] = 4 - ENUM[5] = :VERMIN_ROTTER ; NUME[:VERMIN_ROTTER] = 5 - ENUM[6] = :VERMIN_SOIL ; NUME[:VERMIN_SOIL] = 6 - ENUM[7] = :VERMIN_SOIL_COLONY ; NUME[:VERMIN_SOIL_COLONY] = 7 - ENUM[8] = :LARGE_ROAMING ; NUME[:LARGE_ROAMING] = 8 - ENUM[9] = :VERMIN_FISH ; NUME[:VERMIN_FISH] = 9 - ENUM[10] = :LOOSE_CLUSTERS ; NUME[:LOOSE_CLUSTERS] = 10 - ENUM[11] = :FANCIFUL ; NUME[:FANCIFUL] = 11 - ENUM[12] = :BIOME_MOUNTAIN ; NUME[:BIOME_MOUNTAIN] = 12 - ENUM[13] = :BIOME_GLACIER ; NUME[:BIOME_GLACIER] = 13 - ENUM[14] = :BIOME_TUNDRA ; NUME[:BIOME_TUNDRA] = 14 - ENUM[15] = :BIOME_SWAMP_TEMPERATE_FRESHWATER ; NUME[:BIOME_SWAMP_TEMPERATE_FRESHWATER] = 15 - ENUM[16] = :BIOME_SWAMP_TEMPERATE_SALTWATER ; NUME[:BIOME_SWAMP_TEMPERATE_SALTWATER] = 16 - ENUM[17] = :BIOME_MARSH_TEMPERATE_FRESHWATER ; NUME[:BIOME_MARSH_TEMPERATE_FRESHWATER] = 17 - ENUM[18] = :BIOME_MARSH_TEMPERATE_SALTWATER ; NUME[:BIOME_MARSH_TEMPERATE_SALTWATER] = 18 - ENUM[19] = :BIOME_SWAMP_TROPICAL_FRESHWATER ; NUME[:BIOME_SWAMP_TROPICAL_FRESHWATER] = 19 - ENUM[20] = :BIOME_SWAMP_TROPICAL_SALTWATER ; NUME[:BIOME_SWAMP_TROPICAL_SALTWATER] = 20 - ENUM[21] = :BIOME_SWAMP_MANGROVE ; NUME[:BIOME_SWAMP_MANGROVE] = 21 - ENUM[22] = :BIOME_MARSH_TROPICAL_FRESHWATER ; NUME[:BIOME_MARSH_TROPICAL_FRESHWATER] = 22 - ENUM[23] = :BIOME_MARSH_TROPICAL_SALTWATER ; NUME[:BIOME_MARSH_TROPICAL_SALTWATER] = 23 - ENUM[24] = :BIOME_FOREST_TAIGA ; NUME[:BIOME_FOREST_TAIGA] = 24 - ENUM[25] = :BIOME_FOREST_TEMPERATE_CONIFER ; NUME[:BIOME_FOREST_TEMPERATE_CONIFER] = 25 - ENUM[26] = :BIOME_FOREST_TEMPERATE_BROADLEAF ; NUME[:BIOME_FOREST_TEMPERATE_BROADLEAF] = 26 - ENUM[27] = :BIOME_FOREST_TROPICAL_CONIFER ; NUME[:BIOME_FOREST_TROPICAL_CONIFER] = 27 - ENUM[28] = :BIOME_FOREST_TROPICAL_DRY_BROADLEAF ; NUME[:BIOME_FOREST_TROPICAL_DRY_BROADLEAF] = 28 - ENUM[29] = :BIOME_FOREST_TROPICAL_MOIST_BROADLEAF ; NUME[:BIOME_FOREST_TROPICAL_MOIST_BROADLEAF] = 29 - ENUM[30] = :BIOME_GRASSLAND_TEMPERATE ; NUME[:BIOME_GRASSLAND_TEMPERATE] = 30 - ENUM[31] = :BIOME_SAVANNA_TEMPERATE ; NUME[:BIOME_SAVANNA_TEMPERATE] = 31 - ENUM[32] = :BIOME_SHRUBLAND_TEMPERATE ; NUME[:BIOME_SHRUBLAND_TEMPERATE] = 32 - ENUM[33] = :BIOME_GRASSLAND_TROPICAL ; NUME[:BIOME_GRASSLAND_TROPICAL] = 33 - ENUM[34] = :BIOME_SAVANNA_TROPICAL ; NUME[:BIOME_SAVANNA_TROPICAL] = 34 - ENUM[35] = :BIOME_SHRUBLAND_TROPICAL ; NUME[:BIOME_SHRUBLAND_TROPICAL] = 35 - ENUM[36] = :BIOME_DESERT_BADLAND ; NUME[:BIOME_DESERT_BADLAND] = 36 - ENUM[37] = :BIOME_DESERT_ROCK ; NUME[:BIOME_DESERT_ROCK] = 37 - ENUM[38] = :BIOME_DESERT_SAND ; NUME[:BIOME_DESERT_SAND] = 38 - ENUM[39] = :BIOME_OCEAN_TROPICAL ; NUME[:BIOME_OCEAN_TROPICAL] = 39 - ENUM[40] = :BIOME_OCEAN_TEMPERATE ; NUME[:BIOME_OCEAN_TEMPERATE] = 40 - ENUM[41] = :BIOME_OCEAN_ARCTIC ; NUME[:BIOME_OCEAN_ARCTIC] = 41 - ENUM[42] = :BIOME_SUBTERRANEAN_WATER ; NUME[:BIOME_SUBTERRANEAN_WATER] = 42 - ENUM[43] = :BIOME_SUBTERRANEAN_CHASM ; NUME[:BIOME_SUBTERRANEAN_CHASM] = 43 - ENUM[44] = :BIOME_SUBTERRANEAN_LAVA ; NUME[:BIOME_SUBTERRANEAN_LAVA] = 44 - ENUM[45] = :BIOME_POOL_TEMPERATE_FRESHWATER ; NUME[:BIOME_POOL_TEMPERATE_FRESHWATER] = 45 - ENUM[46] = :BIOME_POOL_TEMPERATE_BRACKISHWATER ; NUME[:BIOME_POOL_TEMPERATE_BRACKISHWATER] = 46 - ENUM[47] = :BIOME_POOL_TEMPERATE_SALTWATER ; NUME[:BIOME_POOL_TEMPERATE_SALTWATER] = 47 - ENUM[48] = :BIOME_POOL_TROPICAL_FRESHWATER ; NUME[:BIOME_POOL_TROPICAL_FRESHWATER] = 48 - ENUM[49] = :BIOME_POOL_TROPICAL_BRACKISHWATER ; NUME[:BIOME_POOL_TROPICAL_BRACKISHWATER] = 49 - ENUM[50] = :BIOME_POOL_TROPICAL_SALTWATER ; NUME[:BIOME_POOL_TROPICAL_SALTWATER] = 50 - ENUM[51] = :BIOME_LAKE_TEMPERATE_FRESHWATER ; NUME[:BIOME_LAKE_TEMPERATE_FRESHWATER] = 51 - ENUM[52] = :BIOME_LAKE_TEMPERATE_BRACKISHWATER ; NUME[:BIOME_LAKE_TEMPERATE_BRACKISHWATER] = 52 - ENUM[53] = :BIOME_LAKE_TEMPERATE_SALTWATER ; NUME[:BIOME_LAKE_TEMPERATE_SALTWATER] = 53 - ENUM[54] = :BIOME_LAKE_TROPICAL_FRESHWATER ; NUME[:BIOME_LAKE_TROPICAL_FRESHWATER] = 54 - ENUM[55] = :BIOME_LAKE_TROPICAL_BRACKISHWATER ; NUME[:BIOME_LAKE_TROPICAL_BRACKISHWATER] = 55 - ENUM[56] = :BIOME_LAKE_TROPICAL_SALTWATER ; NUME[:BIOME_LAKE_TROPICAL_SALTWATER] = 56 - ENUM[57] = :BIOME_RIVER_TEMPERATE_FRESHWATER ; NUME[:BIOME_RIVER_TEMPERATE_FRESHWATER] = 57 - ENUM[58] = :BIOME_RIVER_TEMPERATE_BRACKISHWATER ; NUME[:BIOME_RIVER_TEMPERATE_BRACKISHWATER] = 58 - ENUM[59] = :BIOME_RIVER_TEMPERATE_SALTWATER ; NUME[:BIOME_RIVER_TEMPERATE_SALTWATER] = 59 - ENUM[60] = :BIOME_RIVER_TROPICAL_FRESHWATER ; NUME[:BIOME_RIVER_TROPICAL_FRESHWATER] = 60 - ENUM[61] = :BIOME_RIVER_TROPICAL_BRACKISHWATER ; NUME[:BIOME_RIVER_TROPICAL_BRACKISHWATER] = 61 - ENUM[62] = :BIOME_RIVER_TROPICAL_SALTWATER ; NUME[:BIOME_RIVER_TROPICAL_SALTWATER] = 62 - ENUM[63] = :GOOD ; NUME[:GOOD] = 63 - ENUM[64] = :EVIL ; NUME[:EVIL] = 64 - ENUM[65] = :SAVAGE ; NUME[:SAVAGE] = 65 - ENUM[91] = :GENERATED ; NUME[:GENERATED] = 91 - ENUM[94] = :DOES_NOT_EXIST ; NUME[:DOES_NOT_EXIST] = 94 - ENUM[103] = :ARTIFICIAL_HIVEABLE ; NUME[:ARTIFICIAL_HIVEABLE] = 103 - ENUM[104] = :UBIQUITOUS ; NUME[:UBIQUITOUS] = 104 -end - -class DInitFlags1 < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :VARIED_GROUND_TILES ; NUME[:VARIED_GROUND_TILES] = 0 - ENUM[1] = :ENGRAVINGS_START_OBSCURED ; NUME[:ENGRAVINGS_START_OBSCURED] = 1 - ENUM[2] = :SHOW_IMP_QUALITY ; NUME[:SHOW_IMP_QUALITY] = 2 - ENUM[3] = :SHOW_FLOW_AMOUNTS ; NUME[:SHOW_FLOW_AMOUNTS] = 3 -end - -class DInitFlags2 < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :MORE ; NUME[:MORE] = 0 - ENUM[1] = :ADVENTURER_TRAPS ; NUME[:ADVENTURER_TRAPS] = 1 - ENUM[2] = :ADVENTURER_ALWAYS_CENTER ; NUME[:ADVENTURER_ALWAYS_CENTER] = 2 -end - -class DInitFlags3 < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :COFFIN_NO_PETS_DEFAULT ; NUME[:COFFIN_NO_PETS_DEFAULT] = 0 -end - -class DInitFlags4 < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :TEMPERATURE ; NUME[:TEMPERATURE] = 0 - ENUM[1] = :WEATHER ; NUME[:WEATHER] = 1 - ENUM[2] = :ECONOMY ; NUME[:ECONOMY] = 2 - ENUM[3] = :ZERO_RENT ; NUME[:ZERO_RENT] = 3 - ENUM[4] = :AUTOSAVE_SEASONAL ; NUME[:AUTOSAVE_SEASONAL] = 4 - ENUM[5] = :AUTOSAVE_YEARLY ; NUME[:AUTOSAVE_YEARLY] = 5 - ENUM[6] = :AUTOSAVE_PAUSE ; NUME[:AUTOSAVE_PAUSE] = 6 - ENUM[7] = :AUTOBACKUP ; NUME[:AUTOBACKUP] = 7 - ENUM[8] = :INITIAL_SAVE ; NUME[:INITIAL_SAVE] = 8 - ENUM[9] = :INVADERS ; NUME[:INVADERS] = 9 - ENUM[10] = :CAVEINS ; NUME[:CAVEINS] = 10 - ENUM[11] = :ARTIFACTS ; NUME[:ARTIFACTS] = 11 - ENUM[12] = :LOG_MAP_REJECTS ; NUME[:LOG_MAP_REJECTS] = 12 - ENUM[13] = :PAUSE_ON_LOAD ; NUME[:PAUSE_ON_LOAD] = 13 - ENUM[14] = :EMBARK_WARNING_ALWAYS ; NUME[:EMBARK_WARNING_ALWAYS] = 14 - ENUM[15] = :SHOW_ALL_HISTORY_IN_DWARF_MODE ; NUME[:SHOW_ALL_HISTORY_IN_DWARF_MODE] = 15 - ENUM[16] = :TESTING_ARENA ; NUME[:TESTING_ARENA] = 16 - ENUM[17] = :WALKING_SPREADS_SPATTER_DWF ; NUME[:WALKING_SPREADS_SPATTER_DWF] = 17 - ENUM[18] = :WALKING_SPREADS_SPATTER_ADV ; NUME[:WALKING_SPREADS_SPATTER_ADV] = 18 -end - -class DInitIdlers < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[-1] = :OFF ; NUME[:OFF] = -1 - ENUM[0] = :TOP ; NUME[:TOP] = 0 - ENUM[1] = :BOTTOM ; NUME[:BOTTOM] = 1 -end - -class DInitNickname < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :REPLACE_FIRST ; NUME[:REPLACE_FIRST] = 0 - ENUM[1] = :CENTRALIZE ; NUME[:CENTRALIZE] = 1 - ENUM[2] = :REPLACE_ALL ; NUME[:REPLACE_ALL] = 2 -end - -class DInitTunnel < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :NO ; NUME[:NO] = 0 - ENUM[1] = :FINDER ; NUME[:FINDER] = 1 - ENUM[2] = :ALWAYS ; NUME[:ALWAYS] = 2 -end - -class DInitZView < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :OFF ; NUME[:OFF] = 0 - ENUM[1] = :UNHIDDEN ; NUME[:UNHIDDEN] = 1 - ENUM[2] = :CREATURE ; NUME[:CREATURE] = 2 - ENUM[3] = :ON ; NUME[:ON] = 3 -end - -class EmbarkFinderOption < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :DimensionX ; NUME[:DimensionX] = 0 - ENUM[1] = :DimensionY ; NUME[:DimensionY] = 1 - ENUM[2] = :Savagery ; NUME[:Savagery] = 2 - ENUM[3] = :Evil ; NUME[:Evil] = 3 - ENUM[4] = :Elevation ; NUME[:Elevation] = 4 - ENUM[5] = :Temperature ; NUME[:Temperature] = 5 - ENUM[6] = :Rain ; NUME[:Rain] = 6 - ENUM[7] = :Drainage ; NUME[:Drainage] = 7 - ENUM[8] = :FluxStone ; NUME[:FluxStone] = 8 - ENUM[9] = :Aquifer ; NUME[:Aquifer] = 9 - ENUM[10] = :River ; NUME[:River] = 10 - ENUM[11] = :UndergroundRiver ; NUME[:UndergroundRiver] = 11 - ENUM[12] = :UndergroundPool ; NUME[:UndergroundPool] = 12 - ENUM[13] = :MagmaPool ; NUME[:MagmaPool] = 13 - ENUM[14] = :MagmaPipe ; NUME[:MagmaPipe] = 14 - ENUM[15] = :Chasm ; NUME[:Chasm] = 15 - ENUM[16] = :BottomlessPit ; NUME[:BottomlessPit] = 16 - ENUM[17] = :OtherFeatures ; NUME[:OtherFeatures] = 17 - ENUM[18] = :ShallowMetal ; NUME[:ShallowMetal] = 18 - ENUM[19] = :DeepMetal ; NUME[:DeepMetal] = 19 - ENUM[20] = :Soil ; NUME[:Soil] = 20 - ENUM[21] = :Clay ; NUME[:Clay] = 21 -end - -class EntityPositionFlags < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :IS_LAW_MAKER ; NUME[:IS_LAW_MAKER] = 0 - ENUM[1] = :ELECTED ; NUME[:ELECTED] = 1 - ENUM[2] = :DUTY_BOUND ; NUME[:DUTY_BOUND] = 2 - ENUM[3] = :MILITARY_SCREEN_ONLY ; NUME[:MILITARY_SCREEN_ONLY] = 3 - ENUM[4] = :GENDER_MALE ; NUME[:GENDER_MALE] = 4 - ENUM[5] = :GENDER_FEMALE ; NUME[:GENDER_FEMALE] = 5 - ENUM[6] = :SUCCESSION_BY_HEIR ; NUME[:SUCCESSION_BY_HEIR] = 6 - ENUM[7] = :HAS_RESPONSIBILITIES ; NUME[:HAS_RESPONSIBILITIES] = 7 - ENUM[8] = :FLASHES ; NUME[:FLASHES] = 8 - ENUM[9] = :BRAG_ON_KILL ; NUME[:BRAG_ON_KILL] = 9 - ENUM[10] = :CHAT_WORTHY ; NUME[:CHAT_WORTHY] = 10 - ENUM[11] = :DO_NOT_CULL ; NUME[:DO_NOT_CULL] = 11 - ENUM[12] = :KILL_QUEST ; NUME[:KILL_QUEST] = 12 - ENUM[13] = :IS_LEADER ; NUME[:IS_LEADER] = 13 - ENUM[14] = :IS_DIPLOMAT ; NUME[:IS_DIPLOMAT] = 14 - ENUM[15] = :EXPORTED_IN_LEGENDS ; NUME[:EXPORTED_IN_LEGENDS] = 15 - ENUM[16] = :DETERMINES_COIN_DESIGN ; NUME[:DETERMINES_COIN_DESIGN] = 16 - ENUM[17] = :ACCOUNT_EXEMPT ; NUME[:ACCOUNT_EXEMPT] = 17 - ENUM[20] = :COLOR ; NUME[:COLOR] = 20 - ENUM[21] = :RULES_FROM_LOCATION ; NUME[:RULES_FROM_LOCATION] = 21 - ENUM[22] = :MENIAL_WORK_EXEMPTION ; NUME[:MENIAL_WORK_EXEMPTION] = 22 - ENUM[23] = :MENIAL_WORK_EXEMPTION_SPOUSE ; NUME[:MENIAL_WORK_EXEMPTION_SPOUSE] = 23 - ENUM[24] = :SLEEP_PRETENSION ; NUME[:SLEEP_PRETENSION] = 24 - ENUM[25] = :PUNISHMENT_EXEMPTION ; NUME[:PUNISHMENT_EXEMPTION] = 25 - ENUM[28] = :QUEST_GIVER ; NUME[:QUEST_GIVER] = 28 -end - -class EntityPositionRawFlags < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :SITE ; NUME[:SITE] = 0 - ENUM[1] = :ELECTED ; NUME[:ELECTED] = 1 - ENUM[2] = :CONQUERED_SITE ; NUME[:CONQUERED_SITE] = 2 - ENUM[3] = :MILITARY_SCREEN_ONLY ; NUME[:MILITARY_SCREEN_ONLY] = 3 - ENUM[4] = :GENDER_MALE ; NUME[:GENDER_MALE] = 4 - ENUM[5] = :GENDER_FEMALE ; NUME[:GENDER_FEMALE] = 5 - ENUM[6] = :SUCCESSION_BY_HEIR ; NUME[:SUCCESSION_BY_HEIR] = 6 - ENUM[7] = :EXPORTED_IN_LEGENDS ; NUME[:EXPORTED_IN_LEGENDS] = 7 - ENUM[8] = :FLASHES ; NUME[:FLASHES] = 8 - ENUM[9] = :BRAG_ON_KILL ; NUME[:BRAG_ON_KILL] = 9 - ENUM[10] = :CHAT_WORTHY ; NUME[:CHAT_WORTHY] = 10 - ENUM[11] = :DO_NOT_CULL ; NUME[:DO_NOT_CULL] = 11 - ENUM[12] = :KILL_QUEST ; NUME[:KILL_QUEST] = 12 - ENUM[13] = :DETERMINES_COIN_DESIGN ; NUME[:DETERMINES_COIN_DESIGN] = 13 - ENUM[14] = :ACCOUNT_EXEMPT ; NUME[:ACCOUNT_EXEMPT] = 14 - ENUM[15] = :DUTY_BOUND ; NUME[:DUTY_BOUND] = 15 - ENUM[16] = :COLOR ; NUME[:COLOR] = 16 - ENUM[17] = :RULES_FROM_LOCATION ; NUME[:RULES_FROM_LOCATION] = 17 - ENUM[18] = :MENIAL_WORK_EXEMPTION ; NUME[:MENIAL_WORK_EXEMPTION] = 18 - ENUM[19] = :MENIAL_WORK_EXEMPTION_SPOUSE ; NUME[:MENIAL_WORK_EXEMPTION_SPOUSE] = 19 - ENUM[20] = :SLEEP_PRETENSION ; NUME[:SLEEP_PRETENSION] = 20 - ENUM[21] = :PUNISHMENT_EXEMPTION ; NUME[:PUNISHMENT_EXEMPTION] = 21 - ENUM[22] = :QUEST_GIVER ; NUME[:QUEST_GIVER] = 22 -end - -class EntityPositionResponsibility < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :LAW_MAKING ; NUME[:LAW_MAKING] = 0 - ENUM[1] = :LAW_ENFORCEMENT ; NUME[:LAW_ENFORCEMENT] = 1 - ENUM[2] = :RECEIVE_DIPLOMATS ; NUME[:RECEIVE_DIPLOMATS] = 2 - ENUM[3] = :MEET_WORKERS ; NUME[:MEET_WORKERS] = 3 - ENUM[4] = :MANAGE_PRODUCTION ; NUME[:MANAGE_PRODUCTION] = 4 - ENUM[5] = :TRADE ; NUME[:TRADE] = 5 - ENUM[6] = :ACCOUNTING ; NUME[:ACCOUNTING] = 6 - ENUM[7] = :ESTABLISH_COLONY_TRADE_AGREEMENTS ; NUME[:ESTABLISH_COLONY_TRADE_AGREEMENTS] = 7 - ENUM[8] = :MAKE_INTRODUCTIONS ; NUME[:MAKE_INTRODUCTIONS] = 8 - ENUM[9] = :MAKE_PEACE_AGREEMENTS ; NUME[:MAKE_PEACE_AGREEMENTS] = 9 - ENUM[10] = :MAKE_TOPIC_AGREEMENTS ; NUME[:MAKE_TOPIC_AGREEMENTS] = 10 - ENUM[11] = :COLLECT_TAXES ; NUME[:COLLECT_TAXES] = 11 - ENUM[12] = :ESCORT_TAX_COLLECTOR ; NUME[:ESCORT_TAX_COLLECTOR] = 12 - ENUM[13] = :EXECUTIONS ; NUME[:EXECUTIONS] = 13 - ENUM[14] = :TAME_EXOTICS ; NUME[:TAME_EXOTICS] = 14 - ENUM[15] = :RELIGION ; NUME[:RELIGION] = 15 - ENUM[16] = :ATTACK_ENEMIES ; NUME[:ATTACK_ENEMIES] = 16 - ENUM[17] = :PATROL_TERRITORY ; NUME[:PATROL_TERRITORY] = 17 - ENUM[18] = :MILITARY_GOALS ; NUME[:MILITARY_GOALS] = 18 - ENUM[19] = :MILITARY_STRATEGY ; NUME[:MILITARY_STRATEGY] = 19 - ENUM[20] = :UPGRADE_SQUAD_EQUIPMENT ; NUME[:UPGRADE_SQUAD_EQUIPMENT] = 20 - ENUM[21] = :EQUIPMENT_MANIFESTS ; NUME[:EQUIPMENT_MANIFESTS] = 21 - ENUM[22] = :SORT_AMMUNITION ; NUME[:SORT_AMMUNITION] = 22 - ENUM[23] = :BUILD_MORALE ; NUME[:BUILD_MORALE] = 23 - ENUM[24] = :HEALTH_MANAGEMENT ; NUME[:HEALTH_MANAGEMENT] = 24 -end - -class EntityRawFlags < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :CIV_CONTROLLABLE ; NUME[:CIV_CONTROLLABLE] = 0 - ENUM[1] = :INDIV_CONTROLLABLE ; NUME[:INDIV_CONTROLLABLE] = 1 - ENUM[2] = :LAYER_LINKED ; NUME[:LAYER_LINKED] = 2 - ENUM[3] = :INDOOR_WOOD ; NUME[:INDOOR_WOOD] = 3 - ENUM[4] = :WOOD_ARMOR ; NUME[:WOOD_ARMOR] = 4 - ENUM[5] = :SIEGER ; NUME[:SIEGER] = 5 - ENUM[6] = :AMBUSHER ; NUME[:AMBUSHER] = 6 - ENUM[7] = :BABYSNATCHER ; NUME[:BABYSNATCHER] = 7 - ENUM[8] = :ITEM_THIEF ; NUME[:ITEM_THIEF] = 8 - ENUM[9] = :CLOTHING ; NUME[:CLOTHING] = 9 - ENUM[10] = :CURRENCY_BY_YEAR ; NUME[:CURRENCY_BY_YEAR] = 10 - ENUM[11] = :METAL_PREF ; NUME[:METAL_PREF] = 11 - ENUM[12] = :GEM_PREF ; NUME[:GEM_PREF] = 12 - ENUM[13] = :STONE_PREF ; NUME[:STONE_PREF] = 13 - ENUM[14] = :WOOD_WEAPONS ; NUME[:WOOD_WEAPONS] = 14 - ENUM[15] = :BUILDS_OUTDOOR_FORTIFICATIONS ; NUME[:BUILDS_OUTDOOR_FORTIFICATIONS] = 15 - ENUM[16] = :RIVER_PRODUCTS ; NUME[:RIVER_PRODUCTS] = 16 - ENUM[17] = :OCEAN_PRODUCTS ; NUME[:OCEAN_PRODUCTS] = 17 - ENUM[18] = :INDOOR_FARMING ; NUME[:INDOOR_FARMING] = 18 - ENUM[19] = :OUTDOOR_FARMING ; NUME[:OUTDOOR_FARMING] = 19 - ENUM[20] = :USE_CAVE_ANIMALS ; NUME[:USE_CAVE_ANIMALS] = 20 - ENUM[21] = :USE_EVIL_ANIMALS ; NUME[:USE_EVIL_ANIMALS] = 21 - ENUM[22] = :USE_ANIMAL_PRODUCTS ; NUME[:USE_ANIMAL_PRODUCTS] = 22 - ENUM[23] = :COMMON_DOMESTIC_PACK ; NUME[:COMMON_DOMESTIC_PACK] = 23 - ENUM[24] = :COMMON_DOMESTIC_PULL ; NUME[:COMMON_DOMESTIC_PULL] = 24 - ENUM[25] = :COMMON_DOMESTIC_MOUNT ; NUME[:COMMON_DOMESTIC_MOUNT] = 25 - ENUM[26] = :COMMON_DOMESTIC_PET ; NUME[:COMMON_DOMESTIC_PET] = 26 - ENUM[27] = :SUBTERRANEAN_CLOTHING ; NUME[:SUBTERRANEAN_CLOTHING] = 27 - ENUM[28] = :USE_EVIL_WOOD ; NUME[:USE_EVIL_WOOD] = 28 - ENUM[29] = :USE_GOOD_WOOD ; NUME[:USE_GOOD_WOOD] = 29 - ENUM[30] = :USE_EVIL_PLANTS ; NUME[:USE_EVIL_PLANTS] = 30 - ENUM[31] = :USE_GOOD_PLANTS ; NUME[:USE_GOOD_PLANTS] = 31 - ENUM[32] = :USE_GOOD_ANIMALS ; NUME[:USE_GOOD_ANIMALS] = 32 - ENUM[33] = :USE_ANY_PET_RACE ; NUME[:USE_ANY_PET_RACE] = 33 - ENUM[34] = :USE_MISC_PROCESSED_WOOD_PRODUCTS ; NUME[:USE_MISC_PROCESSED_WOOD_PRODUCTS] = 34 - ENUM[35] = :IMPROVED_BOWS ; NUME[:IMPROVED_BOWS] = 35 - ENUM[36] = :OUTDOOR_WOOD ; NUME[:OUTDOOR_WOOD] = 36 - ENUM[37] = :LOCAL_BANDITRY ; NUME[:LOCAL_BANDITRY] = 37 - ENUM[39] = :INVADERS_IGNORE_NEUTRALS ; NUME[:INVADERS_IGNORE_NEUTRALS] = 39 - ENUM[40] = :AT_PEACE_WITH_WILDLIFE ; NUME[:AT_PEACE_WITH_WILDLIFE] = 40 - ENUM[41] = :EQUIPMENT_IMPROVEMENTS ; NUME[:EQUIPMENT_IMPROVEMENTS] = 41 - ENUM[42] = :ABUSE_BODIES ; NUME[:ABUSE_BODIES] = 42 - ENUM[43] = :UNDEAD_CANDIDATE ; NUME[:UNDEAD_CANDIDATE] = 43 - ENUM[45] = :SKULKING ; NUME[:SKULKING] = 45 - ENUM[47] = :MERCHANT_NOBILITY ; NUME[:MERCHANT_NOBILITY] = 47 - ENUM[48] = :TREE_CAP_DIPLOMACY ; NUME[:TREE_CAP_DIPLOMACY] = 48 - ENUM[49] = :DIPLOMAT_BODYGUARDS ; NUME[:DIPLOMAT_BODYGUARDS] = 49 - ENUM[50] = :MERCHANT_BODYGUARDS ; NUME[:MERCHANT_BODYGUARDS] = 50 - ENUM[53] = :WANDERER ; NUME[:WANDERER] = 53 - ENUM[54] = :BEAST_HUNTER ; NUME[:BEAST_HUNTER] = 54 - ENUM[55] = :SCOUT ; NUME[:SCOUT] = 55 - ENUM[56] = :WILL_ACCEPT_TRIBUTE ; NUME[:WILL_ACCEPT_TRIBUTE] = 56 -end - -class EnvironmentType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :SOIL ; NUME[:SOIL] = 0 - ENUM[1] = :SOIL_OCEAN ; NUME[:SOIL_OCEAN] = 1 - ENUM[2] = :SOIL_SAND ; NUME[:SOIL_SAND] = 2 - ENUM[3] = :METAMORPHIC ; NUME[:METAMORPHIC] = 3 - ENUM[4] = :SEDIMENTARY ; NUME[:SEDIMENTARY] = 4 - ENUM[5] = :IGNEOUS_INTRUSIVE ; NUME[:IGNEOUS_INTRUSIVE] = 5 - ENUM[6] = :IGNEOUS_EXTRUSIVE ; NUME[:IGNEOUS_EXTRUSIVE] = 6 - ENUM[7] = :ALLUVIAL ; NUME[:ALLUVIAL] = 7 -end - -class EthicResponse < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :NOT_APPLICABLE ; NUME[:NOT_APPLICABLE] = 0 - ENUM[1] = :ACCEPTABLE ; NUME[:ACCEPTABLE] = 1 - ENUM[2] = :PERSONAL_MATTER ; NUME[:PERSONAL_MATTER] = 2 - ENUM[3] = :JUSTIFIED_IF_NO_REPERCUSSIONS ; NUME[:JUSTIFIED_IF_NO_REPERCUSSIONS] = 3 - ENUM[4] = :JUSTIFIED_IF_GOOD_REASON ; NUME[:JUSTIFIED_IF_GOOD_REASON] = 4 - ENUM[5] = :JUSTIFIED_IF_EXTREME_REASON ; NUME[:JUSTIFIED_IF_EXTREME_REASON] = 5 - ENUM[6] = :JUSTIFIED_IF_SELF_DEFENSE ; NUME[:JUSTIFIED_IF_SELF_DEFENSE] = 6 - ENUM[7] = :ONLY_IF_SANCTIONED ; NUME[:ONLY_IF_SANCTIONED] = 7 - ENUM[8] = :MISGUIDED ; NUME[:MISGUIDED] = 8 - ENUM[9] = :SHUN ; NUME[:SHUN] = 9 - ENUM[10] = :APPALLING ; NUME[:APPALLING] = 10 - ENUM[11] = :PUNISH_REPRIMAND ; NUME[:PUNISH_REPRIMAND] = 11 - ENUM[12] = :PUNISH_SERIOUS ; NUME[:PUNISH_SERIOUS] = 12 - ENUM[13] = :PUNISH_EXILE ; NUME[:PUNISH_EXILE] = 13 - ENUM[14] = :PUNISH_CAPITAL ; NUME[:PUNISH_CAPITAL] = 14 - ENUM[15] = :UNTHINKABLE ; NUME[:UNTHINKABLE] = 15 -end - -class EthicType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :KILL_ENTITY_MEMBER ; NUME[:KILL_ENTITY_MEMBER] = 0 - ENUM[1] = :KILL_NEUTRAL ; NUME[:KILL_NEUTRAL] = 1 - ENUM[2] = :KILL_ENEMY ; NUME[:KILL_ENEMY] = 2 - ENUM[3] = :KILL_ANIMAL ; NUME[:KILL_ANIMAL] = 3 - ENUM[4] = :KILL_PLANT ; NUME[:KILL_PLANT] = 4 - ENUM[5] = :TORTURE_AS_EXAMPLE ; NUME[:TORTURE_AS_EXAMPLE] = 5 - ENUM[6] = :TORTURE_FOR_INFORMATION ; NUME[:TORTURE_FOR_INFORMATION] = 6 - ENUM[7] = :TORTURE_FOR_FUN ; NUME[:TORTURE_FOR_FUN] = 7 - ENUM[8] = :TORTURE_ANIMALS ; NUME[:TORTURE_ANIMALS] = 8 - ENUM[9] = :TREASON ; NUME[:TREASON] = 9 - ENUM[10] = :OATH_BREAKING ; NUME[:OATH_BREAKING] = 10 - ENUM[11] = :LYING ; NUME[:LYING] = 11 - ENUM[12] = :VANDALISM ; NUME[:VANDALISM] = 12 - ENUM[13] = :TRESPASSING ; NUME[:TRESPASSING] = 13 - ENUM[14] = :THEFT ; NUME[:THEFT] = 14 - ENUM[15] = :ASSAULT ; NUME[:ASSAULT] = 15 - ENUM[16] = :SLAVERY ; NUME[:SLAVERY] = 16 - ENUM[17] = :EAT_SAPIENT_OTHER ; NUME[:EAT_SAPIENT_OTHER] = 17 - ENUM[18] = :EAT_SAPIENT_KILL ; NUME[:EAT_SAPIENT_KILL] = 18 - ENUM[19] = :MAKE_TROPHY_SAME_RACE ; NUME[:MAKE_TROPHY_SAME_RACE] = 19 - ENUM[20] = :MAKE_TROPHY_SAPIENT ; NUME[:MAKE_TROPHY_SAPIENT] = 20 - ENUM[21] = :MAKE_TROPHY_ANIMAL ; NUME[:MAKE_TROPHY_ANIMAL] = 21 -end - -class FeatureAlterationType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :NewPopMax ; NUME[:NewPopMax] = 0 - ENUM[1] = :NewLavaFillZ ; NUME[:NewLavaFillZ] = 1 -end - -class FeatureInitFlags < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[3] = :Discovered ; NUME[:Discovered] = 3 -end - -class FeatureType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :OutdoorRiver ; NUME[:OutdoorRiver] = 0 - ENUM[1] = :Cave ; NUME[:Cave] = 1 - ENUM[2] = :Pit ; NUME[:Pit] = 2 - ENUM[3] = :MagmaPool ; NUME[:MagmaPool] = 3 - ENUM[4] = :Volcano ; NUME[:Volcano] = 4 - ENUM[5] = :DeepSpecialTube ; NUME[:DeepSpecialTube] = 5 - ENUM[6] = :DeepSurfacePortal ; NUME[:DeepSurfacePortal] = 6 - ENUM[7] = :SubterraneanFromLayer ; NUME[:SubterraneanFromLayer] = 7 - ENUM[8] = :MagmaCoreFromLayer ; NUME[:MagmaCoreFromLayer] = 8 - ENUM[9] = :FeatureUnderworldFromLayer ; NUME[:FeatureUnderworldFromLayer] = 9 -end - -class FlowType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :Miasma ; NUME[:Miasma] = 0 - ENUM[1] = :Steam ; NUME[:Steam] = 1 - ENUM[2] = :Mist ; NUME[:Mist] = 2 - ENUM[3] = :MaterialDust ; NUME[:MaterialDust] = 3 - ENUM[4] = :MagmaMist ; NUME[:MagmaMist] = 4 - ENUM[5] = :Smoke ; NUME[:Smoke] = 5 - ENUM[6] = :Dragonfire ; NUME[:Dragonfire] = 6 - ENUM[7] = :Fire ; NUME[:Fire] = 7 - ENUM[8] = :Web ; NUME[:Web] = 8 - ENUM[9] = :MaterialGas ; NUME[:MaterialGas] = 9 - ENUM[10] = :MaterialVapor ; NUME[:MaterialVapor] = 10 - ENUM[11] = :OceanWave ; NUME[:OceanWave] = 11 - ENUM[12] = :SeaFoam ; NUME[:SeaFoam] = 12 -end - -class FurnaceType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :WoodFurnace ; NUME[:WoodFurnace] = 0 - ENUM[1] = :Smelter ; NUME[:Smelter] = 1 - ENUM[2] = :GlassFurnace ; NUME[:GlassFurnace] = 2 - ENUM[3] = :Kiln ; NUME[:Kiln] = 3 - ENUM[4] = :MagmaSmelter ; NUME[:MagmaSmelter] = 4 - ENUM[5] = :MagmaGlassFurnace ; NUME[:MagmaGlassFurnace] = 5 - ENUM[6] = :MagmaKiln ; NUME[:MagmaKiln] = 6 - ENUM[7] = :Custom ; NUME[:Custom] = 7 -end - -class GameMode < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :DWARF ; NUME[:DWARF] = 0 - ENUM[1] = :ADVENTURE ; NUME[:ADVENTURE] = 1 - ENUM[2] = :Num ; NUME[:Num] = 2 - ENUM[3] = :NONE ; NUME[:NONE] = 3 -end - -class GameType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :DWARF_MAIN ; NUME[:DWARF_MAIN] = 0 - ENUM[1] = :ADVENTURE_MAIN ; NUME[:ADVENTURE_MAIN] = 1 - ENUM[2] = :VIEW_LEGENDS ; NUME[:VIEW_LEGENDS] = 2 - ENUM[3] = :DWARF_RECLAIM ; NUME[:DWARF_RECLAIM] = 3 - ENUM[4] = :DWARF_ARENA ; NUME[:DWARF_ARENA] = 4 - ENUM[5] = :ADVENTURE_ARENA ; NUME[:ADVENTURE_ARENA] = 5 - ENUM[6] = :Num ; NUME[:Num] = 6 - ENUM[7] = :NONE ; NUME[:NONE] = 7 -end - -class GeneralRefType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :ARTIFACT ; NUME[:ARTIFACT] = 0 - ENUM[1] = :IS_ARTIFACT ; NUME[:IS_ARTIFACT] = 1 - ENUM[2] = :NEMESIS ; NUME[:NEMESIS] = 2 - ENUM[3] = :IS_NEMESIS ; NUME[:IS_NEMESIS] = 3 - ENUM[4] = :ITEM ; NUME[:ITEM] = 4 - ENUM[5] = :ITEM_TYPE ; NUME[:ITEM_TYPE] = 5 - ENUM[6] = :COINBATCH ; NUME[:COINBATCH] = 6 - ENUM[7] = :MAPSQUARE ; NUME[:MAPSQUARE] = 7 - ENUM[8] = :ENTITY_ART_IMAGE ; NUME[:ENTITY_ART_IMAGE] = 8 - ENUM[9] = :CONTAINS_UNIT ; NUME[:CONTAINS_UNIT] = 9 - ENUM[10] = :CONTAINS_ITEM ; NUME[:CONTAINS_ITEM] = 10 - ENUM[11] = :CONTAINED_IN_ITEM ; NUME[:CONTAINED_IN_ITEM] = 11 - ENUM[12] = :PROJECTILE ; NUME[:PROJECTILE] = 12 - ENUM[13] = :UNIT ; NUME[:UNIT] = 13 - ENUM[14] = :UNIT_MILKEE ; NUME[:UNIT_MILKEE] = 14 - ENUM[15] = :UNIT_TRAINEE ; NUME[:UNIT_TRAINEE] = 15 - ENUM[16] = :UNIT_ITEMOWNER ; NUME[:UNIT_ITEMOWNER] = 16 - ENUM[17] = :UNIT_TRADEBRINGER ; NUME[:UNIT_TRADEBRINGER] = 17 - ENUM[18] = :UNIT_HOLDER ; NUME[:UNIT_HOLDER] = 18 - ENUM[19] = :UNIT_WORKER ; NUME[:UNIT_WORKER] = 19 - ENUM[20] = :UNIT_CAGEE ; NUME[:UNIT_CAGEE] = 20 - ENUM[21] = :UNIT_BEATEE ; NUME[:UNIT_BEATEE] = 21 - ENUM[22] = :UNIT_FOODRECEIVER ; NUME[:UNIT_FOODRECEIVER] = 22 - ENUM[23] = :UNIT_KIDNAPEE ; NUME[:UNIT_KIDNAPEE] = 23 - ENUM[24] = :UNIT_PATIENT ; NUME[:UNIT_PATIENT] = 24 - ENUM[25] = :UNIT_INFANT ; NUME[:UNIT_INFANT] = 25 - ENUM[26] = :UNIT_SLAUGHTEREE ; NUME[:UNIT_SLAUGHTEREE] = 26 - ENUM[27] = :UNIT_SHEAREE ; NUME[:UNIT_SHEAREE] = 27 - ENUM[28] = :UNIT_SUCKEE ; NUME[:UNIT_SUCKEE] = 28 - ENUM[29] = :UNIT_REPORTEE ; NUME[:UNIT_REPORTEE] = 29 - ENUM[30] = :BUILDING ; NUME[:BUILDING] = 30 - ENUM[31] = :BUILDING_CIVZONE_ASSIGNED ; NUME[:BUILDING_CIVZONE_ASSIGNED] = 31 - ENUM[32] = :BUILDING_TRIGGER ; NUME[:BUILDING_TRIGGER] = 32 - ENUM[33] = :BUILDING_TRIGGERTARGET ; NUME[:BUILDING_TRIGGERTARGET] = 33 - ENUM[34] = :BUILDING_CHAIN ; NUME[:BUILDING_CHAIN] = 34 - ENUM[35] = :BUILDING_CAGED ; NUME[:BUILDING_CAGED] = 35 - ENUM[36] = :BUILDING_HOLDER ; NUME[:BUILDING_HOLDER] = 36 - ENUM[37] = :BUILDING_WELL_TAG ; NUME[:BUILDING_WELL_TAG] = 37 - ENUM[38] = :BUILDING_USE_TARGET_1 ; NUME[:BUILDING_USE_TARGET_1] = 38 - ENUM[39] = :BUILDING_USE_TARGET_2 ; NUME[:BUILDING_USE_TARGET_2] = 39 - ENUM[40] = :BUILDING_DESTINATION ; NUME[:BUILDING_DESTINATION] = 40 - ENUM[41] = :BUILDING_NEST_BOX ; NUME[:BUILDING_NEST_BOX] = 41 - ENUM[42] = :ENTITY ; NUME[:ENTITY] = 42 - ENUM[43] = :ENTITY_STOLEN ; NUME[:ENTITY_STOLEN] = 43 - ENUM[44] = :ENTITY_OFFERED ; NUME[:ENTITY_OFFERED] = 44 - ENUM[45] = :ENTITY_ITEMOWNER ; NUME[:ENTITY_ITEMOWNER] = 45 - ENUM[46] = :LOCATION ; NUME[:LOCATION] = 46 - ENUM[47] = :INTERACTION ; NUME[:INTERACTION] = 47 - ENUM[48] = :ABSTRACT_BUILDING ; NUME[:ABSTRACT_BUILDING] = 48 - ENUM[49] = :HISTORICAL_EVENT ; NUME[:HISTORICAL_EVENT] = 49 - ENUM[50] = :SPHERE ; NUME[:SPHERE] = 50 - ENUM[51] = :SITE ; NUME[:SITE] = 51 - ENUM[52] = :SUBREGION ; NUME[:SUBREGION] = 52 - ENUM[53] = :FEATURE_LAYER ; NUME[:FEATURE_LAYER] = 53 - ENUM[54] = :HISTORICAL_FIGURE ; NUME[:HISTORICAL_FIGURE] = 54 - ENUM[55] = :ENTITY_POP ; NUME[:ENTITY_POP] = 55 - ENUM[56] = :CREATURE ; NUME[:CREATURE] = 56 - ENUM[57] = :UNIT_RIDER ; NUME[:UNIT_RIDER] = 57 -end - -class GeoLayerType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - Flag = Hash.new - ENUM[0] = :SOIL ; NUME[:SOIL] = 0 - ENUM[1] = :SEDIMENTARY ; NUME[:SEDIMENTARY] = 1 - ENUM[2] = :METAMORPHIC ; NUME[:METAMORPHIC] = 2 - ENUM[3] = :IGNEOUS_EXTRUSIVE ; NUME[:IGNEOUS_EXTRUSIVE] = 3 - ENUM[4] = :IGNEOUS_INTRUSIVE ; NUME[:IGNEOUS_INTRUSIVE] = 4 - ENUM[5] = :SOIL_OCEAN ; NUME[:SOIL_OCEAN] = 5 - ENUM[6] = :SOIL_SAND ; NUME[:SOIL_SAND] = 6 - ENUM[7] = :SEDIMENTARY_OCEAN_SHALLOW ; NUME[:SEDIMENTARY_OCEAN_SHALLOW] = 7 - ENUM[8] = :SEDIMENTARY_OCEAN_DEEP ; NUME[:SEDIMENTARY_OCEAN_DEEP] = 8 -end - -class GhostType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :MurderousGhost ; NUME[:MurderousGhost] = 0 - ENUM[1] = :SadisticGhost ; NUME[:SadisticGhost] = 1 - ENUM[2] = :SecretivePoltergeist ; NUME[:SecretivePoltergeist] = 2 - ENUM[3] = :EnergeticPoltergeist ; NUME[:EnergeticPoltergeist] = 3 - ENUM[4] = :AngryGhost ; NUME[:AngryGhost] = 4 - ENUM[5] = :ViolentGhost ; NUME[:ViolentGhost] = 5 - ENUM[6] = :MoaningSpirit ; NUME[:MoaningSpirit] = 6 - ENUM[7] = :HowlingSpirit ; NUME[:HowlingSpirit] = 7 - ENUM[8] = :TroublesomePoltergeist ; NUME[:TroublesomePoltergeist] = 8 - ENUM[9] = :RestlessHaunt ; NUME[:RestlessHaunt] = 9 - ENUM[10] = :ForlornHaunt ; NUME[:ForlornHaunt] = 10 -end - -class GlovesFlags < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :METAL_ARMOR_LEVELS ; NUME[:METAL_ARMOR_LEVELS] = 0 -end - -class GuildId < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :Miners ; NUME[:Miners] = 0 - ENUM[1] = :Carpenters ; NUME[:Carpenters] = 1 - ENUM[2] = :Masons ; NUME[:Masons] = 2 - ENUM[3] = :Metalsmiths ; NUME[:Metalsmiths] = 3 - ENUM[4] = :Jewelers ; NUME[:Jewelers] = 4 - ENUM[5] = :Craftsmen ; NUME[:Craftsmen] = 5 -end - -class HelmFlags < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :METAL_ARMOR_LEVELS ; NUME[:METAL_ARMOR_LEVELS] = 0 -end - -class HistfigEntityLinkType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :MEMBER ; NUME[:MEMBER] = 0 - ENUM[1] = :FORMER_MEMBER ; NUME[:FORMER_MEMBER] = 1 - ENUM[2] = :MERCENARY ; NUME[:MERCENARY] = 2 - ENUM[3] = :FORMER_MERCENARY ; NUME[:FORMER_MERCENARY] = 3 - ENUM[4] = :SLAVE ; NUME[:SLAVE] = 4 - ENUM[5] = :FORMER_SLAVE ; NUME[:FORMER_SLAVE] = 5 - ENUM[6] = :PRISONER ; NUME[:PRISONER] = 6 - ENUM[7] = :FORMER_PRISONER ; NUME[:FORMER_PRISONER] = 7 - ENUM[8] = :ENEMY ; NUME[:ENEMY] = 8 - ENUM[9] = :CRIMINAL ; NUME[:CRIMINAL] = 9 - ENUM[10] = :POSITION ; NUME[:POSITION] = 10 - ENUM[11] = :HERO ; NUME[:HERO] = 11 - ENUM[12] = :FORMER_POSITION ; NUME[:FORMER_POSITION] = 12 -end - -class HistfigHfLinkType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :MOTHER ; NUME[:MOTHER] = 0 - ENUM[1] = :FATHER ; NUME[:FATHER] = 1 - ENUM[2] = :SPOUSE ; NUME[:SPOUSE] = 2 - ENUM[3] = :CHILD ; NUME[:CHILD] = 3 - ENUM[4] = :DEITY ; NUME[:DEITY] = 4 - ENUM[5] = :LOVER ; NUME[:LOVER] = 5 - ENUM[6] = :PRISONER ; NUME[:PRISONER] = 6 - ENUM[7] = :IMPRISONER ; NUME[:IMPRISONER] = 7 - ENUM[8] = :MASTER ; NUME[:MASTER] = 8 - ENUM[9] = :APPRENTICE ; NUME[:APPRENTICE] = 9 -end - -class HistfigSiteLinkType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :SHOPKEEPER ; NUME[:SHOPKEEPER] = 0 - ENUM[1] = :SEAT_OF_POWER ; NUME[:SEAT_OF_POWER] = 1 - ENUM[2] = :HANGOUT ; NUME[:HANGOUT] = 2 - ENUM[3] = :HOME_SITE_ABSTRACT_BUILDING ; NUME[:HOME_SITE_ABSTRACT_BUILDING] = 3 - ENUM[4] = :HOME_SITE_REALIZATION_BUILDING ; NUME[:HOME_SITE_REALIZATION_BUILDING] = 4 - ENUM[5] = :LAIR ; NUME[:LAIR] = 5 - ENUM[6] = :HOME_SITE_REALIZATION_SUL ; NUME[:HOME_SITE_REALIZATION_SUL] = 6 -end - -class HistoryEventCollectionType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :WAR ; NUME[:WAR] = 0 - ENUM[1] = :BATTLE ; NUME[:BATTLE] = 1 - ENUM[2] = :DUEL ; NUME[:DUEL] = 2 - ENUM[3] = :SITE_CONQUERED ; NUME[:SITE_CONQUERED] = 3 - ENUM[4] = :ABDUCTION ; NUME[:ABDUCTION] = 4 - ENUM[5] = :THEFT ; NUME[:THEFT] = 5 - ENUM[6] = :BEAST_ATTACK ; NUME[:BEAST_ATTACK] = 6 - ENUM[7] = :JOURNEY ; NUME[:JOURNEY] = 7 -end - -class HistoryEventType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :WAR_ATTACKED_SITE ; NUME[:WAR_ATTACKED_SITE] = 0 - ENUM[1] = :WAR_DESTROYED_SITE ; NUME[:WAR_DESTROYED_SITE] = 1 - ENUM[2] = :CREATED_SITE ; NUME[:CREATED_SITE] = 2 - ENUM[3] = :HIST_FIGURE_DIED ; NUME[:HIST_FIGURE_DIED] = 3 - ENUM[4] = :ADD_HF_ENTITY_LINK ; NUME[:ADD_HF_ENTITY_LINK] = 4 - ENUM[5] = :REMOVE_HF_ENTITY_LINK ; NUME[:REMOVE_HF_ENTITY_LINK] = 5 - ENUM[6] = :FIRST_CONTACT ; NUME[:FIRST_CONTACT] = 6 - ENUM[7] = :FIRST_CONTACT_FAILED ; NUME[:FIRST_CONTACT_FAILED] = 7 - ENUM[8] = :TOPICAGREEMENT_CONCLUDED ; NUME[:TOPICAGREEMENT_CONCLUDED] = 8 - ENUM[9] = :TOPICAGREEMENT_REJECTED ; NUME[:TOPICAGREEMENT_REJECTED] = 9 - ENUM[10] = :TOPICAGREEMENT_MADE ; NUME[:TOPICAGREEMENT_MADE] = 10 - ENUM[11] = :WAR_PEACE_ACCEPTED ; NUME[:WAR_PEACE_ACCEPTED] = 11 - ENUM[12] = :WAR_PEACE_REJECTED ; NUME[:WAR_PEACE_REJECTED] = 12 - ENUM[13] = :DIPLOMAT_LOST ; NUME[:DIPLOMAT_LOST] = 13 - ENUM[14] = :AGREEMENTS_VOIDED ; NUME[:AGREEMENTS_VOIDED] = 14 - ENUM[15] = :MERCHANT ; NUME[:MERCHANT] = 15 - ENUM[16] = :ARTIFACT_HIDDEN ; NUME[:ARTIFACT_HIDDEN] = 16 - ENUM[17] = :ARTIFACT_POSSESSED ; NUME[:ARTIFACT_POSSESSED] = 17 - ENUM[18] = :ARTIFACT_CREATED ; NUME[:ARTIFACT_CREATED] = 18 - ENUM[19] = :ARTIFACT_LOST ; NUME[:ARTIFACT_LOST] = 19 - ENUM[20] = :ARTIFACT_FOUND ; NUME[:ARTIFACT_FOUND] = 20 - ENUM[21] = :ARTIFACT_RECOVERED ; NUME[:ARTIFACT_RECOVERED] = 21 - ENUM[22] = :ARTIFACT_DROPPED ; NUME[:ARTIFACT_DROPPED] = 22 - ENUM[23] = :RECLAIM_SITE ; NUME[:RECLAIM_SITE] = 23 - ENUM[24] = :HF_DESTROYED_SITE ; NUME[:HF_DESTROYED_SITE] = 24 - ENUM[25] = :SITE_DIED ; NUME[:SITE_DIED] = 25 - ENUM[26] = :SITE_ABANDONED ; NUME[:SITE_ABANDONED] = 26 - ENUM[27] = :ENTITY_CREATED ; NUME[:ENTITY_CREATED] = 27 - ENUM[28] = :ENTITY_ACTION ; NUME[:ENTITY_ACTION] = 28 - ENUM[29] = :ENTITY_INCORPORATED ; NUME[:ENTITY_INCORPORATED] = 29 - ENUM[30] = :CREATED_BUILDING ; NUME[:CREATED_BUILDING] = 30 - ENUM[31] = :REPLACED_BUILDING ; NUME[:REPLACED_BUILDING] = 31 - ENUM[32] = :ADD_HF_SITE_LINK ; NUME[:ADD_HF_SITE_LINK] = 32 - ENUM[33] = :REMOVE_HF_SITE_LINK ; NUME[:REMOVE_HF_SITE_LINK] = 33 - ENUM[34] = :ADD_HF_HF_LINK ; NUME[:ADD_HF_HF_LINK] = 34 - ENUM[35] = :REMOVE_HF_HF_LINK ; NUME[:REMOVE_HF_HF_LINK] = 35 - ENUM[36] = :ENTITY_RAZED_BUILDING ; NUME[:ENTITY_RAZED_BUILDING] = 36 - ENUM[37] = :MASTERPIECE_CREATED_ARCH_DESIGN ; NUME[:MASTERPIECE_CREATED_ARCH_DESIGN] = 37 - ENUM[38] = :MASTERPIECE_CREATED_ARCH_CONSTRUCT ; NUME[:MASTERPIECE_CREATED_ARCH_CONSTRUCT] = 38 - ENUM[39] = :MASTERPIECE_CREATED_ITEM ; NUME[:MASTERPIECE_CREATED_ITEM] = 39 - ENUM[40] = :MASTERPIECE_CREATED_DYE_ITEM ; NUME[:MASTERPIECE_CREATED_DYE_ITEM] = 40 - ENUM[41] = :MASTERPIECE_CREATED_ITEM_IMPROVEMENT ; NUME[:MASTERPIECE_CREATED_ITEM_IMPROVEMENT] = 41 - ENUM[42] = :MASTERPIECE_CREATED_FOOD ; NUME[:MASTERPIECE_CREATED_FOOD] = 42 - ENUM[43] = :MASTERPIECE_CREATED_ENGRAVING ; NUME[:MASTERPIECE_CREATED_ENGRAVING] = 43 - ENUM[44] = :MASTERPIECE_LOST ; NUME[:MASTERPIECE_LOST] = 44 - ENUM[45] = :CHANGE_HF_STATE ; NUME[:CHANGE_HF_STATE] = 45 - ENUM[46] = :CHANGE_HF_JOB ; NUME[:CHANGE_HF_JOB] = 46 - ENUM[47] = :WAR_FIELD_BATTLE ; NUME[:WAR_FIELD_BATTLE] = 47 - ENUM[48] = :WAR_PLUNDERED_SITE ; NUME[:WAR_PLUNDERED_SITE] = 48 - ENUM[49] = :WAR_SITE_NEW_LEADER ; NUME[:WAR_SITE_NEW_LEADER] = 49 - ENUM[50] = :WAR_SITE_TRIBUTE_FORCED ; NUME[:WAR_SITE_TRIBUTE_FORCED] = 50 - ENUM[51] = :WAR_SITE_TAKEN_OVER ; NUME[:WAR_SITE_TAKEN_OVER] = 51 - ENUM[52] = :BODY_ABUSED ; NUME[:BODY_ABUSED] = 52 - ENUM[53] = :HIST_FIGURE_ABDUCTED ; NUME[:HIST_FIGURE_ABDUCTED] = 53 - ENUM[54] = :ITEM_STOLEN ; NUME[:ITEM_STOLEN] = 54 - ENUM[55] = :HF_RAZED_BUILDING ; NUME[:HF_RAZED_BUILDING] = 55 - ENUM[56] = :CREATURE_DEVOURED ; NUME[:CREATURE_DEVOURED] = 56 - ENUM[57] = :HIST_FIGURE_WOUNDED ; NUME[:HIST_FIGURE_WOUNDED] = 57 - ENUM[58] = :HIST_FIGURE_SIMPLE_BATTLE_EVENT ; NUME[:HIST_FIGURE_SIMPLE_BATTLE_EVENT] = 58 - ENUM[59] = :CREATED_WORLD_CONSTRUCTION ; NUME[:CREATED_WORLD_CONSTRUCTION] = 59 - ENUM[60] = :HIST_FIGURE_REUNION ; NUME[:HIST_FIGURE_REUNION] = 60 - ENUM[61] = :HIST_FIGURE_REACH_SUMMIT ; NUME[:HIST_FIGURE_REACH_SUMMIT] = 61 - ENUM[62] = :HIST_FIGURE_TRAVEL ; NUME[:HIST_FIGURE_TRAVEL] = 62 - ENUM[63] = :HIST_FIGURE_NEW_PET ; NUME[:HIST_FIGURE_NEW_PET] = 63 - ENUM[64] = :ASSUME_IDENTITY ; NUME[:ASSUME_IDENTITY] = 64 - ENUM[65] = :CREATE_ENTITY_POSITION ; NUME[:CREATE_ENTITY_POSITION] = 65 - ENUM[66] = :CHANGE_CREATURE_TYPE ; NUME[:CHANGE_CREATURE_TYPE] = 66 - ENUM[67] = :HIST_FIGURE_REVIVED ; NUME[:HIST_FIGURE_REVIVED] = 67 - ENUM[68] = :HF_LEARNS_SECRET ; NUME[:HF_LEARNS_SECRET] = 68 - ENUM[69] = :CHANGE_HF_BODY_STATE ; NUME[:CHANGE_HF_BODY_STATE] = 69 - ENUM[70] = :HF_ACT_ON_BUILDING ; NUME[:HF_ACT_ON_BUILDING] = 70 - ENUM[71] = :HF_DOES_INTERACTION ; NUME[:HF_DOES_INTERACTION] = 71 - ENUM[72] = :HF_CONFRONTED ; NUME[:HF_CONFRONTED] = 72 - ENUM[73] = :ENTITY_LAW ; NUME[:ENTITY_LAW] = 73 - ENUM[74] = :HF_GAINS_SECRET_GOAL ; NUME[:HF_GAINS_SECRET_GOAL] = 74 - ENUM[75] = :ARTIFACT_STORED ; NUME[:ARTIFACT_STORED] = 75 -end - -class ImprovementType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :ART_IMAGE ; NUME[:ART_IMAGE] = 0 - ENUM[1] = :COVERED ; NUME[:COVERED] = 1 - ENUM[2] = :RINGS_HANGING ; NUME[:RINGS_HANGING] = 2 - ENUM[3] = :BANDS ; NUME[:BANDS] = 3 - ENUM[4] = :SPIKES ; NUME[:SPIKES] = 4 - ENUM[5] = :ITEMSPECIFIC ; NUME[:ITEMSPECIFIC] = 5 - ENUM[6] = :THREAD ; NUME[:THREAD] = 6 - ENUM[7] = :CLOTH ; NUME[:CLOTH] = 7 - ENUM[8] = :SEWN_IMAGE ; NUME[:SEWN_IMAGE] = 8 - ENUM[9] = :PAGES ; NUME[:PAGES] = 9 - ENUM[10] = :ILLUSTRATION ; NUME[:ILLUSTRATION] = 10 -end - -class InclusionType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[1] = :VEIN ; NUME[:VEIN] = 1 - ENUM[2] = :CLUSTER ; NUME[:CLUSTER] = 2 - ENUM[3] = :CLUSTER_SMALL ; NUME[:CLUSTER_SMALL] = 3 - ENUM[4] = :CLUSTER_ONE ; NUME[:CLUSTER_ONE] = 4 -end - -class InitDisplayFlags < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :USE_GRAPHICS ; NUME[:USE_GRAPHICS] = 0 - ENUM[1] = :BLACK_SPACE ; NUME[:BLACK_SPACE] = 1 - ENUM[2] = :PARTIAL_PRINT ; NUME[:PARTIAL_PRINT] = 2 - ENUM[3] = :FRAME_BUFFER ; NUME[:FRAME_BUFFER] = 3 - ENUM[4] = :SINGLE_BUFFER ; NUME[:SINGLE_BUFFER] = 4 - ENUM[5] = :ACCUM_BUFFER ; NUME[:ACCUM_BUFFER] = 5 - ENUM[6] = :VBO ; NUME[:VBO] = 6 - ENUM[7] = :RENDER_2D ; NUME[:RENDER_2D] = 7 - ENUM[8] = :RENDER_2DHW ; NUME[:RENDER_2DHW] = 8 - ENUM[9] = :RENDER_2DASYNC ; NUME[:RENDER_2DASYNC] = 9 - ENUM[10] = :UNUSED_01_08 ; NUME[:UNUSED_01_08] = 10 - ENUM[11] = :TEXT ; NUME[:TEXT] = 11 - ENUM[12] = :SHADER ; NUME[:SHADER] = 12 - ENUM[13] = :NOT_RESIZABLE ; NUME[:NOT_RESIZABLE] = 13 - ENUM[14] = :ARB_SYNC ; NUME[:ARB_SYNC] = 14 -end - -class InitInputFlags < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :MOUSE_OFF ; NUME[:MOUSE_OFF] = 0 - ENUM[1] = :MOUSE_PICTURE ; NUME[:MOUSE_PICTURE] = 1 -end - -class InitMediaFlags < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :SOUND_OFF ; NUME[:SOUND_OFF] = 0 - ENUM[1] = :INTRO_OFF ; NUME[:INTRO_OFF] = 1 - ENUM[2] = :COMPRESS_SAVES ; NUME[:COMPRESS_SAVES] = 2 -end - -class InitWindowFlags < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :TOPMOST ; NUME[:TOPMOST] = 0 - ENUM[1] = :VSYNC_ON ; NUME[:VSYNC_ON] = 1 - ENUM[2] = :VSYNC_OFF ; NUME[:VSYNC_OFF] = 2 - ENUM[3] = :TEXTURE_LINEAR ; NUME[:TEXTURE_LINEAR] = 3 -end - -class InorganicFlags < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :LAVA ; NUME[:LAVA] = 0 - ENUM[1] = :GENERATED ; NUME[:GENERATED] = 1 - ENUM[2] = :ENVIRONMENT_NON_SOIL_OCEAN ; NUME[:ENVIRONMENT_NON_SOIL_OCEAN] = 2 - ENUM[3] = :SEDIMENTARY ; NUME[:SEDIMENTARY] = 3 - ENUM[4] = :SEDIMENTARY_OCEAN_SHALLOW ; NUME[:SEDIMENTARY_OCEAN_SHALLOW] = 4 - ENUM[5] = :IGNEOUS_INTRUSIVE ; NUME[:IGNEOUS_INTRUSIVE] = 5 - ENUM[6] = :IGNEOUS_EXTRUSIVE ; NUME[:IGNEOUS_EXTRUSIVE] = 6 - ENUM[7] = :METAMORPHIC ; NUME[:METAMORPHIC] = 7 - ENUM[8] = :DEEP_SURFACE ; NUME[:DEEP_SURFACE] = 8 - ENUM[9] = :METAL_ORE ; NUME[:METAL_ORE] = 9 - ENUM[10] = :AQUIFER ; NUME[:AQUIFER] = 10 - ENUM[11] = :SOIL_ANY ; NUME[:SOIL_ANY] = 11 - ENUM[12] = :SOIL_OCEAN ; NUME[:SOIL_OCEAN] = 12 - ENUM[13] = :SOIL_SAND ; NUME[:SOIL_SAND] = 13 - ENUM[14] = :SEDIMENTARY_OCEAN_DEEP ; NUME[:SEDIMENTARY_OCEAN_DEEP] = 14 - ENUM[15] = :THREAD_METAL ; NUME[:THREAD_METAL] = 15 - ENUM[16] = :SPECIAL ; NUME[:SPECIAL] = 16 - ENUM[17] = :SOIL ; NUME[:SOIL] = 17 - ENUM[18] = :DEEP_SPECIAL ; NUME[:DEEP_SPECIAL] = 18 - ENUM[25] = :WAFERS ; NUME[:WAFERS] = 25 -end - -class InstrumentFlags < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :HARD_MAT ; NUME[:HARD_MAT] = 0 -end - -class InterfaceBreakdownTypes < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :NONE ; NUME[:NONE] = 0 - ENUM[1] = :QUIT ; NUME[:QUIT] = 1 - ENUM[2] = :STOPSCREEN ; NUME[:STOPSCREEN] = 2 - ENUM[3] = :TOFIRST ; NUME[:TOFIRST] = 3 -end - -class ItemQuality < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :Ordinary ; NUME[:Ordinary] = 0 - ENUM[1] = :WellCrafted ; NUME[:WellCrafted] = 1 - ENUM[2] = :FinelyCrafted ; NUME[:FinelyCrafted] = 2 - ENUM[3] = :Superior ; NUME[:Superior] = 3 - ENUM[4] = :Exceptional ; NUME[:Exceptional] = 4 - ENUM[5] = :Masterful ; NUME[:Masterful] = 5 - ENUM[6] = :Artifact ; NUME[:Artifact] = 6 -end - -class ItemType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[-1] = :NONE ; NUME[:NONE] = -1 - ENUM[0] = :BAR ; NUME[:BAR] = 0 - ENUM[1] = :SMALLGEM ; NUME[:SMALLGEM] = 1 - ENUM[2] = :BLOCKS ; NUME[:BLOCKS] = 2 - ENUM[3] = :ROUGH ; NUME[:ROUGH] = 3 - ENUM[4] = :BOULDER ; NUME[:BOULDER] = 4 - ENUM[5] = :WOOD ; NUME[:WOOD] = 5 - ENUM[6] = :DOOR ; NUME[:DOOR] = 6 - ENUM[7] = :FLOODGATE ; NUME[:FLOODGATE] = 7 - ENUM[8] = :BED ; NUME[:BED] = 8 - ENUM[9] = :CHAIR ; NUME[:CHAIR] = 9 - ENUM[10] = :CHAIN ; NUME[:CHAIN] = 10 - ENUM[11] = :FLASK ; NUME[:FLASK] = 11 - ENUM[12] = :GOBLET ; NUME[:GOBLET] = 12 - ENUM[13] = :INSTRUMENT ; NUME[:INSTRUMENT] = 13 - ENUM[14] = :TOY ; NUME[:TOY] = 14 - ENUM[15] = :WINDOW ; NUME[:WINDOW] = 15 - ENUM[16] = :CAGE ; NUME[:CAGE] = 16 - ENUM[17] = :BARREL ; NUME[:BARREL] = 17 - ENUM[18] = :BUCKET ; NUME[:BUCKET] = 18 - ENUM[19] = :ANIMALTRAP ; NUME[:ANIMALTRAP] = 19 - ENUM[20] = :TABLE ; NUME[:TABLE] = 20 - ENUM[21] = :COFFIN ; NUME[:COFFIN] = 21 - ENUM[22] = :STATUE ; NUME[:STATUE] = 22 - ENUM[23] = :CORPSE ; NUME[:CORPSE] = 23 - ENUM[24] = :WEAPON ; NUME[:WEAPON] = 24 - ENUM[25] = :ARMOR ; NUME[:ARMOR] = 25 - ENUM[26] = :SHOES ; NUME[:SHOES] = 26 - ENUM[27] = :SHIELD ; NUME[:SHIELD] = 27 - ENUM[28] = :HELM ; NUME[:HELM] = 28 - ENUM[29] = :GLOVES ; NUME[:GLOVES] = 29 - ENUM[30] = :BOX ; NUME[:BOX] = 30 - ENUM[31] = :BIN ; NUME[:BIN] = 31 - ENUM[32] = :ARMORSTAND ; NUME[:ARMORSTAND] = 32 - ENUM[33] = :WEAPONRACK ; NUME[:WEAPONRACK] = 33 - ENUM[34] = :CABINET ; NUME[:CABINET] = 34 - ENUM[35] = :FIGURINE ; NUME[:FIGURINE] = 35 - ENUM[36] = :AMULET ; NUME[:AMULET] = 36 - ENUM[37] = :SCEPTER ; NUME[:SCEPTER] = 37 - ENUM[38] = :AMMO ; NUME[:AMMO] = 38 - ENUM[39] = :CROWN ; NUME[:CROWN] = 39 - ENUM[40] = :RING ; NUME[:RING] = 40 - ENUM[41] = :EARRING ; NUME[:EARRING] = 41 - ENUM[42] = :BRACELET ; NUME[:BRACELET] = 42 - ENUM[43] = :GEM ; NUME[:GEM] = 43 - ENUM[44] = :ANVIL ; NUME[:ANVIL] = 44 - ENUM[45] = :CORPSEPIECE ; NUME[:CORPSEPIECE] = 45 - ENUM[46] = :REMAINS ; NUME[:REMAINS] = 46 - ENUM[47] = :MEAT ; NUME[:MEAT] = 47 - ENUM[48] = :FISH ; NUME[:FISH] = 48 - ENUM[49] = :FISH_RAW ; NUME[:FISH_RAW] = 49 - ENUM[50] = :VERMIN ; NUME[:VERMIN] = 50 - ENUM[51] = :PET ; NUME[:PET] = 51 - ENUM[52] = :SEEDS ; NUME[:SEEDS] = 52 - ENUM[53] = :PLANT ; NUME[:PLANT] = 53 - ENUM[54] = :SKIN_TANNED ; NUME[:SKIN_TANNED] = 54 - ENUM[55] = :LEAVES ; NUME[:LEAVES] = 55 - ENUM[56] = :THREAD ; NUME[:THREAD] = 56 - ENUM[57] = :CLOTH ; NUME[:CLOTH] = 57 - ENUM[58] = :TOTEM ; NUME[:TOTEM] = 58 - ENUM[59] = :PANTS ; NUME[:PANTS] = 59 - ENUM[60] = :BACKPACK ; NUME[:BACKPACK] = 60 - ENUM[61] = :QUIVER ; NUME[:QUIVER] = 61 - ENUM[62] = :CATAPULTPARTS ; NUME[:CATAPULTPARTS] = 62 - ENUM[63] = :BALLISTAPARTS ; NUME[:BALLISTAPARTS] = 63 - ENUM[64] = :SIEGEAMMO ; NUME[:SIEGEAMMO] = 64 - ENUM[65] = :BALLISTAARROWHEAD ; NUME[:BALLISTAARROWHEAD] = 65 - ENUM[66] = :TRAPPARTS ; NUME[:TRAPPARTS] = 66 - ENUM[67] = :TRAPCOMP ; NUME[:TRAPCOMP] = 67 - ENUM[68] = :DRINK ; NUME[:DRINK] = 68 - ENUM[69] = :POWDER_MISC ; NUME[:POWDER_MISC] = 69 - ENUM[70] = :CHEESE ; NUME[:CHEESE] = 70 - ENUM[71] = :FOOD ; NUME[:FOOD] = 71 - ENUM[72] = :LIQUID_MISC ; NUME[:LIQUID_MISC] = 72 - ENUM[73] = :COIN ; NUME[:COIN] = 73 - ENUM[74] = :GLOB ; NUME[:GLOB] = 74 - ENUM[75] = :ROCK ; NUME[:ROCK] = 75 - ENUM[76] = :PIPE_SECTION ; NUME[:PIPE_SECTION] = 76 - ENUM[77] = :HATCH_COVER ; NUME[:HATCH_COVER] = 77 - ENUM[78] = :GRATE ; NUME[:GRATE] = 78 - ENUM[79] = :QUERN ; NUME[:QUERN] = 79 - ENUM[80] = :MILLSTONE ; NUME[:MILLSTONE] = 80 - ENUM[81] = :SPLINT ; NUME[:SPLINT] = 81 - ENUM[82] = :CRUTCH ; NUME[:CRUTCH] = 82 - ENUM[83] = :TRACTION_BENCH ; NUME[:TRACTION_BENCH] = 83 - ENUM[84] = :ORTHOPEDIC_CAST ; NUME[:ORTHOPEDIC_CAST] = 84 - ENUM[85] = :TOOL ; NUME[:TOOL] = 85 - ENUM[86] = :SLAB ; NUME[:SLAB] = 86 - ENUM[87] = :EGG ; NUME[:EGG] = 87 - ENUM[88] = :BOOK ; NUME[:BOOK] = 88 -end - -class ItemsOtherId < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - Item = Hash.new(:NONE) - GenericItem = Hash.new { |h, k| h[k] = [] } - ENUM[-1] = :ANY ; NUME[:ANY] = -1 - ENUM[0] = :ANY_FREE ; NUME[:ANY_FREE] = 0 - ENUM[1] = :ANY_ARTIFACT ; NUME[:ANY_ARTIFACT] = 1 - ENUM[2] = :WEAPON ; NUME[:WEAPON] = 2 ; Item[:WEAPON] = :WEAPON - ENUM[3] = :ANY_WEAPON ; NUME[:ANY_WEAPON] = 3 ; GenericItem[:ANY_WEAPON] << :WEAPON ; GenericItem[:ANY_WEAPON] << :TRAPCOMP - ENUM[4] = :ANY_SPIKE ; NUME[:ANY_SPIKE] = 4 ; GenericItem[:ANY_SPIKE] << :WEAPON ; GenericItem[:ANY_SPIKE] << :TRAPCOMP - ENUM[5] = :ANY_TRUE_ARMOR ; NUME[:ANY_TRUE_ARMOR] = 5 ; GenericItem[:ANY_TRUE_ARMOR] << :ARMOR - ENUM[6] = :ANY_ARMOR_HELM ; NUME[:ANY_ARMOR_HELM] = 6 ; GenericItem[:ANY_ARMOR_HELM] << :HELM - ENUM[7] = :ANY_ARMOR_SHOES ; NUME[:ANY_ARMOR_SHOES] = 7 ; GenericItem[:ANY_ARMOR_SHOES] << :SHOES - ENUM[8] = :SHIELD ; NUME[:SHIELD] = 8 ; Item[:SHIELD] = :SHIELD - ENUM[9] = :ANY_ARMOR_GLOVES ; NUME[:ANY_ARMOR_GLOVES] = 9 ; GenericItem[:ANY_ARMOR_GLOVES] << :GLOVES - ENUM[10] = :ANY_ARMOR_PANTS ; NUME[:ANY_ARMOR_PANTS] = 10 ; GenericItem[:ANY_ARMOR_PANTS] << :PANTS - ENUM[11] = :QUIVER ; NUME[:QUIVER] = 11 ; Item[:QUIVER] = :QUIVER - ENUM[12] = :SPLINT ; NUME[:SPLINT] = 12 ; Item[:SPLINT] = :SPLINT - ENUM[13] = :ORTHOPEDIC_CAST ; NUME[:ORTHOPEDIC_CAST] = 13 ; Item[:ORTHOPEDIC_CAST] = :ORTHOPEDIC_CAST - ENUM[14] = :CRUTCH ; NUME[:CRUTCH] = 14 ; Item[:CRUTCH] = :CRUTCH - ENUM[15] = :BACKPACK ; NUME[:BACKPACK] = 15 ; Item[:BACKPACK] = :BACKPACK - ENUM[16] = :AMMO ; NUME[:AMMO] = 16 ; Item[:AMMO] = :AMMO - ENUM[17] = :WOOD ; NUME[:WOOD] = 17 ; Item[:WOOD] = :WOOD - ENUM[18] = :BOULDER ; NUME[:BOULDER] = 18 ; Item[:BOULDER] = :BOULDER - ENUM[19] = :ROCK ; NUME[:ROCK] = 19 ; Item[:ROCK] = :ROCK - ENUM[20] = :ANY_REFUSE ; NUME[:ANY_REFUSE] = 20 ; GenericItem[:ANY_REFUSE] << :CORPSE ; GenericItem[:ANY_REFUSE] << :ARMOR ; GenericItem[:ANY_REFUSE] << :SHOES ; GenericItem[:ANY_REFUSE] << :HELM ; GenericItem[:ANY_REFUSE] << :GLOVES ; GenericItem[:ANY_REFUSE] << :CORPSEPIECE ; GenericItem[:ANY_REFUSE] << :REMAINS ; GenericItem[:ANY_REFUSE] << :PANTS ; GenericItem[:ANY_REFUSE] << :MEAT ; GenericItem[:ANY_REFUSE] << :FISH ; GenericItem[:ANY_REFUSE] << :FISH_RAW ; GenericItem[:ANY_REFUSE] << :SEEDS ; GenericItem[:ANY_REFUSE] << :PLANT ; GenericItem[:ANY_REFUSE] << :LEAVES ; GenericItem[:ANY_REFUSE] << :CHEESE ; GenericItem[:ANY_REFUSE] << :FOOD ; GenericItem[:ANY_REFUSE] << :EGG ; GenericItem[:ANY_REFUSE] << :GLOB - ENUM[21] = :ANY_GOOD_FOOD ; NUME[:ANY_GOOD_FOOD] = 21 ; GenericItem[:ANY_GOOD_FOOD] << :BOX ; GenericItem[:ANY_GOOD_FOOD] << :MEAT ; GenericItem[:ANY_GOOD_FOOD] << :FISH ; GenericItem[:ANY_GOOD_FOOD] << :FISH_RAW ; GenericItem[:ANY_GOOD_FOOD] << :SEEDS ; GenericItem[:ANY_GOOD_FOOD] << :PLANT ; GenericItem[:ANY_GOOD_FOOD] << :LEAVES ; GenericItem[:ANY_GOOD_FOOD] << :CHEESE ; GenericItem[:ANY_GOOD_FOOD] << :FOOD ; GenericItem[:ANY_GOOD_FOOD] << :EGG - ENUM[22] = :ANY_GENERIC22 ; NUME[:ANY_GENERIC22] = 22 ; GenericItem[:ANY_GENERIC22] << :DRINK ; GenericItem[:ANY_GENERIC22] << :POWDER_MISC ; GenericItem[:ANY_GENERIC22] << :LIQUID_MISC ; GenericItem[:ANY_GENERIC22] << :GLOB - ENUM[23] = :ANY_GENERIC23 ; NUME[:ANY_GENERIC23] = 23 ; GenericItem[:ANY_GENERIC23] << :CAGE ; GenericItem[:ANY_GENERIC23] << :ANIMALTRAP ; GenericItem[:ANY_GENERIC23] << :FISH_RAW ; GenericItem[:ANY_GENERIC23] << :VERMIN ; GenericItem[:ANY_GENERIC23] << :PLANT - ENUM[24] = :ANY_GENERIC24 ; NUME[:ANY_GENERIC24] = 24 ; GenericItem[:ANY_GENERIC24] << :CAGE ; GenericItem[:ANY_GENERIC24] << :ANIMALTRAP ; GenericItem[:ANY_GENERIC24] << :CORPSE ; GenericItem[:ANY_GENERIC24] << :CORPSEPIECE ; GenericItem[:ANY_GENERIC24] << :VERMIN - ENUM[25] = :ANY_FURNITURE ; NUME[:ANY_FURNITURE] = 25 - ENUM[26] = :ANY_CAGE_OR_TRAP ; NUME[:ANY_CAGE_OR_TRAP] = 26 ; GenericItem[:ANY_CAGE_OR_TRAP] << :CAGE ; GenericItem[:ANY_CAGE_OR_TRAP] << :ANIMALTRAP - ENUM[27] = :ANY_EDIBLE_RAW ; NUME[:ANY_EDIBLE_RAW] = 27 - ENUM[28] = :ANY_EDIBLE_MEAT ; NUME[:ANY_EDIBLE_MEAT] = 28 - ENUM[29] = :ANY_EDIBLE_CORPSE ; NUME[:ANY_EDIBLE_CORPSE] = 29 - ENUM[30] = :ANY_EDIBLE_VERMIN ; NUME[:ANY_EDIBLE_VERMIN] = 30 - ENUM[31] = :ANY_EDIBLE_VERMIN_BOX ; NUME[:ANY_EDIBLE_VERMIN_BOX] = 31 ; GenericItem[:ANY_EDIBLE_VERMIN_BOX] << :BARREL ; GenericItem[:ANY_EDIBLE_VERMIN_BOX] << :BOX - ENUM[32] = :ANY_CAN_ROT ; NUME[:ANY_CAN_ROT] = 32 ; GenericItem[:ANY_CAN_ROT] << :CORPSE ; GenericItem[:ANY_CAN_ROT] << :CORPSEPIECE ; GenericItem[:ANY_CAN_ROT] << :REMAINS ; GenericItem[:ANY_CAN_ROT] << :MEAT ; GenericItem[:ANY_CAN_ROT] << :FISH ; GenericItem[:ANY_CAN_ROT] << :FISH_RAW ; GenericItem[:ANY_CAN_ROT] << :SEEDS ; GenericItem[:ANY_CAN_ROT] << :PLANT ; GenericItem[:ANY_CAN_ROT] << :LEAVES ; GenericItem[:ANY_CAN_ROT] << :CHEESE ; GenericItem[:ANY_CAN_ROT] << :FOOD ; GenericItem[:ANY_CAN_ROT] << :EGG - ENUM[33] = :ANY_MURDERED ; NUME[:ANY_MURDERED] = 33 ; GenericItem[:ANY_MURDERED] << :CORPSE ; GenericItem[:ANY_MURDERED] << :CORPSEPIECE ; GenericItem[:ANY_MURDERED] << :REMAINS - ENUM[34] = :ANY_DEAD_DWARF ; NUME[:ANY_DEAD_DWARF] = 34 - ENUM[35] = :ANY_GENERIC35 ; NUME[:ANY_GENERIC35] = 35 ; GenericItem[:ANY_GENERIC35] << :BAR ; GenericItem[:ANY_GENERIC35] << :SMALLGEM ; GenericItem[:ANY_GENERIC35] << :BLOCKS ; GenericItem[:ANY_GENERIC35] << :ROUGH ; GenericItem[:ANY_GENERIC35] << :CHAIN ; GenericItem[:ANY_GENERIC35] << :FLASK ; GenericItem[:ANY_GENERIC35] << :GOBLET ; GenericItem[:ANY_GENERIC35] << :INSTRUMENT ; GenericItem[:ANY_GENERIC35] << :TOY ; GenericItem[:ANY_GENERIC35] << :FIGURINE ; GenericItem[:ANY_GENERIC35] << :AMULET ; GenericItem[:ANY_GENERIC35] << :SCEPTER ; GenericItem[:ANY_GENERIC35] << :AMMO ; GenericItem[:ANY_GENERIC35] << :CROWN ; GenericItem[:ANY_GENERIC35] << :RING ; GenericItem[:ANY_GENERIC35] << :EARRING ; GenericItem[:ANY_GENERIC35] << :BRACELET ; GenericItem[:ANY_GENERIC35] << :GEM ; GenericItem[:ANY_GENERIC35] << :SKIN_TANNED ; GenericItem[:ANY_GENERIC35] << :THREAD ; GenericItem[:ANY_GENERIC35] << :CLOTH ; GenericItem[:ANY_GENERIC35] << :TOTEM ; GenericItem[:ANY_GENERIC35] << :BACKPACK ; GenericItem[:ANY_GENERIC35] << :QUIVER ; GenericItem[:ANY_GENERIC35] << :BALLISTAARROWHEAD ; GenericItem[:ANY_GENERIC35] << :COIN ; GenericItem[:ANY_GENERIC35] << :SPLINT ; GenericItem[:ANY_GENERIC35] << :TOOL ; GenericItem[:ANY_GENERIC35] << :BOOK - ENUM[36] = :ANY_GENERIC36 ; NUME[:ANY_GENERIC36] = 36 ; GenericItem[:ANY_GENERIC36] << :ARMOR ; GenericItem[:ANY_GENERIC36] << :SHOES ; GenericItem[:ANY_GENERIC36] << :HELM ; GenericItem[:ANY_GENERIC36] << :GLOVES ; GenericItem[:ANY_GENERIC36] << :PANTS - ENUM[37] = :ANY_GENERIC37 ; NUME[:ANY_GENERIC37] = 37 ; GenericItem[:ANY_GENERIC37] << :WEAPON ; GenericItem[:ANY_GENERIC37] << :TRAPCOMP ; GenericItem[:ANY_GENERIC37] << :SIEGEAMMO - ENUM[38] = :ANY_GENERIC38 ; NUME[:ANY_GENERIC38] = 38 ; GenericItem[:ANY_GENERIC38] << :ARMOR ; GenericItem[:ANY_GENERIC38] << :SHOES ; GenericItem[:ANY_GENERIC38] << :SHIELD ; GenericItem[:ANY_GENERIC38] << :HELM ; GenericItem[:ANY_GENERIC38] << :GLOVES ; GenericItem[:ANY_GENERIC38] << :PANTS - ENUM[39] = :DOOR ; NUME[:DOOR] = 39 ; Item[:DOOR] = :DOOR - ENUM[40] = :FLOODGATE ; NUME[:FLOODGATE] = 40 ; Item[:FLOODGATE] = :FLOODGATE - ENUM[41] = :HATCH_COVER ; NUME[:HATCH_COVER] = 41 ; Item[:HATCH_COVER] = :HATCH_COVER - ENUM[42] = :GRATE ; NUME[:GRATE] = 42 ; Item[:GRATE] = :GRATE - ENUM[43] = :CAGE ; NUME[:CAGE] = 43 ; Item[:CAGE] = :CAGE - ENUM[44] = :FLASK ; NUME[:FLASK] = 44 ; Item[:FLASK] = :FLASK - ENUM[45] = :WINDOW ; NUME[:WINDOW] = 45 ; Item[:WINDOW] = :WINDOW - ENUM[46] = :GOBLET ; NUME[:GOBLET] = 46 ; Item[:GOBLET] = :GOBLET - ENUM[47] = :INSTRUMENT ; NUME[:INSTRUMENT] = 47 ; Item[:INSTRUMENT] = :INSTRUMENT - ENUM[48] = :TOY ; NUME[:TOY] = 48 ; Item[:TOY] = :TOY - ENUM[49] = :TOOL ; NUME[:TOOL] = 49 ; Item[:TOOL] = :TOOL - ENUM[50] = :BUCKET ; NUME[:BUCKET] = 50 ; Item[:BUCKET] = :BUCKET - ENUM[51] = :BARREL ; NUME[:BARREL] = 51 ; Item[:BARREL] = :BARREL - ENUM[52] = :CHAIN ; NUME[:CHAIN] = 52 ; Item[:CHAIN] = :CHAIN - ENUM[53] = :ANIMALTRAP ; NUME[:ANIMALTRAP] = 53 ; Item[:ANIMALTRAP] = :ANIMALTRAP - ENUM[54] = :BED ; NUME[:BED] = 54 ; Item[:BED] = :BED - ENUM[55] = :TRACTION_BENCH ; NUME[:TRACTION_BENCH] = 55 ; Item[:TRACTION_BENCH] = :TRACTION_BENCH - ENUM[56] = :CHAIR ; NUME[:CHAIR] = 56 ; Item[:CHAIR] = :CHAIR - ENUM[57] = :COFFIN ; NUME[:COFFIN] = 57 ; Item[:COFFIN] = :COFFIN - ENUM[58] = :TABLE ; NUME[:TABLE] = 58 ; Item[:TABLE] = :TABLE - ENUM[59] = :STATUE ; NUME[:STATUE] = 59 ; Item[:STATUE] = :STATUE - ENUM[60] = :SLAB ; NUME[:SLAB] = 60 ; Item[:SLAB] = :SLAB - ENUM[61] = :QUERN ; NUME[:QUERN] = 61 ; Item[:QUERN] = :QUERN - ENUM[62] = :MILLSTONE ; NUME[:MILLSTONE] = 62 ; Item[:MILLSTONE] = :MILLSTONE - ENUM[63] = :BOX ; NUME[:BOX] = 63 ; Item[:BOX] = :BOX - ENUM[64] = :BIN ; NUME[:BIN] = 64 ; Item[:BIN] = :BIN - ENUM[65] = :ARMORSTAND ; NUME[:ARMORSTAND] = 65 ; Item[:ARMORSTAND] = :ARMORSTAND - ENUM[66] = :WEAPONRACK ; NUME[:WEAPONRACK] = 66 ; Item[:WEAPONRACK] = :WEAPONRACK - ENUM[67] = :CABINET ; NUME[:CABINET] = 67 ; Item[:CABINET] = :CABINET - ENUM[68] = :ANVIL ; NUME[:ANVIL] = 68 ; Item[:ANVIL] = :ANVIL - ENUM[69] = :CATAPULTPARTS ; NUME[:CATAPULTPARTS] = 69 ; Item[:CATAPULTPARTS] = :CATAPULTPARTS - ENUM[70] = :BALLISTAPARTS ; NUME[:BALLISTAPARTS] = 70 ; Item[:BALLISTAPARTS] = :BALLISTAPARTS - ENUM[71] = :SIEGEAMMO ; NUME[:SIEGEAMMO] = 71 ; Item[:SIEGEAMMO] = :SIEGEAMMO - ENUM[72] = :TRAPPARTS ; NUME[:TRAPPARTS] = 72 ; Item[:TRAPPARTS] = :TRAPPARTS - ENUM[73] = :ANY_WEBS ; NUME[:ANY_WEBS] = 73 ; GenericItem[:ANY_WEBS] << :THREAD - ENUM[74] = :PIPE_SECTION ; NUME[:PIPE_SECTION] = 74 ; Item[:PIPE_SECTION] = :PIPE_SECTION - ENUM[75] = :ANY_ENCASED ; NUME[:ANY_ENCASED] = 75 - ENUM[76] = :ANY_IN_CONSTRUCTION ; NUME[:ANY_IN_CONSTRUCTION] = 76 - ENUM[77] = :DRINK ; NUME[:DRINK] = 77 ; Item[:DRINK] = :DRINK - ENUM[78] = :ANY_DRINK ; NUME[:ANY_DRINK] = 78 ; GenericItem[:ANY_DRINK] << :DRINK - ENUM[79] = :LIQUID_MISC ; NUME[:LIQUID_MISC] = 79 ; Item[:LIQUID_MISC] = :LIQUID_MISC - ENUM[80] = :POWDER_MISC ; NUME[:POWDER_MISC] = 80 ; Item[:POWDER_MISC] = :POWDER_MISC - ENUM[81] = :ANY_GENERIC81 ; NUME[:ANY_GENERIC81] = 81 ; GenericItem[:ANY_GENERIC81] << :FLASK ; GenericItem[:ANY_GENERIC81] << :CAGE ; GenericItem[:ANY_GENERIC81] << :BARREL ; GenericItem[:ANY_GENERIC81] << :BUCKET ; GenericItem[:ANY_GENERIC81] << :ANIMALTRAP ; GenericItem[:ANY_GENERIC81] << :BOX ; GenericItem[:ANY_GENERIC81] << :MEAT ; GenericItem[:ANY_GENERIC81] << :FISH ; GenericItem[:ANY_GENERIC81] << :FISH_RAW ; GenericItem[:ANY_GENERIC81] << :VERMIN ; GenericItem[:ANY_GENERIC81] << :SEEDS ; GenericItem[:ANY_GENERIC81] << :PLANT ; GenericItem[:ANY_GENERIC81] << :LEAVES ; GenericItem[:ANY_GENERIC81] << :DRINK ; GenericItem[:ANY_GENERIC81] << :POWDER_MISC ; GenericItem[:ANY_GENERIC81] << :CHEESE ; GenericItem[:ANY_GENERIC81] << :LIQUID_MISC ; GenericItem[:ANY_GENERIC81] << :GLOB ; GenericItem[:ANY_GENERIC81] << :TOOL ; GenericItem[:ANY_GENERIC81] << :EGG - ENUM[82] = :ANY_GENERIC82 ; NUME[:ANY_GENERIC82] = 82 ; GenericItem[:ANY_GENERIC82] << :BOX - ENUM[83] = :VERMIN ; NUME[:VERMIN] = 83 ; GenericItem[:VERMIN] << :VERMIN - ENUM[84] = :PET ; NUME[:PET] = 84 ; GenericItem[:PET] << :PET - ENUM[85] = :ANY_CRITTER ; NUME[:ANY_CRITTER] = 85 ; GenericItem[:ANY_CRITTER] << :VERMIN ; GenericItem[:ANY_CRITTER] << :PET - ENUM[86] = :COIN ; NUME[:COIN] = 86 ; Item[:COIN] = :COIN - ENUM[87] = :GLOB ; NUME[:GLOB] = 87 ; Item[:GLOB] = :GLOB - ENUM[88] = :TRAPCOMP ; NUME[:TRAPCOMP] = 88 ; Item[:TRAPCOMP] = :TRAPCOMP - ENUM[89] = :BAR ; NUME[:BAR] = 89 ; Item[:BAR] = :BAR - ENUM[90] = :SMALLGEM ; NUME[:SMALLGEM] = 90 ; Item[:SMALLGEM] = :SMALLGEM - ENUM[91] = :BLOCKS ; NUME[:BLOCKS] = 91 ; Item[:BLOCKS] = :BLOCKS - ENUM[92] = :ROUGH ; NUME[:ROUGH] = 92 ; Item[:ROUGH] = :ROUGH - ENUM[93] = :ANY_CORPSE ; NUME[:ANY_CORPSE] = 93 ; GenericItem[:ANY_CORPSE] << :CORPSE ; GenericItem[:ANY_CORPSE] << :CORPSEPIECE - ENUM[94] = :CORPSE ; NUME[:CORPSE] = 94 ; Item[:CORPSE] = :CORPSE - ENUM[95] = :BOOK ; NUME[:BOOK] = 95 ; Item[:BOOK] = :BOOK - ENUM[96] = :FIGURINE ; NUME[:FIGURINE] = 96 ; Item[:FIGURINE] = :FIGURINE - ENUM[97] = :AMULET ; NUME[:AMULET] = 97 ; Item[:AMULET] = :AMULET - ENUM[98] = :SCEPTER ; NUME[:SCEPTER] = 98 ; Item[:SCEPTER] = :SCEPTER - ENUM[99] = :CROWN ; NUME[:CROWN] = 99 ; Item[:CROWN] = :CROWN - ENUM[100] = :RING ; NUME[:RING] = 100 ; Item[:RING] = :RING - ENUM[101] = :EARRING ; NUME[:EARRING] = 101 ; Item[:EARRING] = :EARRING - ENUM[102] = :BRACELET ; NUME[:BRACELET] = 102 ; Item[:BRACELET] = :BRACELET - ENUM[103] = :GEM ; NUME[:GEM] = 103 ; Item[:GEM] = :GEM - ENUM[104] = :CORPSEPIECE ; NUME[:CORPSEPIECE] = 104 ; Item[:CORPSEPIECE] = :CORPSEPIECE - ENUM[105] = :REMAINS ; NUME[:REMAINS] = 105 ; Item[:REMAINS] = :REMAINS - ENUM[106] = :MEAT ; NUME[:MEAT] = 106 ; Item[:MEAT] = :MEAT - ENUM[107] = :FISH ; NUME[:FISH] = 107 ; Item[:FISH] = :FISH - ENUM[108] = :FISH_RAW ; NUME[:FISH_RAW] = 108 ; Item[:FISH_RAW] = :FISH_RAW - ENUM[109] = :EGG ; NUME[:EGG] = 109 ; Item[:EGG] = :EGG - ENUM[110] = :SEEDS ; NUME[:SEEDS] = 110 ; Item[:SEEDS] = :SEEDS - ENUM[111] = :PLANT ; NUME[:PLANT] = 111 ; Item[:PLANT] = :PLANT - ENUM[112] = :SKIN_TANNED ; NUME[:SKIN_TANNED] = 112 ; Item[:SKIN_TANNED] = :SKIN_TANNED - ENUM[113] = :LEAVES ; NUME[:LEAVES] = 113 ; Item[:LEAVES] = :LEAVES - ENUM[114] = :THREAD ; NUME[:THREAD] = 114 ; Item[:THREAD] = :THREAD - ENUM[115] = :CLOTH ; NUME[:CLOTH] = 115 ; Item[:CLOTH] = :CLOTH - ENUM[116] = :TOTEM ; NUME[:TOTEM] = 116 ; Item[:TOTEM] = :TOTEM - ENUM[117] = :PANTS ; NUME[:PANTS] = 117 ; Item[:PANTS] = :PANTS - ENUM[118] = :CHEESE ; NUME[:CHEESE] = 118 ; Item[:CHEESE] = :CHEESE - ENUM[119] = :FOOD ; NUME[:FOOD] = 119 ; Item[:FOOD] = :FOOD - ENUM[120] = :BALLISTAARROWHEAD ; NUME[:BALLISTAARROWHEAD] = 120 ; Item[:BALLISTAARROWHEAD] = :BALLISTAARROWHEAD - ENUM[121] = :ARMOR ; NUME[:ARMOR] = 121 ; Item[:ARMOR] = :ARMOR - ENUM[122] = :SHOES ; NUME[:SHOES] = 122 ; Item[:SHOES] = :SHOES - ENUM[123] = :HELM ; NUME[:HELM] = 123 ; Item[:HELM] = :HELM - ENUM[124] = :GLOVES ; NUME[:GLOVES] = 124 ; Item[:GLOVES] = :GLOVES - ENUM[125] = :ANY_GENERIC123 ; NUME[:ANY_GENERIC123] = 125 ; GenericItem[:ANY_GENERIC123] << :FLASK ; GenericItem[:ANY_GENERIC123] << :GOBLET ; GenericItem[:ANY_GENERIC123] << :CAGE ; GenericItem[:ANY_GENERIC123] << :BARREL ; GenericItem[:ANY_GENERIC123] << :BUCKET ; GenericItem[:ANY_GENERIC123] << :ANIMALTRAP ; GenericItem[:ANY_GENERIC123] << :COFFIN ; GenericItem[:ANY_GENERIC123] << :BOX ; GenericItem[:ANY_GENERIC123] << :BIN ; GenericItem[:ANY_GENERIC123] << :ARMORSTAND ; GenericItem[:ANY_GENERIC123] << :WEAPONRACK ; GenericItem[:ANY_GENERIC123] << :CABINET ; GenericItem[:ANY_GENERIC123] << :BACKPACK ; GenericItem[:ANY_GENERIC123] << :QUIVER ; GenericItem[:ANY_GENERIC123] << :TOOL - ENUM[126] = :FOOD_STORAGE ; NUME[:FOOD_STORAGE] = 126 ; GenericItem[:FOOD_STORAGE] << :BARREL ; GenericItem[:FOOD_STORAGE] << :TOOL - ENUM[127] = :UNKNOWN_125 ; NUME[:UNKNOWN_125] = 127 - ENUM[128] = :ANY_MELT_DESIGNATED ; NUME[:ANY_MELT_DESIGNATED] = 128 - ENUM[129] = :BAD ; NUME[:BAD] = 129 -end - -class JobItemVectorId < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - Other = Hash.new(:ANY) - ENUM[0] = :ANY ; NUME[:ANY] = 0 - ENUM[1] = :ANY_FREE ; NUME[:ANY_FREE] = 1 - ENUM[2] = :ANY_ARTIFACT ; NUME[:ANY_ARTIFACT] = 2 - ENUM[3] = :WEAPON ; NUME[:WEAPON] = 3 - ENUM[4] = :ANY_WEAPON ; NUME[:ANY_WEAPON] = 4 - ENUM[5] = :ANY_SPIKE ; NUME[:ANY_SPIKE] = 5 - ENUM[6] = :ANY_TRUE_ARMOR ; NUME[:ANY_TRUE_ARMOR] = 6 - ENUM[7] = :ANY_ARMOR_HELM ; NUME[:ANY_ARMOR_HELM] = 7 - ENUM[8] = :ANY_ARMOR_SHOES ; NUME[:ANY_ARMOR_SHOES] = 8 - ENUM[9] = :SHIELD ; NUME[:SHIELD] = 9 - ENUM[10] = :ANY_ARMOR_GLOVES ; NUME[:ANY_ARMOR_GLOVES] = 10 - ENUM[11] = :ANY_ARMOR_PANTS ; NUME[:ANY_ARMOR_PANTS] = 11 - ENUM[12] = :QUIVER ; NUME[:QUIVER] = 12 - ENUM[13] = :SPLINT ; NUME[:SPLINT] = 13 - ENUM[14] = :ANY_14 ; NUME[:ANY_14] = 14 ; Other[:ANY_14] = :ANY - ENUM[15] = :CRUTCH ; NUME[:CRUTCH] = 15 - ENUM[16] = :BACKPACK ; NUME[:BACKPACK] = 16 - ENUM[17] = :AMMO ; NUME[:AMMO] = 17 - ENUM[18] = :WOOD ; NUME[:WOOD] = 18 - ENUM[19] = :BOULDER ; NUME[:BOULDER] = 19 - ENUM[20] = :ROCK ; NUME[:ROCK] = 20 - ENUM[21] = :ANY_REFUSE ; NUME[:ANY_REFUSE] = 21 - ENUM[22] = :ANY_GOOD_FOOD ; NUME[:ANY_GOOD_FOOD] = 22 - ENUM[23] = :ANY_GENERIC22 ; NUME[:ANY_GENERIC22] = 23 - ENUM[24] = :ANY_GENERIC23 ; NUME[:ANY_GENERIC23] = 24 - ENUM[25] = :ANY_GENERIC24 ; NUME[:ANY_GENERIC24] = 25 - ENUM[26] = :ANY_FURNITURE ; NUME[:ANY_FURNITURE] = 26 - ENUM[27] = :ANY_CAGE_OR_TRAP ; NUME[:ANY_CAGE_OR_TRAP] = 27 - ENUM[28] = :ANY_EDIBLE_RAW ; NUME[:ANY_EDIBLE_RAW] = 28 - ENUM[29] = :ANY_EDIBLE_MEAT ; NUME[:ANY_EDIBLE_MEAT] = 29 - ENUM[30] = :ANY_EDIBLE_CORPSE ; NUME[:ANY_EDIBLE_CORPSE] = 30 - ENUM[31] = :ANY_EDIBLE_VERMIN ; NUME[:ANY_EDIBLE_VERMIN] = 31 - ENUM[32] = :ANY_EDIBLE_VERMIN_BOX ; NUME[:ANY_EDIBLE_VERMIN_BOX] = 32 - ENUM[33] = :ANY_CAN_ROT ; NUME[:ANY_CAN_ROT] = 33 - ENUM[34] = :ANY_MURDERED ; NUME[:ANY_MURDERED] = 34 - ENUM[35] = :ANY_DEAD_DWARF ; NUME[:ANY_DEAD_DWARF] = 35 - ENUM[36] = :ANY_GENERIC35 ; NUME[:ANY_GENERIC35] = 36 - ENUM[37] = :ANY_GENERIC36 ; NUME[:ANY_GENERIC36] = 37 - ENUM[38] = :ANY_GENERIC37 ; NUME[:ANY_GENERIC37] = 38 - ENUM[39] = :ANY_GENERIC38 ; NUME[:ANY_GENERIC38] = 39 - ENUM[40] = :DOOR ; NUME[:DOOR] = 40 - ENUM[41] = :FLOODGATE ; NUME[:FLOODGATE] = 41 - ENUM[42] = :HATCH_COVER ; NUME[:HATCH_COVER] = 42 - ENUM[43] = :GRATE ; NUME[:GRATE] = 43 - ENUM[44] = :CAGE ; NUME[:CAGE] = 44 - ENUM[45] = :FLASK ; NUME[:FLASK] = 45 - ENUM[46] = :WINDOW ; NUME[:WINDOW] = 46 - ENUM[47] = :GOBLET ; NUME[:GOBLET] = 47 - ENUM[48] = :INSTRUMENT ; NUME[:INSTRUMENT] = 48 - ENUM[49] = :TOY ; NUME[:TOY] = 49 - ENUM[50] = :BUCKET ; NUME[:BUCKET] = 50 - ENUM[51] = :BARREL ; NUME[:BARREL] = 51 - ENUM[52] = :CHAIN ; NUME[:CHAIN] = 52 - ENUM[53] = :ANIMALTRAP ; NUME[:ANIMALTRAP] = 53 - ENUM[54] = :BED ; NUME[:BED] = 54 - ENUM[55] = :TRACTION_BENCH ; NUME[:TRACTION_BENCH] = 55 - ENUM[56] = :CHAIR ; NUME[:CHAIR] = 56 - ENUM[57] = :COFFIN ; NUME[:COFFIN] = 57 - ENUM[58] = :TABLE ; NUME[:TABLE] = 58 - ENUM[59] = :STATUE ; NUME[:STATUE] = 59 - ENUM[60] = :QUERN ; NUME[:QUERN] = 60 - ENUM[61] = :MILLSTONE ; NUME[:MILLSTONE] = 61 - ENUM[62] = :BOX ; NUME[:BOX] = 62 - ENUM[63] = :BIN ; NUME[:BIN] = 63 - ENUM[64] = :ARMORSTAND ; NUME[:ARMORSTAND] = 64 - ENUM[65] = :WEAPONRACK ; NUME[:WEAPONRACK] = 65 - ENUM[66] = :CABINET ; NUME[:CABINET] = 66 - ENUM[67] = :ANVIL ; NUME[:ANVIL] = 67 - ENUM[68] = :CATAPULTPARTS ; NUME[:CATAPULTPARTS] = 68 - ENUM[69] = :BALLISTAPARTS ; NUME[:BALLISTAPARTS] = 69 - ENUM[70] = :SIEGEAMMO ; NUME[:SIEGEAMMO] = 70 - ENUM[71] = :TRAPPARTS ; NUME[:TRAPPARTS] = 71 - ENUM[72] = :ANY_WEBS ; NUME[:ANY_WEBS] = 72 - ENUM[73] = :PIPE_SECTION ; NUME[:PIPE_SECTION] = 73 - ENUM[74] = :ANY_ENCASED ; NUME[:ANY_ENCASED] = 74 - ENUM[75] = :ANY_IN_CONSTRUCTION ; NUME[:ANY_IN_CONSTRUCTION] = 75 - ENUM[76] = :DRINK ; NUME[:DRINK] = 76 - ENUM[77] = :ANY_DRINK ; NUME[:ANY_DRINK] = 77 - ENUM[78] = :LIQUID_MISC ; NUME[:LIQUID_MISC] = 78 - ENUM[79] = :POWDER_MISC ; NUME[:POWDER_MISC] = 79 - ENUM[80] = :ANY_GENERIC81 ; NUME[:ANY_GENERIC81] = 80 - ENUM[81] = :ANY_GENERIC82 ; NUME[:ANY_GENERIC82] = 81 - ENUM[82] = :VERMIN ; NUME[:VERMIN] = 82 - ENUM[83] = :PET ; NUME[:PET] = 83 - ENUM[84] = :ANY_CRITTER ; NUME[:ANY_CRITTER] = 84 - ENUM[85] = :COIN ; NUME[:COIN] = 85 - ENUM[86] = :GLOB ; NUME[:GLOB] = 86 - ENUM[87] = :UNKNOWN_125 ; NUME[:UNKNOWN_125] = 87 - ENUM[88] = :ANY_MELT_DESIGNATED ; NUME[:ANY_MELT_DESIGNATED] = 88 - ENUM[89] = :BAD ; NUME[:BAD] = 89 - ENUM[90] = :TRAPCOMP ; NUME[:TRAPCOMP] = 90 - ENUM[91] = :BAR ; NUME[:BAR] = 91 - ENUM[92] = :SMALLGEM ; NUME[:SMALLGEM] = 92 - ENUM[93] = :BLOCKS ; NUME[:BLOCKS] = 93 - ENUM[94] = :ROUGH ; NUME[:ROUGH] = 94 - ENUM[95] = :CORPSE ; NUME[:CORPSE] = 95 - ENUM[96] = :FIGURINE ; NUME[:FIGURINE] = 96 - ENUM[97] = :AMULET ; NUME[:AMULET] = 97 - ENUM[98] = :SCEPTER ; NUME[:SCEPTER] = 98 - ENUM[99] = :CROWN ; NUME[:CROWN] = 99 - ENUM[100] = :RING ; NUME[:RING] = 100 - ENUM[101] = :EARRING ; NUME[:EARRING] = 101 - ENUM[102] = :BRACELET ; NUME[:BRACELET] = 102 - ENUM[103] = :GEM ; NUME[:GEM] = 103 - ENUM[104] = :CORPSEPIECE ; NUME[:CORPSEPIECE] = 104 - ENUM[105] = :REMAINS ; NUME[:REMAINS] = 105 - ENUM[106] = :MEAT ; NUME[:MEAT] = 106 - ENUM[107] = :FISH ; NUME[:FISH] = 107 - ENUM[108] = :FISH_RAW ; NUME[:FISH_RAW] = 108 - ENUM[109] = :SEEDS ; NUME[:SEEDS] = 109 - ENUM[110] = :PLANT ; NUME[:PLANT] = 110 - ENUM[111] = :SKIN_TANNED ; NUME[:SKIN_TANNED] = 111 - ENUM[112] = :LEAVES ; NUME[:LEAVES] = 112 - ENUM[113] = :THREAD ; NUME[:THREAD] = 113 - ENUM[114] = :CLOTH ; NUME[:CLOTH] = 114 - ENUM[115] = :TOTEM ; NUME[:TOTEM] = 115 - ENUM[116] = :PANTS ; NUME[:PANTS] = 116 - ENUM[117] = :CHEESE ; NUME[:CHEESE] = 117 - ENUM[118] = :FOOD ; NUME[:FOOD] = 118 - ENUM[119] = :BALLISTAARROWHEAD ; NUME[:BALLISTAARROWHEAD] = 119 - ENUM[120] = :ARMOR ; NUME[:ARMOR] = 120 - ENUM[121] = :SHOES ; NUME[:SHOES] = 121 - ENUM[122] = :HELM ; NUME[:HELM] = 122 - ENUM[123] = :GLOVES ; NUME[:GLOVES] = 123 - ENUM[124] = :ANY_124 ; NUME[:ANY_124] = 124 ; Other[:ANY_124] = :ANY - ENUM[125] = :ANY_125 ; NUME[:ANY_125] = 125 ; Other[:ANY_125] = :ANY - ENUM[126] = :EGG ; NUME[:EGG] = 126 - ENUM[127] = :ANY_127 ; NUME[:ANY_127] = 127 ; Other[:ANY_127] = :ANY - ENUM[128] = :ANY_CORPSE ; NUME[:ANY_CORPSE] = 128 - ENUM[129] = :BOOK ; NUME[:BOOK] = 129 -end - -class JobSkill < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - Caption = Hash.new - CaptionNoun = Hash.new - Profession = Hash.new(:NONE) - Labor = Hash.new(:NONE) - Type = Hash.new(:Normal) - ENUM[-1] = :NONE ; NUME[:NONE] = -1 - ENUM[0] = :MINING ; NUME[:MINING] = 0 ; Caption[:MINING] = 'Mining' ; CaptionNoun[:MINING] = 'Miner' ; Profession[:MINING] = :MINER ; Labor[:MINING] = :MINE - ENUM[1] = :WOODCUTTING ; NUME[:WOODCUTTING] = 1 ; Caption[:WOODCUTTING] = 'Wood Cutting' ; CaptionNoun[:WOODCUTTING] = 'Wood Cutter' ; Profession[:WOODCUTTING] = :WOODCUTTER ; Labor[:WOODCUTTING] = :CUTWOOD - ENUM[2] = :CARPENTRY ; NUME[:CARPENTRY] = 2 ; Caption[:CARPENTRY] = 'Carpentry' ; CaptionNoun[:CARPENTRY] = 'Carpenter' ; Profession[:CARPENTRY] = :CARPENTER ; Labor[:CARPENTRY] = :CARPENTER - ENUM[3] = :DETAILSTONE ; NUME[:DETAILSTONE] = 3 ; Caption[:DETAILSTONE] = 'Engraving' ; CaptionNoun[:DETAILSTONE] = 'Engraver' ; Profession[:DETAILSTONE] = :ENGRAVER ; Labor[:DETAILSTONE] = :DETAIL - ENUM[4] = :MASONRY ; NUME[:MASONRY] = 4 ; Caption[:MASONRY] = 'Masonry' ; CaptionNoun[:MASONRY] = 'Mason' ; Profession[:MASONRY] = :MASON ; Labor[:MASONRY] = :MASON - ENUM[5] = :ANIMALTRAIN ; NUME[:ANIMALTRAIN] = 5 ; Caption[:ANIMALTRAIN] = 'Animal Training' ; CaptionNoun[:ANIMALTRAIN] = 'Animal Trainer' ; Profession[:ANIMALTRAIN] = :ANIMAL_TRAINER ; Labor[:ANIMALTRAIN] = :ANIMALTRAIN - ENUM[6] = :ANIMALCARE ; NUME[:ANIMALCARE] = 6 ; Caption[:ANIMALCARE] = 'Animal Caretaking' ; CaptionNoun[:ANIMALCARE] = 'Animal Caretaker' ; Profession[:ANIMALCARE] = :ANIMAL_CARETAKER ; Labor[:ANIMALCARE] = :ANIMALCARE - ENUM[7] = :DISSECT_FISH ; NUME[:DISSECT_FISH] = 7 ; Caption[:DISSECT_FISH] = 'Fish Dissection' ; CaptionNoun[:DISSECT_FISH] = 'Fish Dissector' ; Profession[:DISSECT_FISH] = :FISH_DISSECTOR ; Labor[:DISSECT_FISH] = :DISSECT_FISH - ENUM[8] = :DISSECT_VERMIN ; NUME[:DISSECT_VERMIN] = 8 ; Caption[:DISSECT_VERMIN] = 'Animal Dissection' ; CaptionNoun[:DISSECT_VERMIN] = 'Animal Dissector' ; Profession[:DISSECT_VERMIN] = :ANIMAL_DISSECTOR ; Labor[:DISSECT_VERMIN] = :DISSECT_VERMIN - ENUM[9] = :PROCESSFISH ; NUME[:PROCESSFISH] = 9 ; Caption[:PROCESSFISH] = 'Fish Cleaning' ; CaptionNoun[:PROCESSFISH] = 'Fish Cleaner' ; Profession[:PROCESSFISH] = :FISH_CLEANER ; Labor[:PROCESSFISH] = :CLEAN_FISH - ENUM[10] = :BUTCHER ; NUME[:BUTCHER] = 10 ; Caption[:BUTCHER] = 'Butchery' ; CaptionNoun[:BUTCHER] = 'Butcher' ; Profession[:BUTCHER] = :BUTCHER ; Labor[:BUTCHER] = :BUTCHER - ENUM[11] = :TRAPPING ; NUME[:TRAPPING] = 11 ; Caption[:TRAPPING] = 'Trapping' ; CaptionNoun[:TRAPPING] = 'Trapper' ; Profession[:TRAPPING] = :TRAPPER ; Labor[:TRAPPING] = :TRAPPER - ENUM[12] = :TANNER ; NUME[:TANNER] = 12 ; Caption[:TANNER] = 'Tanning' ; CaptionNoun[:TANNER] = 'Tanner' ; Profession[:TANNER] = :TANNER ; Labor[:TANNER] = :TANNER - ENUM[13] = :WEAVING ; NUME[:WEAVING] = 13 ; Caption[:WEAVING] = 'Weaving' ; CaptionNoun[:WEAVING] = 'Weaver' ; Profession[:WEAVING] = :WEAVER ; Labor[:WEAVING] = :WEAVER - ENUM[14] = :BREWING ; NUME[:BREWING] = 14 ; Caption[:BREWING] = 'Brewing' ; CaptionNoun[:BREWING] = 'Brewer' ; Profession[:BREWING] = :BREWER ; Labor[:BREWING] = :BREWER - ENUM[15] = :ALCHEMY ; NUME[:ALCHEMY] = 15 ; Caption[:ALCHEMY] = 'Alchemy' ; CaptionNoun[:ALCHEMY] = 'Alchemist' ; Profession[:ALCHEMY] = :ALCHEMIST ; Labor[:ALCHEMY] = :ALCHEMIST - ENUM[16] = :CLOTHESMAKING ; NUME[:CLOTHESMAKING] = 16 ; Caption[:CLOTHESMAKING] = 'Clothes Making' ; CaptionNoun[:CLOTHESMAKING] = 'Clothier' ; Profession[:CLOTHESMAKING] = :CLOTHIER ; Labor[:CLOTHESMAKING] = :CLOTHESMAKER - ENUM[17] = :MILLING ; NUME[:MILLING] = 17 ; Caption[:MILLING] = 'Milling' ; CaptionNoun[:MILLING] = 'Miller' ; Profession[:MILLING] = :MILLER ; Labor[:MILLING] = :MILLER - ENUM[18] = :PROCESSPLANTS ; NUME[:PROCESSPLANTS] = 18 ; Caption[:PROCESSPLANTS] = 'Threshing' ; CaptionNoun[:PROCESSPLANTS] = 'Thresher' ; Profession[:PROCESSPLANTS] = :THRESHER ; Labor[:PROCESSPLANTS] = :PROCESS_PLANT - ENUM[19] = :CHEESEMAKING ; NUME[:CHEESEMAKING] = 19 ; Caption[:CHEESEMAKING] = 'Cheese Making' ; CaptionNoun[:CHEESEMAKING] = 'Cheese Maker' ; Profession[:CHEESEMAKING] = :CHEESE_MAKER ; Labor[:CHEESEMAKING] = :MAKE_CHEESE - ENUM[20] = :MILK ; NUME[:MILK] = 20 ; Caption[:MILK] = 'Milking' ; CaptionNoun[:MILK] = 'Milker' ; Profession[:MILK] = :MILKER ; Labor[:MILK] = :MILK - ENUM[21] = :COOK ; NUME[:COOK] = 21 ; Caption[:COOK] = 'Cooking' ; CaptionNoun[:COOK] = 'Cook' ; Profession[:COOK] = :COOK ; Labor[:COOK] = :COOK - ENUM[22] = :PLANT ; NUME[:PLANT] = 22 ; Caption[:PLANT] = 'Growing' ; CaptionNoun[:PLANT] = 'Grower' ; Profession[:PLANT] = :PLANTER ; Labor[:PLANT] = :PLANT - ENUM[23] = :HERBALISM ; NUME[:HERBALISM] = 23 ; Caption[:HERBALISM] = 'Herbalism' ; CaptionNoun[:HERBALISM] = 'Herbalist' ; Profession[:HERBALISM] = :HERBALIST ; Labor[:HERBALISM] = :HERBALIST - ENUM[24] = :FISH ; NUME[:FISH] = 24 ; Caption[:FISH] = 'Fishing' ; CaptionNoun[:FISH] = 'Fisherman' ; Profession[:FISH] = :FISHERMAN ; Labor[:FISH] = :FISH - ENUM[25] = :SMELT ; NUME[:SMELT] = 25 ; Caption[:SMELT] = 'Furnace Operation' ; CaptionNoun[:SMELT] = 'Furnace Operator' ; Profession[:SMELT] = :FURNACE_OPERATOR ; Labor[:SMELT] = :SMELT - ENUM[26] = :EXTRACT_STRAND ; NUME[:EXTRACT_STRAND] = 26 ; Caption[:EXTRACT_STRAND] = 'Strand Extraction' ; CaptionNoun[:EXTRACT_STRAND] = 'Strand Extractor' ; Profession[:EXTRACT_STRAND] = :STRAND_EXTRACTOR ; Labor[:EXTRACT_STRAND] = :EXTRACT_STRAND - ENUM[27] = :FORGE_WEAPON ; NUME[:FORGE_WEAPON] = 27 ; Caption[:FORGE_WEAPON] = 'Weaponsmithing' ; CaptionNoun[:FORGE_WEAPON] = 'Weaponsmith' ; Profession[:FORGE_WEAPON] = :WEAPONSMITH ; Labor[:FORGE_WEAPON] = :FORGE_WEAPON - ENUM[28] = :FORGE_ARMOR ; NUME[:FORGE_ARMOR] = 28 ; Caption[:FORGE_ARMOR] = 'Armorsmithing' ; CaptionNoun[:FORGE_ARMOR] = 'Armorsmith' ; Profession[:FORGE_ARMOR] = :ARMORER ; Labor[:FORGE_ARMOR] = :FORGE_ARMOR - ENUM[29] = :FORGE_FURNITURE ; NUME[:FORGE_FURNITURE] = 29 ; Caption[:FORGE_FURNITURE] = 'Metalsmithing' ; CaptionNoun[:FORGE_FURNITURE] = 'Metalsmith' ; Profession[:FORGE_FURNITURE] = :BLACKSMITH ; Labor[:FORGE_FURNITURE] = :FORGE_FURNITURE - ENUM[30] = :CUTGEM ; NUME[:CUTGEM] = 30 ; Caption[:CUTGEM] = 'Gem Cutting' ; CaptionNoun[:CUTGEM] = 'Gem Cutter' ; Profession[:CUTGEM] = :GEM_CUTTER ; Labor[:CUTGEM] = :CUT_GEM - ENUM[31] = :ENCRUSTGEM ; NUME[:ENCRUSTGEM] = 31 ; Caption[:ENCRUSTGEM] = 'Gem Setting' ; CaptionNoun[:ENCRUSTGEM] = 'Gem Setter' ; Profession[:ENCRUSTGEM] = :GEM_SETTER ; Labor[:ENCRUSTGEM] = :ENCRUST_GEM - ENUM[32] = :WOODCRAFT ; NUME[:WOODCRAFT] = 32 ; Caption[:WOODCRAFT] = 'Wood Crafting' ; CaptionNoun[:WOODCRAFT] = 'Wood Crafter' ; Profession[:WOODCRAFT] = :WOODCRAFTER ; Labor[:WOODCRAFT] = :WOOD_CRAFT - ENUM[33] = :STONECRAFT ; NUME[:STONECRAFT] = 33 ; Caption[:STONECRAFT] = 'Stone Crafting' ; CaptionNoun[:STONECRAFT] = 'Stone Crafter' ; Profession[:STONECRAFT] = :STONECRAFTER ; Labor[:STONECRAFT] = :STONE_CRAFT - ENUM[34] = :METALCRAFT ; NUME[:METALCRAFT] = 34 ; Caption[:METALCRAFT] = 'Metal Crafting' ; CaptionNoun[:METALCRAFT] = 'Metal Crafter' ; Profession[:METALCRAFT] = :METALCRAFTER ; Labor[:METALCRAFT] = :METAL_CRAFT - ENUM[35] = :GLASSMAKER ; NUME[:GLASSMAKER] = 35 ; Caption[:GLASSMAKER] = 'Glassmaking' ; CaptionNoun[:GLASSMAKER] = 'Glassmaker' ; Profession[:GLASSMAKER] = :GLASSMAKER ; Labor[:GLASSMAKER] = :GLASSMAKER - ENUM[36] = :LEATHERWORK ; NUME[:LEATHERWORK] = 36 ; Caption[:LEATHERWORK] = 'Leatherworkering' ; CaptionNoun[:LEATHERWORK] = 'Leatherworker' ; Profession[:LEATHERWORK] = :LEATHERWORKER ; Labor[:LEATHERWORK] = :LEATHER - ENUM[37] = :BONECARVE ; NUME[:BONECARVE] = 37 ; Caption[:BONECARVE] = 'Bone Carving' ; CaptionNoun[:BONECARVE] = 'Bone Carver' ; Profession[:BONECARVE] = :BONE_CARVER ; Labor[:BONECARVE] = :BONE_CARVE - ENUM[38] = :AXE ; NUME[:AXE] = 38 ; Caption[:AXE] = 'Axe' ; CaptionNoun[:AXE] = 'Axeman' ; Profession[:AXE] = :AXEMAN ; Type[:AXE] = :MilitaryWeapon - ENUM[39] = :SWORD ; NUME[:SWORD] = 39 ; Caption[:SWORD] = 'Sword' ; CaptionNoun[:SWORD] = 'Swordsman' ; Profession[:SWORD] = :SWORDSMAN ; Type[:SWORD] = :MilitaryWeapon - ENUM[40] = :DAGGER ; NUME[:DAGGER] = 40 ; Caption[:DAGGER] = 'Knife' ; CaptionNoun[:DAGGER] = 'Knife User' ; Type[:DAGGER] = :MilitaryWeapon - ENUM[41] = :MACE ; NUME[:MACE] = 41 ; Caption[:MACE] = 'Mace' ; CaptionNoun[:MACE] = 'Maceman' ; Profession[:MACE] = :MACEMAN ; Type[:MACE] = :MilitaryWeapon - ENUM[42] = :HAMMER ; NUME[:HAMMER] = 42 ; Caption[:HAMMER] = 'Hammer' ; CaptionNoun[:HAMMER] = 'Hammerman' ; Profession[:HAMMER] = :HAMMERMAN ; Type[:HAMMER] = :MilitaryWeapon - ENUM[43] = :SPEAR ; NUME[:SPEAR] = 43 ; Caption[:SPEAR] = 'Spear' ; CaptionNoun[:SPEAR] = 'Spearman' ; Profession[:SPEAR] = :SPEARMAN ; Type[:SPEAR] = :MilitaryWeapon - ENUM[44] = :CROSSBOW ; NUME[:CROSSBOW] = 44 ; Caption[:CROSSBOW] = 'Crossbow' ; CaptionNoun[:CROSSBOW] = 'Crossbowman' ; Profession[:CROSSBOW] = :CROSSBOWMAN ; Type[:CROSSBOW] = :MilitaryWeapon - ENUM[45] = :SHIELD ; NUME[:SHIELD] = 45 ; Caption[:SHIELD] = 'Shield' ; CaptionNoun[:SHIELD] = 'Shield User' ; Type[:SHIELD] = :MilitaryDefense - ENUM[46] = :ARMOR ; NUME[:ARMOR] = 46 ; Caption[:ARMOR] = 'Armor' ; CaptionNoun[:ARMOR] = 'Armor User' ; Type[:ARMOR] = :MilitaryDefense - ENUM[47] = :SIEGECRAFT ; NUME[:SIEGECRAFT] = 47 ; Caption[:SIEGECRAFT] = 'Siege Engineering' ; CaptionNoun[:SIEGECRAFT] = 'Siege Engineer' ; Profession[:SIEGECRAFT] = :SIEGE_ENGINEER ; Labor[:SIEGECRAFT] = :SIEGECRAFT - ENUM[48] = :SIEGEOPERATE ; NUME[:SIEGEOPERATE] = 48 ; Caption[:SIEGEOPERATE] = 'Siege Operation' ; CaptionNoun[:SIEGEOPERATE] = 'Siege Operator' ; Profession[:SIEGEOPERATE] = :SIEGE_OPERATOR ; Labor[:SIEGEOPERATE] = :SIEGEOPERATE - ENUM[49] = :BOWYER ; NUME[:BOWYER] = 49 ; Caption[:BOWYER] = 'Bowmaking' ; CaptionNoun[:BOWYER] = 'Bowyer' ; Profession[:BOWYER] = :BOWYER ; Labor[:BOWYER] = :BOWYER - ENUM[50] = :PIKE ; NUME[:PIKE] = 50 ; Caption[:PIKE] = 'Pike' ; CaptionNoun[:PIKE] = 'Pikeman' ; Profession[:PIKE] = :PIKEMAN ; Type[:PIKE] = :MilitaryWeapon - ENUM[51] = :WHIP ; NUME[:WHIP] = 51 ; Caption[:WHIP] = 'Lash' ; CaptionNoun[:WHIP] = 'Lasher' ; Profession[:WHIP] = :LASHER ; Type[:WHIP] = :MilitaryWeapon - ENUM[52] = :BOW ; NUME[:BOW] = 52 ; Caption[:BOW] = 'Bow' ; CaptionNoun[:BOW] = 'Bowman' ; Profession[:BOW] = :BOWMAN ; Type[:BOW] = :MilitaryWeapon - ENUM[53] = :BLOWGUN ; NUME[:BLOWGUN] = 53 ; Caption[:BLOWGUN] = 'Blowgun' ; CaptionNoun[:BLOWGUN] = 'Blowgunner' ; Profession[:BLOWGUN] = :BLOWGUNMAN ; Type[:BLOWGUN] = :MilitaryWeapon - ENUM[54] = :THROW ; NUME[:THROW] = 54 ; Caption[:THROW] = 'Throwing' ; CaptionNoun[:THROW] = 'Thrower' ; Type[:THROW] = :MilitaryAttack - ENUM[55] = :MECHANICS ; NUME[:MECHANICS] = 55 ; Caption[:MECHANICS] = 'Machinery' ; CaptionNoun[:MECHANICS] = 'Mechanic' ; Profession[:MECHANICS] = :MECHANIC ; Labor[:MECHANICS] = :MECHANIC - ENUM[56] = :MAGIC_NATURE ; NUME[:MAGIC_NATURE] = 56 ; Caption[:MAGIC_NATURE] = 'Nature' ; CaptionNoun[:MAGIC_NATURE] = 'Druid' - ENUM[57] = :SNEAK ; NUME[:SNEAK] = 57 ; Caption[:SNEAK] = 'Ambush' ; CaptionNoun[:SNEAK] = 'Ambusher' ; Profession[:SNEAK] = :HUNTER ; Labor[:SNEAK] = :HUNT - ENUM[58] = :DESIGNBUILDING ; NUME[:DESIGNBUILDING] = 58 ; Caption[:DESIGNBUILDING] = 'Building Design' ; CaptionNoun[:DESIGNBUILDING] = 'Building Designer' ; Profession[:DESIGNBUILDING] = :ARCHITECT ; Labor[:DESIGNBUILDING] = :ARCHITECT - ENUM[59] = :DRESS_WOUNDS ; NUME[:DRESS_WOUNDS] = 59 ; Caption[:DRESS_WOUNDS] = 'Wound Dressing' ; CaptionNoun[:DRESS_WOUNDS] = 'Wound Dresser' ; Labor[:DRESS_WOUNDS] = :DRESSING_WOUNDS ; Type[:DRESS_WOUNDS] = :Medical - ENUM[60] = :DIAGNOSE ; NUME[:DIAGNOSE] = 60 ; Caption[:DIAGNOSE] = 'Diagnostics' ; CaptionNoun[:DIAGNOSE] = 'Diagnostician' ; Profession[:DIAGNOSE] = :DIAGNOSER ; Labor[:DIAGNOSE] = :DIAGNOSE ; Type[:DIAGNOSE] = :Medical - ENUM[61] = :SURGERY ; NUME[:SURGERY] = 61 ; Caption[:SURGERY] = 'Surgery' ; CaptionNoun[:SURGERY] = 'Surgeon' ; Profession[:SURGERY] = :SURGEON ; Labor[:SURGERY] = :SURGERY ; Type[:SURGERY] = :Medical - ENUM[62] = :SET_BONE ; NUME[:SET_BONE] = 62 ; Caption[:SET_BONE] = 'Bone Setting' ; CaptionNoun[:SET_BONE] = 'Bone Doctor' ; Profession[:SET_BONE] = :BONE_SETTER ; Labor[:SET_BONE] = :BONE_SETTING ; Type[:SET_BONE] = :Medical - ENUM[63] = :SUTURE ; NUME[:SUTURE] = 63 ; Caption[:SUTURE] = 'Suturing' ; CaptionNoun[:SUTURE] = 'Suturer' ; Profession[:SUTURE] = :SUTURER ; Labor[:SUTURE] = :SUTURING ; Type[:SUTURE] = :Medical - ENUM[64] = :CRUTCH_WALK ; NUME[:CRUTCH_WALK] = 64 ; Caption[:CRUTCH_WALK] = 'Crutch-walking' ; CaptionNoun[:CRUTCH_WALK] = 'Crutch-walker' ; Type[:CRUTCH_WALK] = :Personal - ENUM[65] = :WOOD_BURNING ; NUME[:WOOD_BURNING] = 65 ; Caption[:WOOD_BURNING] = 'Wood Burning' ; CaptionNoun[:WOOD_BURNING] = 'Wood Burner' ; Profession[:WOOD_BURNING] = :WOOD_BURNER ; Labor[:WOOD_BURNING] = :BURN_WOOD - ENUM[66] = :LYE_MAKING ; NUME[:LYE_MAKING] = 66 ; Caption[:LYE_MAKING] = 'Lye Making' ; CaptionNoun[:LYE_MAKING] = 'Lye Maker' ; Profession[:LYE_MAKING] = :LYE_MAKER ; Labor[:LYE_MAKING] = :LYE_MAKING - ENUM[67] = :SOAP_MAKING ; NUME[:SOAP_MAKING] = 67 ; Caption[:SOAP_MAKING] = 'Soap Making' ; CaptionNoun[:SOAP_MAKING] = 'Soaper' ; Profession[:SOAP_MAKING] = :SOAP_MAKER ; Labor[:SOAP_MAKING] = :SOAP_MAKER - ENUM[68] = :POTASH_MAKING ; NUME[:POTASH_MAKING] = 68 ; Caption[:POTASH_MAKING] = 'Potash Making' ; CaptionNoun[:POTASH_MAKING] = 'Potash Maker' ; Profession[:POTASH_MAKING] = :POTASH_MAKER ; Labor[:POTASH_MAKING] = :POTASH_MAKING - ENUM[69] = :DYER ; NUME[:DYER] = 69 ; Caption[:DYER] = 'Dyeing' ; CaptionNoun[:DYER] = 'Dyer' ; Profession[:DYER] = :DYER ; Labor[:DYER] = :DYER - ENUM[70] = :OPERATE_PUMP ; NUME[:OPERATE_PUMP] = 70 ; Caption[:OPERATE_PUMP] = 'Pump Operation' ; CaptionNoun[:OPERATE_PUMP] = 'Pump Operator' ; Profession[:OPERATE_PUMP] = :PUMP_OPERATOR ; Labor[:OPERATE_PUMP] = :OPERATE_PUMP - ENUM[71] = :SWIMMING ; NUME[:SWIMMING] = 71 ; Caption[:SWIMMING] = 'Swimming' ; CaptionNoun[:SWIMMING] = 'Swimmer' ; Type[:SWIMMING] = :Personal - ENUM[72] = :PERSUASION ; NUME[:PERSUASION] = 72 ; Caption[:PERSUASION] = 'Persuasion' ; CaptionNoun[:PERSUASION] = 'Persuader' ; Type[:PERSUASION] = :Social - ENUM[73] = :NEGOTIATION ; NUME[:NEGOTIATION] = 73 ; Caption[:NEGOTIATION] = 'Negotiation' ; CaptionNoun[:NEGOTIATION] = 'Negotiator' ; Type[:NEGOTIATION] = :Social - ENUM[74] = :JUDGING_INTENT ; NUME[:JUDGING_INTENT] = 74 ; Caption[:JUDGING_INTENT] = 'Judging Intent' ; CaptionNoun[:JUDGING_INTENT] = 'Judge of Intent' ; Type[:JUDGING_INTENT] = :Social - ENUM[75] = :APPRAISAL ; NUME[:APPRAISAL] = 75 ; Caption[:APPRAISAL] = 'Appraisal' ; CaptionNoun[:APPRAISAL] = 'Appraiser' ; Profession[:APPRAISAL] = :TRADER - ENUM[76] = :ORGANIZATION ; NUME[:ORGANIZATION] = 76 ; Caption[:ORGANIZATION] = 'Organization' ; CaptionNoun[:ORGANIZATION] = 'Organizer' ; Profession[:ORGANIZATION] = :ADMINISTRATOR - ENUM[77] = :RECORD_KEEPING ; NUME[:RECORD_KEEPING] = 77 ; Caption[:RECORD_KEEPING] = 'Record Keeping' ; CaptionNoun[:RECORD_KEEPING] = 'Record Keeper' ; Profession[:RECORD_KEEPING] = :CLERK - ENUM[78] = :LYING ; NUME[:LYING] = 78 ; Caption[:LYING] = 'Lying' ; CaptionNoun[:LYING] = 'Liar' ; Type[:LYING] = :Social - ENUM[79] = :INTIMIDATION ; NUME[:INTIMIDATION] = 79 ; Caption[:INTIMIDATION] = 'Intimidation' ; CaptionNoun[:INTIMIDATION] = 'Intimidator' ; Type[:INTIMIDATION] = :Social - ENUM[80] = :CONVERSATION ; NUME[:CONVERSATION] = 80 ; Caption[:CONVERSATION] = 'Conversation' ; CaptionNoun[:CONVERSATION] = 'Conversationalist' ; Type[:CONVERSATION] = :Social - ENUM[81] = :COMEDY ; NUME[:COMEDY] = 81 ; Caption[:COMEDY] = 'Comedy' ; CaptionNoun[:COMEDY] = 'Comedian' ; Type[:COMEDY] = :Social - ENUM[82] = :FLATTERY ; NUME[:FLATTERY] = 82 ; Caption[:FLATTERY] = 'Flattery' ; CaptionNoun[:FLATTERY] = 'Flatterer' ; Type[:FLATTERY] = :Social - ENUM[83] = :CONSOLE ; NUME[:CONSOLE] = 83 ; Caption[:CONSOLE] = 'Consoling' ; CaptionNoun[:CONSOLE] = 'Consoler' ; Type[:CONSOLE] = :Social - ENUM[84] = :PACIFY ; NUME[:PACIFY] = 84 ; Caption[:PACIFY] = 'Pacification' ; CaptionNoun[:PACIFY] = 'Pacifier' ; Type[:PACIFY] = :Social - ENUM[85] = :TRACKING ; NUME[:TRACKING] = 85 ; Caption[:TRACKING] = 'Tracking' ; CaptionNoun[:TRACKING] = 'Tracker' ; Type[:TRACKING] = :Personal - ENUM[86] = :KNOWLEDGE_ACQUISITION ; NUME[:KNOWLEDGE_ACQUISITION] = 86 ; Caption[:KNOWLEDGE_ACQUISITION] = 'Studying' ; CaptionNoun[:KNOWLEDGE_ACQUISITION] = 'Student' ; Type[:KNOWLEDGE_ACQUISITION] = :Social - ENUM[87] = :CONCENTRATION ; NUME[:CONCENTRATION] = 87 ; Caption[:CONCENTRATION] = 'Concentration' ; CaptionNoun[:CONCENTRATION] = 'Concentration' ; Type[:CONCENTRATION] = :Personal - ENUM[88] = :DISCIPLINE ; NUME[:DISCIPLINE] = 88 ; Caption[:DISCIPLINE] = 'Discipline' ; CaptionNoun[:DISCIPLINE] = 'Discipline' ; Type[:DISCIPLINE] = :Personal - ENUM[89] = :SITUATIONAL_AWARENESS ; NUME[:SITUATIONAL_AWARENESS] = 89 ; Caption[:SITUATIONAL_AWARENESS] = 'Observation' ; CaptionNoun[:SITUATIONAL_AWARENESS] = 'Observer' ; Type[:SITUATIONAL_AWARENESS] = :Personal - ENUM[90] = :WRITING ; NUME[:WRITING] = 90 ; Caption[:WRITING] = 'Writing' ; CaptionNoun[:WRITING] = 'Wordsmith' ; Type[:WRITING] = :Cultural - ENUM[91] = :PROSE ; NUME[:PROSE] = 91 ; Caption[:PROSE] = 'Prose' ; CaptionNoun[:PROSE] = 'Writer' ; Type[:PROSE] = :Cultural - ENUM[92] = :POETRY ; NUME[:POETRY] = 92 ; Caption[:POETRY] = 'Poetry' ; CaptionNoun[:POETRY] = 'Poet' ; Type[:POETRY] = :Cultural - ENUM[93] = :READING ; NUME[:READING] = 93 ; Caption[:READING] = 'Reading' ; CaptionNoun[:READING] = 'Reader' ; Type[:READING] = :Cultural - ENUM[94] = :SPEAKING ; NUME[:SPEAKING] = 94 ; Caption[:SPEAKING] = 'Speaking' ; CaptionNoun[:SPEAKING] = 'Speaker' ; Type[:SPEAKING] = :Cultural - ENUM[95] = :COORDINATION ; NUME[:COORDINATION] = 95 ; Caption[:COORDINATION] = 'Coordination' ; CaptionNoun[:COORDINATION] = 'Coordination' ; Type[:COORDINATION] = :Personal - ENUM[96] = :BALANCE ; NUME[:BALANCE] = 96 ; Caption[:BALANCE] = 'Balance' ; CaptionNoun[:BALANCE] = 'Balance' ; Type[:BALANCE] = :Personal - ENUM[97] = :LEADERSHIP ; NUME[:LEADERSHIP] = 97 ; Caption[:LEADERSHIP] = 'Leadership' ; CaptionNoun[:LEADERSHIP] = 'Leader' ; Type[:LEADERSHIP] = :Social - ENUM[98] = :TEACHING ; NUME[:TEACHING] = 98 ; Caption[:TEACHING] = 'Teaching' ; CaptionNoun[:TEACHING] = 'Teacher' ; Type[:TEACHING] = :Social - ENUM[99] = :MELEE_COMBAT ; NUME[:MELEE_COMBAT] = 99 ; Caption[:MELEE_COMBAT] = 'Fighting' ; CaptionNoun[:MELEE_COMBAT] = 'Fighter' ; Type[:MELEE_COMBAT] = :MilitaryAttack - ENUM[100] = :RANGED_COMBAT ; NUME[:RANGED_COMBAT] = 100 ; Caption[:RANGED_COMBAT] = 'Archery' ; CaptionNoun[:RANGED_COMBAT] = 'Archer' ; Type[:RANGED_COMBAT] = :MilitaryAttack - ENUM[101] = :WRESTLING ; NUME[:WRESTLING] = 101 ; Caption[:WRESTLING] = 'Wrestling' ; CaptionNoun[:WRESTLING] = 'Wrestler' ; Profession[:WRESTLING] = :WRESTLER ; Type[:WRESTLING] = :MilitaryWeapon - ENUM[102] = :BITE ; NUME[:BITE] = 102 ; Caption[:BITE] = 'Biting' ; CaptionNoun[:BITE] = 'Biter' ; Type[:BITE] = :MilitaryAttack - ENUM[103] = :GRASP_STRIKE ; NUME[:GRASP_STRIKE] = 103 ; Caption[:GRASP_STRIKE] = 'Striking' ; CaptionNoun[:GRASP_STRIKE] = 'Striker' ; Type[:GRASP_STRIKE] = :MilitaryAttack - ENUM[104] = :STANCE_STRIKE ; NUME[:STANCE_STRIKE] = 104 ; Caption[:STANCE_STRIKE] = 'Kicking' ; CaptionNoun[:STANCE_STRIKE] = 'Kicker' ; Type[:STANCE_STRIKE] = :MilitaryAttack - ENUM[105] = :DODGING ; NUME[:DODGING] = 105 ; Caption[:DODGING] = 'Dodging' ; CaptionNoun[:DODGING] = 'Dodger' ; Type[:DODGING] = :MilitaryDefense - ENUM[106] = :MISC_WEAPON ; NUME[:MISC_WEAPON] = 106 ; Caption[:MISC_WEAPON] = 'Misc. Object' ; CaptionNoun[:MISC_WEAPON] = 'Misc. Object User' ; Type[:MISC_WEAPON] = :MilitaryWeapon - ENUM[107] = :KNAPPING ; NUME[:KNAPPING] = 107 ; Caption[:KNAPPING] = 'Knapping' ; CaptionNoun[:KNAPPING] = 'Knapper' ; Type[:KNAPPING] = :MilitaryAttack - ENUM[108] = :MILITARY_TACTICS ; NUME[:MILITARY_TACTICS] = 108 ; Caption[:MILITARY_TACTICS] = 'Military Tactics' ; CaptionNoun[:MILITARY_TACTICS] = 'Military Tactics' - ENUM[109] = :SHEARING ; NUME[:SHEARING] = 109 ; Caption[:SHEARING] = 'Shearing' ; CaptionNoun[:SHEARING] = 'Shearer' ; Profession[:SHEARING] = :SHEARER ; Labor[:SHEARING] = :SHEARER - ENUM[110] = :SPINNING ; NUME[:SPINNING] = 110 ; Caption[:SPINNING] = 'Spinning' ; CaptionNoun[:SPINNING] = 'Spinner' ; Profession[:SPINNING] = :SPINNER ; Labor[:SPINNING] = :SPINNER - ENUM[111] = :POTTERY ; NUME[:POTTERY] = 111 ; Caption[:POTTERY] = 'Pottery' ; CaptionNoun[:POTTERY] = 'Potter' ; Profession[:POTTERY] = :POTTER ; Labor[:POTTERY] = :POTTERY - ENUM[112] = :GLAZING ; NUME[:GLAZING] = 112 ; Caption[:GLAZING] = 'Glazing' ; CaptionNoun[:GLAZING] = 'Glazer' ; Profession[:GLAZING] = :GLAZER ; Labor[:GLAZING] = :GLAZING - ENUM[113] = :PRESSING ; NUME[:PRESSING] = 113 ; Caption[:PRESSING] = 'Pressing' ; CaptionNoun[:PRESSING] = 'Presser' ; Profession[:PRESSING] = :PRESSER ; Labor[:PRESSING] = :PRESSING - ENUM[114] = :BEEKEEPING ; NUME[:BEEKEEPING] = 114 ; Caption[:BEEKEEPING] = 'Beekeeping' ; CaptionNoun[:BEEKEEPING] = 'Beekeeper' ; Profession[:BEEKEEPING] = :BEEKEEPER ; Labor[:BEEKEEPING] = :BEEKEEPING - ENUM[115] = :WAX_WORKING ; NUME[:WAX_WORKING] = 115 ; Caption[:WAX_WORKING] = 'Wax Working' ; CaptionNoun[:WAX_WORKING] = 'Wax Worker' ; Profession[:WAX_WORKING] = :WAX_WORKER ; Labor[:WAX_WORKING] = :WAX_WORKING -end - -class JobSkillClass < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :Normal ; NUME[:Normal] = 0 - ENUM[1] = :Medical ; NUME[:Medical] = 1 - ENUM[2] = :Personal ; NUME[:Personal] = 2 - ENUM[3] = :Social ; NUME[:Social] = 3 - ENUM[4] = :Cultural ; NUME[:Cultural] = 4 - ENUM[5] = :MilitaryWeapon ; NUME[:MilitaryWeapon] = 5 - ENUM[6] = :MilitaryAttack ; NUME[:MilitaryAttack] = 6 - ENUM[7] = :MilitaryDefense ; NUME[:MilitaryDefense] = 7 - ENUM[8] = :MilitaryMisc ; NUME[:MilitaryMisc] = 8 -end - -class JobType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - Caption = Hash.new - Type = Hash.new(:Misc) - Labor = Hash.new(:NONE) - Item = Hash.new(:NONE) - PossibleItem = Hash.new { |h, k| h[k] = [] } - Material = Hash.new - Skill = Hash.new(:NONE) - SkillStone = Hash.new(:NONE) - SkillWood = Hash.new(:NONE) - SkillMetal = Hash.new(:NONE) - ENUM[0] = :CarveFortification ; NUME[:CarveFortification] = 0 ; Caption[:CarveFortification] = 'Carve Fortification' ; Type[:CarveFortification] = :Digging ; Skill[:CarveFortification] = :MINING - ENUM[1] = :DetailWall ; NUME[:DetailWall] = 1 ; Caption[:DetailWall] = 'Detail Wall' ; Type[:DetailWall] = :Building ; Skill[:DetailWall] = :DETAILSTONE - ENUM[2] = :DetailFloor ; NUME[:DetailFloor] = 2 ; Caption[:DetailFloor] = 'Detail Floor' ; Type[:DetailFloor] = :Building ; Skill[:DetailFloor] = :DETAILSTONE - ENUM[3] = :Dig ; NUME[:Dig] = 3 ; Caption[:Dig] = 'Dig' ; Type[:Dig] = :Digging ; Skill[:Dig] = :MINING - ENUM[4] = :CarveUpwardStaircase ; NUME[:CarveUpwardStaircase] = 4 ; Caption[:CarveUpwardStaircase] = 'Carve Upward Staircase' ; Type[:CarveUpwardStaircase] = :Digging ; Skill[:CarveUpwardStaircase] = :MINING - ENUM[5] = :CarveDownwardStaircase ; NUME[:CarveDownwardStaircase] = 5 ; Caption[:CarveDownwardStaircase] = 'Carve Downward Staircase' ; Type[:CarveDownwardStaircase] = :Digging ; Skill[:CarveDownwardStaircase] = :MINING - ENUM[6] = :CarveUpDownStaircase ; NUME[:CarveUpDownStaircase] = 6 ; Caption[:CarveUpDownStaircase] = 'Carve Up/Down Staircase' ; Type[:CarveUpDownStaircase] = :Digging ; Skill[:CarveUpDownStaircase] = :MINING - ENUM[7] = :CarveRamp ; NUME[:CarveRamp] = 7 ; Caption[:CarveRamp] = 'Carve Ramp' ; Type[:CarveRamp] = :Digging ; Skill[:CarveRamp] = :MINING - ENUM[8] = :DigChannel ; NUME[:DigChannel] = 8 ; Caption[:DigChannel] = 'Dig Channel' ; Type[:DigChannel] = :Digging ; Skill[:DigChannel] = :MINING - ENUM[9] = :FellTree ; NUME[:FellTree] = 9 ; Caption[:FellTree] = 'Fell Tree' ; Type[:FellTree] = :Gathering ; Skill[:FellTree] = :WOODCUTTING ; Item[:FellTree] = :WOOD - ENUM[10] = :GatherPlants ; NUME[:GatherPlants] = 10 ; Caption[:GatherPlants] = 'Gather Plants' ; Type[:GatherPlants] = :Gathering ; Skill[:GatherPlants] = :HERBALISM ; Item[:GatherPlants] = :PLANT - ENUM[11] = :RemoveConstruction ; NUME[:RemoveConstruction] = 11 ; Caption[:RemoveConstruction] = 'Remove Construction' ; Type[:RemoveConstruction] = :Building - ENUM[12] = :CollectWebs ; NUME[:CollectWebs] = 12 ; Caption[:CollectWebs] = 'Collect Webs' ; Type[:CollectWebs] = :Gathering ; Skill[:CollectWebs] = :WEAVING ; Item[:CollectWebs] = :THREAD - ENUM[13] = :BringItemToDepot ; NUME[:BringItemToDepot] = 13 ; Caption[:BringItemToDepot] = 'Bring Item to Depot' ; Type[:BringItemToDepot] = :Hauling ; Labor[:BringItemToDepot] = :HAUL_ITEM - ENUM[14] = :BringItemToShop ; NUME[:BringItemToShop] = 14 ; Caption[:BringItemToShop] = 'Bring Item to Shop' ; Type[:BringItemToShop] = :Hauling ; Labor[:BringItemToShop] = :HAUL_ITEM - ENUM[15] = :Eat ; NUME[:Eat] = 15 ; Caption[:Eat] = 'Eat' ; Type[:Eat] = :LifeSupport - ENUM[16] = :GetProvisions ; NUME[:GetProvisions] = 16 ; Caption[:GetProvisions] = 'Get Provisions' ; Type[:GetProvisions] = :LifeSupport - ENUM[17] = :Drink ; NUME[:Drink] = 17 ; Caption[:Drink] = 'Drink' ; Type[:Drink] = :LifeSupport - ENUM[18] = :Drink2 ; NUME[:Drink2] = 18 ; Caption[:Drink2] = 'Drink' ; Type[:Drink2] = :LifeSupport - ENUM[19] = :FillWaterskin ; NUME[:FillWaterskin] = 19 ; Caption[:FillWaterskin] = 'Fill Waterskin' ; Type[:FillWaterskin] = :LifeSupport - ENUM[20] = :FillWaterskin2 ; NUME[:FillWaterskin2] = 20 ; Caption[:FillWaterskin2] = 'Fill Waterskin' ; Type[:FillWaterskin2] = :LifeSupport - ENUM[21] = :Sleep ; NUME[:Sleep] = 21 ; Caption[:Sleep] = 'Sleep' ; Type[:Sleep] = :LifeSupport - ENUM[22] = :CollectSand ; NUME[:CollectSand] = 22 ; Caption[:CollectSand] = 'Collect Sand' ; Type[:CollectSand] = :Gathering ; Labor[:CollectSand] = :HAUL_ITEM ; Item[:CollectSand] = :POWDER_MISC ; Material[:CollectSand] = 'sand' - ENUM[23] = :Fish ; NUME[:Fish] = 23 ; Caption[:Fish] = 'Fish' ; Type[:Fish] = :Gathering ; Skill[:Fish] = :FISH ; Item[:Fish] = :FISH_RAW - ENUM[24] = :Hunt ; NUME[:Hunt] = 24 ; Caption[:Hunt] = 'Hunt' ; Type[:Hunt] = :Gathering ; Skill[:Hunt] = :SNEAK ; Item[:Hunt] = :CORPSE - ENUM[25] = :HuntVermin ; NUME[:HuntVermin] = 25 ; Caption[:HuntVermin] = 'Hunt for Small Creature' ; Type[:HuntVermin] = :Gathering ; Skill[:HuntVermin] = :TRAPPING ; Item[:HuntVermin] = :REMAINS - ENUM[26] = :Kidnap ; NUME[:Kidnap] = 26 ; Caption[:Kidnap] = 'Kidnap' ; Type[:Kidnap] = :Crime - ENUM[27] = :BeatCriminal ; NUME[:BeatCriminal] = 27 ; Caption[:BeatCriminal] = 'Beat Criminal' ; Type[:BeatCriminal] = :LawEnforcement - ENUM[28] = :StartingFistFight ; NUME[:StartingFistFight] = 28 ; Caption[:StartingFistFight] = 'Starting Fist Fight' ; Type[:StartingFistFight] = :Crime - ENUM[29] = :CollectTaxes ; NUME[:CollectTaxes] = 29 ; Caption[:CollectTaxes] = 'Collect Taxes' ; Type[:CollectTaxes] = :LawEnforcement - ENUM[30] = :GuardTaxCollector ; NUME[:GuardTaxCollector] = 30 ; Caption[:GuardTaxCollector] = 'Guard Tax Collector' ; Type[:GuardTaxCollector] = :LawEnforcement - ENUM[31] = :CatchLiveLandAnimal ; NUME[:CatchLiveLandAnimal] = 31 ; Caption[:CatchLiveLandAnimal] = 'Catch Live Land Animal' ; Type[:CatchLiveLandAnimal] = :Gathering ; Skill[:CatchLiveLandAnimal] = :TRAPPING ; Item[:CatchLiveLandAnimal] = :VERMIN - ENUM[32] = :CatchLiveFish ; NUME[:CatchLiveFish] = 32 ; Caption[:CatchLiveFish] = 'Catch Live Fish' ; Type[:CatchLiveFish] = :Gathering ; Skill[:CatchLiveFish] = :FISH ; Item[:CatchLiveFish] = :VERMIN - ENUM[33] = :ReturnKill ; NUME[:ReturnKill] = 33 ; Caption[:ReturnKill] = 'Return Kill' ; Type[:ReturnKill] = :Hauling - ENUM[34] = :CheckChest ; NUME[:CheckChest] = 34 ; Caption[:CheckChest] = 'Check Chest' ; Type[:CheckChest] = :TidyUp - ENUM[35] = :StoreOwnedItem ; NUME[:StoreOwnedItem] = 35 ; Caption[:StoreOwnedItem] = 'Store Owned Item' ; Type[:StoreOwnedItem] = :TidyUp - ENUM[36] = :PlaceItemInTomb ; NUME[:PlaceItemInTomb] = 36 ; Caption[:PlaceItemInTomb] = 'Place Item in Tomb' ; Type[:PlaceItemInTomb] = :Hauling ; Labor[:PlaceItemInTomb] = :HAUL_BODY - ENUM[37] = :StoreItemInStockpile ; NUME[:StoreItemInStockpile] = 37 ; Caption[:StoreItemInStockpile] = 'Store Item in Stockpile' ; Type[:StoreItemInStockpile] = :Hauling - ENUM[38] = :StoreItemInBag ; NUME[:StoreItemInBag] = 38 ; Caption[:StoreItemInBag] = 'Store Item in Bag' ; Type[:StoreItemInBag] = :Hauling - ENUM[39] = :StoreItemInHospital ; NUME[:StoreItemInHospital] = 39 ; Caption[:StoreItemInHospital] = 'Store Item in Hospital' ; Type[:StoreItemInHospital] = :Hauling - ENUM[40] = :StoreItemInChest ; NUME[:StoreItemInChest] = 40 ; Caption[:StoreItemInChest] = 'Store Item in Chest' ; Type[:StoreItemInChest] = :Hauling - ENUM[41] = :StoreItemInCabinet ; NUME[:StoreItemInCabinet] = 41 ; Caption[:StoreItemInCabinet] = 'Store Item in Cabinet' ; Type[:StoreItemInCabinet] = :Hauling - ENUM[42] = :StoreWeapon ; NUME[:StoreWeapon] = 42 ; Caption[:StoreWeapon] = 'Store Weapon' ; Type[:StoreWeapon] = :Hauling - ENUM[43] = :StoreArmor ; NUME[:StoreArmor] = 43 ; Caption[:StoreArmor] = 'Store Armor' ; Type[:StoreArmor] = :Hauling - ENUM[44] = :StoreItemInBarrel ; NUME[:StoreItemInBarrel] = 44 ; Caption[:StoreItemInBarrel] = 'Store Item in Barrel' ; Type[:StoreItemInBarrel] = :Hauling - ENUM[45] = :StoreItemInBin ; NUME[:StoreItemInBin] = 45 ; Caption[:StoreItemInBin] = 'Store Item in Bin' ; Type[:StoreItemInBin] = :Hauling - ENUM[46] = :SeekArtifact ; NUME[:SeekArtifact] = 46 ; Caption[:SeekArtifact] = 'Seek Artifact' - ENUM[47] = :SeekInfant ; NUME[:SeekInfant] = 47 ; Caption[:SeekInfant] = 'Seek Infant' ; Type[:SeekInfant] = :LifeSupport - ENUM[48] = :AttendParty ; NUME[:AttendParty] = 48 ; Caption[:AttendParty] = 'Attend Party' ; Type[:AttendParty] = :Leisure - ENUM[49] = :GoShopping ; NUME[:GoShopping] = 49 ; Caption[:GoShopping] = 'Go Shopping' ; Type[:GoShopping] = :LifeSupport - ENUM[50] = :GoShopping2 ; NUME[:GoShopping2] = 50 ; Caption[:GoShopping2] = 'Go Shopping' ; Type[:GoShopping2] = :LifeSupport - ENUM[51] = :Clean ; NUME[:Clean] = 51 ; Caption[:Clean] = 'Clean' ; Type[:Clean] = :TidyUp - ENUM[52] = :Rest ; NUME[:Rest] = 52 ; Caption[:Rest] = 'Rest' ; Type[:Rest] = :Leisure - ENUM[53] = :PickupEquipment ; NUME[:PickupEquipment] = 53 ; Caption[:PickupEquipment] = 'Pickup Equipment' ; Type[:PickupEquipment] = :LifeSupport - ENUM[54] = :DumpItem ; NUME[:DumpItem] = 54 ; Caption[:DumpItem] = 'Dump Item' ; Type[:DumpItem] = :Hauling ; Labor[:DumpItem] = :HAUL_REFUSE - ENUM[55] = :StrangeMoodCrafter ; NUME[:StrangeMoodCrafter] = 55 ; Caption[:StrangeMoodCrafter] = 'Strange Mood (Crafter)' ; Type[:StrangeMoodCrafter] = :StrangeMood - ENUM[56] = :StrangeMoodJeweller ; NUME[:StrangeMoodJeweller] = 56 ; Caption[:StrangeMoodJeweller] = 'Strange Mood (Jeweller)' ; Type[:StrangeMoodJeweller] = :StrangeMood - ENUM[57] = :StrangeMoodForge ; NUME[:StrangeMoodForge] = 57 ; Caption[:StrangeMoodForge] = 'Strange Mood (Forge)' ; Type[:StrangeMoodForge] = :StrangeMood - ENUM[58] = :StrangeMoodMagmaForge ; NUME[:StrangeMoodMagmaForge] = 58 ; Caption[:StrangeMoodMagmaForge] = 'Strange Mood (Magma Forge)' ; Type[:StrangeMoodMagmaForge] = :StrangeMood - ENUM[59] = :StrangeMoodBrooding ; NUME[:StrangeMoodBrooding] = 59 ; Caption[:StrangeMoodBrooding] = 'Strange Mood (Brooding)' ; Type[:StrangeMoodBrooding] = :StrangeMood - ENUM[60] = :StrangeMoodFell ; NUME[:StrangeMoodFell] = 60 ; Caption[:StrangeMoodFell] = 'Strange Mood (Fell)' ; Type[:StrangeMoodFell] = :StrangeMood - ENUM[61] = :StrangeMoodCarpenter ; NUME[:StrangeMoodCarpenter] = 61 ; Caption[:StrangeMoodCarpenter] = 'Strange Mood (Carpenter)' ; Type[:StrangeMoodCarpenter] = :StrangeMood - ENUM[62] = :StrangeMoodMason ; NUME[:StrangeMoodMason] = 62 ; Caption[:StrangeMoodMason] = 'Strange Mood (Mason)' ; Type[:StrangeMoodMason] = :StrangeMood - ENUM[63] = :StrangeMoodBowyer ; NUME[:StrangeMoodBowyer] = 63 ; Caption[:StrangeMoodBowyer] = 'Strange Mood (Bowyer)' ; Type[:StrangeMoodBowyer] = :StrangeMood - ENUM[64] = :StrangeMoodTanner ; NUME[:StrangeMoodTanner] = 64 ; Caption[:StrangeMoodTanner] = 'Strange Mood (Leather)' ; Type[:StrangeMoodTanner] = :StrangeMood - ENUM[65] = :StrangeMoodWeaver ; NUME[:StrangeMoodWeaver] = 65 ; Caption[:StrangeMoodWeaver] = 'Strange Mood (Clothier)' ; Type[:StrangeMoodWeaver] = :StrangeMood - ENUM[66] = :StrangeMoodGlassmaker ; NUME[:StrangeMoodGlassmaker] = 66 ; Caption[:StrangeMoodGlassmaker] = 'Strange Mood (Glassmaker)' ; Type[:StrangeMoodGlassmaker] = :StrangeMood - ENUM[67] = :StrangeMoodMechanics ; NUME[:StrangeMoodMechanics] = 67 ; Caption[:StrangeMoodMechanics] = 'Strange Mood (Mechanics)' ; Type[:StrangeMoodMechanics] = :StrangeMood - ENUM[68] = :ConstructBuilding ; NUME[:ConstructBuilding] = 68 ; Caption[:ConstructBuilding] = 'Construct Building' ; Type[:ConstructBuilding] = :Building - ENUM[69] = :ConstructDoor ; NUME[:ConstructDoor] = 69 ; Caption[:ConstructDoor] = 'Construct Door' ; Type[:ConstructDoor] = :Manufacture ; Item[:ConstructDoor] = :DOOR - ENUM[70] = :ConstructFloodgate ; NUME[:ConstructFloodgate] = 70 ; Caption[:ConstructFloodgate] = 'Construct Floodgate' ; Type[:ConstructFloodgate] = :Manufacture ; Item[:ConstructFloodgate] = :FLOODGATE - ENUM[71] = :ConstructBed ; NUME[:ConstructBed] = 71 ; Caption[:ConstructBed] = 'Construct Bed' ; Type[:ConstructBed] = :Manufacture ; Item[:ConstructBed] = :BED - ENUM[72] = :ConstructThrone ; NUME[:ConstructThrone] = 72 ; Caption[:ConstructThrone] = 'Construct Throne' ; Type[:ConstructThrone] = :Manufacture ; Item[:ConstructThrone] = :CHAIR - ENUM[73] = :ConstructCoffin ; NUME[:ConstructCoffin] = 73 ; Caption[:ConstructCoffin] = 'Construct Coffin' ; Type[:ConstructCoffin] = :Manufacture ; Item[:ConstructCoffin] = :COFFIN - ENUM[74] = :ConstructTable ; NUME[:ConstructTable] = 74 ; Caption[:ConstructTable] = 'Construct Table' ; Type[:ConstructTable] = :Manufacture ; Item[:ConstructTable] = :TABLE - ENUM[75] = :ConstructChest ; NUME[:ConstructChest] = 75 ; Caption[:ConstructChest] = 'Construct Chest' ; Type[:ConstructChest] = :Manufacture ; Item[:ConstructChest] = :BOX - ENUM[76] = :ConstructBin ; NUME[:ConstructBin] = 76 ; Caption[:ConstructBin] = 'Construct Bin' ; Type[:ConstructBin] = :Manufacture ; Item[:ConstructBin] = :BIN - ENUM[77] = :ConstructArmorStand ; NUME[:ConstructArmorStand] = 77 ; Caption[:ConstructArmorStand] = 'Construct Armor Stand' ; Type[:ConstructArmorStand] = :Manufacture ; Item[:ConstructArmorStand] = :ARMORSTAND - ENUM[78] = :ConstructWeaponRack ; NUME[:ConstructWeaponRack] = 78 ; Caption[:ConstructWeaponRack] = 'Construct Weapon Rack' ; Type[:ConstructWeaponRack] = :Manufacture ; Item[:ConstructWeaponRack] = :WEAPONRACK - ENUM[79] = :ConstructCabinet ; NUME[:ConstructCabinet] = 79 ; Caption[:ConstructCabinet] = 'Construct Cabinet' ; Type[:ConstructCabinet] = :Manufacture ; Item[:ConstructCabinet] = :CABINET - ENUM[80] = :ConstructStatue ; NUME[:ConstructStatue] = 80 ; Caption[:ConstructStatue] = 'Construct Statue' ; Type[:ConstructStatue] = :Manufacture ; Item[:ConstructStatue] = :STATUE - ENUM[81] = :ConstructBlocks ; NUME[:ConstructBlocks] = 81 ; Caption[:ConstructBlocks] = 'Construct Blocks' ; Type[:ConstructBlocks] = :Manufacture ; Item[:ConstructBlocks] = :BLOCKS - ENUM[82] = :MakeRawGlass ; NUME[:MakeRawGlass] = 82 ; Caption[:MakeRawGlass] = 'Make Raw Glass' ; Type[:MakeRawGlass] = :Manufacture ; Item[:MakeRawGlass] = :ROUGH ; Skill[:MakeRawGlass] = :GLASSMAKER - ENUM[83] = :MakeCrafts ; NUME[:MakeCrafts] = 83 ; Caption[:MakeCrafts] = 'Make Crafts' ; Type[:MakeCrafts] = :Manufacture ; SkillWood[:MakeCrafts] = :WOODCRAFT ; SkillStone[:MakeCrafts] = :STONECRAFT ; SkillMetal[:MakeCrafts] = :METALCRAFT ; PossibleItem[:MakeCrafts] << :FIGURINE ; PossibleItem[:MakeCrafts] << :RING ; PossibleItem[:MakeCrafts] << :EARRING ; PossibleItem[:MakeCrafts] << :CROWN ; PossibleItem[:MakeCrafts] << :BRACELET ; PossibleItem[:MakeCrafts] << :SCEPTER - ENUM[84] = :MintCoins ; NUME[:MintCoins] = 84 ; Caption[:MintCoins] = 'Mint Coins' ; Type[:MintCoins] = :Manufacture ; Item[:MintCoins] = :COIN ; SkillMetal[:MintCoins] = :METALCRAFT - ENUM[85] = :CutGems ; NUME[:CutGems] = 85 ; Caption[:CutGems] = 'Cut Gems' ; Type[:CutGems] = :Manufacture ; Item[:CutGems] = :SMALLGEM ; Skill[:CutGems] = :CUTGEM - ENUM[86] = :CutGlass ; NUME[:CutGlass] = 86 ; Caption[:CutGlass] = 'Cut Glass' ; Type[:CutGlass] = :Manufacture ; Item[:CutGlass] = :SMALLGEM ; Skill[:CutGlass] = :CUTGEM - ENUM[87] = :EncrustWithGems ; NUME[:EncrustWithGems] = 87 ; Caption[:EncrustWithGems] = 'Encrust With Gems' ; Type[:EncrustWithGems] = :Improvement ; Skill[:EncrustWithGems] = :ENCRUSTGEM - ENUM[88] = :EncrustWithGlass ; NUME[:EncrustWithGlass] = 88 ; Caption[:EncrustWithGlass] = 'Encrust With Glass' ; Type[:EncrustWithGlass] = :Improvement ; Skill[:EncrustWithGlass] = :ENCRUSTGEM - ENUM[89] = :DestroyBuilding ; NUME[:DestroyBuilding] = 89 ; Caption[:DestroyBuilding] = 'Destroy Building' ; Type[:DestroyBuilding] = :Building - ENUM[90] = :SmeltOre ; NUME[:SmeltOre] = 90 ; Caption[:SmeltOre] = 'Smelt Ore' ; Type[:SmeltOre] = :Manufacture ; Item[:SmeltOre] = :BAR ; Skill[:SmeltOre] = :SMELT - ENUM[91] = :MeltMetalObject ; NUME[:MeltMetalObject] = 91 ; Caption[:MeltMetalObject] = 'Melt a Metal Object' ; Type[:MeltMetalObject] = :Manufacture ; Item[:MeltMetalObject] = :BAR ; Skill[:MeltMetalObject] = :SMELT - ENUM[92] = :ExtractMetalStrands ; NUME[:ExtractMetalStrands] = 92 ; Caption[:ExtractMetalStrands] = 'Extract Metal Strands' ; Type[:ExtractMetalStrands] = :Manufacture ; Item[:ExtractMetalStrands] = :THREAD ; Skill[:ExtractMetalStrands] = :EXTRACT_STRAND - ENUM[93] = :PlantSeeds ; NUME[:PlantSeeds] = 93 ; Caption[:PlantSeeds] = 'Plant Seeds' ; Type[:PlantSeeds] = :Gathering ; Skill[:PlantSeeds] = :PLANT - ENUM[94] = :HarvestPlants ; NUME[:HarvestPlants] = 94 ; Caption[:HarvestPlants] = 'Harvest Plants' ; Type[:HarvestPlants] = :Gathering ; Skill[:HarvestPlants] = :PLANT ; Item[:HarvestPlants] = :PLANT - ENUM[95] = :TrainHuntingAnimal ; NUME[:TrainHuntingAnimal] = 95 ; Caption[:TrainHuntingAnimal] = 'Train Hunting Animal' ; Type[:TrainHuntingAnimal] = :UnitHandling ; Skill[:TrainHuntingAnimal] = :ANIMALTRAIN - ENUM[96] = :TrainWarAnimal ; NUME[:TrainWarAnimal] = 96 ; Caption[:TrainWarAnimal] = 'Train War Animal' ; Type[:TrainWarAnimal] = :UnitHandling ; Skill[:TrainWarAnimal] = :ANIMALTRAIN - ENUM[97] = :MakeWeapon ; NUME[:MakeWeapon] = 97 ; Caption[:MakeWeapon] = 'Forge Weapon' ; Type[:MakeWeapon] = :Manufacture ; Item[:MakeWeapon] = :WEAPON ; SkillMetal[:MakeWeapon] = :FORGE_WEAPON - ENUM[98] = :ForgeAnvil ; NUME[:ForgeAnvil] = 98 ; Caption[:ForgeAnvil] = 'Forge Anvil' ; Type[:ForgeAnvil] = :Manufacture ; Item[:ForgeAnvil] = :ANVIL - ENUM[99] = :ConstructCatapultParts ; NUME[:ConstructCatapultParts] = 99 ; Caption[:ConstructCatapultParts] = 'Construct Catapult Parts' ; Type[:ConstructCatapultParts] = :Manufacture ; Item[:ConstructCatapultParts] = :CATAPULTPARTS ; Skill[:ConstructCatapultParts] = :SIEGECRAFT - ENUM[100] = :ConstructBallistaParts ; NUME[:ConstructBallistaParts] = 100 ; Caption[:ConstructBallistaParts] = 'Construct Ballista Parts' ; Type[:ConstructBallistaParts] = :Manufacture ; Item[:ConstructBallistaParts] = :BALLISTAPARTS ; Skill[:ConstructBallistaParts] = :SIEGECRAFT - ENUM[101] = :MakeArmor ; NUME[:MakeArmor] = 101 ; Caption[:MakeArmor] = 'Make Armor' ; Type[:MakeArmor] = :Manufacture ; Item[:MakeArmor] = :ARMOR ; SkillMetal[:MakeArmor] = :FORGE_ARMOR - ENUM[102] = :MakeHelm ; NUME[:MakeHelm] = 102 ; Caption[:MakeHelm] = 'Forge Helm' ; Type[:MakeHelm] = :Manufacture ; Item[:MakeHelm] = :HELM ; SkillMetal[:MakeHelm] = :FORGE_ARMOR - ENUM[103] = :MakePants ; NUME[:MakePants] = 103 ; Caption[:MakePants] = 'Make Pants' ; Type[:MakePants] = :Manufacture ; Item[:MakePants] = :PANTS ; SkillMetal[:MakePants] = :FORGE_ARMOR - ENUM[104] = :StudWith ; NUME[:StudWith] = 104 ; Caption[:StudWith] = 'Stud With' ; Type[:StudWith] = :Improvement - ENUM[105] = :ButcherAnimal ; NUME[:ButcherAnimal] = 105 ; Caption[:ButcherAnimal] = 'Butcher an Animal' ; Type[:ButcherAnimal] = :Manufacture ; Skill[:ButcherAnimal] = :BUTCHER ; PossibleItem[:ButcherAnimal] << :MEAT ; PossibleItem[:ButcherAnimal] << :CORPSEPIECE ; PossibleItem[:ButcherAnimal] << :GLOB - ENUM[106] = :PrepareRawFish ; NUME[:PrepareRawFish] = 106 ; Caption[:PrepareRawFish] = 'Prepare a Raw Fish' ; Type[:PrepareRawFish] = :Manufacture ; Item[:PrepareRawFish] = :FISH ; Skill[:PrepareRawFish] = :PROCESSFISH - ENUM[107] = :MillPlants ; NUME[:MillPlants] = 107 ; Caption[:MillPlants] = 'Mill Plants' ; Type[:MillPlants] = :Manufacture ; Item[:MillPlants] = :POWDER_MISC ; Skill[:MillPlants] = :MILLING - ENUM[108] = :BaitTrap ; NUME[:BaitTrap] = 108 ; Caption[:BaitTrap] = 'Bait Trap' ; Type[:BaitTrap] = :Hauling ; Skill[:BaitTrap] = :TRAPPING - ENUM[109] = :MilkCreature ; NUME[:MilkCreature] = 109 ; Caption[:MilkCreature] = 'Milk Creature' ; Type[:MilkCreature] = :Gathering ; Item[:MilkCreature] = :LIQUID_MISC ; Skill[:MilkCreature] = :MILK - ENUM[110] = :MakeCheese ; NUME[:MakeCheese] = 110 ; Caption[:MakeCheese] = 'Make Cheese' ; Type[:MakeCheese] = :Manufacture ; Item[:MakeCheese] = :CHEESE ; Skill[:MakeCheese] = :CHEESEMAKING - ENUM[111] = :ProcessPlants ; NUME[:ProcessPlants] = 111 ; Caption[:ProcessPlants] = 'Process Plants' ; Type[:ProcessPlants] = :Manufacture ; Item[:ProcessPlants] = :THREAD ; Skill[:ProcessPlants] = :PROCESSPLANTS - ENUM[112] = :ProcessPlantsBag ; NUME[:ProcessPlantsBag] = 112 ; Caption[:ProcessPlantsBag] = 'Process Plants (Bag)' ; Type[:ProcessPlantsBag] = :Manufacture ; Item[:ProcessPlantsBag] = :LEAVES ; Skill[:ProcessPlantsBag] = :PROCESSPLANTS - ENUM[113] = :ProcessPlantsVial ; NUME[:ProcessPlantsVial] = 113 ; Caption[:ProcessPlantsVial] = 'Process Plants (Vial)' ; Type[:ProcessPlantsVial] = :Manufacture ; Item[:ProcessPlantsVial] = :LIQUID_MISC ; Skill[:ProcessPlantsVial] = :PROCESSPLANTS - ENUM[114] = :ProcessPlantsBarrel ; NUME[:ProcessPlantsBarrel] = 114 ; Caption[:ProcessPlantsBarrel] = 'Process Plants (Barrel)' ; Type[:ProcessPlantsBarrel] = :Manufacture ; Item[:ProcessPlantsBarrel] = :LIQUID_MISC ; Skill[:ProcessPlantsBarrel] = :PROCESSPLANTS - ENUM[115] = :PrepareMeal ; NUME[:PrepareMeal] = 115 ; Caption[:PrepareMeal] = 'Prepare Meal' ; Type[:PrepareMeal] = :Manufacture ; Item[:PrepareMeal] = :FOOD ; Skill[:PrepareMeal] = :COOK - ENUM[116] = :WeaveCloth ; NUME[:WeaveCloth] = 116 ; Caption[:WeaveCloth] = 'Weave Cloth' ; Type[:WeaveCloth] = :Manufacture ; Item[:WeaveCloth] = :CLOTH ; Skill[:WeaveCloth] = :WEAVING - ENUM[117] = :MakeGloves ; NUME[:MakeGloves] = 117 ; Caption[:MakeGloves] = 'Make Gloves' ; Type[:MakeGloves] = :Manufacture ; Item[:MakeGloves] = :GLOVES ; SkillMetal[:MakeGloves] = :FORGE_ARMOR - ENUM[118] = :MakeShoes ; NUME[:MakeShoes] = 118 ; Caption[:MakeShoes] = 'Make Shoes' ; Type[:MakeShoes] = :Manufacture ; Item[:MakeShoes] = :SHOES ; SkillMetal[:MakeShoes] = :FORGE_ARMOR - ENUM[119] = :MakeShield ; NUME[:MakeShield] = 119 ; Caption[:MakeShield] = 'Make Shield' ; Item[:MakeShield] = :SHIELD ; SkillMetal[:MakeShield] = :FORGE_ARMOR - ENUM[120] = :MakeCage ; NUME[:MakeCage] = 120 ; Caption[:MakeCage] = 'Make Cage' ; Type[:MakeCage] = :Manufacture ; Item[:MakeCage] = :CAGE - ENUM[121] = :MakeChain ; NUME[:MakeChain] = 121 ; Caption[:MakeChain] = 'Make Chain' ; Type[:MakeChain] = :Manufacture ; Item[:MakeChain] = :CHAIN ; SkillMetal[:MakeChain] = :METALCRAFT - ENUM[122] = :MakeFlask ; NUME[:MakeFlask] = 122 ; Caption[:MakeFlask] = 'Make Flask' ; Type[:MakeFlask] = :Manufacture ; Item[:MakeFlask] = :FLASK ; SkillMetal[:MakeFlask] = :METALCRAFT - ENUM[123] = :MakeGoblet ; NUME[:MakeGoblet] = 123 ; Caption[:MakeGoblet] = 'Make Goblet' ; Type[:MakeGoblet] = :Manufacture ; Item[:MakeGoblet] = :GOBLET ; SkillWood[:MakeGoblet] = :WOODCRAFT ; SkillStone[:MakeGoblet] = :STONECRAFT ; SkillMetal[:MakeGoblet] = :METALCRAFT - ENUM[124] = :MakeInstrument ; NUME[:MakeInstrument] = 124 ; Caption[:MakeInstrument] = 'Make Instrument' ; Type[:MakeInstrument] = :Manufacture ; Item[:MakeInstrument] = :INSTRUMENT ; SkillWood[:MakeInstrument] = :WOODCRAFT ; SkillStone[:MakeInstrument] = :STONECRAFT ; SkillMetal[:MakeInstrument] = :METALCRAFT - ENUM[125] = :MakeToy ; NUME[:MakeToy] = 125 ; Caption[:MakeToy] = 'Make Toy' ; Type[:MakeToy] = :Manufacture ; Item[:MakeToy] = :TOY ; SkillWood[:MakeToy] = :WOODCRAFT ; SkillStone[:MakeToy] = :STONECRAFT ; SkillMetal[:MakeToy] = :METALCRAFT - ENUM[126] = :MakeAnimalTrap ; NUME[:MakeAnimalTrap] = 126 ; Caption[:MakeAnimalTrap] = 'Make Animal Trap' ; Type[:MakeAnimalTrap] = :Manufacture ; Item[:MakeAnimalTrap] = :ANIMALTRAP ; Skill[:MakeAnimalTrap] = :TRAPPING - ENUM[127] = :MakeBarrel ; NUME[:MakeBarrel] = 127 ; Caption[:MakeBarrel] = 'Make Barrel' ; Type[:MakeBarrel] = :Manufacture ; Item[:MakeBarrel] = :BARREL - ENUM[128] = :MakeBucket ; NUME[:MakeBucket] = 128 ; Caption[:MakeBucket] = 'Make Bucket' ; Type[:MakeBucket] = :Manufacture ; Item[:MakeBucket] = :BUCKET - ENUM[129] = :MakeWindow ; NUME[:MakeWindow] = 129 ; Caption[:MakeWindow] = 'Make Window' ; Type[:MakeWindow] = :Manufacture ; Item[:MakeWindow] = :WINDOW - ENUM[130] = :MakeTotem ; NUME[:MakeTotem] = 130 ; Caption[:MakeTotem] = 'Make Totem' ; Type[:MakeTotem] = :Manufacture ; Skill[:MakeTotem] = :BONECARVE ; Item[:MakeTotem] = :TOTEM - ENUM[131] = :MakeAmmo ; NUME[:MakeAmmo] = 131 ; Caption[:MakeAmmo] = 'Make Ammo' ; Type[:MakeAmmo] = :Manufacture ; Item[:MakeAmmo] = :AMMO ; SkillWood[:MakeAmmo] = :WOODCRAFT ; SkillStone[:MakeAmmo] = :STONECRAFT ; SkillMetal[:MakeAmmo] = :FORGE_WEAPON - ENUM[132] = :DecorateWith ; NUME[:DecorateWith] = 132 ; Caption[:DecorateWith] = 'Decorate With' ; Type[:DecorateWith] = :Improvement - ENUM[133] = :MakeBackpack ; NUME[:MakeBackpack] = 133 ; Caption[:MakeBackpack] = 'Make Backpack' ; Type[:MakeBackpack] = :Manufacture ; Item[:MakeBackpack] = :BACKPACK - ENUM[134] = :MakeQuiver ; NUME[:MakeQuiver] = 134 ; Caption[:MakeQuiver] = 'Make Quiver' ; Type[:MakeQuiver] = :Manufacture ; Item[:MakeQuiver] = :QUIVER - ENUM[135] = :MakeBallistaArrowHead ; NUME[:MakeBallistaArrowHead] = 135 ; Caption[:MakeBallistaArrowHead] = 'Make Ballista Arrow Head' ; Type[:MakeBallistaArrowHead] = :Manufacture ; Item[:MakeBallistaArrowHead] = :BALLISTAARROWHEAD ; SkillMetal[:MakeBallistaArrowHead] = :FORGE_WEAPON - ENUM[136] = :AssembleSiegeAmmo ; NUME[:AssembleSiegeAmmo] = 136 ; Caption[:AssembleSiegeAmmo] = 'Assemble Siege Ammo' ; Type[:AssembleSiegeAmmo] = :Manufacture ; Item[:AssembleSiegeAmmo] = :SIEGEAMMO ; Skill[:AssembleSiegeAmmo] = :SIEGECRAFT - ENUM[137] = :LoadCatapult ; NUME[:LoadCatapult] = 137 ; Caption[:LoadCatapult] = 'Load Catapult' ; Type[:LoadCatapult] = :SiegeWeapon ; Skill[:LoadCatapult] = :SIEGEOPERATE - ENUM[138] = :LoadBallista ; NUME[:LoadBallista] = 138 ; Caption[:LoadBallista] = 'Load Ballista' ; Type[:LoadBallista] = :SiegeWeapon ; Skill[:LoadBallista] = :SIEGEOPERATE - ENUM[139] = :FireCatapult ; NUME[:FireCatapult] = 139 ; Caption[:FireCatapult] = 'Fire Catapult' ; Type[:FireCatapult] = :SiegeWeapon ; Skill[:FireCatapult] = :SIEGEOPERATE - ENUM[140] = :FireBallista ; NUME[:FireBallista] = 140 ; Caption[:FireBallista] = 'Fire Ballista' ; Type[:FireBallista] = :SiegeWeapon ; Skill[:FireBallista] = :SIEGEOPERATE - ENUM[141] = :ConstructMechanisms ; NUME[:ConstructMechanisms] = 141 ; Caption[:ConstructMechanisms] = 'Construct Mechanisms' ; Type[:ConstructMechanisms] = :Manufacture ; Item[:ConstructMechanisms] = :TRAPPARTS ; Skill[:ConstructMechanisms] = :MECHANICS - ENUM[142] = :MakeTrapComponent ; NUME[:MakeTrapComponent] = 142 ; Caption[:MakeTrapComponent] = 'MakeTrapComponent' ; Type[:MakeTrapComponent] = :Manufacture ; Item[:MakeTrapComponent] = :TRAPCOMP ; SkillMetal[:MakeTrapComponent] = :FORGE_WEAPON - ENUM[143] = :LoadCageTrap ; NUME[:LoadCageTrap] = 143 ; Caption[:LoadCageTrap] = 'Load Cage Trap' ; Type[:LoadCageTrap] = :Hauling ; Skill[:LoadCageTrap] = :MECHANICS - ENUM[144] = :LoadStoneTrap ; NUME[:LoadStoneTrap] = 144 ; Caption[:LoadStoneTrap] = 'Load Stone Trap' ; Type[:LoadStoneTrap] = :Hauling ; Skill[:LoadStoneTrap] = :MECHANICS - ENUM[145] = :LoadWeaponTrap ; NUME[:LoadWeaponTrap] = 145 ; Caption[:LoadWeaponTrap] = 'Load Weapon Trap' ; Type[:LoadWeaponTrap] = :Hauling ; Skill[:LoadWeaponTrap] = :MECHANICS - ENUM[146] = :CleanTrap ; NUME[:CleanTrap] = 146 ; Caption[:CleanTrap] = 'Clean Trap' ; Type[:CleanTrap] = :TidyUp ; Skill[:CleanTrap] = :MECHANICS - ENUM[147] = :CastSpell ; NUME[:CastSpell] = 147 ; Caption[:CastSpell] = 'Cast Spell' - ENUM[148] = :LinkBuildingToTrigger ; NUME[:LinkBuildingToTrigger] = 148 ; Caption[:LinkBuildingToTrigger] = 'Link a Building to Trigger' ; Type[:LinkBuildingToTrigger] = :Building ; Skill[:LinkBuildingToTrigger] = :MECHANICS - ENUM[149] = :PullLever ; NUME[:PullLever] = 149 ; Caption[:PullLever] = 'Pull the Lever' - ENUM[150] = :BrewDrink ; NUME[:BrewDrink] = 150 ; Caption[:BrewDrink] = 'Brew Drink' ; Type[:BrewDrink] = :Manufacture ; Item[:BrewDrink] = :DRINK ; Skill[:BrewDrink] = :BREWING - ENUM[151] = :ExtractFromPlants ; NUME[:ExtractFromPlants] = 151 ; Caption[:ExtractFromPlants] = 'Extract from Plants' ; Type[:ExtractFromPlants] = :Manufacture ; PossibleItem[:ExtractFromPlants] << :LIQUID_MISC ; Skill[:ExtractFromPlants] = :BREWING - ENUM[152] = :ExtractFromRawFish ; NUME[:ExtractFromRawFish] = 152 ; Caption[:ExtractFromRawFish] = 'Extract from Raw Fish' ; Type[:ExtractFromRawFish] = :Manufacture ; PossibleItem[:ExtractFromRawFish] << :LIQUID_MISC ; Skill[:ExtractFromRawFish] = :DISSECT_FISH - ENUM[153] = :ExtractFromLandAnimal ; NUME[:ExtractFromLandAnimal] = 153 ; Caption[:ExtractFromLandAnimal] = 'Extract from Land Animal' ; Type[:ExtractFromLandAnimal] = :Manufacture ; PossibleItem[:ExtractFromLandAnimal] << :LIQUID_MISC ; Skill[:ExtractFromLandAnimal] = :DISSECT_VERMIN - ENUM[154] = :TameVermin ; NUME[:TameVermin] = 154 ; Caption[:TameVermin] = 'Tame Small Animal' ; Type[:TameVermin] = :UnitHandling ; Skill[:TameVermin] = :ANIMALTRAIN - ENUM[155] = :TameAnimal ; NUME[:TameAnimal] = 155 ; Caption[:TameAnimal] = 'Tame ?something?' ; Type[:TameAnimal] = :UnitHandling ; Skill[:TameAnimal] = :ANIMALTRAIN - ENUM[156] = :ChainAnimal ; NUME[:ChainAnimal] = 156 ; Caption[:ChainAnimal] = 'Chain Animal' ; Type[:ChainAnimal] = :UnitHandling - ENUM[157] = :UnchainAnimal ; NUME[:UnchainAnimal] = 157 ; Caption[:UnchainAnimal] = 'Unchain Animal' ; Type[:UnchainAnimal] = :UnitHandling - ENUM[158] = :UnchainPet ; NUME[:UnchainPet] = 158 ; Caption[:UnchainPet] = 'Unchain Pet' ; Type[:UnchainPet] = :UnitHandling - ENUM[159] = :ReleaseLargeCreature ; NUME[:ReleaseLargeCreature] = 159 ; Caption[:ReleaseLargeCreature] = 'Release Large Creature' ; Type[:ReleaseLargeCreature] = :UnitHandling - ENUM[160] = :ReleasePet ; NUME[:ReleasePet] = 160 ; Caption[:ReleasePet] = 'Release Pet' ; Type[:ReleasePet] = :UnitHandling - ENUM[161] = :ReleaseSmallCreature ; NUME[:ReleaseSmallCreature] = 161 ; Caption[:ReleaseSmallCreature] = 'Release Small Creature' ; Type[:ReleaseSmallCreature] = :UnitHandling - ENUM[162] = :HandleSmallCreature ; NUME[:HandleSmallCreature] = 162 ; Caption[:HandleSmallCreature] = 'Handle Small Creature' ; Type[:HandleSmallCreature] = :UnitHandling - ENUM[163] = :HandleLargeCreature ; NUME[:HandleLargeCreature] = 163 ; Caption[:HandleLargeCreature] = 'Handle Large Creature' ; Type[:HandleLargeCreature] = :UnitHandling - ENUM[164] = :CageLargeCreature ; NUME[:CageLargeCreature] = 164 ; Caption[:CageLargeCreature] = 'Cage Large Creature' ; Type[:CageLargeCreature] = :UnitHandling - ENUM[165] = :CageSmallCreature ; NUME[:CageSmallCreature] = 165 ; Caption[:CageSmallCreature] = 'Cage Small Creature' ; Type[:CageSmallCreature] = :UnitHandling - ENUM[166] = :RecoverWounded ; NUME[:RecoverWounded] = 166 ; Caption[:RecoverWounded] = 'Recover Wounded' ; Type[:RecoverWounded] = :Hauling ; Labor[:RecoverWounded] = :RECOVER_WOUNDED - ENUM[167] = :DiagnosePatient ; NUME[:DiagnosePatient] = 167 ; Caption[:DiagnosePatient] = 'Diagnose Patient' ; Type[:DiagnosePatient] = :Medicine ; Skill[:DiagnosePatient] = :DIAGNOSE - ENUM[168] = :ImmobilizeBreak ; NUME[:ImmobilizeBreak] = 168 ; Caption[:ImmobilizeBreak] = 'Immobilize Break' ; Type[:ImmobilizeBreak] = :Medicine ; Skill[:ImmobilizeBreak] = :SET_BONE - ENUM[169] = :DressWound ; NUME[:DressWound] = 169 ; Caption[:DressWound] = 'Dress Wound' ; Type[:DressWound] = :Medicine ; Skill[:DressWound] = :DRESS_WOUNDS - ENUM[170] = :CleanPatient ; NUME[:CleanPatient] = 170 ; Caption[:CleanPatient] = 'Clean Patient' ; Type[:CleanPatient] = :Medicine ; Labor[:CleanPatient] = :CLEAN - ENUM[171] = :Surgery ; NUME[:Surgery] = 171 ; Caption[:Surgery] = 'Surgery' ; Type[:Surgery] = :Medicine ; Skill[:Surgery] = :SURGERY - ENUM[172] = :Suture ; NUME[:Suture] = 172 ; Caption[:Suture] = 'Suture' ; Type[:Suture] = :Medicine ; Skill[:Suture] = :SUTURE - ENUM[173] = :SetBone ; NUME[:SetBone] = 173 ; Caption[:SetBone] = 'Set Bone' ; Type[:SetBone] = :Medicine ; Skill[:SetBone] = :SET_BONE - ENUM[174] = :PlaceInTraction ; NUME[:PlaceInTraction] = 174 ; Caption[:PlaceInTraction] = 'Place In Traction' ; Type[:PlaceInTraction] = :Medicine ; Skill[:PlaceInTraction] = :SET_BONE - ENUM[175] = :DrainAquarium ; NUME[:DrainAquarium] = 175 ; Caption[:DrainAquarium] = 'Drain Aquarium' ; Type[:DrainAquarium] = :Hauling - ENUM[176] = :FillAquarium ; NUME[:FillAquarium] = 176 ; Caption[:FillAquarium] = 'Fill Aquarium' ; Type[:FillAquarium] = :Hauling - ENUM[177] = :FillPond ; NUME[:FillPond] = 177 ; Caption[:FillPond] = 'Fill Pond' ; Type[:FillPond] = :Hauling - ENUM[178] = :GiveWater ; NUME[:GiveWater] = 178 ; Caption[:GiveWater] = 'Give Water' ; Type[:GiveWater] = :LifeSupport ; Labor[:GiveWater] = :FEED_WATER_CIVILIANS - ENUM[179] = :GiveFood ; NUME[:GiveFood] = 179 ; Caption[:GiveFood] = 'Give Food' ; Type[:GiveFood] = :LifeSupport ; Labor[:GiveFood] = :FEED_WATER_CIVILIANS - ENUM[180] = :GiveWater2 ; NUME[:GiveWater2] = 180 ; Caption[:GiveWater2] = 'Give Water' ; Type[:GiveWater2] = :LifeSupport ; Labor[:GiveWater2] = :FEED_WATER_CIVILIANS - ENUM[181] = :GiveFood2 ; NUME[:GiveFood2] = 181 ; Caption[:GiveFood2] = 'Give Food' ; Type[:GiveFood2] = :LifeSupport ; Labor[:GiveFood2] = :FEED_WATER_CIVILIANS - ENUM[182] = :RecoverPet ; NUME[:RecoverPet] = 182 ; Caption[:RecoverPet] = 'Recover Pet' ; Type[:RecoverPet] = :UnitHandling - ENUM[183] = :PitLargeAnimal ; NUME[:PitLargeAnimal] = 183 ; Caption[:PitLargeAnimal] = 'Pit/Pond Large Animal' ; Type[:PitLargeAnimal] = :UnitHandling - ENUM[184] = :PitSmallAnimal ; NUME[:PitSmallAnimal] = 184 ; Caption[:PitSmallAnimal] = 'Pit/Pond Small Animal' ; Type[:PitSmallAnimal] = :UnitHandling - ENUM[185] = :SlaughterAnimal ; NUME[:SlaughterAnimal] = 185 ; Caption[:SlaughterAnimal] = 'Slaughter Animal' ; Type[:SlaughterAnimal] = :Gathering ; Skill[:SlaughterAnimal] = :BUTCHER ; PossibleItem[:SlaughterAnimal] << :MEAT ; PossibleItem[:SlaughterAnimal] << :CORPSEPIECE ; PossibleItem[:SlaughterAnimal] << :GLOB - ENUM[186] = :MakeCharcoal ; NUME[:MakeCharcoal] = 186 ; Caption[:MakeCharcoal] = 'Make Charcoal' ; Type[:MakeCharcoal] = :Manufacture ; Item[:MakeCharcoal] = :BAR ; Material[:MakeCharcoal] = 'COAL' ; Skill[:MakeCharcoal] = :WOOD_BURNING - ENUM[187] = :MakeAsh ; NUME[:MakeAsh] = 187 ; Caption[:MakeAsh] = 'Make Ash' ; Type[:MakeAsh] = :Manufacture ; Item[:MakeAsh] = :BAR ; Material[:MakeAsh] = 'ASH' ; Skill[:MakeAsh] = :WOOD_BURNING - ENUM[188] = :MakeLye ; NUME[:MakeLye] = 188 ; Caption[:MakeLye] = 'Make Lye' ; Type[:MakeLye] = :Manufacture ; Item[:MakeLye] = :LIQUID_MISC ; Material[:MakeLye] = 'LYE' ; Skill[:MakeLye] = :LYE_MAKING - ENUM[189] = :MakePotashFromLye ; NUME[:MakePotashFromLye] = 189 ; Caption[:MakePotashFromLye] = 'Make Potash From Lye' ; Type[:MakePotashFromLye] = :Manufacture ; Item[:MakePotashFromLye] = :BAR ; Material[:MakePotashFromLye] = 'POTASH' ; Skill[:MakePotashFromLye] = :POTASH_MAKING - ENUM[190] = :FertilizeField ; NUME[:FertilizeField] = 190 ; Caption[:FertilizeField] = 'Fertilize Field' - ENUM[191] = :MakePotashFromAsh ; NUME[:MakePotashFromAsh] = 191 ; Caption[:MakePotashFromAsh] = 'Make Potash From Ash' ; Type[:MakePotashFromAsh] = :Manufacture ; Item[:MakePotashFromAsh] = :BAR ; Material[:MakePotashFromAsh] = 'POTASH' ; Skill[:MakePotashFromAsh] = :POTASH_MAKING - ENUM[192] = :DyeThread ; NUME[:DyeThread] = 192 ; Caption[:DyeThread] = 'Dye Thread' ; Type[:DyeThread] = :Improvement ; Skill[:DyeThread] = :DYER - ENUM[193] = :DyeCloth ; NUME[:DyeCloth] = 193 ; Caption[:DyeCloth] = 'Dye Cloth' ; Type[:DyeCloth] = :Improvement ; Skill[:DyeCloth] = :DYER - ENUM[194] = :SewImage ; NUME[:SewImage] = 194 ; Caption[:SewImage] = 'Sew Image' ; Type[:SewImage] = :Improvement - ENUM[195] = :MakePipeSection ; NUME[:MakePipeSection] = 195 ; Caption[:MakePipeSection] = 'Make Pipe Section' ; Type[:MakePipeSection] = :Manufacture ; Item[:MakePipeSection] = :PIPE_SECTION - ENUM[196] = :OperatePump ; NUME[:OperatePump] = 196 ; Caption[:OperatePump] = 'Operate Pump' ; Skill[:OperatePump] = :OPERATE_PUMP - ENUM[197] = :ManageWorkOrders ; NUME[:ManageWorkOrders] = 197 ; Caption[:ManageWorkOrders] = 'Manage Work Orders' ; Skill[:ManageWorkOrders] = :ORGANIZATION - ENUM[198] = :UpdateStockpileRecords ; NUME[:UpdateStockpileRecords] = 198 ; Caption[:UpdateStockpileRecords] = 'Update Stockpile Records' ; Skill[:UpdateStockpileRecords] = :RECORD_KEEPING - ENUM[199] = :TradeAtDepot ; NUME[:TradeAtDepot] = 199 ; Caption[:TradeAtDepot] = 'Trade at Depot' ; Skill[:TradeAtDepot] = :APPRAISAL - ENUM[200] = :ConstructHatchCover ; NUME[:ConstructHatchCover] = 200 ; Caption[:ConstructHatchCover] = 'Construct Hatch Cover' ; Type[:ConstructHatchCover] = :Manufacture ; Item[:ConstructHatchCover] = :HATCH_COVER - ENUM[201] = :ConstructGrate ; NUME[:ConstructGrate] = 201 ; Caption[:ConstructGrate] = 'Construct Grate' ; Type[:ConstructGrate] = :Manufacture ; Item[:ConstructGrate] = :GRATE - ENUM[202] = :RemoveStairs ; NUME[:RemoveStairs] = 202 ; Caption[:RemoveStairs] = 'Remove Stairs/Ramps' ; Type[:RemoveStairs] = :Digging ; Skill[:RemoveStairs] = :MINING - ENUM[203] = :ConstructQuern ; NUME[:ConstructQuern] = 203 ; Caption[:ConstructQuern] = 'Construct Quern' ; Type[:ConstructQuern] = :Manufacture ; Item[:ConstructQuern] = :QUERN - ENUM[204] = :ConstructMillstone ; NUME[:ConstructMillstone] = 204 ; Caption[:ConstructMillstone] = 'Construct Millstone' ; Type[:ConstructMillstone] = :Manufacture ; Item[:ConstructMillstone] = :MILLSTONE - ENUM[205] = :ConstructSplint ; NUME[:ConstructSplint] = 205 ; Caption[:ConstructSplint] = 'Construct Splint' ; Type[:ConstructSplint] = :Manufacture ; Item[:ConstructSplint] = :SPLINT - ENUM[206] = :ConstructCrutch ; NUME[:ConstructCrutch] = 206 ; Caption[:ConstructCrutch] = 'Construct Crutch' ; Type[:ConstructCrutch] = :Manufacture ; Item[:ConstructCrutch] = :CRUTCH - ENUM[207] = :ConstructTractionBench ; NUME[:ConstructTractionBench] = 207 ; Caption[:ConstructTractionBench] = 'Construct Traction Bench' ; Type[:ConstructTractionBench] = :Manufacture ; Item[:ConstructTractionBench] = :TRACTION_BENCH ; Skill[:ConstructTractionBench] = :MECHANICS - ENUM[208] = :CleanSelf ; NUME[:CleanSelf] = 208 ; Caption[:CleanSelf] = 'Clean Self' ; Type[:CleanSelf] = :TidyUp - ENUM[209] = :BringCrutch ; NUME[:BringCrutch] = 209 ; Caption[:BringCrutch] = 'Bring Crutch' ; Type[:BringCrutch] = :Medicine - ENUM[210] = :ApplyCast ; NUME[:ApplyCast] = 210 ; Caption[:ApplyCast] = 'Apply Cast' ; Type[:ApplyCast] = :Medicine ; Skill[:ApplyCast] = :SET_BONE - ENUM[211] = :CustomReaction ; NUME[:CustomReaction] = 211 ; Caption[:CustomReaction] = 'Custom Reaction' - ENUM[212] = :ConstructSlab ; NUME[:ConstructSlab] = 212 ; Caption[:ConstructSlab] = 'Construct Slab' ; Type[:ConstructSlab] = :Manufacture ; Item[:ConstructSlab] = :SLAB - ENUM[213] = :EngraveSlab ; NUME[:EngraveSlab] = 213 ; Caption[:EngraveSlab] = 'Engrave Memorial Slab' ; Type[:EngraveSlab] = :Improvement - ENUM[214] = :ShearCreature ; NUME[:ShearCreature] = 214 ; Caption[:ShearCreature] = 'Shear Creature' ; Type[:ShearCreature] = :Gathering ; Item[:ShearCreature] = :CORPSEPIECE ; Skill[:ShearCreature] = :SHEARING - ENUM[215] = :SpinThread ; NUME[:SpinThread] = 215 ; Caption[:SpinThread] = 'Spin Thread' - ENUM[216] = :PenLargeAnimal ; NUME[:PenLargeAnimal] = 216 ; Caption[:PenLargeAnimal] = 'Pen/Pasture Large Animal' ; Type[:PenLargeAnimal] = :UnitHandling - ENUM[217] = :PenSmallAnimal ; NUME[:PenSmallAnimal] = 217 ; Caption[:PenSmallAnimal] = 'Pen/Pasture Small Animal' ; Type[:PenSmallAnimal] = :UnitHandling - ENUM[218] = :MakeTool ; NUME[:MakeTool] = 218 ; Caption[:MakeTool] = 'Make Tool' ; Type[:MakeTool] = :Manufacture ; Item[:MakeTool] = :TOOL ; SkillWood[:MakeTool] = :WOODCRAFT ; SkillStone[:MakeTool] = :STONECRAFT - ENUM[219] = :CollectClay ; NUME[:CollectClay] = 219 ; Caption[:CollectClay] = 'Collect Clay' ; Type[:CollectClay] = :Gathering ; Item[:CollectClay] = :BOULDER ; Material[:CollectClay] = 'clay' - ENUM[220] = :InstallColonyInHive ; NUME[:InstallColonyInHive] = 220 ; Caption[:InstallColonyInHive] = 'Install Colony In Hive' - ENUM[221] = :CollectHiveProducts ; NUME[:CollectHiveProducts] = 221 ; Caption[:CollectHiveProducts] = 'Collect Hive Products' ; Type[:CollectHiveProducts] = :Gathering - ENUM[222] = :CauseTrouble ; NUME[:CauseTrouble] = 222 ; Caption[:CauseTrouble] = 'Cause Trouble' ; Type[:CauseTrouble] = :Crime - ENUM[223] = :DrinkBlood ; NUME[:DrinkBlood] = 223 ; Caption[:DrinkBlood] = 'On Break' ; Type[:DrinkBlood] = :Crime - ENUM[224] = :ReportCrime ; NUME[:ReportCrime] = 224 ; Caption[:ReportCrime] = 'Report Crime' ; Type[:ReportCrime] = :LawEnforcement - ENUM[225] = :ExecuteCriminal ; NUME[:ExecuteCriminal] = 225 ; Caption[:ExecuteCriminal] = 'Execute Criminal' ; Type[:ExecuteCriminal] = :LawEnforcement - ENUM[226] = :TrainAnimal ; NUME[:TrainAnimal] = 226 ; Caption[:TrainAnimal] = 'Train Animal' ; Type[:TrainAnimal] = :UnitHandling ; Skill[:TrainAnimal] = :ANIMALTRAIN - ENUM[227] = :CarveTrack ; NUME[:CarveTrack] = 227 ; Caption[:CarveTrack] = 'Carve Track' ; Type[:CarveTrack] = :Building - ENUM[228] = :PushTrackVehicle ; NUME[:PushTrackVehicle] = 228 ; Caption[:PushTrackVehicle] = 'Push Track Vehicle' ; Type[:PushTrackVehicle] = :Hauling - ENUM[229] = :PlaceTrackVehicle ; NUME[:PlaceTrackVehicle] = 229 ; Caption[:PlaceTrackVehicle] = 'Place Track Vehicle' ; Type[:PlaceTrackVehicle] = :Hauling - ENUM[230] = :StoreItemInVehicle ; NUME[:StoreItemInVehicle] = 230 ; Caption[:StoreItemInVehicle] = 'Store Item in Vehicle' ; Type[:StoreItemInVehicle] = :Hauling -end - -class JobTypeClass < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :Misc ; NUME[:Misc] = 0 - ENUM[1] = :Digging ; NUME[:Digging] = 1 - ENUM[2] = :Building ; NUME[:Building] = 2 - ENUM[3] = :Hauling ; NUME[:Hauling] = 3 - ENUM[4] = :LifeSupport ; NUME[:LifeSupport] = 4 - ENUM[5] = :TidyUp ; NUME[:TidyUp] = 5 - ENUM[6] = :Leisure ; NUME[:Leisure] = 6 - ENUM[7] = :Gathering ; NUME[:Gathering] = 7 - ENUM[8] = :Manufacture ; NUME[:Manufacture] = 8 - ENUM[9] = :Improvement ; NUME[:Improvement] = 9 - ENUM[10] = :Crime ; NUME[:Crime] = 10 - ENUM[11] = :LawEnforcement ; NUME[:LawEnforcement] = 11 - ENUM[12] = :StrangeMood ; NUME[:StrangeMood] = 12 - ENUM[13] = :UnitHandling ; NUME[:UnitHandling] = 13 - ENUM[14] = :SiegeWeapon ; NUME[:SiegeWeapon] = 14 - ENUM[15] = :Medicine ; NUME[:Medicine] = 15 -end - -class LanguageWordFlags < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :FRONT_COMPOUND_NOUN_SING ; NUME[:FRONT_COMPOUND_NOUN_SING] = 0 - ENUM[1] = :FRONT_COMPOUND_NOUN_PLUR ; NUME[:FRONT_COMPOUND_NOUN_PLUR] = 1 - ENUM[2] = :FRONT_COMPOUND_ADJ ; NUME[:FRONT_COMPOUND_ADJ] = 2 - ENUM[3] = :FRONT_COMPOUND_PREFIX ; NUME[:FRONT_COMPOUND_PREFIX] = 3 - ENUM[4] = :REAR_COMPOUND_NOUN_SING ; NUME[:REAR_COMPOUND_NOUN_SING] = 4 - ENUM[5] = :REAR_COMPOUND_NOUN_PLUR ; NUME[:REAR_COMPOUND_NOUN_PLUR] = 5 - ENUM[6] = :REAR_COMPOUND_ADJ ; NUME[:REAR_COMPOUND_ADJ] = 6 - ENUM[7] = :THE_NOUN_SING ; NUME[:THE_NOUN_SING] = 7 - ENUM[8] = :THE_NOUN_PLUR ; NUME[:THE_NOUN_PLUR] = 8 - ENUM[9] = :THE_COMPOUND_NOUN_SING ; NUME[:THE_COMPOUND_NOUN_SING] = 9 - ENUM[10] = :THE_COMPOUND_NOUN_PLUR ; NUME[:THE_COMPOUND_NOUN_PLUR] = 10 - ENUM[11] = :THE_COMPOUND_ADJ ; NUME[:THE_COMPOUND_ADJ] = 11 - ENUM[12] = :THE_COMPOUND_PREFIX ; NUME[:THE_COMPOUND_PREFIX] = 12 - ENUM[13] = :OF_NOUN_SING ; NUME[:OF_NOUN_SING] = 13 - ENUM[14] = :OF_NOUN_PLUR ; NUME[:OF_NOUN_PLUR] = 14 - ENUM[15] = :STANDARD_VERB ; NUME[:STANDARD_VERB] = 15 -end - -class MachineType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :Standard ; NUME[:Standard] = 0 -end - -class MaterialFlags < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - Type = Hash.new(:None) - ENUM[0] = :BONE ; NUME[:BONE] = 0 ; Type[:BONE] = :Bone - ENUM[1] = :MEAT ; NUME[:MEAT] = 1 - ENUM[2] = :EDIBLE_VERMIN ; NUME[:EDIBLE_VERMIN] = 2 - ENUM[3] = :EDIBLE_RAW ; NUME[:EDIBLE_RAW] = 3 - ENUM[4] = :EDIBLE_COOKED ; NUME[:EDIBLE_COOKED] = 4 - ENUM[5] = :ALCOHOL ; NUME[:ALCOHOL] = 5 - ENUM[6] = :ITEMS_METAL ; NUME[:ITEMS_METAL] = 6 - ENUM[7] = :ITEMS_BARRED ; NUME[:ITEMS_BARRED] = 7 - ENUM[8] = :ITEMS_SCALED ; NUME[:ITEMS_SCALED] = 8 - ENUM[9] = :ITEMS_LEATHER ; NUME[:ITEMS_LEATHER] = 9 - ENUM[10] = :ITEMS_SOFT ; NUME[:ITEMS_SOFT] = 10 - ENUM[11] = :ITEMS_HARD ; NUME[:ITEMS_HARD] = 11 - ENUM[12] = :IMPLIES_ANIMAL_KILL ; NUME[:IMPLIES_ANIMAL_KILL] = 12 - ENUM[13] = :ALCOHOL_PLANT ; NUME[:ALCOHOL_PLANT] = 13 - ENUM[14] = :ALCOHOL_CREATURE ; NUME[:ALCOHOL_CREATURE] = 14 - ENUM[15] = :CHEESE_PLANT ; NUME[:CHEESE_PLANT] = 15 - ENUM[16] = :CHEESE_CREATURE ; NUME[:CHEESE_CREATURE] = 16 - ENUM[17] = :POWDER_MISC_PLANT ; NUME[:POWDER_MISC_PLANT] = 17 - ENUM[18] = :POWDER_MISC_CREATURE ; NUME[:POWDER_MISC_CREATURE] = 18 - ENUM[19] = :STOCKPILE_GLOB ; NUME[:STOCKPILE_GLOB] = 19 - ENUM[20] = :LIQUID_MISC_PLANT ; NUME[:LIQUID_MISC_PLANT] = 20 - ENUM[21] = :LIQUID_MISC_CREATURE ; NUME[:LIQUID_MISC_CREATURE] = 21 - ENUM[22] = :LIQUID_MISC_OTHER ; NUME[:LIQUID_MISC_OTHER] = 22 - ENUM[23] = :WOOD ; NUME[:WOOD] = 23 ; Type[:WOOD] = :Wood - ENUM[24] = :THREAD_PLANT ; NUME[:THREAD_PLANT] = 24 ; Type[:THREAD_PLANT] = :Cloth - ENUM[25] = :TOOTH ; NUME[:TOOTH] = 25 ; Type[:TOOTH] = :Ivory - ENUM[26] = :HORN ; NUME[:HORN] = 26 ; Type[:HORN] = :Horn - ENUM[27] = :PEARL ; NUME[:PEARL] = 27 ; Type[:PEARL] = :Pearl - ENUM[28] = :SHELL ; NUME[:SHELL] = 28 ; Type[:SHELL] = :Shell - ENUM[29] = :LEATHER ; NUME[:LEATHER] = 29 ; Type[:LEATHER] = :Leather - ENUM[30] = :SILK ; NUME[:SILK] = 30 ; Type[:SILK] = :Cloth - ENUM[31] = :SOAP ; NUME[:SOAP] = 31 - ENUM[32] = :ROTS ; NUME[:ROTS] = 32 - ENUM[33] = :IS_DYE ; NUME[:IS_DYE] = 33 - ENUM[34] = :POWDER_MISC ; NUME[:POWDER_MISC] = 34 - ENUM[35] = :LIQUID_MISC ; NUME[:LIQUID_MISC] = 35 - ENUM[36] = :STRUCTURAL_PLANT_MAT ; NUME[:STRUCTURAL_PLANT_MAT] = 36 - ENUM[37] = :SEED_MAT ; NUME[:SEED_MAT] = 37 - ENUM[38] = :LEAF_MAT ; NUME[:LEAF_MAT] = 38 - ENUM[39] = :CHEESE ; NUME[:CHEESE] = 39 - ENUM[40] = :ENTERS_BLOOD ; NUME[:ENTERS_BLOOD] = 40 - ENUM[41] = :BLOOD_MAP_DESCRIPTOR ; NUME[:BLOOD_MAP_DESCRIPTOR] = 41 - ENUM[42] = :ICHOR_MAP_DESCRIPTOR ; NUME[:ICHOR_MAP_DESCRIPTOR] = 42 - ENUM[43] = :GOO_MAP_DESCRIPTOR ; NUME[:GOO_MAP_DESCRIPTOR] = 43 - ENUM[44] = :SLIME_MAP_DESCRIPTOR ; NUME[:SLIME_MAP_DESCRIPTOR] = 44 - ENUM[45] = :PUS_MAP_DESCRIPTOR ; NUME[:PUS_MAP_DESCRIPTOR] = 45 - ENUM[46] = :GENERATES_MIASMA ; NUME[:GENERATES_MIASMA] = 46 - ENUM[47] = :IS_METAL ; NUME[:IS_METAL] = 47 ; Type[:IS_METAL] = :Metal - ENUM[48] = :IS_GEM ; NUME[:IS_GEM] = 48 ; Type[:IS_GEM] = :Gem - ENUM[49] = :IS_GLASS ; NUME[:IS_GLASS] = 49 ; Type[:IS_GLASS] = :Glass - ENUM[50] = :CRYSTAL_GLASSABLE ; NUME[:CRYSTAL_GLASSABLE] = 50 - ENUM[51] = :ITEMS_WEAPON ; NUME[:ITEMS_WEAPON] = 51 - ENUM[52] = :ITEMS_WEAPON_RANGED ; NUME[:ITEMS_WEAPON_RANGED] = 52 - ENUM[53] = :ITEMS_ANVIL ; NUME[:ITEMS_ANVIL] = 53 - ENUM[54] = :ITEMS_AMMO ; NUME[:ITEMS_AMMO] = 54 - ENUM[55] = :ITEMS_DIGGER ; NUME[:ITEMS_DIGGER] = 55 - ENUM[56] = :ITEMS_ARMOR ; NUME[:ITEMS_ARMOR] = 56 - ENUM[57] = :ITEMS_DELICATE ; NUME[:ITEMS_DELICATE] = 57 - ENUM[58] = :ITEMS_SIEGE_ENGINE ; NUME[:ITEMS_SIEGE_ENGINE] = 58 - ENUM[59] = :ITEMS_QUERN ; NUME[:ITEMS_QUERN] = 59 - ENUM[60] = :IS_STONE ; NUME[:IS_STONE] = 60 ; Type[:IS_STONE] = :Stone - ENUM[61] = :UNDIGGABLE ; NUME[:UNDIGGABLE] = 61 - ENUM[62] = :YARN ; NUME[:YARN] = 62 ; Type[:YARN] = :Cloth - ENUM[63] = :STOCKPILE_GLOB_PASTE ; NUME[:STOCKPILE_GLOB_PASTE] = 63 - ENUM[64] = :STOCKPILE_GLOB_PRESSED ; NUME[:STOCKPILE_GLOB_PRESSED] = 64 - ENUM[65] = :DISPLAY_UNGLAZED ; NUME[:DISPLAY_UNGLAZED] = 65 - ENUM[66] = :DO_NOT_CLEAN_GLOB ; NUME[:DO_NOT_CLEAN_GLOB] = 66 - ENUM[67] = :NO_STONE_STOCKPILE ; NUME[:NO_STONE_STOCKPILE] = 67 - ENUM[68] = :STOCKPILE_THREAD_METAL ; NUME[:STOCKPILE_THREAD_METAL] = 68 -end - -class MatterState < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :Solid ; NUME[:Solid] = 0 - ENUM[1] = :Liquid ; NUME[:Liquid] = 1 - ENUM[2] = :Gas ; NUME[:Gas] = 2 - ENUM[3] = :Powder ; NUME[:Powder] = 3 - ENUM[4] = :Paste ; NUME[:Paste] = 4 - ENUM[5] = :Pressed ; NUME[:Pressed] = 5 -end - -class MentalAttributeType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :ANALYTICAL_ABILITY ; NUME[:ANALYTICAL_ABILITY] = 0 - ENUM[1] = :FOCUS ; NUME[:FOCUS] = 1 - ENUM[2] = :WILLPOWER ; NUME[:WILLPOWER] = 2 - ENUM[3] = :CREATIVITY ; NUME[:CREATIVITY] = 3 - ENUM[4] = :INTUITION ; NUME[:INTUITION] = 4 - ENUM[5] = :PATIENCE ; NUME[:PATIENCE] = 5 - ENUM[6] = :MEMORY ; NUME[:MEMORY] = 6 - ENUM[7] = :LINGUISTIC_ABILITY ; NUME[:LINGUISTIC_ABILITY] = 7 - ENUM[8] = :SPATIAL_SENSE ; NUME[:SPATIAL_SENSE] = 8 - ENUM[9] = :MUSICALITY ; NUME[:MUSICALITY] = 9 - ENUM[10] = :KINESTHETIC_SENSE ; NUME[:KINESTHETIC_SENSE] = 10 - ENUM[11] = :EMPATHY ; NUME[:EMPATHY] = 11 - ENUM[12] = :SOCIAL_AWARENESS ; NUME[:SOCIAL_AWARENESS] = 12 -end - -class MiscTraitType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - Tag = Hash.new - ENUM[7] = :Migrant ; NUME[:Migrant] = 7 - ENUM[8] = :RoomComplaint ; NUME[:RoomComplaint] = 8 - ENUM[9] = :UnnamedResident ; NUME[:UnnamedResident] = 9 - ENUM[11] = :ClaimTrinketCooldown ; NUME[:ClaimTrinketCooldown] = 11 - ENUM[12] = :ClaimClothingCooldown ; NUME[:ClaimClothingCooldown] = 12 - ENUM[13] = :WantsDrink ; NUME[:WantsDrink] = 13 ; Tag[:WantsDrink] = 'ALCOHOLIC' - ENUM[14] = :LikesOutdoors ; NUME[:LikesOutdoors] = 14 ; Tag[:LikesOutdoors] = 'MOUNTAIN' - ENUM[15] = :Hardened ; NUME[:Hardened] = 15 ; Tag[:Hardened] = 'COMBATHARDNESS' - ENUM[16] = :TimeSinceBreak ; NUME[:TimeSinceBreak] = 16 ; Tag[:TimeSinceBreak] = 'TIME_SINCE_BREAK' - ENUM[17] = :OnBreak ; NUME[:OnBreak] = 17 ; Tag[:OnBreak] = 'ON_BREAK' - ENUM[19] = :CaveAdapt ; NUME[:CaveAdapt] = 19 ; Tag[:CaveAdapt] = 'CAVE_ADAPT' - ENUM[32] = :PartiedOut ; NUME[:PartiedOut] = 32 ; Tag[:PartiedOut] = 'PARTIED_OUT' - ENUM[44] = :MilkCounter ; NUME[:MilkCounter] = 44 ; Tag[:MilkCounter] = 'MILK_COUNTER' - ENUM[47] = :EggSpent ; NUME[:EggSpent] = 47 ; Tag[:EggSpent] = 'EGG_SPENT' - ENUM[48] = :GroundedAnimalAnger ; NUME[:GroundedAnimalAnger] = 48 ; Tag[:GroundedAnimalAnger] = 'GROUNDED_ANIMAL_ANGER' - ENUM[50] = :TimeSinceSuckedBlood ; NUME[:TimeSinceSuckedBlood] = 50 ; Tag[:TimeSinceSuckedBlood] = 'TIME_SINCE_SUCKED_BLOOD' - ENUM[51] = :DrinkingBlood ; NUME[:DrinkingBlood] = 51 ; Tag[:DrinkingBlood] = 'DRINKING_BLOOD' -end - -class MoodType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[-1] = :None ; NUME[:None] = -1 - ENUM[0] = :Fey ; NUME[:Fey] = 0 - ENUM[1] = :Secretive ; NUME[:Secretive] = 1 - ENUM[2] = :Possessed ; NUME[:Possessed] = 2 - ENUM[3] = :Macabre ; NUME[:Macabre] = 3 - ENUM[4] = :Fell ; NUME[:Fell] = 4 - ENUM[5] = :Melancholy ; NUME[:Melancholy] = 5 - ENUM[6] = :Raving ; NUME[:Raving] = 6 - ENUM[7] = :Berserk ; NUME[:Berserk] = 7 - ENUM[8] = :Baby ; NUME[:Baby] = 8 - ENUM[9] = :Traumatized ; NUME[:Traumatized] = 9 -end - -class OrganicMatCategory < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :Meat ; NUME[:Meat] = 0 - ENUM[1] = :Fish ; NUME[:Fish] = 1 - ENUM[2] = :UnpreparedFish ; NUME[:UnpreparedFish] = 2 - ENUM[3] = :Eggs ; NUME[:Eggs] = 3 - ENUM[4] = :Plants ; NUME[:Plants] = 4 - ENUM[5] = :PlantDrink ; NUME[:PlantDrink] = 5 - ENUM[6] = :CreatureDrink ; NUME[:CreatureDrink] = 6 - ENUM[7] = :PlantCheese ; NUME[:PlantCheese] = 7 - ENUM[8] = :CreatureCheese ; NUME[:CreatureCheese] = 8 - ENUM[9] = :Seed ; NUME[:Seed] = 9 - ENUM[10] = :Leaf ; NUME[:Leaf] = 10 - ENUM[11] = :PlantPowder ; NUME[:PlantPowder] = 11 - ENUM[12] = :CreaturePowder ; NUME[:CreaturePowder] = 12 - ENUM[13] = :Glob ; NUME[:Glob] = 13 - ENUM[14] = :PlantLiquid ; NUME[:PlantLiquid] = 14 - ENUM[15] = :CreatureLiquid ; NUME[:CreatureLiquid] = 15 - ENUM[16] = :MiscLiquid ; NUME[:MiscLiquid] = 16 - ENUM[17] = :Leather ; NUME[:Leather] = 17 - ENUM[18] = :Silk ; NUME[:Silk] = 18 - ENUM[19] = :PlantFiber ; NUME[:PlantFiber] = 19 - ENUM[20] = :Bone ; NUME[:Bone] = 20 - ENUM[21] = :Shell ; NUME[:Shell] = 21 - ENUM[22] = :Wood ; NUME[:Wood] = 22 - ENUM[23] = :Horn ; NUME[:Horn] = 23 - ENUM[24] = :Pearl ; NUME[:Pearl] = 24 - ENUM[25] = :Tooth ; NUME[:Tooth] = 25 - ENUM[26] = :EdibleCheese ; NUME[:EdibleCheese] = 26 - ENUM[27] = :AnyDrink ; NUME[:AnyDrink] = 27 - ENUM[28] = :EdiblePlant ; NUME[:EdiblePlant] = 28 - ENUM[29] = :CookableLiquid ; NUME[:CookableLiquid] = 29 - ENUM[30] = :CookablePowder ; NUME[:CookablePowder] = 30 - ENUM[31] = :CookableSeed ; NUME[:CookableSeed] = 31 - ENUM[32] = :CookableLeaf ; NUME[:CookableLeaf] = 32 - ENUM[33] = :Paste ; NUME[:Paste] = 33 - ENUM[34] = :Pressed ; NUME[:Pressed] = 34 - ENUM[35] = :Yarn ; NUME[:Yarn] = 35 - ENUM[36] = :MetalThread ; NUME[:MetalThread] = 36 -end - -class PantsFlags < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :METAL_ARMOR_LEVELS ; NUME[:METAL_ARMOR_LEVELS] = 0 -end - -class PartOfSpeech < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :Noun ; NUME[:Noun] = 0 - ENUM[1] = :NounPlural ; NUME[:NounPlural] = 1 - ENUM[2] = :Adjective ; NUME[:Adjective] = 2 - ENUM[3] = :Prefix ; NUME[:Prefix] = 3 - ENUM[4] = :Verb ; NUME[:Verb] = 4 - ENUM[5] = :Verb3rdPerson ; NUME[:Verb3rdPerson] = 5 - ENUM[6] = :VerbPast ; NUME[:VerbPast] = 6 - ENUM[7] = :VerbPassive ; NUME[:VerbPassive] = 7 - ENUM[8] = :VerbGerund ; NUME[:VerbGerund] = 8 -end - -class PatternType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :MONOTONE ; NUME[:MONOTONE] = 0 - ENUM[1] = :STRIPES ; NUME[:STRIPES] = 1 - ENUM[2] = :IRIS_EYE ; NUME[:IRIS_EYE] = 2 - ENUM[3] = :SPOTS ; NUME[:SPOTS] = 3 - ENUM[4] = :PUPIL_EYE ; NUME[:PUPIL_EYE] = 4 - ENUM[5] = :MOTTLED ; NUME[:MOTTLED] = 5 -end - -class PersonalityFacetType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :ANXIETY ; NUME[:ANXIETY] = 0 - ENUM[1] = :ANGER ; NUME[:ANGER] = 1 - ENUM[2] = :DEPRESSION ; NUME[:DEPRESSION] = 2 - ENUM[3] = :SELF_CONSCIOUSNESS ; NUME[:SELF_CONSCIOUSNESS] = 3 - ENUM[4] = :IMMODERATION ; NUME[:IMMODERATION] = 4 - ENUM[5] = :VULNERABILITY ; NUME[:VULNERABILITY] = 5 - ENUM[6] = :FRIENDLINESS ; NUME[:FRIENDLINESS] = 6 - ENUM[7] = :GREGARIOUSNESS ; NUME[:GREGARIOUSNESS] = 7 - ENUM[8] = :ASSERTIVENESS ; NUME[:ASSERTIVENESS] = 8 - ENUM[9] = :ACTIVITY_LEVEL ; NUME[:ACTIVITY_LEVEL] = 9 - ENUM[10] = :EXCITEMENT_SEEKING ; NUME[:EXCITEMENT_SEEKING] = 10 - ENUM[11] = :CHEERFULNESS ; NUME[:CHEERFULNESS] = 11 - ENUM[12] = :IMAGINATION ; NUME[:IMAGINATION] = 12 - ENUM[13] = :ARTISTIC_INTEREST ; NUME[:ARTISTIC_INTEREST] = 13 - ENUM[14] = :EMOTIONALITY ; NUME[:EMOTIONALITY] = 14 - ENUM[15] = :ADVENTUROUSNESS ; NUME[:ADVENTUROUSNESS] = 15 - ENUM[16] = :INTELLECTUAL_CURIOSITY ; NUME[:INTELLECTUAL_CURIOSITY] = 16 - ENUM[17] = :LIBERALISM ; NUME[:LIBERALISM] = 17 - ENUM[18] = :TRUST ; NUME[:TRUST] = 18 - ENUM[19] = :STRAIGHTFORWARDNESS ; NUME[:STRAIGHTFORWARDNESS] = 19 - ENUM[20] = :ALTRUISM ; NUME[:ALTRUISM] = 20 - ENUM[21] = :COOPERATION ; NUME[:COOPERATION] = 21 - ENUM[22] = :MODESTY ; NUME[:MODESTY] = 22 - ENUM[23] = :SYMPATHY ; NUME[:SYMPATHY] = 23 - ENUM[24] = :SELF_EFFICACY ; NUME[:SELF_EFFICACY] = 24 - ENUM[25] = :ORDERLINESS ; NUME[:ORDERLINESS] = 25 - ENUM[26] = :DUTIFULNESS ; NUME[:DUTIFULNESS] = 26 - ENUM[27] = :ACHIEVEMENT_STRIVING ; NUME[:ACHIEVEMENT_STRIVING] = 27 - ENUM[28] = :SELF_DISCIPLINE ; NUME[:SELF_DISCIPLINE] = 28 - ENUM[29] = :CAUTIOUSNESS ; NUME[:CAUTIOUSNESS] = 29 -end - -class PhysicalAttributeType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :STRENGTH ; NUME[:STRENGTH] = 0 - ENUM[1] = :AGILITY ; NUME[:AGILITY] = 1 - ENUM[2] = :TOUGHNESS ; NUME[:TOUGHNESS] = 2 - ENUM[3] = :ENDURANCE ; NUME[:ENDURANCE] = 3 - ENUM[4] = :RECUPERATION ; NUME[:RECUPERATION] = 4 - ENUM[5] = :DISEASE_RESISTANCE ; NUME[:DISEASE_RESISTANCE] = 5 -end - -class PlantRawFlags < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :SPRING ; NUME[:SPRING] = 0 - ENUM[1] = :SUMMER ; NUME[:SUMMER] = 1 - ENUM[2] = :AUTUMN ; NUME[:AUTUMN] = 2 - ENUM[3] = :WINTER ; NUME[:WINTER] = 3 - ENUM[5] = :SEED ; NUME[:SEED] = 5 - ENUM[6] = :LEAVES ; NUME[:LEAVES] = 6 - ENUM[7] = :DRINK ; NUME[:DRINK] = 7 - ENUM[8] = :EXTRACT_BARREL ; NUME[:EXTRACT_BARREL] = 8 - ENUM[9] = :EXTRACT_VIAL ; NUME[:EXTRACT_VIAL] = 9 - ENUM[10] = :EXTRACT_STILL_VIAL ; NUME[:EXTRACT_STILL_VIAL] = 10 - ENUM[12] = :THREAD ; NUME[:THREAD] = 12 - ENUM[13] = :MILL ; NUME[:MILL] = 13 - ENUM[20] = :WET ; NUME[:WET] = 20 - ENUM[21] = :DRY ; NUME[:DRY] = 21 - ENUM[22] = :BIOME_MOUNTAIN ; NUME[:BIOME_MOUNTAIN] = 22 - ENUM[23] = :BIOME_GLACIER ; NUME[:BIOME_GLACIER] = 23 - ENUM[24] = :BIOME_TUNDRA ; NUME[:BIOME_TUNDRA] = 24 - ENUM[25] = :BIOME_SWAMP_TEMPERATE_FRESHWATER ; NUME[:BIOME_SWAMP_TEMPERATE_FRESHWATER] = 25 - ENUM[26] = :BIOME_SWAMP_TEMPERATE_SALTWATER ; NUME[:BIOME_SWAMP_TEMPERATE_SALTWATER] = 26 - ENUM[27] = :BIOME_MARSH_TEMPERATE_FRESHWATER ; NUME[:BIOME_MARSH_TEMPERATE_FRESHWATER] = 27 - ENUM[28] = :BIOME_MARSH_TEMPERATE_SALTWATER ; NUME[:BIOME_MARSH_TEMPERATE_SALTWATER] = 28 - ENUM[29] = :BIOME_SWAMP_TROPICAL_FRESHWATER ; NUME[:BIOME_SWAMP_TROPICAL_FRESHWATER] = 29 - ENUM[30] = :BIOME_SWAMP_TROPICAL_SALTWATER ; NUME[:BIOME_SWAMP_TROPICAL_SALTWATER] = 30 - ENUM[31] = :BIOME_SWAMP_MANGROVE ; NUME[:BIOME_SWAMP_MANGROVE] = 31 - ENUM[32] = :BIOME_MARSH_TROPICAL_FRESHWATER ; NUME[:BIOME_MARSH_TROPICAL_FRESHWATER] = 32 - ENUM[33] = :BIOME_MARSH_TROPICAL_SALTWATER ; NUME[:BIOME_MARSH_TROPICAL_SALTWATER] = 33 - ENUM[34] = :BIOME_FOREST_TAIGA ; NUME[:BIOME_FOREST_TAIGA] = 34 - ENUM[35] = :BIOME_FOREST_TEMPERATE_CONIFER ; NUME[:BIOME_FOREST_TEMPERATE_CONIFER] = 35 - ENUM[36] = :BIOME_FOREST_TEMPERATE_BROADLEAF ; NUME[:BIOME_FOREST_TEMPERATE_BROADLEAF] = 36 - ENUM[37] = :BIOME_FOREST_TROPICAL_CONIFER ; NUME[:BIOME_FOREST_TROPICAL_CONIFER] = 37 - ENUM[38] = :BIOME_FOREST_TROPICAL_DRY_BROADLEAF ; NUME[:BIOME_FOREST_TROPICAL_DRY_BROADLEAF] = 38 - ENUM[39] = :BIOME_FOREST_TROPICAL_MOIST_BROADLEAF ; NUME[:BIOME_FOREST_TROPICAL_MOIST_BROADLEAF] = 39 - ENUM[40] = :BIOME_GRASSLAND_TEMPERATE ; NUME[:BIOME_GRASSLAND_TEMPERATE] = 40 - ENUM[41] = :BIOME_SAVANNA_TEMPERATE ; NUME[:BIOME_SAVANNA_TEMPERATE] = 41 - ENUM[42] = :BIOME_SHRUBLAND_TEMPERATE ; NUME[:BIOME_SHRUBLAND_TEMPERATE] = 42 - ENUM[43] = :BIOME_GRASSLAND_TROPICAL ; NUME[:BIOME_GRASSLAND_TROPICAL] = 43 - ENUM[44] = :BIOME_SAVANNA_TROPICAL ; NUME[:BIOME_SAVANNA_TROPICAL] = 44 - ENUM[45] = :BIOME_SHRUBLAND_TROPICAL ; NUME[:BIOME_SHRUBLAND_TROPICAL] = 45 - ENUM[46] = :BIOME_DESERT_BADLAND ; NUME[:BIOME_DESERT_BADLAND] = 46 - ENUM[47] = :BIOME_DESERT_ROCK ; NUME[:BIOME_DESERT_ROCK] = 47 - ENUM[48] = :BIOME_DESERT_SAND ; NUME[:BIOME_DESERT_SAND] = 48 - ENUM[49] = :BIOME_OCEAN_TROPICAL ; NUME[:BIOME_OCEAN_TROPICAL] = 49 - ENUM[50] = :BIOME_OCEAN_TEMPERATE ; NUME[:BIOME_OCEAN_TEMPERATE] = 50 - ENUM[51] = :BIOME_OCEAN_ARCTIC ; NUME[:BIOME_OCEAN_ARCTIC] = 51 - ENUM[52] = :BIOME_POOL_TEMPERATE_FRESHWATER ; NUME[:BIOME_POOL_TEMPERATE_FRESHWATER] = 52 - ENUM[53] = :BIOME_SUBTERRANEAN_WATER ; NUME[:BIOME_SUBTERRANEAN_WATER] = 53 - ENUM[54] = :BIOME_SUBTERRANEAN_CHASM ; NUME[:BIOME_SUBTERRANEAN_CHASM] = 54 - ENUM[55] = :BIOME_SUBTERRANEAN_LAVA ; NUME[:BIOME_SUBTERRANEAN_LAVA] = 55 - ENUM[56] = :GOOD ; NUME[:GOOD] = 56 - ENUM[57] = :EVIL ; NUME[:EVIL] = 57 - ENUM[58] = :SAVAGE ; NUME[:SAVAGE] = 58 - ENUM[59] = :BIOME_POOL_TEMPERATE_BRACKISHWATER ; NUME[:BIOME_POOL_TEMPERATE_BRACKISHWATER] = 59 - ENUM[60] = :BIOME_POOL_TEMPERATE_SALTWATER ; NUME[:BIOME_POOL_TEMPERATE_SALTWATER] = 60 - ENUM[61] = :BIOME_POOL_TROPICAL_FRESHWATER ; NUME[:BIOME_POOL_TROPICAL_FRESHWATER] = 61 - ENUM[62] = :BIOME_POOL_TROPICAL_BRACKISHWATER ; NUME[:BIOME_POOL_TROPICAL_BRACKISHWATER] = 62 - ENUM[63] = :BIOME_POOL_TROPICAL_SALTWATER ; NUME[:BIOME_POOL_TROPICAL_SALTWATER] = 63 - ENUM[64] = :BIOME_LAKE_TEMPERATE_FRESHWATER ; NUME[:BIOME_LAKE_TEMPERATE_FRESHWATER] = 64 - ENUM[65] = :BIOME_LAKE_TEMPERATE_BRACKISHWATER ; NUME[:BIOME_LAKE_TEMPERATE_BRACKISHWATER] = 65 - ENUM[66] = :BIOME_LAKE_TEMPERATE_SALTWATER ; NUME[:BIOME_LAKE_TEMPERATE_SALTWATER] = 66 - ENUM[67] = :BIOME_LAKE_TROPICAL_FRESHWATER ; NUME[:BIOME_LAKE_TROPICAL_FRESHWATER] = 67 - ENUM[68] = :BIOME_LAKE_TROPICAL_BRACKISHWATER ; NUME[:BIOME_LAKE_TROPICAL_BRACKISHWATER] = 68 - ENUM[69] = :BIOME_LAKE_TROPICAL_SALTWATER ; NUME[:BIOME_LAKE_TROPICAL_SALTWATER] = 69 - ENUM[70] = :BIOME_RIVER_TEMPERATE_FRESHWATER ; NUME[:BIOME_RIVER_TEMPERATE_FRESHWATER] = 70 - ENUM[71] = :BIOME_RIVER_TEMPERATE_BRACKISHWATER ; NUME[:BIOME_RIVER_TEMPERATE_BRACKISHWATER] = 71 - ENUM[72] = :BIOME_RIVER_TEMPERATE_SALTWATER ; NUME[:BIOME_RIVER_TEMPERATE_SALTWATER] = 72 - ENUM[73] = :BIOME_RIVER_TROPICAL_FRESHWATER ; NUME[:BIOME_RIVER_TROPICAL_FRESHWATER] = 73 - ENUM[74] = :BIOME_RIVER_TROPICAL_BRACKISHWATER ; NUME[:BIOME_RIVER_TROPICAL_BRACKISHWATER] = 74 - ENUM[75] = :BIOME_RIVER_TROPICAL_SALTWATER ; NUME[:BIOME_RIVER_TROPICAL_SALTWATER] = 75 - ENUM[76] = :AUTUMNCOLOR ; NUME[:AUTUMNCOLOR] = 76 - ENUM[77] = :SAPLING ; NUME[:SAPLING] = 77 - ENUM[78] = :TREE ; NUME[:TREE] = 78 - ENUM[79] = :GRASS ; NUME[:GRASS] = 79 -end - -class Profession < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - Caption = Hash.new - Military = Hash.new(false) - Parent = Hash.new(:NONE) - CanAssignLabor = Hash.new(true) - ENUM[-1] = :NONE ; NUME[:NONE] = -1 - ENUM[0] = :MINER ; NUME[:MINER] = 0 ; Caption[:MINER] = 'Miner' - ENUM[1] = :WOODWORKER ; NUME[:WOODWORKER] = 1 ; Caption[:WOODWORKER] = 'Woodworker' - ENUM[2] = :CARPENTER ; NUME[:CARPENTER] = 2 ; Caption[:CARPENTER] = 'Carpenter' ; Parent[:CARPENTER] = :WOODWORKER - ENUM[3] = :BOWYER ; NUME[:BOWYER] = 3 ; Caption[:BOWYER] = 'Bowyer' ; Parent[:BOWYER] = :WOODWORKER - ENUM[4] = :WOODCUTTER ; NUME[:WOODCUTTER] = 4 ; Caption[:WOODCUTTER] = 'Woodcutter' ; Parent[:WOODCUTTER] = :WOODWORKER - ENUM[5] = :STONEWORKER ; NUME[:STONEWORKER] = 5 ; Caption[:STONEWORKER] = 'Stoneworker' - ENUM[6] = :ENGRAVER ; NUME[:ENGRAVER] = 6 ; Caption[:ENGRAVER] = 'Engraver' ; Parent[:ENGRAVER] = :STONEWORKER - ENUM[7] = :MASON ; NUME[:MASON] = 7 ; Caption[:MASON] = 'Mason' ; Parent[:MASON] = :STONEWORKER - ENUM[8] = :RANGER ; NUME[:RANGER] = 8 ; Caption[:RANGER] = 'Ranger' - ENUM[9] = :ANIMAL_CARETAKER ; NUME[:ANIMAL_CARETAKER] = 9 ; Caption[:ANIMAL_CARETAKER] = 'Animal Caretaker' ; Parent[:ANIMAL_CARETAKER] = :RANGER - ENUM[10] = :ANIMAL_TRAINER ; NUME[:ANIMAL_TRAINER] = 10 ; Caption[:ANIMAL_TRAINER] = 'Animal Trainer' ; Parent[:ANIMAL_TRAINER] = :RANGER - ENUM[11] = :HUNTER ; NUME[:HUNTER] = 11 ; Caption[:HUNTER] = 'Hunter' ; Parent[:HUNTER] = :RANGER - ENUM[12] = :TRAPPER ; NUME[:TRAPPER] = 12 ; Caption[:TRAPPER] = 'Trapper' ; Parent[:TRAPPER] = :RANGER - ENUM[13] = :ANIMAL_DISSECTOR ; NUME[:ANIMAL_DISSECTOR] = 13 ; Caption[:ANIMAL_DISSECTOR] = 'Animal Dissector' ; Parent[:ANIMAL_DISSECTOR] = :RANGER - ENUM[14] = :METALSMITH ; NUME[:METALSMITH] = 14 ; Caption[:METALSMITH] = 'Metalsmith' - ENUM[15] = :FURNACE_OPERATOR ; NUME[:FURNACE_OPERATOR] = 15 ; Caption[:FURNACE_OPERATOR] = 'Furnace Operator' ; Parent[:FURNACE_OPERATOR] = :METALSMITH - ENUM[16] = :WEAPONSMITH ; NUME[:WEAPONSMITH] = 16 ; Caption[:WEAPONSMITH] = 'Weaponsmith' ; Parent[:WEAPONSMITH] = :METALSMITH - ENUM[17] = :ARMORER ; NUME[:ARMORER] = 17 ; Caption[:ARMORER] = 'Armorer' ; Parent[:ARMORER] = :METALSMITH - ENUM[18] = :BLACKSMITH ; NUME[:BLACKSMITH] = 18 ; Caption[:BLACKSMITH] = 'Blacksmith' ; Parent[:BLACKSMITH] = :METALSMITH - ENUM[19] = :METALCRAFTER ; NUME[:METALCRAFTER] = 19 ; Caption[:METALCRAFTER] = 'Metalcrafter' ; Parent[:METALCRAFTER] = :METALSMITH - ENUM[20] = :JEWELER ; NUME[:JEWELER] = 20 ; Caption[:JEWELER] = 'Jeweler' - ENUM[21] = :GEM_CUTTER ; NUME[:GEM_CUTTER] = 21 ; Caption[:GEM_CUTTER] = 'Gem Cutter' ; Parent[:GEM_CUTTER] = :JEWELER - ENUM[22] = :GEM_SETTER ; NUME[:GEM_SETTER] = 22 ; Caption[:GEM_SETTER] = 'Gem Setter' ; Parent[:GEM_SETTER] = :JEWELER - ENUM[23] = :CRAFTSMAN ; NUME[:CRAFTSMAN] = 23 ; Caption[:CRAFTSMAN] = 'Craftsman' - ENUM[24] = :WOODCRAFTER ; NUME[:WOODCRAFTER] = 24 ; Caption[:WOODCRAFTER] = 'Woodcrafter' ; Parent[:WOODCRAFTER] = :CRAFTSMAN - ENUM[25] = :STONECRAFTER ; NUME[:STONECRAFTER] = 25 ; Caption[:STONECRAFTER] = 'Stonecrafter' ; Parent[:STONECRAFTER] = :CRAFTSMAN - ENUM[26] = :LEATHERWORKER ; NUME[:LEATHERWORKER] = 26 ; Caption[:LEATHERWORKER] = 'Leatherworker' ; Parent[:LEATHERWORKER] = :CRAFTSMAN - ENUM[27] = :BONE_CARVER ; NUME[:BONE_CARVER] = 27 ; Caption[:BONE_CARVER] = 'Bone Carver' ; Parent[:BONE_CARVER] = :CRAFTSMAN - ENUM[28] = :WEAVER ; NUME[:WEAVER] = 28 ; Caption[:WEAVER] = 'Weaver' ; Parent[:WEAVER] = :CRAFTSMAN - ENUM[29] = :CLOTHIER ; NUME[:CLOTHIER] = 29 ; Caption[:CLOTHIER] = 'Clothier' ; Parent[:CLOTHIER] = :CRAFTSMAN - ENUM[30] = :GLASSMAKER ; NUME[:GLASSMAKER] = 30 ; Caption[:GLASSMAKER] = 'Glassmaker' ; Parent[:GLASSMAKER] = :CRAFTSMAN - ENUM[31] = :POTTER ; NUME[:POTTER] = 31 ; Caption[:POTTER] = 'Potter' ; Parent[:POTTER] = :CRAFTSMAN - ENUM[32] = :GLAZER ; NUME[:GLAZER] = 32 ; Caption[:GLAZER] = 'Glazer' ; Parent[:GLAZER] = :CRAFTSMAN - ENUM[33] = :WAX_WORKER ; NUME[:WAX_WORKER] = 33 ; Caption[:WAX_WORKER] = 'Wax Worker' ; Parent[:WAX_WORKER] = :CRAFTSMAN - ENUM[34] = :STRAND_EXTRACTOR ; NUME[:STRAND_EXTRACTOR] = 34 ; Caption[:STRAND_EXTRACTOR] = 'Strand Extractor' ; Parent[:STRAND_EXTRACTOR] = :CRAFTSMAN - ENUM[35] = :FISHERY_WORKER ; NUME[:FISHERY_WORKER] = 35 ; Caption[:FISHERY_WORKER] = 'Fishery Worker' - ENUM[36] = :FISHERMAN ; NUME[:FISHERMAN] = 36 ; Caption[:FISHERMAN] = 'Fisherman' ; Parent[:FISHERMAN] = :FISHERY_WORKER - ENUM[37] = :FISH_DISSECTOR ; NUME[:FISH_DISSECTOR] = 37 ; Caption[:FISH_DISSECTOR] = 'Fish Dissector' ; Parent[:FISH_DISSECTOR] = :FISHERY_WORKER - ENUM[38] = :FISH_CLEANER ; NUME[:FISH_CLEANER] = 38 ; Caption[:FISH_CLEANER] = 'Fish Cleaner' ; Parent[:FISH_CLEANER] = :FISHERY_WORKER - ENUM[39] = :FARMER ; NUME[:FARMER] = 39 ; Caption[:FARMER] = 'Farmer' - ENUM[40] = :CHEESE_MAKER ; NUME[:CHEESE_MAKER] = 40 ; Caption[:CHEESE_MAKER] = 'Cheese Maker' ; Parent[:CHEESE_MAKER] = :FARMER - ENUM[41] = :MILKER ; NUME[:MILKER] = 41 ; Caption[:MILKER] = 'Milker' ; Parent[:MILKER] = :FARMER - ENUM[42] = :COOK ; NUME[:COOK] = 42 ; Caption[:COOK] = 'Cook' ; Parent[:COOK] = :FARMER - ENUM[43] = :THRESHER ; NUME[:THRESHER] = 43 ; Caption[:THRESHER] = 'Thresher' ; Parent[:THRESHER] = :FARMER - ENUM[44] = :MILLER ; NUME[:MILLER] = 44 ; Caption[:MILLER] = 'Miller' ; Parent[:MILLER] = :FARMER - ENUM[45] = :BUTCHER ; NUME[:BUTCHER] = 45 ; Caption[:BUTCHER] = 'Butcher' ; Parent[:BUTCHER] = :FARMER - ENUM[46] = :TANNER ; NUME[:TANNER] = 46 ; Caption[:TANNER] = 'Tanner' ; Parent[:TANNER] = :FARMER - ENUM[47] = :DYER ; NUME[:DYER] = 47 ; Caption[:DYER] = 'Dyer' ; Parent[:DYER] = :FARMER - ENUM[48] = :PLANTER ; NUME[:PLANTER] = 48 ; Caption[:PLANTER] = 'Planter' ; Parent[:PLANTER] = :FARMER - ENUM[49] = :HERBALIST ; NUME[:HERBALIST] = 49 ; Caption[:HERBALIST] = 'Herbalist' ; Parent[:HERBALIST] = :FARMER - ENUM[50] = :BREWER ; NUME[:BREWER] = 50 ; Caption[:BREWER] = 'Brewer' ; Parent[:BREWER] = :FARMER - ENUM[51] = :SOAP_MAKER ; NUME[:SOAP_MAKER] = 51 ; Caption[:SOAP_MAKER] = 'Soap Maker' ; Parent[:SOAP_MAKER] = :FARMER - ENUM[52] = :POTASH_MAKER ; NUME[:POTASH_MAKER] = 52 ; Caption[:POTASH_MAKER] = 'Potash Maker' ; Parent[:POTASH_MAKER] = :FARMER - ENUM[53] = :LYE_MAKER ; NUME[:LYE_MAKER] = 53 ; Caption[:LYE_MAKER] = 'Lye Maker' ; Parent[:LYE_MAKER] = :FARMER - ENUM[54] = :WOOD_BURNER ; NUME[:WOOD_BURNER] = 54 ; Caption[:WOOD_BURNER] = 'Wood Burner' ; Parent[:WOOD_BURNER] = :FARMER - ENUM[55] = :SHEARER ; NUME[:SHEARER] = 55 ; Caption[:SHEARER] = 'Shearer' ; Parent[:SHEARER] = :FARMER - ENUM[56] = :SPINNER ; NUME[:SPINNER] = 56 ; Caption[:SPINNER] = 'Spinner' ; Parent[:SPINNER] = :FARMER - ENUM[57] = :PRESSER ; NUME[:PRESSER] = 57 ; Caption[:PRESSER] = 'Presser' ; Parent[:PRESSER] = :FARMER - ENUM[58] = :BEEKEEPER ; NUME[:BEEKEEPER] = 58 ; Caption[:BEEKEEPER] = 'Bee Keeper' ; Parent[:BEEKEEPER] = :FARMER - ENUM[59] = :ENGINEER ; NUME[:ENGINEER] = 59 ; Caption[:ENGINEER] = 'Engineer' - ENUM[60] = :MECHANIC ; NUME[:MECHANIC] = 60 ; Caption[:MECHANIC] = 'Mechanic' ; Parent[:MECHANIC] = :ENGINEER - ENUM[61] = :SIEGE_ENGINEER ; NUME[:SIEGE_ENGINEER] = 61 ; Caption[:SIEGE_ENGINEER] = 'Siege Engineer' ; Parent[:SIEGE_ENGINEER] = :ENGINEER - ENUM[62] = :SIEGE_OPERATOR ; NUME[:SIEGE_OPERATOR] = 62 ; Caption[:SIEGE_OPERATOR] = 'Siege Operator' ; Parent[:SIEGE_OPERATOR] = :ENGINEER - ENUM[63] = :PUMP_OPERATOR ; NUME[:PUMP_OPERATOR] = 63 ; Caption[:PUMP_OPERATOR] = 'Pump Operator' ; Parent[:PUMP_OPERATOR] = :ENGINEER - ENUM[64] = :CLERK ; NUME[:CLERK] = 64 ; Caption[:CLERK] = 'Clerk' ; Parent[:CLERK] = :ADMINISTRATOR - ENUM[65] = :ADMINISTRATOR ; NUME[:ADMINISTRATOR] = 65 ; Caption[:ADMINISTRATOR] = 'Administrator' - ENUM[66] = :TRADER ; NUME[:TRADER] = 66 ; Caption[:TRADER] = 'Trader' ; Parent[:TRADER] = :ADMINISTRATOR - ENUM[67] = :ARCHITECT ; NUME[:ARCHITECT] = 67 ; Caption[:ARCHITECT] = 'Architect' ; Parent[:ARCHITECT] = :ADMINISTRATOR - ENUM[68] = :ALCHEMIST ; NUME[:ALCHEMIST] = 68 ; Caption[:ALCHEMIST] = 'Alchemist' - ENUM[69] = :DOCTOR ; NUME[:DOCTOR] = 69 ; Caption[:DOCTOR] = 'Doctor' - ENUM[70] = :DIAGNOSER ; NUME[:DIAGNOSER] = 70 ; Caption[:DIAGNOSER] = 'Diagnoser' ; Parent[:DIAGNOSER] = :DOCTOR - ENUM[71] = :BONE_SETTER ; NUME[:BONE_SETTER] = 71 ; Caption[:BONE_SETTER] = 'Bone Setter' ; Parent[:BONE_SETTER] = :DOCTOR - ENUM[72] = :SUTURER ; NUME[:SUTURER] = 72 ; Caption[:SUTURER] = 'Suturer' ; Parent[:SUTURER] = :DOCTOR - ENUM[73] = :SURGEON ; NUME[:SURGEON] = 73 ; Caption[:SURGEON] = 'Surgeon' ; Parent[:SURGEON] = :DOCTOR - ENUM[74] = :MERCHANT ; NUME[:MERCHANT] = 74 ; Caption[:MERCHANT] = 'Merchant' - ENUM[75] = :HAMMERMAN ; NUME[:HAMMERMAN] = 75 ; Caption[:HAMMERMAN] = 'Hammerman' ; Military[:HAMMERMAN] = true - ENUM[76] = :MASTER_HAMMERMAN ; NUME[:MASTER_HAMMERMAN] = 76 ; Caption[:MASTER_HAMMERMAN] = 'Hammer Lord' ; Military[:MASTER_HAMMERMAN] = true ; Parent[:MASTER_HAMMERMAN] = :HAMMERMAN - ENUM[77] = :SPEARMAN ; NUME[:SPEARMAN] = 77 ; Caption[:SPEARMAN] = 'Spearman' ; Military[:SPEARMAN] = true - ENUM[78] = :MASTER_SPEARMAN ; NUME[:MASTER_SPEARMAN] = 78 ; Caption[:MASTER_SPEARMAN] = 'Spearmaster' ; Military[:MASTER_SPEARMAN] = true ; Parent[:MASTER_SPEARMAN] = :SPEARMAN - ENUM[79] = :CROSSBOWMAN ; NUME[:CROSSBOWMAN] = 79 ; Caption[:CROSSBOWMAN] = 'Crossbowman' ; Military[:CROSSBOWMAN] = true - ENUM[80] = :MASTER_CROSSBOWMAN ; NUME[:MASTER_CROSSBOWMAN] = 80 ; Caption[:MASTER_CROSSBOWMAN] = 'Elite Crossbowman' ; Military[:MASTER_CROSSBOWMAN] = true ; Parent[:MASTER_CROSSBOWMAN] = :CROSSBOWMAN - ENUM[81] = :WRESTLER ; NUME[:WRESTLER] = 81 ; Caption[:WRESTLER] = 'Wrestler' ; Military[:WRESTLER] = true - ENUM[82] = :MASTER_WRESTLER ; NUME[:MASTER_WRESTLER] = 82 ; Caption[:MASTER_WRESTLER] = 'Elite Wrestler' ; Military[:MASTER_WRESTLER] = true ; Parent[:MASTER_WRESTLER] = :WRESTLER - ENUM[83] = :AXEMAN ; NUME[:AXEMAN] = 83 ; Caption[:AXEMAN] = 'Axeman' ; Military[:AXEMAN] = true - ENUM[84] = :MASTER_AXEMAN ; NUME[:MASTER_AXEMAN] = 84 ; Caption[:MASTER_AXEMAN] = 'Axe Lord' ; Military[:MASTER_AXEMAN] = true ; Parent[:MASTER_AXEMAN] = :AXEMAN - ENUM[85] = :SWORDSMAN ; NUME[:SWORDSMAN] = 85 ; Caption[:SWORDSMAN] = 'Swordsman' ; Military[:SWORDSMAN] = true - ENUM[86] = :MASTER_SWORDSMAN ; NUME[:MASTER_SWORDSMAN] = 86 ; Caption[:MASTER_SWORDSMAN] = 'Swordsmaster' ; Military[:MASTER_SWORDSMAN] = true ; Parent[:MASTER_SWORDSMAN] = :SWORDSMAN - ENUM[87] = :MACEMAN ; NUME[:MACEMAN] = 87 ; Caption[:MACEMAN] = 'Maceman' ; Military[:MACEMAN] = true - ENUM[88] = :MASTER_MACEMAN ; NUME[:MASTER_MACEMAN] = 88 ; Caption[:MASTER_MACEMAN] = 'Mace Lord' ; Military[:MASTER_MACEMAN] = true ; Parent[:MASTER_MACEMAN] = :MACEMAN - ENUM[89] = :PIKEMAN ; NUME[:PIKEMAN] = 89 ; Caption[:PIKEMAN] = 'Pikeman' ; Military[:PIKEMAN] = true - ENUM[90] = :MASTER_PIKEMAN ; NUME[:MASTER_PIKEMAN] = 90 ; Caption[:MASTER_PIKEMAN] = 'Pikemaster' ; Military[:MASTER_PIKEMAN] = true ; Parent[:MASTER_PIKEMAN] = :PIKEMAN - ENUM[91] = :BOWMAN ; NUME[:BOWMAN] = 91 ; Caption[:BOWMAN] = 'Bowman' ; Military[:BOWMAN] = true - ENUM[92] = :MASTER_BOWMAN ; NUME[:MASTER_BOWMAN] = 92 ; Caption[:MASTER_BOWMAN] = 'Elite Bowman' ; Military[:MASTER_BOWMAN] = true ; Parent[:MASTER_BOWMAN] = :BOWMAN - ENUM[93] = :BLOWGUNMAN ; NUME[:BLOWGUNMAN] = 93 ; Caption[:BLOWGUNMAN] = 'Blowgunner' ; Military[:BLOWGUNMAN] = true - ENUM[94] = :MASTER_BLOWGUNMAN ; NUME[:MASTER_BLOWGUNMAN] = 94 ; Caption[:MASTER_BLOWGUNMAN] = 'Master Blowgunner' ; Military[:MASTER_BLOWGUNMAN] = true ; Parent[:MASTER_BLOWGUNMAN] = :BLOWGUNMAN - ENUM[95] = :LASHER ; NUME[:LASHER] = 95 ; Caption[:LASHER] = 'Lasher' ; Military[:LASHER] = true - ENUM[96] = :MASTER_LASHER ; NUME[:MASTER_LASHER] = 96 ; Caption[:MASTER_LASHER] = 'Master Lasher' ; Military[:MASTER_LASHER] = true ; Parent[:MASTER_LASHER] = :LASHER - ENUM[97] = :RECRUIT ; NUME[:RECRUIT] = 97 ; Caption[:RECRUIT] = 'Recruit' ; Military[:RECRUIT] = true - ENUM[98] = :TRAINED_HUNTER ; NUME[:TRAINED_HUNTER] = 98 ; Caption[:TRAINED_HUNTER] = 'Hunting Animal' - ENUM[99] = :TRAINED_WAR ; NUME[:TRAINED_WAR] = 99 ; Caption[:TRAINED_WAR] = 'War Animal' - ENUM[100] = :MASTER_THIEF ; NUME[:MASTER_THIEF] = 100 ; Caption[:MASTER_THIEF] = 'Master Thief' ; Parent[:MASTER_THIEF] = :THIEF - ENUM[101] = :THIEF ; NUME[:THIEF] = 101 ; Caption[:THIEF] = 'Thief' - ENUM[102] = :STANDARD ; NUME[:STANDARD] = 102 ; Caption[:STANDARD] = 'Peasant' - ENUM[103] = :CHILD ; NUME[:CHILD] = 103 ; Caption[:CHILD] = 'Child' ; CanAssignLabor[:CHILD] = false ; Parent[:CHILD] = :STANDARD - ENUM[104] = :BABY ; NUME[:BABY] = 104 ; Caption[:BABY] = 'Baby' ; CanAssignLabor[:BABY] = false ; Parent[:BABY] = :STANDARD - ENUM[105] = :DRUNK ; NUME[:DRUNK] = 105 ; Caption[:DRUNK] = 'Drunk' ; CanAssignLabor[:DRUNK] = false ; Parent[:DRUNK] = :STANDARD -end - -class ProjectileType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :Item ; NUME[:Item] = 0 - ENUM[1] = :Unit ; NUME[:Unit] = 1 - ENUM[2] = :Magic ; NUME[:Magic] = 2 -end - -class ReactionFlags < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :FUEL ; NUME[:FUEL] = 0 - ENUM[1] = :AUTOMATIC ; NUME[:AUTOMATIC] = 1 - ENUM[2] = :ADVENTURE_MODE_ENABLED ; NUME[:ADVENTURE_MODE_ENABLED] = 2 -end - -class ReactionProductImprovementFlags < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new -end - -class ReactionProductItemFlags < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :GET_MATERIAL_SAME ; NUME[:GET_MATERIAL_SAME] = 0 - ENUM[1] = :GET_MATERIAL_PRODUCT ; NUME[:GET_MATERIAL_PRODUCT] = 1 - ENUM[2] = :FORCE_EDGE ; NUME[:FORCE_EDGE] = 2 - ENUM[3] = :PASTE ; NUME[:PASTE] = 3 - ENUM[4] = :PRESSED ; NUME[:PRESSED] = 4 - ENUM[5] = :CRAFTS ; NUME[:CRAFTS] = 5 -end - -class ReactionProductType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :Item ; NUME[:Item] = 0 - ENUM[1] = :Improvement ; NUME[:Improvement] = 1 -end - -class ReactionReagentType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :Item ; NUME[:Item] = 0 -end - -class ResourceAllotmentSpecifierType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :CROP ; NUME[:CROP] = 0 - ENUM[1] = :STONE ; NUME[:STONE] = 1 - ENUM[2] = :METAL ; NUME[:METAL] = 2 - ENUM[3] = :WOOD ; NUME[:WOOD] = 3 - ENUM[4] = :ARMOR_BODY ; NUME[:ARMOR_BODY] = 4 - ENUM[5] = :ARMOR_PANTS ; NUME[:ARMOR_PANTS] = 5 - ENUM[6] = :ARMOR_GLOVES ; NUME[:ARMOR_GLOVES] = 6 - ENUM[7] = :ARMOR_BOOTS ; NUME[:ARMOR_BOOTS] = 7 - ENUM[8] = :ARMOR_HELM ; NUME[:ARMOR_HELM] = 8 - ENUM[9] = :CLOTHING_BODY ; NUME[:CLOTHING_BODY] = 9 - ENUM[10] = :CLOTHING_PANTS ; NUME[:CLOTHING_PANTS] = 10 - ENUM[11] = :CLOTHING_GLOVES ; NUME[:CLOTHING_GLOVES] = 11 - ENUM[12] = :CLOTHING_BOOTS ; NUME[:CLOTHING_BOOTS] = 12 - ENUM[13] = :CLOTHING_HELM ; NUME[:CLOTHING_HELM] = 13 - ENUM[14] = :WEAPON_MELEE ; NUME[:WEAPON_MELEE] = 14 - ENUM[15] = :WEAPON_RANGED ; NUME[:WEAPON_RANGED] = 15 - ENUM[16] = :ANVIL ; NUME[:ANVIL] = 16 - ENUM[17] = :GEMS ; NUME[:GEMS] = 17 - ENUM[18] = :THREAD ; NUME[:THREAD] = 18 - ENUM[19] = :CLOTH ; NUME[:CLOTH] = 19 - ENUM[20] = :LEATHER ; NUME[:LEATHER] = 20 - ENUM[21] = :QUIVER ; NUME[:QUIVER] = 21 - ENUM[22] = :BACKPACK ; NUME[:BACKPACK] = 22 - ENUM[23] = :FLASK ; NUME[:FLASK] = 23 - ENUM[24] = :BAG ; NUME[:BAG] = 24 - ENUM[25] = :TABLE ; NUME[:TABLE] = 25 - ENUM[26] = :CABINET ; NUME[:CABINET] = 26 - ENUM[27] = :CHAIR ; NUME[:CHAIR] = 27 - ENUM[28] = :BOX ; NUME[:BOX] = 28 - ENUM[29] = :BED ; NUME[:BED] = 29 - ENUM[30] = :CRAFTS ; NUME[:CRAFTS] = 30 - ENUM[31] = :MEAT ; NUME[:MEAT] = 31 - ENUM[32] = :BONE ; NUME[:BONE] = 32 - ENUM[33] = :HORN ; NUME[:HORN] = 33 - ENUM[34] = :SHELL ; NUME[:SHELL] = 34 - ENUM[35] = :TALLOW ; NUME[:TALLOW] = 35 - ENUM[36] = :TOOTH ; NUME[:TOOTH] = 36 - ENUM[37] = :PEARL ; NUME[:PEARL] = 37 - ENUM[38] = :SOAP ; NUME[:SOAP] = 38 - ENUM[39] = :EXTRACT ; NUME[:EXTRACT] = 39 - ENUM[40] = :CHEESE ; NUME[:CHEESE] = 40 - ENUM[41] = :SKIN ; NUME[:SKIN] = 41 - ENUM[42] = :POWDER ; NUME[:POWDER] = 42 -end - -class ScrewPumpDirection < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :FromNorth ; NUME[:FromNorth] = 0 - ENUM[1] = :FromEast ; NUME[:FromEast] = 1 - ENUM[2] = :FromSouth ; NUME[:FromSouth] = 2 - ENUM[3] = :FromWest ; NUME[:FromWest] = 3 -end - -class ShoesFlags < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :METAL_ARMOR_LEVELS ; NUME[:METAL_ARMOR_LEVELS] = 0 -end - -class ShopType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :GeneralStore ; NUME[:GeneralStore] = 0 - ENUM[1] = :CraftsMarket ; NUME[:CraftsMarket] = 1 - ENUM[2] = :ClothingShop ; NUME[:ClothingShop] = 2 - ENUM[3] = :ExoticClothingShop ; NUME[:ExoticClothingShop] = 3 -end - -class SiegeengineType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :Catapult ; NUME[:Catapult] = 0 - ENUM[1] = :Ballista ; NUME[:Ballista] = 1 -end - -class SiteType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :PLAYER_FORTRESS ; NUME[:PLAYER_FORTRESS] = 0 - ENUM[1] = :DARK_FORTRESS ; NUME[:DARK_FORTRESS] = 1 - ENUM[2] = :CAVE ; NUME[:CAVE] = 2 - ENUM[3] = :CAVE_DETAILED ; NUME[:CAVE_DETAILED] = 3 - ENUM[4] = :TREE_CITY ; NUME[:TREE_CITY] = 4 - ENUM[5] = :CITY ; NUME[:CITY] = 5 - ENUM[8] = :FORTRESS ; NUME[:FORTRESS] = 8 -end - -class SlabEngravingType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[-1] = :Slab ; NUME[:Slab] = -1 - ENUM[0] = :Memorial ; NUME[:Memorial] = 0 - ENUM[1] = :CraftShopSign ; NUME[:CraftShopSign] = 1 - ENUM[2] = :WeaponsmithShopSign ; NUME[:WeaponsmithShopSign] = 2 - ENUM[3] = :ArmorsmithShopSign ; NUME[:ArmorsmithShopSign] = 3 - ENUM[4] = :GeneralStoreSign ; NUME[:GeneralStoreSign] = 4 - ENUM[5] = :FoodShopSign ; NUME[:FoodShopSign] = 5 - ENUM[6] = :Slab2 ; NUME[:Slab2] = 6 - ENUM[7] = :FoodImportsSign ; NUME[:FoodImportsSign] = 7 - ENUM[8] = :ClothingImportsSign ; NUME[:ClothingImportsSign] = 8 - ENUM[9] = :GeneralImportsSign ; NUME[:GeneralImportsSign] = 9 - ENUM[10] = :ClothShopSign ; NUME[:ClothShopSign] = 10 - ENUM[11] = :LeatherShopSign ; NUME[:LeatherShopSign] = 11 - ENUM[12] = :WovenClothingShopSign ; NUME[:WovenClothingShopSign] = 12 - ENUM[13] = :LeatherClothingShopSign ; NUME[:LeatherClothingShopSign] = 13 - ENUM[14] = :BoneCarverShopSign ; NUME[:BoneCarverShopSign] = 14 - ENUM[15] = :GemCutterShopSign ; NUME[:GemCutterShopSign] = 15 - ENUM[16] = :WeaponsmithShopSign2 ; NUME[:WeaponsmithShopSign2] = 16 - ENUM[17] = :BowyerShopSign ; NUME[:BowyerShopSign] = 17 - ENUM[18] = :BlacksmithShopSign ; NUME[:BlacksmithShopSign] = 18 - ENUM[19] = :ArmorsmithShopSign2 ; NUME[:ArmorsmithShopSign2] = 19 - ENUM[20] = :MetalCraftShopSign ; NUME[:MetalCraftShopSign] = 20 - ENUM[21] = :LeatherGoodsShopSign ; NUME[:LeatherGoodsShopSign] = 21 - ENUM[22] = :CarpenterShopSign ; NUME[:CarpenterShopSign] = 22 - ENUM[23] = :StoneFurnitureShopSign ; NUME[:StoneFurnitureShopSign] = 23 - ENUM[24] = :MetalFurnitureShopSign ; NUME[:MetalFurnitureShopSign] = 24 -end - -class SpecificRefType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[1] = :UNIT_INVENTORY ; NUME[:UNIT_INVENTORY] = 1 - ENUM[2] = :JOB ; NUME[:JOB] = 2 - ENUM[3] = :BUILDING_PARTY ; NUME[:BUILDING_PARTY] = 3 - ENUM[4] = :ACTIVITY ; NUME[:ACTIVITY] = 4 - ENUM[5] = :ITEM_GENERAL ; NUME[:ITEM_GENERAL] = 5 - ENUM[6] = :EFFECT ; NUME[:EFFECT] = 6 - ENUM[7] = :PETINFO_PET ; NUME[:PETINFO_PET] = 7 - ENUM[8] = :PETINFO_OWNER ; NUME[:PETINFO_OWNER] = 8 - ENUM[9] = :VERMIN_EVENT ; NUME[:VERMIN_EVENT] = 9 - ENUM[10] = :VERMIN_ESCAPED_PET ; NUME[:VERMIN_ESCAPED_PET] = 10 - ENUM[11] = :ENTITY ; NUME[:ENTITY] = 11 - ENUM[12] = :PLOT_INFO ; NUME[:PLOT_INFO] = 12 - ENUM[13] = :VIEWSCREEN ; NUME[:VIEWSCREEN] = 13 - ENUM[14] = :UNIT_ITEM_WRESTLE ; NUME[:UNIT_ITEM_WRESTLE] = 14 - ENUM[16] = :HIST_FIG ; NUME[:HIST_FIG] = 16 - ENUM[17] = :SITE ; NUME[:SITE] = 17 - ENUM[18] = :ARTIFACT ; NUME[:ARTIFACT] = 18 - ENUM[19] = :ITEM_IMPROVEMENT ; NUME[:ITEM_IMPROVEMENT] = 19 - ENUM[20] = :COIN_FRONT ; NUME[:COIN_FRONT] = 20 - ENUM[21] = :COIN_BACK ; NUME[:COIN_BACK] = 21 - ENUM[22] = :DETAIL_EVENT ; NUME[:DETAIL_EVENT] = 22 - ENUM[23] = :SUBREGION ; NUME[:SUBREGION] = 23 - ENUM[24] = :FEATURE_LAYER ; NUME[:FEATURE_LAYER] = 24 - ENUM[25] = :ART_IMAGE ; NUME[:ART_IMAGE] = 25 - ENUM[26] = :CREATURE_DEF ; NUME[:CREATURE_DEF] = 26 - ENUM[29] = :ENTITY_POPULATION ; NUME[:ENTITY_POPULATION] = 29 - ENUM[30] = :BREED ; NUME[:BREED] = 30 -end - -class SphereType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :AGRICULTURE ; NUME[:AGRICULTURE] = 0 - ENUM[1] = :ANIMALS ; NUME[:ANIMALS] = 1 - ENUM[2] = :ART ; NUME[:ART] = 2 - ENUM[3] = :BALANCE ; NUME[:BALANCE] = 3 - ENUM[4] = :BEAUTY ; NUME[:BEAUTY] = 4 - ENUM[5] = :BIRTH ; NUME[:BIRTH] = 5 - ENUM[6] = :BLIGHT ; NUME[:BLIGHT] = 6 - ENUM[7] = :BOUNDARIES ; NUME[:BOUNDARIES] = 7 - ENUM[8] = :CAVERNS ; NUME[:CAVERNS] = 8 - ENUM[9] = :CHAOS ; NUME[:CHAOS] = 9 - ENUM[10] = :CHARITY ; NUME[:CHARITY] = 10 - ENUM[11] = :CHILDREN ; NUME[:CHILDREN] = 11 - ENUM[12] = :COASTS ; NUME[:COASTS] = 12 - ENUM[13] = :CONSOLATION ; NUME[:CONSOLATION] = 13 - ENUM[14] = :COURAGE ; NUME[:COURAGE] = 14 - ENUM[15] = :CRAFTS ; NUME[:CRAFTS] = 15 - ENUM[16] = :CREATION ; NUME[:CREATION] = 16 - ENUM[17] = :DANCE ; NUME[:DANCE] = 17 - ENUM[18] = :DARKNESS ; NUME[:DARKNESS] = 18 - ENUM[19] = :DAWN ; NUME[:DAWN] = 19 - ENUM[20] = :DAY ; NUME[:DAY] = 20 - ENUM[21] = :DEATH ; NUME[:DEATH] = 21 - ENUM[22] = :DEFORMITY ; NUME[:DEFORMITY] = 22 - ENUM[23] = :DEPRAVITY ; NUME[:DEPRAVITY] = 23 - ENUM[24] = :DISCIPLINE ; NUME[:DISCIPLINE] = 24 - ENUM[25] = :DISEASE ; NUME[:DISEASE] = 25 - ENUM[26] = :DREAMS ; NUME[:DREAMS] = 26 - ENUM[27] = :DUSK ; NUME[:DUSK] = 27 - ENUM[28] = :DUTY ; NUME[:DUTY] = 28 - ENUM[29] = :EARTH ; NUME[:EARTH] = 29 - ENUM[30] = :FAMILY ; NUME[:FAMILY] = 30 - ENUM[31] = :FAME ; NUME[:FAME] = 31 - ENUM[32] = :FATE ; NUME[:FATE] = 32 - ENUM[33] = :FERTILITY ; NUME[:FERTILITY] = 33 - ENUM[34] = :FESTIVALS ; NUME[:FESTIVALS] = 34 - ENUM[35] = :FIRE ; NUME[:FIRE] = 35 - ENUM[36] = :FISH ; NUME[:FISH] = 36 - ENUM[37] = :FISHING ; NUME[:FISHING] = 37 - ENUM[38] = :FOOD ; NUME[:FOOD] = 38 - ENUM[39] = :FORGIVENESS ; NUME[:FORGIVENESS] = 39 - ENUM[40] = :FORTRESSES ; NUME[:FORTRESSES] = 40 - ENUM[41] = :FREEDOM ; NUME[:FREEDOM] = 41 - ENUM[42] = :GAMBLING ; NUME[:GAMBLING] = 42 - ENUM[43] = :GAMES ; NUME[:GAMES] = 43 - ENUM[44] = :GENEROSITY ; NUME[:GENEROSITY] = 44 - ENUM[45] = :HAPPINESS ; NUME[:HAPPINESS] = 45 - ENUM[46] = :HEALING ; NUME[:HEALING] = 46 - ENUM[47] = :HOSPITALITY ; NUME[:HOSPITALITY] = 47 - ENUM[48] = :HUNTING ; NUME[:HUNTING] = 48 - ENUM[49] = :INSPIRATION ; NUME[:INSPIRATION] = 49 - ENUM[50] = :JEALOUSY ; NUME[:JEALOUSY] = 50 - ENUM[51] = :JEWELS ; NUME[:JEWELS] = 51 - ENUM[52] = :JUSTICE ; NUME[:JUSTICE] = 52 - ENUM[53] = :LABOR ; NUME[:LABOR] = 53 - ENUM[54] = :LAKES ; NUME[:LAKES] = 54 - ENUM[55] = :LAWS ; NUME[:LAWS] = 55 - ENUM[56] = :LIES ; NUME[:LIES] = 56 - ENUM[57] = :LIGHT ; NUME[:LIGHT] = 57 - ENUM[58] = :LIGHTNING ; NUME[:LIGHTNING] = 58 - ENUM[59] = :LONGEVITY ; NUME[:LONGEVITY] = 59 - ENUM[60] = :LOVE ; NUME[:LOVE] = 60 - ENUM[61] = :LOYALTY ; NUME[:LOYALTY] = 61 - ENUM[62] = :LUCK ; NUME[:LUCK] = 62 - ENUM[63] = :LUST ; NUME[:LUST] = 63 - ENUM[64] = :MARRIAGE ; NUME[:MARRIAGE] = 64 - ENUM[65] = :MERCY ; NUME[:MERCY] = 65 - ENUM[66] = :METALS ; NUME[:METALS] = 66 - ENUM[67] = :MINERALS ; NUME[:MINERALS] = 67 - ENUM[68] = :MISERY ; NUME[:MISERY] = 68 - ENUM[69] = :MIST ; NUME[:MIST] = 69 - ENUM[70] = :MOON ; NUME[:MOON] = 70 - ENUM[71] = :MOUNTAINS ; NUME[:MOUNTAINS] = 71 - ENUM[72] = :MUCK ; NUME[:MUCK] = 72 - ENUM[73] = :MURDER ; NUME[:MURDER] = 73 - ENUM[74] = :MUSIC ; NUME[:MUSIC] = 74 - ENUM[75] = :NATURE ; NUME[:NATURE] = 75 - ENUM[76] = :NIGHT ; NUME[:NIGHT] = 76 - ENUM[77] = :NIGHTMARES ; NUME[:NIGHTMARES] = 77 - ENUM[78] = :OATHS ; NUME[:OATHS] = 78 - ENUM[79] = :OCEANS ; NUME[:OCEANS] = 79 - ENUM[80] = :ORDER ; NUME[:ORDER] = 80 - ENUM[81] = :PAINTING ; NUME[:PAINTING] = 81 - ENUM[82] = :PEACE ; NUME[:PEACE] = 82 - ENUM[83] = :PERSUASION ; NUME[:PERSUASION] = 83 - ENUM[84] = :PLANTS ; NUME[:PLANTS] = 84 - ENUM[85] = :POETRY ; NUME[:POETRY] = 85 - ENUM[86] = :PREGNANCY ; NUME[:PREGNANCY] = 86 - ENUM[87] = :RAIN ; NUME[:RAIN] = 87 - ENUM[88] = :RAINBOWS ; NUME[:RAINBOWS] = 88 - ENUM[89] = :REBIRTH ; NUME[:REBIRTH] = 89 - ENUM[90] = :REVELRY ; NUME[:REVELRY] = 90 - ENUM[91] = :REVENGE ; NUME[:REVENGE] = 91 - ENUM[92] = :RIVERS ; NUME[:RIVERS] = 92 - ENUM[93] = :RULERSHIP ; NUME[:RULERSHIP] = 93 - ENUM[94] = :RUMORS ; NUME[:RUMORS] = 94 - ENUM[95] = :SACRIFICE ; NUME[:SACRIFICE] = 95 - ENUM[96] = :SALT ; NUME[:SALT] = 96 - ENUM[97] = :SCHOLARSHIP ; NUME[:SCHOLARSHIP] = 97 - ENUM[98] = :SEASONS ; NUME[:SEASONS] = 98 - ENUM[99] = :SILENCE ; NUME[:SILENCE] = 99 - ENUM[100] = :SKY ; NUME[:SKY] = 100 - ENUM[101] = :SONG ; NUME[:SONG] = 101 - ENUM[102] = :SPEECH ; NUME[:SPEECH] = 102 - ENUM[103] = :STARS ; NUME[:STARS] = 103 - ENUM[104] = :STORMS ; NUME[:STORMS] = 104 - ENUM[105] = :STRENGTH ; NUME[:STRENGTH] = 105 - ENUM[106] = :SUICIDE ; NUME[:SUICIDE] = 106 - ENUM[107] = :SUN ; NUME[:SUN] = 107 - ENUM[108] = :THEFT ; NUME[:THEFT] = 108 - ENUM[109] = :THRALLDOM ; NUME[:THRALLDOM] = 109 - ENUM[110] = :THUNDER ; NUME[:THUNDER] = 110 - ENUM[111] = :TORTURE ; NUME[:TORTURE] = 111 - ENUM[112] = :TRADE ; NUME[:TRADE] = 112 - ENUM[113] = :TRAVELERS ; NUME[:TRAVELERS] = 113 - ENUM[114] = :TREACHERY ; NUME[:TREACHERY] = 114 - ENUM[115] = :TREES ; NUME[:TREES] = 115 - ENUM[116] = :TRICKERY ; NUME[:TRICKERY] = 116 - ENUM[117] = :TRUTH ; NUME[:TRUTH] = 117 - ENUM[118] = :TWILIGHT ; NUME[:TWILIGHT] = 118 - ENUM[119] = :VALOR ; NUME[:VALOR] = 119 - ENUM[120] = :VICTORY ; NUME[:VICTORY] = 120 - ENUM[121] = :VOLCANOS ; NUME[:VOLCANOS] = 121 - ENUM[122] = :WAR ; NUME[:WAR] = 122 - ENUM[123] = :WATER ; NUME[:WATER] = 123 - ENUM[124] = :WEALTH ; NUME[:WEALTH] = 124 - ENUM[125] = :WEATHER ; NUME[:WEATHER] = 125 - ENUM[126] = :WIND ; NUME[:WIND] = 126 - ENUM[127] = :WISDOM ; NUME[:WISDOM] = 127 - ENUM[128] = :WRITING ; NUME[:WRITING] = 128 - ENUM[129] = :YOUTH ; NUME[:YOUTH] = 129 -end - -class StockpileCategory < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[-1] = :Remove ; NUME[:Remove] = -1 - ENUM[0] = :Animals ; NUME[:Animals] = 0 - ENUM[1] = :Food ; NUME[:Food] = 1 - ENUM[2] = :Furniture ; NUME[:Furniture] = 2 - ENUM[3] = :Corpses ; NUME[:Corpses] = 3 - ENUM[4] = :Refuse ; NUME[:Refuse] = 4 - ENUM[5] = :Stone ; NUME[:Stone] = 5 - ENUM[6] = :Unused6 ; NUME[:Unused6] = 6 - ENUM[7] = :Ammo ; NUME[:Ammo] = 7 - ENUM[8] = :Coins ; NUME[:Coins] = 8 - ENUM[9] = :Bars ; NUME[:Bars] = 9 - ENUM[10] = :Gems ; NUME[:Gems] = 10 - ENUM[11] = :Goods ; NUME[:Goods] = 11 - ENUM[12] = :Leather ; NUME[:Leather] = 12 - ENUM[13] = :Cloth ; NUME[:Cloth] = 13 - ENUM[14] = :Wood ; NUME[:Wood] = 14 - ENUM[15] = :Weapons ; NUME[:Weapons] = 15 - ENUM[16] = :Armor ; NUME[:Armor] = 16 - ENUM[17] = :Custom ; NUME[:Custom] = 17 -end - -class StockpileList < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - IsCategory = Hash.new - ENUM[0] = :Animals ; NUME[:Animals] = 0 ; IsCategory[:Animals] = true - ENUM[1] = :Food ; NUME[:Food] = 1 ; IsCategory[:Food] = true - ENUM[2] = :FoodMeat ; NUME[:FoodMeat] = 2 - ENUM[3] = :FoodFish ; NUME[:FoodFish] = 3 - ENUM[4] = :FoodUnpreparedFish ; NUME[:FoodUnpreparedFish] = 4 - ENUM[5] = :FoodEgg ; NUME[:FoodEgg] = 5 - ENUM[6] = :FoodPlants ; NUME[:FoodPlants] = 6 - ENUM[7] = :FoodDrinkPlant ; NUME[:FoodDrinkPlant] = 7 - ENUM[8] = :FoodDrinkAnimal ; NUME[:FoodDrinkAnimal] = 8 - ENUM[9] = :FoodCheesePlant ; NUME[:FoodCheesePlant] = 9 - ENUM[10] = :FoodCheeseAnimal ; NUME[:FoodCheeseAnimal] = 10 - ENUM[11] = :FoodSeeds ; NUME[:FoodSeeds] = 11 - ENUM[12] = :FoodLeaves ; NUME[:FoodLeaves] = 12 - ENUM[13] = :FoodMilledPlant ; NUME[:FoodMilledPlant] = 13 - ENUM[14] = :FoodBoneMeal ; NUME[:FoodBoneMeal] = 14 - ENUM[15] = :FoodFat ; NUME[:FoodFat] = 15 - ENUM[16] = :FoodPaste ; NUME[:FoodPaste] = 16 - ENUM[17] = :FoodPressedMaterial ; NUME[:FoodPressedMaterial] = 17 - ENUM[18] = :FoodExtractPlant ; NUME[:FoodExtractPlant] = 18 - ENUM[19] = :FoodExtractAnimal ; NUME[:FoodExtractAnimal] = 19 - ENUM[20] = :FoodMiscLiquid ; NUME[:FoodMiscLiquid] = 20 - ENUM[21] = :Furniture ; NUME[:Furniture] = 21 ; IsCategory[:Furniture] = true - ENUM[22] = :FurnitureType ; NUME[:FurnitureType] = 22 - ENUM[23] = :FurnitureStoneClay ; NUME[:FurnitureStoneClay] = 23 - ENUM[24] = :FurnitureMetal ; NUME[:FurnitureMetal] = 24 - ENUM[25] = :FurnitureOtherMaterials ; NUME[:FurnitureOtherMaterials] = 25 - ENUM[26] = :FurnitureCoreQuality ; NUME[:FurnitureCoreQuality] = 26 - ENUM[27] = :FurnitureTotalQuality ; NUME[:FurnitureTotalQuality] = 27 - ENUM[28] = :Corpses ; NUME[:Corpses] = 28 ; IsCategory[:Corpses] = true - ENUM[29] = :Refuse ; NUME[:Refuse] = 29 ; IsCategory[:Refuse] = true - ENUM[30] = :RefuseItems ; NUME[:RefuseItems] = 30 - ENUM[31] = :RefuseCorpses ; NUME[:RefuseCorpses] = 31 - ENUM[32] = :RefuseParts ; NUME[:RefuseParts] = 32 - ENUM[33] = :RefuseSkulls ; NUME[:RefuseSkulls] = 33 - ENUM[34] = :RefuseBones ; NUME[:RefuseBones] = 34 - ENUM[35] = :RefuseShells ; NUME[:RefuseShells] = 35 - ENUM[36] = :RefuseTeeth ; NUME[:RefuseTeeth] = 36 - ENUM[37] = :RefuseHorns ; NUME[:RefuseHorns] = 37 - ENUM[38] = :RefuseHair ; NUME[:RefuseHair] = 38 - ENUM[39] = :Stone ; NUME[:Stone] = 39 ; IsCategory[:Stone] = true - ENUM[40] = :StoneOres ; NUME[:StoneOres] = 40 - ENUM[41] = :StoneEconomic ; NUME[:StoneEconomic] = 41 - ENUM[42] = :StoneOther ; NUME[:StoneOther] = 42 - ENUM[43] = :StoneClay ; NUME[:StoneClay] = 43 - ENUM[44] = :Ammo ; NUME[:Ammo] = 44 ; IsCategory[:Ammo] = true - ENUM[45] = :AmmoType ; NUME[:AmmoType] = 45 - ENUM[46] = :AmmoMetal ; NUME[:AmmoMetal] = 46 - ENUM[47] = :AmmoOther ; NUME[:AmmoOther] = 47 - ENUM[48] = :AmmoCoreQuality ; NUME[:AmmoCoreQuality] = 48 - ENUM[49] = :AmmoTotalQuality ; NUME[:AmmoTotalQuality] = 49 - ENUM[50] = :Coins ; NUME[:Coins] = 50 ; IsCategory[:Coins] = true - ENUM[51] = :BarsBlocks ; NUME[:BarsBlocks] = 51 ; IsCategory[:BarsBlocks] = true - ENUM[52] = :BarsMetal ; NUME[:BarsMetal] = 52 - ENUM[53] = :BarsOther ; NUME[:BarsOther] = 53 - ENUM[54] = :BlocksStone ; NUME[:BlocksStone] = 54 - ENUM[55] = :BlocksMetal ; NUME[:BlocksMetal] = 55 - ENUM[56] = :BlocksOther ; NUME[:BlocksOther] = 56 - ENUM[57] = :Gems ; NUME[:Gems] = 57 ; IsCategory[:Gems] = true - ENUM[58] = :RoughGem ; NUME[:RoughGem] = 58 - ENUM[59] = :RoughGlass ; NUME[:RoughGlass] = 59 - ENUM[60] = :CutGem ; NUME[:CutGem] = 60 - ENUM[61] = :CutGlass ; NUME[:CutGlass] = 61 - ENUM[62] = :Goods ; NUME[:Goods] = 62 ; IsCategory[:Goods] = true - ENUM[63] = :GoodsType ; NUME[:GoodsType] = 63 - ENUM[64] = :GoodsStone ; NUME[:GoodsStone] = 64 - ENUM[65] = :GoodsMetal ; NUME[:GoodsMetal] = 65 - ENUM[66] = :GoodsOther ; NUME[:GoodsOther] = 66 - ENUM[67] = :GoodsCoreQuality ; NUME[:GoodsCoreQuality] = 67 - ENUM[68] = :GoodsTotalQuality ; NUME[:GoodsTotalQuality] = 68 - ENUM[69] = :Leather ; NUME[:Leather] = 69 ; IsCategory[:Leather] = true - ENUM[70] = :Cloth ; NUME[:Cloth] = 70 ; IsCategory[:Cloth] = true - ENUM[71] = :ThreadSilk ; NUME[:ThreadSilk] = 71 - ENUM[72] = :ThreadPlant ; NUME[:ThreadPlant] = 72 - ENUM[73] = :ThreadYarn ; NUME[:ThreadYarn] = 73 - ENUM[74] = :ThreadMetal ; NUME[:ThreadMetal] = 74 - ENUM[75] = :ClothSilk ; NUME[:ClothSilk] = 75 - ENUM[76] = :ClothPlant ; NUME[:ClothPlant] = 76 - ENUM[77] = :ClothYarn ; NUME[:ClothYarn] = 77 - ENUM[78] = :ClothMetal ; NUME[:ClothMetal] = 78 - ENUM[79] = :Wood ; NUME[:Wood] = 79 ; IsCategory[:Wood] = true - ENUM[80] = :Weapons ; NUME[:Weapons] = 80 ; IsCategory[:Weapons] = true - ENUM[81] = :WeaponsType ; NUME[:WeaponsType] = 81 - ENUM[82] = :WeaponsTrapcomp ; NUME[:WeaponsTrapcomp] = 82 - ENUM[83] = :WeaponsMetal ; NUME[:WeaponsMetal] = 83 - ENUM[84] = :WeaponsStone ; NUME[:WeaponsStone] = 84 - ENUM[85] = :WeaponsOther ; NUME[:WeaponsOther] = 85 - ENUM[86] = :WeaponsCoreQuality ; NUME[:WeaponsCoreQuality] = 86 - ENUM[87] = :WeaponsTotalQuality ; NUME[:WeaponsTotalQuality] = 87 - ENUM[88] = :Armor ; NUME[:Armor] = 88 ; IsCategory[:Armor] = true - ENUM[89] = :ArmorBody ; NUME[:ArmorBody] = 89 - ENUM[90] = :ArmorHead ; NUME[:ArmorHead] = 90 - ENUM[91] = :ArmorFeet ; NUME[:ArmorFeet] = 91 - ENUM[92] = :ArmorHands ; NUME[:ArmorHands] = 92 - ENUM[93] = :ArmorLegs ; NUME[:ArmorLegs] = 93 - ENUM[94] = :ArmorShield ; NUME[:ArmorShield] = 94 - ENUM[95] = :ArmorMetal ; NUME[:ArmorMetal] = 95 - ENUM[96] = :ArmorOther ; NUME[:ArmorOther] = 96 - ENUM[97] = :ArmorCoreQuality ; NUME[:ArmorCoreQuality] = 97 - ENUM[98] = :ArmorTotalQuality ; NUME[:ArmorTotalQuality] = 98 - ENUM[99] = :AdditionalOptions ; NUME[:AdditionalOptions] = 99 ; IsCategory[:AdditionalOptions] = true -end - -class TileBuildingOcc < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :None ; NUME[:None] = 0 - ENUM[1] = :Planned ; NUME[:Planned] = 1 - ENUM[2] = :Passable ; NUME[:Passable] = 2 - ENUM[3] = :Obstacle ; NUME[:Obstacle] = 3 - ENUM[4] = :Well ; NUME[:Well] = 4 - ENUM[5] = :Floored ; NUME[:Floored] = 5 - ENUM[6] = :Impassable ; NUME[:Impassable] = 6 - ENUM[7] = :Dynamic ; NUME[:Dynamic] = 7 -end - -class TileDigDesignation < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :No ; NUME[:No] = 0 - ENUM[1] = :Default ; NUME[:Default] = 1 - ENUM[2] = :UpDownStair ; NUME[:UpDownStair] = 2 - ENUM[3] = :Channel ; NUME[:Channel] = 3 - ENUM[4] = :Ramp ; NUME[:Ramp] = 4 - ENUM[5] = :DownStair ; NUME[:DownStair] = 5 - ENUM[6] = :UpStair ; NUME[:UpStair] = 6 -end - -class TileLiquid < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :Water ; NUME[:Water] = 0 - ENUM[1] = :Magma ; NUME[:Magma] = 1 -end - -class TileLiquidFlowDir < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :None ; NUME[:None] = 0 - ENUM[1] = :South ; NUME[:South] = 1 - ENUM[2] = :East ; NUME[:East] = 2 - ENUM[3] = :Northeast ; NUME[:Northeast] = 3 - ENUM[4] = :West ; NUME[:West] = 4 - ENUM[5] = :Northwest ; NUME[:Northwest] = 5 - ENUM[6] = :Southeast ; NUME[:Southeast] = 6 - ENUM[7] = :Southwest ; NUME[:Southwest] = 7 - ENUM[8] = :Inv8 ; NUME[:Inv8] = 8 - ENUM[9] = :Inv9 ; NUME[:Inv9] = 9 - ENUM[10] = :North ; NUME[:North] = 10 - ENUM[11] = :InvB ; NUME[:InvB] = 11 - ENUM[12] = :InvC ; NUME[:InvC] = 12 - ENUM[13] = :InvD ; NUME[:InvD] = 13 - ENUM[14] = :InvE ; NUME[:InvE] = 14 - ENUM[15] = :InvF ; NUME[:InvF] = 15 -end - -class TileTraffic < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :Normal ; NUME[:Normal] = 0 - ENUM[1] = :Low ; NUME[:Low] = 1 - ENUM[2] = :High ; NUME[:High] = 2 - ENUM[3] = :Restricted ; NUME[:Restricted] = 3 -end - -class Tiletype < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - Caption = Hash.new - Shape = Hash.new(:NONE) - Material = Hash.new(:NONE) - Variant = Hash.new(:NONE) - Special = Hash.new(:NONE) - Direction = Hash.new('--------') - ENUM[0] = :Void ; NUME[:Void] = 0 ; Caption[:Void] = 'void' - ENUM[1] = :RampTop ; NUME[:RampTop] = 1 ; Caption[:RampTop] = 'ramp top' ; Shape[:RampTop] = :RAMP_TOP ; Material[:RampTop] = :AIR - ENUM[2] = :MurkyPool ; NUME[:MurkyPool] = 2 ; Caption[:MurkyPool] = 'murky pool' ; Shape[:MurkyPool] = :FLOOR ; Material[:MurkyPool] = :POOL - ENUM[3] = :MurkyPoolRamp ; NUME[:MurkyPoolRamp] = 3 ; Caption[:MurkyPoolRamp] = 'murky pool slope' ; Shape[:MurkyPoolRamp] = :RAMP ; Material[:MurkyPoolRamp] = :POOL - ENUM[19] = :Driftwood ; NUME[:Driftwood] = 19 ; Caption[:Driftwood] = 'driftwood' ; Shape[:Driftwood] = :FLOOR ; Material[:Driftwood] = :DRIFTWOOD - ENUM[24] = :Tree ; NUME[:Tree] = 24 ; Caption[:Tree] = 'tree' ; Shape[:Tree] = :TREE ; Material[:Tree] = :PLANT ; Special[:Tree] = :NORMAL - ENUM[25] = :FrozenStairUD ; NUME[:FrozenStairUD] = 25 ; Caption[:FrozenStairUD] = 'ice stair up/down' ; Shape[:FrozenStairUD] = :STAIR_UPDOWN ; Material[:FrozenStairUD] = :FROZEN_LIQUID - ENUM[26] = :FrozenStairD ; NUME[:FrozenStairD] = 26 ; Caption[:FrozenStairD] = 'ice stair down' ; Shape[:FrozenStairD] = :STAIR_DOWN ; Material[:FrozenStairD] = :FROZEN_LIQUID - ENUM[27] = :FrozenStairU ; NUME[:FrozenStairU] = 27 ; Caption[:FrozenStairU] = 'ice stair up' ; Shape[:FrozenStairU] = :STAIR_UP ; Material[:FrozenStairU] = :FROZEN_LIQUID - ENUM[32] = :OpenSpace ; NUME[:OpenSpace] = 32 ; Caption[:OpenSpace] = 'open space' ; Shape[:OpenSpace] = :EMPTY ; Material[:OpenSpace] = :AIR - ENUM[34] = :Shrub ; NUME[:Shrub] = 34 ; Caption[:Shrub] = 'shrub' ; Shape[:Shrub] = :SHRUB ; Material[:Shrub] = :PLANT ; Special[:Shrub] = :NORMAL - ENUM[35] = :Chasm ; NUME[:Chasm] = 35 ; Caption[:Chasm] = 'chasm' ; Shape[:Chasm] = :ENDLESS_PIT ; Material[:Chasm] = :AIR - ENUM[36] = :LavaStairUD ; NUME[:LavaStairUD] = 36 ; Caption[:LavaStairUD] = 'obsidian stair up/down' ; Shape[:LavaStairUD] = :STAIR_UPDOWN ; Material[:LavaStairUD] = :LAVA_STONE - ENUM[37] = :LavaStairD ; NUME[:LavaStairD] = 37 ; Caption[:LavaStairD] = 'obsidian stair down' ; Shape[:LavaStairD] = :STAIR_DOWN ; Material[:LavaStairD] = :LAVA_STONE - ENUM[38] = :LavaStairU ; NUME[:LavaStairU] = 38 ; Caption[:LavaStairU] = 'obsidian stair up' ; Shape[:LavaStairU] = :STAIR_UP ; Material[:LavaStairU] = :LAVA_STONE - ENUM[39] = :SoilStairUD ; NUME[:SoilStairUD] = 39 ; Caption[:SoilStairUD] = 'soil stair up/down' ; Shape[:SoilStairUD] = :STAIR_UPDOWN ; Material[:SoilStairUD] = :SOIL - ENUM[40] = :SoilStairD ; NUME[:SoilStairD] = 40 ; Caption[:SoilStairD] = 'soil stair down' ; Shape[:SoilStairD] = :STAIR_DOWN ; Material[:SoilStairD] = :SOIL - ENUM[41] = :SoilStairU ; NUME[:SoilStairU] = 41 ; Caption[:SoilStairU] = 'soil stair up' ; Shape[:SoilStairU] = :STAIR_UP ; Material[:SoilStairU] = :SOIL - ENUM[42] = :EeriePit ; NUME[:EeriePit] = 42 ; Caption[:EeriePit] = 'eerie pit' ; Shape[:EeriePit] = :ENDLESS_PIT ; Material[:EeriePit] = :HFS - ENUM[43] = :StoneFloorSmooth ; NUME[:StoneFloorSmooth] = 43 ; Caption[:StoneFloorSmooth] = 'smooth stone floor' ; Shape[:StoneFloorSmooth] = :FLOOR ; Material[:StoneFloorSmooth] = :STONE ; Special[:StoneFloorSmooth] = :SMOOTH - ENUM[44] = :LavaFloorSmooth ; NUME[:LavaFloorSmooth] = 44 ; Caption[:LavaFloorSmooth] = 'smooth obsidian floor' ; Shape[:LavaFloorSmooth] = :FLOOR ; Material[:LavaFloorSmooth] = :LAVA_STONE ; Special[:LavaFloorSmooth] = :SMOOTH - ENUM[45] = :FeatureFloorSmooth ; NUME[:FeatureFloorSmooth] = 45 ; Caption[:FeatureFloorSmooth] = 'smooth featstone floor' ; Shape[:FeatureFloorSmooth] = :FLOOR ; Material[:FeatureFloorSmooth] = :FEATURE ; Special[:FeatureFloorSmooth] = :SMOOTH - ENUM[46] = :MineralFloorSmooth ; NUME[:MineralFloorSmooth] = 46 ; Caption[:MineralFloorSmooth] = 'smooth vein floor' ; Shape[:MineralFloorSmooth] = :FLOOR ; Material[:MineralFloorSmooth] = :MINERAL ; Special[:MineralFloorSmooth] = :SMOOTH - ENUM[47] = :FrozenFloorSmooth ; NUME[:FrozenFloorSmooth] = 47 ; Caption[:FrozenFloorSmooth] = 'smooth ice floor' ; Shape[:FrozenFloorSmooth] = :FLOOR ; Material[:FrozenFloorSmooth] = :FROZEN_LIQUID ; Special[:FrozenFloorSmooth] = :SMOOTH - ENUM[49] = :Grass1StairUD ; NUME[:Grass1StairUD] = 49 ; Caption[:Grass1StairUD] = 'light grass stair up/down' ; Shape[:Grass1StairUD] = :STAIR_UPDOWN ; Material[:Grass1StairUD] = :GRASS_LIGHT - ENUM[50] = :Grass1StairD ; NUME[:Grass1StairD] = 50 ; Caption[:Grass1StairD] = 'light grass stair down' ; Shape[:Grass1StairD] = :STAIR_DOWN ; Material[:Grass1StairD] = :GRASS_LIGHT - ENUM[51] = :Grass1StairU ; NUME[:Grass1StairU] = 51 ; Caption[:Grass1StairU] = 'light grass stair up' ; Shape[:Grass1StairU] = :STAIR_UP ; Material[:Grass1StairU] = :GRASS_LIGHT - ENUM[52] = :Grass2StairUD ; NUME[:Grass2StairUD] = 52 ; Caption[:Grass2StairUD] = 'dark grass stair up/down' ; Shape[:Grass2StairUD] = :STAIR_UPDOWN ; Material[:Grass2StairUD] = :GRASS_DARK - ENUM[53] = :Grass2StairD ; NUME[:Grass2StairD] = 53 ; Caption[:Grass2StairD] = 'dark grass stair down' ; Shape[:Grass2StairD] = :STAIR_DOWN ; Material[:Grass2StairD] = :GRASS_DARK - ENUM[54] = :Grass2StairU ; NUME[:Grass2StairU] = 54 ; Caption[:Grass2StairU] = 'dark grass stair up' ; Shape[:Grass2StairU] = :STAIR_UP ; Material[:Grass2StairU] = :GRASS_DARK - ENUM[55] = :StoneStairUD ; NUME[:StoneStairUD] = 55 ; Caption[:StoneStairUD] = 'stone stair up/down' ; Shape[:StoneStairUD] = :STAIR_UPDOWN ; Material[:StoneStairUD] = :STONE - ENUM[56] = :StoneStairD ; NUME[:StoneStairD] = 56 ; Caption[:StoneStairD] = 'stone stair down' ; Shape[:StoneStairD] = :STAIR_DOWN ; Material[:StoneStairD] = :STONE - ENUM[57] = :StoneStairU ; NUME[:StoneStairU] = 57 ; Caption[:StoneStairU] = 'stone stair up' ; Shape[:StoneStairU] = :STAIR_UP ; Material[:StoneStairU] = :STONE - ENUM[58] = :MineralStairUD ; NUME[:MineralStairUD] = 58 ; Caption[:MineralStairUD] = 'vein stair up/down' ; Shape[:MineralStairUD] = :STAIR_UPDOWN ; Material[:MineralStairUD] = :MINERAL - ENUM[59] = :MineralStairD ; NUME[:MineralStairD] = 59 ; Caption[:MineralStairD] = 'vein stair down' ; Shape[:MineralStairD] = :STAIR_DOWN ; Material[:MineralStairD] = :MINERAL - ENUM[60] = :MineralStairU ; NUME[:MineralStairU] = 60 ; Caption[:MineralStairU] = 'vein stair up' ; Shape[:MineralStairU] = :STAIR_UP ; Material[:MineralStairU] = :MINERAL - ENUM[61] = :FeatureStairUD ; NUME[:FeatureStairUD] = 61 ; Caption[:FeatureStairUD] = 'featstone stair up/down' ; Shape[:FeatureStairUD] = :STAIR_UPDOWN ; Material[:FeatureStairUD] = :FEATURE - ENUM[62] = :FeatureStairD ; NUME[:FeatureStairD] = 62 ; Caption[:FeatureStairD] = 'featstone stair down' ; Shape[:FeatureStairD] = :STAIR_DOWN ; Material[:FeatureStairD] = :FEATURE - ENUM[63] = :FeatureStairU ; NUME[:FeatureStairU] = 63 ; Caption[:FeatureStairU] = 'featstone stair up' ; Shape[:FeatureStairU] = :STAIR_UP ; Material[:FeatureStairU] = :FEATURE - ENUM[65] = :StoneFortification ; NUME[:StoneFortification] = 65 ; Caption[:StoneFortification] = 'stone fortification' ; Shape[:StoneFortification] = :FORTIFICATION ; Material[:StoneFortification] = :STONE - ENUM[67] = :Campfire ; NUME[:Campfire] = 67 ; Caption[:Campfire] = 'campfire' ; Shape[:Campfire] = :FLOOR ; Material[:Campfire] = :CAMPFIRE - ENUM[70] = :Fire ; NUME[:Fire] = 70 ; Caption[:Fire] = 'fire' ; Shape[:Fire] = :FLOOR ; Material[:Fire] = :FIRE - ENUM[79] = :StonePillar ; NUME[:StonePillar] = 79 ; Caption[:StonePillar] = 'stone pillar' ; Shape[:StonePillar] = :WALL ; Material[:StonePillar] = :STONE ; Special[:StonePillar] = :SMOOTH - ENUM[80] = :LavaPillar ; NUME[:LavaPillar] = 80 ; Caption[:LavaPillar] = 'obsidian pillar' ; Shape[:LavaPillar] = :WALL ; Material[:LavaPillar] = :LAVA_STONE ; Special[:LavaPillar] = :SMOOTH - ENUM[81] = :FeaturePillar ; NUME[:FeaturePillar] = 81 ; Caption[:FeaturePillar] = 'featstone pillar' ; Shape[:FeaturePillar] = :WALL ; Material[:FeaturePillar] = :FEATURE ; Special[:FeaturePillar] = :SMOOTH - ENUM[82] = :MineralPillar ; NUME[:MineralPillar] = 82 ; Caption[:MineralPillar] = 'vein pillar' ; Shape[:MineralPillar] = :WALL ; Material[:MineralPillar] = :MINERAL ; Special[:MineralPillar] = :SMOOTH - ENUM[83] = :FrozenPillar ; NUME[:FrozenPillar] = 83 ; Caption[:FrozenPillar] = 'ice pillar' ; Shape[:FrozenPillar] = :WALL ; Material[:FrozenPillar] = :FROZEN_LIQUID ; Special[:FrozenPillar] = :SMOOTH - ENUM[89] = :Waterfall ; NUME[:Waterfall] = 89 ; Caption[:Waterfall] = 'waterfall' ; Shape[:Waterfall] = :FLOOR ; Material[:Waterfall] = :RIVER ; Special[:Waterfall] = :WATERFALL - ENUM[90] = :RiverSource ; NUME[:RiverSource] = 90 ; Caption[:RiverSource] = 'river source' ; Shape[:RiverSource] = :FLOOR ; Material[:RiverSource] = :RIVER ; Special[:RiverSource] = :RIVER_SOURCE - ENUM[176] = :StoneWallWorn1 ; NUME[:StoneWallWorn1] = 176 ; Caption[:StoneWallWorn1] = 'worn 1 stone wall' ; Shape[:StoneWallWorn1] = :WALL ; Material[:StoneWallWorn1] = :STONE ; Special[:StoneWallWorn1] = :WORN_1 - ENUM[177] = :StoneWallWorn2 ; NUME[:StoneWallWorn2] = 177 ; Caption[:StoneWallWorn2] = 'worn 2 stone wall' ; Shape[:StoneWallWorn2] = :WALL ; Material[:StoneWallWorn2] = :STONE ; Special[:StoneWallWorn2] = :WORN_2 - ENUM[178] = :StoneWallWorn3 ; NUME[:StoneWallWorn3] = 178 ; Caption[:StoneWallWorn3] = 'worn 3 stone wall' ; Shape[:StoneWallWorn3] = :WALL ; Material[:StoneWallWorn3] = :STONE ; Special[:StoneWallWorn3] = :WORN_3 - ENUM[219] = :StoneWall ; NUME[:StoneWall] = 219 ; Caption[:StoneWall] = 'stone wall' ; Shape[:StoneWall] = :WALL ; Material[:StoneWall] = :STONE ; Special[:StoneWall] = :NORMAL - ENUM[231] = :Sapling ; NUME[:Sapling] = 231 ; Caption[:Sapling] = 'sapling' ; Shape[:Sapling] = :SAPLING ; Material[:Sapling] = :PLANT ; Special[:Sapling] = :NORMAL - ENUM[233] = :GrassDryRamp ; NUME[:GrassDryRamp] = 233 ; Caption[:GrassDryRamp] = 'dry grass ramp' ; Shape[:GrassDryRamp] = :RAMP ; Material[:GrassDryRamp] = :GRASS_DRY - ENUM[234] = :GrassDeadRamp ; NUME[:GrassDeadRamp] = 234 ; Caption[:GrassDeadRamp] = 'dead grass ramp' ; Shape[:GrassDeadRamp] = :RAMP ; Material[:GrassDeadRamp] = :GRASS_DEAD - ENUM[235] = :GrassLightRamp ; NUME[:GrassLightRamp] = 235 ; Caption[:GrassLightRamp] = 'light grass ramp' ; Shape[:GrassLightRamp] = :RAMP ; Material[:GrassLightRamp] = :GRASS_LIGHT - ENUM[236] = :GrassDarkRamp ; NUME[:GrassDarkRamp] = 236 ; Caption[:GrassDarkRamp] = 'dark grass ramp' ; Shape[:GrassDarkRamp] = :RAMP ; Material[:GrassDarkRamp] = :GRASS_DARK - ENUM[237] = :StoneRamp ; NUME[:StoneRamp] = 237 ; Caption[:StoneRamp] = 'stone ramp' ; Shape[:StoneRamp] = :RAMP ; Material[:StoneRamp] = :STONE - ENUM[238] = :LavaRamp ; NUME[:LavaRamp] = 238 ; Caption[:LavaRamp] = 'obsidian ramp' ; Shape[:LavaRamp] = :RAMP ; Material[:LavaRamp] = :LAVA_STONE - ENUM[239] = :FeatureRamp ; NUME[:FeatureRamp] = 239 ; Caption[:FeatureRamp] = 'featstone ramp' ; Shape[:FeatureRamp] = :RAMP ; Material[:FeatureRamp] = :FEATURE - ENUM[240] = :MineralRamp ; NUME[:MineralRamp] = 240 ; Caption[:MineralRamp] = 'vein ramp' ; Shape[:MineralRamp] = :RAMP ; Material[:MineralRamp] = :MINERAL - ENUM[241] = :SoilRamp ; NUME[:SoilRamp] = 241 ; Caption[:SoilRamp] = 'soil ramp' ; Shape[:SoilRamp] = :RAMP ; Material[:SoilRamp] = :SOIL - ENUM[242] = :Ashes1 ; NUME[:Ashes1] = 242 ; Caption[:Ashes1] = 'ashes' ; Shape[:Ashes1] = :FLOOR ; Material[:Ashes1] = :ASHES ; Variant[:Ashes1] = :VAR_1 - ENUM[243] = :Ashes2 ; NUME[:Ashes2] = 243 ; Caption[:Ashes2] = 'ashes' ; Shape[:Ashes2] = :FLOOR ; Material[:Ashes2] = :ASHES ; Variant[:Ashes2] = :VAR_2 - ENUM[244] = :Ashes3 ; NUME[:Ashes3] = 244 ; Caption[:Ashes3] = 'ashes' ; Shape[:Ashes3] = :FLOOR ; Material[:Ashes3] = :ASHES ; Variant[:Ashes3] = :VAR_3 - ENUM[245] = :FrozenRamp ; NUME[:FrozenRamp] = 245 ; Caption[:FrozenRamp] = 'ice ramp' ; Shape[:FrozenRamp] = :RAMP ; Material[:FrozenRamp] = :FROZEN_LIQUID - ENUM[258] = :FrozenFloor2 ; NUME[:FrozenFloor2] = 258 ; Caption[:FrozenFloor2] = 'ice floor' ; Shape[:FrozenFloor2] = :FLOOR ; Material[:FrozenFloor2] = :FROZEN_LIQUID ; Variant[:FrozenFloor2] = :VAR_2 ; Special[:FrozenFloor2] = :NORMAL - ENUM[259] = :FrozenFloor3 ; NUME[:FrozenFloor3] = 259 ; Caption[:FrozenFloor3] = 'ice floor' ; Shape[:FrozenFloor3] = :FLOOR ; Material[:FrozenFloor3] = :FROZEN_LIQUID ; Variant[:FrozenFloor3] = :VAR_3 ; Special[:FrozenFloor3] = :NORMAL - ENUM[260] = :FrozenFloor4 ; NUME[:FrozenFloor4] = 260 ; Caption[:FrozenFloor4] = 'ice floor' ; Shape[:FrozenFloor4] = :FLOOR ; Material[:FrozenFloor4] = :FROZEN_LIQUID ; Variant[:FrozenFloor4] = :VAR_4 ; Special[:FrozenFloor4] = :NORMAL - ENUM[261] = :FurrowedSoil ; NUME[:FurrowedSoil] = 261 ; Caption[:FurrowedSoil] = 'furrowed soil' ; Shape[:FurrowedSoil] = :FLOOR ; Material[:FurrowedSoil] = :SOIL ; Special[:FurrowedSoil] = :FURROWED - ENUM[262] = :FrozenFloor ; NUME[:FrozenFloor] = 262 ; Caption[:FrozenFloor] = 'ice floor' ; Shape[:FrozenFloor] = :FLOOR ; Material[:FrozenFloor] = :FROZEN_LIQUID ; Variant[:FrozenFloor] = :VAR_1 ; Special[:FrozenFloor] = :NORMAL - ENUM[263] = :SemiMoltenRock ; NUME[:SemiMoltenRock] = 263 ; Caption[:SemiMoltenRock] = 'semi-molten rock' ; Shape[:SemiMoltenRock] = :WALL ; Material[:SemiMoltenRock] = :MAGMA - ENUM[264] = :MagmaFlow ; NUME[:MagmaFlow] = 264 ; Caption[:MagmaFlow] = 'magma flow' ; Shape[:MagmaFlow] = :FLOOR ; Material[:MagmaFlow] = :MAGMA - ENUM[265] = :SoilWall ; NUME[:SoilWall] = 265 ; Caption[:SoilWall] = 'soil wall' ; Shape[:SoilWall] = :WALL ; Material[:SoilWall] = :SOIL - ENUM[266] = :GlowingBarrier ; NUME[:GlowingBarrier] = 266 ; Caption[:GlowingBarrier] = 'glowing barrier' ; Shape[:GlowingBarrier] = :WALL ; Material[:GlowingBarrier] = :HFS - ENUM[267] = :GlowingFloor ; NUME[:GlowingFloor] = 267 ; Caption[:GlowingFloor] = 'glowing floor' ; Shape[:GlowingFloor] = :FLOOR ; Material[:GlowingFloor] = :HFS - ENUM[269] = :LavaWallSmoothRD2 ; NUME[:LavaWallSmoothRD2] = 269 ; Caption[:LavaWallSmoothRD2] = 'smooth obsidian wall RD2' ; Shape[:LavaWallSmoothRD2] = :WALL ; Material[:LavaWallSmoothRD2] = :LAVA_STONE ; Special[:LavaWallSmoothRD2] = :SMOOTH ; Direction[:LavaWallSmoothRD2] = '--SS--E-' - ENUM[270] = :LavaWallSmoothR2D ; NUME[:LavaWallSmoothR2D] = 270 ; Caption[:LavaWallSmoothR2D] = 'smooth obsidian wall R2D' ; Shape[:LavaWallSmoothR2D] = :WALL ; Material[:LavaWallSmoothR2D] = :LAVA_STONE ; Special[:LavaWallSmoothR2D] = :SMOOTH ; Direction[:LavaWallSmoothR2D] = '--S---EE' - ENUM[271] = :LavaWallSmoothR2U ; NUME[:LavaWallSmoothR2U] = 271 ; Caption[:LavaWallSmoothR2U] = 'smooth obsidian wall R2U' ; Shape[:LavaWallSmoothR2U] = :WALL ; Material[:LavaWallSmoothR2U] = :LAVA_STONE ; Special[:LavaWallSmoothR2U] = :SMOOTH ; Direction[:LavaWallSmoothR2U] = 'N-----EE' - ENUM[272] = :LavaWallSmoothRU2 ; NUME[:LavaWallSmoothRU2] = 272 ; Caption[:LavaWallSmoothRU2] = 'smooth obsidian wall RU2' ; Shape[:LavaWallSmoothRU2] = :WALL ; Material[:LavaWallSmoothRU2] = :LAVA_STONE ; Special[:LavaWallSmoothRU2] = :SMOOTH ; Direction[:LavaWallSmoothRU2] = 'NN----E-' - ENUM[273] = :LavaWallSmoothL2U ; NUME[:LavaWallSmoothL2U] = 273 ; Caption[:LavaWallSmoothL2U] = 'smooth obsidian wall L2U' ; Shape[:LavaWallSmoothL2U] = :WALL ; Material[:LavaWallSmoothL2U] = :LAVA_STONE ; Special[:LavaWallSmoothL2U] = :SMOOTH ; Direction[:LavaWallSmoothL2U] = 'N---WW--' - ENUM[274] = :LavaWallSmoothLU2 ; NUME[:LavaWallSmoothLU2] = 274 ; Caption[:LavaWallSmoothLU2] = 'smooth obsidian wall LU2' ; Shape[:LavaWallSmoothLU2] = :WALL ; Material[:LavaWallSmoothLU2] = :LAVA_STONE ; Special[:LavaWallSmoothLU2] = :SMOOTH ; Direction[:LavaWallSmoothLU2] = 'NN--W---' - ENUM[275] = :LavaWallSmoothL2D ; NUME[:LavaWallSmoothL2D] = 275 ; Caption[:LavaWallSmoothL2D] = 'smooth obsidian wall L2D' ; Shape[:LavaWallSmoothL2D] = :WALL ; Material[:LavaWallSmoothL2D] = :LAVA_STONE ; Special[:LavaWallSmoothL2D] = :SMOOTH ; Direction[:LavaWallSmoothL2D] = '--S-WW--' - ENUM[276] = :LavaWallSmoothLD2 ; NUME[:LavaWallSmoothLD2] = 276 ; Caption[:LavaWallSmoothLD2] = 'smooth obsidian wall LD2' ; Shape[:LavaWallSmoothLD2] = :WALL ; Material[:LavaWallSmoothLD2] = :LAVA_STONE ; Special[:LavaWallSmoothLD2] = :SMOOTH ; Direction[:LavaWallSmoothLD2] = '--SSW---' - ENUM[277] = :LavaWallSmoothLRUD ; NUME[:LavaWallSmoothLRUD] = 277 ; Caption[:LavaWallSmoothLRUD] = 'smooth obsidian wall LRUD' ; Shape[:LavaWallSmoothLRUD] = :WALL ; Material[:LavaWallSmoothLRUD] = :LAVA_STONE ; Special[:LavaWallSmoothLRUD] = :SMOOTH ; Direction[:LavaWallSmoothLRUD] = 'N-S-W-E-' - ENUM[278] = :LavaWallSmoothRUD ; NUME[:LavaWallSmoothRUD] = 278 ; Caption[:LavaWallSmoothRUD] = 'smooth obsidian wall RUD' ; Shape[:LavaWallSmoothRUD] = :WALL ; Material[:LavaWallSmoothRUD] = :LAVA_STONE ; Special[:LavaWallSmoothRUD] = :SMOOTH ; Direction[:LavaWallSmoothRUD] = 'N-S---E-' - ENUM[279] = :LavaWallSmoothLRD ; NUME[:LavaWallSmoothLRD] = 279 ; Caption[:LavaWallSmoothLRD] = 'smooth obsidian wall LRD' ; Shape[:LavaWallSmoothLRD] = :WALL ; Material[:LavaWallSmoothLRD] = :LAVA_STONE ; Special[:LavaWallSmoothLRD] = :SMOOTH ; Direction[:LavaWallSmoothLRD] = '--S-W-E-' - ENUM[280] = :LavaWallSmoothLRU ; NUME[:LavaWallSmoothLRU] = 280 ; Caption[:LavaWallSmoothLRU] = 'smooth obsidian wall LRU' ; Shape[:LavaWallSmoothLRU] = :WALL ; Material[:LavaWallSmoothLRU] = :LAVA_STONE ; Special[:LavaWallSmoothLRU] = :SMOOTH ; Direction[:LavaWallSmoothLRU] = 'N---W-E-' - ENUM[281] = :LavaWallSmoothLUD ; NUME[:LavaWallSmoothLUD] = 281 ; Caption[:LavaWallSmoothLUD] = 'smooth obsidian wall LUD' ; Shape[:LavaWallSmoothLUD] = :WALL ; Material[:LavaWallSmoothLUD] = :LAVA_STONE ; Special[:LavaWallSmoothLUD] = :SMOOTH ; Direction[:LavaWallSmoothLUD] = 'N-S-W---' - ENUM[282] = :LavaWallSmoothRD ; NUME[:LavaWallSmoothRD] = 282 ; Caption[:LavaWallSmoothRD] = 'smooth obsidian wall RD' ; Shape[:LavaWallSmoothRD] = :WALL ; Material[:LavaWallSmoothRD] = :LAVA_STONE ; Special[:LavaWallSmoothRD] = :SMOOTH ; Direction[:LavaWallSmoothRD] = '--S---E-' - ENUM[283] = :LavaWallSmoothRU ; NUME[:LavaWallSmoothRU] = 283 ; Caption[:LavaWallSmoothRU] = 'smooth obsidian wall RU' ; Shape[:LavaWallSmoothRU] = :WALL ; Material[:LavaWallSmoothRU] = :LAVA_STONE ; Special[:LavaWallSmoothRU] = :SMOOTH ; Direction[:LavaWallSmoothRU] = 'N-----E-' - ENUM[284] = :LavaWallSmoothLU ; NUME[:LavaWallSmoothLU] = 284 ; Caption[:LavaWallSmoothLU] = 'smooth obsidian wall LU' ; Shape[:LavaWallSmoothLU] = :WALL ; Material[:LavaWallSmoothLU] = :LAVA_STONE ; Special[:LavaWallSmoothLU] = :SMOOTH ; Direction[:LavaWallSmoothLU] = 'N---W---' - ENUM[285] = :LavaWallSmoothLD ; NUME[:LavaWallSmoothLD] = 285 ; Caption[:LavaWallSmoothLD] = 'smooth obsidian wall LD' ; Shape[:LavaWallSmoothLD] = :WALL ; Material[:LavaWallSmoothLD] = :LAVA_STONE ; Special[:LavaWallSmoothLD] = :SMOOTH ; Direction[:LavaWallSmoothLD] = '--S-W---' - ENUM[286] = :LavaWallSmoothUD ; NUME[:LavaWallSmoothUD] = 286 ; Caption[:LavaWallSmoothUD] = 'smooth obsidian wall UD' ; Shape[:LavaWallSmoothUD] = :WALL ; Material[:LavaWallSmoothUD] = :LAVA_STONE ; Special[:LavaWallSmoothUD] = :SMOOTH ; Direction[:LavaWallSmoothUD] = 'N-S-----' - ENUM[287] = :LavaWallSmoothLR ; NUME[:LavaWallSmoothLR] = 287 ; Caption[:LavaWallSmoothLR] = 'smooth obsidian wall LR' ; Shape[:LavaWallSmoothLR] = :WALL ; Material[:LavaWallSmoothLR] = :LAVA_STONE ; Special[:LavaWallSmoothLR] = :SMOOTH ; Direction[:LavaWallSmoothLR] = '----W-E-' - ENUM[288] = :FeatureWallSmoothRD2 ; NUME[:FeatureWallSmoothRD2] = 288 ; Caption[:FeatureWallSmoothRD2] = 'smooth featstone wall RD2' ; Shape[:FeatureWallSmoothRD2] = :WALL ; Material[:FeatureWallSmoothRD2] = :FEATURE ; Special[:FeatureWallSmoothRD2] = :SMOOTH ; Direction[:FeatureWallSmoothRD2] = '--SS--E-' - ENUM[289] = :FeatureWallSmoothR2D ; NUME[:FeatureWallSmoothR2D] = 289 ; Caption[:FeatureWallSmoothR2D] = 'smooth featstone wall R2D' ; Shape[:FeatureWallSmoothR2D] = :WALL ; Material[:FeatureWallSmoothR2D] = :FEATURE ; Special[:FeatureWallSmoothR2D] = :SMOOTH ; Direction[:FeatureWallSmoothR2D] = '--S---EE' - ENUM[290] = :FeatureWallSmoothR2U ; NUME[:FeatureWallSmoothR2U] = 290 ; Caption[:FeatureWallSmoothR2U] = 'smooth featstone wall R2U' ; Shape[:FeatureWallSmoothR2U] = :WALL ; Material[:FeatureWallSmoothR2U] = :FEATURE ; Special[:FeatureWallSmoothR2U] = :SMOOTH ; Direction[:FeatureWallSmoothR2U] = 'N-----EE' - ENUM[291] = :FeatureWallSmoothRU2 ; NUME[:FeatureWallSmoothRU2] = 291 ; Caption[:FeatureWallSmoothRU2] = 'smooth featstone wall RU2' ; Shape[:FeatureWallSmoothRU2] = :WALL ; Material[:FeatureWallSmoothRU2] = :FEATURE ; Special[:FeatureWallSmoothRU2] = :SMOOTH ; Direction[:FeatureWallSmoothRU2] = 'NN----E-' - ENUM[292] = :FeatureWallSmoothL2U ; NUME[:FeatureWallSmoothL2U] = 292 ; Caption[:FeatureWallSmoothL2U] = 'smooth featstone wall L2U' ; Shape[:FeatureWallSmoothL2U] = :WALL ; Material[:FeatureWallSmoothL2U] = :FEATURE ; Special[:FeatureWallSmoothL2U] = :SMOOTH ; Direction[:FeatureWallSmoothL2U] = 'N---WW--' - ENUM[293] = :FeatureWallSmoothLU2 ; NUME[:FeatureWallSmoothLU2] = 293 ; Caption[:FeatureWallSmoothLU2] = 'smooth featstone wall LU2' ; Shape[:FeatureWallSmoothLU2] = :WALL ; Material[:FeatureWallSmoothLU2] = :FEATURE ; Special[:FeatureWallSmoothLU2] = :SMOOTH ; Direction[:FeatureWallSmoothLU2] = 'NN--W---' - ENUM[294] = :FeatureWallSmoothL2D ; NUME[:FeatureWallSmoothL2D] = 294 ; Caption[:FeatureWallSmoothL2D] = 'smooth featstone wall L2D' ; Shape[:FeatureWallSmoothL2D] = :WALL ; Material[:FeatureWallSmoothL2D] = :FEATURE ; Special[:FeatureWallSmoothL2D] = :SMOOTH ; Direction[:FeatureWallSmoothL2D] = '--S-WW--' - ENUM[295] = :FeatureWallSmoothLD2 ; NUME[:FeatureWallSmoothLD2] = 295 ; Caption[:FeatureWallSmoothLD2] = 'smooth featstone wall LD2' ; Shape[:FeatureWallSmoothLD2] = :WALL ; Material[:FeatureWallSmoothLD2] = :FEATURE ; Special[:FeatureWallSmoothLD2] = :SMOOTH ; Direction[:FeatureWallSmoothLD2] = '--SSW---' - ENUM[296] = :FeatureWallSmoothLRUD ; NUME[:FeatureWallSmoothLRUD] = 296 ; Caption[:FeatureWallSmoothLRUD] = 'smooth featstone wall LRUD' ; Shape[:FeatureWallSmoothLRUD] = :WALL ; Material[:FeatureWallSmoothLRUD] = :FEATURE ; Special[:FeatureWallSmoothLRUD] = :SMOOTH ; Direction[:FeatureWallSmoothLRUD] = 'N-S-W-E-' - ENUM[297] = :FeatureWallSmoothRUD ; NUME[:FeatureWallSmoothRUD] = 297 ; Caption[:FeatureWallSmoothRUD] = 'smooth featstone wall RUD' ; Shape[:FeatureWallSmoothRUD] = :WALL ; Material[:FeatureWallSmoothRUD] = :FEATURE ; Special[:FeatureWallSmoothRUD] = :SMOOTH ; Direction[:FeatureWallSmoothRUD] = 'N-S---E-' - ENUM[298] = :FeatureWallSmoothLRD ; NUME[:FeatureWallSmoothLRD] = 298 ; Caption[:FeatureWallSmoothLRD] = 'smooth featstone wall LRD' ; Shape[:FeatureWallSmoothLRD] = :WALL ; Material[:FeatureWallSmoothLRD] = :FEATURE ; Special[:FeatureWallSmoothLRD] = :SMOOTH ; Direction[:FeatureWallSmoothLRD] = '--S-W-E-' - ENUM[299] = :FeatureWallSmoothLRU ; NUME[:FeatureWallSmoothLRU] = 299 ; Caption[:FeatureWallSmoothLRU] = 'smooth featstone wall LRU' ; Shape[:FeatureWallSmoothLRU] = :WALL ; Material[:FeatureWallSmoothLRU] = :FEATURE ; Special[:FeatureWallSmoothLRU] = :SMOOTH ; Direction[:FeatureWallSmoothLRU] = 'N---W-E-' - ENUM[300] = :FeatureWallSmoothLUD ; NUME[:FeatureWallSmoothLUD] = 300 ; Caption[:FeatureWallSmoothLUD] = 'smooth featstone wall LUD' ; Shape[:FeatureWallSmoothLUD] = :WALL ; Material[:FeatureWallSmoothLUD] = :FEATURE ; Special[:FeatureWallSmoothLUD] = :SMOOTH ; Direction[:FeatureWallSmoothLUD] = 'N-S-W---' - ENUM[301] = :FeatureWallSmoothRD ; NUME[:FeatureWallSmoothRD] = 301 ; Caption[:FeatureWallSmoothRD] = 'smooth featstone wall RD' ; Shape[:FeatureWallSmoothRD] = :WALL ; Material[:FeatureWallSmoothRD] = :FEATURE ; Special[:FeatureWallSmoothRD] = :SMOOTH ; Direction[:FeatureWallSmoothRD] = '--S---E-' - ENUM[302] = :FeatureWallSmoothRU ; NUME[:FeatureWallSmoothRU] = 302 ; Caption[:FeatureWallSmoothRU] = 'smooth featstone wall RU' ; Shape[:FeatureWallSmoothRU] = :WALL ; Material[:FeatureWallSmoothRU] = :FEATURE ; Special[:FeatureWallSmoothRU] = :SMOOTH ; Direction[:FeatureWallSmoothRU] = 'N-----E-' - ENUM[303] = :FeatureWallSmoothLU ; NUME[:FeatureWallSmoothLU] = 303 ; Caption[:FeatureWallSmoothLU] = 'smooth featstone wall LU' ; Shape[:FeatureWallSmoothLU] = :WALL ; Material[:FeatureWallSmoothLU] = :FEATURE ; Special[:FeatureWallSmoothLU] = :SMOOTH ; Direction[:FeatureWallSmoothLU] = 'N---W---' - ENUM[304] = :FeatureWallSmoothLD ; NUME[:FeatureWallSmoothLD] = 304 ; Caption[:FeatureWallSmoothLD] = 'smooth featstone wall LD' ; Shape[:FeatureWallSmoothLD] = :WALL ; Material[:FeatureWallSmoothLD] = :FEATURE ; Special[:FeatureWallSmoothLD] = :SMOOTH ; Direction[:FeatureWallSmoothLD] = '--S-W---' - ENUM[305] = :FeatureWallSmoothUD ; NUME[:FeatureWallSmoothUD] = 305 ; Caption[:FeatureWallSmoothUD] = 'smooth featstone wall UD' ; Shape[:FeatureWallSmoothUD] = :WALL ; Material[:FeatureWallSmoothUD] = :FEATURE ; Special[:FeatureWallSmoothUD] = :SMOOTH ; Direction[:FeatureWallSmoothUD] = 'N-S-----' - ENUM[306] = :FeatureWallSmoothLR ; NUME[:FeatureWallSmoothLR] = 306 ; Caption[:FeatureWallSmoothLR] = 'smooth featstone wall LR' ; Shape[:FeatureWallSmoothLR] = :WALL ; Material[:FeatureWallSmoothLR] = :FEATURE ; Special[:FeatureWallSmoothLR] = :SMOOTH ; Direction[:FeatureWallSmoothLR] = '----W-E-' - ENUM[307] = :StoneWallSmoothRD2 ; NUME[:StoneWallSmoothRD2] = 307 ; Caption[:StoneWallSmoothRD2] = 'smooth stone wall RD2' ; Shape[:StoneWallSmoothRD2] = :WALL ; Material[:StoneWallSmoothRD2] = :STONE ; Special[:StoneWallSmoothRD2] = :SMOOTH ; Direction[:StoneWallSmoothRD2] = '--SS--E-' - ENUM[308] = :StoneWallSmoothR2D ; NUME[:StoneWallSmoothR2D] = 308 ; Caption[:StoneWallSmoothR2D] = 'smooth stone wall R2D' ; Shape[:StoneWallSmoothR2D] = :WALL ; Material[:StoneWallSmoothR2D] = :STONE ; Special[:StoneWallSmoothR2D] = :SMOOTH ; Direction[:StoneWallSmoothR2D] = '--S---EE' - ENUM[309] = :StoneWallSmoothR2U ; NUME[:StoneWallSmoothR2U] = 309 ; Caption[:StoneWallSmoothR2U] = 'smooth stone wall R2U' ; Shape[:StoneWallSmoothR2U] = :WALL ; Material[:StoneWallSmoothR2U] = :STONE ; Special[:StoneWallSmoothR2U] = :SMOOTH ; Direction[:StoneWallSmoothR2U] = 'N-----EE' - ENUM[310] = :StoneWallSmoothRU2 ; NUME[:StoneWallSmoothRU2] = 310 ; Caption[:StoneWallSmoothRU2] = 'smooth stone wall RU2' ; Shape[:StoneWallSmoothRU2] = :WALL ; Material[:StoneWallSmoothRU2] = :STONE ; Special[:StoneWallSmoothRU2] = :SMOOTH ; Direction[:StoneWallSmoothRU2] = 'NN----E-' - ENUM[311] = :StoneWallSmoothL2U ; NUME[:StoneWallSmoothL2U] = 311 ; Caption[:StoneWallSmoothL2U] = 'smooth stone wall L2U' ; Shape[:StoneWallSmoothL2U] = :WALL ; Material[:StoneWallSmoothL2U] = :STONE ; Special[:StoneWallSmoothL2U] = :SMOOTH ; Direction[:StoneWallSmoothL2U] = 'N---WW--' - ENUM[312] = :StoneWallSmoothLU2 ; NUME[:StoneWallSmoothLU2] = 312 ; Caption[:StoneWallSmoothLU2] = 'smooth stone wall LU2' ; Shape[:StoneWallSmoothLU2] = :WALL ; Material[:StoneWallSmoothLU2] = :STONE ; Special[:StoneWallSmoothLU2] = :SMOOTH ; Direction[:StoneWallSmoothLU2] = 'NN--W---' - ENUM[313] = :StoneWallSmoothL2D ; NUME[:StoneWallSmoothL2D] = 313 ; Caption[:StoneWallSmoothL2D] = 'smooth stone wall L2D' ; Shape[:StoneWallSmoothL2D] = :WALL ; Material[:StoneWallSmoothL2D] = :STONE ; Special[:StoneWallSmoothL2D] = :SMOOTH ; Direction[:StoneWallSmoothL2D] = '--S-WW--' - ENUM[314] = :StoneWallSmoothLD2 ; NUME[:StoneWallSmoothLD2] = 314 ; Caption[:StoneWallSmoothLD2] = 'smooth stone wall LD2' ; Shape[:StoneWallSmoothLD2] = :WALL ; Material[:StoneWallSmoothLD2] = :STONE ; Special[:StoneWallSmoothLD2] = :SMOOTH ; Direction[:StoneWallSmoothLD2] = '--SSW---' - ENUM[315] = :StoneWallSmoothLRUD ; NUME[:StoneWallSmoothLRUD] = 315 ; Caption[:StoneWallSmoothLRUD] = 'smooth stone wall LRUD' ; Shape[:StoneWallSmoothLRUD] = :WALL ; Material[:StoneWallSmoothLRUD] = :STONE ; Special[:StoneWallSmoothLRUD] = :SMOOTH ; Direction[:StoneWallSmoothLRUD] = 'N-S-W-E-' - ENUM[316] = :StoneWallSmoothRUD ; NUME[:StoneWallSmoothRUD] = 316 ; Caption[:StoneWallSmoothRUD] = 'smooth stone wall RUD' ; Shape[:StoneWallSmoothRUD] = :WALL ; Material[:StoneWallSmoothRUD] = :STONE ; Special[:StoneWallSmoothRUD] = :SMOOTH ; Direction[:StoneWallSmoothRUD] = 'N-S---E-' - ENUM[317] = :StoneWallSmoothLRD ; NUME[:StoneWallSmoothLRD] = 317 ; Caption[:StoneWallSmoothLRD] = 'smooth stone wall LRD' ; Shape[:StoneWallSmoothLRD] = :WALL ; Material[:StoneWallSmoothLRD] = :STONE ; Special[:StoneWallSmoothLRD] = :SMOOTH ; Direction[:StoneWallSmoothLRD] = '--S-W-E-' - ENUM[318] = :StoneWallSmoothLRU ; NUME[:StoneWallSmoothLRU] = 318 ; Caption[:StoneWallSmoothLRU] = 'smooth stone wall LRU' ; Shape[:StoneWallSmoothLRU] = :WALL ; Material[:StoneWallSmoothLRU] = :STONE ; Special[:StoneWallSmoothLRU] = :SMOOTH ; Direction[:StoneWallSmoothLRU] = 'N---W-E-' - ENUM[319] = :StoneWallSmoothLUD ; NUME[:StoneWallSmoothLUD] = 319 ; Caption[:StoneWallSmoothLUD] = 'smooth stone wall LUD' ; Shape[:StoneWallSmoothLUD] = :WALL ; Material[:StoneWallSmoothLUD] = :STONE ; Special[:StoneWallSmoothLUD] = :SMOOTH ; Direction[:StoneWallSmoothLUD] = 'N-S-W---' - ENUM[320] = :StoneWallSmoothRD ; NUME[:StoneWallSmoothRD] = 320 ; Caption[:StoneWallSmoothRD] = 'smooth stone wall RD' ; Shape[:StoneWallSmoothRD] = :WALL ; Material[:StoneWallSmoothRD] = :STONE ; Special[:StoneWallSmoothRD] = :SMOOTH ; Direction[:StoneWallSmoothRD] = '--S---E-' - ENUM[321] = :StoneWallSmoothRU ; NUME[:StoneWallSmoothRU] = 321 ; Caption[:StoneWallSmoothRU] = 'smooth stone wall RU' ; Shape[:StoneWallSmoothRU] = :WALL ; Material[:StoneWallSmoothRU] = :STONE ; Special[:StoneWallSmoothRU] = :SMOOTH ; Direction[:StoneWallSmoothRU] = 'N-----E-' - ENUM[322] = :StoneWallSmoothLU ; NUME[:StoneWallSmoothLU] = 322 ; Caption[:StoneWallSmoothLU] = 'smooth stone wall LU' ; Shape[:StoneWallSmoothLU] = :WALL ; Material[:StoneWallSmoothLU] = :STONE ; Special[:StoneWallSmoothLU] = :SMOOTH ; Direction[:StoneWallSmoothLU] = 'N---W---' - ENUM[323] = :StoneWallSmoothLD ; NUME[:StoneWallSmoothLD] = 323 ; Caption[:StoneWallSmoothLD] = 'smooth stone wall LD' ; Shape[:StoneWallSmoothLD] = :WALL ; Material[:StoneWallSmoothLD] = :STONE ; Special[:StoneWallSmoothLD] = :SMOOTH ; Direction[:StoneWallSmoothLD] = '--S-W---' - ENUM[324] = :StoneWallSmoothUD ; NUME[:StoneWallSmoothUD] = 324 ; Caption[:StoneWallSmoothUD] = 'smooth stone wall UD' ; Shape[:StoneWallSmoothUD] = :WALL ; Material[:StoneWallSmoothUD] = :STONE ; Special[:StoneWallSmoothUD] = :SMOOTH ; Direction[:StoneWallSmoothUD] = 'N-S-----' - ENUM[325] = :StoneWallSmoothLR ; NUME[:StoneWallSmoothLR] = 325 ; Caption[:StoneWallSmoothLR] = 'smooth stone wall LR' ; Shape[:StoneWallSmoothLR] = :WALL ; Material[:StoneWallSmoothLR] = :STONE ; Special[:StoneWallSmoothLR] = :SMOOTH ; Direction[:StoneWallSmoothLR] = '----W-E-' - ENUM[326] = :LavaFortification ; NUME[:LavaFortification] = 326 ; Caption[:LavaFortification] = 'obsidian fortification' ; Shape[:LavaFortification] = :FORTIFICATION ; Material[:LavaFortification] = :LAVA_STONE - ENUM[327] = :FeatureFortification ; NUME[:FeatureFortification] = 327 ; Caption[:FeatureFortification] = 'featstone fortification' ; Shape[:FeatureFortification] = :FORTIFICATION ; Material[:FeatureFortification] = :FEATURE - ENUM[328] = :LavaWallWorn1 ; NUME[:LavaWallWorn1] = 328 ; Caption[:LavaWallWorn1] = 'worn 1 obsidian wall' ; Shape[:LavaWallWorn1] = :WALL ; Material[:LavaWallWorn1] = :LAVA_STONE ; Special[:LavaWallWorn1] = :WORN_1 - ENUM[329] = :LavaWallWorn2 ; NUME[:LavaWallWorn2] = 329 ; Caption[:LavaWallWorn2] = 'worn 2 obsidian wall' ; Shape[:LavaWallWorn2] = :WALL ; Material[:LavaWallWorn2] = :LAVA_STONE ; Special[:LavaWallWorn2] = :WORN_2 - ENUM[330] = :LavaWallWorn3 ; NUME[:LavaWallWorn3] = 330 ; Caption[:LavaWallWorn3] = 'worn 3 obsidian wall' ; Shape[:LavaWallWorn3] = :WALL ; Material[:LavaWallWorn3] = :LAVA_STONE ; Special[:LavaWallWorn3] = :WORN_3 - ENUM[331] = :LavaWall ; NUME[:LavaWall] = 331 ; Caption[:LavaWall] = 'obsidian wall' ; Shape[:LavaWall] = :WALL ; Material[:LavaWall] = :LAVA_STONE ; Special[:LavaWall] = :NORMAL - ENUM[332] = :FeatureWallWorn1 ; NUME[:FeatureWallWorn1] = 332 ; Caption[:FeatureWallWorn1] = 'worn 1 featstone wall' ; Shape[:FeatureWallWorn1] = :WALL ; Material[:FeatureWallWorn1] = :FEATURE ; Special[:FeatureWallWorn1] = :WORN_1 - ENUM[333] = :FeatureWallWorn2 ; NUME[:FeatureWallWorn2] = 333 ; Caption[:FeatureWallWorn2] = 'worn 2 featstone wall' ; Shape[:FeatureWallWorn2] = :WALL ; Material[:FeatureWallWorn2] = :FEATURE ; Special[:FeatureWallWorn2] = :WORN_2 - ENUM[334] = :FeatureWallWorn3 ; NUME[:FeatureWallWorn3] = 334 ; Caption[:FeatureWallWorn3] = 'worn 3 featstone wall' ; Shape[:FeatureWallWorn3] = :WALL ; Material[:FeatureWallWorn3] = :FEATURE ; Special[:FeatureWallWorn3] = :WORN_3 - ENUM[335] = :FeatureWall ; NUME[:FeatureWall] = 335 ; Caption[:FeatureWall] = 'featstone wall' ; Shape[:FeatureWall] = :WALL ; Material[:FeatureWall] = :FEATURE ; Special[:FeatureWall] = :NORMAL - ENUM[336] = :StoneFloor1 ; NUME[:StoneFloor1] = 336 ; Caption[:StoneFloor1] = 'stone floor' ; Shape[:StoneFloor1] = :FLOOR ; Material[:StoneFloor1] = :STONE ; Variant[:StoneFloor1] = :VAR_1 ; Special[:StoneFloor1] = :NORMAL - ENUM[337] = :StoneFloor2 ; NUME[:StoneFloor2] = 337 ; Caption[:StoneFloor2] = 'stone floor' ; Shape[:StoneFloor2] = :FLOOR ; Material[:StoneFloor2] = :STONE ; Variant[:StoneFloor2] = :VAR_2 ; Special[:StoneFloor2] = :NORMAL - ENUM[338] = :StoneFloor3 ; NUME[:StoneFloor3] = 338 ; Caption[:StoneFloor3] = 'stone floor' ; Shape[:StoneFloor3] = :FLOOR ; Material[:StoneFloor3] = :STONE ; Variant[:StoneFloor3] = :VAR_3 ; Special[:StoneFloor3] = :NORMAL - ENUM[339] = :StoneFloor4 ; NUME[:StoneFloor4] = 339 ; Caption[:StoneFloor4] = 'stone floor' ; Shape[:StoneFloor4] = :FLOOR ; Material[:StoneFloor4] = :STONE ; Variant[:StoneFloor4] = :VAR_4 ; Special[:StoneFloor4] = :NORMAL - ENUM[340] = :LavaFloor1 ; NUME[:LavaFloor1] = 340 ; Caption[:LavaFloor1] = 'obsidian floor' ; Shape[:LavaFloor1] = :FLOOR ; Material[:LavaFloor1] = :LAVA_STONE ; Variant[:LavaFloor1] = :VAR_1 ; Special[:LavaFloor1] = :NORMAL - ENUM[341] = :LavaFloor2 ; NUME[:LavaFloor2] = 341 ; Caption[:LavaFloor2] = 'obsidian floor' ; Shape[:LavaFloor2] = :FLOOR ; Material[:LavaFloor2] = :LAVA_STONE ; Variant[:LavaFloor2] = :VAR_2 ; Special[:LavaFloor2] = :NORMAL - ENUM[342] = :LavaFloor3 ; NUME[:LavaFloor3] = 342 ; Caption[:LavaFloor3] = 'obsidian floor' ; Shape[:LavaFloor3] = :FLOOR ; Material[:LavaFloor3] = :LAVA_STONE ; Variant[:LavaFloor3] = :VAR_3 ; Special[:LavaFloor3] = :NORMAL - ENUM[343] = :LavaFloor4 ; NUME[:LavaFloor4] = 343 ; Caption[:LavaFloor4] = 'obsidian floor' ; Shape[:LavaFloor4] = :FLOOR ; Material[:LavaFloor4] = :LAVA_STONE ; Variant[:LavaFloor4] = :VAR_4 ; Special[:LavaFloor4] = :NORMAL - ENUM[344] = :FeatureFloor1 ; NUME[:FeatureFloor1] = 344 ; Caption[:FeatureFloor1] = 'featstone floor' ; Shape[:FeatureFloor1] = :FLOOR ; Material[:FeatureFloor1] = :FEATURE ; Variant[:FeatureFloor1] = :VAR_1 ; Special[:FeatureFloor1] = :NORMAL - ENUM[345] = :FeatureFloor2 ; NUME[:FeatureFloor2] = 345 ; Caption[:FeatureFloor2] = 'featstone floor' ; Shape[:FeatureFloor2] = :FLOOR ; Material[:FeatureFloor2] = :FEATURE ; Variant[:FeatureFloor2] = :VAR_2 ; Special[:FeatureFloor2] = :NORMAL - ENUM[346] = :FeatureFloor3 ; NUME[:FeatureFloor3] = 346 ; Caption[:FeatureFloor3] = 'featstone floor' ; Shape[:FeatureFloor3] = :FLOOR ; Material[:FeatureFloor3] = :FEATURE ; Variant[:FeatureFloor3] = :VAR_3 ; Special[:FeatureFloor3] = :NORMAL - ENUM[347] = :FeatureFloor4 ; NUME[:FeatureFloor4] = 347 ; Caption[:FeatureFloor4] = 'featstone floor' ; Shape[:FeatureFloor4] = :FLOOR ; Material[:FeatureFloor4] = :FEATURE ; Variant[:FeatureFloor4] = :VAR_4 ; Special[:FeatureFloor4] = :NORMAL - ENUM[348] = :GrassDarkFloor1 ; NUME[:GrassDarkFloor1] = 348 ; Caption[:GrassDarkFloor1] = 'dark grass' ; Shape[:GrassDarkFloor1] = :FLOOR ; Material[:GrassDarkFloor1] = :GRASS_DARK ; Variant[:GrassDarkFloor1] = :VAR_1 - ENUM[349] = :GrassDarkFloor2 ; NUME[:GrassDarkFloor2] = 349 ; Caption[:GrassDarkFloor2] = 'dark grass' ; Shape[:GrassDarkFloor2] = :FLOOR ; Material[:GrassDarkFloor2] = :GRASS_DARK ; Variant[:GrassDarkFloor2] = :VAR_2 - ENUM[350] = :GrassDarkFloor3 ; NUME[:GrassDarkFloor3] = 350 ; Caption[:GrassDarkFloor3] = 'dark grass' ; Shape[:GrassDarkFloor3] = :FLOOR ; Material[:GrassDarkFloor3] = :GRASS_DARK ; Variant[:GrassDarkFloor3] = :VAR_3 - ENUM[351] = :GrassDarkFloor4 ; NUME[:GrassDarkFloor4] = 351 ; Caption[:GrassDarkFloor4] = 'dark grass' ; Shape[:GrassDarkFloor4] = :FLOOR ; Material[:GrassDarkFloor4] = :GRASS_DARK ; Variant[:GrassDarkFloor4] = :VAR_4 - ENUM[352] = :SoilFloor1 ; NUME[:SoilFloor1] = 352 ; Caption[:SoilFloor1] = 'soil floor' ; Shape[:SoilFloor1] = :FLOOR ; Material[:SoilFloor1] = :SOIL ; Variant[:SoilFloor1] = :VAR_1 ; Special[:SoilFloor1] = :NORMAL - ENUM[353] = :SoilFloor2 ; NUME[:SoilFloor2] = 353 ; Caption[:SoilFloor2] = 'soil floor' ; Shape[:SoilFloor2] = :FLOOR ; Material[:SoilFloor2] = :SOIL ; Variant[:SoilFloor2] = :VAR_2 ; Special[:SoilFloor2] = :NORMAL - ENUM[354] = :SoilFloor3 ; NUME[:SoilFloor3] = 354 ; Caption[:SoilFloor3] = 'soil floor' ; Shape[:SoilFloor3] = :FLOOR ; Material[:SoilFloor3] = :SOIL ; Variant[:SoilFloor3] = :VAR_3 ; Special[:SoilFloor3] = :NORMAL - ENUM[355] = :SoilFloor4 ; NUME[:SoilFloor4] = 355 ; Caption[:SoilFloor4] = 'soil floor' ; Shape[:SoilFloor4] = :FLOOR ; Material[:SoilFloor4] = :SOIL ; Variant[:SoilFloor4] = :VAR_4 ; Special[:SoilFloor4] = :NORMAL - ENUM[356] = :SoilWetFloor1 ; NUME[:SoilWetFloor1] = 356 ; Caption[:SoilWetFloor1] = 'wet soil floor' ; Shape[:SoilWetFloor1] = :FLOOR ; Material[:SoilWetFloor1] = :SOIL ; Variant[:SoilWetFloor1] = :VAR_1 ; Special[:SoilWetFloor1] = :WET - ENUM[357] = :SoilWetFloor2 ; NUME[:SoilWetFloor2] = 357 ; Caption[:SoilWetFloor2] = 'wet soil floor' ; Shape[:SoilWetFloor2] = :FLOOR ; Material[:SoilWetFloor2] = :SOIL ; Variant[:SoilWetFloor2] = :VAR_2 ; Special[:SoilWetFloor2] = :WET - ENUM[358] = :SoilWetFloor3 ; NUME[:SoilWetFloor3] = 358 ; Caption[:SoilWetFloor3] = 'wet soil floor' ; Shape[:SoilWetFloor3] = :FLOOR ; Material[:SoilWetFloor3] = :SOIL ; Variant[:SoilWetFloor3] = :VAR_3 ; Special[:SoilWetFloor3] = :WET - ENUM[359] = :SoilWetFloor4 ; NUME[:SoilWetFloor4] = 359 ; Caption[:SoilWetFloor4] = 'wet soil floor' ; Shape[:SoilWetFloor4] = :FLOOR ; Material[:SoilWetFloor4] = :SOIL ; Variant[:SoilWetFloor4] = :VAR_4 ; Special[:SoilWetFloor4] = :WET - ENUM[360] = :FrozenFortification ; NUME[:FrozenFortification] = 360 ; Caption[:FrozenFortification] = 'ice fortification' ; Shape[:FrozenFortification] = :FORTIFICATION ; Material[:FrozenFortification] = :FROZEN_LIQUID - ENUM[361] = :FrozenWallWorn1 ; NUME[:FrozenWallWorn1] = 361 ; Caption[:FrozenWallWorn1] = 'worn 1 ice wall' ; Shape[:FrozenWallWorn1] = :WALL ; Material[:FrozenWallWorn1] = :FROZEN_LIQUID ; Special[:FrozenWallWorn1] = :WORN_1 - ENUM[362] = :FrozenWallWorn2 ; NUME[:FrozenWallWorn2] = 362 ; Caption[:FrozenWallWorn2] = 'worn 2 ice wall' ; Shape[:FrozenWallWorn2] = :WALL ; Material[:FrozenWallWorn2] = :FROZEN_LIQUID ; Special[:FrozenWallWorn2] = :WORN_2 - ENUM[363] = :FrozenWallWorn3 ; NUME[:FrozenWallWorn3] = 363 ; Caption[:FrozenWallWorn3] = 'worn 3 ice wall' ; Shape[:FrozenWallWorn3] = :WALL ; Material[:FrozenWallWorn3] = :FROZEN_LIQUID ; Special[:FrozenWallWorn3] = :WORN_3 - ENUM[364] = :FrozenWall ; NUME[:FrozenWall] = 364 ; Caption[:FrozenWall] = 'ice wall' ; Shape[:FrozenWall] = :WALL ; Material[:FrozenWall] = :FROZEN_LIQUID ; Special[:FrozenWall] = :NORMAL - ENUM[365] = :RiverN ; NUME[:RiverN] = 365 ; Caption[:RiverN] = 'river N' ; Shape[:RiverN] = :FLOOR ; Material[:RiverN] = :RIVER ; Special[:RiverN] = :NORMAL ; Direction[:RiverN] = 'N' - ENUM[366] = :RiverS ; NUME[:RiverS] = 366 ; Caption[:RiverS] = 'river S' ; Shape[:RiverS] = :FLOOR ; Material[:RiverS] = :RIVER ; Special[:RiverS] = :NORMAL ; Direction[:RiverS] = 'S' - ENUM[367] = :RiverE ; NUME[:RiverE] = 367 ; Caption[:RiverE] = 'river E' ; Shape[:RiverE] = :FLOOR ; Material[:RiverE] = :RIVER ; Special[:RiverE] = :NORMAL ; Direction[:RiverE] = 'E' - ENUM[368] = :RiverW ; NUME[:RiverW] = 368 ; Caption[:RiverW] = 'river W' ; Shape[:RiverW] = :FLOOR ; Material[:RiverW] = :RIVER ; Special[:RiverW] = :NORMAL ; Direction[:RiverW] = 'W' - ENUM[369] = :RiverNW ; NUME[:RiverNW] = 369 ; Caption[:RiverNW] = 'river NW' ; Shape[:RiverNW] = :FLOOR ; Material[:RiverNW] = :RIVER ; Special[:RiverNW] = :NORMAL ; Direction[:RiverNW] = 'NW' - ENUM[370] = :RiverNE ; NUME[:RiverNE] = 370 ; Caption[:RiverNE] = 'river NE' ; Shape[:RiverNE] = :FLOOR ; Material[:RiverNE] = :RIVER ; Special[:RiverNE] = :NORMAL ; Direction[:RiverNE] = 'NE' - ENUM[371] = :RiverSW ; NUME[:RiverSW] = 371 ; Caption[:RiverSW] = 'river SW' ; Shape[:RiverSW] = :FLOOR ; Material[:RiverSW] = :RIVER ; Special[:RiverSW] = :NORMAL ; Direction[:RiverSW] = 'SW' - ENUM[372] = :RiverSE ; NUME[:RiverSE] = 372 ; Caption[:RiverSE] = 'river SE' ; Shape[:RiverSE] = :FLOOR ; Material[:RiverSE] = :RIVER ; Special[:RiverSE] = :NORMAL ; Direction[:RiverSE] = 'SE' - ENUM[373] = :BrookN ; NUME[:BrookN] = 373 ; Caption[:BrookN] = 'brook bed N' ; Shape[:BrookN] = :BROOK_BED ; Material[:BrookN] = :BROOK ; Direction[:BrookN] = 'N' - ENUM[374] = :BrookS ; NUME[:BrookS] = 374 ; Caption[:BrookS] = 'brook bed S' ; Shape[:BrookS] = :BROOK_BED ; Material[:BrookS] = :BROOK ; Direction[:BrookS] = 'S' - ENUM[375] = :BrookE ; NUME[:BrookE] = 375 ; Caption[:BrookE] = 'brook bed E' ; Shape[:BrookE] = :BROOK_BED ; Material[:BrookE] = :BROOK ; Direction[:BrookE] = 'E' - ENUM[376] = :BrookW ; NUME[:BrookW] = 376 ; Caption[:BrookW] = 'brook bed W' ; Shape[:BrookW] = :BROOK_BED ; Material[:BrookW] = :BROOK ; Direction[:BrookW] = 'W' - ENUM[377] = :BrookNW ; NUME[:BrookNW] = 377 ; Caption[:BrookNW] = 'brook bed NW' ; Shape[:BrookNW] = :BROOK_BED ; Material[:BrookNW] = :BROOK ; Direction[:BrookNW] = 'NW' - ENUM[378] = :BrookNE ; NUME[:BrookNE] = 378 ; Caption[:BrookNE] = 'brook bed NE' ; Shape[:BrookNE] = :BROOK_BED ; Material[:BrookNE] = :BROOK ; Direction[:BrookNE] = 'NE' - ENUM[379] = :BrookSW ; NUME[:BrookSW] = 379 ; Caption[:BrookSW] = 'brook bed SW' ; Shape[:BrookSW] = :BROOK_BED ; Material[:BrookSW] = :BROOK ; Direction[:BrookSW] = 'SW' - ENUM[380] = :BrookSE ; NUME[:BrookSE] = 380 ; Caption[:BrookSE] = 'brook bed SE' ; Shape[:BrookSE] = :BROOK_BED ; Material[:BrookSE] = :BROOK ; Direction[:BrookSE] = 'SE' - ENUM[381] = :BrookTop ; NUME[:BrookTop] = 381 ; Caption[:BrookTop] = 'brook top' ; Shape[:BrookTop] = :BROOK_TOP ; Material[:BrookTop] = :BROOK - ENUM[387] = :GrassDryFloor1 ; NUME[:GrassDryFloor1] = 387 ; Caption[:GrassDryFloor1] = 'dry grass' ; Shape[:GrassDryFloor1] = :FLOOR ; Material[:GrassDryFloor1] = :GRASS_DRY ; Variant[:GrassDryFloor1] = :VAR_1 - ENUM[388] = :GrassDryFloor2 ; NUME[:GrassDryFloor2] = 388 ; Caption[:GrassDryFloor2] = 'dry grass' ; Shape[:GrassDryFloor2] = :FLOOR ; Material[:GrassDryFloor2] = :GRASS_DRY ; Variant[:GrassDryFloor2] = :VAR_2 - ENUM[389] = :GrassDryFloor3 ; NUME[:GrassDryFloor3] = 389 ; Caption[:GrassDryFloor3] = 'dry grass' ; Shape[:GrassDryFloor3] = :FLOOR ; Material[:GrassDryFloor3] = :GRASS_DRY ; Variant[:GrassDryFloor3] = :VAR_3 - ENUM[390] = :GrassDryFloor4 ; NUME[:GrassDryFloor4] = 390 ; Caption[:GrassDryFloor4] = 'dry grass' ; Shape[:GrassDryFloor4] = :FLOOR ; Material[:GrassDryFloor4] = :GRASS_DRY ; Variant[:GrassDryFloor4] = :VAR_4 - ENUM[391] = :TreeDead ; NUME[:TreeDead] = 391 ; Caption[:TreeDead] = 'dead tree' ; Shape[:TreeDead] = :TREE ; Material[:TreeDead] = :PLANT ; Special[:TreeDead] = :DEAD - ENUM[392] = :SaplingDead ; NUME[:SaplingDead] = 392 ; Caption[:SaplingDead] = 'dead sapling' ; Shape[:SaplingDead] = :SAPLING ; Material[:SaplingDead] = :PLANT ; Special[:SaplingDead] = :DEAD - ENUM[393] = :ShrubDead ; NUME[:ShrubDead] = 393 ; Caption[:ShrubDead] = 'dead shrub' ; Shape[:ShrubDead] = :SHRUB ; Material[:ShrubDead] = :PLANT ; Special[:ShrubDead] = :DEAD - ENUM[394] = :GrassDeadFloor1 ; NUME[:GrassDeadFloor1] = 394 ; Caption[:GrassDeadFloor1] = 'dead grass' ; Shape[:GrassDeadFloor1] = :FLOOR ; Material[:GrassDeadFloor1] = :GRASS_DEAD ; Variant[:GrassDeadFloor1] = :VAR_1 - ENUM[395] = :GrassDeadFloor2 ; NUME[:GrassDeadFloor2] = 395 ; Caption[:GrassDeadFloor2] = 'dead grass' ; Shape[:GrassDeadFloor2] = :FLOOR ; Material[:GrassDeadFloor2] = :GRASS_DEAD ; Variant[:GrassDeadFloor2] = :VAR_2 - ENUM[396] = :GrassDeadFloor3 ; NUME[:GrassDeadFloor3] = 396 ; Caption[:GrassDeadFloor3] = 'dead grass' ; Shape[:GrassDeadFloor3] = :FLOOR ; Material[:GrassDeadFloor3] = :GRASS_DEAD ; Variant[:GrassDeadFloor3] = :VAR_3 - ENUM[397] = :GrassDeadFloor4 ; NUME[:GrassDeadFloor4] = 397 ; Caption[:GrassDeadFloor4] = 'dead grass' ; Shape[:GrassDeadFloor4] = :FLOOR ; Material[:GrassDeadFloor4] = :GRASS_DEAD ; Variant[:GrassDeadFloor4] = :VAR_4 - ENUM[398] = :GrassLightFloor1 ; NUME[:GrassLightFloor1] = 398 ; Caption[:GrassLightFloor1] = 'light grass' ; Shape[:GrassLightFloor1] = :FLOOR ; Material[:GrassLightFloor1] = :GRASS_LIGHT ; Variant[:GrassLightFloor1] = :VAR_1 - ENUM[399] = :GrassLightFloor2 ; NUME[:GrassLightFloor2] = 399 ; Caption[:GrassLightFloor2] = 'light grass' ; Shape[:GrassLightFloor2] = :FLOOR ; Material[:GrassLightFloor2] = :GRASS_LIGHT ; Variant[:GrassLightFloor2] = :VAR_2 - ENUM[400] = :GrassLightFloor3 ; NUME[:GrassLightFloor3] = 400 ; Caption[:GrassLightFloor3] = 'light grass' ; Shape[:GrassLightFloor3] = :FLOOR ; Material[:GrassLightFloor3] = :GRASS_LIGHT ; Variant[:GrassLightFloor3] = :VAR_3 - ENUM[401] = :GrassLightFloor4 ; NUME[:GrassLightFloor4] = 401 ; Caption[:GrassLightFloor4] = 'light grass' ; Shape[:GrassLightFloor4] = :FLOOR ; Material[:GrassLightFloor4] = :GRASS_LIGHT ; Variant[:GrassLightFloor4] = :VAR_4 - ENUM[402] = :StoneBoulder ; NUME[:StoneBoulder] = 402 ; Caption[:StoneBoulder] = 'boulder' ; Shape[:StoneBoulder] = :BOULDER ; Material[:StoneBoulder] = :STONE - ENUM[403] = :LavaBoulder ; NUME[:LavaBoulder] = 403 ; Caption[:LavaBoulder] = 'obsidian boulder' ; Shape[:LavaBoulder] = :BOULDER ; Material[:LavaBoulder] = :LAVA_STONE - ENUM[404] = :FeatureBoulder ; NUME[:FeatureBoulder] = 404 ; Caption[:FeatureBoulder] = 'featstone boulder' ; Shape[:FeatureBoulder] = :BOULDER ; Material[:FeatureBoulder] = :FEATURE - ENUM[405] = :StonePebbles1 ; NUME[:StonePebbles1] = 405 ; Caption[:StonePebbles1] = 'stone pebbles' ; Shape[:StonePebbles1] = :PEBBLES ; Material[:StonePebbles1] = :STONE ; Variant[:StonePebbles1] = :VAR_1 - ENUM[406] = :StonePebbles2 ; NUME[:StonePebbles2] = 406 ; Caption[:StonePebbles2] = 'stone pebbles' ; Shape[:StonePebbles2] = :PEBBLES ; Material[:StonePebbles2] = :STONE ; Variant[:StonePebbles2] = :VAR_2 - ENUM[407] = :StonePebbles3 ; NUME[:StonePebbles3] = 407 ; Caption[:StonePebbles3] = 'stone pebbles' ; Shape[:StonePebbles3] = :PEBBLES ; Material[:StonePebbles3] = :STONE ; Variant[:StonePebbles3] = :VAR_3 - ENUM[408] = :StonePebbles4 ; NUME[:StonePebbles4] = 408 ; Caption[:StonePebbles4] = 'stone pebbles' ; Shape[:StonePebbles4] = :PEBBLES ; Material[:StonePebbles4] = :STONE ; Variant[:StonePebbles4] = :VAR_4 - ENUM[409] = :LavaPebbles1 ; NUME[:LavaPebbles1] = 409 ; Caption[:LavaPebbles1] = 'obsidian pebbles' ; Shape[:LavaPebbles1] = :PEBBLES ; Material[:LavaPebbles1] = :LAVA_STONE ; Variant[:LavaPebbles1] = :VAR_1 - ENUM[410] = :LavaPebbles2 ; NUME[:LavaPebbles2] = 410 ; Caption[:LavaPebbles2] = 'obsidian pebbles' ; Shape[:LavaPebbles2] = :PEBBLES ; Material[:LavaPebbles2] = :LAVA_STONE ; Variant[:LavaPebbles2] = :VAR_2 - ENUM[411] = :LavaPebbles3 ; NUME[:LavaPebbles3] = 411 ; Caption[:LavaPebbles3] = 'obsidian pebbles' ; Shape[:LavaPebbles3] = :PEBBLES ; Material[:LavaPebbles3] = :LAVA_STONE ; Variant[:LavaPebbles3] = :VAR_3 - ENUM[412] = :LavaPebbles4 ; NUME[:LavaPebbles4] = 412 ; Caption[:LavaPebbles4] = 'obsidian pebbles' ; Shape[:LavaPebbles4] = :PEBBLES ; Material[:LavaPebbles4] = :LAVA_STONE ; Variant[:LavaPebbles4] = :VAR_4 - ENUM[413] = :FeaturePebbles1 ; NUME[:FeaturePebbles1] = 413 ; Caption[:FeaturePebbles1] = 'featstone pebbles' ; Shape[:FeaturePebbles1] = :PEBBLES ; Material[:FeaturePebbles1] = :FEATURE ; Variant[:FeaturePebbles1] = :VAR_1 - ENUM[414] = :FeaturePebbles2 ; NUME[:FeaturePebbles2] = 414 ; Caption[:FeaturePebbles2] = 'featstone pebbles' ; Shape[:FeaturePebbles2] = :PEBBLES ; Material[:FeaturePebbles2] = :FEATURE ; Variant[:FeaturePebbles2] = :VAR_2 - ENUM[415] = :FeaturePebbles3 ; NUME[:FeaturePebbles3] = 415 ; Caption[:FeaturePebbles3] = 'featstone pebbles' ; Shape[:FeaturePebbles3] = :PEBBLES ; Material[:FeaturePebbles3] = :FEATURE ; Variant[:FeaturePebbles3] = :VAR_3 - ENUM[416] = :FeaturePebbles4 ; NUME[:FeaturePebbles4] = 416 ; Caption[:FeaturePebbles4] = 'featstone pebbles' ; Shape[:FeaturePebbles4] = :PEBBLES ; Material[:FeaturePebbles4] = :FEATURE ; Variant[:FeaturePebbles4] = :VAR_4 - ENUM[417] = :MineralWallSmoothRD2 ; NUME[:MineralWallSmoothRD2] = 417 ; Caption[:MineralWallSmoothRD2] = 'smooth vein wall RD2' ; Shape[:MineralWallSmoothRD2] = :WALL ; Material[:MineralWallSmoothRD2] = :MINERAL ; Special[:MineralWallSmoothRD2] = :SMOOTH ; Direction[:MineralWallSmoothRD2] = '--SS--E-' - ENUM[418] = :MineralWallSmoothR2D ; NUME[:MineralWallSmoothR2D] = 418 ; Caption[:MineralWallSmoothR2D] = 'smooth vein wall R2D' ; Shape[:MineralWallSmoothR2D] = :WALL ; Material[:MineralWallSmoothR2D] = :MINERAL ; Special[:MineralWallSmoothR2D] = :SMOOTH ; Direction[:MineralWallSmoothR2D] = '--S---EE' - ENUM[419] = :MineralWallSmoothR2U ; NUME[:MineralWallSmoothR2U] = 419 ; Caption[:MineralWallSmoothR2U] = 'smooth vein wall R2U' ; Shape[:MineralWallSmoothR2U] = :WALL ; Material[:MineralWallSmoothR2U] = :MINERAL ; Special[:MineralWallSmoothR2U] = :SMOOTH ; Direction[:MineralWallSmoothR2U] = 'N-----EE' - ENUM[420] = :MineralWallSmoothRU2 ; NUME[:MineralWallSmoothRU2] = 420 ; Caption[:MineralWallSmoothRU2] = 'smooth vein wall RU2' ; Shape[:MineralWallSmoothRU2] = :WALL ; Material[:MineralWallSmoothRU2] = :MINERAL ; Special[:MineralWallSmoothRU2] = :SMOOTH ; Direction[:MineralWallSmoothRU2] = 'NN----E-' - ENUM[421] = :MineralWallSmoothL2U ; NUME[:MineralWallSmoothL2U] = 421 ; Caption[:MineralWallSmoothL2U] = 'smooth vein wall L2U' ; Shape[:MineralWallSmoothL2U] = :WALL ; Material[:MineralWallSmoothL2U] = :MINERAL ; Special[:MineralWallSmoothL2U] = :SMOOTH ; Direction[:MineralWallSmoothL2U] = 'N---WW--' - ENUM[422] = :MineralWallSmoothLU2 ; NUME[:MineralWallSmoothLU2] = 422 ; Caption[:MineralWallSmoothLU2] = 'smooth vein wall LU2' ; Shape[:MineralWallSmoothLU2] = :WALL ; Material[:MineralWallSmoothLU2] = :MINERAL ; Special[:MineralWallSmoothLU2] = :SMOOTH ; Direction[:MineralWallSmoothLU2] = 'NN--W---' - ENUM[423] = :MineralWallSmoothL2D ; NUME[:MineralWallSmoothL2D] = 423 ; Caption[:MineralWallSmoothL2D] = 'smooth vein wall L2D' ; Shape[:MineralWallSmoothL2D] = :WALL ; Material[:MineralWallSmoothL2D] = :MINERAL ; Special[:MineralWallSmoothL2D] = :SMOOTH ; Direction[:MineralWallSmoothL2D] = '--S-WW--' - ENUM[424] = :MineralWallSmoothLD2 ; NUME[:MineralWallSmoothLD2] = 424 ; Caption[:MineralWallSmoothLD2] = 'smooth vein wall LD2' ; Shape[:MineralWallSmoothLD2] = :WALL ; Material[:MineralWallSmoothLD2] = :MINERAL ; Special[:MineralWallSmoothLD2] = :SMOOTH ; Direction[:MineralWallSmoothLD2] = '--SSW---' - ENUM[425] = :MineralWallSmoothLRUD ; NUME[:MineralWallSmoothLRUD] = 425 ; Caption[:MineralWallSmoothLRUD] = 'smooth vein wall LRUD' ; Shape[:MineralWallSmoothLRUD] = :WALL ; Material[:MineralWallSmoothLRUD] = :MINERAL ; Special[:MineralWallSmoothLRUD] = :SMOOTH ; Direction[:MineralWallSmoothLRUD] = 'N-S-W-E-' - ENUM[426] = :MineralWallSmoothRUD ; NUME[:MineralWallSmoothRUD] = 426 ; Caption[:MineralWallSmoothRUD] = 'smooth vein wall RUD' ; Shape[:MineralWallSmoothRUD] = :WALL ; Material[:MineralWallSmoothRUD] = :MINERAL ; Special[:MineralWallSmoothRUD] = :SMOOTH ; Direction[:MineralWallSmoothRUD] = 'N-S---E-' - ENUM[427] = :MineralWallSmoothLRD ; NUME[:MineralWallSmoothLRD] = 427 ; Caption[:MineralWallSmoothLRD] = 'smooth vein wall LRD' ; Shape[:MineralWallSmoothLRD] = :WALL ; Material[:MineralWallSmoothLRD] = :MINERAL ; Special[:MineralWallSmoothLRD] = :SMOOTH ; Direction[:MineralWallSmoothLRD] = '--S-W-E-' - ENUM[428] = :MineralWallSmoothLRU ; NUME[:MineralWallSmoothLRU] = 428 ; Caption[:MineralWallSmoothLRU] = 'smooth vein wall LRU' ; Shape[:MineralWallSmoothLRU] = :WALL ; Material[:MineralWallSmoothLRU] = :MINERAL ; Special[:MineralWallSmoothLRU] = :SMOOTH ; Direction[:MineralWallSmoothLRU] = 'N---W-E-' - ENUM[429] = :MineralWallSmoothLUD ; NUME[:MineralWallSmoothLUD] = 429 ; Caption[:MineralWallSmoothLUD] = 'smooth vein wall LUD' ; Shape[:MineralWallSmoothLUD] = :WALL ; Material[:MineralWallSmoothLUD] = :MINERAL ; Special[:MineralWallSmoothLUD] = :SMOOTH ; Direction[:MineralWallSmoothLUD] = 'N-S-W---' - ENUM[430] = :MineralWallSmoothRD ; NUME[:MineralWallSmoothRD] = 430 ; Caption[:MineralWallSmoothRD] = 'smooth vein wall RD' ; Shape[:MineralWallSmoothRD] = :WALL ; Material[:MineralWallSmoothRD] = :MINERAL ; Special[:MineralWallSmoothRD] = :SMOOTH ; Direction[:MineralWallSmoothRD] = '--S---E-' - ENUM[431] = :MineralWallSmoothRU ; NUME[:MineralWallSmoothRU] = 431 ; Caption[:MineralWallSmoothRU] = 'smooth vein wall RU' ; Shape[:MineralWallSmoothRU] = :WALL ; Material[:MineralWallSmoothRU] = :MINERAL ; Special[:MineralWallSmoothRU] = :SMOOTH ; Direction[:MineralWallSmoothRU] = 'N-----E-' - ENUM[432] = :MineralWallSmoothLU ; NUME[:MineralWallSmoothLU] = 432 ; Caption[:MineralWallSmoothLU] = 'smooth vein wall LU' ; Shape[:MineralWallSmoothLU] = :WALL ; Material[:MineralWallSmoothLU] = :MINERAL ; Special[:MineralWallSmoothLU] = :SMOOTH ; Direction[:MineralWallSmoothLU] = 'N---W---' - ENUM[433] = :MineralWallSmoothLD ; NUME[:MineralWallSmoothLD] = 433 ; Caption[:MineralWallSmoothLD] = 'smooth vein wall LD' ; Shape[:MineralWallSmoothLD] = :WALL ; Material[:MineralWallSmoothLD] = :MINERAL ; Special[:MineralWallSmoothLD] = :SMOOTH ; Direction[:MineralWallSmoothLD] = '--S-W---' - ENUM[434] = :MineralWallSmoothUD ; NUME[:MineralWallSmoothUD] = 434 ; Caption[:MineralWallSmoothUD] = 'smooth vein wall UD' ; Shape[:MineralWallSmoothUD] = :WALL ; Material[:MineralWallSmoothUD] = :MINERAL ; Special[:MineralWallSmoothUD] = :SMOOTH ; Direction[:MineralWallSmoothUD] = 'N-S-----' - ENUM[435] = :MineralWallSmoothLR ; NUME[:MineralWallSmoothLR] = 435 ; Caption[:MineralWallSmoothLR] = 'smooth vein wall LR' ; Shape[:MineralWallSmoothLR] = :WALL ; Material[:MineralWallSmoothLR] = :MINERAL ; Special[:MineralWallSmoothLR] = :SMOOTH ; Direction[:MineralWallSmoothLR] = '----W-E-' - ENUM[436] = :MineralFortification ; NUME[:MineralFortification] = 436 ; Caption[:MineralFortification] = 'vein fortification' ; Shape[:MineralFortification] = :FORTIFICATION ; Material[:MineralFortification] = :MINERAL - ENUM[437] = :MineralWallWorn1 ; NUME[:MineralWallWorn1] = 437 ; Caption[:MineralWallWorn1] = 'worn 1 vein wall' ; Shape[:MineralWallWorn1] = :WALL ; Material[:MineralWallWorn1] = :MINERAL ; Special[:MineralWallWorn1] = :WORN_1 - ENUM[438] = :MineralWallWorn2 ; NUME[:MineralWallWorn2] = 438 ; Caption[:MineralWallWorn2] = 'worn 2 vein wall' ; Shape[:MineralWallWorn2] = :WALL ; Material[:MineralWallWorn2] = :MINERAL ; Special[:MineralWallWorn2] = :WORN_2 - ENUM[439] = :MineralWallWorn3 ; NUME[:MineralWallWorn3] = 439 ; Caption[:MineralWallWorn3] = 'worn 3 vein wall' ; Shape[:MineralWallWorn3] = :WALL ; Material[:MineralWallWorn3] = :MINERAL ; Special[:MineralWallWorn3] = :WORN_3 - ENUM[440] = :MineralWall ; NUME[:MineralWall] = 440 ; Caption[:MineralWall] = 'vein wall' ; Shape[:MineralWall] = :WALL ; Material[:MineralWall] = :MINERAL ; Special[:MineralWall] = :NORMAL - ENUM[441] = :MineralFloor1 ; NUME[:MineralFloor1] = 441 ; Caption[:MineralFloor1] = 'vein floor' ; Shape[:MineralFloor1] = :FLOOR ; Material[:MineralFloor1] = :MINERAL ; Variant[:MineralFloor1] = :VAR_1 ; Special[:MineralFloor1] = :NORMAL - ENUM[442] = :MineralFloor2 ; NUME[:MineralFloor2] = 442 ; Caption[:MineralFloor2] = 'vein floor' ; Shape[:MineralFloor2] = :FLOOR ; Material[:MineralFloor2] = :MINERAL ; Variant[:MineralFloor2] = :VAR_2 ; Special[:MineralFloor2] = :NORMAL - ENUM[443] = :MineralFloor3 ; NUME[:MineralFloor3] = 443 ; Caption[:MineralFloor3] = 'vein floor' ; Shape[:MineralFloor3] = :FLOOR ; Material[:MineralFloor3] = :MINERAL ; Variant[:MineralFloor3] = :VAR_3 ; Special[:MineralFloor3] = :NORMAL - ENUM[444] = :MineralFloor4 ; NUME[:MineralFloor4] = 444 ; Caption[:MineralFloor4] = 'vein floor' ; Shape[:MineralFloor4] = :FLOOR ; Material[:MineralFloor4] = :MINERAL ; Variant[:MineralFloor4] = :VAR_4 ; Special[:MineralFloor4] = :NORMAL - ENUM[445] = :MineralBoulder ; NUME[:MineralBoulder] = 445 ; Caption[:MineralBoulder] = 'vein boulder' ; Shape[:MineralBoulder] = :BOULDER ; Material[:MineralBoulder] = :MINERAL - ENUM[446] = :MineralPebbles1 ; NUME[:MineralPebbles1] = 446 ; Caption[:MineralPebbles1] = 'vein pebbles' ; Shape[:MineralPebbles1] = :PEBBLES ; Material[:MineralPebbles1] = :MINERAL ; Variant[:MineralPebbles1] = :VAR_1 - ENUM[447] = :MineralPebbles2 ; NUME[:MineralPebbles2] = 447 ; Caption[:MineralPebbles2] = 'vein pebbles' ; Shape[:MineralPebbles2] = :PEBBLES ; Material[:MineralPebbles2] = :MINERAL ; Variant[:MineralPebbles2] = :VAR_2 - ENUM[448] = :MineralPebbles3 ; NUME[:MineralPebbles3] = 448 ; Caption[:MineralPebbles3] = 'vein pebbles' ; Shape[:MineralPebbles3] = :PEBBLES ; Material[:MineralPebbles3] = :MINERAL ; Variant[:MineralPebbles3] = :VAR_3 - ENUM[449] = :MineralPebbles4 ; NUME[:MineralPebbles4] = 449 ; Caption[:MineralPebbles4] = 'vein pebbles' ; Shape[:MineralPebbles4] = :PEBBLES ; Material[:MineralPebbles4] = :MINERAL ; Variant[:MineralPebbles4] = :VAR_4 - ENUM[450] = :FrozenWallSmoothRD2 ; NUME[:FrozenWallSmoothRD2] = 450 ; Caption[:FrozenWallSmoothRD2] = 'smooth ice wall RD2' ; Shape[:FrozenWallSmoothRD2] = :WALL ; Material[:FrozenWallSmoothRD2] = :FROZEN_LIQUID ; Special[:FrozenWallSmoothRD2] = :SMOOTH ; Direction[:FrozenWallSmoothRD2] = '--SS--E-' - ENUM[451] = :FrozenWallSmoothR2D ; NUME[:FrozenWallSmoothR2D] = 451 ; Caption[:FrozenWallSmoothR2D] = 'smooth ice wall R2D' ; Shape[:FrozenWallSmoothR2D] = :WALL ; Material[:FrozenWallSmoothR2D] = :FROZEN_LIQUID ; Special[:FrozenWallSmoothR2D] = :SMOOTH ; Direction[:FrozenWallSmoothR2D] = '--S---EE' - ENUM[452] = :FrozenWallSmoothR2U ; NUME[:FrozenWallSmoothR2U] = 452 ; Caption[:FrozenWallSmoothR2U] = 'smooth ice wall R2U' ; Shape[:FrozenWallSmoothR2U] = :WALL ; Material[:FrozenWallSmoothR2U] = :FROZEN_LIQUID ; Special[:FrozenWallSmoothR2U] = :SMOOTH ; Direction[:FrozenWallSmoothR2U] = 'N-----EE' - ENUM[453] = :FrozenWallSmoothRU2 ; NUME[:FrozenWallSmoothRU2] = 453 ; Caption[:FrozenWallSmoothRU2] = 'smooth ice wall RU2' ; Shape[:FrozenWallSmoothRU2] = :WALL ; Material[:FrozenWallSmoothRU2] = :FROZEN_LIQUID ; Special[:FrozenWallSmoothRU2] = :SMOOTH ; Direction[:FrozenWallSmoothRU2] = 'NN----E-' - ENUM[454] = :FrozenWallSmoothL2U ; NUME[:FrozenWallSmoothL2U] = 454 ; Caption[:FrozenWallSmoothL2U] = 'smooth ice wall L2U' ; Shape[:FrozenWallSmoothL2U] = :WALL ; Material[:FrozenWallSmoothL2U] = :FROZEN_LIQUID ; Special[:FrozenWallSmoothL2U] = :SMOOTH ; Direction[:FrozenWallSmoothL2U] = 'N---WW--' - ENUM[455] = :FrozenWallSmoothLU2 ; NUME[:FrozenWallSmoothLU2] = 455 ; Caption[:FrozenWallSmoothLU2] = 'smooth ice wall LU2' ; Shape[:FrozenWallSmoothLU2] = :WALL ; Material[:FrozenWallSmoothLU2] = :FROZEN_LIQUID ; Special[:FrozenWallSmoothLU2] = :SMOOTH ; Direction[:FrozenWallSmoothLU2] = 'NN--W---' - ENUM[456] = :FrozenWallSmoothL2D ; NUME[:FrozenWallSmoothL2D] = 456 ; Caption[:FrozenWallSmoothL2D] = 'smooth ice wall L2D' ; Shape[:FrozenWallSmoothL2D] = :WALL ; Material[:FrozenWallSmoothL2D] = :FROZEN_LIQUID ; Special[:FrozenWallSmoothL2D] = :SMOOTH ; Direction[:FrozenWallSmoothL2D] = '--S-WW--' - ENUM[457] = :FrozenWallSmoothLD2 ; NUME[:FrozenWallSmoothLD2] = 457 ; Caption[:FrozenWallSmoothLD2] = 'smooth ice wall LD2' ; Shape[:FrozenWallSmoothLD2] = :WALL ; Material[:FrozenWallSmoothLD2] = :FROZEN_LIQUID ; Special[:FrozenWallSmoothLD2] = :SMOOTH ; Direction[:FrozenWallSmoothLD2] = '--SSW---' - ENUM[458] = :FrozenWallSmoothLRUD ; NUME[:FrozenWallSmoothLRUD] = 458 ; Caption[:FrozenWallSmoothLRUD] = 'smooth ice wall LRUD' ; Shape[:FrozenWallSmoothLRUD] = :WALL ; Material[:FrozenWallSmoothLRUD] = :FROZEN_LIQUID ; Special[:FrozenWallSmoothLRUD] = :SMOOTH ; Direction[:FrozenWallSmoothLRUD] = 'N-S-W-E-' - ENUM[459] = :FrozenWallSmoothRUD ; NUME[:FrozenWallSmoothRUD] = 459 ; Caption[:FrozenWallSmoothRUD] = 'smooth ice wall RUD' ; Shape[:FrozenWallSmoothRUD] = :WALL ; Material[:FrozenWallSmoothRUD] = :FROZEN_LIQUID ; Special[:FrozenWallSmoothRUD] = :SMOOTH ; Direction[:FrozenWallSmoothRUD] = 'N-S---E-' - ENUM[460] = :FrozenWallSmoothLRD ; NUME[:FrozenWallSmoothLRD] = 460 ; Caption[:FrozenWallSmoothLRD] = 'smooth ice wall LRD' ; Shape[:FrozenWallSmoothLRD] = :WALL ; Material[:FrozenWallSmoothLRD] = :FROZEN_LIQUID ; Special[:FrozenWallSmoothLRD] = :SMOOTH ; Direction[:FrozenWallSmoothLRD] = '--S-W-E-' - ENUM[461] = :FrozenWallSmoothLRU ; NUME[:FrozenWallSmoothLRU] = 461 ; Caption[:FrozenWallSmoothLRU] = 'smooth ice wall LRU' ; Shape[:FrozenWallSmoothLRU] = :WALL ; Material[:FrozenWallSmoothLRU] = :FROZEN_LIQUID ; Special[:FrozenWallSmoothLRU] = :SMOOTH ; Direction[:FrozenWallSmoothLRU] = 'N---W-E-' - ENUM[462] = :FrozenWallSmoothLUD ; NUME[:FrozenWallSmoothLUD] = 462 ; Caption[:FrozenWallSmoothLUD] = 'smooth ice wall LUD' ; Shape[:FrozenWallSmoothLUD] = :WALL ; Material[:FrozenWallSmoothLUD] = :FROZEN_LIQUID ; Special[:FrozenWallSmoothLUD] = :SMOOTH ; Direction[:FrozenWallSmoothLUD] = 'N-S-W---' - ENUM[463] = :FrozenWallSmoothRD ; NUME[:FrozenWallSmoothRD] = 463 ; Caption[:FrozenWallSmoothRD] = 'smooth ice wall RD' ; Shape[:FrozenWallSmoothRD] = :WALL ; Material[:FrozenWallSmoothRD] = :FROZEN_LIQUID ; Special[:FrozenWallSmoothRD] = :SMOOTH ; Direction[:FrozenWallSmoothRD] = '--S---E-' - ENUM[464] = :FrozenWallSmoothRU ; NUME[:FrozenWallSmoothRU] = 464 ; Caption[:FrozenWallSmoothRU] = 'smooth ice wall RU' ; Shape[:FrozenWallSmoothRU] = :WALL ; Material[:FrozenWallSmoothRU] = :FROZEN_LIQUID ; Special[:FrozenWallSmoothRU] = :SMOOTH ; Direction[:FrozenWallSmoothRU] = 'N-----E-' - ENUM[465] = :FrozenWallSmoothLU ; NUME[:FrozenWallSmoothLU] = 465 ; Caption[:FrozenWallSmoothLU] = 'smooth ice wall LU' ; Shape[:FrozenWallSmoothLU] = :WALL ; Material[:FrozenWallSmoothLU] = :FROZEN_LIQUID ; Special[:FrozenWallSmoothLU] = :SMOOTH ; Direction[:FrozenWallSmoothLU] = 'N---W---' - ENUM[466] = :FrozenWallSmoothLD ; NUME[:FrozenWallSmoothLD] = 466 ; Caption[:FrozenWallSmoothLD] = 'smooth ice wall LD' ; Shape[:FrozenWallSmoothLD] = :WALL ; Material[:FrozenWallSmoothLD] = :FROZEN_LIQUID ; Special[:FrozenWallSmoothLD] = :SMOOTH ; Direction[:FrozenWallSmoothLD] = '--S-W---' - ENUM[467] = :FrozenWallSmoothUD ; NUME[:FrozenWallSmoothUD] = 467 ; Caption[:FrozenWallSmoothUD] = 'smooth ice wall UD' ; Shape[:FrozenWallSmoothUD] = :WALL ; Material[:FrozenWallSmoothUD] = :FROZEN_LIQUID ; Special[:FrozenWallSmoothUD] = :SMOOTH ; Direction[:FrozenWallSmoothUD] = 'N-S-----' - ENUM[468] = :FrozenWallSmoothLR ; NUME[:FrozenWallSmoothLR] = 468 ; Caption[:FrozenWallSmoothLR] = 'smooth ice wall LR' ; Shape[:FrozenWallSmoothLR] = :WALL ; Material[:FrozenWallSmoothLR] = :FROZEN_LIQUID ; Special[:FrozenWallSmoothLR] = :SMOOTH ; Direction[:FrozenWallSmoothLR] = '----W-E-' - ENUM[469] = :RiverRampN ; NUME[:RiverRampN] = 469 ; Caption[:RiverRampN] = 'river ramp N' ; Shape[:RiverRampN] = :RAMP ; Material[:RiverRampN] = :RIVER ; Direction[:RiverRampN] = 'N' - ENUM[470] = :RiverRampS ; NUME[:RiverRampS] = 470 ; Caption[:RiverRampS] = 'river ramp S' ; Shape[:RiverRampS] = :RAMP ; Material[:RiverRampS] = :RIVER ; Direction[:RiverRampS] = 'S' - ENUM[471] = :RiverRampE ; NUME[:RiverRampE] = 471 ; Caption[:RiverRampE] = 'river ramp E' ; Shape[:RiverRampE] = :RAMP ; Material[:RiverRampE] = :RIVER ; Direction[:RiverRampE] = 'E' - ENUM[472] = :RiverRampW ; NUME[:RiverRampW] = 472 ; Caption[:RiverRampW] = 'river ramp W' ; Shape[:RiverRampW] = :RAMP ; Material[:RiverRampW] = :RIVER ; Direction[:RiverRampW] = 'W' - ENUM[473] = :RiverRampNW ; NUME[:RiverRampNW] = 473 ; Caption[:RiverRampNW] = 'river ramp NW' ; Shape[:RiverRampNW] = :RAMP ; Material[:RiverRampNW] = :RIVER ; Direction[:RiverRampNW] = 'NW' - ENUM[474] = :RiverRampNE ; NUME[:RiverRampNE] = 474 ; Caption[:RiverRampNE] = 'river ramp NE' ; Shape[:RiverRampNE] = :RAMP ; Material[:RiverRampNE] = :RIVER ; Direction[:RiverRampNE] = 'NE' - ENUM[475] = :RiverRampSW ; NUME[:RiverRampSW] = 475 ; Caption[:RiverRampSW] = 'river ramp SW' ; Shape[:RiverRampSW] = :RAMP ; Material[:RiverRampSW] = :RIVER ; Direction[:RiverRampSW] = 'SW' - ENUM[476] = :RiverRampSE ; NUME[:RiverRampSE] = 476 ; Caption[:RiverRampSE] = 'river ramp SE' ; Shape[:RiverRampSE] = :RAMP ; Material[:RiverRampSE] = :RIVER ; Direction[:RiverRampSE] = 'SE' - ENUM[493] = :ConstructedFloor ; NUME[:ConstructedFloor] = 493 ; Caption[:ConstructedFloor] = 'constructed floor' ; Shape[:ConstructedFloor] = :FLOOR ; Material[:ConstructedFloor] = :CONSTRUCTION ; Special[:ConstructedFloor] = :SMOOTH - ENUM[494] = :ConstructedFortification ; NUME[:ConstructedFortification] = 494 ; Caption[:ConstructedFortification] = 'constructed fortification' ; Shape[:ConstructedFortification] = :FORTIFICATION ; Material[:ConstructedFortification] = :CONSTRUCTION - ENUM[495] = :ConstructedPillar ; NUME[:ConstructedPillar] = 495 ; Caption[:ConstructedPillar] = 'constructed pillar' ; Shape[:ConstructedPillar] = :WALL ; Material[:ConstructedPillar] = :CONSTRUCTION ; Special[:ConstructedPillar] = :SMOOTH - ENUM[496] = :ConstructedWallRD2 ; NUME[:ConstructedWallRD2] = 496 ; Caption[:ConstructedWallRD2] = 'constructed wall RD2' ; Shape[:ConstructedWallRD2] = :WALL ; Material[:ConstructedWallRD2] = :CONSTRUCTION ; Special[:ConstructedWallRD2] = :SMOOTH ; Direction[:ConstructedWallRD2] = '--SS--E-' - ENUM[497] = :ConstructedWallR2D ; NUME[:ConstructedWallR2D] = 497 ; Caption[:ConstructedWallR2D] = 'constructed wall R2D' ; Shape[:ConstructedWallR2D] = :WALL ; Material[:ConstructedWallR2D] = :CONSTRUCTION ; Special[:ConstructedWallR2D] = :SMOOTH ; Direction[:ConstructedWallR2D] = '--S---EE' - ENUM[498] = :ConstructedWallR2U ; NUME[:ConstructedWallR2U] = 498 ; Caption[:ConstructedWallR2U] = 'constructed wall R2U' ; Shape[:ConstructedWallR2U] = :WALL ; Material[:ConstructedWallR2U] = :CONSTRUCTION ; Special[:ConstructedWallR2U] = :SMOOTH ; Direction[:ConstructedWallR2U] = 'N-----EE' - ENUM[499] = :ConstructedWallRU2 ; NUME[:ConstructedWallRU2] = 499 ; Caption[:ConstructedWallRU2] = 'constructed wall RU2' ; Shape[:ConstructedWallRU2] = :WALL ; Material[:ConstructedWallRU2] = :CONSTRUCTION ; Special[:ConstructedWallRU2] = :SMOOTH ; Direction[:ConstructedWallRU2] = 'NN----E-' - ENUM[500] = :ConstructedWallL2U ; NUME[:ConstructedWallL2U] = 500 ; Caption[:ConstructedWallL2U] = 'constructed wall L2U' ; Shape[:ConstructedWallL2U] = :WALL ; Material[:ConstructedWallL2U] = :CONSTRUCTION ; Special[:ConstructedWallL2U] = :SMOOTH ; Direction[:ConstructedWallL2U] = 'N---WW--' - ENUM[501] = :ConstructedWallLU2 ; NUME[:ConstructedWallLU2] = 501 ; Caption[:ConstructedWallLU2] = 'constructed wall LU2' ; Shape[:ConstructedWallLU2] = :WALL ; Material[:ConstructedWallLU2] = :CONSTRUCTION ; Special[:ConstructedWallLU2] = :SMOOTH ; Direction[:ConstructedWallLU2] = 'NN--W---' - ENUM[502] = :ConstructedWallL2D ; NUME[:ConstructedWallL2D] = 502 ; Caption[:ConstructedWallL2D] = 'constructed wall L2D' ; Shape[:ConstructedWallL2D] = :WALL ; Material[:ConstructedWallL2D] = :CONSTRUCTION ; Special[:ConstructedWallL2D] = :SMOOTH ; Direction[:ConstructedWallL2D] = '--S-WW--' - ENUM[503] = :ConstructedWallLD2 ; NUME[:ConstructedWallLD2] = 503 ; Caption[:ConstructedWallLD2] = 'constructed wall LD2' ; Shape[:ConstructedWallLD2] = :WALL ; Material[:ConstructedWallLD2] = :CONSTRUCTION ; Special[:ConstructedWallLD2] = :SMOOTH ; Direction[:ConstructedWallLD2] = '--SSW---' - ENUM[504] = :ConstructedWallLRUD ; NUME[:ConstructedWallLRUD] = 504 ; Caption[:ConstructedWallLRUD] = 'constructed wall LRUD' ; Shape[:ConstructedWallLRUD] = :WALL ; Material[:ConstructedWallLRUD] = :CONSTRUCTION ; Special[:ConstructedWallLRUD] = :SMOOTH ; Direction[:ConstructedWallLRUD] = 'N-S-W-E-' - ENUM[505] = :ConstructedWallRUD ; NUME[:ConstructedWallRUD] = 505 ; Caption[:ConstructedWallRUD] = 'constructed wall RUD' ; Shape[:ConstructedWallRUD] = :WALL ; Material[:ConstructedWallRUD] = :CONSTRUCTION ; Special[:ConstructedWallRUD] = :SMOOTH ; Direction[:ConstructedWallRUD] = 'N-S---E-' - ENUM[506] = :ConstructedWallLRD ; NUME[:ConstructedWallLRD] = 506 ; Caption[:ConstructedWallLRD] = 'constructed wall LRD' ; Shape[:ConstructedWallLRD] = :WALL ; Material[:ConstructedWallLRD] = :CONSTRUCTION ; Special[:ConstructedWallLRD] = :SMOOTH ; Direction[:ConstructedWallLRD] = '--S-W-E-' - ENUM[507] = :ConstructedWallLRU ; NUME[:ConstructedWallLRU] = 507 ; Caption[:ConstructedWallLRU] = 'constructed wall LRU' ; Shape[:ConstructedWallLRU] = :WALL ; Material[:ConstructedWallLRU] = :CONSTRUCTION ; Special[:ConstructedWallLRU] = :SMOOTH ; Direction[:ConstructedWallLRU] = 'N---W-E-' - ENUM[508] = :ConstructedWallLUD ; NUME[:ConstructedWallLUD] = 508 ; Caption[:ConstructedWallLUD] = 'constructed wall LUD' ; Shape[:ConstructedWallLUD] = :WALL ; Material[:ConstructedWallLUD] = :CONSTRUCTION ; Special[:ConstructedWallLUD] = :SMOOTH ; Direction[:ConstructedWallLUD] = 'N-S-W---' - ENUM[509] = :ConstructedWallRD ; NUME[:ConstructedWallRD] = 509 ; Caption[:ConstructedWallRD] = 'constructed wall RD' ; Shape[:ConstructedWallRD] = :WALL ; Material[:ConstructedWallRD] = :CONSTRUCTION ; Special[:ConstructedWallRD] = :SMOOTH ; Direction[:ConstructedWallRD] = '--S---E-' - ENUM[510] = :ConstructedWallRU ; NUME[:ConstructedWallRU] = 510 ; Caption[:ConstructedWallRU] = 'constructed wall RU' ; Shape[:ConstructedWallRU] = :WALL ; Material[:ConstructedWallRU] = :CONSTRUCTION ; Special[:ConstructedWallRU] = :SMOOTH ; Direction[:ConstructedWallRU] = 'N-----E-' - ENUM[511] = :ConstructedWallLU ; NUME[:ConstructedWallLU] = 511 ; Caption[:ConstructedWallLU] = 'constructed wall LU' ; Shape[:ConstructedWallLU] = :WALL ; Material[:ConstructedWallLU] = :CONSTRUCTION ; Special[:ConstructedWallLU] = :SMOOTH ; Direction[:ConstructedWallLU] = 'N---W---' - ENUM[512] = :ConstructedWallLD ; NUME[:ConstructedWallLD] = 512 ; Caption[:ConstructedWallLD] = 'constructed wall LD' ; Shape[:ConstructedWallLD] = :WALL ; Material[:ConstructedWallLD] = :CONSTRUCTION ; Special[:ConstructedWallLD] = :SMOOTH ; Direction[:ConstructedWallLD] = '--S-W---' - ENUM[513] = :ConstructedWallUD ; NUME[:ConstructedWallUD] = 513 ; Caption[:ConstructedWallUD] = 'constructed wall UD' ; Shape[:ConstructedWallUD] = :WALL ; Material[:ConstructedWallUD] = :CONSTRUCTION ; Special[:ConstructedWallUD] = :SMOOTH ; Direction[:ConstructedWallUD] = 'N-S-----' - ENUM[514] = :ConstructedWallLR ; NUME[:ConstructedWallLR] = 514 ; Caption[:ConstructedWallLR] = 'constructed wall LR' ; Shape[:ConstructedWallLR] = :WALL ; Material[:ConstructedWallLR] = :CONSTRUCTION ; Special[:ConstructedWallLR] = :SMOOTH ; Direction[:ConstructedWallLR] = '----W-E-' - ENUM[515] = :ConstructedStairUD ; NUME[:ConstructedStairUD] = 515 ; Caption[:ConstructedStairUD] = 'constructed stair up/down' ; Shape[:ConstructedStairUD] = :STAIR_UPDOWN ; Material[:ConstructedStairUD] = :CONSTRUCTION - ENUM[516] = :ConstructedStairD ; NUME[:ConstructedStairD] = 516 ; Caption[:ConstructedStairD] = 'constructed stair down' ; Shape[:ConstructedStairD] = :STAIR_DOWN ; Material[:ConstructedStairD] = :CONSTRUCTION - ENUM[517] = :ConstructedStairU ; NUME[:ConstructedStairU] = 517 ; Caption[:ConstructedStairU] = 'constructed stair up' ; Shape[:ConstructedStairU] = :STAIR_UP ; Material[:ConstructedStairU] = :CONSTRUCTION - ENUM[518] = :ConstructedRamp ; NUME[:ConstructedRamp] = 518 ; Caption[:ConstructedRamp] = 'constructed ramp' ; Shape[:ConstructedRamp] = :RAMP ; Material[:ConstructedRamp] = :CONSTRUCTION - ENUM[519] = :StoneFloorTrackN ; NUME[:StoneFloorTrackN] = 519 ; Caption[:StoneFloorTrackN] = 'stone floor track N' ; Shape[:StoneFloorTrackN] = :FLOOR ; Material[:StoneFloorTrackN] = :STONE ; Special[:StoneFloorTrackN] = :TRACK ; Direction[:StoneFloorTrackN] = 'N' - ENUM[520] = :StoneFloorTrackS ; NUME[:StoneFloorTrackS] = 520 ; Caption[:StoneFloorTrackS] = 'stone floor track S' ; Shape[:StoneFloorTrackS] = :FLOOR ; Material[:StoneFloorTrackS] = :STONE ; Special[:StoneFloorTrackS] = :TRACK ; Direction[:StoneFloorTrackS] = 'S' - ENUM[521] = :StoneFloorTrackE ; NUME[:StoneFloorTrackE] = 521 ; Caption[:StoneFloorTrackE] = 'stone floor track E' ; Shape[:StoneFloorTrackE] = :FLOOR ; Material[:StoneFloorTrackE] = :STONE ; Special[:StoneFloorTrackE] = :TRACK ; Direction[:StoneFloorTrackE] = 'E' - ENUM[522] = :StoneFloorTrackW ; NUME[:StoneFloorTrackW] = 522 ; Caption[:StoneFloorTrackW] = 'stone floor track W' ; Shape[:StoneFloorTrackW] = :FLOOR ; Material[:StoneFloorTrackW] = :STONE ; Special[:StoneFloorTrackW] = :TRACK ; Direction[:StoneFloorTrackW] = 'W' - ENUM[523] = :StoneFloorTrackNS ; NUME[:StoneFloorTrackNS] = 523 ; Caption[:StoneFloorTrackNS] = 'stone floor track NS' ; Shape[:StoneFloorTrackNS] = :FLOOR ; Material[:StoneFloorTrackNS] = :STONE ; Special[:StoneFloorTrackNS] = :TRACK ; Direction[:StoneFloorTrackNS] = 'NS' - ENUM[524] = :StoneFloorTrackNE ; NUME[:StoneFloorTrackNE] = 524 ; Caption[:StoneFloorTrackNE] = 'stone floor track NE' ; Shape[:StoneFloorTrackNE] = :FLOOR ; Material[:StoneFloorTrackNE] = :STONE ; Special[:StoneFloorTrackNE] = :TRACK ; Direction[:StoneFloorTrackNE] = 'NE' - ENUM[525] = :StoneFloorTrackNW ; NUME[:StoneFloorTrackNW] = 525 ; Caption[:StoneFloorTrackNW] = 'stone floor track NW' ; Shape[:StoneFloorTrackNW] = :FLOOR ; Material[:StoneFloorTrackNW] = :STONE ; Special[:StoneFloorTrackNW] = :TRACK ; Direction[:StoneFloorTrackNW] = 'NW' - ENUM[526] = :StoneFloorTrackSE ; NUME[:StoneFloorTrackSE] = 526 ; Caption[:StoneFloorTrackSE] = 'stone floor track SE' ; Shape[:StoneFloorTrackSE] = :FLOOR ; Material[:StoneFloorTrackSE] = :STONE ; Special[:StoneFloorTrackSE] = :TRACK ; Direction[:StoneFloorTrackSE] = 'SE' - ENUM[527] = :StoneFloorTrackSW ; NUME[:StoneFloorTrackSW] = 527 ; Caption[:StoneFloorTrackSW] = 'stone floor track SW' ; Shape[:StoneFloorTrackSW] = :FLOOR ; Material[:StoneFloorTrackSW] = :STONE ; Special[:StoneFloorTrackSW] = :TRACK ; Direction[:StoneFloorTrackSW] = 'SW' - ENUM[528] = :StoneFloorTrackEW ; NUME[:StoneFloorTrackEW] = 528 ; Caption[:StoneFloorTrackEW] = 'stone floor track EW' ; Shape[:StoneFloorTrackEW] = :FLOOR ; Material[:StoneFloorTrackEW] = :STONE ; Special[:StoneFloorTrackEW] = :TRACK ; Direction[:StoneFloorTrackEW] = 'EW' - ENUM[529] = :StoneFloorTrackNSE ; NUME[:StoneFloorTrackNSE] = 529 ; Caption[:StoneFloorTrackNSE] = 'stone floor track NSE' ; Shape[:StoneFloorTrackNSE] = :FLOOR ; Material[:StoneFloorTrackNSE] = :STONE ; Special[:StoneFloorTrackNSE] = :TRACK ; Direction[:StoneFloorTrackNSE] = 'NSE' - ENUM[530] = :StoneFloorTrackNSW ; NUME[:StoneFloorTrackNSW] = 530 ; Caption[:StoneFloorTrackNSW] = 'stone floor track NSW' ; Shape[:StoneFloorTrackNSW] = :FLOOR ; Material[:StoneFloorTrackNSW] = :STONE ; Special[:StoneFloorTrackNSW] = :TRACK ; Direction[:StoneFloorTrackNSW] = 'NSW' - ENUM[531] = :StoneFloorTrackNEW ; NUME[:StoneFloorTrackNEW] = 531 ; Caption[:StoneFloorTrackNEW] = 'stone floor track NEW' ; Shape[:StoneFloorTrackNEW] = :FLOOR ; Material[:StoneFloorTrackNEW] = :STONE ; Special[:StoneFloorTrackNEW] = :TRACK ; Direction[:StoneFloorTrackNEW] = 'NEW' - ENUM[532] = :StoneFloorTrackSEW ; NUME[:StoneFloorTrackSEW] = 532 ; Caption[:StoneFloorTrackSEW] = 'stone floor track SEW' ; Shape[:StoneFloorTrackSEW] = :FLOOR ; Material[:StoneFloorTrackSEW] = :STONE ; Special[:StoneFloorTrackSEW] = :TRACK ; Direction[:StoneFloorTrackSEW] = 'SEW' - ENUM[533] = :StoneFloorTrackNSEW ; NUME[:StoneFloorTrackNSEW] = 533 ; Caption[:StoneFloorTrackNSEW] = 'stone floor track NSEW' ; Shape[:StoneFloorTrackNSEW] = :FLOOR ; Material[:StoneFloorTrackNSEW] = :STONE ; Special[:StoneFloorTrackNSEW] = :TRACK ; Direction[:StoneFloorTrackNSEW] = 'NSEW' - ENUM[534] = :LavaFloorTrackN ; NUME[:LavaFloorTrackN] = 534 ; Caption[:LavaFloorTrackN] = 'obsidian floor track N' ; Shape[:LavaFloorTrackN] = :FLOOR ; Material[:LavaFloorTrackN] = :LAVA_STONE ; Special[:LavaFloorTrackN] = :TRACK ; Direction[:LavaFloorTrackN] = 'N' - ENUM[535] = :LavaFloorTrackS ; NUME[:LavaFloorTrackS] = 535 ; Caption[:LavaFloorTrackS] = 'obsidian floor track S' ; Shape[:LavaFloorTrackS] = :FLOOR ; Material[:LavaFloorTrackS] = :LAVA_STONE ; Special[:LavaFloorTrackS] = :TRACK ; Direction[:LavaFloorTrackS] = 'S' - ENUM[536] = :LavaFloorTrackE ; NUME[:LavaFloorTrackE] = 536 ; Caption[:LavaFloorTrackE] = 'obsidian floor track E' ; Shape[:LavaFloorTrackE] = :FLOOR ; Material[:LavaFloorTrackE] = :LAVA_STONE ; Special[:LavaFloorTrackE] = :TRACK ; Direction[:LavaFloorTrackE] = 'E' - ENUM[537] = :LavaFloorTrackW ; NUME[:LavaFloorTrackW] = 537 ; Caption[:LavaFloorTrackW] = 'obsidian floor track W' ; Shape[:LavaFloorTrackW] = :FLOOR ; Material[:LavaFloorTrackW] = :LAVA_STONE ; Special[:LavaFloorTrackW] = :TRACK ; Direction[:LavaFloorTrackW] = 'W' - ENUM[538] = :LavaFloorTrackNS ; NUME[:LavaFloorTrackNS] = 538 ; Caption[:LavaFloorTrackNS] = 'obsidian floor track NS' ; Shape[:LavaFloorTrackNS] = :FLOOR ; Material[:LavaFloorTrackNS] = :LAVA_STONE ; Special[:LavaFloorTrackNS] = :TRACK ; Direction[:LavaFloorTrackNS] = 'NS' - ENUM[539] = :LavaFloorTrackNE ; NUME[:LavaFloorTrackNE] = 539 ; Caption[:LavaFloorTrackNE] = 'obsidian floor track NE' ; Shape[:LavaFloorTrackNE] = :FLOOR ; Material[:LavaFloorTrackNE] = :LAVA_STONE ; Special[:LavaFloorTrackNE] = :TRACK ; Direction[:LavaFloorTrackNE] = 'NE' - ENUM[540] = :LavaFloorTrackNW ; NUME[:LavaFloorTrackNW] = 540 ; Caption[:LavaFloorTrackNW] = 'obsidian floor track NW' ; Shape[:LavaFloorTrackNW] = :FLOOR ; Material[:LavaFloorTrackNW] = :LAVA_STONE ; Special[:LavaFloorTrackNW] = :TRACK ; Direction[:LavaFloorTrackNW] = 'NW' - ENUM[541] = :LavaFloorTrackSE ; NUME[:LavaFloorTrackSE] = 541 ; Caption[:LavaFloorTrackSE] = 'obsidian floor track SE' ; Shape[:LavaFloorTrackSE] = :FLOOR ; Material[:LavaFloorTrackSE] = :LAVA_STONE ; Special[:LavaFloorTrackSE] = :TRACK ; Direction[:LavaFloorTrackSE] = 'SE' - ENUM[542] = :LavaFloorTrackSW ; NUME[:LavaFloorTrackSW] = 542 ; Caption[:LavaFloorTrackSW] = 'obsidian floor track SW' ; Shape[:LavaFloorTrackSW] = :FLOOR ; Material[:LavaFloorTrackSW] = :LAVA_STONE ; Special[:LavaFloorTrackSW] = :TRACK ; Direction[:LavaFloorTrackSW] = 'SW' - ENUM[543] = :LavaFloorTrackEW ; NUME[:LavaFloorTrackEW] = 543 ; Caption[:LavaFloorTrackEW] = 'obsidian floor track EW' ; Shape[:LavaFloorTrackEW] = :FLOOR ; Material[:LavaFloorTrackEW] = :LAVA_STONE ; Special[:LavaFloorTrackEW] = :TRACK ; Direction[:LavaFloorTrackEW] = 'EW' - ENUM[544] = :LavaFloorTrackNSE ; NUME[:LavaFloorTrackNSE] = 544 ; Caption[:LavaFloorTrackNSE] = 'obsidian floor track NSE' ; Shape[:LavaFloorTrackNSE] = :FLOOR ; Material[:LavaFloorTrackNSE] = :LAVA_STONE ; Special[:LavaFloorTrackNSE] = :TRACK ; Direction[:LavaFloorTrackNSE] = 'NSE' - ENUM[545] = :LavaFloorTrackNSW ; NUME[:LavaFloorTrackNSW] = 545 ; Caption[:LavaFloorTrackNSW] = 'obsidian floor track NSW' ; Shape[:LavaFloorTrackNSW] = :FLOOR ; Material[:LavaFloorTrackNSW] = :LAVA_STONE ; Special[:LavaFloorTrackNSW] = :TRACK ; Direction[:LavaFloorTrackNSW] = 'NSW' - ENUM[546] = :LavaFloorTrackNEW ; NUME[:LavaFloorTrackNEW] = 546 ; Caption[:LavaFloorTrackNEW] = 'obsidian floor track NEW' ; Shape[:LavaFloorTrackNEW] = :FLOOR ; Material[:LavaFloorTrackNEW] = :LAVA_STONE ; Special[:LavaFloorTrackNEW] = :TRACK ; Direction[:LavaFloorTrackNEW] = 'NEW' - ENUM[547] = :LavaFloorTrackSEW ; NUME[:LavaFloorTrackSEW] = 547 ; Caption[:LavaFloorTrackSEW] = 'obsidian floor track SEW' ; Shape[:LavaFloorTrackSEW] = :FLOOR ; Material[:LavaFloorTrackSEW] = :LAVA_STONE ; Special[:LavaFloorTrackSEW] = :TRACK ; Direction[:LavaFloorTrackSEW] = 'SEW' - ENUM[548] = :LavaFloorTrackNSEW ; NUME[:LavaFloorTrackNSEW] = 548 ; Caption[:LavaFloorTrackNSEW] = 'obsidian floor track NSEW' ; Shape[:LavaFloorTrackNSEW] = :FLOOR ; Material[:LavaFloorTrackNSEW] = :LAVA_STONE ; Special[:LavaFloorTrackNSEW] = :TRACK ; Direction[:LavaFloorTrackNSEW] = 'NSEW' - ENUM[549] = :FeatureFloorTrackN ; NUME[:FeatureFloorTrackN] = 549 ; Caption[:FeatureFloorTrackN] = 'featstone floor track N' ; Shape[:FeatureFloorTrackN] = :FLOOR ; Material[:FeatureFloorTrackN] = :FEATURE ; Special[:FeatureFloorTrackN] = :TRACK ; Direction[:FeatureFloorTrackN] = 'N' - ENUM[550] = :FeatureFloorTrackS ; NUME[:FeatureFloorTrackS] = 550 ; Caption[:FeatureFloorTrackS] = 'featstone floor track S' ; Shape[:FeatureFloorTrackS] = :FLOOR ; Material[:FeatureFloorTrackS] = :FEATURE ; Special[:FeatureFloorTrackS] = :TRACK ; Direction[:FeatureFloorTrackS] = 'S' - ENUM[551] = :FeatureFloorTrackE ; NUME[:FeatureFloorTrackE] = 551 ; Caption[:FeatureFloorTrackE] = 'featstone floor track E' ; Shape[:FeatureFloorTrackE] = :FLOOR ; Material[:FeatureFloorTrackE] = :FEATURE ; Special[:FeatureFloorTrackE] = :TRACK ; Direction[:FeatureFloorTrackE] = 'E' - ENUM[552] = :FeatureFloorTrackW ; NUME[:FeatureFloorTrackW] = 552 ; Caption[:FeatureFloorTrackW] = 'featstone floor track W' ; Shape[:FeatureFloorTrackW] = :FLOOR ; Material[:FeatureFloorTrackW] = :FEATURE ; Special[:FeatureFloorTrackW] = :TRACK ; Direction[:FeatureFloorTrackW] = 'W' - ENUM[553] = :FeatureFloorTrackNS ; NUME[:FeatureFloorTrackNS] = 553 ; Caption[:FeatureFloorTrackNS] = 'featstone floor track NS' ; Shape[:FeatureFloorTrackNS] = :FLOOR ; Material[:FeatureFloorTrackNS] = :FEATURE ; Special[:FeatureFloorTrackNS] = :TRACK ; Direction[:FeatureFloorTrackNS] = 'NS' - ENUM[554] = :FeatureFloorTrackNE ; NUME[:FeatureFloorTrackNE] = 554 ; Caption[:FeatureFloorTrackNE] = 'featstone floor track NE' ; Shape[:FeatureFloorTrackNE] = :FLOOR ; Material[:FeatureFloorTrackNE] = :FEATURE ; Special[:FeatureFloorTrackNE] = :TRACK ; Direction[:FeatureFloorTrackNE] = 'NE' - ENUM[555] = :FeatureFloorTrackNW ; NUME[:FeatureFloorTrackNW] = 555 ; Caption[:FeatureFloorTrackNW] = 'featstone floor track NW' ; Shape[:FeatureFloorTrackNW] = :FLOOR ; Material[:FeatureFloorTrackNW] = :FEATURE ; Special[:FeatureFloorTrackNW] = :TRACK ; Direction[:FeatureFloorTrackNW] = 'NW' - ENUM[556] = :FeatureFloorTrackSE ; NUME[:FeatureFloorTrackSE] = 556 ; Caption[:FeatureFloorTrackSE] = 'featstone floor track SE' ; Shape[:FeatureFloorTrackSE] = :FLOOR ; Material[:FeatureFloorTrackSE] = :FEATURE ; Special[:FeatureFloorTrackSE] = :TRACK ; Direction[:FeatureFloorTrackSE] = 'SE' - ENUM[557] = :FeatureFloorTrackSW ; NUME[:FeatureFloorTrackSW] = 557 ; Caption[:FeatureFloorTrackSW] = 'featstone floor track SW' ; Shape[:FeatureFloorTrackSW] = :FLOOR ; Material[:FeatureFloorTrackSW] = :FEATURE ; Special[:FeatureFloorTrackSW] = :TRACK ; Direction[:FeatureFloorTrackSW] = 'SW' - ENUM[558] = :FeatureFloorTrackEW ; NUME[:FeatureFloorTrackEW] = 558 ; Caption[:FeatureFloorTrackEW] = 'featstone floor track EW' ; Shape[:FeatureFloorTrackEW] = :FLOOR ; Material[:FeatureFloorTrackEW] = :FEATURE ; Special[:FeatureFloorTrackEW] = :TRACK ; Direction[:FeatureFloorTrackEW] = 'EW' - ENUM[559] = :FeatureFloorTrackNSE ; NUME[:FeatureFloorTrackNSE] = 559 ; Caption[:FeatureFloorTrackNSE] = 'featstone floor track NSE' ; Shape[:FeatureFloorTrackNSE] = :FLOOR ; Material[:FeatureFloorTrackNSE] = :FEATURE ; Special[:FeatureFloorTrackNSE] = :TRACK ; Direction[:FeatureFloorTrackNSE] = 'NSE' - ENUM[560] = :FeatureFloorTrackNSW ; NUME[:FeatureFloorTrackNSW] = 560 ; Caption[:FeatureFloorTrackNSW] = 'featstone floor track NSW' ; Shape[:FeatureFloorTrackNSW] = :FLOOR ; Material[:FeatureFloorTrackNSW] = :FEATURE ; Special[:FeatureFloorTrackNSW] = :TRACK ; Direction[:FeatureFloorTrackNSW] = 'NSW' - ENUM[561] = :FeatureFloorTrackNEW ; NUME[:FeatureFloorTrackNEW] = 561 ; Caption[:FeatureFloorTrackNEW] = 'featstone floor track NEW' ; Shape[:FeatureFloorTrackNEW] = :FLOOR ; Material[:FeatureFloorTrackNEW] = :FEATURE ; Special[:FeatureFloorTrackNEW] = :TRACK ; Direction[:FeatureFloorTrackNEW] = 'NEW' - ENUM[562] = :FeatureFloorTrackSEW ; NUME[:FeatureFloorTrackSEW] = 562 ; Caption[:FeatureFloorTrackSEW] = 'featstone floor track SEW' ; Shape[:FeatureFloorTrackSEW] = :FLOOR ; Material[:FeatureFloorTrackSEW] = :FEATURE ; Special[:FeatureFloorTrackSEW] = :TRACK ; Direction[:FeatureFloorTrackSEW] = 'SEW' - ENUM[563] = :FeatureFloorTrackNSEW ; NUME[:FeatureFloorTrackNSEW] = 563 ; Caption[:FeatureFloorTrackNSEW] = 'featstone floor track NSEW' ; Shape[:FeatureFloorTrackNSEW] = :FLOOR ; Material[:FeatureFloorTrackNSEW] = :FEATURE ; Special[:FeatureFloorTrackNSEW] = :TRACK ; Direction[:FeatureFloorTrackNSEW] = 'NSEW' - ENUM[564] = :MineralFloorTrackN ; NUME[:MineralFloorTrackN] = 564 ; Caption[:MineralFloorTrackN] = 'vein floor track N' ; Shape[:MineralFloorTrackN] = :FLOOR ; Material[:MineralFloorTrackN] = :MINERAL ; Special[:MineralFloorTrackN] = :TRACK ; Direction[:MineralFloorTrackN] = 'N' - ENUM[565] = :MineralFloorTrackS ; NUME[:MineralFloorTrackS] = 565 ; Caption[:MineralFloorTrackS] = 'vein floor track S' ; Shape[:MineralFloorTrackS] = :FLOOR ; Material[:MineralFloorTrackS] = :MINERAL ; Special[:MineralFloorTrackS] = :TRACK ; Direction[:MineralFloorTrackS] = 'S' - ENUM[566] = :MineralFloorTrackE ; NUME[:MineralFloorTrackE] = 566 ; Caption[:MineralFloorTrackE] = 'vein floor track E' ; Shape[:MineralFloorTrackE] = :FLOOR ; Material[:MineralFloorTrackE] = :MINERAL ; Special[:MineralFloorTrackE] = :TRACK ; Direction[:MineralFloorTrackE] = 'E' - ENUM[567] = :MineralFloorTrackW ; NUME[:MineralFloorTrackW] = 567 ; Caption[:MineralFloorTrackW] = 'vein floor track W' ; Shape[:MineralFloorTrackW] = :FLOOR ; Material[:MineralFloorTrackW] = :MINERAL ; Special[:MineralFloorTrackW] = :TRACK ; Direction[:MineralFloorTrackW] = 'W' - ENUM[568] = :MineralFloorTrackNS ; NUME[:MineralFloorTrackNS] = 568 ; Caption[:MineralFloorTrackNS] = 'vein floor track NS' ; Shape[:MineralFloorTrackNS] = :FLOOR ; Material[:MineralFloorTrackNS] = :MINERAL ; Special[:MineralFloorTrackNS] = :TRACK ; Direction[:MineralFloorTrackNS] = 'NS' - ENUM[569] = :MineralFloorTrackNE ; NUME[:MineralFloorTrackNE] = 569 ; Caption[:MineralFloorTrackNE] = 'vein floor track NE' ; Shape[:MineralFloorTrackNE] = :FLOOR ; Material[:MineralFloorTrackNE] = :MINERAL ; Special[:MineralFloorTrackNE] = :TRACK ; Direction[:MineralFloorTrackNE] = 'NE' - ENUM[570] = :MineralFloorTrackNW ; NUME[:MineralFloorTrackNW] = 570 ; Caption[:MineralFloorTrackNW] = 'vein floor track NW' ; Shape[:MineralFloorTrackNW] = :FLOOR ; Material[:MineralFloorTrackNW] = :MINERAL ; Special[:MineralFloorTrackNW] = :TRACK ; Direction[:MineralFloorTrackNW] = 'NW' - ENUM[571] = :MineralFloorTrackSE ; NUME[:MineralFloorTrackSE] = 571 ; Caption[:MineralFloorTrackSE] = 'vein floor track SE' ; Shape[:MineralFloorTrackSE] = :FLOOR ; Material[:MineralFloorTrackSE] = :MINERAL ; Special[:MineralFloorTrackSE] = :TRACK ; Direction[:MineralFloorTrackSE] = 'SE' - ENUM[572] = :MineralFloorTrackSW ; NUME[:MineralFloorTrackSW] = 572 ; Caption[:MineralFloorTrackSW] = 'vein floor track SW' ; Shape[:MineralFloorTrackSW] = :FLOOR ; Material[:MineralFloorTrackSW] = :MINERAL ; Special[:MineralFloorTrackSW] = :TRACK ; Direction[:MineralFloorTrackSW] = 'SW' - ENUM[573] = :MineralFloorTrackEW ; NUME[:MineralFloorTrackEW] = 573 ; Caption[:MineralFloorTrackEW] = 'vein floor track EW' ; Shape[:MineralFloorTrackEW] = :FLOOR ; Material[:MineralFloorTrackEW] = :MINERAL ; Special[:MineralFloorTrackEW] = :TRACK ; Direction[:MineralFloorTrackEW] = 'EW' - ENUM[574] = :MineralFloorTrackNSE ; NUME[:MineralFloorTrackNSE] = 574 ; Caption[:MineralFloorTrackNSE] = 'vein floor track NSE' ; Shape[:MineralFloorTrackNSE] = :FLOOR ; Material[:MineralFloorTrackNSE] = :MINERAL ; Special[:MineralFloorTrackNSE] = :TRACK ; Direction[:MineralFloorTrackNSE] = 'NSE' - ENUM[575] = :MineralFloorTrackNSW ; NUME[:MineralFloorTrackNSW] = 575 ; Caption[:MineralFloorTrackNSW] = 'vein floor track NSW' ; Shape[:MineralFloorTrackNSW] = :FLOOR ; Material[:MineralFloorTrackNSW] = :MINERAL ; Special[:MineralFloorTrackNSW] = :TRACK ; Direction[:MineralFloorTrackNSW] = 'NSW' - ENUM[576] = :MineralFloorTrackNEW ; NUME[:MineralFloorTrackNEW] = 576 ; Caption[:MineralFloorTrackNEW] = 'vein floor track NEW' ; Shape[:MineralFloorTrackNEW] = :FLOOR ; Material[:MineralFloorTrackNEW] = :MINERAL ; Special[:MineralFloorTrackNEW] = :TRACK ; Direction[:MineralFloorTrackNEW] = 'NEW' - ENUM[577] = :MineralFloorTrackSEW ; NUME[:MineralFloorTrackSEW] = 577 ; Caption[:MineralFloorTrackSEW] = 'vein floor track SEW' ; Shape[:MineralFloorTrackSEW] = :FLOOR ; Material[:MineralFloorTrackSEW] = :MINERAL ; Special[:MineralFloorTrackSEW] = :TRACK ; Direction[:MineralFloorTrackSEW] = 'SEW' - ENUM[578] = :MineralFloorTrackNSEW ; NUME[:MineralFloorTrackNSEW] = 578 ; Caption[:MineralFloorTrackNSEW] = 'vein floor track NSEW' ; Shape[:MineralFloorTrackNSEW] = :FLOOR ; Material[:MineralFloorTrackNSEW] = :MINERAL ; Special[:MineralFloorTrackNSEW] = :TRACK ; Direction[:MineralFloorTrackNSEW] = 'NSEW' - ENUM[579] = :FrozenFloorTrackN ; NUME[:FrozenFloorTrackN] = 579 ; Caption[:FrozenFloorTrackN] = 'ice floor track N' ; Shape[:FrozenFloorTrackN] = :FLOOR ; Material[:FrozenFloorTrackN] = :FROZEN_LIQUID ; Special[:FrozenFloorTrackN] = :TRACK ; Direction[:FrozenFloorTrackN] = 'N' - ENUM[580] = :FrozenFloorTrackS ; NUME[:FrozenFloorTrackS] = 580 ; Caption[:FrozenFloorTrackS] = 'ice floor track S' ; Shape[:FrozenFloorTrackS] = :FLOOR ; Material[:FrozenFloorTrackS] = :FROZEN_LIQUID ; Special[:FrozenFloorTrackS] = :TRACK ; Direction[:FrozenFloorTrackS] = 'S' - ENUM[581] = :FrozenFloorTrackE ; NUME[:FrozenFloorTrackE] = 581 ; Caption[:FrozenFloorTrackE] = 'ice floor track E' ; Shape[:FrozenFloorTrackE] = :FLOOR ; Material[:FrozenFloorTrackE] = :FROZEN_LIQUID ; Special[:FrozenFloorTrackE] = :TRACK ; Direction[:FrozenFloorTrackE] = 'E' - ENUM[582] = :FrozenFloorTrackW ; NUME[:FrozenFloorTrackW] = 582 ; Caption[:FrozenFloorTrackW] = 'ice floor track W' ; Shape[:FrozenFloorTrackW] = :FLOOR ; Material[:FrozenFloorTrackW] = :FROZEN_LIQUID ; Special[:FrozenFloorTrackW] = :TRACK ; Direction[:FrozenFloorTrackW] = 'W' - ENUM[583] = :FrozenFloorTrackNS ; NUME[:FrozenFloorTrackNS] = 583 ; Caption[:FrozenFloorTrackNS] = 'ice floor track NS' ; Shape[:FrozenFloorTrackNS] = :FLOOR ; Material[:FrozenFloorTrackNS] = :FROZEN_LIQUID ; Special[:FrozenFloorTrackNS] = :TRACK ; Direction[:FrozenFloorTrackNS] = 'NS' - ENUM[584] = :FrozenFloorTrackNE ; NUME[:FrozenFloorTrackNE] = 584 ; Caption[:FrozenFloorTrackNE] = 'ice floor track NE' ; Shape[:FrozenFloorTrackNE] = :FLOOR ; Material[:FrozenFloorTrackNE] = :FROZEN_LIQUID ; Special[:FrozenFloorTrackNE] = :TRACK ; Direction[:FrozenFloorTrackNE] = 'NE' - ENUM[585] = :FrozenFloorTrackNW ; NUME[:FrozenFloorTrackNW] = 585 ; Caption[:FrozenFloorTrackNW] = 'ice floor track NW' ; Shape[:FrozenFloorTrackNW] = :FLOOR ; Material[:FrozenFloorTrackNW] = :FROZEN_LIQUID ; Special[:FrozenFloorTrackNW] = :TRACK ; Direction[:FrozenFloorTrackNW] = 'NW' - ENUM[586] = :FrozenFloorTrackSE ; NUME[:FrozenFloorTrackSE] = 586 ; Caption[:FrozenFloorTrackSE] = 'ice floor track SE' ; Shape[:FrozenFloorTrackSE] = :FLOOR ; Material[:FrozenFloorTrackSE] = :FROZEN_LIQUID ; Special[:FrozenFloorTrackSE] = :TRACK ; Direction[:FrozenFloorTrackSE] = 'SE' - ENUM[587] = :FrozenFloorTrackSW ; NUME[:FrozenFloorTrackSW] = 587 ; Caption[:FrozenFloorTrackSW] = 'ice floor track SW' ; Shape[:FrozenFloorTrackSW] = :FLOOR ; Material[:FrozenFloorTrackSW] = :FROZEN_LIQUID ; Special[:FrozenFloorTrackSW] = :TRACK ; Direction[:FrozenFloorTrackSW] = 'SW' - ENUM[588] = :FrozenFloorTrackEW ; NUME[:FrozenFloorTrackEW] = 588 ; Caption[:FrozenFloorTrackEW] = 'ice floor track EW' ; Shape[:FrozenFloorTrackEW] = :FLOOR ; Material[:FrozenFloorTrackEW] = :FROZEN_LIQUID ; Special[:FrozenFloorTrackEW] = :TRACK ; Direction[:FrozenFloorTrackEW] = 'EW' - ENUM[589] = :FrozenFloorTrackNSE ; NUME[:FrozenFloorTrackNSE] = 589 ; Caption[:FrozenFloorTrackNSE] = 'ice floor track NSE' ; Shape[:FrozenFloorTrackNSE] = :FLOOR ; Material[:FrozenFloorTrackNSE] = :FROZEN_LIQUID ; Special[:FrozenFloorTrackNSE] = :TRACK ; Direction[:FrozenFloorTrackNSE] = 'NSE' - ENUM[590] = :FrozenFloorTrackNSW ; NUME[:FrozenFloorTrackNSW] = 590 ; Caption[:FrozenFloorTrackNSW] = 'ice floor track NSW' ; Shape[:FrozenFloorTrackNSW] = :FLOOR ; Material[:FrozenFloorTrackNSW] = :FROZEN_LIQUID ; Special[:FrozenFloorTrackNSW] = :TRACK ; Direction[:FrozenFloorTrackNSW] = 'NSW' - ENUM[591] = :FrozenFloorTrackNEW ; NUME[:FrozenFloorTrackNEW] = 591 ; Caption[:FrozenFloorTrackNEW] = 'ice floor track NEW' ; Shape[:FrozenFloorTrackNEW] = :FLOOR ; Material[:FrozenFloorTrackNEW] = :FROZEN_LIQUID ; Special[:FrozenFloorTrackNEW] = :TRACK ; Direction[:FrozenFloorTrackNEW] = 'NEW' - ENUM[592] = :FrozenFloorTrackSEW ; NUME[:FrozenFloorTrackSEW] = 592 ; Caption[:FrozenFloorTrackSEW] = 'ice floor track SEW' ; Shape[:FrozenFloorTrackSEW] = :FLOOR ; Material[:FrozenFloorTrackSEW] = :FROZEN_LIQUID ; Special[:FrozenFloorTrackSEW] = :TRACK ; Direction[:FrozenFloorTrackSEW] = 'SEW' - ENUM[593] = :FrozenFloorTrackNSEW ; NUME[:FrozenFloorTrackNSEW] = 593 ; Caption[:FrozenFloorTrackNSEW] = 'ice floor track NSEW' ; Shape[:FrozenFloorTrackNSEW] = :FLOOR ; Material[:FrozenFloorTrackNSEW] = :FROZEN_LIQUID ; Special[:FrozenFloorTrackNSEW] = :TRACK ; Direction[:FrozenFloorTrackNSEW] = 'NSEW' - ENUM[594] = :ConstructedFloorTrackN ; NUME[:ConstructedFloorTrackN] = 594 ; Caption[:ConstructedFloorTrackN] = 'constructed floor track N' ; Shape[:ConstructedFloorTrackN] = :FLOOR ; Material[:ConstructedFloorTrackN] = :CONSTRUCTION ; Special[:ConstructedFloorTrackN] = :TRACK ; Direction[:ConstructedFloorTrackN] = 'N' - ENUM[595] = :ConstructedFloorTrackS ; NUME[:ConstructedFloorTrackS] = 595 ; Caption[:ConstructedFloorTrackS] = 'constructed floor track S' ; Shape[:ConstructedFloorTrackS] = :FLOOR ; Material[:ConstructedFloorTrackS] = :CONSTRUCTION ; Special[:ConstructedFloorTrackS] = :TRACK ; Direction[:ConstructedFloorTrackS] = 'S' - ENUM[596] = :ConstructedFloorTrackE ; NUME[:ConstructedFloorTrackE] = 596 ; Caption[:ConstructedFloorTrackE] = 'constructed floor track E' ; Shape[:ConstructedFloorTrackE] = :FLOOR ; Material[:ConstructedFloorTrackE] = :CONSTRUCTION ; Special[:ConstructedFloorTrackE] = :TRACK ; Direction[:ConstructedFloorTrackE] = 'E' - ENUM[597] = :ConstructedFloorTrackW ; NUME[:ConstructedFloorTrackW] = 597 ; Caption[:ConstructedFloorTrackW] = 'constructed floor track W' ; Shape[:ConstructedFloorTrackW] = :FLOOR ; Material[:ConstructedFloorTrackW] = :CONSTRUCTION ; Special[:ConstructedFloorTrackW] = :TRACK ; Direction[:ConstructedFloorTrackW] = 'W' - ENUM[598] = :ConstructedFloorTrackNS ; NUME[:ConstructedFloorTrackNS] = 598 ; Caption[:ConstructedFloorTrackNS] = 'constructed floor track NS' ; Shape[:ConstructedFloorTrackNS] = :FLOOR ; Material[:ConstructedFloorTrackNS] = :CONSTRUCTION ; Special[:ConstructedFloorTrackNS] = :TRACK ; Direction[:ConstructedFloorTrackNS] = 'NS' - ENUM[599] = :ConstructedFloorTrackNE ; NUME[:ConstructedFloorTrackNE] = 599 ; Caption[:ConstructedFloorTrackNE] = 'constructed floor track NE' ; Shape[:ConstructedFloorTrackNE] = :FLOOR ; Material[:ConstructedFloorTrackNE] = :CONSTRUCTION ; Special[:ConstructedFloorTrackNE] = :TRACK ; Direction[:ConstructedFloorTrackNE] = 'NE' - ENUM[600] = :ConstructedFloorTrackNW ; NUME[:ConstructedFloorTrackNW] = 600 ; Caption[:ConstructedFloorTrackNW] = 'constructed floor track NW' ; Shape[:ConstructedFloorTrackNW] = :FLOOR ; Material[:ConstructedFloorTrackNW] = :CONSTRUCTION ; Special[:ConstructedFloorTrackNW] = :TRACK ; Direction[:ConstructedFloorTrackNW] = 'NW' - ENUM[601] = :ConstructedFloorTrackSE ; NUME[:ConstructedFloorTrackSE] = 601 ; Caption[:ConstructedFloorTrackSE] = 'constructed floor track SE' ; Shape[:ConstructedFloorTrackSE] = :FLOOR ; Material[:ConstructedFloorTrackSE] = :CONSTRUCTION ; Special[:ConstructedFloorTrackSE] = :TRACK ; Direction[:ConstructedFloorTrackSE] = 'SE' - ENUM[602] = :ConstructedFloorTrackSW ; NUME[:ConstructedFloorTrackSW] = 602 ; Caption[:ConstructedFloorTrackSW] = 'constructed floor track SW' ; Shape[:ConstructedFloorTrackSW] = :FLOOR ; Material[:ConstructedFloorTrackSW] = :CONSTRUCTION ; Special[:ConstructedFloorTrackSW] = :TRACK ; Direction[:ConstructedFloorTrackSW] = 'SW' - ENUM[603] = :ConstructedFloorTrackEW ; NUME[:ConstructedFloorTrackEW] = 603 ; Caption[:ConstructedFloorTrackEW] = 'constructed floor track EW' ; Shape[:ConstructedFloorTrackEW] = :FLOOR ; Material[:ConstructedFloorTrackEW] = :CONSTRUCTION ; Special[:ConstructedFloorTrackEW] = :TRACK ; Direction[:ConstructedFloorTrackEW] = 'EW' - ENUM[604] = :ConstructedFloorTrackNSE ; NUME[:ConstructedFloorTrackNSE] = 604 ; Caption[:ConstructedFloorTrackNSE] = 'constructed floor track NSE' ; Shape[:ConstructedFloorTrackNSE] = :FLOOR ; Material[:ConstructedFloorTrackNSE] = :CONSTRUCTION ; Special[:ConstructedFloorTrackNSE] = :TRACK ; Direction[:ConstructedFloorTrackNSE] = 'NSE' - ENUM[605] = :ConstructedFloorTrackNSW ; NUME[:ConstructedFloorTrackNSW] = 605 ; Caption[:ConstructedFloorTrackNSW] = 'constructed floor track NSW' ; Shape[:ConstructedFloorTrackNSW] = :FLOOR ; Material[:ConstructedFloorTrackNSW] = :CONSTRUCTION ; Special[:ConstructedFloorTrackNSW] = :TRACK ; Direction[:ConstructedFloorTrackNSW] = 'NSW' - ENUM[606] = :ConstructedFloorTrackNEW ; NUME[:ConstructedFloorTrackNEW] = 606 ; Caption[:ConstructedFloorTrackNEW] = 'constructed floor track NEW' ; Shape[:ConstructedFloorTrackNEW] = :FLOOR ; Material[:ConstructedFloorTrackNEW] = :CONSTRUCTION ; Special[:ConstructedFloorTrackNEW] = :TRACK ; Direction[:ConstructedFloorTrackNEW] = 'NEW' - ENUM[607] = :ConstructedFloorTrackSEW ; NUME[:ConstructedFloorTrackSEW] = 607 ; Caption[:ConstructedFloorTrackSEW] = 'constructed floor track SEW' ; Shape[:ConstructedFloorTrackSEW] = :FLOOR ; Material[:ConstructedFloorTrackSEW] = :CONSTRUCTION ; Special[:ConstructedFloorTrackSEW] = :TRACK ; Direction[:ConstructedFloorTrackSEW] = 'SEW' - ENUM[608] = :ConstructedFloorTrackNSEW ; NUME[:ConstructedFloorTrackNSEW] = 608 ; Caption[:ConstructedFloorTrackNSEW] = 'constructed floor track NSEW' ; Shape[:ConstructedFloorTrackNSEW] = :FLOOR ; Material[:ConstructedFloorTrackNSEW] = :CONSTRUCTION ; Special[:ConstructedFloorTrackNSEW] = :TRACK ; Direction[:ConstructedFloorTrackNSEW] = 'NSEW' - ENUM[609] = :StoneRampTrackN ; NUME[:StoneRampTrackN] = 609 ; Caption[:StoneRampTrackN] = 'stone ramp track N' ; Shape[:StoneRampTrackN] = :RAMP ; Material[:StoneRampTrackN] = :STONE ; Special[:StoneRampTrackN] = :TRACK ; Direction[:StoneRampTrackN] = 'N' - ENUM[610] = :StoneRampTrackS ; NUME[:StoneRampTrackS] = 610 ; Caption[:StoneRampTrackS] = 'stone ramp track S' ; Shape[:StoneRampTrackS] = :RAMP ; Material[:StoneRampTrackS] = :STONE ; Special[:StoneRampTrackS] = :TRACK ; Direction[:StoneRampTrackS] = 'S' - ENUM[611] = :StoneRampTrackE ; NUME[:StoneRampTrackE] = 611 ; Caption[:StoneRampTrackE] = 'stone ramp track E' ; Shape[:StoneRampTrackE] = :RAMP ; Material[:StoneRampTrackE] = :STONE ; Special[:StoneRampTrackE] = :TRACK ; Direction[:StoneRampTrackE] = 'E' - ENUM[612] = :StoneRampTrackW ; NUME[:StoneRampTrackW] = 612 ; Caption[:StoneRampTrackW] = 'stone ramp track W' ; Shape[:StoneRampTrackW] = :RAMP ; Material[:StoneRampTrackW] = :STONE ; Special[:StoneRampTrackW] = :TRACK ; Direction[:StoneRampTrackW] = 'W' - ENUM[613] = :StoneRampTrackNS ; NUME[:StoneRampTrackNS] = 613 ; Caption[:StoneRampTrackNS] = 'stone ramp track NS' ; Shape[:StoneRampTrackNS] = :RAMP ; Material[:StoneRampTrackNS] = :STONE ; Special[:StoneRampTrackNS] = :TRACK ; Direction[:StoneRampTrackNS] = 'NS' - ENUM[614] = :StoneRampTrackNE ; NUME[:StoneRampTrackNE] = 614 ; Caption[:StoneRampTrackNE] = 'stone ramp track NE' ; Shape[:StoneRampTrackNE] = :RAMP ; Material[:StoneRampTrackNE] = :STONE ; Special[:StoneRampTrackNE] = :TRACK ; Direction[:StoneRampTrackNE] = 'NE' - ENUM[615] = :StoneRampTrackNW ; NUME[:StoneRampTrackNW] = 615 ; Caption[:StoneRampTrackNW] = 'stone ramp track NW' ; Shape[:StoneRampTrackNW] = :RAMP ; Material[:StoneRampTrackNW] = :STONE ; Special[:StoneRampTrackNW] = :TRACK ; Direction[:StoneRampTrackNW] = 'NW' - ENUM[616] = :StoneRampTrackSE ; NUME[:StoneRampTrackSE] = 616 ; Caption[:StoneRampTrackSE] = 'stone ramp track SE' ; Shape[:StoneRampTrackSE] = :RAMP ; Material[:StoneRampTrackSE] = :STONE ; Special[:StoneRampTrackSE] = :TRACK ; Direction[:StoneRampTrackSE] = 'SE' - ENUM[617] = :StoneRampTrackSW ; NUME[:StoneRampTrackSW] = 617 ; Caption[:StoneRampTrackSW] = 'stone ramp track SW' ; Shape[:StoneRampTrackSW] = :RAMP ; Material[:StoneRampTrackSW] = :STONE ; Special[:StoneRampTrackSW] = :TRACK ; Direction[:StoneRampTrackSW] = 'SW' - ENUM[618] = :StoneRampTrackEW ; NUME[:StoneRampTrackEW] = 618 ; Caption[:StoneRampTrackEW] = 'stone ramp track EW' ; Shape[:StoneRampTrackEW] = :RAMP ; Material[:StoneRampTrackEW] = :STONE ; Special[:StoneRampTrackEW] = :TRACK ; Direction[:StoneRampTrackEW] = 'EW' - ENUM[619] = :StoneRampTrackNSE ; NUME[:StoneRampTrackNSE] = 619 ; Caption[:StoneRampTrackNSE] = 'stone ramp track NSE' ; Shape[:StoneRampTrackNSE] = :RAMP ; Material[:StoneRampTrackNSE] = :STONE ; Special[:StoneRampTrackNSE] = :TRACK ; Direction[:StoneRampTrackNSE] = 'NSE' - ENUM[620] = :StoneRampTrackNSW ; NUME[:StoneRampTrackNSW] = 620 ; Caption[:StoneRampTrackNSW] = 'stone ramp track NSW' ; Shape[:StoneRampTrackNSW] = :RAMP ; Material[:StoneRampTrackNSW] = :STONE ; Special[:StoneRampTrackNSW] = :TRACK ; Direction[:StoneRampTrackNSW] = 'NSW' - ENUM[621] = :StoneRampTrackNEW ; NUME[:StoneRampTrackNEW] = 621 ; Caption[:StoneRampTrackNEW] = 'stone ramp track NEW' ; Shape[:StoneRampTrackNEW] = :RAMP ; Material[:StoneRampTrackNEW] = :STONE ; Special[:StoneRampTrackNEW] = :TRACK ; Direction[:StoneRampTrackNEW] = 'NEW' - ENUM[622] = :StoneRampTrackSEW ; NUME[:StoneRampTrackSEW] = 622 ; Caption[:StoneRampTrackSEW] = 'stone ramp track SEW' ; Shape[:StoneRampTrackSEW] = :RAMP ; Material[:StoneRampTrackSEW] = :STONE ; Special[:StoneRampTrackSEW] = :TRACK ; Direction[:StoneRampTrackSEW] = 'SEW' - ENUM[623] = :StoneRampTrackNSEW ; NUME[:StoneRampTrackNSEW] = 623 ; Caption[:StoneRampTrackNSEW] = 'stone ramp track NSEW' ; Shape[:StoneRampTrackNSEW] = :RAMP ; Material[:StoneRampTrackNSEW] = :STONE ; Special[:StoneRampTrackNSEW] = :TRACK ; Direction[:StoneRampTrackNSEW] = 'NSEW' - ENUM[624] = :LavaRampTrackN ; NUME[:LavaRampTrackN] = 624 ; Caption[:LavaRampTrackN] = 'obsidian ramp track N' ; Shape[:LavaRampTrackN] = :RAMP ; Material[:LavaRampTrackN] = :LAVA_STONE ; Special[:LavaRampTrackN] = :TRACK ; Direction[:LavaRampTrackN] = 'N' - ENUM[625] = :LavaRampTrackS ; NUME[:LavaRampTrackS] = 625 ; Caption[:LavaRampTrackS] = 'obsidian ramp track S' ; Shape[:LavaRampTrackS] = :RAMP ; Material[:LavaRampTrackS] = :LAVA_STONE ; Special[:LavaRampTrackS] = :TRACK ; Direction[:LavaRampTrackS] = 'S' - ENUM[626] = :LavaRampTrackE ; NUME[:LavaRampTrackE] = 626 ; Caption[:LavaRampTrackE] = 'obsidian ramp track E' ; Shape[:LavaRampTrackE] = :RAMP ; Material[:LavaRampTrackE] = :LAVA_STONE ; Special[:LavaRampTrackE] = :TRACK ; Direction[:LavaRampTrackE] = 'E' - ENUM[627] = :LavaRampTrackW ; NUME[:LavaRampTrackW] = 627 ; Caption[:LavaRampTrackW] = 'obsidian ramp track W' ; Shape[:LavaRampTrackW] = :RAMP ; Material[:LavaRampTrackW] = :LAVA_STONE ; Special[:LavaRampTrackW] = :TRACK ; Direction[:LavaRampTrackW] = 'W' - ENUM[628] = :LavaRampTrackNS ; NUME[:LavaRampTrackNS] = 628 ; Caption[:LavaRampTrackNS] = 'obsidian ramp track NS' ; Shape[:LavaRampTrackNS] = :RAMP ; Material[:LavaRampTrackNS] = :LAVA_STONE ; Special[:LavaRampTrackNS] = :TRACK ; Direction[:LavaRampTrackNS] = 'NS' - ENUM[629] = :LavaRampTrackNE ; NUME[:LavaRampTrackNE] = 629 ; Caption[:LavaRampTrackNE] = 'obsidian ramp track NE' ; Shape[:LavaRampTrackNE] = :RAMP ; Material[:LavaRampTrackNE] = :LAVA_STONE ; Special[:LavaRampTrackNE] = :TRACK ; Direction[:LavaRampTrackNE] = 'NE' - ENUM[630] = :LavaRampTrackNW ; NUME[:LavaRampTrackNW] = 630 ; Caption[:LavaRampTrackNW] = 'obsidian ramp track NW' ; Shape[:LavaRampTrackNW] = :RAMP ; Material[:LavaRampTrackNW] = :LAVA_STONE ; Special[:LavaRampTrackNW] = :TRACK ; Direction[:LavaRampTrackNW] = 'NW' - ENUM[631] = :LavaRampTrackSE ; NUME[:LavaRampTrackSE] = 631 ; Caption[:LavaRampTrackSE] = 'obsidian ramp track SE' ; Shape[:LavaRampTrackSE] = :RAMP ; Material[:LavaRampTrackSE] = :LAVA_STONE ; Special[:LavaRampTrackSE] = :TRACK ; Direction[:LavaRampTrackSE] = 'SE' - ENUM[632] = :LavaRampTrackSW ; NUME[:LavaRampTrackSW] = 632 ; Caption[:LavaRampTrackSW] = 'obsidian ramp track SW' ; Shape[:LavaRampTrackSW] = :RAMP ; Material[:LavaRampTrackSW] = :LAVA_STONE ; Special[:LavaRampTrackSW] = :TRACK ; Direction[:LavaRampTrackSW] = 'SW' - ENUM[633] = :LavaRampTrackEW ; NUME[:LavaRampTrackEW] = 633 ; Caption[:LavaRampTrackEW] = 'obsidian ramp track EW' ; Shape[:LavaRampTrackEW] = :RAMP ; Material[:LavaRampTrackEW] = :LAVA_STONE ; Special[:LavaRampTrackEW] = :TRACK ; Direction[:LavaRampTrackEW] = 'EW' - ENUM[634] = :LavaRampTrackNSE ; NUME[:LavaRampTrackNSE] = 634 ; Caption[:LavaRampTrackNSE] = 'obsidian ramp track NSE' ; Shape[:LavaRampTrackNSE] = :RAMP ; Material[:LavaRampTrackNSE] = :LAVA_STONE ; Special[:LavaRampTrackNSE] = :TRACK ; Direction[:LavaRampTrackNSE] = 'NSE' - ENUM[635] = :LavaRampTrackNSW ; NUME[:LavaRampTrackNSW] = 635 ; Caption[:LavaRampTrackNSW] = 'obsidian ramp track NSW' ; Shape[:LavaRampTrackNSW] = :RAMP ; Material[:LavaRampTrackNSW] = :LAVA_STONE ; Special[:LavaRampTrackNSW] = :TRACK ; Direction[:LavaRampTrackNSW] = 'NSW' - ENUM[636] = :LavaRampTrackNEW ; NUME[:LavaRampTrackNEW] = 636 ; Caption[:LavaRampTrackNEW] = 'obsidian ramp track NEW' ; Shape[:LavaRampTrackNEW] = :RAMP ; Material[:LavaRampTrackNEW] = :LAVA_STONE ; Special[:LavaRampTrackNEW] = :TRACK ; Direction[:LavaRampTrackNEW] = 'NEW' - ENUM[637] = :LavaRampTrackSEW ; NUME[:LavaRampTrackSEW] = 637 ; Caption[:LavaRampTrackSEW] = 'obsidian ramp track SEW' ; Shape[:LavaRampTrackSEW] = :RAMP ; Material[:LavaRampTrackSEW] = :LAVA_STONE ; Special[:LavaRampTrackSEW] = :TRACK ; Direction[:LavaRampTrackSEW] = 'SEW' - ENUM[638] = :LavaRampTrackNSEW ; NUME[:LavaRampTrackNSEW] = 638 ; Caption[:LavaRampTrackNSEW] = 'obsidian ramp track NSEW' ; Shape[:LavaRampTrackNSEW] = :RAMP ; Material[:LavaRampTrackNSEW] = :LAVA_STONE ; Special[:LavaRampTrackNSEW] = :TRACK ; Direction[:LavaRampTrackNSEW] = 'NSEW' - ENUM[639] = :FeatureRampTrackN ; NUME[:FeatureRampTrackN] = 639 ; Caption[:FeatureRampTrackN] = 'featstone ramp track N' ; Shape[:FeatureRampTrackN] = :RAMP ; Material[:FeatureRampTrackN] = :FEATURE ; Special[:FeatureRampTrackN] = :TRACK ; Direction[:FeatureRampTrackN] = 'N' - ENUM[640] = :FeatureRampTrackS ; NUME[:FeatureRampTrackS] = 640 ; Caption[:FeatureRampTrackS] = 'featstone ramp track S' ; Shape[:FeatureRampTrackS] = :RAMP ; Material[:FeatureRampTrackS] = :FEATURE ; Special[:FeatureRampTrackS] = :TRACK ; Direction[:FeatureRampTrackS] = 'S' - ENUM[641] = :FeatureRampTrackE ; NUME[:FeatureRampTrackE] = 641 ; Caption[:FeatureRampTrackE] = 'featstone ramp track E' ; Shape[:FeatureRampTrackE] = :RAMP ; Material[:FeatureRampTrackE] = :FEATURE ; Special[:FeatureRampTrackE] = :TRACK ; Direction[:FeatureRampTrackE] = 'E' - ENUM[642] = :FeatureRampTrackW ; NUME[:FeatureRampTrackW] = 642 ; Caption[:FeatureRampTrackW] = 'featstone ramp track W' ; Shape[:FeatureRampTrackW] = :RAMP ; Material[:FeatureRampTrackW] = :FEATURE ; Special[:FeatureRampTrackW] = :TRACK ; Direction[:FeatureRampTrackW] = 'W' - ENUM[643] = :FeatureRampTrackNS ; NUME[:FeatureRampTrackNS] = 643 ; Caption[:FeatureRampTrackNS] = 'featstone ramp track NS' ; Shape[:FeatureRampTrackNS] = :RAMP ; Material[:FeatureRampTrackNS] = :FEATURE ; Special[:FeatureRampTrackNS] = :TRACK ; Direction[:FeatureRampTrackNS] = 'NS' - ENUM[644] = :FeatureRampTrackNE ; NUME[:FeatureRampTrackNE] = 644 ; Caption[:FeatureRampTrackNE] = 'featstone ramp track NE' ; Shape[:FeatureRampTrackNE] = :RAMP ; Material[:FeatureRampTrackNE] = :FEATURE ; Special[:FeatureRampTrackNE] = :TRACK ; Direction[:FeatureRampTrackNE] = 'NE' - ENUM[645] = :FeatureRampTrackNW ; NUME[:FeatureRampTrackNW] = 645 ; Caption[:FeatureRampTrackNW] = 'featstone ramp track NW' ; Shape[:FeatureRampTrackNW] = :RAMP ; Material[:FeatureRampTrackNW] = :FEATURE ; Special[:FeatureRampTrackNW] = :TRACK ; Direction[:FeatureRampTrackNW] = 'NW' - ENUM[646] = :FeatureRampTrackSE ; NUME[:FeatureRampTrackSE] = 646 ; Caption[:FeatureRampTrackSE] = 'featstone ramp track SE' ; Shape[:FeatureRampTrackSE] = :RAMP ; Material[:FeatureRampTrackSE] = :FEATURE ; Special[:FeatureRampTrackSE] = :TRACK ; Direction[:FeatureRampTrackSE] = 'SE' - ENUM[647] = :FeatureRampTrackSW ; NUME[:FeatureRampTrackSW] = 647 ; Caption[:FeatureRampTrackSW] = 'featstone ramp track SW' ; Shape[:FeatureRampTrackSW] = :RAMP ; Material[:FeatureRampTrackSW] = :FEATURE ; Special[:FeatureRampTrackSW] = :TRACK ; Direction[:FeatureRampTrackSW] = 'SW' - ENUM[648] = :FeatureRampTrackEW ; NUME[:FeatureRampTrackEW] = 648 ; Caption[:FeatureRampTrackEW] = 'featstone ramp track EW' ; Shape[:FeatureRampTrackEW] = :RAMP ; Material[:FeatureRampTrackEW] = :FEATURE ; Special[:FeatureRampTrackEW] = :TRACK ; Direction[:FeatureRampTrackEW] = 'EW' - ENUM[649] = :FeatureRampTrackNSE ; NUME[:FeatureRampTrackNSE] = 649 ; Caption[:FeatureRampTrackNSE] = 'featstone ramp track NSE' ; Shape[:FeatureRampTrackNSE] = :RAMP ; Material[:FeatureRampTrackNSE] = :FEATURE ; Special[:FeatureRampTrackNSE] = :TRACK ; Direction[:FeatureRampTrackNSE] = 'NSE' - ENUM[650] = :FeatureRampTrackNSW ; NUME[:FeatureRampTrackNSW] = 650 ; Caption[:FeatureRampTrackNSW] = 'featstone ramp track NSW' ; Shape[:FeatureRampTrackNSW] = :RAMP ; Material[:FeatureRampTrackNSW] = :FEATURE ; Special[:FeatureRampTrackNSW] = :TRACK ; Direction[:FeatureRampTrackNSW] = 'NSW' - ENUM[651] = :FeatureRampTrackNEW ; NUME[:FeatureRampTrackNEW] = 651 ; Caption[:FeatureRampTrackNEW] = 'featstone ramp track NEW' ; Shape[:FeatureRampTrackNEW] = :RAMP ; Material[:FeatureRampTrackNEW] = :FEATURE ; Special[:FeatureRampTrackNEW] = :TRACK ; Direction[:FeatureRampTrackNEW] = 'NEW' - ENUM[652] = :FeatureRampTrackSEW ; NUME[:FeatureRampTrackSEW] = 652 ; Caption[:FeatureRampTrackSEW] = 'featstone ramp track SEW' ; Shape[:FeatureRampTrackSEW] = :RAMP ; Material[:FeatureRampTrackSEW] = :FEATURE ; Special[:FeatureRampTrackSEW] = :TRACK ; Direction[:FeatureRampTrackSEW] = 'SEW' - ENUM[653] = :FeatureRampTrackNSEW ; NUME[:FeatureRampTrackNSEW] = 653 ; Caption[:FeatureRampTrackNSEW] = 'featstone ramp track NSEW' ; Shape[:FeatureRampTrackNSEW] = :RAMP ; Material[:FeatureRampTrackNSEW] = :FEATURE ; Special[:FeatureRampTrackNSEW] = :TRACK ; Direction[:FeatureRampTrackNSEW] = 'NSEW' - ENUM[654] = :MineralRampTrackN ; NUME[:MineralRampTrackN] = 654 ; Caption[:MineralRampTrackN] = 'vein ramp track N' ; Shape[:MineralRampTrackN] = :RAMP ; Material[:MineralRampTrackN] = :MINERAL ; Special[:MineralRampTrackN] = :TRACK ; Direction[:MineralRampTrackN] = 'N' - ENUM[655] = :MineralRampTrackS ; NUME[:MineralRampTrackS] = 655 ; Caption[:MineralRampTrackS] = 'vein ramp track S' ; Shape[:MineralRampTrackS] = :RAMP ; Material[:MineralRampTrackS] = :MINERAL ; Special[:MineralRampTrackS] = :TRACK ; Direction[:MineralRampTrackS] = 'S' - ENUM[656] = :MineralRampTrackE ; NUME[:MineralRampTrackE] = 656 ; Caption[:MineralRampTrackE] = 'vein ramp track E' ; Shape[:MineralRampTrackE] = :RAMP ; Material[:MineralRampTrackE] = :MINERAL ; Special[:MineralRampTrackE] = :TRACK ; Direction[:MineralRampTrackE] = 'E' - ENUM[657] = :MineralRampTrackW ; NUME[:MineralRampTrackW] = 657 ; Caption[:MineralRampTrackW] = 'vein ramp track W' ; Shape[:MineralRampTrackW] = :RAMP ; Material[:MineralRampTrackW] = :MINERAL ; Special[:MineralRampTrackW] = :TRACK ; Direction[:MineralRampTrackW] = 'W' - ENUM[658] = :MineralRampTrackNS ; NUME[:MineralRampTrackNS] = 658 ; Caption[:MineralRampTrackNS] = 'vein ramp track NS' ; Shape[:MineralRampTrackNS] = :RAMP ; Material[:MineralRampTrackNS] = :MINERAL ; Special[:MineralRampTrackNS] = :TRACK ; Direction[:MineralRampTrackNS] = 'NS' - ENUM[659] = :MineralRampTrackNE ; NUME[:MineralRampTrackNE] = 659 ; Caption[:MineralRampTrackNE] = 'vein ramp track NE' ; Shape[:MineralRampTrackNE] = :RAMP ; Material[:MineralRampTrackNE] = :MINERAL ; Special[:MineralRampTrackNE] = :TRACK ; Direction[:MineralRampTrackNE] = 'NE' - ENUM[660] = :MineralRampTrackNW ; NUME[:MineralRampTrackNW] = 660 ; Caption[:MineralRampTrackNW] = 'vein ramp track NW' ; Shape[:MineralRampTrackNW] = :RAMP ; Material[:MineralRampTrackNW] = :MINERAL ; Special[:MineralRampTrackNW] = :TRACK ; Direction[:MineralRampTrackNW] = 'NW' - ENUM[661] = :MineralRampTrackSE ; NUME[:MineralRampTrackSE] = 661 ; Caption[:MineralRampTrackSE] = 'vein ramp track SE' ; Shape[:MineralRampTrackSE] = :RAMP ; Material[:MineralRampTrackSE] = :MINERAL ; Special[:MineralRampTrackSE] = :TRACK ; Direction[:MineralRampTrackSE] = 'SE' - ENUM[662] = :MineralRampTrackSW ; NUME[:MineralRampTrackSW] = 662 ; Caption[:MineralRampTrackSW] = 'vein ramp track SW' ; Shape[:MineralRampTrackSW] = :RAMP ; Material[:MineralRampTrackSW] = :MINERAL ; Special[:MineralRampTrackSW] = :TRACK ; Direction[:MineralRampTrackSW] = 'SW' - ENUM[663] = :MineralRampTrackEW ; NUME[:MineralRampTrackEW] = 663 ; Caption[:MineralRampTrackEW] = 'vein ramp track EW' ; Shape[:MineralRampTrackEW] = :RAMP ; Material[:MineralRampTrackEW] = :MINERAL ; Special[:MineralRampTrackEW] = :TRACK ; Direction[:MineralRampTrackEW] = 'EW' - ENUM[664] = :MineralRampTrackNSE ; NUME[:MineralRampTrackNSE] = 664 ; Caption[:MineralRampTrackNSE] = 'vein ramp track NSE' ; Shape[:MineralRampTrackNSE] = :RAMP ; Material[:MineralRampTrackNSE] = :MINERAL ; Special[:MineralRampTrackNSE] = :TRACK ; Direction[:MineralRampTrackNSE] = 'NSE' - ENUM[665] = :MineralRampTrackNSW ; NUME[:MineralRampTrackNSW] = 665 ; Caption[:MineralRampTrackNSW] = 'vein ramp track NSW' ; Shape[:MineralRampTrackNSW] = :RAMP ; Material[:MineralRampTrackNSW] = :MINERAL ; Special[:MineralRampTrackNSW] = :TRACK ; Direction[:MineralRampTrackNSW] = 'NSW' - ENUM[666] = :MineralRampTrackNEW ; NUME[:MineralRampTrackNEW] = 666 ; Caption[:MineralRampTrackNEW] = 'vein ramp track NEW' ; Shape[:MineralRampTrackNEW] = :RAMP ; Material[:MineralRampTrackNEW] = :MINERAL ; Special[:MineralRampTrackNEW] = :TRACK ; Direction[:MineralRampTrackNEW] = 'NEW' - ENUM[667] = :MineralRampTrackSEW ; NUME[:MineralRampTrackSEW] = 667 ; Caption[:MineralRampTrackSEW] = 'vein ramp track SEW' ; Shape[:MineralRampTrackSEW] = :RAMP ; Material[:MineralRampTrackSEW] = :MINERAL ; Special[:MineralRampTrackSEW] = :TRACK ; Direction[:MineralRampTrackSEW] = 'SEW' - ENUM[668] = :MineralRampTrackNSEW ; NUME[:MineralRampTrackNSEW] = 668 ; Caption[:MineralRampTrackNSEW] = 'vein ramp track NSEW' ; Shape[:MineralRampTrackNSEW] = :RAMP ; Material[:MineralRampTrackNSEW] = :MINERAL ; Special[:MineralRampTrackNSEW] = :TRACK ; Direction[:MineralRampTrackNSEW] = 'NSEW' - ENUM[669] = :FrozenRampTrackN ; NUME[:FrozenRampTrackN] = 669 ; Caption[:FrozenRampTrackN] = 'ice ramp track N' ; Shape[:FrozenRampTrackN] = :RAMP ; Material[:FrozenRampTrackN] = :FROZEN_LIQUID ; Special[:FrozenRampTrackN] = :TRACK ; Direction[:FrozenRampTrackN] = 'N' - ENUM[670] = :FrozenRampTrackS ; NUME[:FrozenRampTrackS] = 670 ; Caption[:FrozenRampTrackS] = 'ice ramp track S' ; Shape[:FrozenRampTrackS] = :RAMP ; Material[:FrozenRampTrackS] = :FROZEN_LIQUID ; Special[:FrozenRampTrackS] = :TRACK ; Direction[:FrozenRampTrackS] = 'S' - ENUM[671] = :FrozenRampTrackE ; NUME[:FrozenRampTrackE] = 671 ; Caption[:FrozenRampTrackE] = 'ice ramp track E' ; Shape[:FrozenRampTrackE] = :RAMP ; Material[:FrozenRampTrackE] = :FROZEN_LIQUID ; Special[:FrozenRampTrackE] = :TRACK ; Direction[:FrozenRampTrackE] = 'E' - ENUM[672] = :FrozenRampTrackW ; NUME[:FrozenRampTrackW] = 672 ; Caption[:FrozenRampTrackW] = 'ice ramp track W' ; Shape[:FrozenRampTrackW] = :RAMP ; Material[:FrozenRampTrackW] = :FROZEN_LIQUID ; Special[:FrozenRampTrackW] = :TRACK ; Direction[:FrozenRampTrackW] = 'W' - ENUM[673] = :FrozenRampTrackNS ; NUME[:FrozenRampTrackNS] = 673 ; Caption[:FrozenRampTrackNS] = 'ice ramp track NS' ; Shape[:FrozenRampTrackNS] = :RAMP ; Material[:FrozenRampTrackNS] = :FROZEN_LIQUID ; Special[:FrozenRampTrackNS] = :TRACK ; Direction[:FrozenRampTrackNS] = 'NS' - ENUM[674] = :FrozenRampTrackNE ; NUME[:FrozenRampTrackNE] = 674 ; Caption[:FrozenRampTrackNE] = 'ice ramp track NE' ; Shape[:FrozenRampTrackNE] = :RAMP ; Material[:FrozenRampTrackNE] = :FROZEN_LIQUID ; Special[:FrozenRampTrackNE] = :TRACK ; Direction[:FrozenRampTrackNE] = 'NE' - ENUM[675] = :FrozenRampTrackNW ; NUME[:FrozenRampTrackNW] = 675 ; Caption[:FrozenRampTrackNW] = 'ice ramp track NW' ; Shape[:FrozenRampTrackNW] = :RAMP ; Material[:FrozenRampTrackNW] = :FROZEN_LIQUID ; Special[:FrozenRampTrackNW] = :TRACK ; Direction[:FrozenRampTrackNW] = 'NW' - ENUM[676] = :FrozenRampTrackSE ; NUME[:FrozenRampTrackSE] = 676 ; Caption[:FrozenRampTrackSE] = 'ice ramp track SE' ; Shape[:FrozenRampTrackSE] = :RAMP ; Material[:FrozenRampTrackSE] = :FROZEN_LIQUID ; Special[:FrozenRampTrackSE] = :TRACK ; Direction[:FrozenRampTrackSE] = 'SE' - ENUM[677] = :FrozenRampTrackSW ; NUME[:FrozenRampTrackSW] = 677 ; Caption[:FrozenRampTrackSW] = 'ice ramp track SW' ; Shape[:FrozenRampTrackSW] = :RAMP ; Material[:FrozenRampTrackSW] = :FROZEN_LIQUID ; Special[:FrozenRampTrackSW] = :TRACK ; Direction[:FrozenRampTrackSW] = 'SW' - ENUM[678] = :FrozenRampTrackEW ; NUME[:FrozenRampTrackEW] = 678 ; Caption[:FrozenRampTrackEW] = 'ice ramp track EW' ; Shape[:FrozenRampTrackEW] = :RAMP ; Material[:FrozenRampTrackEW] = :FROZEN_LIQUID ; Special[:FrozenRampTrackEW] = :TRACK ; Direction[:FrozenRampTrackEW] = 'EW' - ENUM[679] = :FrozenRampTrackNSE ; NUME[:FrozenRampTrackNSE] = 679 ; Caption[:FrozenRampTrackNSE] = 'ice ramp track NSE' ; Shape[:FrozenRampTrackNSE] = :RAMP ; Material[:FrozenRampTrackNSE] = :FROZEN_LIQUID ; Special[:FrozenRampTrackNSE] = :TRACK ; Direction[:FrozenRampTrackNSE] = 'NSE' - ENUM[680] = :FrozenRampTrackNSW ; NUME[:FrozenRampTrackNSW] = 680 ; Caption[:FrozenRampTrackNSW] = 'ice ramp track NSW' ; Shape[:FrozenRampTrackNSW] = :RAMP ; Material[:FrozenRampTrackNSW] = :FROZEN_LIQUID ; Special[:FrozenRampTrackNSW] = :TRACK ; Direction[:FrozenRampTrackNSW] = 'NSW' - ENUM[681] = :FrozenRampTrackNEW ; NUME[:FrozenRampTrackNEW] = 681 ; Caption[:FrozenRampTrackNEW] = 'ice ramp track NEW' ; Shape[:FrozenRampTrackNEW] = :RAMP ; Material[:FrozenRampTrackNEW] = :FROZEN_LIQUID ; Special[:FrozenRampTrackNEW] = :TRACK ; Direction[:FrozenRampTrackNEW] = 'NEW' - ENUM[682] = :FrozenRampTrackSEW ; NUME[:FrozenRampTrackSEW] = 682 ; Caption[:FrozenRampTrackSEW] = 'ice ramp track SEW' ; Shape[:FrozenRampTrackSEW] = :RAMP ; Material[:FrozenRampTrackSEW] = :FROZEN_LIQUID ; Special[:FrozenRampTrackSEW] = :TRACK ; Direction[:FrozenRampTrackSEW] = 'SEW' - ENUM[683] = :FrozenRampTrackNSEW ; NUME[:FrozenRampTrackNSEW] = 683 ; Caption[:FrozenRampTrackNSEW] = 'ice ramp track NSEW' ; Shape[:FrozenRampTrackNSEW] = :RAMP ; Material[:FrozenRampTrackNSEW] = :FROZEN_LIQUID ; Special[:FrozenRampTrackNSEW] = :TRACK ; Direction[:FrozenRampTrackNSEW] = 'NSEW' - ENUM[684] = :ConstructedRampTrackN ; NUME[:ConstructedRampTrackN] = 684 ; Caption[:ConstructedRampTrackN] = 'constructed ramp track N' ; Shape[:ConstructedRampTrackN] = :RAMP ; Material[:ConstructedRampTrackN] = :CONSTRUCTION ; Special[:ConstructedRampTrackN] = :TRACK ; Direction[:ConstructedRampTrackN] = 'N' - ENUM[685] = :ConstructedRampTrackS ; NUME[:ConstructedRampTrackS] = 685 ; Caption[:ConstructedRampTrackS] = 'constructed ramp track S' ; Shape[:ConstructedRampTrackS] = :RAMP ; Material[:ConstructedRampTrackS] = :CONSTRUCTION ; Special[:ConstructedRampTrackS] = :TRACK ; Direction[:ConstructedRampTrackS] = 'S' - ENUM[686] = :ConstructedRampTrackE ; NUME[:ConstructedRampTrackE] = 686 ; Caption[:ConstructedRampTrackE] = 'constructed ramp track E' ; Shape[:ConstructedRampTrackE] = :RAMP ; Material[:ConstructedRampTrackE] = :CONSTRUCTION ; Special[:ConstructedRampTrackE] = :TRACK ; Direction[:ConstructedRampTrackE] = 'E' - ENUM[687] = :ConstructedRampTrackW ; NUME[:ConstructedRampTrackW] = 687 ; Caption[:ConstructedRampTrackW] = 'constructed ramp track W' ; Shape[:ConstructedRampTrackW] = :RAMP ; Material[:ConstructedRampTrackW] = :CONSTRUCTION ; Special[:ConstructedRampTrackW] = :TRACK ; Direction[:ConstructedRampTrackW] = 'W' - ENUM[688] = :ConstructedRampTrackNS ; NUME[:ConstructedRampTrackNS] = 688 ; Caption[:ConstructedRampTrackNS] = 'constructed ramp track NS' ; Shape[:ConstructedRampTrackNS] = :RAMP ; Material[:ConstructedRampTrackNS] = :CONSTRUCTION ; Special[:ConstructedRampTrackNS] = :TRACK ; Direction[:ConstructedRampTrackNS] = 'NS' - ENUM[689] = :ConstructedRampTrackNE ; NUME[:ConstructedRampTrackNE] = 689 ; Caption[:ConstructedRampTrackNE] = 'constructed ramp track NE' ; Shape[:ConstructedRampTrackNE] = :RAMP ; Material[:ConstructedRampTrackNE] = :CONSTRUCTION ; Special[:ConstructedRampTrackNE] = :TRACK ; Direction[:ConstructedRampTrackNE] = 'NE' - ENUM[690] = :ConstructedRampTrackNW ; NUME[:ConstructedRampTrackNW] = 690 ; Caption[:ConstructedRampTrackNW] = 'constructed ramp track NW' ; Shape[:ConstructedRampTrackNW] = :RAMP ; Material[:ConstructedRampTrackNW] = :CONSTRUCTION ; Special[:ConstructedRampTrackNW] = :TRACK ; Direction[:ConstructedRampTrackNW] = 'NW' - ENUM[691] = :ConstructedRampTrackSE ; NUME[:ConstructedRampTrackSE] = 691 ; Caption[:ConstructedRampTrackSE] = 'constructed ramp track SE' ; Shape[:ConstructedRampTrackSE] = :RAMP ; Material[:ConstructedRampTrackSE] = :CONSTRUCTION ; Special[:ConstructedRampTrackSE] = :TRACK ; Direction[:ConstructedRampTrackSE] = 'SE' - ENUM[692] = :ConstructedRampTrackSW ; NUME[:ConstructedRampTrackSW] = 692 ; Caption[:ConstructedRampTrackSW] = 'constructed ramp track SW' ; Shape[:ConstructedRampTrackSW] = :RAMP ; Material[:ConstructedRampTrackSW] = :CONSTRUCTION ; Special[:ConstructedRampTrackSW] = :TRACK ; Direction[:ConstructedRampTrackSW] = 'SW' - ENUM[693] = :ConstructedRampTrackEW ; NUME[:ConstructedRampTrackEW] = 693 ; Caption[:ConstructedRampTrackEW] = 'constructed ramp track EW' ; Shape[:ConstructedRampTrackEW] = :RAMP ; Material[:ConstructedRampTrackEW] = :CONSTRUCTION ; Special[:ConstructedRampTrackEW] = :TRACK ; Direction[:ConstructedRampTrackEW] = 'EW' - ENUM[694] = :ConstructedRampTrackNSE ; NUME[:ConstructedRampTrackNSE] = 694 ; Caption[:ConstructedRampTrackNSE] = 'constructed ramp track NSE' ; Shape[:ConstructedRampTrackNSE] = :RAMP ; Material[:ConstructedRampTrackNSE] = :CONSTRUCTION ; Special[:ConstructedRampTrackNSE] = :TRACK ; Direction[:ConstructedRampTrackNSE] = 'NSE' - ENUM[695] = :ConstructedRampTrackNSW ; NUME[:ConstructedRampTrackNSW] = 695 ; Caption[:ConstructedRampTrackNSW] = 'constructed ramp track NSW' ; Shape[:ConstructedRampTrackNSW] = :RAMP ; Material[:ConstructedRampTrackNSW] = :CONSTRUCTION ; Special[:ConstructedRampTrackNSW] = :TRACK ; Direction[:ConstructedRampTrackNSW] = 'NSW' - ENUM[696] = :ConstructedRampTrackNEW ; NUME[:ConstructedRampTrackNEW] = 696 ; Caption[:ConstructedRampTrackNEW] = 'constructed ramp track NEW' ; Shape[:ConstructedRampTrackNEW] = :RAMP ; Material[:ConstructedRampTrackNEW] = :CONSTRUCTION ; Special[:ConstructedRampTrackNEW] = :TRACK ; Direction[:ConstructedRampTrackNEW] = 'NEW' - ENUM[697] = :ConstructedRampTrackSEW ; NUME[:ConstructedRampTrackSEW] = 697 ; Caption[:ConstructedRampTrackSEW] = 'constructed ramp track SEW' ; Shape[:ConstructedRampTrackSEW] = :RAMP ; Material[:ConstructedRampTrackSEW] = :CONSTRUCTION ; Special[:ConstructedRampTrackSEW] = :TRACK ; Direction[:ConstructedRampTrackSEW] = 'SEW' - ENUM[698] = :ConstructedRampTrackNSEW ; NUME[:ConstructedRampTrackNSEW] = 698 ; Caption[:ConstructedRampTrackNSEW] = 'constructed ramp track NSEW' ; Shape[:ConstructedRampTrackNSEW] = :RAMP ; Material[:ConstructedRampTrackNSEW] = :CONSTRUCTION ; Special[:ConstructedRampTrackNSEW] = :TRACK ; Direction[:ConstructedRampTrackNSEW] = 'NSEW' -end - -class TiletypeMaterial < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - Caption = Hash.new - ENUM[-1] = :NONE ; NUME[:NONE] = -1 - ENUM[0] = :AIR ; NUME[:AIR] = 0 ; Caption[:AIR] = 'empty' - ENUM[1] = :SOIL ; NUME[:SOIL] = 1 ; Caption[:SOIL] = 'ordinary soil. material depends on geology' - ENUM[2] = :STONE ; NUME[:STONE] = 2 ; Caption[:STONE] = 'ordinary layer stone. material depends on geology' - ENUM[3] = :FEATURE ; NUME[:FEATURE] = 3 ; Caption[:FEATURE] = 'map special stone. used for things like hell, curious structures, or adamantine tubes. material depends on local/global special' - ENUM[4] = :LAVA_STONE ; NUME[:LAVA_STONE] = 4 ; Caption[:LAVA_STONE] = 'lava stone created by mixing magma and water' - ENUM[5] = :MINERAL ; NUME[:MINERAL] = 5 ; Caption[:MINERAL] = 'vein stone. material depends on mineral veins present' - ENUM[6] = :FROZEN_LIQUID ; NUME[:FROZEN_LIQUID] = 6 ; Caption[:FROZEN_LIQUID] = 'frozen liquid. material depends on ice vein present (which also indicates what was on the tile before it froze)' - ENUM[7] = :CONSTRUCTION ; NUME[:CONSTRUCTION] = 7 ; Caption[:CONSTRUCTION] = 'material depends on the construction present' - ENUM[8] = :GRASS_LIGHT ; NUME[:GRASS_LIGHT] = 8 ; Caption[:GRASS_LIGHT] = 'light grass' - ENUM[9] = :GRASS_DARK ; NUME[:GRASS_DARK] = 9 ; Caption[:GRASS_DARK] = 'dark grass' - ENUM[10] = :GRASS_DRY ; NUME[:GRASS_DRY] = 10 ; Caption[:GRASS_DRY] = 'dry grass' - ENUM[11] = :GRASS_DEAD ; NUME[:GRASS_DEAD] = 11 ; Caption[:GRASS_DEAD] = 'dead grass' - ENUM[12] = :PLANT ; NUME[:PLANT] = 12 ; Caption[:PLANT] = 'plant' - ENUM[13] = :HFS ; NUME[:HFS] = 13 ; Caption[:HFS] = 'the stuff glowing barriers/floors and eerie pits are made of - this makes them different from ordinary walls/floors and chasms' - ENUM[14] = :CAMPFIRE ; NUME[:CAMPFIRE] = 14 ; Caption[:CAMPFIRE] = 'human armies make them when they siege. original tile is lost?' - ENUM[15] = :FIRE ; NUME[:FIRE] = 15 ; Caption[:FIRE] = 'burning grass' - ENUM[16] = :ASHES ; NUME[:ASHES] = 16 ; Caption[:ASHES] = 'what remains from a fire' - ENUM[17] = :MAGMA ; NUME[:MAGMA] = 17 ; Caption[:MAGMA] = 'material for semi-molten rock and magma flow tiles' - ENUM[18] = :DRIFTWOOD ; NUME[:DRIFTWOOD] = 18 ; Caption[:DRIFTWOOD] = 'driftwood. normally shows up on beaches' - ENUM[19] = :POOL ; NUME[:POOL] = 19 ; Caption[:POOL] = 'A pool. Gathers water while it\'s raining.' - ENUM[20] = :BROOK ; NUME[:BROOK] = 20 ; Caption[:BROOK] = 'Brook beds and floors' - ENUM[21] = :RIVER ; NUME[:RIVER] = 21 ; Caption[:RIVER] = 'It\'s a riverbed. Basically a tile that doesn\'t get muddy.' -end - -class TiletypeShape < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - Caption = Hash.new - BasicShape = Hash.new(:None) - PassableLow = Hash.new(false) - PassableHigh = Hash.new(false) - PassableFlow = Hash.new(false) - Walkable = Hash.new(false) - WalkableUp = Hash.new(false) - ENUM[-1] = :NONE ; NUME[:NONE] = -1 - ENUM[0] = :EMPTY ; NUME[:EMPTY] = 0 ; BasicShape[:EMPTY] = :Open ; PassableLow[:EMPTY] = true ; PassableHigh[:EMPTY] = true ; PassableFlow[:EMPTY] = true - ENUM[1] = :FLOOR ; NUME[:FLOOR] = 1 ; BasicShape[:FLOOR] = :Floor ; PassableHigh[:FLOOR] = true ; PassableFlow[:FLOOR] = true ; Walkable[:FLOOR] = true - ENUM[2] = :BOULDER ; NUME[:BOULDER] = 2 ; BasicShape[:BOULDER] = :Floor ; PassableHigh[:BOULDER] = true ; PassableFlow[:BOULDER] = true ; Walkable[:BOULDER] = true - ENUM[3] = :PEBBLES ; NUME[:PEBBLES] = 3 ; BasicShape[:PEBBLES] = :Floor ; PassableHigh[:PEBBLES] = true ; PassableFlow[:PEBBLES] = true ; Walkable[:PEBBLES] = true - ENUM[4] = :WALL ; NUME[:WALL] = 4 ; BasicShape[:WALL] = :Wall - ENUM[5] = :FORTIFICATION ; NUME[:FORTIFICATION] = 5 ; BasicShape[:FORTIFICATION] = :Wall ; PassableFlow[:FORTIFICATION] = true - ENUM[6] = :STAIR_UP ; NUME[:STAIR_UP] = 6 ; BasicShape[:STAIR_UP] = :Stair ; PassableHigh[:STAIR_UP] = true ; PassableFlow[:STAIR_UP] = true ; Walkable[:STAIR_UP] = true ; WalkableUp[:STAIR_UP] = true - ENUM[7] = :STAIR_DOWN ; NUME[:STAIR_DOWN] = 7 ; BasicShape[:STAIR_DOWN] = :Stair ; PassableLow[:STAIR_DOWN] = true ; PassableHigh[:STAIR_DOWN] = true ; PassableFlow[:STAIR_DOWN] = true ; Walkable[:STAIR_DOWN] = true - ENUM[8] = :STAIR_UPDOWN ; NUME[:STAIR_UPDOWN] = 8 ; BasicShape[:STAIR_UPDOWN] = :Stair ; PassableLow[:STAIR_UPDOWN] = true ; PassableHigh[:STAIR_UPDOWN] = true ; PassableFlow[:STAIR_UPDOWN] = true ; Walkable[:STAIR_UPDOWN] = true ; WalkableUp[:STAIR_UPDOWN] = true - ENUM[9] = :RAMP ; NUME[:RAMP] = 9 ; Caption[:RAMP] = 'ramps have no direction' ; BasicShape[:RAMP] = :Ramp ; PassableHigh[:RAMP] = true ; PassableFlow[:RAMP] = true ; Walkable[:RAMP] = true ; WalkableUp[:RAMP] = true - ENUM[10] = :RAMP_TOP ; NUME[:RAMP_TOP] = 10 ; Caption[:RAMP_TOP] = 'used for pathing?' ; BasicShape[:RAMP_TOP] = :Open ; PassableLow[:RAMP_TOP] = true ; PassableHigh[:RAMP_TOP] = true ; PassableFlow[:RAMP_TOP] = true ; Walkable[:RAMP_TOP] = true - ENUM[11] = :BROOK_BED ; NUME[:BROOK_BED] = 11 ; Caption[:BROOK_BED] = 'mineable, water-passable rock on the bottom of a brook' ; BasicShape[:BROOK_BED] = :Wall ; PassableFlow[:BROOK_BED] = true - ENUM[12] = :BROOK_TOP ; NUME[:BROOK_TOP] = 12 ; Caption[:BROOK_TOP] = 'water-passable floor on top of BROOK_BED tiles' ; BasicShape[:BROOK_TOP] = :Floor ; PassableHigh[:BROOK_TOP] = true ; PassableFlow[:BROOK_TOP] = true ; Walkable[:BROOK_TOP] = true - ENUM[13] = :TREE ; NUME[:TREE] = 13 ; BasicShape[:TREE] = :Floor - ENUM[14] = :SAPLING ; NUME[:SAPLING] = 14 ; BasicShape[:SAPLING] = :Floor ; PassableHigh[:SAPLING] = true ; PassableFlow[:SAPLING] = true ; Walkable[:SAPLING] = true - ENUM[15] = :SHRUB ; NUME[:SHRUB] = 15 ; BasicShape[:SHRUB] = :Floor ; PassableHigh[:SHRUB] = true ; PassableFlow[:SHRUB] = true ; Walkable[:SHRUB] = true - ENUM[16] = :ENDLESS_PIT ; NUME[:ENDLESS_PIT] = 16 ; Caption[:ENDLESS_PIT] = 'a fake endless pit' ; BasicShape[:ENDLESS_PIT] = :Open ; PassableHigh[:ENDLESS_PIT] = true ; PassableFlow[:ENDLESS_PIT] = true ; Walkable[:ENDLESS_PIT] = true -end - -class TiletypeShapeBasic < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[-1] = :None ; NUME[:None] = -1 - ENUM[0] = :Open ; NUME[:Open] = 0 - ENUM[1] = :Floor ; NUME[:Floor] = 1 - ENUM[2] = :Ramp ; NUME[:Ramp] = 2 - ENUM[3] = :Wall ; NUME[:Wall] = 3 - ENUM[4] = :Stair ; NUME[:Stair] = 4 -end - -class TiletypeSpecial < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - Caption = Hash.new - ENUM[-1] = :NONE ; NUME[:NONE] = -1 - ENUM[0] = :NORMAL ; NUME[:NORMAL] = 0 ; Caption[:NORMAL] = 'default for all tiles, nothing special about it' - ENUM[1] = :RIVER_SOURCE ; NUME[:RIVER_SOURCE] = 1 ; Caption[:RIVER_SOURCE] = 'river source, when it exists on a map' - ENUM[2] = :WATERFALL ; NUME[:WATERFALL] = 2 ; Caption[:WATERFALL] = 'waterfall from nowhere, used by cave rivers back in 40d' - ENUM[3] = :SMOOTH ; NUME[:SMOOTH] = 3 ; Caption[:SMOOTH] = 'smooth walls and floors, including constructions' - ENUM[4] = :FURROWED ; NUME[:FURROWED] = 4 ; Caption[:FURROWED] = 'furrowed soil, left by roads/farms and removing constructions' - ENUM[5] = :WET ; NUME[:WET] = 5 ; Caption[:WET] = 'wet soil, found on beaches' - ENUM[6] = :DEAD ; NUME[:DEAD] = 6 ; Caption[:DEAD] = 'dead, used by plants' - ENUM[7] = :WORN_1 ; NUME[:WORN_1] = 7 ; Caption[:WORN_1] = 'partially (25%) mined walls' - ENUM[8] = :WORN_2 ; NUME[:WORN_2] = 8 ; Caption[:WORN_2] = 'partially (50%) mined walls' - ENUM[9] = :WORN_3 ; NUME[:WORN_3] = 9 ; Caption[:WORN_3] = 'partially (75%) mined walls' - ENUM[10] = :TRACK ; NUME[:TRACK] = 10 ; Caption[:TRACK] = 'mine cart track' -end - -class TiletypeVariant < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[-1] = :NONE ; NUME[:NONE] = -1 - ENUM[0] = :VAR_1 ; NUME[:VAR_1] = 0 - ENUM[1] = :VAR_2 ; NUME[:VAR_2] = 1 - ENUM[2] = :VAR_3 ; NUME[:VAR_3] = 2 - ENUM[3] = :VAR_4 ; NUME[:VAR_4] = 3 -end - -class TimedEventType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :Caravan ; NUME[:Caravan] = 0 - ENUM[1] = :Migrants ; NUME[:Migrants] = 1 - ENUM[2] = :Diplomat ; NUME[:Diplomat] = 2 - ENUM[3] = :CivAttack ; NUME[:CivAttack] = 3 - ENUM[5] = :Megabeast ; NUME[:Megabeast] = 5 - ENUM[6] = :Wildlife ; NUME[:Wildlife] = 6 - ENUM[7] = :Unk7 ; NUME[:Unk7] = 7 - ENUM[8] = :Unk8 ; NUME[:Unk8] = 8 - ENUM[9] = :Unk9 ; NUME[:Unk9] = 9 -end - -class TissueTemplateFlags < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :THICKENS_ON_STRENGTH ; NUME[:THICKENS_ON_STRENGTH] = 0 - ENUM[1] = :THICKENS_ON_ENERGY_STORAGE ; NUME[:THICKENS_ON_ENERGY_STORAGE] = 1 - ENUM[2] = :ARTERIES ; NUME[:ARTERIES] = 2 - ENUM[3] = :SCARS ; NUME[:SCARS] = 3 - ENUM[4] = :STRUCTURAL ; NUME[:STRUCTURAL] = 4 - ENUM[5] = :NERVOUS ; NUME[:NERVOUS] = 5 - ENUM[6] = :THOUGHT ; NUME[:THOUGHT] = 6 - ENUM[7] = :MUSCULAR ; NUME[:MUSCULAR] = 7 - ENUM[8] = :SMELL ; NUME[:SMELL] = 8 - ENUM[9] = :HEAR ; NUME[:HEAR] = 9 - ENUM[10] = :FLIGHT ; NUME[:FLIGHT] = 10 - ENUM[11] = :BREATHE ; NUME[:BREATHE] = 11 - ENUM[12] = :SIGHT ; NUME[:SIGHT] = 12 - ENUM[13] = :COSMETIC ; NUME[:COSMETIC] = 13 - ENUM[14] = :CONNECTS ; NUME[:CONNECTS] = 14 - ENUM[15] = :FUNCTIONAL ; NUME[:FUNCTIONAL] = 15 - ENUM[16] = :MAJOR_ARTERIES ; NUME[:MAJOR_ARTERIES] = 16 - ENUM[17] = :TISSUE_LEAKS ; NUME[:TISSUE_LEAKS] = 17 - ENUM[18] = :STYLEABLE ; NUME[:STYLEABLE] = 18 - ENUM[19] = :CONNECTIVE_TISSUE_ANCHOR ; NUME[:CONNECTIVE_TISSUE_ANCHOR] = 19 - ENUM[20] = :SETTABLE ; NUME[:SETTABLE] = 20 - ENUM[21] = :SPLINTABLE ; NUME[:SPLINTABLE] = 21 -end - -class ToolFlags < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :HARD_MAT ; NUME[:HARD_MAT] = 0 - ENUM[1] = :METAL_MAT ; NUME[:METAL_MAT] = 1 - ENUM[2] = :HAS_EDGE_ATTACK ; NUME[:HAS_EDGE_ATTACK] = 2 - ENUM[3] = :METAL_WEAPON_MAT ; NUME[:METAL_WEAPON_MAT] = 3 - ENUM[4] = :UNIMPROVABLE ; NUME[:UNIMPROVABLE] = 4 - ENUM[5] = :SOFT_MAT ; NUME[:SOFT_MAT] = 5 - ENUM[6] = :WOOD_MAT ; NUME[:WOOD_MAT] = 6 - ENUM[7] = :INVERTED_TILE ; NUME[:INVERTED_TILE] = 7 - ENUM[8] = :FURNITURE ; NUME[:FURNITURE] = 8 -end - -class ToolUses < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[-1] = :NONE ; NUME[:NONE] = -1 - ENUM[0] = :LIQUID_COOKING ; NUME[:LIQUID_COOKING] = 0 - ENUM[1] = :LIQUID_SCOOP ; NUME[:LIQUID_SCOOP] = 1 - ENUM[2] = :GRIND_POWDER_RECEPTACLE ; NUME[:GRIND_POWDER_RECEPTACLE] = 2 - ENUM[3] = :GRIND_POWDER_GRINDER ; NUME[:GRIND_POWDER_GRINDER] = 3 - ENUM[4] = :MEAT_CARVING ; NUME[:MEAT_CARVING] = 4 - ENUM[5] = :MEAT_BONING ; NUME[:MEAT_BONING] = 5 - ENUM[6] = :MEAT_SLICING ; NUME[:MEAT_SLICING] = 6 - ENUM[7] = :MEAT_CLEAVING ; NUME[:MEAT_CLEAVING] = 7 - ENUM[8] = :HOLD_MEAT_FOR_CARVING ; NUME[:HOLD_MEAT_FOR_CARVING] = 8 - ENUM[9] = :MEAL_CONTAINER ; NUME[:MEAL_CONTAINER] = 9 - ENUM[10] = :LIQUID_CONTAINER ; NUME[:LIQUID_CONTAINER] = 10 - ENUM[11] = :FOOD_STORAGE ; NUME[:FOOD_STORAGE] = 11 - ENUM[12] = :HIVE ; NUME[:HIVE] = 12 - ENUM[13] = :NEST_BOX ; NUME[:NEST_BOX] = 13 - ENUM[14] = :SMALL_OBJECT_STORAGE ; NUME[:SMALL_OBJECT_STORAGE] = 14 - ENUM[15] = :TRACK_CART ; NUME[:TRACK_CART] = 15 - ENUM[16] = :HEAVY_OBJECT_HAULING ; NUME[:HEAVY_OBJECT_HAULING] = 16 -end - -class ToyFlags < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :HARD_MAT ; NUME[:HARD_MAT] = 0 -end - -class TrainingKnowledgeLevel < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :None ; NUME[:None] = 0 - ENUM[1] = :FewFacts ; NUME[:FewFacts] = 1 - ENUM[2] = :GeneralFamiliarity ; NUME[:GeneralFamiliarity] = 2 - ENUM[3] = :Knowledgeable ; NUME[:Knowledgeable] = 3 - ENUM[4] = :Expert ; NUME[:Expert] = 4 - ENUM[5] = :Domesticated ; NUME[:Domesticated] = 5 -end - -class TrapType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :Lever ; NUME[:Lever] = 0 - ENUM[1] = :PressurePlate ; NUME[:PressurePlate] = 1 - ENUM[2] = :CageTrap ; NUME[:CageTrap] = 2 - ENUM[3] = :StoneFallTrap ; NUME[:StoneFallTrap] = 3 - ENUM[4] = :WeaponTrap ; NUME[:WeaponTrap] = 4 - ENUM[5] = :TrackStop ; NUME[:TrackStop] = 5 -end - -class TrapcompFlags < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :IS_SCREW ; NUME[:IS_SCREW] = 0 - ENUM[1] = :IS_SPIKE ; NUME[:IS_SPIKE] = 1 - ENUM[2] = :WOOD ; NUME[:WOOD] = 2 - ENUM[3] = :METAL ; NUME[:METAL] = 3 - ENUM[4] = :HAS_EDGE_ATTACK ; NUME[:HAS_EDGE_ATTACK] = 4 -end - -class UiAdvmodeMenu < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :Default ; NUME[:Default] = 0 - ENUM[1] = :Look ; NUME[:Look] = 1 - ENUM[2] = :Talk ; NUME[:Talk] = 2 - ENUM[3] = :Inventory ; NUME[:Inventory] = 3 - ENUM[4] = :Drop ; NUME[:Drop] = 4 - ENUM[5] = :ThrowItem ; NUME[:ThrowItem] = 5 - ENUM[6] = :Wear ; NUME[:Wear] = 6 - ENUM[7] = :Remove ; NUME[:Remove] = 7 - ENUM[8] = :Interact ; NUME[:Interact] = 8 - ENUM[9] = :Put ; NUME[:Put] = 9 - ENUM[10] = :Unk10 ; NUME[:Unk10] = 10 - ENUM[11] = :Eat ; NUME[:Eat] = 11 - ENUM[12] = :ThrowAim ; NUME[:ThrowAim] = 12 - ENUM[13] = :Unk13 ; NUME[:Unk13] = 13 - ENUM[14] = :Get ; NUME[:Get] = 14 - ENUM[15] = :Fire ; NUME[:Fire] = 15 - ENUM[16] = :CombatPrefs ; NUME[:CombatPrefs] = 16 - ENUM[17] = :Companions ; NUME[:Companions] = 17 - ENUM[18] = :Unk18 ; NUME[:Unk18] = 18 - ENUM[19] = :Unk19 ; NUME[:Unk19] = 19 - ENUM[20] = :Unk20 ; NUME[:Unk20] = 20 - ENUM[21] = :Announcements ; NUME[:Announcements] = 21 - ENUM[22] = :Attack ; NUME[:Attack] = 22 - ENUM[23] = :UseBuilding ; NUME[:UseBuilding] = 23 - ENUM[24] = :Travel ; NUME[:Travel] = 24 - ENUM[25] = :Unk25 ; NUME[:Unk25] = 25 - ENUM[26] = :Unk26 ; NUME[:Unk26] = 26 - ENUM[27] = :Unk27 ; NUME[:Unk27] = 27 - ENUM[28] = :Unk28 ; NUME[:Unk28] = 28 - ENUM[29] = :Sleep ; NUME[:Sleep] = 29 -end - -class UiSidebarMode < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :Default ; NUME[:Default] = 0 - ENUM[1] = :Squads ; NUME[:Squads] = 1 - ENUM[2] = :DesignateMine ; NUME[:DesignateMine] = 2 - ENUM[3] = :DesignateRemoveRamps ; NUME[:DesignateRemoveRamps] = 3 - ENUM[4] = :DesignateUpStair ; NUME[:DesignateUpStair] = 4 - ENUM[5] = :DesignateDownStair ; NUME[:DesignateDownStair] = 5 - ENUM[6] = :DesignateUpDownStair ; NUME[:DesignateUpDownStair] = 6 - ENUM[7] = :DesignateUpRamp ; NUME[:DesignateUpRamp] = 7 - ENUM[8] = :DesignateChannel ; NUME[:DesignateChannel] = 8 - ENUM[9] = :DesignateGatherPlants ; NUME[:DesignateGatherPlants] = 9 - ENUM[10] = :DesignateRemoveDesignation ; NUME[:DesignateRemoveDesignation] = 10 - ENUM[11] = :DesignateSmooth ; NUME[:DesignateSmooth] = 11 - ENUM[12] = :DesignateCarveTrack ; NUME[:DesignateCarveTrack] = 12 - ENUM[13] = :DesignateEngrave ; NUME[:DesignateEngrave] = 13 - ENUM[14] = :DesignateCarveFortification ; NUME[:DesignateCarveFortification] = 14 - ENUM[15] = :Stockpiles ; NUME[:Stockpiles] = 15 - ENUM[16] = :Build ; NUME[:Build] = 16 - ENUM[17] = :QueryBuilding ; NUME[:QueryBuilding] = 17 - ENUM[18] = :Orders ; NUME[:Orders] = 18 - ENUM[19] = :OrdersForbid ; NUME[:OrdersForbid] = 19 - ENUM[20] = :OrdersRefuse ; NUME[:OrdersRefuse] = 20 - ENUM[21] = :OrdersWorkshop ; NUME[:OrdersWorkshop] = 21 - ENUM[22] = :OrdersZone ; NUME[:OrdersZone] = 22 - ENUM[23] = :BuildingItems ; NUME[:BuildingItems] = 23 - ENUM[24] = :ViewUnits ; NUME[:ViewUnits] = 24 - ENUM[25] = :LookAround ; NUME[:LookAround] = 25 - ENUM[26] = :DesignateItemsClaim ; NUME[:DesignateItemsClaim] = 26 - ENUM[27] = :DesignateItemsForbid ; NUME[:DesignateItemsForbid] = 27 - ENUM[28] = :DesignateItemsMelt ; NUME[:DesignateItemsMelt] = 28 - ENUM[29] = :DesignateItemsUnmelt ; NUME[:DesignateItemsUnmelt] = 29 - ENUM[30] = :DesignateItemsDump ; NUME[:DesignateItemsDump] = 30 - ENUM[31] = :DesignateItemsUndump ; NUME[:DesignateItemsUndump] = 31 - ENUM[32] = :DesignateItemsHide ; NUME[:DesignateItemsHide] = 32 - ENUM[33] = :DesignateItemsUnhide ; NUME[:DesignateItemsUnhide] = 33 - ENUM[34] = :DesignateChopTrees ; NUME[:DesignateChopTrees] = 34 - ENUM[35] = :DesignateToggleEngravings ; NUME[:DesignateToggleEngravings] = 35 - ENUM[36] = :Hotkeys ; NUME[:Hotkeys] = 36 - ENUM[37] = :DesignateTrafficHigh ; NUME[:DesignateTrafficHigh] = 37 - ENUM[38] = :DesignateTrafficNormal ; NUME[:DesignateTrafficNormal] = 38 - ENUM[39] = :DesignateTrafficLow ; NUME[:DesignateTrafficLow] = 39 - ENUM[40] = :DesignateTrafficRestricted ; NUME[:DesignateTrafficRestricted] = 40 - ENUM[41] = :Zones ; NUME[:Zones] = 41 - ENUM[42] = :ZonesPenInfo ; NUME[:ZonesPenInfo] = 42 - ENUM[43] = :ZonesPitInfo ; NUME[:ZonesPitInfo] = 43 - ENUM[44] = :ZonesHospitalInfo ; NUME[:ZonesHospitalInfo] = 44 - ENUM[45] = :DesignateRemoveConstruction ; NUME[:DesignateRemoveConstruction] = 45 - ENUM[46] = :DepotAccess ; NUME[:DepotAccess] = 46 - ENUM[47] = :NotesPoints ; NUME[:NotesPoints] = 47 - ENUM[48] = :NotesRoutes ; NUME[:NotesRoutes] = 48 - ENUM[49] = :Burrows ; NUME[:Burrows] = 49 - ENUM[50] = :Hauling ; NUME[:Hauling] = 50 -end - -class UniformCategory < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :Body ; NUME[:Body] = 0 - ENUM[1] = :Head ; NUME[:Head] = 1 - ENUM[2] = :Pants ; NUME[:Pants] = 2 - ENUM[3] = :Gloves ; NUME[:Gloves] = 3 - ENUM[4] = :Shoes ; NUME[:Shoes] = 4 - ENUM[5] = :Shield ; NUME[:Shield] = 5 - ENUM[6] = :Weapon ; NUME[:Weapon] = 6 -end - -class UniformMaterialClass < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[-1] = :None ; NUME[:None] = -1 - ENUM[1] = :Leather ; NUME[:Leather] = 1 - ENUM[2] = :Cloth ; NUME[:Cloth] = 2 - ENUM[3] = :Wood ; NUME[:Wood] = 3 - ENUM[5] = :Stone ; NUME[:Stone] = 5 - ENUM[14] = :Metal ; NUME[:Metal] = 14 - ENUM[16] = :Metal2 ; NUME[:Metal2] = 16 - ENUM[17] = :Gem ; NUME[:Gem] = 17 - ENUM[18] = :Bone ; NUME[:Bone] = 18 - ENUM[19] = :Shell ; NUME[:Shell] = 19 - ENUM[20] = :Pearl ; NUME[:Pearl] = 20 - ENUM[21] = :Tooth ; NUME[:Tooth] = 21 - ENUM[22] = :Horn ; NUME[:Horn] = 22 - ENUM[27] = :PlantFiber ; NUME[:PlantFiber] = 27 - ENUM[28] = :Silk ; NUME[:Silk] = 28 - ENUM[29] = :Yarn ; NUME[:Yarn] = 29 -end - -class UnitLabor < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - Caption = Hash.new - ENUM[-1] = :NONE ; NUME[:NONE] = -1 - ENUM[0] = :MINE ; NUME[:MINE] = 0 ; Caption[:MINE] = 'Mining' - ENUM[1] = :HAUL_STONE ; NUME[:HAUL_STONE] = 1 ; Caption[:HAUL_STONE] = 'Stone Hauling' - ENUM[2] = :HAUL_WOOD ; NUME[:HAUL_WOOD] = 2 ; Caption[:HAUL_WOOD] = 'Wood Hauling' - ENUM[3] = :HAUL_BODY ; NUME[:HAUL_BODY] = 3 ; Caption[:HAUL_BODY] = 'Burial' - ENUM[4] = :HAUL_FOOD ; NUME[:HAUL_FOOD] = 4 ; Caption[:HAUL_FOOD] = 'Food Hauling' - ENUM[5] = :HAUL_REFUSE ; NUME[:HAUL_REFUSE] = 5 ; Caption[:HAUL_REFUSE] = 'Refuse Hauling' - ENUM[6] = :HAUL_ITEM ; NUME[:HAUL_ITEM] = 6 ; Caption[:HAUL_ITEM] = 'Item Hauling' - ENUM[7] = :HAUL_FURNITURE ; NUME[:HAUL_FURNITURE] = 7 ; Caption[:HAUL_FURNITURE] = 'Furniture Hauling' - ENUM[8] = :HAUL_ANIMAL ; NUME[:HAUL_ANIMAL] = 8 ; Caption[:HAUL_ANIMAL] = 'Animal Hauling' - ENUM[9] = :CLEAN ; NUME[:CLEAN] = 9 ; Caption[:CLEAN] = 'Cleaning' - ENUM[10] = :CUTWOOD ; NUME[:CUTWOOD] = 10 ; Caption[:CUTWOOD] = 'Wood Cutting' - ENUM[11] = :CARPENTER ; NUME[:CARPENTER] = 11 ; Caption[:CARPENTER] = 'Carpentry' - ENUM[12] = :DETAIL ; NUME[:DETAIL] = 12 ; Caption[:DETAIL] = 'Stone Detailing' - ENUM[13] = :MASON ; NUME[:MASON] = 13 ; Caption[:MASON] = 'Masonry' - ENUM[14] = :ARCHITECT ; NUME[:ARCHITECT] = 14 ; Caption[:ARCHITECT] = 'Architecture' - ENUM[15] = :ANIMALTRAIN ; NUME[:ANIMALTRAIN] = 15 ; Caption[:ANIMALTRAIN] = 'Animal Training' - ENUM[16] = :ANIMALCARE ; NUME[:ANIMALCARE] = 16 ; Caption[:ANIMALCARE] = 'Animal Care' - ENUM[17] = :DIAGNOSE ; NUME[:DIAGNOSE] = 17 ; Caption[:DIAGNOSE] = 'Diagnosis' - ENUM[18] = :SURGERY ; NUME[:SURGERY] = 18 ; Caption[:SURGERY] = 'Surgery' - ENUM[19] = :BONE_SETTING ; NUME[:BONE_SETTING] = 19 ; Caption[:BONE_SETTING] = 'Setting Bones' - ENUM[20] = :SUTURING ; NUME[:SUTURING] = 20 ; Caption[:SUTURING] = 'Suturing' - ENUM[21] = :DRESSING_WOUNDS ; NUME[:DRESSING_WOUNDS] = 21 ; Caption[:DRESSING_WOUNDS] = 'Dressing Wounds' - ENUM[22] = :FEED_WATER_CIVILIANS ; NUME[:FEED_WATER_CIVILIANS] = 22 ; Caption[:FEED_WATER_CIVILIANS] = 'Feed Patients/Prisoners' - ENUM[23] = :RECOVER_WOUNDED ; NUME[:RECOVER_WOUNDED] = 23 ; Caption[:RECOVER_WOUNDED] = 'Recovering Wounded' - ENUM[24] = :BUTCHER ; NUME[:BUTCHER] = 24 ; Caption[:BUTCHER] = 'Butchery' - ENUM[25] = :TRAPPER ; NUME[:TRAPPER] = 25 ; Caption[:TRAPPER] = 'Trapping' - ENUM[26] = :DISSECT_VERMIN ; NUME[:DISSECT_VERMIN] = 26 ; Caption[:DISSECT_VERMIN] = 'Small Animal Dissection' - ENUM[27] = :LEATHER ; NUME[:LEATHER] = 27 ; Caption[:LEATHER] = 'Leatherworking' - ENUM[28] = :TANNER ; NUME[:TANNER] = 28 ; Caption[:TANNER] = 'Tanning' - ENUM[29] = :BREWER ; NUME[:BREWER] = 29 ; Caption[:BREWER] = 'Brewing' - ENUM[30] = :ALCHEMIST ; NUME[:ALCHEMIST] = 30 ; Caption[:ALCHEMIST] = 'Alchemy' - ENUM[31] = :SOAP_MAKER ; NUME[:SOAP_MAKER] = 31 ; Caption[:SOAP_MAKER] = 'Soap Maker' - ENUM[32] = :WEAVER ; NUME[:WEAVER] = 32 ; Caption[:WEAVER] = 'Weaving' - ENUM[33] = :CLOTHESMAKER ; NUME[:CLOTHESMAKER] = 33 ; Caption[:CLOTHESMAKER] = 'Clothesmaking' - ENUM[34] = :MILLER ; NUME[:MILLER] = 34 ; Caption[:MILLER] = 'Milling' - ENUM[35] = :PROCESS_PLANT ; NUME[:PROCESS_PLANT] = 35 ; Caption[:PROCESS_PLANT] = 'Plant Processing' - ENUM[36] = :MAKE_CHEESE ; NUME[:MAKE_CHEESE] = 36 ; Caption[:MAKE_CHEESE] = 'Cheese Making' - ENUM[37] = :MILK ; NUME[:MILK] = 37 ; Caption[:MILK] = 'Milking' - ENUM[38] = :COOK ; NUME[:COOK] = 38 ; Caption[:COOK] = 'Cooking' - ENUM[39] = :PLANT ; NUME[:PLANT] = 39 ; Caption[:PLANT] = 'Farming (Fields)' - ENUM[40] = :HERBALIST ; NUME[:HERBALIST] = 40 ; Caption[:HERBALIST] = 'Plant Gathering' - ENUM[41] = :FISH ; NUME[:FISH] = 41 ; Caption[:FISH] = 'Fishing' - ENUM[42] = :CLEAN_FISH ; NUME[:CLEAN_FISH] = 42 ; Caption[:CLEAN_FISH] = 'Fish Cleaning' - ENUM[43] = :DISSECT_FISH ; NUME[:DISSECT_FISH] = 43 ; Caption[:DISSECT_FISH] = 'Fish Dissection' - ENUM[44] = :HUNT ; NUME[:HUNT] = 44 ; Caption[:HUNT] = 'Hunting' - ENUM[45] = :SMELT ; NUME[:SMELT] = 45 ; Caption[:SMELT] = 'Furnace Operating' - ENUM[46] = :FORGE_WEAPON ; NUME[:FORGE_WEAPON] = 46 ; Caption[:FORGE_WEAPON] = 'Weaponsmithing' - ENUM[47] = :FORGE_ARMOR ; NUME[:FORGE_ARMOR] = 47 ; Caption[:FORGE_ARMOR] = 'Armoring' - ENUM[48] = :FORGE_FURNITURE ; NUME[:FORGE_FURNITURE] = 48 ; Caption[:FORGE_FURNITURE] = 'Blacksmithing' - ENUM[49] = :METAL_CRAFT ; NUME[:METAL_CRAFT] = 49 ; Caption[:METAL_CRAFT] = 'Metalcrafting' - ENUM[50] = :CUT_GEM ; NUME[:CUT_GEM] = 50 ; Caption[:CUT_GEM] = 'Gem Cutting' - ENUM[51] = :ENCRUST_GEM ; NUME[:ENCRUST_GEM] = 51 ; Caption[:ENCRUST_GEM] = 'Gem Setting' - ENUM[52] = :WOOD_CRAFT ; NUME[:WOOD_CRAFT] = 52 ; Caption[:WOOD_CRAFT] = 'Woodcrafting' - ENUM[53] = :STONE_CRAFT ; NUME[:STONE_CRAFT] = 53 ; Caption[:STONE_CRAFT] = 'Stonecrafting' - ENUM[54] = :BONE_CARVE ; NUME[:BONE_CARVE] = 54 ; Caption[:BONE_CARVE] = 'Bone Carving' - ENUM[55] = :GLASSMAKER ; NUME[:GLASSMAKER] = 55 ; Caption[:GLASSMAKER] = 'Glassmaking' - ENUM[56] = :EXTRACT_STRAND ; NUME[:EXTRACT_STRAND] = 56 ; Caption[:EXTRACT_STRAND] = 'Strand Extraction' - ENUM[57] = :SIEGECRAFT ; NUME[:SIEGECRAFT] = 57 ; Caption[:SIEGECRAFT] = 'Siege Engineering' - ENUM[58] = :SIEGEOPERATE ; NUME[:SIEGEOPERATE] = 58 ; Caption[:SIEGEOPERATE] = 'Siege Operating' - ENUM[59] = :BOWYER ; NUME[:BOWYER] = 59 ; Caption[:BOWYER] = 'Crossbow-making' - ENUM[60] = :MECHANIC ; NUME[:MECHANIC] = 60 ; Caption[:MECHANIC] = 'Mechanics' - ENUM[61] = :POTASH_MAKING ; NUME[:POTASH_MAKING] = 61 ; Caption[:POTASH_MAKING] = 'Potash Making' - ENUM[62] = :LYE_MAKING ; NUME[:LYE_MAKING] = 62 ; Caption[:LYE_MAKING] = 'Lye Making' - ENUM[63] = :DYER ; NUME[:DYER] = 63 ; Caption[:DYER] = 'Dyeing' - ENUM[64] = :BURN_WOOD ; NUME[:BURN_WOOD] = 64 ; Caption[:BURN_WOOD] = 'Wood Burning' - ENUM[65] = :OPERATE_PUMP ; NUME[:OPERATE_PUMP] = 65 ; Caption[:OPERATE_PUMP] = 'Pump Operating' - ENUM[66] = :SHEARER ; NUME[:SHEARER] = 66 ; Caption[:SHEARER] = 'Shearing' - ENUM[67] = :SPINNER ; NUME[:SPINNER] = 67 ; Caption[:SPINNER] = 'Spinning' - ENUM[68] = :POTTERY ; NUME[:POTTERY] = 68 ; Caption[:POTTERY] = 'Pottery' - ENUM[69] = :GLAZING ; NUME[:GLAZING] = 69 ; Caption[:GLAZING] = 'Glazing' - ENUM[70] = :PRESSING ; NUME[:PRESSING] = 70 ; Caption[:PRESSING] = 'Pressing' - ENUM[71] = :BEEKEEPING ; NUME[:BEEKEEPING] = 71 ; Caption[:BEEKEEPING] = 'Bee Keeping' - ENUM[72] = :WAX_WORKING ; NUME[:WAX_WORKING] = 72 ; Caption[:WAX_WORKING] = 'Wax Working' - ENUM[73] = :PUSH_HAUL_VEHICLE ; NUME[:PUSH_HAUL_VEHICLE] = 73 ; Caption[:PUSH_HAUL_VEHICLE] = 'Push/Haul Vehicle' -end - -class UnitThoughtType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - Value = Hash.new - Caption = Hash.new - ENUM[0] = :Miscarriage ; NUME[:Miscarriage] = 0 ; Value[:Miscarriage] = '-50/-30/-20/-10' ; Caption[:Miscarriage] = 'had a miscarriage recently' - ENUM[1] = :Evicted ; NUME[:Evicted] = 1 ; Value[:Evicted] = '-10' ; Caption[:Evicted] = 'has been evicted lately' - ENUM[2] = :Tired ; NUME[:Tired] = 2 ; Value[:Tired] = '-5' ; Caption[:Tired] = 'has been tired lately' - ENUM[3] = :Exhausted ; NUME[:Exhausted] = 3 ; Value[:Exhausted] = '-30' ; Caption[:Exhausted] = 'has been exhausted lately' - ENUM[4] = :Hunger ; NUME[:Hunger] = 4 ; Value[:Hunger] = '-5' ; Caption[:Hunger] = 'has complained of hunger lately' - ENUM[5] = :Thirst ; NUME[:Thirst] = 5 ; Value[:Thirst] = '-5' ; Caption[:Thirst] = 'has complained of thirst lately' - ENUM[6] = :Starving ; NUME[:Starving] = 6 ; Value[:Starving] = '-30' ; Caption[:Starving] = 'has been starving lately' - ENUM[7] = :Dehydrated ; NUME[:Dehydrated] = 7 ; Value[:Dehydrated] = '-30' ; Caption[:Dehydrated] = 'has been dehydrated lately' - ENUM[8] = :ScarceTaxCollectionEscorts ; NUME[:ScarceTaxCollectionEscorts] = 8 ; Value[:ScarceTaxCollectionEscorts] = '-10' ; Caption[:ScarceTaxCollectionEscorts] = 'was worried by the scarcity of tax collection escorts lately' - ENUM[9] = :ScarceGuards ; NUME[:ScarceGuards] = 9 ; Value[:ScarceGuards] = '-10' ; Caption[:ScarceGuards] = 'was worried by the scarcity of guards lately' - ENUM[10] = :ScarceCageChain ; NUME[:ScarceCageChain] = 10 ; Value[:ScarceCageChain] = '-10' ; Caption[:ScarceCageChain] = 'was worried by the scarcity of cages and chains lately' - ENUM[11] = :Attacked ; NUME[:Attacked] = 11 ; Value[:Attacked] = '-30/-20/-10/-5' ; Caption[:Attacked] = 'has been attacked lately' - ENUM[12] = :AttackedByDead ; NUME[:AttackedByDead] = 12 ; Value[:AttackedByDead] = '-100/-60/-40/-20' ; Caption[:AttackedByDead] = 'has been attacked by a dead (pet/spouse/mother/...) lately' - ENUM[13] = :TaxRoomUnreachable ; NUME[:TaxRoomUnreachable] = 13 ; Value[:TaxRoomUnreachable] = '-5' ; Caption[:TaxRoomUnreachable] = 'was unable to reach a room for tax collection lately' - ENUM[14] = :TaxRoomMisinformed ; NUME[:TaxRoomMisinformed] = 14 ; Value[:TaxRoomMisinformed] = '-5' ; Caption[:TaxRoomMisinformed] = 'was misinformed about a room for tax collection lately' - ENUM[15] = :TaxCollectionRough ; NUME[:TaxCollectionRough] = 15 ; Value[:TaxCollectionRough] = '-10' ; Caption[:TaxCollectionRough] = 'was upset that the tax collection didnt go smoothly lately' - ENUM[16] = :Taxed ; NUME[:Taxed] = 16 ; Value[:Taxed] = '-5' ; Caption[:Taxed] = 'has been taxed recently' - ENUM[17] = :TaxedLostProperty ; NUME[:TaxedLostProperty] = 17 ; Value[:TaxedLostProperty] = '-10' ; Caption[:TaxedLostProperty] = 'has lost property to the tax collectors escorts recently' - ENUM[18] = :DisappointedNoble ; NUME[:DisappointedNoble] = 18 ; Value[:DisappointedNoble] = '-10' ; Caption[:DisappointedNoble] = 'was upset to have disappointed a noble lately' - ENUM[19] = :LackChairs ; NUME[:LackChairs] = 19 ; Value[:LackChairs] = '-?' ; Caption[:LackChairs] = 'has complained of the lack of chairs lately' - ENUM[20] = :CrowdedTables ; NUME[:CrowdedTables] = 20 ; Value[:CrowdedTables] = '-2' ; Caption[:CrowdedTables] = 'has complained of the crowded tables lately' - ENUM[21] = :LackTables ; NUME[:LackTables] = 21 ; Value[:LackTables] = '-?' ; Caption[:LackTables] = 'has complained of the lack of dining tables lately' - ENUM[22] = :EatVermin ; NUME[:EatVermin] = 22 ; Value[:EatVermin] = '-30/-20/-10' ; Caption[:EatVermin] = 'was forced to eat vermin to survive lately' - ENUM[23] = :EatLikedCreature ; NUME[:EatLikedCreature] = 23 ; Value[:EatLikedCreature] = '-50' ; Caption[:EatLikedCreature] = 'was forced to eat a beloved creature to survive lately' - ENUM[24] = :EatPet ; NUME[:EatPet] = 24 ; Value[:EatPet] = '-1000' ; Caption[:EatPet] = 'was forced to eat a treasured pet to survive lately' - ENUM[25] = :LackWell ; NUME[:LackWell] = 25 ; Value[:LackWell] = '-5/-3/-2' ; Caption[:LackWell] = 'has complained of the lack of a well lately' - ENUM[26] = :NastyWater ; NUME[:NastyWater] = 26 ; Value[:NastyWater] = '-10/-5/-3' ; Caption[:NastyWater] = 'has complained of the nasty water lately' - ENUM[27] = :DrinkSlime ; NUME[:DrinkSlime] = 27 ; Value[:DrinkSlime] = '-30/-20/-10/-5' ; Caption[:DrinkSlime] = 'was forced to drink slime lately' - ENUM[28] = :DrinkVomit ; NUME[:DrinkVomit] = 28 ; Value[:DrinkVomit] = '-30/-20/-10/-5' ; Caption[:DrinkVomit] = 'was forced to drink vomit lately' - ENUM[29] = :DrinkBlood ; NUME[:DrinkBlood] = 29 ; Value[:DrinkBlood] = '-30/-20/-10/-5' ; Caption[:DrinkBlood] = 'was forced to drink bloody water lately' - ENUM[30] = :DrinkGoo ; NUME[:DrinkGoo] = 30 ; Value[:DrinkGoo] = '-30/-20/-10/-5' ; Caption[:DrinkGoo] = 'was forced to drink gooey water lately' - ENUM[31] = :DrinkIchor ; NUME[:DrinkIchor] = 31 ; Value[:DrinkIchor] = '-30/-20/-10/-5' ; Caption[:DrinkIchor] = 'was forced to drink ichorous water lately' - ENUM[32] = :DrinkPus ; NUME[:DrinkPus] = 32 ; Value[:DrinkPus] = '-30/-20/-10/-5' ; Caption[:DrinkPus] = 'was forced to drink purulent water lately' - ENUM[33] = :SleepNoise ; NUME[:SleepNoise] = 33 ; Value[:SleepNoise] = '-2' ; Caption[:SleepNoise] = 'slept uneasily due to noise lately' - ENUM[34] = :SleepNoiseMajor ; NUME[:SleepNoiseMajor] = 34 ; Value[:SleepNoiseMajor] = '-5' ; Caption[:SleepNoiseMajor] = 'slept very uneasily due to noise lately' - ENUM[35] = :SleepNoiseWake ; NUME[:SleepNoiseWake] = 35 ; Value[:SleepNoiseWake] = '-10' ; Caption[:SleepNoiseWake] = 'was woken by noise while sleeping lately' - ENUM[36] = :LackProtection ; NUME[:LackProtection] = 36 ; Value[:LackProtection] = '-10' ; Caption[:LackProtection] = 'was worried not to have adequate protection lately' - ENUM[37] = :Drafted ; NUME[:Drafted] = 37 ; Value[:Drafted] = '-30' ; Caption[:Drafted] = 'has complained about the draft lately' - ENUM[38] = :Relieved ; NUME[:Relieved] = 38 ; Value[:Relieved] = '-30' ; Caption[:Relieved] = 'was upset about being relieved from duty' - ENUM[39] = :ArtDefacement ; NUME[:ArtDefacement] = 39 ; Value[:ArtDefacement] = '-200/x' ; Caption[:ArtDefacement] = 'has suffered the travesty of art defacement' - ENUM[40] = :AnnoyedFlies ; NUME[:AnnoyedFlies] = 40 ; Value[:AnnoyedFlies] = '-5/-3/-2' ; Caption[:AnnoyedFlies] = 'has been annoyed by flies' - ENUM[41] = :AnnoyedVermin ; NUME[:AnnoyedVermin] = 41 ; Value[:AnnoyedVermin] = '-30/-20/-10' ; Caption[:AnnoyedVermin] = 'has been accosted by terrible vermin' - ENUM[42] = :AnnoyedCage ; NUME[:AnnoyedCage] = 42 ; Value[:AnnoyedCage] = '-10/-5/-3' ; Caption[:AnnoyedCage] = 'saw something unpleasant in a cage recently' - ENUM[43] = :AnnoyedPond ; NUME[:AnnoyedPond] = 43 ; Value[:AnnoyedPond] = '-10/-5/-3' ; Caption[:AnnoyedPond] = 'saw something unpleasant in a pond recently' - ENUM[44] = :WitnessDeath ; NUME[:WitnessDeath] = 44 ; Value[:WitnessDeath] = '-30/-20/-10/-5' ; Caption[:WitnessDeath] = 'has witnessed death' - ENUM[45] = :LostPet ; NUME[:LostPet] = 45 ; Value[:LostPet] = '-50/-30/-20/-10' ; Caption[:LostPet] = 'has lost a pet recently' - ENUM[46] = :LostPet2 ; NUME[:LostPet2] = 46 ; Value[:LostPet2] = '-50/-30/-20/-10' ; Caption[:LostPet2] = 'has lost a pet recently' - ENUM[47] = :RageKill ; NUME[:RageKill] = 47 ; Value[:RageKill] = '-50/-30/-20/-10' ; Caption[:RageKill] = 'accidentally killed somebody in a fit of rage recently' - ENUM[48] = :SparringAccident ; NUME[:SparringAccident] = 48 ; Value[:SparringAccident] = '-50/-30/-20/-10' ; Caption[:SparringAccident] = 'killed somebody by accident while sparring recently' - ENUM[49] = :LostSpouse ; NUME[:LostSpouse] = 49 ; Value[:LostSpouse] = '-50/-30/-20/-10' ; Caption[:LostSpouse] = 'has lost a spouse to tragedy recently' - ENUM[50] = :LostFriend ; NUME[:LostFriend] = 50 ; Value[:LostFriend] = '-50/-30/-20/-10' ; Caption[:LostFriend] = 'has lost a friend to tragedy recently' - ENUM[51] = :LostSibling ; NUME[:LostSibling] = 51 ; Value[:LostSibling] = '-50/-30/-20/-10' ; Caption[:LostSibling] = 'has lost a sibling to tragedy recently' - ENUM[52] = :LostChild ; NUME[:LostChild] = 52 ; Value[:LostChild] = '-50/-30/-20/-10' ; Caption[:LostChild] = 'has lost a child to tragedy recently' - ENUM[53] = :LostMother ; NUME[:LostMother] = 53 ; Value[:LostMother] = '-50/-30/-20/-10' ; Caption[:LostMother] = 'has lost a mother to tragedy recently' - ENUM[54] = :LostFather ; NUME[:LostFather] = 54 ; Value[:LostFather] = '-50/-30/-20/-10' ; Caption[:LostFather] = 'has lost a father to tragedy recently' - ENUM[55] = :Decay ; NUME[:Decay] = 55 ; Value[:Decay] = '-20/-10/-5/-3' ; Caption[:Decay] = 'was forced to endure the decay of a (pet/spouse/mother..)' - ENUM[56] = :AteRotten ; NUME[:AteRotten] = 56 ; Value[:AteRotten] = '-10' ; Caption[:AteRotten] = 'ate rotten food lately' - ENUM[57] = :DrankSpoiled ; NUME[:DrankSpoiled] = 57 ; Value[:DrankSpoiled] = '-10' ; Caption[:DrankSpoiled] = 'drank something spoiled lately' - ENUM[58] = :LongPatrol ; NUME[:LongPatrol] = 58 ; Value[:LongPatrol] = '-2/-3/-5-/10' ; Caption[:LongPatrol] = 'was (grumbling/depressed/angered/enraged) about long patrol duty lately' - ENUM[59] = :Miasma ; NUME[:Miasma] = 59 ; Value[:Miasma] = '-5/-3/-2' ; Caption[:Miasma] = 'was disgusted by a miasma lately' - ENUM[60] = :Smoke ; NUME[:Smoke] = 60 ; Value[:Smoke] = '-5/-3/-2' ; Caption[:Smoke] = 'choked on smoke underground lately' - ENUM[61] = :Dust ; NUME[:Dust] = 61 ; Value[:Dust] = '-5/-3/-2' ; Caption[:Dust] = 'choked on dust underground lately' - ENUM[62] = :Cavein ; NUME[:Cavein] = 62 ; Value[:Cavein] = '-20/-10/-5/-3' ; Caption[:Cavein] = 'was knocked out during a cave-in lately' - ENUM[63] = :MeetingInDiningRoom ; NUME[:MeetingInDiningRoom] = 63 ; Value[:MeetingInDiningRoom] = '-?' ; Caption[:MeetingInDiningRoom] = 'was embarrassed to have to conduct an official meeting in a dining room' - ENUM[64] = :MeetingInBedroom ; NUME[:MeetingInBedroom] = 64 ; Value[:MeetingInBedroom] = '-?' ; Caption[:MeetingInBedroom] = 'was very embarrassed to have to conduct an official meeting in a bedroom' - ENUM[65] = :NoRooms ; NUME[:NoRooms] = 65 ; Value[:NoRooms] = '-?' ; Caption[:NoRooms] = 'was incredibly embarrassed not to have any rooms lately' - ENUM[66] = :MajorInjuries ; NUME[:MajorInjuries] = 66 ; Value[:MajorInjuries] = '-30/-20/-10/-5' ; Caption[:MajorInjuries] = 'sustained major injuries recently' - ENUM[67] = :MinorInjuries ; NUME[:MinorInjuries] = 67 ; Value[:MinorInjuries] = '-20/-10/-5/-3' ; Caption[:MinorInjuries] = 'sustained minor injuries recently' - ENUM[68] = :SleptMud ; NUME[:SleptMud] = 68 ; Value[:SleptMud] = '-?' ; Caption[:SleptMud] = 'slept in the mud recently' - ENUM[69] = :SleptGrass ; NUME[:SleptGrass] = 69 ; Value[:SleptGrass] = '-?' ; Caption[:SleptGrass] = 'slept in the grass recently' - ENUM[70] = :SleptDirt ; NUME[:SleptDirt] = 70 ; Value[:SleptDirt] = '-?' ; Caption[:SleptDirt] = 'slept in the dirt recently' - ENUM[71] = :SleptRocks ; NUME[:SleptRocks] = 71 ; Value[:SleptRocks] = '-?' ; Caption[:SleptRocks] = 'slept on rocks recently' - ENUM[72] = :SleptRoughFloor ; NUME[:SleptRoughFloor] = 72 ; Value[:SleptRoughFloor] = '-?' ; Caption[:SleptRoughFloor] = 'slept on a rough cave floor recently' - ENUM[73] = :SleptFloor ; NUME[:SleptFloor] = 73 ; Value[:SleptFloor] = '-?' ; Caption[:SleptFloor] = 'slept on the floor recently' - ENUM[74] = :SleptIce ; NUME[:SleptIce] = 74 ; Value[:SleptIce] = '-?' ; Caption[:SleptIce] = 'slept on ice recently' - ENUM[75] = :SleptDriftwood ; NUME[:SleptDriftwood] = 75 ; Value[:SleptDriftwood] = '-?' ; Caption[:SleptDriftwood] = 'slept on a pile of driftwood recently' - ENUM[76] = :BedroomNone ; NUME[:BedroomNone] = 76 ; Value[:BedroomNone] = '-?' ; Caption[:BedroomNone] = 'slept without a proper room recently' - ENUM[77] = :BedroomBad5 ; NUME[:BedroomBad5] = 77 ; Value[:BedroomBad5] = '-20' ; Caption[:BedroomBad5] = 'slept in a horribly substandard bedroom recently' - ENUM[78] = :BedroomBad4 ; NUME[:BedroomBad4] = 78 ; Value[:BedroomBad4] = '-10' ; Caption[:BedroomBad4] = 'slept in a horrible bedroom recently' - ENUM[79] = :BedroomBad3 ; NUME[:BedroomBad3] = 79 ; Value[:BedroomBad3] = '-5' ; Caption[:BedroomBad3] = 'slept in an awful bedroom recently' - ENUM[80] = :BedroomBad2 ; NUME[:BedroomBad2] = 80 ; Value[:BedroomBad2] = '-3' ; Caption[:BedroomBad2] = 'slept in a very poor bedroom recently' - ENUM[81] = :BedroomBad1 ; NUME[:BedroomBad1] = 81 ; Value[:BedroomBad1] = '-2' ; Caption[:BedroomBad1] = 'slept in a poor bedroom recently' - ENUM[82] = :OfficeBad5 ; NUME[:OfficeBad5] = 82 ; Value[:OfficeBad5] = '-30' ; Caption[:OfficeBad5] = 'conducted a meeting in a horribly substandard setting recently' - ENUM[83] = :OfficeBad4 ; NUME[:OfficeBad4] = 83 ; Value[:OfficeBad4] = '-20' ; Caption[:OfficeBad4] = 'conducted a meeting in a horrible setting recently' - ENUM[84] = :OfficeBad3 ; NUME[:OfficeBad3] = 84 ; Value[:OfficeBad3] = '-10' ; Caption[:OfficeBad3] = 'conducted a meeting in an awful setting recently' - ENUM[85] = :OfficeBad2 ; NUME[:OfficeBad2] = 85 ; Value[:OfficeBad2] = '-5' ; Caption[:OfficeBad2] = 'conducted a meeting in a very poor setting recently' - ENUM[86] = :OfficeBad1 ; NUME[:OfficeBad1] = 86 ; Value[:OfficeBad1] = '-3' ; Caption[:OfficeBad1] = 'conducted a meeting in a poor setting recently' - ENUM[87] = :DiningBad5 ; NUME[:DiningBad5] = 87 ; Value[:DiningBad5] = '-20' ; Caption[:DiningBad5] = 'dined in a horribly substandard dining room recently' - ENUM[88] = :DiningBad4 ; NUME[:DiningBad4] = 88 ; Value[:DiningBad4] = '-10' ; Caption[:DiningBad4] = 'dined in a horrible dining room recently' - ENUM[89] = :DiningBad3 ; NUME[:DiningBad3] = 89 ; Value[:DiningBad3] = '-5' ; Caption[:DiningBad3] = 'dined in an awful dining room recently' - ENUM[90] = :DiningBad2 ; NUME[:DiningBad2] = 90 ; Value[:DiningBad2] = '-3' ; Caption[:DiningBad2] = 'dined in a very poor dining room recently' - ENUM[91] = :DiningBad1 ; NUME[:DiningBad1] = 91 ; Value[:DiningBad1] = '-2' ; Caption[:DiningBad1] = 'dined in a poor dining room recently' - ENUM[92] = :DiningNone ; NUME[:DiningNone] = 92 ; Value[:DiningNone] = '-?' ; Caption[:DiningNone] = 'dined without a proper dining room recently' - ENUM[93] = :TombNone ; NUME[:TombNone] = 93 ; Value[:TombNone] = '-?' ; Caption[:TombNone] = 'worried greatly about not having a tomb after gaining another year' - ENUM[94] = :TombBad5 ; NUME[:TombBad5] = 94 ; Value[:TombBad5] = '-30' ; Caption[:TombBad5] = 'worried about having a horribly substandard tomb after gaining another year' - ENUM[95] = :TombBad4 ; NUME[:TombBad4] = 95 ; Value[:TombBad4] = '-20' ; Caption[:TombBad4] = 'worried about having a horrible tomb after gaining another year' - ENUM[96] = :TombBad3 ; NUME[:TombBad3] = 96 ; Value[:TombBad3] = '-10' ; Caption[:TombBad3] = 'worried about having an awful tomb after gaining another year' - ENUM[97] = :TombBad2 ; NUME[:TombBad2] = 97 ; Value[:TombBad2] = '-5' ; Caption[:TombBad2] = 'worried about having a very poor tomb after gaining another year' - ENUM[98] = :TombBad1 ; NUME[:TombBad1] = 98 ; Value[:TombBad1] = '-3' ; Caption[:TombBad1] = 'worried about having a poor tomb after gaining another year' - ENUM[99] = :DemandsAngry3 ; NUME[:DemandsAngry3] = 99 ; Value[:DemandsAngry3] = '-10' ; Caption[:DemandsAngry3] = 'was greatly angered at the state of demands recently' - ENUM[100] = :DemandsAngry2 ; NUME[:DemandsAngry2] = 100 ; Value[:DemandsAngry2] = '-5' ; Caption[:DemandsAngry2] = 'was very angered at the state of demands recently' - ENUM[101] = :DemandsAngry1 ; NUME[:DemandsAngry1] = 101 ; Value[:DemandsAngry1] = '-3' ; Caption[:DemandsAngry1] = 'was angered at the state of demands recently' - ENUM[102] = :MoreChests ; NUME[:MoreChests] = 102 ; Value[:MoreChests] = '-3' ; Caption[:MoreChests] = 'was upset by not having enough chests lately' - ENUM[103] = :MoreCabinets ; NUME[:MoreCabinets] = 103 ; Value[:MoreCabinets] = '-3' ; Caption[:MoreCabinets] = 'was upset by not having enough cabinets lately' - ENUM[104] = :MoreArmorStands ; NUME[:MoreArmorStands] = 104 ; Value[:MoreArmorStands] = '-3' ; Caption[:MoreArmorStands] = 'was upset by not having enough armor stands lately' - ENUM[105] = :MoreWeaponRacks ; NUME[:MoreWeaponRacks] = 105 ; Value[:MoreWeaponRacks] = '-3' ; Caption[:MoreWeaponRacks] = 'was upset by not having enough weapon racks lately' - ENUM[106] = :OldClothing ; NUME[:OldClothing] = 106 ; Value[:OldClothing] = '-3/-2' ; Caption[:OldClothing] = 'was upset to be wearing old clothing lately' - ENUM[107] = :TatteredClothing ; NUME[:TatteredClothing] = 107 ; Value[:TatteredClothing] = '-5/-3/-2' ; Caption[:TatteredClothing] = 'was upset to be wearing tattered clothing lately' - ENUM[108] = :RottedClothing ; NUME[:RottedClothing] = 108 ; Value[:RottedClothing] = '-10/-5/-3' ; Caption[:RottedClothing] = 'was very upset to have worn clothes rot away lately' - ENUM[109] = :Uncovered ; NUME[:Uncovered] = 109 ; Value[:Uncovered] = '-20/-10/-5' ; Caption[:Uncovered] = 'was very embarrassed to be uncovered lately' - ENUM[110] = :NoShirt ; NUME[:NoShirt] = 110 ; Value[:NoShirt] = '-10/-5/-3' ; Caption[:NoShirt] = 'was embarrassed to have no shirt lately' - ENUM[111] = :NoShoes ; NUME[:NoShoes] = 111 ; Value[:NoShoes] = '-10/-5/-3' ; Caption[:NoShoes] = 'was embarrassed to have no shoes lately' - ENUM[112] = :NoCloak ; NUME[:NoCloak] = 112 ; Value[:NoCloak] = '-20/-10/-5' ; Caption[:NoCloak] = 'was very embarrassed to be uncloaked lately' - ENUM[113] = :Rain ; NUME[:Rain] = 113 ; Value[:Rain] = '-3/-2' ; Caption[:Rain] = 'was caught in the rain recently' - ENUM[114] = :SnowStorm ; NUME[:SnowStorm] = 114 ; Value[:SnowStorm] = '-3/-2' ; Caption[:SnowStorm] = 'was caught in a snow storm recently' - ENUM[115] = :FreakishWeather ; NUME[:FreakishWeather] = 115 ; Value[:FreakishWeather] = '-?' ; Caption[:FreakishWeather] = 'was caught in freakish weather recently' - ENUM[116] = :RoomPretension ; NUME[:RoomPretension] = 116 ; Value[:RoomPretension] = '-4*x' ; Caption[:RoomPretension] = 'was (put off/flustered/upset/very upset/greatly upset/angered/enraged/shattered/traumatized/utterly traumatized) by a lessers pretentious (office/sleeping/dining/burial) arrangements lately' - ENUM[117] = :NoHammer ; NUME[:NoHammer] = 117 ; Value[:NoHammer] = '-50' ; Caption[:NoHammer] = 'was unable to find an available hammer lately' - ENUM[118] = :MandateIgnored ; NUME[:MandateIgnored] = 118 ; Value[:MandateIgnored] = '-5' ; Caption[:MandateIgnored] = 'was upset by having a mandate ignored lately' - ENUM[119] = :MandateDeadlineMissed ; NUME[:MandateDeadlineMissed] = 119 ; Value[:MandateDeadlineMissed] = '-3' ; Caption[:MandateDeadlineMissed] = 'was upset by having a mandate deadline missed lately' - ENUM[120] = :RequestIgnored ; NUME[:RequestIgnored] = 120 ; Value[:RequestIgnored] = '-5' ; Caption[:RequestIgnored] = 'was upset by having a request ignored lately' - ENUM[121] = :NoPunishment ; NUME[:NoPunishment] = 121 ; Value[:NoPunishment] = '-10' ; Caption[:NoPunishment] = 'was angered that nobody could be punished for a recent failure' - ENUM[122] = :ImproperPunishment ; NUME[:ImproperPunishment] = 122 ; Value[:ImproperPunishment] = '-5' ; Caption[:ImproperPunishment] = 'was upset that a criminal could not be properly punished' - ENUM[123] = :DelayedPunishment ; NUME[:DelayedPunishment] = 123 ; Value[:DelayedPunishment] = '-5' ; Caption[:DelayedPunishment] = 'was upset by the delayed punishment of a criminal' - ENUM[124] = :GotBeaten ; NUME[:GotBeaten] = 124 ; Value[:GotBeaten] = '-10/-5/-3/-2' ; Caption[:GotBeaten] = 'was beaten recently' - ENUM[125] = :GotHammered ; NUME[:GotHammered] = 125 ; Value[:GotHammered] = '-20/-10/-5/-3' ; Caption[:GotHammered] = 'was beaten with a hammer recently' - ENUM[126] = :Jailed ; NUME[:Jailed] = 126 ; Value[:Jailed] = '-10' ; Caption[:Jailed] = 'is depressed about being confined' - ENUM[127] = :LackWork ; NUME[:LackWork] = 127 ; Value[:LackWork] = '-10' ; Caption[:LackWork] = 'was unhappy with the lack of work last season' - ENUM[128] = :Nightmare ; NUME[:Nightmare] = 128 ; Value[:Nightmare] = '-20' ; Caption[:Nightmare] = 'had a terrifying nightmare about an army of the dead' - ENUM[129] = :AdmireBuilding ; NUME[:AdmireBuilding] = 129 ; Value[:AdmireBuilding] = '+x' ; Caption[:AdmireBuilding] = 'admired a (fine/very fine/splendid/wonderful/completely sublime) (building) lately' - ENUM[130] = :AdmireOwnBuilding ; NUME[:AdmireOwnBuilding] = 130 ; Value[:AdmireOwnBuilding] = '+2x' ; Caption[:AdmireOwnBuilding] = 'admired own (fine/very fine/splendid/wonderful/completely sublime) (building) lately' - ENUM[131] = :AdmireArrangedBuilding ; NUME[:AdmireArrangedBuilding] = 131 ; Value[:AdmireArrangedBuilding] = '+2x' ; Caption[:AdmireArrangedBuilding] = 'admired a (fine/very fine/splendid/wonderful/completely sublime) tastefully arranged (building) lately' - ENUM[132] = :AdmireOwnArrangedBuilding ; NUME[:AdmireOwnArrangedBuilding] = 132 ; Value[:AdmireOwnArrangedBuilding] = '+4x' ; Caption[:AdmireOwnArrangedBuilding] = 'admired own (fine/very fine/splendid/wonderful/completely sublime) tastefully arranged (building) lately' - ENUM[133] = :ComfortedCage ; NUME[:ComfortedCage] = 133 ; Value[:ComfortedCage] = '+3' ; Caption[:ComfortedCage] = 'was comforted by a wonderful creature in a cage recently' - ENUM[134] = :ComfortedPond ; NUME[:ComfortedPond] = 134 ; Value[:ComfortedPond] = '+3' ; Caption[:ComfortedPond] = 'was comforted by a wonderful creature in a pond recently' - ENUM[135] = :RequestApproved ; NUME[:RequestApproved] = 135 ; Value[:RequestApproved] = '+5' ; Caption[:RequestApproved] = 'was pleased by having a request approved lately' - ENUM[136] = :PunishmentReduced ; NUME[:PunishmentReduced] = 136 ; Value[:PunishmentReduced] = '+20' ; Caption[:PunishmentReduced] = 'was glad to have punishment reduced recently' - ENUM[137] = :PunishmentDelayed ; NUME[:PunishmentDelayed] = 137 ; Value[:PunishmentDelayed] = '+20' ; Caption[:PunishmentDelayed] = 'was glad to have punishment delayed recently' - ENUM[138] = :GaveBeating ; NUME[:GaveBeating] = 138 ; Value[:GaveBeating] = '+5' ; Caption[:GaveBeating] = 'beat somebody recently' - ENUM[139] = :GaveHammering ; NUME[:GaveHammering] = 139 ; Value[:GaveHammering] = '+5' ; Caption[:GaveHammering] = 'beat somebody with a hammer recently' - ENUM[140] = :SatisfiedAtWork ; NUME[:SatisfiedAtWork] = 140 ; Value[:SatisfiedAtWork] = '+5' ; Caption[:SatisfiedAtWork] = 'has been satisfied at work lately' - ENUM[141] = :PleasedNoble ; NUME[:PleasedNoble] = 141 ; Value[:PleasedNoble] = '+10' ; Caption[:PleasedNoble] = 'was happy to have pleased a noble lately' - ENUM[142] = :MadeArtifact ; NUME[:MadeArtifact] = 142 ; Value[:MadeArtifact] = '+1000' ; Caption[:MadeArtifact] = 'is quite pleased with making an artifact' - ENUM[143] = :AcquiredItem ; NUME[:AcquiredItem] = 143 ; Value[:AcquiredItem] = '+10' ; Caption[:AcquiredItem] = 'made a satisfying acquisition lately' - ENUM[144] = :AdoptedPet ; NUME[:AdoptedPet] = 144 ; Value[:AdoptedPet] = '+10' ; Caption[:AdoptedPet] = 'adopted a new pet recently' - ENUM[145] = :JoyInSlaughter ; NUME[:JoyInSlaughter] = 145 ; Value[:JoyInSlaughter] = '+10' ; Caption[:JoyInSlaughter] = 'took joy in slaughter lately' - ENUM[146] = :GoodFood1 ; NUME[:GoodFood1] = 146 ; Value[:GoodFood1] = '+2' ; Caption[:GoodFood1] = 'ate a pretty decent meal lately' - ENUM[147] = :GoodFood2 ; NUME[:GoodFood2] = 147 ; Value[:GoodFood2] = '+3' ; Caption[:GoodFood2] = 'ate a fine dish lately' - ENUM[148] = :GoodFood3 ; NUME[:GoodFood3] = 148 ; Value[:GoodFood3] = '+5' ; Caption[:GoodFood3] = 'ate a wonderful dish lately' - ENUM[149] = :GoodFood4 ; NUME[:GoodFood4] = 149 ; Value[:GoodFood4] = '+10' ; Caption[:GoodFood4] = 'ate a truly decadent dish lately' - ENUM[150] = :GoodFood5 ; NUME[:GoodFood5] = 150 ; Value[:GoodFood5] = '+20' ; Caption[:GoodFood5] = 'ate a legendary meal lately' - ENUM[151] = :GoodDrink1 ; NUME[:GoodDrink1] = 151 ; Value[:GoodDrink1] = '+2' ; Caption[:GoodDrink1] = 'had a pretty decent drink lately' - ENUM[152] = :GoodDrink2 ; NUME[:GoodDrink2] = 152 ; Value[:GoodDrink2] = '+3' ; Caption[:GoodDrink2] = 'had a fine drink lately' - ENUM[153] = :GoodDrink3 ; NUME[:GoodDrink3] = 153 ; Value[:GoodDrink3] = '+5' ; Caption[:GoodDrink3] = 'had a wonderful drink lately' - ENUM[154] = :GoodDrink4 ; NUME[:GoodDrink4] = 154 ; Value[:GoodDrink4] = '+10' ; Caption[:GoodDrink4] = 'had a truly decadent drink lately' - ENUM[155] = :GoodDrink5 ; NUME[:GoodDrink5] = 155 ; Value[:GoodDrink5] = '+20' ; Caption[:GoodDrink5] = 'had a legendary drink lately' - ENUM[156] = :ComfortedPet ; NUME[:ComfortedPet] = 156 ; Value[:ComfortedPet] = '+5' ; Caption[:ComfortedPet] = 'was comforted by a pet lately' - ENUM[157] = :ComfortedCreature ; NUME[:ComfortedCreature] = 157 ; Value[:ComfortedCreature] = '+5' ; Caption[:ComfortedCreature] = 'saw a beloved creature lately' - ENUM[158] = :MandateDeadlineMet ; NUME[:MandateDeadlineMet] = 158 ; Value[:MandateDeadlineMet] = '+10' ; Caption[:MandateDeadlineMet] = 'was pleased to have a mandate deadline met lately' - ENUM[159] = :Talked ; NUME[:Talked] = 159 ; Value[:Talked] = '+2' ; Caption[:Talked] = 'talked with (somebody/a pet/a spouse/...) lately' - ENUM[160] = :MadeFriend ; NUME[:MadeFriend] = 160 ; Value[:MadeFriend] = '+5' ; Caption[:MadeFriend] = 'made a friend recently' - ENUM[161] = :TaxCollectionSmooth ; NUME[:TaxCollectionSmooth] = 161 ; Value[:TaxCollectionSmooth] = '+10' ; Caption[:TaxCollectionSmooth] = 'was pleased that the tax collection went smoothly lately' - ENUM[162] = :Waterfall ; NUME[:Waterfall] = 162 ; Value[:Waterfall] = '+5' ; Caption[:Waterfall] = 'was comforted by a lovely waterfall lately' - ENUM[163] = :OfficeGood5 ; NUME[:OfficeGood5] = 163 ; Value[:OfficeGood5] = '+30' ; Caption[:OfficeGood5] = 'conducted a meeting in a setting worthy of legends recently' - ENUM[164] = :OfficeGood4 ; NUME[:OfficeGood4] = 164 ; Value[:OfficeGood4] = '+20' ; Caption[:OfficeGood4] = 'conducted a meeting in a fantastic setting recently' - ENUM[165] = :OfficeGood3 ; NUME[:OfficeGood3] = 165 ; Value[:OfficeGood3] = '+10' ; Caption[:OfficeGood3] = 'conducted a meeting in a great setting recently' - ENUM[166] = :OfficeGood2 ; NUME[:OfficeGood2] = 166 ; Value[:OfficeGood2] = '+5' ; Caption[:OfficeGood2] = 'conducted a meeting in a very good setting recently' - ENUM[167] = :OfficeGood1 ; NUME[:OfficeGood1] = 167 ; Value[:OfficeGood1] = '+3' ; Caption[:OfficeGood1] = 'conducted a meeting in a good setting recently' - ENUM[168] = :DiningGood5 ; NUME[:DiningGood5] = 168 ; Value[:DiningGood5] = '+20' ; Caption[:DiningGood5] = 'dined in a legendary dining room recently' - ENUM[169] = :DiningGood4 ; NUME[:DiningGood4] = 169 ; Value[:DiningGood4] = '+10' ; Caption[:DiningGood4] = 'dined in a fantastic dining room recently' - ENUM[170] = :DiningGood3 ; NUME[:DiningGood3] = 170 ; Value[:DiningGood3] = '+5' ; Caption[:DiningGood3] = 'dined in a great dining room recently' - ENUM[171] = :DiningGood2 ; NUME[:DiningGood2] = 171 ; Value[:DiningGood2] = '+3' ; Caption[:DiningGood2] = 'dined in a very good dining room recently' - ENUM[172] = :DiningGood1 ; NUME[:DiningGood1] = 172 ; Value[:DiningGood1] = '+2' ; Caption[:DiningGood1] = 'dined in a good dining room recently' - ENUM[173] = :BedroomGood5 ; NUME[:BedroomGood5] = 173 ; Value[:BedroomGood5] = '+20' ; Caption[:BedroomGood5] = 'slept in a bedroom like a personal palace recently' - ENUM[174] = :BedroomGood4 ; NUME[:BedroomGood4] = 174 ; Value[:BedroomGood4] = '+10' ; Caption[:BedroomGood4] = 'slept in a fantastic bedroom recently' - ENUM[175] = :BedroomGood3 ; NUME[:BedroomGood3] = 175 ; Value[:BedroomGood3] = '+5' ; Caption[:BedroomGood3] = 'slept in a great bedroom recently' - ENUM[176] = :BedroomGood2 ; NUME[:BedroomGood2] = 176 ; Value[:BedroomGood2] = '+3' ; Caption[:BedroomGood2] = 'slept in a very good bedroom recently' - ENUM[177] = :BedroomGood1 ; NUME[:BedroomGood1] = 177 ; Value[:BedroomGood1] = '+2' ; Caption[:BedroomGood1] = 'slept in a good bedroom recently' - ENUM[178] = :DemandsPleased3 ; NUME[:DemandsPleased3] = 178 ; Value[:DemandsPleased3] = '+10' ; Caption[:DemandsPleased3] = 'was greatly pleased at the state of demands recently' - ENUM[179] = :DemandsPleased2 ; NUME[:DemandsPleased2] = 179 ; Value[:DemandsPleased2] = '+5' ; Caption[:DemandsPleased2] = 'was very pleased at the state of demands recently' - ENUM[180] = :DemandsPleased1 ; NUME[:DemandsPleased1] = 180 ; Value[:DemandsPleased1] = '+3' ; Caption[:DemandsPleased1] = 'was pleased at the state of demands recently' - ENUM[181] = :TombGood5 ; NUME[:TombGood5] = 181 ; Value[:TombGood5] = '+30' ; Caption[:TombGood5] = 'celebrated having a legendary tomb after gaining another year' - ENUM[182] = :TombGood4 ; NUME[:TombGood4] = 182 ; Value[:TombGood4] = '+20' ; Caption[:TombGood4] = 'celebrated having a fantastic tomb after gaining another year' - ENUM[183] = :TombGood3 ; NUME[:TombGood3] = 183 ; Value[:TombGood3] = '+10' ; Caption[:TombGood3] = 'celebrated having a great tomb after gaining another year' - ENUM[184] = :TombGood2 ; NUME[:TombGood2] = 184 ; Value[:TombGood2] = '+5' ; Caption[:TombGood2] = 'celebrated having a very good tomb after gaining another year' - ENUM[185] = :TombGood1 ; NUME[:TombGood1] = 185 ; Value[:TombGood1] = '+3' ; Caption[:TombGood1] = 'celebrated having a good tomb after gaining another year' - ENUM[186] = :FistFight ; NUME[:FistFight] = 186 ; Value[:FistFight] = '+20' ; Caption[:FistFight] = 'enjoyed starting a fist fight recently' - ENUM[187] = :SmashedBuilding ; NUME[:SmashedBuilding] = 187 ; Value[:SmashedBuilding] = '+20' ; Caption[:SmashedBuilding] = 'enjoyed smashing up a building recently' - ENUM[188] = :ToppledStuff ; NUME[:ToppledStuff] = 188 ; Value[:ToppledStuff] = '+10' ; Caption[:ToppledStuff] = 'enjoyed toppling something over recently' - ENUM[189] = :ThrownStuff ; NUME[:ThrownStuff] = 189 ; Value[:ThrownStuff] = '+5' ; Caption[:ThrownStuff] = 'enjoyed throwing something recently' - ENUM[190] = :Spar ; NUME[:Spar] = 190 ; Value[:Spar] = '+10' ; Caption[:Spar] = 'had a satisfying sparring session recently' - ENUM[191] = :Free ; NUME[:Free] = 191 ; Value[:Free] = '+1000' ; Caption[:Free] = 'is happy to be free' - ENUM[192] = :SunNausea ; NUME[:SunNausea] = 192 ; Value[:SunNausea] = '-20' ; Caption[:SunNausea] = 'was nauseated by the sun lately' - ENUM[193] = :SunIrritated ; NUME[:SunIrritated] = 193 ; Value[:SunIrritated] = '-10' ; Caption[:SunIrritated] = 'was irritated by the sun lately' - ENUM[194] = :Rest ; NUME[:Rest] = 194 ; Value[:Rest] = '+10' ; Caption[:Rest] = 'was able to rest and recuperate lately' - ENUM[195] = :ReceivedWater ; NUME[:ReceivedWater] = 195 ; Value[:ReceivedWater] = '+10' ; Caption[:ReceivedWater] = 'received water recently' - ENUM[196] = :ReceivedFood ; NUME[:ReceivedFood] = 196 ; Value[:ReceivedFood] = '+10' ; Caption[:ReceivedFood] = 'received food recently' - ENUM[197] = :Rescued ; NUME[:Rescued] = 197 ; Value[:Rescued] = '+10' ; Caption[:Rescued] = 'was rescued recently' - ENUM[198] = :UnableComplain ; NUME[:UnableComplain] = 198 ; Value[:UnableComplain] = '-10' ; Caption[:UnableComplain] = 'was unable to find somebody to complain to about job scarcity lately' - ENUM[199] = :ReceivedComplaint ; NUME[:ReceivedComplaint] = 199 ; Value[:ReceivedComplaint] = '-6/-4/-3/-2' ; Caption[:ReceivedComplaint] = 'was yelled at by an unhappy citizen lately' - ENUM[200] = :Complained ; NUME[:Complained] = 200 ; Value[:Complained] = '+10' ; Caption[:Complained] = 'was satisfied to bring up job scarcity in a meeting lately' - ENUM[201] = :ElectedMayor ; NUME[:ElectedMayor] = 201 ; Value[:ElectedMayor] = '+30' ; Caption[:ElectedMayor] = 'was very happy to be elected mayor recently' - ENUM[202] = :ReelectedMayor ; NUME[:ReelectedMayor] = 202 ; Value[:ReelectedMayor] = '+30' ; Caption[:ReelectedMayor] = 'was very happy to be re-elected mayor recently' - ENUM[203] = :BecomeExpeditionLeader ; NUME[:BecomeExpeditionLeader] = 203 ; Value[:BecomeExpeditionLeader] = '+30' ; Caption[:BecomeExpeditionLeader] = 'was very satisfied to be chosen as the expedition leader recently' - ENUM[204] = :NoblePromotion ; NUME[:NoblePromotion] = 204 ; Value[:NoblePromotion] = '+30' ; Caption[:NoblePromotion] = 'was very pleased to receive a higher rank of nobility recently' - ENUM[205] = :BecomeNoble ; NUME[:BecomeNoble] = 205 ; Value[:BecomeNoble] = '+50' ; Caption[:BecomeNoble] = 'was greatly pleased to enter the nobility recently' - ENUM[206] = :BecomeMayor ; NUME[:BecomeMayor] = 206 ; Value[:BecomeMayor] = '+30' ; Caption[:BecomeMayor] = 'was proud to have become a mayor recently' - ENUM[207] = :GaveWater ; NUME[:GaveWater] = 207 ; Value[:GaveWater] = '+20/+10/+5/+3/0/-3/-5/-10/-20' ; Caption[:GaveWater] = 'was (overjoyed to be/happy to have been/pleased to have been) able to give somebody water lately' - ENUM[208] = :GaveFood ; NUME[:GaveFood] = 208 ; Value[:GaveFood] = '+20/+10/+5/+3/0/-3/-5/-10/-20' ; Caption[:GaveFood] = 'was (overjoyed to be/happy to have been/pleased to have been) able to give somebody food lately' - ENUM[209] = :RescuedOther ; NUME[:RescuedOther] = 209 ; Value[:RescuedOther] = '+20/+10/+5/+3/0/-3/-5/-10/-20' ; Caption[:RescuedOther] = 'was (overjoyed to be/happy to have been/pleased to have been) able to help somebody to bed lately' - ENUM[210] = :GaveBirth ; NUME[:GaveBirth] = 210 ; Value[:GaveBirth] = '+1000' ; Caption[:GaveBirth] = 'gave birth to (children) recently' - ENUM[211] = :Family ; NUME[:Family] = 211 ; Value[:Family] = '+250' ; Caption[:Family] = 'got (married/new romance/new sibling) recently' - ENUM[212] = :FormedGrudge ; NUME[:FormedGrudge] = 212 ; Value[:FormedGrudge] = '-5' ; Caption[:FormedGrudge] = 'formed a grudge recently' - ENUM[213] = :LostLover ; NUME[:LostLover] = 213 ; Value[:LostLover] = '-50/-30/-20/-10' ; Caption[:LostLover] = 'has lost a lover to tragedy recently' - ENUM[214] = :LostGrudge ; NUME[:LostGrudge] = 214 ; Value[:LostGrudge] = '-10/-5/-3/-2' ; Caption[:LostGrudge] = '(has lost/was just a little happy to lose/was happy to lose/was thrilled to lose) an annoying acquaintance to tragedy recently' - ENUM[215] = :SameFood ; NUME[:SameFood] = 215 ; Value[:SameFood] = '-5' ; Caption[:SameFood] = 'has been tired of eating the same old food lately' - ENUM[216] = :SameBooze ; NUME[:SameBooze] = 216 ; Value[:SameBooze] = '-5' ; Caption[:SameBooze] = 'has been tired of drinking the same old booze lately' - ENUM[217] = :TalkToNoble ; NUME[:TalkToNoble] = 217 ; Value[:TalkToNoble] = '-5/-3/-2/+5/+10/+20' ; Caption[:TalkToNoble] = 'was (disgusted/upset/irritated) to be forced to talk to a pillar of society recently' - ENUM[218] = :SoapyBath ; NUME[:SoapyBath] = 218 ; Value[:SoapyBath] = '+10' ; Caption[:SoapyBath] = 'had a wonderful soapy bath recently' - ENUM[219] = :Bath ; NUME[:Bath] = 219 ; Value[:Bath] = '+3' ; Caption[:Bath] = 'had a nice bath recently' - ENUM[220] = :GhostHaunt ; NUME[:GhostHaunt] = 220 ; Value[:GhostHaunt] = '-20/-50/-100/-200' ; Caption[:GhostHaunt] = 'has been (haunted/tormented/possessed/tortured) by the (dead/dead pet/...) lately' - ENUM[221] = :GhostNightmare ; NUME[:GhostNightmare] = 221 ; Value[:GhostNightmare] = '-20/-50/-100/-200' ; Caption[:GhostNightmare] = 'has been tormented in nightmares by the (dead/dead pet/...) lately' - ENUM[222] = :Conviction ; NUME[:Conviction] = 222 ; Value[:Conviction] = '-?' ; Caption[:Conviction] = 'was outraged at the ridiculous conviction of X recently/was pleased to have received justice recently' - ENUM[223] = :LostTrainingAnimal ; NUME[:LostTrainingAnimal] = 223 ; Value[:LostTrainingAnimal] = '-?' ; Caption[:LostTrainingAnimal] = 'has lost an animal training partner to tragedy recently' - ENUM[224] = :BondTrainingAnimal ; NUME[:BondTrainingAnimal] = 224 ; Value[:BondTrainingAnimal] = '+?' ; Caption[:BondTrainingAnimal] = 'formed a bond with an animal training partner recently' -end - -class UnitsOtherId < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :ANY_RIDER ; NUME[:ANY_RIDER] = 0 - ENUM[1] = :ANY_ANIMAL ; NUME[:ANY_ANIMAL] = 1 - ENUM[2] = :ANY_BABY2 ; NUME[:ANY_BABY2] = 2 -end - -class WeaponFlags < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :CAN_STONE ; NUME[:CAN_STONE] = 0 - ENUM[1] = :HAS_EDGE_ATTACK ; NUME[:HAS_EDGE_ATTACK] = 1 - ENUM[2] = :TRAINING ; NUME[:TRAINING] = 2 -end - -class WeatherType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :None ; NUME[:None] = 0 - ENUM[1] = :Rain ; NUME[:Rain] = 1 - ENUM[2] = :Snow ; NUME[:Snow] = 2 -end - -class WorkshopType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :Carpenters ; NUME[:Carpenters] = 0 - ENUM[1] = :Farmers ; NUME[:Farmers] = 1 - ENUM[2] = :Masons ; NUME[:Masons] = 2 - ENUM[3] = :Craftsdwarfs ; NUME[:Craftsdwarfs] = 3 - ENUM[4] = :Jewelers ; NUME[:Jewelers] = 4 - ENUM[5] = :MetalsmithsForge ; NUME[:MetalsmithsForge] = 5 - ENUM[6] = :MagmaForge ; NUME[:MagmaForge] = 6 - ENUM[7] = :Bowyers ; NUME[:Bowyers] = 7 - ENUM[8] = :Mechanics ; NUME[:Mechanics] = 8 - ENUM[9] = :Siege ; NUME[:Siege] = 9 - ENUM[10] = :Butchers ; NUME[:Butchers] = 10 - ENUM[11] = :Leatherworks ; NUME[:Leatherworks] = 11 - ENUM[12] = :Tanners ; NUME[:Tanners] = 12 - ENUM[13] = :Clothiers ; NUME[:Clothiers] = 13 - ENUM[14] = :Fishery ; NUME[:Fishery] = 14 - ENUM[15] = :Still ; NUME[:Still] = 15 - ENUM[16] = :Loom ; NUME[:Loom] = 16 - ENUM[17] = :Quern ; NUME[:Quern] = 17 - ENUM[18] = :Kennels ; NUME[:Kennels] = 18 - ENUM[19] = :Kitchen ; NUME[:Kitchen] = 19 - ENUM[20] = :Ashery ; NUME[:Ashery] = 20 - ENUM[21] = :Dyers ; NUME[:Dyers] = 21 - ENUM[22] = :Millstone ; NUME[:Millstone] = 22 - ENUM[23] = :Custom ; NUME[:Custom] = 23 - ENUM[24] = :Tool ; NUME[:Tool] = 24 -end - -class WorldConstructionType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :ROAD ; NUME[:ROAD] = 0 - ENUM[1] = :TUNNEL ; NUME[:TUNNEL] = 1 - ENUM[2] = :BRIDGE ; NUME[:BRIDGE] = 2 - ENUM[3] = :WALL ; NUME[:WALL] = 3 -end - -class WorldPopulationType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :Animal ; NUME[:Animal] = 0 - ENUM[1] = :Vermin ; NUME[:Vermin] = 1 - ENUM[2] = :Unk2 ; NUME[:Unk2] = 2 - ENUM[3] = :VerminInnumerable ; NUME[:VerminInnumerable] = 3 - ENUM[4] = :ColonyInsect ; NUME[:ColonyInsect] = 4 - ENUM[5] = :Tree ; NUME[:Tree] = 5 - ENUM[6] = :Grass ; NUME[:Grass] = 6 - ENUM[7] = :Bush ; NUME[:Bush] = 7 -end - -class WorldgenRangeType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :ELEVATION ; NUME[:ELEVATION] = 0 - ENUM[1] = :RAINFALL ; NUME[:RAINFALL] = 1 - ENUM[3] = :TEMPERATURE ; NUME[:TEMPERATURE] = 3 - ENUM[5] = :DRAINAGE ; NUME[:DRAINAGE] = 5 - ENUM[6] = :VOLCANISM ; NUME[:VOLCANISM] = 6 - ENUM[7] = :SAVAGERY ; NUME[:SAVAGERY] = 7 -end - -class WorldgenRegionType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :SWAMP ; NUME[:SWAMP] = 0 - ENUM[1] = :DESERT ; NUME[:DESERT] = 1 - ENUM[2] = :FOREST ; NUME[:FOREST] = 2 - ENUM[3] = :MOUNTAINS ; NUME[:MOUNTAINS] = 3 - ENUM[4] = :OCEAN ; NUME[:OCEAN] = 4 - ENUM[5] = :LAKE ; NUME[:LAKE] = 5 - ENUM[6] = :GLACIER ; NUME[:GLACIER] = 6 - ENUM[7] = :TUNDRA ; NUME[:TUNDRA] = 7 - ENUM[8] = :GRASSLAND ; NUME[:GRASSLAND] = 8 - ENUM[9] = :HILLS ; NUME[:HILLS] = 9 -end - -class ActivityEntry < MemHack::Compound - sizeof 24 - - field(:id, 0) { - number 32, true - } - field(:is_individual, 4) { - number 16, true - } - field(:events, 8) { - stl_vector(4) { - pointer { - global :ActivityEvent - } - } - } - field(:unk2, 20) { - number 32, true - } -end - -class ActivityEvent < MemHack::Compound - sizeof 76 - - rtti_classname :activity_eventst - - field(:event_id, 4) { - number 32, true - } - field(:activity_id, 8) { - number 32, true - } - def activity_tg ; df.world.activities.all[activity_id] ; end - field(:subevent_id, 12) { - number 32, true - } - field(:num_subevents, 16) { - number 32, true - } - field(:hist_figure_ids, 20) { - stl_vector(4) { - number 32, true - } - } - def hist_figure_tgs ; hist_figure_ids.map { |i| df.world.history.figures[i] } ; end - field(:participant_ids, 32) { - stl_vector(4) { - number 32, true - } - } - def participant_tgs ; participant_ids.map { |i| df.world.units.all[i] } ; end - field(:hist_figure_ids2, 44) { - stl_vector(4) { - number 32, true - } - } - def hist_figure_tgs2 ; hist_figure_ids2.map { |i| df.world.history.figures[i] } ; end - field(:participant_ids2, 56) { - stl_vector(4) { - number 32, true - } - } - def participant_tgs2 ; participant_ids2.map { |i| df.world.units.all[i] } ; end - field(:activity_id2, 68) { - number 32, true - } - def activity_tg2 ; df.world.activities.all[activity_id2] ; end - field(:event_id2, 72) { - number 32, true - } - def getType() - ActivityEventType.sym(DFHack.vmethod_call(self, 0)) - end - def write_file(arg0) - DFHack.vmethod_call(self, 4, arg0) ; nil - end - def read_file(arg0, loadversion) - DFHack.vmethod_call(self, 8, arg0, loadversion) ; nil - end - def getHistFigVector() - ptr = DFHack.vmethod_call(self, 32) - class << self - stl_vector(4) { - number 32, true - } - end._at(ptr) if ptr != 0 - end - def setSkillDemoUnk5(unk5) - DFHack.vmethod_call(self, 60, unk5) ; nil - end - def setSkillDemoUnk789(unk7, unk8, unk9) - DFHack.vmethod_call(self, 64, unk7, unk8, unk9) ; nil - end - def adjustUnkA(amount) - DFHack.vmethod_call(self, 68, amount) ; nil - end - def getOrganizer(hist_figure_id, unit_id) - DFHack.vmethod_call(self, 72, hist_figure_id, unit_id) ; nil - end - def getBuilding() - ptr = DFHack.vmethod_call(self, 76) - class << self - number 32, true - end._at(ptr) if ptr != 0 - end - def getName(arg0, str) - DFHack.vmethod_call(self, 88, arg0, str) ; nil - end -end - -class ActivityEventCombatTrainingst < ActivityEvent - sizeof 92 - - rtti_classname :activity_event_combat_trainingst - - field(:building_id, 76) { - number 32, true - } - def building_tg ; df.world.buildings.all[building_id] ; end - field(:hist_figure_id, 80) { - number 32, true - } - def hist_figure_tg ; df.world.history.figures[hist_figure_id] ; end - field(:unit_id, 84) { - number 32, true - } - def unit_tg ; df.world.units.all[unit_id] ; end - field(:unk5, 88) { - number 32, true - } -end - -class ActivityEventIndividualSkillDrillst < ActivityEvent - sizeof 84 - - rtti_classname :activity_event_individual_skill_drillst - - field(:building_id, 76) { - number 32, true - } - def building_tg ; df.world.buildings.all[building_id] ; end - field(:unk5, 80) { - number 32, true - } -end - -class ActivityEventRangedPracticest < ActivityEvent - sizeof 84 - - rtti_classname :activity_event_ranged_practicest - - field(:anon_1, 76) { - number 32, true - } - field(:anon_2, 80) { - number 32, true - } -end - -class ActivityEventSkillDemonstrationst < ActivityEvent - sizeof 108 - - rtti_classname :activity_event_skill_demonstrationst - - field(:building_id, 76) { - number 32, true - } - def building_tg ; df.world.buildings.all[building_id] ; end - field(:hist_figure_id, 80) { - number 32, true - } - def hist_figure_tg ; df.world.history.figures[hist_figure_id] ; end - field(:unit_id, 84) { - number 32, true - } - def unit_tg ; df.world.units.all[unit_id] ; end - field(:unk5, 88) { - number 16, true - } - field(:unk6, 92) { - number 32, true - } - field(:unk7, 96) { - number 32, true - } - field(:unk8, 100) { - number 32, true - } - field(:unk9, 104) { - number 32, true - } -end - -class ActivityEventSparringst < ActivityEvent - sizeof 96 - - rtti_classname :activity_event_sparringst - - field(:anon_1, 76) { - number 32, true - } - field(:anon_2, 80) { - stl_vector - } - field(:anon_3, 92) { - number 32, true - } -end - -class ActivityEventTrainingSessionst < ActivityEvent - sizeof 76 - - rtti_classname :activity_event_training_sessionst - -end - -class ActivityInfo < MemHack::Compound - sizeof 28 - - field(:unk1, 0) { - number 32, true - } - field(:person1, 4) { - pointer { - global :Unit - } - } - field(:person2, 8) { - pointer { - global :Unit - } - } - field(:place, 12) { - pointer { - global :Building - } - } - field(:unk2, 16) { - number 16, true - } - field(:unk3, 18) { - number 8, false - } - field(:unk4, 20) { - number 16, true - } - field(:unk5, 24) { - number 32, true - } -end - -class AdvTask < MemHack::Compound - sizeof 48 - - rtti_classname :taskst - - field(:link, 4) { - pointer { - global :QuestListLink - } - } - field(:id, 8) { - number 32, true - } - field(:quest_giver_id, 12) { - number 32, true - } - def quest_giver_tg ; df.world.history.figures[quest_giver_id] ; end - field(:anon_1, 16) { - number 32, true - } - def anon_1_tg ; df.world.world_data.sites[anon_1] ; end - field(:anon_2, 20) { - number 32, true - } - field(:adventurer_id, 24) { - number 32, true - } - def adventurer_tg ; df.world.history.figures[adventurer_id] ; end - field(:anon_3, 28) { - number 32, true - } - field(:target_pos, 32) { - global :Coord2d - } - field(:giver_pos, 36) { - global :Coord2d - } - field(:anon_4, 40) { - number 32, true - } - field(:anon_5, 44) { - number 32, true - } -end - -class AdventureMovementOption < MemHack::Compound - sizeof 4 - - rtti_classname :adventure_movement_optionst - -end - -class AnnouncementFlags < MemHack::Compound - field(:_whole, 0) { - number 32, true - } - field(:DO_MEGA, 0) { bit 0 } - field(:PAUSE, 0) { bit 1 } - field(:RECENTER, 0) { bit 2 } - field(:A_DISPLAY, 0) { bit 3 } - field(:D_DISPLAY, 0) { bit 4 } - field(:UNIT_COMBAT_REPORT, 0) { bit 5 } - field(:UNIT_COMBAT_REPORT_ALL_ACTIVE, 0) { bit 6 } -end - -class Announcements < MemHack::Compound - sizeof 644 - - field(:flags, 0) { - static_array(161, 4, AnnouncementType) { - global :AnnouncementFlags - } - } -end - -class ArmorProperties < MemHack::Compound - sizeof 20 - - field(:flags, 0) { - df_flagarray(ArmorGeneralFlags) - } - field(:layer, 8) { - number 32, true - } - field(:layer_size, 12) { - number 16, true - } - field(:layer_permit, 14) { - number 16, true - } - field(:coverage, 16) { - number 16, true - } -end - -class ArtImage < MemHack::Compound - sizeof 132 - - field(:elements, 0) { - stl_vector(4) { - pointer { - global :ArtImageElement - } - } - } - field(:properties, 12) { - stl_vector(4) { - pointer { - global :ArtImageProperty - } - } - } - field(:event, 24) { - number 32, true - } - def event_tg ; df.world.history.events[event] ; end - field(:name, 28) { - global :LanguageName - } - field(:anon_1, 88) { - number 32, true - } - field(:mat_type, 92) { - number 16, true - } - field(:mat_index, 96) { - number 32, true - } - field(:quality, 100) { - number 16, true, nil, ItemQuality - } - field(:artist, 104) { - number 32, true - } - def artist_tg ; df.world.history.figures[artist] ; end - field(:site, 108) { - number 32, true - } - def site_tg ; df.world.world_data.sites[site] ; end - field(:anon_2, 112) { - pointer { - global :GeneralRef - } - } - field(:year, 116) { - number 32, true - } - field(:anon_3, 120) { - number 32, true - } - field(:id, 124) { - number 32, true - } - def id_tg ; df.world.art_images[id] ; end - field(:subid, 128) { - number 16, true - } -end - -class ArtImageCollection < MemHack::Compound - sizeof 2004 - - field(:id, 0) { - number 32, true - } - field(:images, 4) { - static_array(500, 4) { - pointer { - global :ArtImage - } - } - } -end - -class ArtImageElement < MemHack::Compound - sizeof 8 - - rtti_classname :art_image_elementst - - field(:count, 4) { - number 32, true - } - def write_file(arg0) - DFHack.vmethod_call(self, 0, arg0) ; nil - end - def read_file(arg0, loadversion) - DFHack.vmethod_call(self, 4, arg0, loadversion) ; nil - end - def getType() - ArtImageElementType.sym(DFHack.vmethod_call(self, 8)) - end - def setID(iD) - DFHack.vmethod_call(self, 12, iD) ; nil - end - def clone() - ptr = DFHack.vmethod_call(self, 24) - class << self - global :ArtImageElement - end._at(ptr) if ptr != 0 - end - def getSymbol(sym, arg1) - DFHack.vmethod_call(self, 28, sym, arg1) ; nil - end - def getName1(arg0, arg1, arg2) - DFHack.vmethod_call(self, 32, arg0, arg1, arg2) ; nil - end - def getName2(arg0, arg1) - DFHack.vmethod_call(self, 36, arg0, arg1) ; nil - end -end - -class ArtImageElementCreaturest < ArtImageElement - sizeof 20 - - rtti_classname :art_image_element_creaturest - - field(:race, 8) { - number 32, true - } - def race_tg ; df.world.raws.creatures.all[race] ; end - field(:caste, 12) { - number 16, true - } - field(:histfig, 16) { - number 32, true - } - def histfig_tg ; df.world.history.figures[histfig] ; end -end - -class ArtImageElementItemst < ArtImageElement - sizeof 24 - - rtti_classname :art_image_element_itemst - - field(:item_type, 8) { - number 16, true, nil, ItemType - } - field(:item_subtype, 10) { - number 16, true - } - field(:mat_type, 12) { - number 16, true - } - field(:mat_index, 14) { - number 16, true - } - field(:flags, 16) { - global :ItemFlags - } - field(:item_id, 20) { - number 32, true - } - def item_tg ; df.world.items.all[item_id] ; end -end - -class ArtImageElementPlantst < ArtImageElement - sizeof 12 - - rtti_classname :art_image_element_plantst - - field(:plant_id, 8) { - number 32, true - } - def plant_tg ; df.world.raws.plants.all[plant_id] ; end -end - -class ArtImageElementShapest < ArtImageElement - sizeof 16 - - rtti_classname :art_image_element_shapest - - field(:shape_id, 8) { - number 32, true - } - def shape_tg ; df.world.raws.language.shapes[shape_id] ; end - field(:anon_1, 12) { - number 16, true - } -end - -class ArtImageElementTreest < ArtImageElement - sizeof 12 - - rtti_classname :art_image_element_treest - - field(:plant_id, 8) { - number 32, true - } - def plant_tg ; df.world.raws.plants.all[plant_id] ; end -end - -class ArtImageProperty < MemHack::Compound - sizeof 12 - - rtti_classname :art_image_propertyst - - field(:flags, 4) { - df_flagarray - } - def write_file(arg0) - DFHack.vmethod_call(self, 0, arg0) ; nil - end - def read_file(arg0, loadversion) - DFHack.vmethod_call(self, 4, arg0, loadversion) ; nil - end - def getType() - ArtImagePropertyType.sym(DFHack.vmethod_call(self, 8)) - end - def clone() - ptr = DFHack.vmethod_call(self, 20) - class << self - global :ArtImageElement - end._at(ptr) if ptr != 0 - end - def getName(arg0, arg1, arg2) - DFHack.vmethod_call(self, 24, arg0, arg1, arg2) ; nil - end -end - -class ArtImagePropertyIntransitiveVerbst < ArtImageProperty - sizeof 20 - - rtti_classname :art_image_property_intransitive_verbst - - field(:anon_1, 12) { - number 32, true - } - field(:verb, 16) { - number 16, true, nil, ArtImagePropertyVerb - } -end - -class ArtImagePropertyTransitiveVerbst < ArtImageProperty - sizeof 24 - - rtti_classname :art_image_property_transitive_verbst - - field(:subject, 12) { - number 32, true - } - field(:object, 16) { - number 32, true - } - field(:verb, 20) { - number 16, true, nil, ArtImagePropertyVerb - } -end - -class ArtImageRef < MemHack::Compound - sizeof 16 - - field(:id, 0) { - number 32, true - } - def id_tg ; df.world.art_images[id] ; end - field(:subid, 4) { - number 16, true - } - field(:civ_id, 8) { - number 32, true - } - def civ_tg ; df.world.entities.all[civ_id] ; end - field(:site_id, 12) { - number 32, true - } - def site_tg ; df.world.world_data.sites[site_id] ; end -end - -class ArtifactRecord < MemHack::Compound - sizeof 88 - - field(:id, 0) { - number 32, true - } - field(:name, 4) { - global :LanguageName - } - field(:flags, 64) { - df_flagarray - } - field(:item, 72) { - pointer { - global :Item - } - } - field(:anon_1, 76) { - number 32, true - } - field(:anon_2, 80) { - number 32, true - } - field(:anon_3, 84) { - number 32, true - } -end - -class AssignTradeStatus < MemHack::Compound - sizeof 20 - - field(:item, 0) { - pointer { - global :Item - } - } - field(:distance, 4) { - number 32, true - } - field(:status, 8) { - class ::DFHack::AssignTradeStatus_TStatus < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[-2] = :RemoveTrading ; NUME[:RemoveTrading] = -2 - ENUM[-1] = :RemovePending ; NUME[:RemovePending] = -1 - ENUM[0] = :None ; NUME[:None] = 0 - ENUM[1] = :AddPending ; NUME[:AddPending] = 1 - ENUM[2] = :Pending ; NUME[:Pending] = 2 - ENUM[3] = :Trading ; NUME[:Trading] = 3 - end - - number 8, false, nil, AssignTradeStatus_TStatus - } - field(:unk, 9) { - number 8, true, nil, BooleanEnum - } - field(:value, 12) { - number 32, true - } - field(:weight, 16) { - number 32, true - } -end - -class AssumedIdentity < MemHack::Compound - sizeof 88 - - field(:id, 0) { - number 32, true - } - field(:name, 4) { - global :LanguageName - } - field(:race, 64) { - number 32, true - } - def race_tg ; df.world.raws.creatures.all[race] ; end - field(:caste, 68) { - number 16, true - } - field(:histfig_id, 72) { - number 32, true - } - def histfig_tg ; df.world.history.figures[histfig_id] ; end - field(:anon_1, 76) { - number 32, true - } - field(:birth_year, 80) { - number 32, true - } - field(:birth_second, 84) { - number 32, true - } -end - -class BlockBurrow < MemHack::Compound - sizeof 40 - - field(:id, 0) { - number 32, true - } - def id_tg ; df.ui.burrows.list[id] ; end - field(:tile_bitmask, 4) { - global :TileBitmask - } - field(:link, 36) { - pointer { - global :BlockBurrowLink - } - } -end - -class BlockBurrowLink < MemHack::Compound - sizeof 12 - - field(:item, 0) { - pointer { - global :BlockBurrow - } - } - field(:prev, 4) { - pointer { - global :BlockBurrowLink - } - } - field(:next, 8) { - pointer { - global :BlockBurrowLink - } - } -end - -class BlockFlags < MemHack::Compound - field(:_whole, 0) { - number 32, true - } - field(:designated, 0) { bit 0 } - field(:update_temperature, 0) { bit 1 } - field(:update_liquid, 0) { bit 2 } - field(:update_liquid_twice, 0) { bit 3 } -end - -class BlockSquareEvent < MemHack::Compound - sizeof 4 - - rtti_classname :block_square_eventst - - def getType() - BlockSquareEventType.sym(DFHack.vmethod_call(self, 0)) - end - def write_file(arg0) - DFHack.vmethod_call(self, 4, arg0) ; nil - end - def read_file(arg0, loadversion) - DFHack.vmethod_call(self, 8, arg0, loadversion) ; nil - end - def isEmpty() - val = DFHack.vmethod_call(self, 12) - (val & 1) != 0 - end - def checkTemperature(x, y, temperature) - DFHack.vmethod_call(self, 24, x, y, temperature) ; nil - end -end - -class BlockSquareEventFrozenLiquidst < BlockSquareEvent - sizeof 772 - - rtti_classname :block_square_event_frozen_liquidst - - field(:tiles, 4) { - static_array(16, 32) { - static_array(16, 2) { - number 16, true, nil, Tiletype - } - } - } - field(:liquid_type, 516) { - static_array(16, 16) { - static_array(16, 1) { - number 8, false, nil, TileLiquid - } - } - } -end - -class BlockSquareEventGrassst < BlockSquareEvent - sizeof 264 - - rtti_classname :block_square_event_grassst - - field(:plant_index, 4) { - number 32, true - } - def plant_index_tg ; df.world.raws.plants.all[plant_index] ; end - field(:amount, 8) { - static_array(16, 16) { - static_array(16, 1) { - number 8, false - } - } - } -end - -class BlockSquareEventMaterialSpatterst < BlockSquareEvent - sizeof 276 - - rtti_classname :block_square_event_material_spatterst - - field(:mat_type, 4) { - number 16, true - } - field(:mat_index, 8) { - number 32, true - } - field(:mat_state, 12) { - number 16, true - } - field(:amount, 14) { - static_array(16, 16) { - static_array(16, 1) { - number 8, false - } - } - } - field(:min_temperature, 270) { - number 16, true - } - field(:max_temperature, 272) { - number 16, true - } -end - -class BlockSquareEventMineralst < BlockSquareEvent - sizeof 44 - - rtti_classname :block_square_event_mineralst - - field(:inorganic_mat, 4) { - number 32, true - } - def inorganic_mat_tg ; df.world.raws.inorganics[inorganic_mat] ; end - field(:tile_bitmask, 8) { - global :TileBitmask - } - field(:flags, 40) { - number 32, false - } -end - -class BlockSquareEventWorldConstructionst < BlockSquareEvent - sizeof 40 - - rtti_classname :block_square_event_world_constructionst - - field(:inorganic_mat, 4) { - number 32, true - } - def inorganic_mat_tg ; df.world.raws.inorganics[inorganic_mat] ; end - field(:tile_bitmask, 8) { - global :TileBitmask - } -end - -class BodyComponentInfo < MemHack::Compound - sizeof 96 - - field(:body_part_308, 0) { - stl_vector(4) { - number 32, false - } - } - field(:unk_318, 12) { - stl_vector(4) { - number 32, false - } - } - field(:body_layer_328, 24) { - stl_vector(4) { - number 32, false - } - } - field(:body_layer_338, 36) { - stl_vector(4) { - number 32, false - } - } - field(:body_layer_348, 48) { - stl_vector(4) { - number 32, false - } - } - field(:body_layer_358, 60) { - stl_vector(4) { - number 32, false - } - } - field(:body_layer_368, 72) { - stl_vector(4) { - number 32, false - } - } - field(:body_layer_378, 84) { - stl_vector(4) { - number 32, false - } - } -end - -class BodyDetailPlan < MemHack::Compound - sizeof 304 - - field(:id, 0) { - stl_string - } - field(:add_material_name, 4) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:add_material_template, 16) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:add_tissue_name, 28) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:add_tissue_template, 40) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:unk5c, 52) { - stl_vector - } - field(:unk6c, 64) { - stl_vector - } - field(:unk7c, 76) { - stl_vector - } - field(:bp_layers_selection, 88) { - stl_vector - } - field(:bp_layers_criteria, 100) { - stl_vector - } - field(:bp_layers_tissue, 112) { - stl_vector - } - field(:bp_layers_thickness, 124) { - stl_vector - } - field(:bp_layers_position, 136) { - stl_vector - } - field(:bp_layers_over_under, 148) { - stl_vector - } - field(:bp_relsize_selection, 160) { - stl_vector - } - field(:bp_relsize_criteria, 172) { - stl_vector - } - field(:bp_relsize_value, 184) { - stl_vector - } - field(:bp_position_selection, 196) { - stl_vector - } - field(:bp_position_criteria, 208) { - stl_vector - } - field(:bp_position_value, 220) { - stl_vector - } - field(:bp_relation_selection_1, 232) { - stl_vector - } - field(:bp_relation_criteria_1, 244) { - stl_vector - } - field(:bp_relation_value_1, 256) { - stl_vector - } - field(:bp_relation_selection_2, 268) { - stl_vector - } - field(:bp_relation_criteria_2, 280) { - stl_vector - } - field(:bp_relation_extent, 292) { - stl_vector - } -end - -class BodyPartLayerRaw < MemHack::Compound - sizeof 80 - - field(:layer_name, 0) { - stl_string - } - field(:tissue_id, 4) { - number 32, true - } - field(:flags, 8) { - df_flagarray - } - field(:unk2, 16) { - number 32, true - } - field(:healing_rate, 20) { - number 32, true - } - field(:vascular, 24) { - number 32, true - } - field(:pain_receptors, 28) { - number 32, true - } - field(:unk6, 32) { - number 32, true - } - field(:unk7, 36) { - number 16, true - } - field(:unk8, 40) { - stl_vector - } - field(:layer_id, 52) { - number 32, true - } - field(:unk10, 56) { - number 32, true - } - field(:unk11, 60) { - number 32, true - } - field(:layer_depth, 64) { - number 32, true - } - field(:unk13, 68) { - number 32, true - } - field(:unk14, 72) { - number 32, true - } - field(:unk15, 76) { - number 32, true - } -end - -class BodyPartRaw < MemHack::Compound - sizeof 120 - - field(:token, 0) { - stl_string - } - field(:category, 4) { - stl_string - } - field(:con_part_id, 8) { - number 16, true - } - field(:flags, 12) { - df_flagarray(BodyPartRawFlags) - } - field(:layers, 20) { - stl_vector(4) { - pointer { - global :BodyPartLayerRaw - } - } - } - field(:unk2, 32) { - number 32, true - } - field(:unk3, 36) { - number 32, true - } - field(:unk4, 40) { - number 32, true - } - field(:unk5, 44) { - number 32, true - } - field(:relsize, 48) { - number 32, true - } - field(:unk7, 52) { - number 32, true - } - field(:unk7b, 56) { - number 16, true - } - field(:name_singular, 60) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:name_plural, 72) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:bp_relation_part_id, 84) { - pointer { - stl_vector(2) { - number 16, true - } - } - } - field(:bp_relation_code, 88) { - pointer { - stl_vector(2) { - number 16, true - } - } - } - field(:bp_relation_coverage, 92) { - pointer { - stl_vector(2) { - number 16, true - } - } - } - field(:min_temp, 96) { - number 16, false - } - field(:max_temp, 98) { - number 16, false - } - field(:temp_factor, 100) { - number 16, false - } - field(:unused, 104) { - number 32, true - } - field(:insulation_muscle, 108) { - number 16, true - } - field(:insulation_fat, 110) { - number 16, true - } - field(:insulation_base, 112) { - number 16, true - } - field(:clothing_item_id, 116) { - number 32, true, -1 - } -end - -class BodyPartTemplate < MemHack::Compound - sizeof 60 - - field(:id, 0) { - stl_string - } - field(:con, 4) { - stl_string - } - field(:category, 8) { - stl_string - } - field(:con_cat, 12) { - stl_string - } - field(:contype, 16) { - number 16, true, nil, BodyPartTemplateContype - } - field(:flags, 20) { - df_flagarray(BodyPartTemplateFlags) - } - field(:default_relsize, 28) { - number 32, true - } - field(:number, 32) { - number 32, true - } - field(:name_singular, 36) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:name_plural, 48) { - stl_vector(4) { - pointer { - stl_string - } - } - } -end - -class BodyTemplate < MemHack::Compound - sizeof 16 - - field(:id, 0) { - stl_string - } - field(:parts, 4) { - stl_vector(4) { - pointer { - global :BodyPartTemplate - } - } - } -end - -class BuildReqChoicest < MemHack::Compound - sizeof 8 - - rtti_classname :build_req_choicest - - field(:distance, 4) { - number 32, true - } - def getType() - BuildReqChoiceType.sym(DFHack.vmethod_call(self, 0)) - end - def getName(str) - DFHack.vmethod_call(self, 4, str) ; nil - end - def isCandidate(item_id) - val = DFHack.vmethod_call(self, 12, item_id) - (val & 1) != 0 - end - def getUsedCount() - val = DFHack.vmethod_call(self, 20) - end - def getNumCandidates() - val = DFHack.vmethod_call(self, 24) - end -end - -class BuildReqChoiceGenst < BuildReqChoicest - sizeof 36 - - rtti_classname :build_req_choice_genst - - field(:item_type, 8) { - number 16, true, nil, ItemType - } - field(:item_subtype, 10) { - number 16, true - } - field(:mat_type, 12) { - number 16, true - } - field(:mat_index, 16) { - number 32, true - } - field(:candidates, 20) { - stl_vector(4) { - number 32, true - } - } - field(:used_count, 32) { - number 32, true - } -end - -class BuildReqChoiceSpecst < BuildReqChoicest - sizeof 16 - - rtti_classname :build_req_choice_specst - - field(:candidate, 8) { - pointer { - global :Item - } - } - field(:candidate_id, 12) { - number 32, true - } -end - -class Building < MemHack::Compound - sizeof 180 - - rtti_classname :buildingst - - field(:x1, 4) { - number 32, true - } - field(:y1, 8) { - number 32, true - } - field(:centerx, 12) { - number 32, true - } - field(:x2, 16) { - number 32, true - } - field(:y2, 20) { - number 32, true - } - field(:centery, 24) { - number 32, true - } - field(:z, 28) { - number 32, true - } - field(:flags, 32) { - global :BuildingFlags - } - field(:mat_type, 36) { - number 16, true - } - field(:mat_index, 40) { - number 32, true, -1 - } - field(:room, 44) { - global :BuildingExtents - } - field(:age, 64) { - number 32, true - } - field(:race, 68) { - number 16, true - } - def race_tg ; df.world.raws.creatures.all[race] ; end - field(:id, 72) { - number 32, true, -1 - } - field(:jobs, 76) { - stl_vector(4) { - pointer { - global :Job - } - } - } - field(:specific_refs, 88) { - stl_vector(4) { - pointer { - global :SpecificRef - } - } - } - field(:refs, 100) { - stl_vector(4) { - pointer { - global :GeneralRef - } - } - } - field(:is_room, 112) { - number 8, true, nil, BooleanEnum - } - field(:children, 116) { - stl_vector(4) { - pointer { - global :Building - } - } - } - field(:parents, 128) { - stl_vector(4) { - pointer { - global :Building - } - } - } - field(:owner, 140) { - pointer { - global :Unit - } - } - field(:unk7, 144) { - stl_vector(4) { - pointer { - } - } - } - field(:name, 156) { - stl_string - } - field(:activities, 160) { - stl_vector(4) { - pointer { - compound(:Building_TActivities) { - sizeof 8 - - field(:id, 0) { - number 32, true - } - def id_tg ; df.world.activities.all[id] ; end - field(:is_group, 4) { - number 32, true - } - } - } - } - } - field(:world_data_id, 172) { - number 32, true, -1 - } - field(:world_data_subid, 176) { - number 32, true, -1 - } - def getCustomType() - val = DFHack.vmethod_call(self, 0) - end - def setCustomType(type) - DFHack.vmethod_call(self, 4, type) ; nil - end - def countHospitalSupplies(supplies) - DFHack.vmethod_call(self, 8, supplies) ; nil - end - def detachWorldData() - DFHack.vmethod_call(self, 16) ; nil - end - def getUsers() - ptr = DFHack.vmethod_call(self, 24) - class << self - global :BuildingUsers - end._at(ptr) if ptr != 0 - end - def moveBuilding(delta_x, delta_y, delta_z) - DFHack.vmethod_call(self, 28, delta_x, delta_y, delta_z) ; nil - end - def initOccupancy(abs_x, abs_y) - DFHack.vmethod_call(self, 32, abs_x, abs_y) ; nil - end - def setFillTimer(arg0, arg1) - DFHack.vmethod_call(self, 36, JobType.int(arg0), arg1) ; nil - end - def isOnFire() - val = DFHack.vmethod_call(self, 40) - (val & 1) != 0 - end - def isUnpowered() - val = DFHack.vmethod_call(self, 44) - (val & 1) != 0 - end - def canCollapse() - val = DFHack.vmethod_call(self, 48) - (val & 1) != 0 - end - def getPassableOccupancy() - val = DFHack.vmethod_call(self, 52) - val & ((1 << 32) - 1) - end - def getImpassableOccupancy() - val = DFHack.vmethod_call(self, 56) - val & ((1 << 32) - 1) - end - def isPowerSource() - val = DFHack.vmethod_call(self, 60) - (val & 1) != 0 - end - def updateFromWeather() - DFHack.vmethod_call(self, 64) ; nil - end - def updateTemperature() - DFHack.vmethod_call(self, 68) ; nil - end - def updateItems() - DFHack.vmethod_call(self, 72) ; nil - end - def updateTempFromTile(temp, arg1, arg2) - DFHack.vmethod_call(self, 76, temp, arg1, arg2) ; nil - end - def isNormalFurniture() - val = DFHack.vmethod_call(self, 80) - (val & 1) != 0 - end - def isFarmPlot() - val = DFHack.vmethod_call(self, 84) - (val & 1) != 0 - end - def getWorkshopProfile() - ptr = DFHack.vmethod_call(self, 88) - class << self - global :WorkshopProfile - end._at(ptr) if ptr != 0 - end - def getMachineInfo() - ptr = DFHack.vmethod_call(self, 92) - class << self - global :MachineInfo - end._at(ptr) if ptr != 0 - end - def getPowerInfo(power_info) - DFHack.vmethod_call(self, 96, power_info) ; nil - end - def canConnectToMachine(arg0) - val = DFHack.vmethod_call(self, 100, arg0) - (val & 1) != 0 - end - def getType() - BuildingType.sym(DFHack.vmethod_call(self, 104)) - end - def getSubtype() - val = DFHack.vmethod_call(self, 108) - val &= ((1 << 16) - 1) - ((val >> (16-1)) & 1) == 0 ? val : val - (1 << 16) - end - def setSubtype(subtype) - DFHack.vmethod_call(self, 112, subtype) ; nil - end - def isActual() - val = DFHack.vmethod_call(self, 116) - (val & 1) != 0 - end - def isCoffin2() - val = DFHack.vmethod_call(self, 120) - (val & 1) != 0 - end - def updateAction() - DFHack.vmethod_call(self, 124) ; nil - end - def isStatueOrRestraint() - val = DFHack.vmethod_call(self, 128) - (val & 1) != 0 - end - def setMaterialAmount(arg0) - DFHack.vmethod_call(self, 132, arg0) ; nil - end - def setBuildStage(stage) - DFHack.vmethod_call(self, 136, stage) ; nil - end - def getBuildStage() - val = DFHack.vmethod_call(self, 140) - end - def getMaxBuildStage() - val = DFHack.vmethod_call(self, 144) - end - def getArchitectureValue() - val = DFHack.vmethod_call(self, 148) - end - def isSettingOccupancy() - val = DFHack.vmethod_call(self, 152) - (val & 1) != 0 - end - def isActual2() - val = DFHack.vmethod_call(self, 156) - (val & 1) != 0 - end - def isExtentShaped() - val = DFHack.vmethod_call(self, 160) - (val & 1) != 0 - end - def updateOccupancy(abs_x, abs_y) - DFHack.vmethod_call(self, 164, abs_x, abs_y) ; nil - end - def getRoomValue(arg0) - val = DFHack.vmethod_call(self, 168, arg0) - end - def getPersonalValue(arg0) - val = DFHack.vmethod_call(self, 172, arg0) - end - def canBeRoom() - val = DFHack.vmethod_call(self, 176) - (val & 1) != 0 - end - def getConstructionValue() - val = DFHack.vmethod_call(self, 180) - end - def queueDestroy() - DFHack.vmethod_call(self, 184) ; nil - end - def isImpassableTile(rel_x, rel_y) - val = DFHack.vmethod_call(self, 188, rel_x, rel_y) - (val & 1) != 0 - end - def getFreeCapacity(exclude_in_room, subtract_pending_jobs) - val = DFHack.vmethod_call(self, 192, exclude_in_room, subtract_pending_jobs) - end - def canStoreItem(arg0, subtract_pending_jobs) - val = DFHack.vmethod_call(self, 196, arg0, subtract_pending_jobs) - (val & 1) != 0 - end - def getName(name) - DFHack.vmethod_call(self, 200, name) ; nil - end - def getNameColor() - DFHack.vmethod_call(self, 204) ; nil - end - def initFarmSeasons() - DFHack.vmethod_call(self, 208) ; nil - end - def initBurialFlags() - DFHack.vmethod_call(self, 212) ; nil - end - def clearBurialFlags() - DFHack.vmethod_call(self, 216) ; nil - end - def clearBurialFlags2() - DFHack.vmethod_call(self, 220) ; nil - end - def getClutterLevel() - val = DFHack.vmethod_call(self, 224) - end - def needsDesign() - val = DFHack.vmethod_call(self, 228) - (val & 1) != 0 - end - def canUseForMood(arg0) - val = DFHack.vmethod_call(self, 232, JobType.int(arg0)) - (val & 1) != 0 - end - def canBeRoomSubset() - val = DFHack.vmethod_call(self, 236) - (val & 1) != 0 - end - def isCoffin() - val = DFHack.vmethod_call(self, 240) - (val & 1) != 0 - end - def canUseSpouseRoom() - val = DFHack.vmethod_call(self, 244) - (val & 1) != 0 - end - def canMakeRoom() - val = DFHack.vmethod_call(self, 248) - (val & 1) != 0 - end - def isJusticeRestraint() - val = DFHack.vmethod_call(self, 252) - (val & 1) != 0 - end - def detachRestrainedUnit(arg0) - DFHack.vmethod_call(self, 256, arg0) ; nil - end - def write_file(arg0) - DFHack.vmethod_call(self, 260, arg0) ; nil - end - def read_file(arg0, loadversion) - DFHack.vmethod_call(self, 264, arg0, loadversion) ; nil - end - def isImpassableAtCreation() - val = DFHack.vmethod_call(self, 268) - (val & 1) != 0 - end - def categorize(arg0) - DFHack.vmethod_call(self, 272, arg0) ; nil - end - def uncategorize() - DFHack.vmethod_call(self, 276) ; nil - end - def getBaseValue() - val = DFHack.vmethod_call(self, 280) - end - def setMachineState(new_state) - DFHack.vmethod_call(self, 284, new_state) ; nil - end - def checkAdvmodeLocked() - DFHack.vmethod_call(self, 288) ; nil - end - def drawAdvmodeUnlockUI() - DFHack.vmethod_call(self, 292) ; nil - end - def advmodeUnlock(arg0) - DFHack.vmethod_call(self, 296, arg0) ; nil - end - def needsMagma() - val = DFHack.vmethod_call(self, 300) - (val & 1) != 0 - end - def removeUses(noscatter, lost) - DFHack.vmethod_call(self, 304, noscatter, lost) ; nil - end - def deconstructItems(noscatter, lost) - DFHack.vmethod_call(self, 308, noscatter, lost) ; nil - end - def cleanupMap() - DFHack.vmethod_call(self, 312) ; nil - end - def fillSidebarMenu() - DFHack.vmethod_call(self, 320) ; nil - end - def isForbidden() - val = DFHack.vmethod_call(self, 324) - (val & 1) != 0 - end - def isHidden() - val = DFHack.vmethod_call(self, 328) - (val & 1) != 0 - end - def isVisibleInUI() - val = DFHack.vmethod_call(self, 332) - (val & 1) != 0 - end - def drawBuilding(arg0, arg1) - DFHack.vmethod_call(self, 344, arg0, arg1) ; nil - end - def setSquadUse(squad, arg1) - DFHack.vmethod_call(self, 348, squad, arg1) ; nil - end - def getSquads() - ptr = DFHack.vmethod_call(self, 352) - class << self - stl_vector(4) { - pointer { - global :BuildingSquadUse - } - } - end._at(ptr) if ptr != 0 - end - def getSpecificSquad() - val = DFHack.vmethod_call(self, 356) - end - def getSpecificPosition() - val = DFHack.vmethod_call(self, 360) - end - def setSpecificSquadPos(arg0, arg1) - DFHack.vmethod_call(self, 364, arg0, arg1) ; nil - end - def clearSpecificSquad() - DFHack.vmethod_call(self, 368) ; nil - end -end - -class BuildingActual < Building - sizeof 200 - - rtti_classname :building_actualst - - field(:construction_stage, 180) { - number 16, true - } - field(:contained_items, 184) { - stl_vector(4) { - pointer { - compound(:BuildingActual_TContainedItems) { - sizeof 8 - - field(:item, 0) { - pointer { - global :Item - } - } - field(:use_mode, 4) { - number 16, true - } - } - } - } - } - field(:design, 196) { - pointer { - global :BuildingDesign - } - } - def isDestroyedByItemRemoval() - val = DFHack.vmethod_call(self, 0) - (val & 1) != 0 - end -end - -class BuildingAnimaltrapst < BuildingActual - sizeof 204 - - rtti_classname :building_animaltrapst - - field(:bait_type, 200) { - number 16, true, -1 - } - field(:fill_timer, 202) { - number 16, true - } -end - -class BuildingArcherytargetst < BuildingActual - sizeof 204 - - rtti_classname :building_archerytargetst - - field(:archery_direction, 200) { - class ::DFHack::BuildingArcherytargetst_TArcheryDirection < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :TopToBottom ; NUME[:TopToBottom] = 0 - ENUM[1] = :BottomToTop ; NUME[:BottomToTop] = 1 - ENUM[2] = :LeftToRight ; NUME[:LeftToRight] = 2 - ENUM[3] = :RightToLeft ; NUME[:RightToLeft] = 3 - end - - number 8, false, nil, BuildingArcherytargetst_TArcheryDirection - } -end - -class BuildingArmorstandst < BuildingActual - sizeof 224 - - rtti_classname :building_armorstandst - - field(:unk_c0, 200) { - number 16, true - } - field(:squads, 204) { - stl_vector(4) { - pointer { - global :BuildingSquadUse - } - } - } - field(:specific_squad, 216) { - number 32, true - } - def specific_squad_tg ; df.world.squads.all[specific_squad] ; end - field(:specific_position, 220) { - number 32, true, -1 - } -end - -class BuildingAxleHorizontalst < BuildingActual - sizeof 212 - - rtti_classname :building_axle_horizontalst - - field(:machine, 200) { - global :MachineInfo - } - field(:is_vertical, 208) { - number 8, true, nil, BooleanEnum - } -end - -class BuildingAxleVerticalst < BuildingActual - sizeof 208 - - rtti_classname :building_axle_verticalst - - field(:machine, 200) { - global :MachineInfo - } -end - -class BuildingBarsFloorst < BuildingActual - sizeof 204 - - rtti_classname :building_bars_floorst - - field(:gate_flags, 200) { - global :GateFlags - } - field(:timer, 202) { - number 8, false - } -end - -class BuildingBarsVerticalst < BuildingActual - sizeof 204 - - rtti_classname :building_bars_verticalst - - field(:gate_flags, 200) { - global :GateFlags - } - field(:timer, 202) { - number 8, false - } -end - -class BuildingBedst < BuildingActual - sizeof 248 - - rtti_classname :building_bedst - - field(:anon_1, 200) { - compound(:BuildingBedst_TAnon1) { - field(:_whole, 0) { - number 16, false - } - field(:barracks, 0) { bit 0 } - field(:dormitory, 0) { bit 1 } - } - } - field(:squads, 204) { - stl_vector(4) { - pointer { - global :BuildingSquadUse - } - } - } - field(:specific_squad, 216) { - number 32, true - } - def specific_squad_tg ; df.world.squads.all[specific_squad] ; end - field(:specific_position, 220) { - number 32, true, -1 - } - field(:users, 224) { - global :BuildingUsers - } -end - -class BuildingBoxst < BuildingActual - sizeof 224 - - rtti_classname :building_boxst - - field(:anon_1, 200) { - number 16, true - } - field(:squads, 204) { - stl_vector(4) { - pointer { - global :BuildingSquadUse - } - } - } - field(:specific_squad, 216) { - number 32, true - } - def specific_squad_tg ; df.world.squads.all[specific_squad] ; end - field(:specific_position, 220) { - number 32, true, -1 - } -end - -class BuildingBridgest < BuildingActual - sizeof 208 - - rtti_classname :building_bridgest - - field(:gate_flags, 200) { - global :GateFlags - } - field(:timer, 202) { - number 8, false - } - field(:direction, 203) { - class ::DFHack::BuildingBridgest_TDirection < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[-1] = :Retracting ; NUME[:Retracting] = -1 - ENUM[0] = :Left ; NUME[:Left] = 0 - ENUM[1] = :Right ; NUME[:Right] = 1 - ENUM[2] = :Up ; NUME[:Up] = 2 - ENUM[3] = :Down ; NUME[:Down] = 3 - end - - number 8, false, nil, BuildingBridgest_TDirection - } - field(:material_amount, 204) { - number 32, true - } -end - -class BuildingCabinetst < BuildingActual - sizeof 224 - - rtti_classname :building_cabinetst - - field(:anon_1, 200) { - number 16, true - } - field(:squads, 204) { - stl_vector(4) { - pointer { - global :BuildingSquadUse - } - } - } - field(:specific_squad, 216) { - number 32, true - } - def specific_squad_tg ; df.world.squads.all[specific_squad] ; end - field(:specific_position, 220) { - number 32, true, -1 - } -end - -class BuildingCagest < BuildingActual - sizeof 228 - - rtti_classname :building_cagest - - field(:assigned_creature, 200) { - stl_vector(4) { - number 32, true - } - } - def assigned_creature_tg ; assigned_creature.map { |i| df.world.units.all[i] } ; end - field(:assigned_vermin, 212) { - stl_vector(4) { - number 32, true - } - } - def assigned_vermin_tg ; assigned_vermin.map { |i| df.world.items.all[i] } ; end - field(:anon_1, 224) { - number 16, true - } - field(:fill_timer, 226) { - number 16, true - } -end - -class BuildingChainst < BuildingActual - sizeof 212 - - rtti_classname :building_chainst - - field(:assigned, 200) { - pointer { - global :Unit - } - } - field(:chained, 204) { - pointer { - global :Unit - } - } - field(:unk, 208) { - number 16, true - } -end - -class BuildingChairst < BuildingActual - sizeof 228 - - rtti_classname :building_chairst - - field(:anon_1, 200) { - number 16, true - } - field(:users, 204) { - global :BuildingUsers - } -end - -class BuildingCivzonest < Building - sizeof 308 - - rtti_classname :building_civzonest - - field(:assigned_creature, 180) { - stl_vector(4) { - number 32, true - } - } - def assigned_creature_tg ; assigned_creature.map { |i| df.world.units.all[i] } ; end - field(:assigned_vermin, 192) { - stl_vector(4) { - number 32, true - } - } - def assigned_vermin_tg ; assigned_vermin.map { |i| df.world.items.all[i] } ; end - field(:type, 204) { - number 16, true, nil, CivzoneType - } - field(:anon_1, 206) { - number 16, true - } - field(:zone_flags, 208) { - compound(:BuildingCivzonest_TZoneFlags) { - field(:_whole, 0) { - number 32, false - } - field(:water_source, 0) { bit 0 } - field(:garbage_dump, 0) { bit 1 } - field(:sand, 0) { bit 2 } - field(:active, 0) { bit 3 } - field(:fishing, 0) { bit 4 } - field(:pit_pond, 0) { bit 5 } - field(:meeting_area, 0) { bit 6 } - field(:hospital, 0) { bit 7 } - field(:pen_pasture, 0) { bit 8 } - field(:clay, 0) { bit 9 } - field(:animal_training, 0) { bit 10 } - } - } - field(:anon_2, 212) { - number 32, true, -1 - } - field(:anon_3, 216) { - number 32, true, -1 - } - field(:anon_4, 220) { - number 32, true, -1 - } - field(:anon_5, 224) { - number 32, true, -1 - } - field(:zone_num, 228) { - number 32, true, -1 - } - field(:anon_6, 232) { - number 32, true - } - field(:pit_flags, 236) { - compound(:BuildingCivzonest_TPitFlags) { - field(:_whole, 0) { - number 32, false - } - field(:is_pond, 0) { bit 1 } - } - } - field(:fill_timer, 240) { - number 16, true - } - field(:hospital, 244) { - global :HospitalSupplies - } -end - -class BuildingCoffinst < BuildingActual - sizeof 204 - - rtti_classname :building_coffinst - - field(:burial_mode, 200) { - compound(:BuildingCoffinst_TBurialMode) { - field(:_whole, 0) { - number 16, false - } - field(:allow_burial, 0) { bit 0 } - field(:no_citizens, 0) { bit 1 } - field(:no_pets, 0) { bit 2 } - } - } -end - -class BuildingConstructionst < BuildingActual - sizeof 204 - - rtti_classname :building_constructionst - - field(:type, 200) { - number 16, true, nil, ConstructionType - } -end - -class BuildingDef < MemHack::Compound - sizeof 16424 - - rtti_classname :building_defst - - field(:code, 4) { - stl_string - } - field(:id, 8) { - number 32, true - } - field(:name, 12) { - stl_string - } - field(:unk_40, 16) { - number 32, true - } - field(:unk_44, 20) { - number 32, true - } - field(:name_color, 24) { - static_array(3, 2) { - number 16, true - } - } - field(:tile, 30) { - static_array(4, 961) { - static_array(31, 31) { - static_array(31, 1) { - number 8, false - } - } - } - } - field(:tile_color, 3874) { - static_array(3, 3844) { - static_array(4, 961) { - static_array(31, 31) { - static_array(31, 1) { - number 8, false - } - } - } - } - } - field(:tile_block, 15406) { - static_array(31, 31) { - static_array(31, 1) { - number 8, false - } - } - } - field(:build_key, 16368) { - number 32, true - } - field(:needs_magma, 16372) { - number 8, true, nil, BooleanEnum - } - field(:build_items, 16376) { - stl_vector(4) { - pointer { - global :BuildingDefItem - } - } - } - field(:dim_x, 16388) { - number 32, true - } - field(:dim_y, 16392) { - number 32, true - } - field(:workloc_x, 16396) { - number 32, true - } - field(:workloc_y, 16400) { - number 32, true - } - field(:build_labors, 16404) { - stl_vector(4) { - number 32, true, nil, UnitLabor - } - } - field(:labor_description, 16416) { - stl_string - } - field(:build_stages, 16420) { - number 32, true - } - def parseRaws(arg0, arg1, arg2, arg3) - DFHack.vmethod_call(self, 0, arg0, arg1, arg2, arg3) ; nil - end - def categorize() - DFHack.vmethod_call(self, 4) ; nil - end - def finalize() - DFHack.vmethod_call(self, 8) ; nil - end -end - -class BuildingDefFurnacest < BuildingDef - sizeof 16424 - - rtti_classname :building_def_furnacest - -end - -class BuildingDefItem < MemHack::Compound - sizeof 76 - - field(:item_type, 0) { - number 16, true, nil, ItemType - } - field(:item_subtype, 2) { - number 16, true - } - field(:mat_type, 4) { - number 16, true - } - field(:mat_index, 6) { - number 16, true, -1 - } - field(:reaction_class, 8) { - stl_string - } - field(:has_material_reaction_product, 12) { - stl_string - } - field(:flags1, 16) { - global :JobItemFlags1 - } - field(:flags2, 20) { - global :JobItemFlags2 - } - field(:flags3, 24) { - global :JobItemFlags3 - } - field(:flags4, 28) { - number 32, false - } - field(:flags5, 32) { - number 32, false - } - field(:metal_ore, 36) { - number 32, true - } - def metal_ore_tg ; df.world.raws.inorganics[metal_ore] ; end - field(:min_dimension, 40) { - number 32, true - } - field(:quantity, 44) { - number 32, true - } - field(:has_tool_use, 48) { - number 16, true, nil, ToolUses - } - field(:item_str, 52) { - static_array(2, 4) { - stl_string - } - } - field(:material_str, 60) { - static_array(3, 4) { - stl_string - } - } - field(:metal_ore_str, 72) { - stl_string - } -end - -class BuildingDefWorkshopst < BuildingDef - sizeof 16424 - - rtti_classname :building_def_workshopst - -end - -class BuildingDesign < MemHack::Compound - sizeof 48 - - field(:architect, 0) { - number 32, true - } - def architect_tg ; df.world.history.figures[architect] ; end - field(:unk2, 4) { - number 32, true, -1 - } - field(:unk3, 8) { - number 16, true - } - field(:builder1, 12) { - number 32, true - } - def builder1_tg ; df.world.history.figures[builder1] ; end - field(:unk5, 16) { - number 32, true, -1 - } - field(:unk6, 20) { - number 16, true - } - field(:build_timer1, 22) { - number 16, true - } - field(:builder2, 24) { - number 32, true - } - def builder2_tg ; df.world.history.figures[builder2] ; end - field(:build_timer2, 28) { - number 16, true - } - field(:quality1, 30) { - number 16, true, nil, ItemQuality - } - field(:quality2, 32) { - number 16, true, nil, ItemQuality - } - field(:flags, 36) { - compound(:BuildingDesign_TFlags) { - field(:_whole, 0) { - number 32, false - } - field(:rough, 0) { bit 0 } - field(:built, 0) { bit 1 } - field(:designed, 0) { bit 2 } - } - } - field(:unk11, 40) { - number 32, true - } - field(:unk12, 44) { - number 32, true - } -end - -class BuildingDoorst < BuildingActual - sizeof 204 - - rtti_classname :building_doorst - - field(:flags, 200) { - global :DoorFlags - } - field(:close_timer, 202) { - number 16, true - } -end - -class BuildingExtents < MemHack::Compound - sizeof 20 - - field(:extents, 0) { - pointer_ary(1) { - number 8, false - } - } - field(:x, 4) { - number 32, true - } - field(:y, 8) { - number 32, true - } - field(:width, 12) { - number 32, true - } - field(:height, 16) { - number 32, true - } -end - -class BuildingFarmplotst < BuildingActual - sizeof 232 - - rtti_classname :building_farmplotst - - field(:plant_id, 200) { - static_array(4, 2) { - number 16, true - } - } - field(:material_amount, 208) { - number 32, true - } - field(:seasonal_fertilize, 212) { - number 32, true - } - field(:anon_1, 216) { - number 8, false, -1 - } - field(:current_fertilization, 220) { - number 32, true - } - field(:max_fertilization, 224) { - number 32, true - } - field(:terrain_purge_timer, 228) { - number 16, true, 500 - } -end - -class BuildingFlags < MemHack::Compound - field(:_whole, 0) { - number 32, true - } - field(:exists, 0) { bit 0 } - field(:site_blocked, 0) { bit 1 } - field(:room_collision, 0) { bit 2 } - field(:justice, 0) { bit 4 } - field(:almost_deleted, 0) { bit 5 } - field(:in_update, 0) { bit 6 } -end - -class BuildingFloodgatest < BuildingActual - sizeof 204 - - rtti_classname :building_floodgatest - - field(:gate_flags, 200) { - global :GateFlags - } - field(:timer, 202) { - number 8, false - } -end - -class BuildingFurnacest < BuildingActual - sizeof 288 - - rtti_classname :building_furnacest - - field(:melt_remainder, 200) { - stl_vector(4) { - number 32, true - } - } - field(:unk_108, 212) { - number 16, true - } - field(:type, 214) { - number 16, true, nil, FurnaceType - } - field(:profile, 216) { - global :WorkshopProfile - } - field(:give_to_pile, 236) { - stl_vector(4) { - pointer { - global :BuildingStockpilest - } - } - } - field(:take_from_pile, 248) { - stl_vector(4) { - pointer { - global :BuildingStockpilest - } - } - } - field(:unk14, 260) { - stl_vector - } - field(:unk15, 272) { - stl_vector - } - field(:custom_type, 284) { - number 32, true - } - def custom_type_tg ; df.world.raws.buildings.all[custom_type] ; end -end - -class BuildingGearAssemblyst < BuildingActual - sizeof 212 - - rtti_classname :building_gear_assemblyst - - field(:machine, 200) { - global :MachineInfo - } - field(:gear_flags, 208) { - compound(:BuildingGearAssemblyst_TGearFlags) { - field(:_whole, 0) { - number 32, true - } - field(:disengaged, 0) { bit 0 } - } - } -end - -class BuildingGrateFloorst < BuildingActual - sizeof 204 - - rtti_classname :building_grate_floorst - - field(:gate_flags, 200) { - global :GateFlags - } - field(:timer, 202) { - number 8, false - } -end - -class BuildingGrateWallst < BuildingActual - sizeof 204 - - rtti_classname :building_grate_wallst - - field(:gate_flags, 200) { - global :GateFlags - } - field(:timer, 202) { - number 8, false - } -end - -class BuildingHatchst < BuildingActual - sizeof 204 - - rtti_classname :building_hatchst - - field(:flags, 200) { - global :DoorFlags - } - field(:close_timer, 202) { - number 16, true - } -end - -class BuildingHivest < BuildingActual - sizeof 220 - - rtti_classname :building_hivest - - field(:anon_1, 200) { - number 32, true, 3 - } - field(:anon_2, 204) { - number 32, true - } - field(:anon_3, 208) { - number 32, true - } - field(:anon_4, 212) { - number 32, true - } - field(:anon_5, 216) { - number 32, true - } -end - -class BuildingNestBoxst < BuildingActual - sizeof 208 - - rtti_classname :building_nest_boxst - - field(:claimed_by, 200) { - number 32, true - } - def claimed_by_tg ; df.world.units.all[claimed_by] ; end - field(:anon_1, 204) { - number 32, true - } -end - -class BuildingNestst < BuildingActual - sizeof 200 - - rtti_classname :building_nestst - -end - -class BuildingRoadst < BuildingActual - sizeof 200 - - rtti_classname :building_roadst - -end - -class BuildingRoadDirtst < BuildingRoadst - sizeof 204 - - rtti_classname :building_road_dirtst - - field(:material_amount, 200) { - number 32, true - } -end - -class BuildingRoadPavedst < BuildingRoadst - sizeof 208 - - rtti_classname :building_road_pavedst - - field(:material_amount, 200) { - number 32, true - } - field(:terrain_purge_timer, 204) { - number 16, true, 500 - } -end - -class BuildingRollersst < BuildingActual - sizeof 216 - - rtti_classname :building_rollersst - - field(:machine, 200) { - global :MachineInfo - } - field(:direction, 208) { - number 32, true, nil, ScrewPumpDirection - } - field(:speed, 212) { - number 32, true, 50000 - } -end - -class BuildingScrewPumpst < BuildingActual - sizeof 212 - - rtti_classname :building_screw_pumpst - - field(:machine, 200) { - global :MachineInfo - } - field(:unk_100, 208) { - number 8, false - } - field(:direction, 209) { - number 8, false, nil, ScrewPumpDirection - } - field(:pump_manually, 210) { - number 8, true, nil, BooleanEnum - } -end - -class BuildingShopst < BuildingActual - sizeof 212 - - rtti_classname :building_shopst - - field(:has_owner, 200) { - number 32, true - } - field(:owner, 204) { - number 32, true - } - field(:flags, 208) { - compound(:BuildingShopst_TFlags) { - field(:_whole, 0) { - number 16, true, 1 - } - field(:for_sale, 0) { bit 0 } - } - } - field(:type, 210) { - number 16, true, nil, ShopType - } -end - -class BuildingSiegeenginest < BuildingActual - sizeof 208 - - rtti_classname :building_siegeenginest - - field(:type, 200) { - number 16, true, nil, SiegeengineType - } - field(:facing, 202) { - class ::DFHack::BuildingSiegeenginest_TFacing < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :Left ; NUME[:Left] = 0 - ENUM[1] = :Up ; NUME[:Up] = 1 - ENUM[2] = :Right ; NUME[:Right] = 2 - ENUM[3] = :Down ; NUME[:Down] = 3 - end - - number 8, false, nil, BuildingSiegeenginest_TFacing - } - field(:action, 203) { - class ::DFHack::BuildingSiegeenginest_TAction < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :NotInUse ; NUME[:NotInUse] = 0 - ENUM[1] = :PrepareToFire ; NUME[:PrepareToFire] = 1 - ENUM[2] = :FireAtWill ; NUME[:FireAtWill] = 2 - end - - number 8, false, nil, BuildingSiegeenginest_TAction - } - field(:fire_timer, 204) { - number 8, false - } - field(:fill_timer, 206) { - number 16, true - } -end - -class BuildingSlabst < BuildingActual - sizeof 204 - - rtti_classname :building_slabst - - field(:anon_1, 200) { - number 16, true - } -end - -class BuildingSquadUse < MemHack::Compound - sizeof 8 - - field(:squad_id, 0) { - number 32, true - } - def squad_tg ; df.world.squads.all[squad_id] ; end - field(:mode, 4) { - global :SquadUseFlags - } -end - -class BuildingStatuest < BuildingActual - sizeof 204 - - rtti_classname :building_statuest - - field(:anon_1, 200) { - number 16, true - } -end - -class BuildingStockpilest < Building - sizeof 1260 - - rtti_classname :building_stockpilest - - field(:settings, 180) { - global :StockpileSettings - } - field(:max_barrels, 1136) { - number 16, true - } - field(:max_bins, 1138) { - number 16, true - } - field(:max_wheelbarrows, 1140) { - number 16, true - } - field(:container_type, 1144) { - stl_vector(2) { - number 16, true, nil, ItemType - } - } - field(:container_item_id, 1156) { - stl_vector(4) { - number 32, true - } - } - def container_item_tg ; container_item_id.map { |i| df.world.items.all[i] } ; end - field(:container_x, 1168) { - stl_vector(2) { - number 16, true - } - } - field(:container_y, 1180) { - stl_vector(2) { - number 16, true - } - } - field(:give_to, 1192) { - stl_vector(4) { - pointer { - global :BuildingStockpilest - } - } - } - field(:take_from, 1204) { - stl_vector(4) { - pointer { - global :BuildingStockpilest - } - } - } - field(:give_to_workshop, 1216) { - stl_vector(4) { - pointer { - global :Building - } - } - } - field(:take_from_workshop, 1228) { - stl_vector(4) { - pointer { - global :Building - } - } - } - field(:use_links_only, 1240) { - number 32, true - } - field(:stockpile_number, 1244) { - number 32, true, -1 - } - field(:linked_stops, 1248) { - stl_vector(4) { - pointer { - global :HaulingStop - } - } - } -end - -class BuildingSupportst < BuildingActual - sizeof 204 - - rtti_classname :building_supportst - - field(:anon_1, 200) { - number 16, true - } -end - -class BuildingTablest < BuildingActual - sizeof 228 - - rtti_classname :building_tablest - - field(:flags, 200) { - compound(:BuildingTablest_TFlags) { - field(:_whole, 0) { - number 16, true - } - field(:meeting_hall, 0) { bit 0 } - } - } - field(:users, 204) { - global :BuildingUsers - } -end - -class BuildingTractionBenchst < BuildingActual - sizeof 228 - - rtti_classname :building_traction_benchst - - field(:anon_1, 200) { - number 16, true - } - field(:users, 204) { - global :BuildingUsers - } -end - -class BuildingTradedepotst < BuildingActual - sizeof 208 - - rtti_classname :building_tradedepotst - - field(:flags, 200) { - compound(:BuildingTradedepotst_TFlags) { - field(:_whole, 0) { - number 32, false - } - field(:trader_requested, 0) { bit 0 } - field(:anyone_can_trade, 0) { bit 1 } - } - } - field(:anon_1, 204) { - number 32, true - } -end - -class BuildingTrapst < BuildingActual - sizeof 348 - - rtti_classname :building_trapst - - field(:trap_type, 200) { - number 16, true, nil, TrapType - } - field(:state, 202) { - number 8, false - } - field(:unk_cc, 204) { - number 16, true - } - field(:fill_timer, 206) { - number 16, true - } - field(:unk_d0, 208) { - number 16, true - } - field(:linked_mechanisms, 212) { - stl_vector(4) { - pointer { - global :Item - } - } - } - field(:anon_1, 224) { - stl_vector(4) { - number 32, true - } - } - field(:anon_2, 236) { - stl_vector(4) { - number 32, true - } - } - field(:anon_3, 248) { - number 32, true - } - field(:anon_4, 252) { - number 32, true, 3000 - } - field(:unk12, 256) { - stl_vector - } - field(:unk13, 268) { - stl_vector - } - field(:unk14, 280) { - stl_vector - } - field(:unk15, 292) { - stl_vector - } - field(:plate_info, 304) { - global :PressurePlateInfo - } - field(:friction, 328) { - number 32, true, 50000 - } - field(:use_dump, 332) { - number 32, true - } - field(:dump_x_shift, 336) { - number 32, true - } - field(:dump_y_shift, 340) { - number 32, true - } - field(:unk19, 344) { - number 8, false - } -end - -class BuildingUsers < MemHack::Compound - sizeof 24 - - field(:unit, 0) { - stl_vector(4) { - number 32, true - } - } - def unit_tg ; unit.map { |i| df.world.units.all[i] } ; end - field(:mode, 12) { - stl_vector(2) { - number 16, true - } - } -end - -class BuildingWagonst < BuildingActual - sizeof 200 - - rtti_classname :building_wagonst - -end - -class BuildingWaterWheelst < BuildingActual - sizeof 212 - - rtti_classname :building_water_wheelst - - field(:machine, 200) { - global :MachineInfo - } - field(:is_vertical, 208) { - number 8, true, nil, BooleanEnum - } - field(:gives_power, 209) { - number 8, true, nil, BooleanEnum - } -end - -class BuildingWeaponrackst < BuildingActual - sizeof 220 - - rtti_classname :building_weaponrackst - - field(:unk_c0, 200) { - number 16, true - } - field(:squads, 204) { - stl_vector(4) { - pointer { - global :BuildingSquadUse - } - } - } - field(:specific_squad, 216) { - number 32, true - } - def specific_squad_tg ; df.world.squads.all[specific_squad] ; end -end - -class BuildingWeaponst < BuildingActual - sizeof 204 - - rtti_classname :building_weaponst - - field(:gate_flags, 200) { - global :GateFlags - } - field(:timer, 202) { - number 8, false - } -end - -class BuildingWellst < BuildingActual - sizeof 212 - - rtti_classname :building_wellst - - field(:flags, 200) { - compound(:BuildingWellst_TFlags) { - field(:_whole, 0) { - number 16, true - } - field(:lowering, 0) { bit 0 } - } - } - field(:anon_1, 202) { - number 8, false - } - field(:bucket_z, 204) { - number 16, true - } - field(:bucket_timer, 206) { - number 8, false - } - field(:unk_timer, 208) { - number 16, true - } -end - -class BuildingWindmillst < BuildingActual - sizeof 220 - - rtti_classname :building_windmillst - - field(:machine, 200) { - global :MachineInfo - } - field(:orient_angle, 208) { - number 16, true, -1 - } - field(:orient_mode, 210) { - number 16, true - } - field(:is_working, 212) { - number 16, true - } - field(:visual_rotated, 214) { - number 8, true, nil, BooleanEnum - } - field(:rotate_timer, 216) { - number 16, true - } - field(:orient_timer, 218) { - number 16, true - } -end - -class BuildingWindowst < BuildingActual - sizeof 204 - - rtti_classname :building_windowst - - field(:anon_1, 200) { - number 16, true - } -end - -class BuildingWindowGemst < BuildingWindowst - sizeof 204 - - rtti_classname :building_window_gemst - -end - -class BuildingWindowGlassst < BuildingWindowst - sizeof 204 - - rtti_classname :building_window_glassst - -end - -class BuildingWorkshopst < BuildingActual - sizeof 284 - - rtti_classname :building_workshopst - - field(:type, 200) { - number 16, true, nil, WorkshopType - } - field(:profile, 204) { - global :WorkshopProfile - } - field(:give_to_pile, 224) { - stl_vector(4) { - pointer { - global :BuildingStockpilest - } - } - } - field(:take_from_pile, 236) { - stl_vector(4) { - pointer { - global :BuildingStockpilest - } - } - } - field(:unk14, 248) { - stl_vector - } - field(:unk15, 260) { - stl_vector - } - field(:machine, 272) { - global :MachineInfo - } - field(:custom_type, 280) { - number 32, true - } - def custom_type_tg ; df.world.raws.buildings.all[custom_type] ; end -end - -class Burrow < MemHack::Compound - sizeof 64 - - field(:id, 0) { - number 32, true - } - field(:name, 4) { - stl_string - } - field(:tile, 8) { - number 8, false - } - field(:fg_color, 10) { - number 16, true - } - field(:bg_color, 12) { - number 16, true - } - field(:block_x, 16) { - stl_vector(4) { - number 32, true - } - } - field(:block_y, 28) { - stl_vector(4) { - number 32, true - } - } - field(:block_z, 40) { - stl_vector(4) { - number 32, true - } - } - field(:units, 52) { - stl_vector(4) { - number 32, true - } - } - def units_tg ; units.map { |i| df.world.units.all[i] } ; end -end - -class CaravanState < MemHack::Compound - sizeof 8396 - - field(:anon_1, 0) { - number 32, true - } - field(:anon_2, 4) { - number 32, true - } - field(:trade_state, 8) { - number 8, false - } - field(:depot_notified, 9) { - number 8, false - } - field(:time_remaining, 10) { - number 16, true - } - field(:entity, 12) { - number 32, true - } - def entity_tg ; df.world.entities.all[entity] ; end - field(:activity_stats, 16) { - global :EntityActivityStatistics - } - field(:flags, 8336) { - number 32, true - } - field(:anon_3, 8340) { - number 32, true - } - field(:anon_4, 8344) { - number 32, true - } - field(:anon_5, 8348) { - number 32, true - } - field(:anon_6, 8352) { - number 32, true - } - field(:animals, 8356) { - stl_vector(4) { - number 32, true - } - } - def animals_tg ; animals.map { |i| df.world.units.all[i] } ; end - field(:anon_7, 8368) { - pointer { - } - } - field(:anon_8, 8372) { - pointer { - compound(:CaravanState_TAnon8) { - sizeof 16 - - field(:unk_0, 0) { - pointer { - compound(:CaravanState_TAnon8_TUnk0) { - sizeof 72 - - field(:unk_0, 0) { - stl_vector(2) { - number 16, true - } - } - field(:unk_10, 12) { - stl_vector(2) { - number 16, true - } - } - field(:unk_20, 24) { - stl_vector(2) { - number 16, true - } - } - field(:unk_30, 36) { - stl_vector(2) { - number 16, true - } - } - field(:unk_40, 48) { - stl_vector(4) { - number 32, true - } - } - field(:unk_50, 60) { - stl_vector(1) { - number 8, false - } - } - } - } - } - field(:unk_4, 4) { - stl_vector(4) { - number 32, true - } - } - } - } - } - field(:goods, 8376) { - stl_vector(4) { - number 32, true - } - } - def goods_tg ; goods.map { |i| df.world.items.all[i] } ; end - field(:anon_9, 8388) { - number 32, true - } - field(:anon_10, 8392) { - pointer { - } - } -end - -class CasteBodyInfo < MemHack::Compound - sizeof 160 - - field(:body_parts, 0) { - stl_vector(4) { - pointer { - global :BodyPartRaw - } - } - } - field(:attacks, 12) { - stl_vector(4) { - pointer { - } - } - } - field(:interactions, 24) { - stl_vector(4) { - pointer { - } - } - } - field(:extra_butcher_objects, 36) { - stl_vector(4) { - pointer { - } - } - } - field(:unk8, 48) { - number 32, true - } - field(:layer_part, 52) { - stl_vector(2) { - number 16, true - } - } - field(:layer_idx, 64) { - stl_vector(2) { - number 16, true - } - } - field(:unk10, 76) { - stl_vector(4) { - number 32, true - } - } - field(:layer_nonsolid, 88) { - stl_vector(4) { - number 32, true - } - } - field(:nonsolid_layers, 100) { - stl_vector(4) { - number 32, true - } - } - field(:anon_1, 112) { - number 32, true - } - field(:materials, 116) { - global :MaterialVecRef - } - field(:unk15a, 140) { - number 32, true - } - field(:unk15b, 144) { - number 32, true - } - field(:unk15c, 148) { - number 32, true - } - field(:unk15d, 152) { - number 32, true - } - field(:clothing_items, 156) { - pointer { - stl_vector(4) { - pointer { - global :CasteClothingItem - } - } - } - } -end - -class CasteClothingItem < MemHack::Compound - sizeof 68 - - field(:body_part_id, 0) { - number 16, true - } - field(:unk_4, 4) { - number 32, true - } - field(:item, 8) { - static_array(3, 4) { - pointer { - global :Item - } - } - } - field(:unk_14, 20) { - static_array(3, 4) { - number 32, true - } - } - field(:size, 32) { - static_array(3, 4) { - number 32, true - } - } - field(:permit, 44) { - static_array(3, 4) { - number 32, true - } - } - field(:unk_38, 56) { - static_array(3, 4) { - number 32, true - } - } -end - -class CasteRaw < MemHack::Compound - sizeof 5628 - - field(:caste_id, 0) { - stl_string - } - field(:caste_name, 4) { - static_array(3, 4) { - stl_string - } - } - field(:vermin_bite_txt, 16) { - stl_string - } - field(:gnawer_txt, 20) { - stl_string - } - field(:baby_name, 24) { - static_array(2, 4) { - stl_string - } - } - field(:child_name, 32) { - static_array(2, 4) { - stl_string - } - } - field(:itemcorpse_str, 40) { - static_array(5, 4) { - stl_string - } - } - field(:remains, 60) { - static_array(2, 4) { - stl_string - } - } - field(:description, 68) { - stl_string - } - field(:mannerisms, 72) { - static_array(17, 4) { - stl_string - } - } - field(:caste_tile, 140) { - number 8, false - } - field(:caste_soldier_tile, 141) { - number 8, false - } - field(:caste_alttile, 142) { - number 8, false - } - field(:caste_soldier_alttile, 143) { - number 8, false - } - field(:caste_glowtile, 144) { - number 8, false - } - field(:homeotherm, 146) { - number 16, false - } - field(:unk1_1, 148) { - number 16, true - } - field(:unk1_2, 150) { - number 16, true - } - field(:fixed_temp, 152) { - number 16, false - } - field(:caste_color, 154) { - static_array(3, 2) { - number 16, true - } - } - field(:misc, 160) { - compound(:CasteRaw_TMisc) { - field(:litter_size_min, 0) { - number 16, true - } - field(:litter_size_max, 2) { - number 16, true - } - field(:penetratepower, 4) { - number 16, true - } - field(:vermin_bite_chance, 6) { - number 16, true - } - field(:grasstrample, 8) { - number 16, true - } - field(:buildingdestroyer, 10) { - number 16, true - } - field(:itemcorpse_itemtype, 12) { - number 16, true, nil, ItemType - } - field(:itemcorpse_itemsubtype, 14) { - number 16, true - } - field(:itemcorpse_materialtype, 16) { - number 16, true - } - field(:itemcorpse_materialindex, 18) { - number 16, true - } - field(:itemcorpse_quality, 20) { - number 16, true - } - field(:remains_color, 22) { - static_array(3, 2) { - number 16, true - } - } - field(:difficulty, 28) { - number 16, true - } - field(:caste_glowcolor, 30) { - static_array(3, 2) { - number 16, true - } - } - field(:beach_frequency, 36) { - number 16, true - } - field(:clutch_size_min, 38) { - number 16, true - } - field(:clutch_size_max, 40) { - number 16, true - } - field(:speed, 44) { - number 32, true - } - field(:modvalue, 48) { - number 32, true - } - field(:petvalue, 52) { - number 32, true - } - field(:milkable, 56) { - number 32, true - } - field(:viewrange, 60) { - number 32, true - } - field(:maxage_min, 64) { - number 32, true - } - field(:maxage_max, 68) { - number 32, true - } - field(:baby_age, 72) { - number 32, true - } - field(:child_age, 76) { - number 32, true - } - field(:swim_speed, 80) { - number 32, true - } - field(:trade_capacity, 84) { - number 32, true - } - field(:unk4, 88) { - number 32, true - } - field(:pop_ratio, 92) { - number 32, true - } - field(:adult_size, 96) { - number 32, true - } - field(:unk5, 100) { - static_array(4, 4) { - number 32, true - } - } - field(:attack_trigger, 116) { - static_array(3, 4) { - number 32, true - } - } - field(:egg_size, 128) { - number 32, true - } - field(:grazer, 132) { - number 32, true - } - field(:petvalue_divisor, 136) { - number 32, true - } - field(:prone_to_rage, 140) { - number 32, true - } - field(:unk6, 144) { - static_array(29, 4) { - number 32, true - } - } - } - } - field(:personality, 420) { - compound(:CasteRaw_TPersonality) { - field(:a, 0) { - static_array(30, 2, PersonalityFacetType) { - number 16, true - } - } - field(:b, 60) { - static_array(30, 2, PersonalityFacetType) { - number 16, true - } - } - field(:c, 120) { - static_array(30, 2, PersonalityFacetType) { - number 16, true - } - } - } - } - field(:flags, 600) { - df_flagarray(CasteRawFlags) - } - field(:index, 608) { - number 32, true - } - field(:body_info, 612) { - global :CasteBodyInfo - } - field(:caste_speech_1, 772) { - stl_vector - } - field(:caste_speech_2, 784) { - stl_vector - } - field(:skill_rates, 796) { - static_array(4, 464) { - static_array(116, 4, JobSkill) { - number 32, true - } - } - } - field(:attributes, 2652) { - compound(:CasteRaw_TAttributes) { - field(:phys_att_range, 0) { - static_array(6, 28, PhysicalAttributeType) { - static_array(7, 4) { - number 32, true - } - } - } - field(:ment_att_range, 168) { - static_array(13, 28, MentalAttributeType) { - static_array(7, 4) { - number 32, true - } - } - } - field(:phys_att_rates, 532) { - static_array(6, 16, PhysicalAttributeType) { - static_array(4, 4) { - number 32, true - } - } - } - field(:ment_att_rates, 628) { - static_array(13, 16, MentalAttributeType) { - static_array(4, 4) { - number 32, true - } - } - } - field(:phys_att_cap_perc, 836) { - static_array(6, 4, PhysicalAttributeType) { - number 32, true - } - } - field(:ment_att_cap_perc, 860) { - static_array(13, 4, MentalAttributeType) { - number 32, true - } - } - } - } - field(:gender, 3564) { - number 8, false - } - field(:body_size_1, 3568) { - stl_vector(4) { - number 32, true - } - } - field(:body_size_2, 3580) { - stl_vector(4) { - number 32, true - } - } - field(:body_appearance_modifiers, 3592) { - stl_vector - } - field(:tissue_appearance_modifiers, 3604) { - stl_vector - } - field(:unk_1184, 3616) { - stl_vector(4) { - number 32, true - } - } - field(:unk_1194, 3628) { - stl_vector(2) { - number 16, true - } - } - field(:unk_11a4, 3640) { - stl_vector(2) { - number 16, true - } - } - field(:unk_11b4, 3652) { - stl_vector(2) { - number 16, true - } - } - field(:unk_11c4, 3664) { - stl_vector(2) { - number 16, true - } - } - field(:unk_11d4, 3676) { - stl_vector(4) { - number 32, true - } - } - field(:color_modifiers, 3688) { - stl_vector(4) { - pointer { - global :ColorModifierRaw - } - } - } - field(:unk_11f4, 3700) { - stl_vector - } - field(:unk_1204, 3712) { - stl_vector - } - field(:unk16a, 3724) { - static_array(4, 12) { - stl_vector - } - } - field(:unk16b, 3772) { - static_array(4, 12) { - stl_vector - } - } - field(:unk18, 3820) { - static_array(2, 4) { - number 32, true - } - } - field(:natural_skill_id, 3828) { - stl_vector(2) { - number 16, true - } - } - field(:natural_skill_exp, 3840) { - stl_vector(4) { - number 32, true - } - } - field(:natural_skill_lvl, 3852) { - stl_vector(4) { - number 32, true - } - } - field(:caste_profession_name, 3864) { - compound(:CasteRaw_TCasteProfessionName) { - field(:singular, 0) { - static_array(106, 4, Profession) { - stl_string - } - } - field(:plural, 424) { - static_array(106, 4, Profession) { - stl_string - } - } - } - } - field(:extracts, 4712) { - compound(:CasteRaw_TExtracts) { - field(:extract_mat, 0) { - stl_vector(2) { - number 16, true - } - } - field(:extract_matidx, 12) { - stl_vector(4) { - number 32, true - } - } - field(:extract_str, 24) { - static_array(3, 12) { - stl_vector(4) { - pointer { - stl_string - } - } - } - } - field(:milkable_mat, 60) { - number 16, true - } - field(:milkable_matidx, 64) { - number 32, true - } - field(:milkable_str, 68) { - static_array(3, 4) { - stl_string - } - } - field(:webber_mat, 80) { - number 16, true - } - field(:webber_matidx, 84) { - number 32, true - } - field(:webber_str, 88) { - static_array(3, 4) { - stl_string - } - } - field(:vermin_bite_mat, 100) { - number 16, true - } - field(:vermin_bite_matidx, 104) { - number 32, true - } - field(:vermin_bite_chance, 108) { - number 16, true - } - field(:vermin_bite_str, 112) { - static_array(3, 4) { - stl_string - } - } - field(:tendons_mat, 124) { - number 16, true - } - field(:tendons_matidx, 128) { - number 32, true - } - field(:tendons_str, 132) { - static_array(3, 4) { - stl_string - } - } - field(:tendons_heal, 144) { - number 32, true - } - field(:ligaments_mat, 148) { - number 16, true - } - field(:ligaments_matidx, 152) { - number 32, true - } - field(:ligaments_str, 156) { - static_array(3, 4) { - stl_string - } - } - field(:ligaments_heal, 168) { - number 32, true - } - field(:blood_state, 172) { - number 16, true - } - field(:blood_mat, 174) { - number 16, true - } - field(:blood_matidx, 176) { - number 32, true - } - field(:blood_str, 180) { - static_array(3, 4) { - stl_string - } - } - field(:pus_state, 192) { - number 16, true - } - field(:pus_mat, 194) { - number 16, true - } - field(:pus_matidx, 196) { - number 32, true - } - field(:pus_str, 200) { - static_array(3, 4) { - stl_string - } - } - field(:egg_material_mattype, 212) { - stl_vector(2) { - number 16, true - } - } - field(:egg_material_matindex, 224) { - stl_vector(4) { - number 32, true - } - } - field(:egg_material_str, 236) { - static_array(3, 12) { - stl_vector(4) { - pointer { - stl_string - } - } - } - } - field(:lays_unusual_eggs_itemtype, 272) { - stl_vector(2) { - number 16, true, nil, ItemType - } - } - field(:lays_unusual_eggs_itemsubtype, 284) { - stl_vector - } - field(:lays_unusual_eggs_mattype, 296) { - stl_vector(2) { - number 16, true - } - } - field(:lays_unusual_eggs_matindex, 308) { - stl_vector(4) { - number 32, true - } - } - field(:lays_unusual_eggs_str, 320) { - static_array(5, 12) { - stl_vector(4) { - pointer { - stl_string - } - } - } - } - } - } - field(:unk22, 5092) { - stl_vector - } - field(:creature_class, 5104) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:unknown2, 5116) { - compound(:CasteRaw_TUnknown2) { - field(:unk23a, 0) { - stl_vector(4) { - number 32, true - } - } - field(:unk23b, 12) { - stl_vector(4) { - number 32, true - } - } - field(:unk23c, 24) { - stl_vector(4) { - number 32, true - } - } - field(:anon_1, 36) { - stl_vector(4) { - number 32, true - } - } - field(:anon_2, 48) { - stl_vector(4) { - number 32, true - } - } - field(:anon_3, 60) { - stl_vector(4) { - number 32, true - } - } - field(:anon_4, 72) { - stl_vector(4) { - number 32, true - } - } - field(:unk24_flags, 84) { - df_flagarray - } - field(:unk25_flags, 92) { - df_flagarray - } - field(:unk26, 100) { - static_array(33, 4) { - number 32, true - } - } - field(:materials, 232) { - global :MaterialVecRef - } - field(:unk_2f20, 256) { - stl_vector(2) { - number 16, true - } - } - field(:unk_2f30, 268) { - stl_vector(1) { - number 8, false - } - } - field(:unk_2f40, 280) { - stl_vector(4) { - number 32, true - } - } - field(:unk_2f50, 292) { - stl_vector(2) { - number 16, true - } - } - field(:mat_type, 304) { - number 16, true - } - field(:mat_index, 308) { - number 32, true - } - } - } - field(:habit_num, 5428) { - static_array(2, 4) { - number 32, true - } - } - field(:habit, 5436) { - static_array(2, 12) { - stl_vector - } - } - field(:lair, 5460) { - static_array(2, 12) { - stl_vector - } - } - field(:lair_characteristic, 5484) { - static_array(2, 12) { - stl_vector - } - } - field(:lair_hunter_speech, 5508) { - static_array(2, 12) { - stl_vector - } - } - field(:unk29, 5532) { - static_array(2, 12) { - stl_vector - } - } - field(:specific_food, 5556) { - static_array(2, 12) { - stl_vector - } - } - field(:sound, 5580) { - stl_vector(4) { - pointer { - } - } - } - field(:sound_alert, 5592) { - stl_vector(4) { - number 32, true - } - } - field(:sound_peaceful_intermittent, 5604) { - stl_vector(4) { - number 32, true - } - } - field(:anon_1, 5616) { - stl_vector(4) { - pointer { - } - } - } -end - -class CaveColumnLink < MemHack::Compound - sizeof 12 - - field(:item, 0) { - pointer { - } - } - field(:prev, 4) { - pointer { - global :CaveColumnLink - } - } - field(:next, 8) { - pointer { - global :CaveColumnLink - } - } -end - -class CieAddTagMask1 < MemHack::Compound - field(:_whole, 0) { - number 32, true - } - field(:EXTRAVISION, 0) { bit 0 } - field(:OPPOSED_TO_LIFE, 0) { bit 1 } - field(:NOT_LIVING, 0) { bit 2 } - field(:NOEXERT, 0) { bit 3 } - field(:NOPAIN, 0) { bit 4 } - field(:NOBREATHE, 0) { bit 5 } - field(:HAS_BLOOD, 0) { bit 6 } - field(:NOSTUN, 0) { bit 7 } - field(:NONAUSEA, 0) { bit 8 } - field(:NO_DIZZINESS, 0) { bit 9 } - field(:NO_FEVERS, 0) { bit 10 } - field(:TRANCES, 0) { bit 11 } - field(:NOEMOTION, 0) { bit 12 } - field(:LIKES_FIGHTING, 0) { bit 13 } - field(:PARALYZEIMMUNE, 0) { bit 14 } - field(:NOFEAR, 0) { bit 15 } - field(:NO_EAT, 0) { bit 16 } - field(:NO_DRINK, 0) { bit 17 } - field(:NO_SLEEP, 0) { bit 18 } - field(:MISCHIEVOUS, 0) { bit 19 } - field(:NO_PHYS_ATT_GAIN, 0) { bit 20 } - field(:NO_PHYS_ATT_RUST, 0) { bit 21 } - field(:NOTHOUGHT, 0) { bit 22 } - field(:NO_THOUGHT_CENTER_FOR_MOVEMENT, 0) { bit 23 } - field(:CAN_SPEAK, 0) { bit 24 } - field(:CAN_LEARN, 0) { bit 25 } - field(:UTTERANCES, 0) { bit 26 } - field(:CRAZED, 0) { bit 27 } - field(:BLOODSUCKER, 0) { bit 28 } - field(:NO_CONNECTIONS_FOR_MOVEMENT, 0) { bit 29 } - field(:SUPERNATURAL, 0) { bit 30 } -end - -class CieAddTagMask2 < MemHack::Compound - field(:_whole, 0) { - number 32, true - } - field(:NO_AGING, 0) { bit 0 } - field(:MORTAL, 0) { bit 1 } - field(:STERILE, 0) { bit 2 } - field(:FIT_FOR_ANIMATION, 0) { bit 3 } - field(:FIT_FOR_RESURRECTION, 0) { bit 4 } -end - -class ColorModifierRaw < MemHack::Compound - sizeof 104 - - field(:color_indexes, 0) { - stl_vector(4) { - number 32, true - } - } - def color_indexes_tg ; color_indexes.map { |i| df.world.raws.language.colors[i] } ; end - field(:unk2, 12) { - stl_vector(4) { - number 32, true - } - } - field(:unk3, 24) { - stl_vector(2) { - number 16, true - } - } - field(:unk4, 36) { - stl_vector(2) { - number 16, true - } - } - field(:unk5, 48) { - number 16, true - } - field(:start_date, 52) { - number 32, true - } - field(:end_date, 56) { - number 32, true - } - field(:unk6, 60) { - number 32, true - } - field(:part, 64) { - stl_string - } - field(:unk_6c, 68) { - number 16, true - } - field(:unk_6e, 70) { - number 16, true - } - field(:unk_70, 72) { - number 32, true - } - field(:unk_74, 76) { - number 32, true - } - field(:unk_78, 80) { - stl_vector(4) { - pointer { - } - } - } - field(:unk_88, 92) { - stl_vector(4) { - pointer { - } - } - } -end - -class Construction < MemHack::Compound - sizeof 20 - - field(:pos, 0) { - global :Coord - } - field(:item_type, 6) { - number 16, true, nil, ItemType - } - field(:item_subtype, 8) { - number 16, true - } - field(:mat_type, 10) { - number 16, true - } - field(:mat_index, 12) { - number 32, true - } - field(:flags, 16) { - global :ConstructionFlags - } - field(:original_tile, 18) { - number 16, true, nil, Tiletype - } -end - -class ConstructionFlags < MemHack::Compound - field(:_whole, 0) { - number 8, false - } - field(:top_of_wall, 0) { bit 1 } -end - -class Contaminant < MemHack::Compound - sizeof 24 - - field(:mat_type, 0) { - number 16, true - } - field(:mat_index, 4) { - number 32, true - } - field(:mat_state, 8) { - number 16, true, nil, MatterState - } - field(:temperature, 10) { - number 16, false - } - field(:temperature_fraction, 12) { - number 16, false - } - field(:size, 16) { - number 32, true - } - field(:unk, 20) { - number 16, true - } - field(:flags, 22) { - number 16, false - } -end - -class Coord < MemHack::Compound - sizeof 6 - - field(:x, 0) { - number 16, true, -30000 - } - field(:y, 2) { - number 16, true, -30000 - } - field(:z, 4) { - number 16, true, -30000 - } -end - -class Coord2d < MemHack::Compound - sizeof 4 - - field(:x, 0) { - number 16, true, -30000 - } - field(:y, 2) { - number 16, true, -30000 - } -end - -class Coord2dPath < MemHack::Compound - sizeof 24 - - field(:x, 0) { - stl_vector(2) { - number 16, true - } - } - field(:y, 12) { - stl_vector(2) { - number 16, true - } - } -end - -class CoordPath < MemHack::Compound - sizeof 36 - - field(:x, 0) { - stl_vector(2) { - number 16, true - } - } - field(:y, 12) { - stl_vector(2) { - number 16, true - } - } - field(:z, 24) { - stl_vector(2) { - number 16, true - } - } -end - -class CreatureInteractionEffect < MemHack::Compound - sizeof 92 - - rtti_classname :creature_interaction_effectst - - field(:flags, 4) { - global :CreatureInteractionEffectFlags - } - field(:prob, 8) { - number 32, true - } - field(:start, 12) { - number 32, true - } - field(:peak, 16) { - number 32, true - } - field(:end, 20) { - number 32, true - } - field(:syn_id, 24) { - number 32, true - } - def syn_tg ; df.world.raws.syndromes.all[syn_id] ; end - field(:id, 28) { - number 32, true - } - field(:syn_index, 32) { - number 32, true - } - field(:unk_4, 36) { - number 32, true - } - field(:unk_8, 40) { - number 32, true - } - field(:counter_trigger, 44) { - compound(:CreatureInteractionEffect_TCounterTrigger) { - field(:counter, 0) { - stl_vector(4) { - number 32, true, nil, MiscTraitType - } - } - field(:minval, 12) { - stl_vector(4) { - number 32, true - } - } - field(:maxval, 24) { - stl_vector(4) { - number 32, true - } - } - field(:required, 36) { - stl_vector(4) { - number 32, true - } - } - } - } - def getType() - CreatureInteractionEffectType.sym(DFHack.vmethod_call(self, 0)) - end - def clone() - ptr = DFHack.vmethod_call(self, 4) - class << self - global :CreatureInteractionEffect - end._at(ptr) if ptr != 0 - end - def getVector1() - ptr = DFHack.vmethod_call(self, 24) - class << self - stl_vector - end._at(ptr) if ptr != 0 - end - def getVector2() - ptr = DFHack.vmethod_call(self, 28) - class << self - stl_vector - end._at(ptr) if ptr != 0 - end - def getVector3() - ptr = DFHack.vmethod_call(self, 32) - class << self - stl_vector - end._at(ptr) if ptr != 0 - end - def checkAddFlag1(arg0) - val = DFHack.vmethod_call(self, 36, arg0) - (val & 1) != 0 - end - def setBodyMatInteractionName(arg0) - DFHack.vmethod_call(self, 40, arg0) ; nil - end - def parseSynAcquireType(type) - DFHack.vmethod_call(self, 44, type) ; nil - end - def setBodyTransform(race, caste) - DFHack.vmethod_call(self, 48, race, caste) ; nil - end - def checkMoonPhase(arg0, arg1, arg2) - DFHack.vmethod_call(self, 52, arg0, arg1, arg2) ; nil - end - def checkCounter(arg0, arg1, arg2, arg3) - DFHack.vmethod_call(self, 56, arg0, arg1, arg2, arg3) ; nil - end -end - -class CreatureInteractionEffectAddSimpleFlagst < CreatureInteractionEffect - sizeof 100 - - rtti_classname :creature_interaction_effect_add_simple_flagst - - field(:tags1, 92) { - global :CieAddTagMask1 - } - field(:tags2, 96) { - global :CieAddTagMask2 - } -end - -class CreatureInteractionEffectBleedingst < CreatureInteractionEffect - sizeof 132 - - rtti_classname :creature_interaction_effect_bleedingst - - field(:sev, 92) { - number 32, true - } - field(:target, 96) { - global :CreatureInteractionEffectTarget - } -end - -class CreatureInteractionEffectBlistersst < CreatureInteractionEffect - sizeof 132 - - rtti_classname :creature_interaction_effect_blistersst - - field(:sev, 92) { - number 32, true - } - field(:target, 96) { - global :CreatureInteractionEffectTarget - } -end - -class CreatureInteractionEffectBodyMatInteractionst < CreatureInteractionEffect - sizeof 112 - - rtti_classname :creature_interaction_effect_body_mat_interactionst - - field(:unk_6c, 92) { - stl_string - } - field(:unk_88, 96) { - number 32, true - } - field(:unk_8c, 100) { - number 32, true - } - field(:unk_90, 104) { - number 32, true - } - field(:unk_94, 108) { - stl_string - } -end - -class CreatureInteractionEffectBodyTransformationst < CreatureInteractionEffect - sizeof 112 - - rtti_classname :creature_interaction_effect_body_transformationst - - field(:unk_6c, 92) { - number 32, true - } - field(:race_str, 96) { - stl_string - } - field(:caste_str, 100) { - stl_string - } - field(:race, 104) { - number 32, true - } - def race_tg ; df.world.raws.creatures.all[race] ; end - field(:caste, 108) { - number 16, true - } -end - -class CreatureInteractionEffectBpAppearanceModifierst < CreatureInteractionEffect - sizeof 136 - - rtti_classname :creature_interaction_effect_bp_appearance_modifierst - - field(:unk_6c, 92) { - number 16, true - } - field(:value, 96) { - number 32, true - } - field(:target, 100) { - global :CreatureInteractionEffectTarget - } -end - -class CreatureInteractionEffectBruisingst < CreatureInteractionEffect - sizeof 132 - - rtti_classname :creature_interaction_effect_bruisingst - - field(:sev, 92) { - number 32, true - } - field(:target, 96) { - global :CreatureInteractionEffectTarget - } -end - -class CreatureInteractionEffectCanDoInteractionst < CreatureInteractionEffect - sizeof 288 - - rtti_classname :creature_interaction_effect_can_do_interactionst - - field(:unk_6c, 92) { - stl_vector - } - field(:unk_7c, 104) { - stl_vector - } - field(:unk_8c, 116) { - stl_string - } - field(:unk_a8, 120) { - stl_string - } - field(:unk_c4, 124) { - stl_string - } - field(:unk_e0, 128) { - number 16, true - } - field(:unk_e2, 130) { - } - field(:unk_e4, 132) { - stl_string - } - field(:unk_100, 136) { - stl_string - } - field(:unk_11c, 140) { - stl_string - } - field(:unk_138, 144) { - stl_string - } - field(:unk_154, 148) { - stl_string - } - field(:unk_170, 152) { - stl_string - } - field(:unk_18c, 156) { - stl_string - } - field(:unk_1a8, 160) { - stl_string - } - field(:unk_1c4, 164) { - number 32, true - } - field(:unk_1c8, 168) { - stl_vector - } - field(:unk_1d8, 180) { - stl_vector - } - field(:unk_1e8, 192) { - number 32, true - } - field(:unk_1ec, 196) { - stl_vector(4) { - pointer { - } - } - } - field(:unk_1fc, 208) { - stl_vector(4) { - number 32, true - } - } - field(:unk_20c, 220) { - stl_vector(4) { - number 32, true - } - } - field(:unk_21c, 232) { - stl_vector - } - field(:unk_22c, 244) { - stl_vector - } - field(:unk_23c, 256) { - stl_vector - } - field(:unk_24c, 268) { - stl_vector - } - field(:unk_25c, 280) { - stl_string - } - field(:unk_278, 284) { - number 32, true - } -end - -class CreatureInteractionEffectCoughBloodst < CreatureInteractionEffect - sizeof 96 - - rtti_classname :creature_interaction_effect_cough_bloodst - - field(:sev, 92) { - number 32, true - } -end - -class CreatureInteractionEffectDisplayNamest < CreatureInteractionEffect - sizeof 108 - - rtti_classname :creature_interaction_effect_display_namest - - field(:name, 92) { - stl_string - } - field(:name_plural, 96) { - stl_string - } - field(:name_adj, 100) { - stl_string - } - field(:anon_1, 104) { - number 32, true - } -end - -class CreatureInteractionEffectDisplaySymbolst < CreatureInteractionEffect - sizeof 100 - - rtti_classname :creature_interaction_effect_display_symbolst - - field(:unk_6c, 92) { - number 32, true - } - field(:unk_70, 96) { - number 32, true - } -end - -class CreatureInteractionEffectDizzinessst < CreatureInteractionEffect - sizeof 96 - - rtti_classname :creature_interaction_effect_dizzinessst - - field(:sev, 92) { - number 32, true - } -end - -class CreatureInteractionEffectDrowsinessst < CreatureInteractionEffect - sizeof 96 - - rtti_classname :creature_interaction_effect_drowsinessst - - field(:sev, 92) { - number 32, true - } -end - -class CreatureInteractionEffectFeverst < CreatureInteractionEffect - sizeof 96 - - rtti_classname :creature_interaction_effect_feverst - - field(:sev, 92) { - number 32, true - } -end - -class CreatureInteractionEffectFlags < MemHack::Compound - field(:_whole, 0) { - number 32, false - } - field(:SIZE_DELAYS, 0) { bit 0 } - field(:SIZE_DILUTES, 0) { bit 1 } - field(:VASCULAR_ONLY, 0) { bit 2 } - field(:MUSCULAR_ONLY, 0) { bit 3 } - field(:RESISTABLE, 0) { bit 4 } - field(:LOCALIZED, 0) { bit 5 } -end - -class CreatureInteractionEffectFlashSymbolst < CreatureInteractionEffect - sizeof 108 - - rtti_classname :creature_interaction_effect_flash_symbolst - - field(:sym_color, 92) { - number 32, true - } - field(:period, 96) { - number 32, true - } - field(:time, 100) { - number 32, true - } - field(:unk_78, 104) { - number 32, true - } -end - -class CreatureInteractionEffectImpairFunctionst < CreatureInteractionEffect - sizeof 132 - - rtti_classname :creature_interaction_effect_impair_functionst - - field(:sev, 92) { - number 32, true - } - field(:target, 96) { - global :CreatureInteractionEffectTarget - } -end - -class CreatureInteractionEffectMaterialForceAdjustst < CreatureInteractionEffect - sizeof 120 - - rtti_classname :creature_interaction_effect_material_force_adjustst - - field(:unk_6c, 92) { - stl_string - } - field(:unk_88, 96) { - stl_string - } - field(:unk_a4, 100) { - stl_string - } - field(:unk_c0, 104) { - number 16, true - } - field(:unk_c2, 106) { - } - field(:unk_c4, 108) { - number 32, true - } - field(:unk_c8, 112) { - number 32, true - } - field(:unk_cc, 116) { - number 32, true - } -end - -class CreatureInteractionEffectMentAttChangest < CreatureInteractionEffect - sizeof 196 - - rtti_classname :creature_interaction_effect_ment_att_changest - - field(:ment_att_perc, 92) { - static_array(13, 4, MentalAttributeType) { - number 32, true - } - } - field(:ment_att_unk, 144) { - static_array(13, 4, MentalAttributeType) { - number 32, true - } - } -end - -class CreatureInteractionEffectNauseast < CreatureInteractionEffect - sizeof 96 - - rtti_classname :creature_interaction_effect_nauseast - - field(:sev, 92) { - number 32, true - } -end - -class CreatureInteractionEffectNecrosisst < CreatureInteractionEffect - sizeof 132 - - rtti_classname :creature_interaction_effect_necrosisst - - field(:sev, 92) { - number 32, true - } - field(:target, 96) { - global :CreatureInteractionEffectTarget - } -end - -class CreatureInteractionEffectNumbnessst < CreatureInteractionEffect - sizeof 132 - - rtti_classname :creature_interaction_effect_numbnessst - - field(:sev, 92) { - number 32, true - } - field(:target, 96) { - global :CreatureInteractionEffectTarget - } -end - -class CreatureInteractionEffectOozingst < CreatureInteractionEffect - sizeof 132 - - rtti_classname :creature_interaction_effect_oozingst - - field(:sev, 92) { - number 32, true - } - field(:target, 96) { - global :CreatureInteractionEffectTarget - } -end - -class CreatureInteractionEffectPainst < CreatureInteractionEffect - sizeof 132 - - rtti_classname :creature_interaction_effect_painst - - field(:sev, 92) { - number 32, true - } - field(:target, 96) { - global :CreatureInteractionEffectTarget - } -end - -class CreatureInteractionEffectParalysisst < CreatureInteractionEffect - sizeof 132 - - rtti_classname :creature_interaction_effect_paralysisst - - field(:sev, 92) { - number 32, true - } - field(:target, 96) { - global :CreatureInteractionEffectTarget - } -end - -class CreatureInteractionEffectPhysAttChangest < CreatureInteractionEffect - sizeof 140 - - rtti_classname :creature_interaction_effect_phys_att_changest - - field(:phys_att_perc, 92) { - static_array(6, 4, PhysicalAttributeType) { - number 32, true - } - } - field(:phys_att_unk, 116) { - static_array(6, 4, PhysicalAttributeType) { - number 32, true - } - } -end - -class CreatureInteractionEffectRemoveSimpleFlagst < CreatureInteractionEffect - sizeof 100 - - rtti_classname :creature_interaction_effect_remove_simple_flagst - - field(:tags1, 92) { - global :CieAddTagMask1 - } - field(:tags2, 96) { - global :CieAddTagMask2 - } -end - -class CreatureInteractionEffectSkillRollAdjustst < CreatureInteractionEffect - sizeof 100 - - rtti_classname :creature_interaction_effect_skill_roll_adjustst - - field(:unk_6c, 92) { - number 32, true - } - field(:unk_70, 96) { - number 32, true - } -end - -class CreatureInteractionEffectSpeedChangest < CreatureInteractionEffect - sizeof 100 - - rtti_classname :creature_interaction_effect_speed_changest - - field(:unk_6c, 92) { - number 32, true - } - field(:unk_70, 96) { - number 32, true - } -end - -class CreatureInteractionEffectSwellingst < CreatureInteractionEffect - sizeof 132 - - rtti_classname :creature_interaction_effect_swellingst - - field(:sev, 92) { - number 32, true - } - field(:target, 96) { - global :CreatureInteractionEffectTarget - } -end - -class CreatureInteractionEffectTarget < MemHack::Compound - sizeof 36 - - field(:mode, 0) { - stl_vector(2) { - class ::DFHack::CreatureInteractionEffectTarget_TMode < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :BY_TYPE ; NUME[:BY_TYPE] = 0 - ENUM[1] = :BY_TOKEN ; NUME[:BY_TOKEN] = 1 - ENUM[2] = :BY_CATEGORY ; NUME[:BY_CATEGORY] = 2 - end - - number 16, true, nil, CreatureInteractionEffectTarget_TMode - } - } - field(:key, 12) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:tissue, 24) { - stl_vector(4) { - pointer { - stl_string - } - } - } -end - -class CreatureInteractionEffectUnconsciousnessst < CreatureInteractionEffect - sizeof 96 - - rtti_classname :creature_interaction_effect_unconsciousnessst - - field(:sev, 92) { - number 32, true - } -end - -class CreatureInteractionEffectVomitBloodst < CreatureInteractionEffect - sizeof 96 - - rtti_classname :creature_interaction_effect_vomit_bloodst - - field(:sev, 92) { - number 32, true - } -end - -class CreatureRaw < MemHack::Compound - sizeof 8088 - - field(:creature_id, 0) { - stl_string - } - field(:name, 4) { - static_array(3, 4) { - stl_string - } - } - field(:general_baby_name, 16) { - static_array(2, 4) { - stl_string - } - } - field(:general_child_name, 24) { - static_array(2, 4) { - stl_string - } - } - field(:creature_tile, 32) { - number 8, false - } - field(:creature_soldier_tile, 33) { - number 8, false - } - field(:alttile, 34) { - number 8, false - } - field(:soldier_alttile, 35) { - number 8, false - } - field(:glowtile, 36) { - number 8, false - } - field(:temperature1, 38) { - number 16, false - } - field(:temperature2, 40) { - number 16, false - } - field(:frequency, 42) { - number 16, true - } - field(:population_number, 44) { - static_array(2, 2) { - number 16, true - } - } - field(:cluster_number, 48) { - static_array(2, 2) { - number 16, true - } - } - field(:triggerable_group, 52) { - static_array(2, 2) { - number 16, true - } - } - field(:color, 56) { - static_array(3, 2) { - number 16, true - } - } - field(:glowcolor, 62) { - static_array(3, 2) { - number 16, true - } - } - field(:adultsize, 68) { - number 32, true - } - field(:prefstring, 72) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:sphere, 84) { - stl_vector(2) { - number 16, true - } - } - field(:caste, 96) { - stl_vector(4) { - pointer { - global :CasteRaw - } - } - } - field(:pop_ratio, 108) { - stl_vector(4) { - number 32, true - } - } - field(:flags, 120) { - df_flagarray(CreatureRawFlags) - } - field(:stuff, 128) { - } - field(:unk5, 6988) { - stl_vector - } - field(:speech1, 7000) { - stl_vector(1) { - number 8, false - } - } - field(:speech2, 7012) { - stl_vector(4) { - number 32, true - } - } - field(:speech3, 7024) { - stl_vector - } - field(:material, 7036) { - stl_vector(4) { - pointer { - global :Material - } - } - } - field(:tissue, 7048) { - stl_vector(4) { - pointer { - } - } - } - field(:profession_name, 7060) { - compound(:CreatureRaw_TProfessionName) { - field(:singular, 0) { - static_array(106, 4, Profession) { - stl_string - } - } - field(:plural, 424) { - static_array(106, 4, Profession) { - stl_string - } - } - } - } - field(:unk6pa, 7908) { - pointer { - } - } - field(:unk6pb, 7912) { - pointer { - } - } - field(:unk6, 7916) { - stl_vector(4) { - number 32, true - } - } - field(:unk7, 7928) { - stl_vector(4) { - number 32, true - } - } - field(:hive_product_0, 7940) { - stl_vector(4) { - number 32, true - } - } - field(:hive_product_1, 7952) { - stl_vector(4) { - number 32, true - } - } - field(:hive_product_2, 7964) { - stl_vector(2) { - number 16, true - } - } - field(:hive_product_3, 7976) { - stl_vector(2) { - number 16, true - } - } - field(:hive_product_4, 7988) { - stl_vector(2) { - number 16, true - } - } - field(:hive_product_5, 8000) { - stl_vector(4) { - number 32, true - } - } - field(:hive_product_tmpstr, 8012) { - static_array(5, 12) { - stl_vector(4) { - pointer { - stl_string - } - } - } - } - field(:unk8, 8072) { - number 32, true - } - field(:raws, 8076) { - stl_vector(4) { - pointer { - stl_string - } - } - } -end - -class CreatureVariation < MemHack::Compound - sizeof 40 - - field(:id, 0) { - stl_string - } - field(:cv_convert_tag, 4) { - stl_vector(4) { - pointer { - global :CreatureVariationConvertTag - } - } - } - field(:cv_new_tag, 16) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:cv_remove_tag, 28) { - stl_vector(4) { - pointer { - stl_string - } - } - } -end - -class CreatureVariationConvertTag < MemHack::Compound - sizeof 12 - - field(:cvct_master, 0) { - stl_string - } - field(:cvct_target, 4) { - stl_string - } - field(:cvct_replacement, 8) { - stl_string - } -end - -class CriminalCase < MemHack::Compound - sizeof 76 - - field(:id, 0) { - number 32, true - } - field(:mode, 4) { - class ::DFHack::CriminalCase_TMode < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :ProductionOrderViolation ; NUME[:ProductionOrderViolation] = 0 - ENUM[1] = :ExportViolation ; NUME[:ExportViolation] = 1 - ENUM[2] = :JobOrderViolation ; NUME[:JobOrderViolation] = 2 - ENUM[3] = :ConspiracyToSlowLabor ; NUME[:ConspiracyToSlowLabor] = 3 - ENUM[4] = :Murder ; NUME[:Murder] = 4 - ENUM[5] = :DisorderlyBehavior ; NUME[:DisorderlyBehavior] = 5 - ENUM[6] = :BuildingDestruction ; NUME[:BuildingDestruction] = 6 - ENUM[7] = :Vandalism ; NUME[:Vandalism] = 7 - end - - number 32, true, nil, CriminalCase_TMode - } - field(:anon_1, 8) { - number 32, true - } - field(:anon_2, 12) { - number 32, true - } - field(:anon_3, 16) { - number 32, true - } - field(:criminal, 20) { - number 32, true - } - def criminal_tg ; df.world.units.all[criminal] ; end - field(:convicted, 24) { - number 32, true - } - def convicted_tg ; df.world.units.all[convicted] ; end - field(:victim, 28) { - number 32, true - } - def victim_tg ; df.world.units.all[victim] ; end - field(:flags, 32) { - compound(:CriminalCase_TFlags) { - field(:_whole, 0) { - number 32, true - } - field(:sentenced, 0) { bit 0 } - field(:discovered, 0) { bit 1 } - field(:needs_trial, 0) { bit 2 } - } - } - field(:death_id, 36) { - number 32, true - } - def death_tg ; df.world.deaths.all[death_id] ; end - field(:event_year, 40) { - number 32, true - } - field(:event_time, 44) { - number 32, true - } - field(:discovered_year, 48) { - number 32, true - } - field(:discovered_time, 52) { - number 32, true - } - field(:site, 56) { - number 32, true - } - def site_tg ; df.world.world_data.sites[site] ; end - field(:entity, 60) { - number 32, true - } - def entity_tg ; df.world.entities.all[entity] ; end - field(:anon_4, 64) { - stl_vector(4) { - pointer { - compound(:CriminalCase_TAnon4) { - sizeof 36 - - field(:unk_0, 0) { - number 32, true - } - field(:unk_4, 4) { - number 32, true - } - field(:unk_8, 8) { - number 32, true - } - field(:event_year, 12) { - number 32, true - } - field(:event_time, 16) { - number 32, true - } - field(:witness, 20) { - number 32, true - } - def witness_tg ; df.world.units.all[witness] ; end - field(:accuses, 24) { - number 32, true - } - def accuses_tg ; df.world.units.all[accuses] ; end - field(:report_year, 28) { - number 32, true - } - field(:report_time, 32) { - number 32, true - } - } - } - } - } -end - -class DInit < MemHack::Compound - sizeof 232 - - field(:flags1, 0) { - df_flagarray(DInitFlags1) - } - field(:nickname_dwarf, 8) { - number 32, true, nil, DInitNickname - } - field(:nickname_adventure, 12) { - number 32, true, nil, DInitNickname - } - field(:nickname_legends, 16) { - number 32, true, nil, DInitNickname - } - field(:nickname_dwarf2, 20) { - number 32, true, nil, DInitNickname - } - field(:unk_18, 24) { - number 32, true - } - field(:unk_1c, 28) { - number 32, true - } - field(:sky_tile, 32) { - number 8, false - } - field(:sky_color, 34) { - static_array(3, 2) { - number 16, true - } - } - field(:chasm_tile, 40) { - number 8, false - } - field(:pillar_tile, 41) { - number 8, false - } - field(:anon_1, 42) { - } - field(:chasm_color, 102) { - static_array(3, 2) { - number 16, true - } - } - field(:wound_color, 108) { - compound(:DInit_TWoundColor) { - field(:none, 0) { - static_array(3, 2) { - number 16, true - } - } - field(:minor, 6) { - static_array(3, 2) { - number 16, true - } - } - field(:inhibited, 12) { - static_array(3, 2) { - number 16, true - } - } - field(:function_loss, 18) { - static_array(3, 2) { - number 16, true - } - } - field(:broken, 24) { - static_array(3, 2) { - number 16, true - } - } - field(:missing, 30) { - static_array(3, 2) { - number 16, true - } - } - } - } - field(:idlers, 144) { - number 16, true, nil, DInitIdlers - } - field(:show_embark_tunnel, 146) { - number 16, true, nil, DInitTunnel - } - field(:flags2, 148) { - df_flagarray(DInitFlags2) - } - field(:display_length, 156) { - number 32, true - } - field(:adventurer_z_view, 160) { - number 32, true, nil, DInitZView - } - field(:adventurer_z_view_size, 164) { - number 32, true - } - field(:flags3, 168) { - df_flagarray(DInitFlags3) - } - field(:population_cap, 176) { - number 32, true - } - field(:baby_cap_absolute, 180) { - number 32, true - } - field(:baby_cap_percent, 184) { - number 32, true - } - field(:path_cost, 188) { - static_array(4, 4) { - number 32, true - } - } - field(:embark_rect, 204) { - static_array(2, 2) { - number 16, true - } - } - field(:store_dist, 208) { - compound(:DInit_TStoreDist) { - field(:item_decrease, 0) { - number 16, true - } - field(:seed_combine, 2) { - number 16, true - } - field(:bucket_combine, 4) { - number 16, true - } - field(:barrel_combine, 6) { - number 16, true - } - field(:bin_combine, 8) { - number 16, true - } - } - } - field(:set_labor_lists, 218) { - number 8, true, nil, BooleanEnum - } - field(:anon_2, 220) { - number 32, true - } - field(:flags4, 224) { - df_flagarray(DInitFlags4) - } -end - -class DeathInfo < MemHack::Compound - sizeof 56 - - field(:id, 0) { - number 32, true - } - field(:unk_4, 4) { - number 32, true - } - field(:unk_8, 8) { - stl_vector(4) { - number 32, true - } - } - def unk_8_tg ; unk_8.map { |i| df.world.units.all[i] } ; end - field(:victim, 20) { - number 32, true - } - def victim_tg ; df.world.units.all[victim] ; end - field(:killer, 24) { - number 32, true - } - def killer_tg ; df.world.units.all[killer] ; end - field(:crime_id, 28) { - number 32, true - } - def crime_tg ; df.world.criminal_cases.all[crime_id] ; end - field(:site, 32) { - number 32, true - } - def site_tg ; df.world.world_data.sites[site] ; end - field(:entity, 36) { - number 32, true - } - def entity_tg ; df.world.entities.all[entity] ; end - field(:event_year, 40) { - number 32, true - } - field(:event_time, 44) { - number 32, true - } - field(:flags, 48) { - compound(:DeathInfo_TFlags) { - field(:_whole, 0) { - number 32, true - } - field(:announced_missing, 0) { bit 0 } - field(:discovered, 0) { bit 1 } - } - } - field(:death_cause, 52) { - number 16, true - } -end - -class DescriptorColor < MemHack::Compound - sizeof 48 - - field(:id, 0) { - stl_string - } - field(:word_unk, 4) { - stl_vector - } - field(:words, 16) { - stl_vector(4) { - number 32, true - } - } - def words_tg ; words.map { |i| df.world.raws.language.words[i] } ; end - field(:name, 28) { - stl_string - } - field(:unk_58, 32) { - number 16, true - } - field(:red, 36) { - float - } - field(:green, 40) { - float - } - field(:blue, 44) { - float - } -end - -class DescriptorPattern < MemHack::Compound - sizeof 32 - - field(:id, 0) { - stl_string - } - field(:colors, 4) { - stl_vector(2) { - number 16, true - } - } - def colors_tg ; colors.map { |i| df.world.raws.language.colors[i] } ; end - field(:pattern, 16) { - number 16, true, nil, PatternType - } - field(:cp_color, 20) { - stl_vector - } -end - -class DescriptorShape < MemHack::Compound - sizeof 56 - - field(:id, 0) { - stl_string - } - field(:word_unk, 4) { - stl_vector - } - field(:words, 16) { - stl_vector(4) { - number 32, true - } - } - def words_tg ; words.map { |i| df.world.raws.language.words[i] } ; end - field(:name, 28) { - stl_string - } - field(:name_plural, 32) { - stl_string - } - field(:adj, 36) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:gems_use, 48) { - compound(:DescriptorShape_TGemsUse) { - field(:_whole, 0) { - number 32, true - } - field(:noun, 0) { bit 0 } - field(:adj, 0) { bit 1 } - field(:adj_noun, 0) { bit 2 } - } - } - field(:tile, 52) { - number 8, false - } -end - -class DfhackMaterialCategory < MemHack::Compound - field(:_whole, 0) { - number 32, false - } - field(:plant, 0) { bit 0 } - field(:wood, 0) { bit 1 } - field(:cloth, 0) { bit 2 } - field(:silk, 0) { bit 3 } - field(:leather, 0) { bit 4 } - field(:bone, 0) { bit 5 } - field(:shell, 0) { bit 6 } - field(:wood2, 0) { bit 7 } - field(:soap, 0) { bit 8 } - field(:tooth, 0) { bit 9 } - field(:horn, 0) { bit 10 } - field(:pearl, 0) { bit 11 } - field(:yarn, 0) { bit 12 } - field(:metal, 0) { bit 13 } - field(:stone, 0) { bit 14 } - field(:sand, 0) { bit 15 } - field(:glass, 0) { bit 16 } - field(:clay, 0) { bit 17 } -end - -class DipscriptInfo < MemHack::Compound - sizeof 36 - - field(:unk1, 0) { - number 32, true - } - field(:script_file, 4) { - stl_string - } - field(:script_steps, 8) { - stl_vector(4) { - pointer { - } - } - } - field(:unknown, 20) { - stl_vector - } - field(:code, 32) { - stl_string - } -end - -class DoorFlags < MemHack::Compound - field(:_whole, 0) { - number 16, false - } - field(:forbidden, 0) { bit 0 } - field(:internal, 0) { bit 1 } - field(:taken_by_invaders, 0) { bit 2 } - field(:used_by_intruder, 0) { bit 3 } - field(:closed, 0) { bit 4 } - field(:operated_by_mechanisms, 0) { bit 5 } - field(:pet_passable, 0) { bit 6 } -end - -class DyeInfo < MemHack::Compound - sizeof 20 - - field(:mat_type, 0) { - number 16, true - } - field(:mat_index, 4) { - number 32, true - } - field(:dyer, 8) { - number 32, true - } - def dyer_tg ; df.world.history.figures[dyer] ; end - field(:quality, 12) { - number 16, true, nil, ItemQuality - } - field(:skill_rating, 14) { - number 16, true - } - field(:anon_1, 16) { - number 32, true - } -end - -class EffectInfo < MemHack::Compound - sizeof 28 - - field(:anon_1, 0) { - number 32, true - } - field(:anon_2, 4) { - pointer { - global :Job - } - } - field(:type, 8) { - number 16, true - } - field(:foreground, 10) { - number 16, true - } - field(:background, 12) { - number 16, true - } - field(:bright, 14) { - number 8, false - } - field(:pos, 16) { - global :Coord - } - field(:timer, 24) { - number 32, true - } -end - -class Enabler < MemHack::Compound - sizeof 604 - - field(:fullscreen, 0) { - number 8, true, nil, BooleanEnum - } - field(:overridden_grid_sizes, 4) { - stl_deque(8) { - compound(:Enabler_TOverriddenGridSizes) { - field(:anon_1, 0) { - number 32, true - } - field(:anon_2, 4) { - number 32, true - } - } - } - } - field(:renderer, 44) { - pointer { - } - } - field(:calculated_fps, 48) { - number 32, true - } - field(:calculated_gfps, 52) { - number 32, true - } - field(:frame_timings, 56) { - stl_deque(4) { - number 32, true - } - } - field(:gframe_timings, 96) { - stl_deque(4) { - number 32, true - } - } - field(:frame_sum, 136) { - number 32, true - } - field(:gframe_sum, 140) { - number 32, true - } - field(:frame_last, 144) { - number 32, true - } - field(:gframe_last, 148) { - number 32, true - } - field(:fps, 152) { - float - } - field(:gfps, 156) { - float - } - field(:fps_per_gfps, 160) { - float - } - field(:last_tick, 164) { - number 32, false - } - field(:outstanding_frames, 168) { - float - } - field(:outstanding_gframes, 172) { - float - } - field(:async_frames, 176) { - number 32, false - } - field(:async_paused, 180) { - number 8, true, nil, BooleanEnum - } - field(:async_tobox, 184) { - compound(:Enabler_TAsyncTobox) { - field(:sem, 0) { - pointer { - } - } - field(:queue, 4) { - stl_deque(8) { - compound(:Enabler_TAsyncTobox_TQueue) { - field(:cmd, 0) { - class ::DFHack::Enabler_TAsyncTobox_TQueue_TCmd < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :Pause ; NUME[:Pause] = 0 - ENUM[1] = :Start ; NUME[:Start] = 1 - ENUM[2] = :Render ; NUME[:Render] = 2 - ENUM[3] = :Inc ; NUME[:Inc] = 3 - ENUM[4] = :SetFps ; NUME[:SetFps] = 4 - end - - number 32, true, nil, Enabler_TAsyncTobox_TQueue_TCmd - } - field(:val, 4) { - number 32, true - } - } - } - } - field(:sem_fill, 44) { - pointer { - } - } - } - } - field(:async_frombox, 232) { - compound(:Enabler_TAsyncFrombox) { - field(:sem, 0) { - pointer { - } - } - field(:queue, 4) { - stl_deque(12) { - compound(:Enabler_TAsyncFrombox_TQueue) { - field(:msg, 0) { - class ::DFHack::Enabler_TAsyncFrombox_TQueue_TMsg < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :Quit ; NUME[:Quit] = 0 - ENUM[1] = :Complete ; NUME[:Complete] = 1 - ENUM[2] = :SetFps ; NUME[:SetFps] = 2 - ENUM[3] = :SetGfps ; NUME[:SetGfps] = 3 - ENUM[4] = :PushResize ; NUME[:PushResize] = 4 - ENUM[5] = :PopResize ; NUME[:PopResize] = 5 - ENUM[6] = :ResetTextures ; NUME[:ResetTextures] = 6 - end - - number 32, true, nil, Enabler_TAsyncFrombox_TQueue_TMsg - } - field(:fps, 4) { - number 32, true - } - field(:x, 4) { - number 32, true - } - field(:y, 8) { - number 32, true - } - } - } - } - field(:sem_fill, 44) { - pointer { - } - } - } - } - field(:async_zoom, 280) { - compound(:Enabler_TAsyncZoom) { - field(:sem, 0) { - pointer { - } - } - field(:queue, 4) { - stl_deque(4) { - class ::DFHack::Enabler_TAsyncZoom_TQueue < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :ZoomIn ; NUME[:ZoomIn] = 0 - ENUM[1] = :ZoomOut ; NUME[:ZoomOut] = 1 - ENUM[2] = :ZoomReset ; NUME[:ZoomReset] = 2 - ENUM[3] = :ZoomFullscreen ; NUME[:ZoomFullscreen] = 3 - ENUM[4] = :ZoomResetgrid ; NUME[:ZoomResetgrid] = 4 - end - - number 32, true, nil, Enabler_TAsyncZoom_TQueue - } - } - field(:sem_fill, 44) { - pointer { - } - } - } - } - field(:async_fromcomplete, 328) { - pointer { - } - } - field(:renderer_threadid, 332) { - number 32, false - } - field(:command_line, 336) { - stl_string - } - field(:ccolor, 340) { - static_array(16, 12) { - static_array(3, 4) { - float - } - } - } - field(:flag, 532) { - compound(:Enabler_TFlag) { - field(:_whole, 0) { - number 32, true - } - field(:render, 0) { bit 0 } - field(:maxfps, 0) { bit 1 } - } - } - field(:mouse_lbut, 536) { - number 8, false - } - field(:mouse_rbut, 537) { - number 8, false - } - field(:mouse_lbut_down, 538) { - number 8, false - } - field(:mouse_rbut_down, 539) { - number 8, false - } - field(:mouse_lbut_lift, 540) { - number 8, false - } - field(:mouse_rbut_lift, 541) { - number 8, false - } - field(:tracking_on, 542) { - number 8, false - } - field(:textures, 544) { - compound(:Enabler_TTextures) { - field(:raws, 0) { - stl_vector(4) { - pointer { - } - } - } - field(:uploaded, 12) { - number 8, true, nil, BooleanEnum - } - field(:gl_catalog, 16) { - number 32, false - } - field(:gl_texpos, 20) { - pointer { - } - } - } - } - field(:sync, 568) { - number 32, true - } - field(:text_system, 572) { - stl_vector(4) { - pointer { - } - } - } - field(:simticks, 584) { - compound(:Enabler_TSimticks) { - field(:sem, 0) { - pointer { - } - } - field(:value, 4) { - number 32, true - } - } - } - field(:gputicks, 592) { - compound(:Enabler_TGputicks) { - field(:sem, 0) { - pointer { - } - } - field(:value, 4) { - number 32, true - } - } - } - field(:clock, 600) { - number 32, false - } -end - -class Engraving < MemHack::Compound - sizeof 44 - - field(:artist, 0) { - number 32, true - } - def artist_tg ; df.world.history.figures[artist] ; end - field(:masterpiece_event, 4) { - number 32, true - } - def masterpiece_event_tg ; df.world.history.events[masterpiece_event] ; end - field(:skill_rating, 8) { - number 32, true - } - field(:pos, 12) { - global :Coord - } - field(:flags, 20) { - global :EngravingFlags - } - field(:tile, 24) { - number 8, false - } - field(:art_id, 28) { - number 32, true - } - def art_tg ; df.world.art_images[art_id] ; end - field(:art_subid, 32) { - number 16, true - } - field(:quality, 34) { - number 16, true, nil, ItemQuality - } - field(:unk1, 36) { - number 32, true, -1 - } - field(:unk2, 40) { - number 32, true, -1 - } -end - -class EngravingFlags < MemHack::Compound - field(:_whole, 0) { - number 32, false - } - field(:floor, 0) { bit 0 } - field(:west, 0) { bit 1 } - field(:east, 0) { bit 2 } - field(:north, 0) { bit 3 } - field(:south, 0) { bit 4 } - field(:hidden, 0) { bit 5 } - field(:northwest, 0) { bit 6 } - field(:northeast, 0) { bit 7 } - field(:southwest, 0) { bit 8 } - field(:southeast, 0) { bit 9 } -end - -class EntityActivityStatistics < MemHack::Compound - sizeof 8320 - - field(:food, 0) { - compound(:EntityActivityStatistics_TFood) { - field(:total, 0) { - number 32, true - } - field(:meat, 4) { - number 32, true - } - field(:fish, 8) { - number 32, true - } - field(:other, 12) { - number 32, true - } - field(:seeds, 16) { - number 32, true - } - field(:plant, 20) { - number 32, true - } - field(:drink, 24) { - number 32, true - } - } - } - field(:anon_1, 28) { - static_array(152, 2, Profession) { - number 16, true - } - } - field(:anon_2, 332) { - number 16, true - } - field(:anon_3, 334) { - number 16, true - } - field(:anon_4, 336) { - number 16, true - } - field(:anon_5, 338) { - number 16, true - } - field(:anon_6, 340) { - number 16, true - } - field(:anon_7, 342) { - number 16, true - } - field(:anon_8, 344) { - number 16, true - } - field(:anon_9, 348) { - number 32, true - } - field(:anon_10, 352) { - static_array(112, 4, ItemType) { - number 32, true - } - } - field(:unk530, 800) { - stl_vector(4) { - number 32, true - } - } - field(:wealth, 812) { - compound(:EntityActivityStatistics_TWealth) { - field(:total, 0) { - number 32, true - } - field(:weapons, 4) { - number 32, true - } - field(:armor, 8) { - number 32, true - } - field(:furniture, 12) { - number 32, true - } - field(:other, 16) { - number 32, true - } - field(:architecture, 20) { - number 32, true - } - field(:displayed, 24) { - number 32, true - } - field(:held, 28) { - number 32, true - } - field(:imported, 32) { - number 32, true - } - field(:anon_1, 36) { - number 32, true - } - field(:exported, 40) { - number 32, true - } - } - } - field(:anon_11, 856) { - static_array(7, 1040) { - static_array(260, 4, JobType) { - number 32, true - } - } - } - field(:anon_12, 8136) { - number 32, true - } - field(:anon_13, 8140) { - static_array(4, 20) { - static_array(5, 4) { - number 32, true - } - } - } - field(:anon_14, 8220) { - number 32, true - } - field(:anon_15, 8224) { - number 32, true - } - field(:anon_16, 8228) { - number 32, true - } - field(:anon_17, 8232) { - number 32, true - } - field(:anon_18, 8236) { - number 32, true - } - field(:unk2298, 8240) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:unk22a4, 8252) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:unk22b0, 8264) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:known_plants, 8276) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:anon_19, 8288) { - number 16, true - } - field(:anon_20, 8290) { - number 16, true - } - field(:anon_21, 8292) { - number 16, true - } - field(:anon_22, 8294) { - number 16, true - } - field(:anon_23, 8296) { - number 16, true - } - field(:anon_24, 8300) { - number 32, true - } - field(:unk22d8, 8304) { - stl_vector(4) { - number 32, true - } - } - field(:anon_25, 8316) { - number 32, true - } -end - -class EntityPopulation < MemHack::Compound - sizeof 128 - - field(:name, 0) { - global :LanguageName - } - field(:unk1, 60) { - stl_vector(2) { - number 16, true - } - } - def unk1_tg ; unk1.map { |i| df.world.raws.creatures.all[i] } ; end - field(:unk2, 72) { - stl_vector(4) { - number 32, true - } - } - field(:unk3, 84) { - stl_vector(4) { - number 32, true - } - } - field(:unk4, 96) { - stl_vector(4) { - pointer { - global :EntityPopulationUnk4 - } - } - } - field(:unk5, 108) { - number 32, true - } - field(:unk6, 112) { - number 32, true - } - field(:id, 116) { - number 32, true - } - field(:unk7, 120) { - number 8, true, nil, BooleanEnum - } - field(:civ_id, 124) { - number 32, true - } - def civ_tg ; df.world.entities.all[civ_id] ; end -end - -class EntityPopulationUnk4 < MemHack::Compound - sizeof 36 - - field(:anon_1, 0) { - stl_vector(4) { - pointer { - compound(:EntityPopulationUnk4_TAnon1) { - sizeof 12 - - field(:idx, 0) { - number 32, true - } - field(:unk1, 4) { - number 32, true - } - field(:unk2, 8) { - number 32, true - } - } - } - } - } - field(:anon_2, 12) { - stl_vector - } - field(:anon_3, 24) { - stl_vector(4) { - pointer { - compound(:EntityPopulationUnk4_TAnon3) { - sizeof 8 - - field(:idx, 0) { - number 32, true - } - field(:unk1, 4) { - number 32, true - } - } - } - } - } -end - -class EntityPosition < MemHack::Compound - sizeof 292 - - field(:code, 0) { - stl_string - } - field(:id, 4) { - number 32, true - } - field(:flags, 8) { - df_flagarray(EntityPositionFlags) - } - field(:allowed_creature, 16) { - stl_vector(4) { - number 32, true - } - } - field(:allowed_class, 28) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:rejected_creature, 40) { - stl_vector(4) { - number 32, true - } - } - field(:rejected_class, 52) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:name, 64) { - static_array(2, 4) { - stl_string - } - } - field(:name_female, 72) { - static_array(2, 4) { - stl_string - } - } - field(:name_male, 80) { - static_array(2, 4) { - stl_string - } - } - field(:spouse, 88) { - static_array(2, 4) { - stl_string - } - } - field(:spouse_female, 96) { - static_array(2, 4) { - stl_string - } - } - field(:spouse_male, 104) { - static_array(2, 4) { - stl_string - } - } - field(:squad, 112) { - static_array(2, 4) { - stl_string - } - } - field(:land_name, 120) { - stl_string - } - field(:squad_size, 124) { - number 16, true - } - field(:commander_id, 128) { - stl_vector(4) { - number 32, true - } - } - field(:commander_civ, 140) { - stl_vector(4) { - number 32, true - } - } - def commander_civ_tg ; commander_civ.map { |i| df.world.entities.all[i] } ; end - field(:commander_types, 152) { - stl_vector(2) { - number 16, true - } - } - field(:land_holder, 164) { - number 16, true - } - field(:requires_population, 166) { - number 16, true - } - field(:anon_1, 168) { - number 16, true - } - field(:precedence, 172) { - number 32, true, 30001 - } - field(:replaced_by, 176) { - number 32, true, -1 - } - field(:number, 180) { - number 16, true, 1 - } - field(:appointed_by, 184) { - stl_vector(4) { - number 32, true - } - } - field(:appointed_by_civ, 196) { - stl_vector(4) { - number 32, true - } - } - def appointed_by_civ_tg ; appointed_by_civ.map { |i| df.world.entities.all[i] } ; end - field(:succession_by_position, 208) { - stl_vector(4) { - number 32, true - } - } - field(:responsibilities, 220) { - static_array(25, 1, EntityPositionResponsibility) { - number 8, true, nil, BooleanEnum - } - } - field(:color, 246) { - static_array(3, 2) { - number 16, true - } - } - field(:required_boxes, 252) { - number 32, true - } - field(:required_cabinets, 256) { - number 32, true - } - field(:required_racks, 260) { - number 32, true - } - field(:required_stands, 264) { - number 32, true - } - field(:required_office, 268) { - number 32, true - } - field(:required_bedroom, 272) { - number 32, true - } - field(:required_dining, 276) { - number 32, true - } - field(:required_tomb, 280) { - number 32, true - } - field(:mandate_max, 284) { - number 32, true - } - field(:demand_max, 288) { - number 32, true - } -end - -class EntityPositionAssignment < MemHack::Compound - sizeof 32 - - field(:id, 0) { - number 32, true - } - field(:histfig, 4) { - number 32, true - } - def histfig_tg ; df.world.history.figures[histfig] ; end - field(:position_id, 8) { - number 32, true - } - field(:flags, 12) { - df_flagarray - } - field(:squad_id, 20) { - number 32, true - } - def squad_tg ; df.world.squads.all[squad_id] ; end - field(:anon_1, 24) { - number 32, true, -1 - } - field(:anon_2, 28) { - number 32, true, -1 - } -end - -class EntityPositionRaw < MemHack::Compound - sizeof 352 - - field(:code, 0) { - stl_string - } - field(:id, 4) { - number 32, true - } - field(:flags, 8) { - df_flagarray(EntityPositionRawFlags) - } - field(:allowed_creature_str, 16) { - static_array(2, 12) { - stl_vector(4) { - pointer { - stl_string - } - } - } - } - field(:allowed_creature, 40) { - stl_vector(4) { - number 32, true - } - } - field(:allowed_class, 52) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:rejected_creature_str, 64) { - static_array(2, 12) { - stl_vector(4) { - pointer { - stl_string - } - } - } - } - field(:rejected_creature, 88) { - stl_vector(4) { - number 32, true - } - } - field(:rejected_class, 100) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:name, 112) { - static_array(2, 4) { - stl_string - } - } - field(:name_female, 120) { - static_array(2, 4) { - stl_string - } - } - field(:name_male, 128) { - static_array(2, 4) { - stl_string - } - } - field(:spouse, 136) { - static_array(2, 4) { - stl_string - } - } - field(:spouse_female, 144) { - static_array(2, 4) { - stl_string - } - } - field(:spouse_male, 152) { - static_array(2, 4) { - stl_string - } - } - field(:squad, 160) { - static_array(2, 4) { - stl_string - } - } - field(:land_name, 168) { - stl_string - } - field(:squad_size, 172) { - number 16, true - } - field(:commander_str, 176) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:commander_id, 188) { - stl_vector(4) { - number 32, true - } - } - field(:commander_types, 200) { - stl_vector(2) { - number 16, true - } - } - field(:land_holder, 212) { - number 16, true - } - field(:number, 214) { - number 16, true - } - field(:requires_population, 216) { - number 16, true - } - field(:precedence, 220) { - number 32, true - } - field(:replaced_by_str, 224) { - stl_string - } - field(:replaced_by, 228) { - number 32, true - } - field(:appointed_by_str, 232) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:appointed_by, 244) { - stl_vector(4) { - number 32, true - } - } - field(:succession_by_position_str, 256) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:succession_by_position, 268) { - stl_vector(4) { - number 32, true - } - } - field(:responsibilities, 280) { - static_array(25, 1, EntityPositionResponsibility) { - number 8, true, nil, BooleanEnum - } - } - field(:color, 306) { - static_array(3, 2) { - number 16, true - } - } - field(:required_boxes, 312) { - number 32, true - } - field(:required_cabinets, 316) { - number 32, true - } - field(:required_racks, 320) { - number 32, true - } - field(:required_stands, 324) { - number 32, true - } - field(:required_office, 328) { - number 32, true - } - field(:required_bedroom, 332) { - number 32, true - } - field(:required_dining, 336) { - number 32, true - } - field(:required_tomb, 340) { - number 32, true - } - field(:mandate_max, 344) { - number 32, true - } - field(:demand_max, 348) { - number 32, true - } -end - -class EntityRaw < MemHack::Compound - sizeof 6592 - - field(:code, 0) { - stl_string - } - field(:creature_ids, 4) { - stl_vector(2) { - number 16, true - } - } - def creature_tgs ; creature_ids.map { |i| df.world.raws.creatures.all[i] } ; end - field(:creatures, 16) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:equipment, 28) { - compound(:EntityRaw_TEquipment) { - field(:digger_id, 0) { - stl_vector(2) { - number 16, true - } - } - def digger_tg ; digger_id.map { |i| df.world.raws.itemdefs.weapons[i] } ; end - field(:weapon_id, 12) { - stl_vector(2) { - number 16, true - } - } - def weapon_tg ; weapon_id.map { |i| df.world.raws.itemdefs.weapons[i] } ; end - field(:armor_id, 24) { - stl_vector(2) { - number 16, true - } - } - def armor_tg ; armor_id.map { |i| df.world.raws.itemdefs.armor[i] } ; end - field(:ammo_id, 36) { - stl_vector(2) { - number 16, true - } - } - def ammo_tg ; ammo_id.map { |i| df.world.raws.itemdefs.ammo[i] } ; end - field(:helm_id, 48) { - stl_vector(2) { - number 16, true - } - } - def helm_tg ; helm_id.map { |i| df.world.raws.itemdefs.helms[i] } ; end - field(:gloves_id, 60) { - stl_vector(2) { - number 16, true - } - } - def gloves_tg ; gloves_id.map { |i| df.world.raws.itemdefs.gloves[i] } ; end - field(:shoes_id, 72) { - stl_vector(2) { - number 16, true - } - } - def shoes_tg ; shoes_id.map { |i| df.world.raws.itemdefs.shoes[i] } ; end - field(:pants_id, 84) { - stl_vector(2) { - number 16, true - } - } - def pants_tg ; pants_id.map { |i| df.world.raws.itemdefs.pants[i] } ; end - field(:shield_id, 96) { - stl_vector(2) { - number 16, true - } - } - def shield_tg ; shield_id.map { |i| df.world.raws.itemdefs.shields[i] } ; end - field(:trapcomp_id, 108) { - stl_vector(2) { - number 16, true - } - } - def trapcomp_tg ; trapcomp_id.map { |i| df.world.raws.itemdefs.trapcomps[i] } ; end - field(:toy_id, 120) { - stl_vector(2) { - number 16, true - } - } - def toy_tg ; toy_id.map { |i| df.world.raws.itemdefs.toys[i] } ; end - field(:instrument_id, 132) { - stl_vector(2) { - number 16, true - } - } - def instrument_tg ; instrument_id.map { |i| df.world.raws.itemdefs.instruments[i] } ; end - field(:tool_id, 144) { - stl_vector(2) { - number 16, true - } - } - def tool_tg ; tool_id.map { |i| df.world.raws.itemdefs.tools[i] } ; end - field(:siegeammo_id, 156) { - stl_vector(2) { - number 16, true - } - } - def siegeammo_tg ; siegeammo_id.map { |i| df.world.raws.itemdefs.siege_ammo[i] } ; end - field(:armor_rarity, 168) { - stl_vector(1) { - number 8, false - } - } - field(:helm_rarity, 180) { - stl_vector(1) { - number 8, false - } - } - field(:gloves_rarity, 192) { - stl_vector(1) { - number 8, false - } - } - field(:shoes_rarity, 204) { - stl_vector(1) { - number 8, false - } - } - field(:pants_rarity, 216) { - stl_vector(1) { - number 8, false - } - } - field(:digger_str, 228) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:weapon_str, 240) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:armor_str, 252) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:ammo_str, 264) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:helm_str, 276) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:gloves_str, 288) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:shoes_str, 300) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:pants_str, 312) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:shield_str, 324) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:trapcomp_str, 336) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:toy_str, 348) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:instrument_str, 360) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:siegeammo_str, 372) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:tool_str, 384) { - stl_vector(4) { - pointer { - stl_string - } - } - } - } - } - field(:currency_value, 424) { - stl_vector(4) { - number 32, true - } - } - field(:flags, 436) { - df_flagarray(EntityRawFlags) - } - field(:translation, 444) { - stl_string - } - field(:symbols, 448) { - compound(:EntityRaw_TSymbols) { - field(:symbols1, 0) { - static_array(14, 144) { - static_array(12, 12) { - stl_vector(4) { - number 32, true - } - } - } - } - field(:symbols2, 2016) { - static_array(14, 144) { - static_array(12, 12) { - stl_vector(4) { - number 32, true - } - } - } - } - field(:symbols3, 4032) { - static_array(14, 12) { - stl_vector - } - } - field(:symbols4, 4200) { - static_array(14, 12) { - stl_vector - } - } - field(:cull_symbol, 4368) { - static_array(14, 12) { - stl_vector - } - } - } - } - field(:habitat, 4984) { - compound(:EntityRaw_THabitat) { - field(:sphere_alignment, 0) { - static_array(130, 4, SphereType) { - number 32, true - } - } - field(:art_facet_modifier, 520) { - static_array(4, 4, ArtFacetType) { - number 32, true - } - } - field(:art_image_element_modifier, 536) { - static_array(5, 4, ArtImageElementType) { - number 32, true - } - } - field(:item_improvement_modifier, 556) { - static_array(11, 4, ImprovementType) { - number 32, true - } - } - field(:adventure_tier, 600) { - number 32, true - } - field(:friendly_color, 604) { - static_array(3, 2) { - number 16, true - } - } - field(:default_site_type, 612) { - number 32, true - } - field(:likes_site, 616) { - static_array(11, 1, SiteType) { - number 8, false - } - } - field(:tolerates_site, 627) { - static_array(11, 1, SiteType) { - number 8, false - } - } - field(:biome_support, 640) { - static_array(51, 4, BiomeType) { - number 32, true - } - } - field(:start_biome, 844) { - static_array(51, 1, BiomeType) { - number 8, false - } - } - field(:active_season, 895) { - static_array(4, 1) { - number 8, false - } - } - } - } - field(:progress_trigger, 5884) { - compound(:EntityRaw_TProgressTrigger) { - field(:population, 0) { - number 16, true - } - field(:production, 2) { - number 16, true - } - field(:trade, 4) { - number 16, true - } - field(:pop_siege, 6) { - number 16, true - } - field(:prod_siege, 8) { - number 16, true - } - field(:trade_siege, 10) { - number 16, true - } - } - } - field(:ethic, 5896) { - static_array(22, 2, EthicType) { - number 16, true, nil, EthicResponse - } - } - field(:max_site_pop_number, 5940) { - number 32, true - } - field(:max_pop_number, 5944) { - number 32, true - } - field(:max_starting_civ_number, 5948) { - number 32, true - } - field(:religion, 5952) { - stl_vector(2) { - number 16, true - } - } - field(:religion_sphere, 5964) { - stl_vector(2) { - number 16, true, nil, SphereType - } - } - field(:jobs, 5976) { - compound(:EntityRaw_TJobs) { - field(:permitted_job, 0) { - static_array(106, 1, Profession) { - number 8, true, nil, BooleanEnum - } - } - field(:permitted_labor, 106) { - static_array(94, 1, UnitLabor) { - number 8, true, nil, BooleanEnum - } - } - field(:permitted_skill, 200) { - static_array(116, 1, JobSkill) { - number 8, true, nil, BooleanEnum - } - } - field(:world_construction, 316) { - static_array(4, 1, WorldConstructionType) { - number 8, true, nil, BooleanEnum - } - } - } - } - field(:positions, 6296) { - stl_vector(4) { - pointer { - global :EntityPositionRaw - } - } - } - field(:variable_positions, 6308) { - static_array(25, 1, EntityPositionResponsibility) { - number 8, false - } - } - field(:tissue_style, 6336) { - stl_vector(4) { - pointer { - } - } - } - field(:workshops, 6348) { - compound(:EntityRaw_TWorkshops) { - field(:permitted_building_str, 0) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:permitted_building_id, 12) { - stl_vector(4) { - number 32, true - } - } - def permitted_building_tg ; permitted_building_id.map { |i| df.world.raws.buildings.all[i] } ; end - field(:permitted_reaction_str, 24) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:permitted_reaction_id, 36) { - stl_vector(4) { - number 32, true - } - } - } - } - field(:land_holder_trigger, 6396) { - compound(:EntityRaw_TLandHolderTrigger) { - field(:num, 0) { - static_array(10, 4) { - number 32, true - } - } - field(:population, 40) { - static_array(10, 4) { - number 32, true - } - } - field(:wealth, 80) { - static_array(10, 4) { - number 32, true - } - } - } - } - field(:banditry, 6516) { - number 32, true - } - field(:unk2, 6520) { - stl_vector - } - field(:currency, 6532) { - stl_vector - } - field(:gem_shapes, 6544) { - stl_vector(4) { - number 32, true - } - } - def gem_shapes_tg ; gem_shapes.map { |i| df.world.raws.language.shapes[i] } ; end - field(:stone_shapes, 6556) { - stl_vector(4) { - number 32, true - } - } - def stone_shapes_tg ; stone_shapes.map { |i| df.world.raws.language.shapes[i] } ; end - field(:anon_1, 6568) { - stl_vector - } - field(:anon_2, 6580) { - stl_vector - } -end - -class EntityUniform < MemHack::Compound - sizeof 268 - - field(:id, 0) { - number 32, true - } - field(:unk_4, 4) { - number 16, true - } - field(:uniform_item_types, 8) { - static_array(7, 12, UniformCategory) { - stl_vector(2) { - number 16, true, nil, ItemType - } - } - } - field(:uniform_item_subtypes, 92) { - static_array(7, 12, UniformCategory) { - stl_vector(2) { - number 16, true - } - } - } - field(:uniform_item_info, 176) { - static_array(7, 12, UniformCategory) { - stl_vector(4) { - pointer { - global :EntityUniformItem - } - } - } - } - field(:name, 260) { - stl_string - } - field(:flags, 264) { - global :UniformFlags - } -end - -class EntityUniformItem < MemHack::Compound - sizeof 32 - - field(:unk_0, 0) { - number 16, true - } - field(:color, 2) { - number 16, true - } - field(:unk_4, 4) { - number 32, true - } - field(:unk_8, 8) { - number 32, true - } - field(:unk_c, 12) { - number 32, true - } - field(:indiv_choice, 16) { - global :UniformIndivChoice - } - field(:mattype, 20) { - number 16, true - } - field(:matindex, 24) { - number 32, true - } - field(:material_class, 28) { - number 16, true, nil, UniformMaterialClass - } -end - -class Feature < MemHack::Compound - sizeof 72 - - rtti_classname :featurest - - field(:population, 4) { - stl_vector(4) { - pointer { - global :WorldPopulation - } - } - } - field(:anon_1, 16) { - number 32, true - } - field(:anon_2, 20) { - number 16, true - } - field(:embark_pos, 24) { - global :Coord2dPath - } - field(:anon_3, 48) { - stl_vector(2) { - number 16, true - } - } - field(:anon_4, 60) { - stl_vector(2) { - number 16, true - } - } - def getType() - FeatureType.sym(DFHack.vmethod_call(self, 0)) - end - def write_file(arg0) - DFHack.vmethod_call(self, 4, arg0) ; nil - end - def read_file(arg0, loadversion) - DFHack.vmethod_call(self, 8, arg0, loadversion) ; nil - end -end - -class FeatureAlteration < MemHack::Compound - sizeof 4 - - rtti_classname :feature_alterationst - - def getType() - FeatureAlterationType.sym(DFHack.vmethod_call(self, 0)) - end - def write_file(arg0) - DFHack.vmethod_call(self, 4, arg0) ; nil - end - def read_file(arg0, loadversion) - DFHack.vmethod_call(self, 8, arg0, loadversion) ; nil - end -end - -class FeatureAlterationNewLavaFillZst < FeatureAlteration - sizeof 8 - - rtti_classname :feature_alteration_new_lava_fill_zst - - field(:anon_1, 4) { - number 32, true - } -end - -class FeatureAlterationNewPopMaxst < FeatureAlteration - sizeof 12 - - rtti_classname :feature_alteration_new_pop_maxst - - field(:anon_1, 4) { - number 32, true - } - field(:anon_2, 8) { - number 32, true - } -end - -class FeatureCavest < Feature - sizeof 72 - - rtti_classname :feature_cavest - -end - -class FeatureDeepSpecialTubest < Feature - sizeof 72 - - rtti_classname :feature_deep_special_tubest - -end - -class FeatureDeepSurfacePortalst < Feature - sizeof 72 - - rtti_classname :feature_deep_surface_portalst - -end - -class FeatureInit < MemHack::Compound - sizeof 36 - - rtti_classname :feature_initst - - field(:flags, 4) { - df_flagarray(FeatureInitFlags) - } - field(:anon_1, 12) { - stl_vector - } - field(:start_x, 24) { - number 16, true - } - field(:start_y, 26) { - number 16, true - } - field(:end_x, 28) { - number 16, true - } - field(:end_y, 30) { - number 16, true - } - field(:start_depth, 32) { - number 16, true - } - field(:end_depth, 34) { - number 16, true - } - def getType() - FeatureType.sym(DFHack.vmethod_call(self, 0)) - end - def write_file(arg0) - DFHack.vmethod_call(self, 4, arg0) ; nil - end - def read_file(arg0, loadversion) - DFHack.vmethod_call(self, 8, arg0, loadversion) ; nil - end - def createFeature() - ptr = DFHack.vmethod_call(self, 12) - class << self - global :Feature - end._at(ptr) if ptr != 0 - end - def recreateFeature() - ptr = DFHack.vmethod_call(self, 16) - class << self - global :Feature - end._at(ptr) if ptr != 0 - end - def destroyFeature() - DFHack.vmethod_call(self, 20) ; nil - end - def getFeature() - ptr = DFHack.vmethod_call(self, 24) - class << self - global :Feature - end._at(ptr) if ptr != 0 - end - def getMaterial(mat_type, mat_index) - DFHack.vmethod_call(self, 36, mat_type, mat_index) ; nil - end - def getColor(foreground, background, bright) - DFHack.vmethod_call(self, 56, foreground, background, bright) ; nil - end - def getName(name) - DFHack.vmethod_call(self, 60, name) ; nil - end - def getLayer() - val = DFHack.vmethod_call(self, 88) - end -end - -class FeatureInitCavest < FeatureInit - sizeof 40 - - rtti_classname :feature_init_cavest - - field(:feature, 36) { - pointer { - global :FeatureCavest - } - } -end - -class FeatureInitDeepSpecialTubest < FeatureInit - sizeof 48 - - rtti_classname :feature_init_deep_special_tubest - - field(:mat_type, 36) { - number 16, true - } - field(:mat_index, 40) { - number 32, true - } - field(:feature, 44) { - pointer { - global :FeatureDeepSpecialTubest - } - } -end - -class FeatureInitDeepSurfacePortalst < FeatureInit - sizeof 48 - - rtti_classname :feature_init_deep_surface_portalst - - field(:mat_type, 36) { - number 16, true - } - field(:mat_index, 40) { - number 32, true - } - field(:feature, 44) { - pointer { - global :FeatureDeepSurfacePortalst - } - } -end - -class FeatureInitMagmaCoreFromLayerst < FeatureInit - sizeof 44 - - rtti_classname :feature_init_magma_core_from_layerst - - field(:layer, 36) { - number 32, true - } - def layer_tg ; df.world.world_data.underground_regions[layer] ; end - field(:feature, 40) { - pointer { - global :FeatureMagmaCoreFromLayerst - } - } -end - -class FeatureInitMagmaPoolst < FeatureInit - sizeof 40 - - rtti_classname :feature_init_magma_poolst - - field(:feature, 36) { - pointer { - global :FeatureMagmaPoolst - } - } -end - -class FeatureInitOutdoorRiverst < FeatureInit - sizeof 40 - - rtti_classname :feature_init_outdoor_riverst - - field(:feature, 36) { - pointer { - global :FeatureOutdoorRiverst - } - } -end - -class FeatureInitPitst < FeatureInit - sizeof 40 - - rtti_classname :feature_init_pitst - - field(:feature, 36) { - pointer { - global :FeaturePitst - } - } -end - -class FeatureInitSubterraneanFromLayerst < FeatureInit - sizeof 44 - - rtti_classname :feature_init_subterranean_from_layerst - - field(:layer, 36) { - number 32, true - } - def layer_tg ; df.world.world_data.underground_regions[layer] ; end - field(:feature, 40) { - pointer { - global :FeatureSubterraneanFromLayerst - } - } -end - -class FeatureInitUnderworldFromLayerst < FeatureInit - sizeof 52 - - rtti_classname :feature_init_underworld_from_layerst - - field(:layer, 36) { - number 32, true - } - def layer_tg ; df.world.world_data.underground_regions[layer] ; end - field(:mat_type, 40) { - number 16, true - } - field(:mat_index, 44) { - number 32, true - } - field(:feature, 48) { - pointer { - global :FeatureUnderworldFromLayerst - } - } -end - -class FeatureInitVolcanost < FeatureInit - sizeof 40 - - rtti_classname :feature_init_volcanost - - field(:feature, 36) { - pointer { - global :FeatureVolcanost - } - } -end - -class FeatureMagmaCoreFromLayerst < Feature - sizeof 72 - - rtti_classname :feature_magma_core_from_layerst - -end - -class FeatureMagmaPoolst < Feature - sizeof 76 - - rtti_classname :feature_magma_poolst - - field(:anon_1, 72) { - number 32, true - } -end - -class FeatureOutdoorRiverst < Feature - sizeof 72 - - rtti_classname :feature_outdoor_riverst - -end - -class FeaturePitst < Feature - sizeof 72 - - rtti_classname :feature_pitst - -end - -class FeatureSubterraneanFromLayerst < Feature - sizeof 72 - - rtti_classname :feature_subterranean_from_layerst - -end - -class FeatureUnderworldFromLayerst < Feature - sizeof 72 - - rtti_classname :feature_underworld_from_layerst - -end - -class FeatureVolcanost < Feature - sizeof 76 - - rtti_classname :feature_volcanost - - field(:anon_1, 72) { - number 32, true - } -end - -class FlowInfo < MemHack::Compound - sizeof 28 - - field(:type, 0) { - number 16, true, nil, FlowType - } - field(:mat_type, 2) { - number 16, true - } - field(:mat_index, 4) { - number 32, true - } - field(:density, 8) { - number 16, true - } - field(:x, 10) { - number 16, true - } - field(:y, 12) { - number 16, true - } - field(:z, 14) { - number 16, true - } - field(:anon_1, 16) { - number 16, true - } - field(:anon_2, 18) { - number 16, true - } - field(:anon_3, 20) { - number 16, true - } - field(:anon_4, 22) { - number 16, true - } - field(:anon_5, 24) { - number 32, true - } -end - -class GateFlags < MemHack::Compound - field(:_whole, 0) { - number 16, false - } - field(:closed, 0) { bit 0 } - field(:closing, 0) { bit 1 } - field(:opening, 0) { bit 2 } - field(:collapsing, 0) { bit 3 } - field(:has_support, 0) { bit 4 } -end - -class GeneralRef < MemHack::Compound - sizeof 4 - - rtti_classname :general_refst - - def write_file(arg0) - DFHack.vmethod_call(self, 0, arg0) ; nil - end - def read_file(arg0, loadversion) - DFHack.vmethod_call(self, 4, arg0, loadversion) ; nil - end - def getType() - GeneralRefType.sym(DFHack.vmethod_call(self, 8)) - end - def getItem() - ptr = DFHack.vmethod_call(self, 12) - class << self - global :Item - end._at(ptr) if ptr != 0 - end - def getUnit() - ptr = DFHack.vmethod_call(self, 16) - class << self - global :Unit - end._at(ptr) if ptr != 0 - end - def getProjectile() - ptr = DFHack.vmethod_call(self, 20) - class << self - global :Projectile - end._at(ptr) if ptr != 0 - end - def getBuilding() - ptr = DFHack.vmethod_call(self, 24) - class << self - global :Building - end._at(ptr) if ptr != 0 - end - def getEntity() - ptr = DFHack.vmethod_call(self, 28) - class << self - global :HistoricalEntity - end._at(ptr) if ptr != 0 - end - def getArtifact() - ptr = DFHack.vmethod_call(self, 32) - class << self - global :ArtifactRecord - end._at(ptr) if ptr != 0 - end - def getNemesis() - ptr = DFHack.vmethod_call(self, 36) - class << self - global :NemesisRecord - end._at(ptr) if ptr != 0 - end - def setID(arg0) - DFHack.vmethod_call(self, 40, arg0) ; nil - end - def getID() - val = DFHack.vmethod_call(self, 44) - end - def clone() - ptr = DFHack.vmethod_call(self, 64) - class << self - global :GeneralRef - end._at(ptr) if ptr != 0 - end -end - -class GeneralRefAbstractBuildingst < GeneralRef - sizeof 12 - - rtti_classname :general_ref_abstract_buildingst - - field(:anon_1, 4) { - number 32, true - } - field(:anon_2, 8) { - number 32, true - } -end - -class GeneralRefArtifact < GeneralRef - sizeof 8 - - rtti_classname :general_ref_artifactst - - field(:artifact_id, 4) { - number 32, true - } - def artifact_tg ; df.world.artifacts.all[artifact_id] ; end -end - -class GeneralRefBuilding < GeneralRef - sizeof 8 - - rtti_classname :general_ref_buildingst - - field(:building_id, 4) { - number 32, true - } - def building_tg ; df.world.buildings.all[building_id] ; end -end - -class GeneralRefBuildingCagedst < GeneralRefBuilding - sizeof 8 - - rtti_classname :general_ref_building_cagedst - -end - -class GeneralRefBuildingChainst < GeneralRefBuilding - sizeof 8 - - rtti_classname :general_ref_building_chainst - -end - -class GeneralRefBuildingCivzoneAssignedst < GeneralRefBuilding - sizeof 8 - - rtti_classname :general_ref_building_civzone_assignedst - -end - -class GeneralRefBuildingDestinationst < GeneralRefBuilding - sizeof 8 - - rtti_classname :general_ref_building_destinationst - -end - -class GeneralRefBuildingHolderst < GeneralRefBuilding - sizeof 8 - - rtti_classname :general_ref_building_holderst - -end - -class GeneralRefBuildingNestBoxst < GeneralRefBuilding - sizeof 8 - - rtti_classname :general_ref_building_nest_boxst - -end - -class GeneralRefBuildingTriggerst < GeneralRefBuilding - sizeof 8 - - rtti_classname :general_ref_building_triggerst - -end - -class GeneralRefBuildingTriggertargetst < GeneralRefBuilding - sizeof 8 - - rtti_classname :general_ref_building_triggertargetst - -end - -class GeneralRefBuildingUseTarget1st < GeneralRefBuilding - sizeof 8 - - rtti_classname :general_ref_building_use_target_1st - -end - -class GeneralRefBuildingUseTarget2st < GeneralRefBuilding - sizeof 8 - - rtti_classname :general_ref_building_use_target_2st - -end - -class GeneralRefBuildingWellTag < GeneralRefBuilding - sizeof 12 - - rtti_classname :general_ref_building_well_tagst - - field(:unk, 8) { - number 8, true, nil, BooleanEnum - } -end - -class GeneralRefCoinbatch < GeneralRef - sizeof 8 - - rtti_classname :general_ref_coinbatchst - - field(:batch, 4) { - number 32, true - } -end - -class GeneralRefItem < GeneralRef - sizeof 8 - - rtti_classname :general_ref_itemst - - field(:item_id, 4) { - number 32, true - } - def item_tg ; df.world.items.all[item_id] ; end -end - -class GeneralRefContainedInItemst < GeneralRefItem - sizeof 8 - - rtti_classname :general_ref_contained_in_itemst - -end - -class GeneralRefContainsItemst < GeneralRefItem - sizeof 8 - - rtti_classname :general_ref_contains_itemst - -end - -class GeneralRefUnit < GeneralRef - sizeof 8 - - rtti_classname :general_ref_unitst - - field(:unit_id, 4) { - number 32, true - } - def unit_tg ; df.world.units.all[unit_id] ; end -end - -class GeneralRefContainsUnitst < GeneralRefUnit - sizeof 8 - - rtti_classname :general_ref_contains_unitst - -end - -class GeneralRefCreaturest < GeneralRef - sizeof 24 - - rtti_classname :general_ref_creaturest - - field(:anon_1, 4) { - number 32, true - } - field(:anon_2, 8) { - number 32, true - } - field(:anon_3, 12) { - number 32, true - } - field(:anon_4, 16) { - number 32, true - } - field(:anon_5, 20) { - number 32, true - } -end - -class GeneralRefEntity < GeneralRef - sizeof 8 - - rtti_classname :general_ref_entityst - - field(:entity_id, 4) { - number 32, true - } - def entity_tg ; df.world.entities.all[entity_id] ; end -end - -class GeneralRefEntityArtImage < GeneralRef - sizeof 12 - - rtti_classname :general_ref_entity_art_imagest - - field(:entity_id, 4) { - number 32, true - } - def entity_tg ; df.world.entities.all[entity_id] ; end - field(:unk, 8) { - number 32, true - } -end - -class GeneralRefEntityItemownerst < GeneralRefEntity - sizeof 8 - - rtti_classname :general_ref_entity_itemownerst - -end - -class GeneralRefEntityOfferedst < GeneralRefEntity - sizeof 8 - - rtti_classname :general_ref_entity_offeredst - -end - -class GeneralRefEntityPopst < GeneralRef - sizeof 20 - - rtti_classname :general_ref_entity_popst - - field(:anon_1, 4) { - number 32, true - } - field(:anon_2, 8) { - number 32, true - } - field(:anon_3, 12) { - number 32, true - } - field(:anon_4, 16) { - number 32, true - } -end - -class GeneralRefEntityStolenst < GeneralRefEntity - sizeof 8 - - rtti_classname :general_ref_entity_stolenst - -end - -class GeneralRefFeatureLayerst < GeneralRef - sizeof 8 - - rtti_classname :general_ref_feature_layerst - - field(:anon_1, 4) { - number 32, true - } -end - -class GeneralRefHistoricalEventst < GeneralRef - sizeof 8 - - rtti_classname :general_ref_historical_eventst - - field(:anon_1, 4) { - number 32, true - } -end - -class GeneralRefHistoricalFigurest < GeneralRef - sizeof 8 - - rtti_classname :general_ref_historical_figurest - - field(:anon_1, 4) { - number 32, true - } -end - -class GeneralRefInteractionst < GeneralRef - sizeof 20 - - rtti_classname :general_ref_interactionst - - field(:anon_1, 4) { - number 32, true - } - field(:anon_2, 8) { - number 32, true - } - field(:anon_3, 12) { - number 32, true - } - field(:anon_4, 16) { - number 32, true - } -end - -class GeneralRefIsArtifactst < GeneralRefArtifact - sizeof 8 - - rtti_classname :general_ref_is_artifactst - -end - -class GeneralRefNemesis < GeneralRef - sizeof 8 - - rtti_classname :general_ref_nemesisst - - field(:nemesis_id, 4) { - number 32, true - } - def nemesis_tg ; df.world.nemesis.all[nemesis_id] ; end -end - -class GeneralRefIsNemesisst < GeneralRefNemesis - sizeof 8 - - rtti_classname :general_ref_is_nemesisst - -end - -class GeneralRefItemType < GeneralRef - sizeof 16 - - rtti_classname :general_ref_item_typest - - field(:type, 4) { - number 32, true, nil, ItemType - } - field(:subtype, 8) { - number 32, true - } - field(:mat_type, 12) { - number 16, true - } - field(:mat_index, 14) { - number 16, true, -1 - } -end - -class GeneralRefLocationst < GeneralRef - sizeof 16 - - rtti_classname :general_ref_locationst - - field(:anon_1, 4) { - number 32, true - } - field(:anon_2, 8) { - number 32, true - } - field(:anon_3, 12) { - number 32, true - } -end - -class GeneralRefMapsquare < GeneralRef - sizeof 12 - - rtti_classname :general_ref_mapsquarest - - field(:unk1, 4) { - number 16, true - } - field(:unk2, 6) { - number 16, true - } - field(:unk3, 8) { - number 32, true - } -end - -class GeneralRefProjectile < GeneralRef - sizeof 8 - - rtti_classname :general_ref_projectilest - - field(:projectile_id, 4) { - number 32, true - } -end - -class GeneralRefSitest < GeneralRef - sizeof 8 - - rtti_classname :general_ref_sitest - - field(:anon_1, 4) { - number 32, true - } -end - -class GeneralRefSpherest < GeneralRef - sizeof 8 - - rtti_classname :general_ref_spherest - - field(:anon_1, 4) { - number 16, true - } -end - -class GeneralRefSubregionst < GeneralRef - sizeof 8 - - rtti_classname :general_ref_subregionst - - field(:anon_1, 4) { - number 32, true - } -end - -class GeneralRefUnitBeateest < GeneralRefUnit - sizeof 8 - - rtti_classname :general_ref_unit_beateest - -end - -class GeneralRefUnitCageest < GeneralRefUnit - sizeof 8 - - rtti_classname :general_ref_unit_cageest - -end - -class GeneralRefUnitFoodreceiverst < GeneralRefUnit - sizeof 8 - - rtti_classname :general_ref_unit_foodreceiverst - -end - -class GeneralRefUnitHolderst < GeneralRefUnit - sizeof 8 - - rtti_classname :general_ref_unit_holderst - -end - -class GeneralRefUnitInfantst < GeneralRefUnit - sizeof 8 - - rtti_classname :general_ref_unit_infantst - -end - -class GeneralRefUnitItemownerst < GeneralRefUnit - sizeof 12 - - rtti_classname :general_ref_unit_itemownerst - - field(:anon_1, 8) { - number 32, true - } -end - -class GeneralRefUnitKidnapeest < GeneralRefUnit - sizeof 8 - - rtti_classname :general_ref_unit_kidnapeest - -end - -class GeneralRefUnitMilkeest < GeneralRefUnit - sizeof 8 - - rtti_classname :general_ref_unit_milkeest - -end - -class GeneralRefUnitPatientst < GeneralRefUnit - sizeof 8 - - rtti_classname :general_ref_unit_patientst - -end - -class GeneralRefUnitReporteest < GeneralRefUnit - sizeof 8 - - rtti_classname :general_ref_unit_reporteest - -end - -class GeneralRefUnitRiderst < GeneralRefUnit - sizeof 8 - - rtti_classname :general_ref_unit_riderst - -end - -class GeneralRefUnitSheareest < GeneralRefUnit - sizeof 8 - - rtti_classname :general_ref_unit_sheareest - -end - -class GeneralRefUnitSlaughtereest < GeneralRefUnit - sizeof 8 - - rtti_classname :general_ref_unit_slaughtereest - -end - -class GeneralRefUnitSuckeest < GeneralRefUnit - sizeof 8 - - rtti_classname :general_ref_unit_suckeest - -end - -class GeneralRefUnitTradebringerst < GeneralRefUnit - sizeof 8 - - rtti_classname :general_ref_unit_tradebringerst - -end - -class GeneralRefUnitTraineest < GeneralRefUnit - sizeof 8 - - rtti_classname :general_ref_unit_traineest - -end - -class GeneralRefUnitWorkerst < GeneralRefUnit - sizeof 8 - - rtti_classname :general_ref_unit_workerst - -end - -class Graphic < MemHack::Compound - sizeof 892 - - field(:screenx, 0) { - number 32, true - } - field(:screeny, 4) { - number 32, true - } - field(:screenf, 8) { - number 8, false - } - field(:screenb, 9) { - number 8, false - } - field(:screenbright, 10) { - number 8, false - } - field(:screen, 12) { - pointer_ary(1) { - number 8, false - } - } - field(:screentexpos, 16) { - pointer_ary(4) { - number 32, true - } - } - field(:screentexpos_addcolor, 20) { - pointer_ary(1) { - number 8, false - } - } - field(:screentexpos_grayscale, 24) { - pointer_ary(1) { - number 8, false - } - } - field(:screentexpos_cf, 28) { - pointer_ary(1) { - number 8, false - } - } - field(:screentexpos_cbr, 32) { - pointer_ary(1) { - number 8, false - } - } - field(:clipx, 36) { - static_array(2, 4) { - number 32, true - } - } - field(:clipy, 44) { - static_array(2, 4) { - number 32, true - } - } - field(:tex_pos, 52) { - static_array(1, 4) { - number 32, true - } - } - field(:rect_id, 56) { - number 32, true - } - field(:print_time, 60) { - static_array(100, 8) { - number 64, true - } - } - field(:print_index, 860) { - number 32, true - } - field(:display_frames, 864) { - number 8, false - } - field(:force_full_display_count, 866) { - number 16, true - } - field(:original_rect, 868) { - number 8, false - } - field(:dimx, 872) { - number 32, true - } - field(:dimy, 876) { - number 32, true - } - field(:mouse_x, 880) { - number 32, true - } - field(:mouse_y, 884) { - number 32, true - } - field(:screen_limit, 888) { - pointer { - number 8, false - } - } -end - -class HaulingRoute < MemHack::Compound - sizeof 44 - - field(:id, 0) { - number 32, true - } - field(:name, 4) { - stl_string - } - field(:stops, 8) { - stl_vector(4) { - pointer { - global :HaulingStop - } - } - } - field(:vehicle_ids, 20) { - stl_vector(4) { - number 32, true - } - } - def vehicle_tgs ; vehicle_ids.map { |i| df.world.vehicles.all[i] } ; end - field(:vehicle_stops, 32) { - stl_vector(4) { - number 32, true - } - } -end - -class HaulingStop < MemHack::Compound - sizeof 1004 - - field(:id, 0) { - number 32, true - } - field(:name, 4) { - stl_string - } - field(:pos, 8) { - global :Coord - } - field(:settings, 16) { - global :StockpileSettings - } - field(:conditions, 972) { - stl_vector(4) { - pointer { - global :StopDepartCondition - } - } - } - field(:stockpiles, 984) { - stl_vector(4) { - pointer { - global :RouteStockpileLink - } - } - } - field(:time_waiting, 996) { - number 32, true - } - field(:cart_id, 1000) { - number 32, true - } - def cart_tg ; df.world.items.all[cart_id] ; end -end - -class HealthViewBits1 < MemHack::Compound - field(:_whole, 0) { - number 32, true - } - field(:bleeding_heavy, 0) { bit 0 } - field(:bleeding, 0) { bit 1 } - field(:pale, 0) { bit 2 } - field(:blood_loss_severe, 0) { bit 3 } - field(:faint, 0) { bit 4 } - field(:blood_loss, 0) { bit 5 } - field(:paralyzed, 0) { bit 6 } - field(:paralyzed_partially, 0) { bit 7 } - field(:sluggish, 0) { bit 8 } - field(:numb_completely, 0) { bit 9 } - field(:numb_partially, 0) { bit 10 } - field(:numb_slightly, 0) { bit 11 } - field(:fever_serious, 0) { bit 12 } - field(:fever_moderate, 0) { bit 13 } - field(:fever_slight, 0) { bit 14 } - field(:pain_extreme, 0) { bit 15 } - field(:pain_moderate, 0) { bit 16 } - field(:pain_slight, 0) { bit 17 } - field(:exhausted, 0) { bit 18 } - field(:overexerted, 0) { bit 19 } - field(:tired, 0) { bit 20 } - field(:stunned, 0) { bit 21 } - field(:dizzy, 0) { bit 22 } - field(:drowning, 0) { bit 23 } - field(:winded, 0) { bit 24 } - field(:nauseous, 0) { bit 25 } - field(:drowsy_very, 0) { bit 26 } - field(:drowsy, 0) { bit 27 } - field(:dehydrated, 0) { bit 28 } - field(:thirsty, 0) { bit 29 } - field(:starving, 0) { bit 30 } - field(:hungry, 0) { bit 31 } -end - -class HealthViewBits2 < MemHack::Compound - field(:_whole, 0) { - number 32, true - } - field(:breathe_cant, 0) { bit 0 } - field(:breathe_trouble, 0) { bit 1 } - field(:vision_lost, 0) { bit 2 } - field(:vision_impaired, 0) { bit 3 } - field(:vision_impaired2, 0) { bit 4 } - field(:stand_cant, 0) { bit 5 } - field(:stand_impaired, 0) { bit 6 } - field(:grasp_cant, 0) { bit 7 } - field(:grasp_impaired, 0) { bit 8 } - field(:fly_cant, 0) { bit 9 } - field(:fly_impaired, 0) { bit 10 } - field(:motor_nerve, 0) { bit 11 } - field(:sensory_nerve, 0) { bit 12 } - field(:spilled, 0) { bit 13 } - field(:artery_major, 0) { bit 14 } - field(:artery, 0) { bit 15 } - field(:tendon_torn, 0) { bit 16 } - field(:tendon_strain, 0) { bit 17 } - field(:tendon_bruise, 0) { bit 18 } - field(:ligament_torn, 0) { bit 19 } - field(:ligament_sprain, 0) { bit 20 } - field(:ligament_bruise, 0) { bit 21 } - field(:fracture_compound, 0) { bit 22 } - field(:fracture_overlap, 0) { bit 23 } - field(:need_setting, 0) { bit 24 } - field(:tissue_broken, 0) { bit 25 } - field(:tissue_part_broken, 0) { bit 26 } - field(:damage_heavy, 0) { bit 27 } - field(:damage_moderate, 0) { bit 28 } - field(:damage_light, 0) { bit 29 } - field(:pain_extreme, 0) { bit 30 } - field(:pain_moderate, 0) { bit 31 } -end - -class HealthViewBits3 < MemHack::Compound - field(:_whole, 0) { - number 32, true - } - field(:pain_minor, 0) { bit 0 } - field(:swell_extreme, 0) { bit 1 } - field(:swell_medium, 0) { bit 2 } - field(:swell_minor, 0) { bit 3 } - field(:infection, 0) { bit 4 } - field(:rq_diagnosis, 0) { bit 5 } - field(:rq_crutch, 0) { bit 6 } - field(:inoperable_rot, 0) { bit 7 } - field(:rq_cleaning, 0) { bit 8 } - field(:rq_surgery, 0) { bit 9 } - field(:rq_suture, 0) { bit 10 } - field(:rq_setting, 0) { bit 11 } - field(:rq_dressing, 0) { bit 12 } - field(:rq_traction, 0) { bit 13 } - field(:rq_immobilize, 0) { bit 14 } -end - -class HistfigEntityLink < MemHack::Compound - sizeof 12 - - rtti_classname :histfig_entity_linkst - - field(:entity_id, 4) { - number 32, true - } - def entity_tg ; df.world.entities.all[entity_id] ; end - field(:link_strength, 8) { - number 16, true - } - def getType() - HistfigEntityLinkType.sym(DFHack.vmethod_call(self, 0)) - end - def write_file(arg0) - DFHack.vmethod_call(self, 12, arg0) ; nil - end - def read_file(arg0, loadversion) - DFHack.vmethod_call(self, 16, arg0, loadversion) ; nil - end - def getPosition() - val = DFHack.vmethod_call(self, 20) - end - def getPositionStartYear() - val = DFHack.vmethod_call(self, 24) - end - def getPositionEndYear() - val = DFHack.vmethod_call(self, 28) - end -end - -class HistfigEntityLinkCriminalst < HistfigEntityLink - sizeof 12 - - rtti_classname :histfig_entity_link_criminalst - -end - -class HistfigEntityLinkEnemyst < HistfigEntityLink - sizeof 12 - - rtti_classname :histfig_entity_link_enemyst - -end - -class HistfigEntityLinkFormerMemberst < HistfigEntityLink - sizeof 12 - - rtti_classname :histfig_entity_link_former_memberst - -end - -class HistfigEntityLinkFormerMercenaryst < HistfigEntityLink - sizeof 12 - - rtti_classname :histfig_entity_link_former_mercenaryst - -end - -class HistfigEntityLinkFormerPositionst < HistfigEntityLink - sizeof 24 - - rtti_classname :histfig_entity_link_former_positionst - - field(:assignment_id, 12) { - number 32, true - } - field(:start_year, 16) { - number 32, true - } - field(:end_year, 20) { - number 32, true - } -end - -class HistfigEntityLinkFormerPrisonerst < HistfigEntityLink - sizeof 12 - - rtti_classname :histfig_entity_link_former_prisonerst - -end - -class HistfigEntityLinkFormerSlavest < HistfigEntityLink - sizeof 12 - - rtti_classname :histfig_entity_link_former_slavest - -end - -class HistfigEntityLinkHerost < HistfigEntityLink - sizeof 12 - - rtti_classname :histfig_entity_link_herost - -end - -class HistfigEntityLinkMemberst < HistfigEntityLink - sizeof 12 - - rtti_classname :histfig_entity_link_memberst - -end - -class HistfigEntityLinkMercenaryst < HistfigEntityLink - sizeof 12 - - rtti_classname :histfig_entity_link_mercenaryst - -end - -class HistfigEntityLinkPositionst < HistfigEntityLink - sizeof 20 - - rtti_classname :histfig_entity_link_positionst - - field(:assignment_id, 12) { - number 32, true - } - field(:start_year, 16) { - number 32, true - } -end - -class HistfigEntityLinkPrisonerst < HistfigEntityLink - sizeof 12 - - rtti_classname :histfig_entity_link_prisonerst - -end - -class HistfigEntityLinkSlavest < HistfigEntityLink - sizeof 12 - - rtti_classname :histfig_entity_link_slavest - -end - -class HistfigHfLink < MemHack::Compound - sizeof 12 - - rtti_classname :histfig_hf_linkst - - field(:anon_1, 4) { - number 32, true - } - def anon_1_tg ; df.world.history.figures[anon_1] ; end - field(:link_strength, 8) { - number 16, true - } - def getType() - HistfigHfLinkType.sym(DFHack.vmethod_call(self, 0)) - end - def write_file(arg0) - DFHack.vmethod_call(self, 12, arg0) ; nil - end - def read_file(arg0, loadversion) - DFHack.vmethod_call(self, 16, arg0, loadversion) ; nil - end -end - -class HistfigHfLinkApprenticest < HistfigHfLink - sizeof 12 - - rtti_classname :histfig_hf_link_apprenticest - -end - -class HistfigHfLinkChildst < HistfigHfLink - sizeof 12 - - rtti_classname :histfig_hf_link_childst - -end - -class HistfigHfLinkDeityst < HistfigHfLink - sizeof 12 - - rtti_classname :histfig_hf_link_deityst - -end - -class HistfigHfLinkFatherst < HistfigHfLink - sizeof 12 - - rtti_classname :histfig_hf_link_fatherst - -end - -class HistfigHfLinkImprisonerst < HistfigHfLink - sizeof 12 - - rtti_classname :histfig_hf_link_imprisonerst - -end - -class HistfigHfLinkLoverst < HistfigHfLink - sizeof 12 - - rtti_classname :histfig_hf_link_loverst - -end - -class HistfigHfLinkMasterst < HistfigHfLink - sizeof 12 - - rtti_classname :histfig_hf_link_masterst - -end - -class HistfigHfLinkMotherst < HistfigHfLink - sizeof 12 - - rtti_classname :histfig_hf_link_motherst - -end - -class HistfigHfLinkPrisonerst < HistfigHfLink - sizeof 12 - - rtti_classname :histfig_hf_link_prisonerst - -end - -class HistfigHfLinkSpousest < HistfigHfLink - sizeof 12 - - rtti_classname :histfig_hf_link_spousest - -end - -class HistfigSiteLink < MemHack::Compound - sizeof 16 - - rtti_classname :histfig_site_linkst - - field(:anon_1, 4) { - number 32, true - } - field(:anon_2, 8) { - number 32, true - } - field(:anon_3, 12) { - number 32, true - } - def getType() - HistfigSiteLinkType.sym(DFHack.vmethod_call(self, 0)) - end - def write_file(arg0) - DFHack.vmethod_call(self, 12, arg0) ; nil - end - def read_file(arg0, loadversion) - DFHack.vmethod_call(self, 16, arg0, loadversion) ; nil - end -end - -class HistfigSiteLinkHangoutst < HistfigSiteLink - sizeof 16 - - rtti_classname :histfig_site_link_hangoutst - -end - -class HistfigSiteLinkHomeSiteAbstractBuildingst < HistfigSiteLink - sizeof 16 - - rtti_classname :histfig_site_link_home_site_abstract_buildingst - -end - -class HistfigSiteLinkHomeSiteRealizationBuildingst < HistfigSiteLink - sizeof 16 - - rtti_classname :histfig_site_link_home_site_realization_buildingst - -end - -class HistfigSiteLinkHomeSiteRealizationSulst < HistfigSiteLink - sizeof 16 - - rtti_classname :histfig_site_link_home_site_realization_sulst - -end - -class HistfigSiteLinkLairst < HistfigSiteLink - sizeof 16 - - rtti_classname :histfig_site_link_lairst - -end - -class HistfigSiteLinkSeatOfPowerst < HistfigSiteLink - sizeof 16 - - rtti_classname :histfig_site_link_seat_of_powerst - -end - -class HistfigSiteLinkShopkeeperst < HistfigSiteLink - sizeof 16 - - rtti_classname :histfig_site_link_shopkeeperst - -end - -class HistoricalEntity < MemHack::Compound - sizeof 3848 - - field(:type, 0) { - number 16, true - } - field(:id, 4) { - number 32, true - } - field(:entity_raw, 8) { - pointer { - global :EntityRaw - } - } - field(:save_file_id, 12) { - number 32, true - } - field(:next_member_idx, 16) { - number 16, true - } - field(:name, 20) { - global :LanguageName - } - field(:race, 80) { - number 16, true - } - def race_tg ; df.world.raws.creatures.all[race] ; end - field(:unk5, 84) { - number 32, true - } - field(:unk6a, 88) { - stl_vector(4) { - pointer { - compound(:HistoricalEntity_TUnk6a) { - sizeof 12 - - field(:unk1, 0) { - number 16, true - } - field(:unk2, 4) { - number 32, true - } - field(:unk3, 8) { - number 16, true - } - } - } - } - } - field(:unk6b, 100) { - stl_vector(4) { - pointer { - compound(:HistoricalEntity_TUnk6b) { - sizeof 16 - - field(:unk1, 0) { - number 16, true - } - field(:unk2, 4) { - number 32, true - } - field(:unk2b, 8) { - number 32, true - } - field(:unk3, 12) { - number 16, true - } - } - } - } - } - field(:unit_ids, 112) { - stl_vector(4) { - number 32, true - } - } - def unit_tgs ; unit_ids.map { |i| df.world.units.all[i] } ; end - field(:unk7, 124) { - stl_vector(4) { - number 32, true - } - } - field(:nemesis_ids, 136) { - stl_vector(4) { - number 32, true - } - } - def nemesis_tgs ; nemesis_ids.map { |i| df.world.history.figures[i] } ; end - field(:resources, 148) { - compound(:HistoricalEntity_TResources) { - field(:unk8, 0) { - static_array(15, 12) { - stl_vector(2) { - number 16, true - } - } - } - field(:metals, 180) { - static_array(7, 24) { - global :MaterialVecRef - } - } - field(:organic, 348) { - compound(:HistoricalEntity_TResources_TOrganic) { - field(:leather, 0) { - global :MaterialVecRef - } - field(:fiber, 24) { - global :MaterialVecRef - } - field(:silk, 48) { - global :MaterialVecRef - } - field(:wool, 72) { - global :MaterialVecRef - } - field(:wood, 96) { - global :MaterialVecRef - } - } - } - field(:unk10, 468) { - static_array(3, 12) { - stl_vector(4) { - number 32, true - } - } - } - field(:refuse, 504) { - compound(:HistoricalEntity_TResources_TRefuse) { - field(:bone, 0) { - global :MaterialVecRef - } - field(:shell, 24) { - global :MaterialVecRef - } - field(:unk1, 48) { - global :MaterialVecRef - } - field(:tooth, 72) { - global :MaterialVecRef - } - field(:hoof, 96) { - global :MaterialVecRef - } - } - } - field(:misc_mat, 624) { - compound(:HistoricalEntity_TResources_TMiscMat) { - field(:unk2, 0) { - global :MaterialVecRef - } - field(:glass, 24) { - global :MaterialVecRef - } - field(:sand, 48) { - global :MaterialVecRef - } - field(:clay, 72) { - global :MaterialVecRef - } - field(:rock_bone_metal, 96) { - global :MaterialVecRef - } - field(:unk4, 120) { - global :MaterialVecRef - } - field(:wood, 144) { - global :MaterialVecRef - } - field(:metal_leather, 168) { - global :MaterialVecRef - } - field(:leather, 192) { - global :MaterialVecRef - } - field(:leather2, 216) { - global :MaterialVecRef - } - field(:metal, 240) { - global :MaterialVecRef - } - field(:wood2, 264) { - global :MaterialVecRef - } - field(:rock_metal, 288) { - global :MaterialVecRef - } - field(:booze, 312) { - global :MaterialVecRef - } - field(:cheese, 336) { - global :MaterialVecRef - } - field(:powders, 360) { - global :MaterialVecRef - } - field(:extracts, 384) { - global :MaterialVecRef - } - field(:meat, 408) { - global :MaterialVecRef - } - } - } - field(:fish_races, 1056) { - stl_vector(4) { - number 32, true - } - } - def fish_races_tg ; fish_races.map { |i| df.world.raws.creatures.all[i] } ; end - field(:fish_castes, 1068) { - stl_vector(2) { - number 16, true - } - } - field(:egg_races, 1080) { - stl_vector(4) { - number 32, true - } - } - def egg_races_tg ; egg_races.map { |i| df.world.raws.creatures.all[i] } ; end - field(:egg_castes, 1092) { - stl_vector(2) { - number 16, true - } - } - field(:plants, 1104) { - global :MaterialVecRef - } - field(:seeds, 1128) { - global :MaterialVecRef - } - field(:wood_products, 1152) { - compound(:HistoricalEntity_TResources_TWoodProducts) { - field(:item_type, 0) { - stl_vector(2) { - number 16, true, nil, ItemType - } - } - field(:item_subtype, 12) { - stl_vector(2) { - number 16, true - } - } - field(:material, 24) { - global :MaterialVecRef - } - } - } - field(:animals, 1200) { - compound(:HistoricalEntity_TResources_TAnimals) { - field(:pet_races, 0) { - stl_vector(4) { - number 32, true - } - } - def pet_races_tg ; pet_races.map { |i| df.world.raws.creatures.all[i] } ; end - field(:wagon_races, 12) { - stl_vector(4) { - number 32, true - } - } - def wagon_races_tg ; wagon_races.map { |i| df.world.raws.creatures.all[i] } ; end - field(:pack_animal_races, 24) { - stl_vector(4) { - number 32, true - } - } - def pack_animal_races_tg ; pack_animal_races.map { |i| df.world.raws.creatures.all[i] } ; end - field(:wagon_puller_races, 36) { - stl_vector(4) { - number 32, true - } - } - def wagon_puller_races_tg ; wagon_puller_races.map { |i| df.world.raws.creatures.all[i] } ; end - field(:mount_races, 48) { - stl_vector(4) { - number 32, true - } - } - def mount_races_tg ; mount_races.map { |i| df.world.raws.creatures.all[i] } ; end - field(:war_exotic_races, 60) { - stl_vector(4) { - number 32, true - } - } - def war_exotic_races_tg ; war_exotic_races.map { |i| df.world.raws.creatures.all[i] } ; end - field(:unk728_races, 72) { - stl_vector(4) { - number 32, true - } - } - def unk728_races_tg ; unk728_races.map { |i| df.world.raws.creatures.all[i] } ; end - field(:pet_castes, 84) { - stl_vector(2) { - number 16, true - } - } - field(:wagon_castes, 96) { - stl_vector(2) { - number 16, true - } - } - field(:pack_animal_castes, 108) { - stl_vector(2) { - number 16, true - } - } - field(:wagon_puller_castes, 120) { - stl_vector(2) { - number 16, true - } - } - field(:mount_castes, 132) { - stl_vector(2) { - number 16, true - } - } - field(:war_exotic_castes, 144) { - stl_vector(2) { - number 16, true - } - } - field(:unk728_castes, 156) { - stl_vector(2) { - number 16, true - } - } - } - } - field(:unk798, 1368) { - stl_vector(4) { - number 32, true - } - } - field(:unk7a8, 1380) { - stl_vector(4) { - number 32, true - } - } - field(:unk13, 1392) { - static_array(3, 8) { - compound(:HistoricalEntity_TResources_TUnk13) { - field(:unk1, 0) { - number 16, true, -1 - } - field(:unk2, 4) { - number 32, true - } - } - } - } - field(:unk14, 1416) { - stl_vector(4) { - pointer { - } - } - } - field(:unk15a, 1428) { - number 16, true - } - field(:unk15b, 1430) { - number 16, true - } - field(:ethic, 1432) { - static_array(22, 2, EthicType) { - number 16, true, nil, EthicResponse - } - } - field(:unk_metal16, 1476) { - global :MaterialVecRef - } - field(:unk18, 1500) { - stl_vector(2) { - number 16, true - } - } - field(:unk19, 1512) { - stl_vector(1) { - number 8, false - } - } - field(:unk20, 1524) { - stl_vector(1) { - number 8, false - } - } - field(:unk21, 1536) { - stl_vector(1) { - number 8, false - } - } - field(:unk22, 1548) { - stl_vector(1) { - number 8, false - } - } - field(:unk23, 1560) { - stl_vector(2) { - number 16, true - } - } - field(:unk24, 1572) { - stl_vector(2) { - number 16, true - } - } - } - } - field(:uniforms, 1732) { - stl_vector(4) { - pointer { - global :EntityUniform - } - } - } - field(:unknown1b, 1744) { - compound(:HistoricalEntity_TUnknown1b) { - field(:unk26a, 0) { - number 16, true - } - field(:unk26b, 2) { - number 16, true - } - field(:unk27, 4) { - number 16, true, -1 - } - field(:unk28, 8) { - number 32, true, -1 - } - field(:unk29, 12) { - number 32, true - } - field(:unk30, 16) { - number 32, true, -1 - } - field(:unk31, 20) { - number 32, true, -1 - } - field(:flags, 24) { - df_flagarray - } - field(:unk32a, 32) { - stl_vector(4) { - pointer { - } - } - } - field(:unk32b, 44) { - stl_vector(4) { - number 32, true - } - } - field(:unk32c, 56) { - stl_vector(4) { - number 32, true - } - } - field(:unk32d, 68) { - stl_vector(4) { - number 32, true - } - } - field(:unk32e, 80) { - stl_vector(4) { - pointer { - } - } - } - field(:unk32f, 92) { - stl_vector(4) { - pointer { - } - } - } - field(:unk33, 104) { - number 16, true - } - field(:unk34a, 108) { - stl_vector(2) { - number 16, true - } - } - field(:unk34b, 120) { - stl_vector(2) { - number 16, true - } - } - field(:unk34c, 132) { - stl_vector(2) { - number 16, true - } - } - field(:unk34d, 144) { - stl_vector(4) { - pointer { - } - } - } - field(:unk34e, 156) { - stl_vector(4) { - pointer { - } - } - } - } - } - field(:positions, 1912) { - compound(:HistoricalEntity_TPositions) { - field(:own, 0) { - stl_vector(4) { - pointer { - global :EntityPosition - } - } - } - field(:site, 12) { - stl_vector(4) { - pointer { - global :EntityPosition - } - } - } - field(:conquered_site, 24) { - stl_vector(4) { - pointer { - global :EntityPosition - } - } - } - field(:next_position_id, 36) { - number 32, true - } - field(:assignments, 40) { - stl_vector(4) { - pointer { - global :EntityPositionAssignment - } - } - } - field(:next_assignment_id, 52) { - number 32, true - } - } - } - field(:unknown1c, 1968) { - compound(:HistoricalEntity_TUnknown1c) { - field(:unk38, 0) { - stl_vector(4) { - pointer { - } - } - } - field(:unk39, 12) { - number 32, true - } - field(:unk40, 16) { - stl_vector(4) { - pointer { - } - } - } - } - } - field(:squads, 1996) { - stl_vector(4) { - number 32, true - } - } - def squads_tg ; squads.map { |i| df.world.squads.all[i] } ; end - field(:unknown1d, 2008) { - compound(:HistoricalEntity_TUnknown1d) { - field(:unk42, 0) { - number 32, true - } - field(:unk43, 4) { - stl_vector(4) { - pointer { - } - } - } - field(:unk44, 16) { - number 32, true - } - field(:unk44a, 20) { - static_array(16, 4) { - number 32, true - } - } - field(:training_knowledge, 84) { - pointer { - compound(:HistoricalEntity_TUnknown1d_TTrainingKnowledge) { - sizeof 24 - - field(:level, 0) { - stl_vector(4) { - number 32, true, nil, TrainingKnowledgeLevel - } - } - field(:unk_10, 12) { - stl_vector(4) { - number 32, true - } - } - } - } - } - field(:unk45, 88) { - stl_vector(4) { - pointer { - } - } - } - field(:unk46, 100) { - pointer { - } - } - field(:unk47, 104) { - number 16, true - } - field(:unk48, 108) { - number 32, true - } - field(:unk49, 112) { - static_array(15, 4) { - number 32, true - } - } - field(:unk50, 172) { - stl_vector(4) { - pointer { - } - } - } - } - } - field(:hist_figures, 2192) { - stl_vector(4) { - pointer { - global :HistoricalFigure - } - } - } - field(:nemesis, 2204) { - stl_vector(4) { - pointer { - global :NemesisRecord - } - } - } - field(:unknown2, 2216) { - compound(:HistoricalEntity_TUnknown2) { - field(:flour_sugar, 0) { - global :MaterialVecRef - } - field(:dye, 24) { - global :MaterialVecRef - } - field(:unk5, 48) { - static_array(30, 12) { - stl_vector(2) { - number 16, true - } - } - } - field(:unk6, 408) { - static_array(25, 12) { - stl_vector(4) { - pointer { - global :EntityPositionAssignment - } - } - } - } - field(:unk6b, 708) { - static_array(6, 12) { - stl_vector(2) { - number 16, true - } - } - } - field(:unk8, 780) { - stl_vector(4) { - number 32, true - } - } - field(:unk9, 792) { - number 32, true - } - field(:unk10, 796) { - stl_vector(2) { - number 16, true - } - } - field(:unk11, 808) { - pointer { - } - } - field(:unk12a, 812) { - number 16, true, -1 - } - field(:unk12b, 814) { - number 16, true - } - field(:unk13, 816) { - number 8, true, nil, BooleanEnum - } - field(:unk14, 820) { - number 32, true - } - field(:unk15, 824) { - number 32, true - } - field(:unk16, 828) { - number 32, true - } - field(:unk17, 832) { - number 16, true - } - field(:unk18, 836) { - stl_vector(4) { - pointer { - } - } - } - field(:unk19, 848) { - stl_vector(4) { - pointer { - } - } - } - field(:unk20, 860) { - number 16, true - } - field(:unk21, 864) { - number 32, true - } - field(:unk22, 868) { - number 32, true - } - field(:unk23, 872) { - number 32, true - } - field(:unk24, 876) { - stl_vector(4) { - pointer { - } - } - } - field(:unk25, 888) { - stl_vector(4) { - pointer { - } - } - } - field(:unk26, 900) { - static_array(177, 4) { - number 32, true - } - } - field(:unk28, 1608) { - stl_vector(4) { - pointer { - } - } - } - field(:unk29, 1620) { - stl_vector(4) { - pointer { - } - } - } - } - } -end - -class HistoricalFigure < MemHack::Compound - sizeof 204 - - field(:profession, 0) { - number 16, true, nil, Profession - } - field(:race, 2) { - number 16, true - } - def race_tg ; df.world.raws.creatures.all[race] ; end - field(:caste, 4) { - number 16, true - } - field(:sex, 6) { - number 8, false - } - field(:appeared_year, 8) { - number 32, true - } - field(:born_year, 12) { - number 32, true - } - field(:born_seconds, 16) { - number 32, true - } - field(:curse_year, 20) { - number 32, true - } - field(:curse_seconds, 24) { - number 32, true - } - field(:anon_1, 28) { - number 32, true - } - field(:anon_2, 32) { - number 32, true - } - field(:old_year, 36) { - number 32, true - } - field(:old_seconds, 40) { - number 32, true - } - field(:died_year, 44) { - number 32, true - } - field(:died_seconds, 48) { - number 32, true - } - field(:name, 52) { - global :LanguageName - } - field(:civ_id, 112) { - number 32, true - } - def civ_tg ; df.world.entities.all[civ_id] ; end - field(:population_id, 116) { - number 32, true - } - def population_tg ; df.world.entity_populations[population_id] ; end - field(:anon_3, 120) { - number 32, true - } - field(:flags, 124) { - df_flagarray - } - field(:unit_id, 132) { - number 32, true - } - def unit_tg ; df.world.units.all[unit_id] ; end - field(:id, 136) { - number 32, true - } - field(:unk4, 140) { - number 32, true - } - field(:entity_links, 144) { - stl_vector(4) { - pointer { - global :HistfigEntityLink - } - } - } - field(:site_links, 156) { - stl_vector(4) { - pointer { - global :HistfigSiteLink - } - } - } - field(:histfig_links, 168) { - stl_vector(4) { - pointer { - global :HistfigHfLink - } - } - } - field(:info, 180) { - pointer { - global :HistoricalFigureInfo - } - } - field(:worldgen, 184) { - compound(:HistoricalFigure_TWorldgen) { - field(:unk_0, 0) { - pointer { - global :WorldSite - } - } - field(:unk_4, 4) { - pointer { - global :LanguageName - } - } - field(:unk_8, 8) { - pointer { - global :WorldUndergroundRegion - } - } - field(:unk_c, 12) { - pointer { - compound(:HistoricalFigure_TWorldgen_TUnkC) { - sizeof 16 - - field(:unk_0, 0) { - df_array(1) { - number 8, false - } - } - field(:unk_8, 8) { - df_array(2) { - number 16, true - } - } - } - } - } - field(:unk_10, 16) { - number 32, true - } - } - } -end - -class HistoricalFigureInfo < MemHack::Compound - sizeof 48 - - field(:spheres, 0) { - pointer { - stl_vector(2) { - number 16, true, nil, SphereType - } - } - } - field(:skills, 4) { - pointer { - compound(:HistoricalFigureInfo_TSkills) { - sizeof 76 - - field(:skills, 0) { - stl_vector(2) { - number 16, true, nil, JobSkill - } - } - field(:points, 12) { - stl_vector(4) { - number 32, true - } - } - field(:unk_20, 24) { - stl_vector(2) { - number 16, true - } - } - field(:unk_30, 36) { - stl_vector(4) { - number 32, true - } - } - field(:unk_40, 48) { - stl_vector(2) { - number 16, true - } - } - field(:unk_50, 60) { - stl_vector(2) { - number 16, true - } - } - field(:unk_60, 72) { - number 16, true - } - } - } - } - field(:pets, 8) { - pointer { - stl_vector(2) { - number 16, true - } - } - } - field(:unk_c, 12) { - pointer { - compound(:HistoricalFigureInfo_TUnkC) { - sizeof 96 - - field(:traits, 0) { - static_array(30, 2, PersonalityFacetType) { - number 16, false - } - } - field(:unk_3c, 60) { - stl_vector(4) { - pointer { - compound(:HistoricalFigureInfo_TUnkC_TUnk3c) { - sizeof 4 - - field(:a, 0) { - number 16, true - } - field(:b, 2) { - number 16, true - } - } - } - } - } - field(:unk_4c, 72) { - stl_vector(2) { - number 16, true - } - } - field(:unk_5c, 84) { - stl_vector - } - } - } - } - field(:masterpieces, 16) { - pointer { - compound(:HistoricalFigureInfo_TMasterpieces) { - sizeof 24 - - field(:events, 0) { - stl_vector(4) { - number 32, true - } - } - def events_tg ; events.map { |i| df.world.history.events[i] } ; end - field(:events2, 12) { - stl_vector(4) { - number 32, true - } - } - def events2_tg ; events2.map { |i| df.world.history.events[i] } ; end - } - } - } - field(:unk_14, 20) { - pointer { - compound(:HistoricalFigureInfo_TUnk14) { - sizeof 32 - - field(:unk_0, 0) { - number 16, true - } - field(:site, 4) { - number 32, true - } - def site_tg ; df.world.world_data.sites[site] ; end - field(:unk_8, 8) { - number 32, true - } - field(:unk_c, 12) { - number 32, true - } - field(:region, 16) { - global :Coord2d - } - field(:unk_14, 20) { - number 8, false - } - field(:unk_18, 24) { - number 32, true - } - field(:unk_1c, 28) { - number 32, true - } - } - } - } - field(:kills, 24) { - pointer { - global :HistoricalKills - } - } - field(:wounds, 28) { - pointer { - compound(:HistoricalFigureInfo_TWounds) { - sizeof 32 - - field(:events, 0) { - stl_vector(4) { - number 32, true - } - } - def events_tg ; events.map { |i| df.world.history.events[i] } ; end - field(:status, 12) { - stl_bit_vector - } - } - } - } - field(:secret, 32) { - pointer { - compound(:HistoricalFigureInfo_TSecret) { - sizeof 28 - - field(:interactions, 0) { - stl_vector(4) { - pointer { - global :Interaction - } - } - } - field(:unk_10, 12) { - number 32, true - } - field(:unk_14, 16) { - stl_vector - } - } - } - } - field(:curse, 36) { - pointer { - compound(:HistoricalFigureInfo_TCurse) { - sizeof 136 - - field(:active_interactions, 0) { - stl_vector(4) { - pointer { - global :Interaction - } - } - } - field(:active_effects, 12) { - stl_vector(4) { - pointer { - } - } - } - field(:can_do, 24) { - stl_vector(4) { - pointer { - global :Interaction - } - } - } - field(:unk_30, 36) { - number 16, true - } - field(:unk_32, 38) { - number 16, true - } - field(:unk_34, 40) { - number 32, true - } - field(:unk_38, 44) { - number 32, true - } - field(:unk_3c, 48) { - number 32, true - } - field(:unk_40, 52) { - number 8, false - } - field(:name, 56) { - stl_string - } - field(:name_plural, 60) { - stl_string - } - field(:name_adjective, 64) { - stl_string - } - field(:race, 68) { - number 32, true - } - def race_tg ; df.world.raws.creatures.all[race] ; end - field(:caste, 72) { - number 16, true - } - field(:unk_a0, 76) { - stl_vector - } - field(:unk_b0, 88) { - stl_vector - } - field(:unk_c0, 100) { - stl_vector(4) { - number 32, true - } - } - field(:unk_d0, 112) { - number 32, true - } - field(:unk_d4, 116) { - number 32, true - } - field(:unk_d8, 120) { - number 32, true - } - field(:unk_dc, 124) { - number 32, true - } - field(:unk_e0, 128) { - stl_string - } - field(:unk_fc, 132) { - number 32, true - } - } - } - } - field(:books, 40) { - pointer { - stl_vector(4) { - pointer { - global :ArtifactRecord - } - } - } - } - field(:reputation, 44) { - pointer { - compound(:HistoricalFigureInfo_TReputation) { - sizeof 28 - - field(:wanted, 0) { - stl_vector(4) { - pointer { - compound(:HistoricalFigureInfo_TReputation_TWanted) { - sizeof 16 - - field(:entity_id, 0) { - number 32, true - } - def entity_tg ; df.world.entities.all[entity_id] ; end - field(:discovered_year, 4) { - number 32, true - } - field(:discovered_time, 8) { - number 32, true - } - field(:unsolved_murders, 12) { - number 32, true - } - } - } - } - } - field(:cur_identity, 12) { - number 32, true - } - def cur_identity_tg ; df.world.assumed_identities.all[cur_identity] ; end - field(:all_identities, 16) { - stl_vector(4) { - number 32, true - } - } - def all_identities_tg ; all_identities.map { |i| df.world.assumed_identities.all[i] } ; end - } - } - } -end - -class HistoricalKills < MemHack::Compound - sizeof 96 - - field(:events, 0) { - stl_vector(4) { - number 32, true - } - } - def events_tg ; events.map { |i| df.world.history.events[i] } ; end - field(:killed_race, 12) { - stl_vector(2) { - number 16, true - } - } - def killed_race_tg ; killed_race.map { |i| df.world.raws.creatures.all[i] } ; end - field(:killed_caste, 24) { - stl_vector(2) { - number 16, true - } - } - field(:unk_30, 36) { - stl_vector(4) { - number 32, true - } - } - field(:unk_40, 48) { - stl_vector(4) { - number 32, true - } - } - field(:killed_site, 60) { - stl_vector(4) { - number 32, true - } - } - def killed_site_tg ; killed_site.map { |i| df.world.world_data.sites[i] } ; end - field(:killed_undead, 72) { - stl_vector(2) { - compound(:HistoricalKills_TKilledUndead) { - field(:_whole, 0) { - number 16, false - } - field(:skeletal, 0) { bit 0 } - field(:zombie, 0) { bit 1 } - field(:ghostly, 0) { bit 2 } - } - } - } - field(:killed_count, 84) { - stl_vector(4) { - number 32, true - } - } -end - -class HistoryEvent < MemHack::Compound - sizeof 24 - - rtti_classname :history_eventst - - field(:year, 4) { - number 32, true - } - field(:seconds, 8) { - number 32, true - } - field(:flags, 12) { - df_flagarray - } - field(:id, 20) { - number 32, true - } - def getType() - HistoryEventType.sym(DFHack.vmethod_call(self, 0)) - end - def generate_xml(arg0, arg1) - DFHack.vmethod_call(self, 136, arg0, arg1) ; nil - end - def write_file(arg0) - DFHack.vmethod_call(self, 140, arg0) ; nil - end - def read_file(arg0, loadversion) - DFHack.vmethod_call(self, 144, arg0, loadversion) ; nil - end -end - -class HistoryEventAddHfEntityLinkst < HistoryEvent - sizeof 40 - - rtti_classname :history_event_add_hf_entity_linkst - - field(:entity_id, 24) { - number 32, true - } - def entity_tg ; df.world.entities.all[entity_id] ; end - field(:hfid, 28) { - number 32, true - } - def hfid_tg ; df.world.history.figures[hfid] ; end - field(:anon_1, 32) { - number 32, true - } - field(:anon_2, 36) { - number 32, true - } -end - -class HistoryEventAddHfHfLinkst < HistoryEvent - sizeof 36 - - rtti_classname :history_event_add_hf_hf_linkst - - field(:hfid, 24) { - number 32, true - } - def hfid_tg ; df.world.history.figures[hfid] ; end - field(:hfid2, 28) { - number 32, true - } - def hfid2_tg ; df.world.history.figures[hfid2] ; end - field(:type, 32) { - number 32, true, nil, HistfigHfLinkType - } -end - -class HistoryEventAddHfSiteLinkst < HistoryEvent - sizeof 44 - - rtti_classname :history_event_add_hf_site_linkst - - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } - field(:anon_4, 36) { - number 32, true - } - field(:anon_5, 40) { - number 32, true - } -end - -class HistoryEventAgreementsVoidedst < HistoryEvent - sizeof 32 - - rtti_classname :history_event_agreements_voidedst - - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } -end - -class HistoryEventArtifactCreatedst < HistoryEvent - sizeof 44 - - rtti_classname :history_event_artifact_createdst - - field(:artifact_id, 24) { - number 32, true - } - def artifact_tg ; df.world.artifacts.all[artifact_id] ; end - field(:unit_id, 28) { - number 32, true - } - def unit_tg ; df.world.units.all[unit_id] ; end - field(:hfid, 32) { - number 32, true - } - def hfid_tg ; df.world.history.figures[hfid] ; end - field(:site, 36) { - number 32, true - } - def site_tg ; df.world.world_data.sites[site] ; end - field(:anon_1, 40) { - number 32, true - } -end - -class HistoryEventArtifactDroppedst < HistoryEvent - sizeof 48 - - rtti_classname :history_event_artifact_droppedst - - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } - field(:anon_4, 36) { - number 32, true - } - field(:anon_5, 40) { - number 32, true - } - field(:anon_6, 44) { - number 32, true - } -end - -class HistoryEventArtifactFoundst < HistoryEvent - sizeof 40 - - rtti_classname :history_event_artifact_foundst - - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } - field(:anon_4, 36) { - number 32, true - } -end - -class HistoryEventArtifactHiddenst < HistoryEvent - sizeof 40 - - rtti_classname :history_event_artifact_hiddenst - - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } - field(:anon_4, 36) { - number 32, true - } -end - -class HistoryEventArtifactLostst < HistoryEvent - sizeof 32 - - rtti_classname :history_event_artifact_lostst - - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } -end - -class HistoryEventArtifactPossessedst < HistoryEvent - sizeof 40 - - rtti_classname :history_event_artifact_possessedst - - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } - field(:anon_4, 36) { - number 32, true - } -end - -class HistoryEventArtifactRecoveredst < HistoryEvent - sizeof 40 - - rtti_classname :history_event_artifact_recoveredst - - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } - field(:anon_4, 36) { - number 32, true - } -end - -class HistoryEventArtifactStoredst < HistoryEvent - sizeof 40 - - rtti_classname :history_event_artifact_storedst - - field(:artifact_id, 24) { - number 32, true - } - def artifact_tg ; df.world.artifacts.all[artifact_id] ; end - field(:unit_id, 28) { - number 32, true - } - def unit_tg ; df.world.units.all[unit_id] ; end - field(:hfid, 32) { - number 32, true - } - def hfid_tg ; df.world.history.figures[hfid] ; end - field(:site, 36) { - number 32, true - } - def site_tg ; df.world.world_data.sites[site] ; end -end - -class HistoryEventAssumeIdentityst < HistoryEvent - sizeof 36 - - rtti_classname :history_event_assume_identityst - - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } -end - -class HistoryEventBodyAbusedst < HistoryEvent - sizeof 84 - - rtti_classname :history_event_body_abusedst - - field(:anon_1, 24) { - stl_vector - } - field(:anon_2, 36) { - number 32, true - } - field(:anon_3, 40) { - number 32, true - } - field(:anon_4, 44) { - number 32, true - } - field(:anon_5, 48) { - number 32, true - } - field(:anon_6, 52) { - number 32, true - } - field(:anon_7, 56) { - number 32, true - } - field(:anon_8, 60) { - number 16, true - } - field(:anon_9, 62) { - number 16, true - } - field(:anon_10, 64) { - number 16, true - } - field(:anon_11, 68) { - number 32, true - } - field(:anon_12, 72) { - number 32, true - } - field(:anon_13, 76) { - number 32, true - } - field(:anon_14, 80) { - number 32, true - } -end - -class HistoryEventChangeCreatureTypest < HistoryEvent - sizeof 48 - - rtti_classname :history_event_change_creature_typest - - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } - field(:anon_4, 36) { - number 32, true - } - field(:anon_5, 40) { - number 32, true - } - field(:anon_6, 44) { - number 32, true - } -end - -class HistoryEventChangeHfBodyStatest < HistoryEvent - sizeof 52 - - rtti_classname :history_event_change_hf_body_statest - - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } - field(:anon_4, 36) { - number 32, true - } - field(:anon_5, 40) { - number 32, true - } - field(:anon_6, 44) { - number 32, true - } - field(:anon_7, 48) { - number 32, true - } -end - -class HistoryEventChangeHfJobst < HistoryEvent - sizeof 44 - - rtti_classname :history_event_change_hf_jobst - - field(:hfid, 24) { - number 32, true - } - def hfid_tg ; df.world.history.figures[hfid] ; end - field(:new_job, 28) { - number 16, true, nil, Profession - } - field(:old_job, 30) { - number 16, true, nil, Profession - } - field(:site, 32) { - number 32, true - } - def site_tg ; df.world.world_data.sites[site] ; end - field(:anon_1, 36) { - number 32, true - } - field(:anon_2, 40) { - number 32, true - } -end - -class HistoryEventChangeHfStatest < HistoryEvent - sizeof 52 - - rtti_classname :history_event_change_hf_statest - - field(:hfid, 24) { - number 32, true - } - def hfid_tg ; df.world.history.figures[hfid] ; end - field(:anon_1, 28) { - number 16, true - } - field(:anon_2, 32) { - number 32, true - } - field(:site, 36) { - number 32, true - } - def site_tg ; df.world.world_data.sites[site] ; end - field(:region, 40) { - number 32, true - } - def region_tg ; df.world.world_data.regions[region] ; end - field(:anon_3, 44) { - number 32, true - } - field(:region_pos, 48) { - global :Coord2d - } -end - -class HistoryEventCollection < MemHack::Compound - sizeof 56 - - rtti_classname :history_event_collectionst - - field(:anon_1, 4) { - stl_vector - } - field(:anon_2, 16) { - stl_vector - } - field(:anon_3, 28) { - number 32, true - } - field(:anon_4, 32) { - number 32, true - } - field(:anon_5, 36) { - number 32, true - } - field(:anon_6, 40) { - number 32, true - } - field(:anon_7, 44) { - df_flagarray - } - field(:id, 52) { - number 32, true - } - def getType() - HistoryEventCollectionType.sym(DFHack.vmethod_call(self, 0)) - end - def generate_xml(arg0, arg1) - DFHack.vmethod_call(self, 4, arg0, arg1) ; nil - end - def write_file(arg0) - DFHack.vmethod_call(self, 8, arg0) ; nil - end - def read_file(arg0, loadversion) - DFHack.vmethod_call(self, 12, arg0, loadversion) ; nil - end - def updateTime() - DFHack.vmethod_call(self, 44) ; nil - end -end - -class HistoryEventCollectionAbductionst < HistoryEventCollection - sizeof 124 - - rtti_classname :history_event_collection_abductionst - - field(:anon_1, 56) { - number 32, true - } - field(:anon_2, 60) { - number 32, true - } - field(:anon_3, 64) { - number 32, true - } - field(:anon_4, 68) { - number 32, true - } - field(:anon_5, 72) { - number 16, true - } - field(:anon_6, 74) { - number 16, true - } - field(:anon_7, 76) { - number 32, true - } - field(:anon_8, 80) { - number 32, true - } - field(:anon_9, 84) { - stl_vector - } - field(:anon_10, 96) { - stl_vector - } - field(:anon_11, 108) { - stl_vector - } - field(:anon_12, 120) { - number 32, true - } -end - -class HistoryEventCollectionBattlest < HistoryEventCollection - sizeof 320 - - rtti_classname :history_event_collection_battlest - - field(:anon_1, 56) { - global :LanguageName - } - field(:anon_2, 116) { - number 32, true - } - field(:anon_3, 120) { - number 32, true - } - field(:anon_4, 124) { - number 32, true - } - field(:anon_5, 128) { - number 32, true - } - field(:anon_6, 132) { - number 16, true - } - field(:anon_7, 134) { - number 16, true - } - field(:anon_8, 136) { - stl_vector - } - field(:anon_9, 148) { - stl_vector - } - field(:anon_10, 160) { - stl_vector - } - field(:anon_11, 172) { - stl_vector - } - field(:anon_12, 184) { - stl_vector - } - field(:anon_13, 196) { - stl_vector - } - field(:anon_14, 208) { - stl_vector - } - field(:anon_15, 220) { - stl_vector - } - field(:anon_16, 232) { - stl_vector - } - field(:anon_17, 244) { - stl_vector - } - field(:anon_18, 256) { - stl_vector - } - field(:anon_19, 268) { - stl_vector - } - field(:anon_20, 280) { - stl_vector - } - field(:anon_21, 292) { - stl_vector - } - field(:anon_22, 304) { - stl_vector - } - field(:anon_23, 316) { - number 32, true - } -end - -class HistoryEventCollectionBeastAttackst < HistoryEventCollection - sizeof 96 - - rtti_classname :history_event_collection_beast_attackst - - field(:anon_1, 56) { - number 32, true - } - field(:anon_2, 60) { - number 32, true - } - field(:anon_3, 64) { - number 32, true - } - field(:anon_4, 68) { - number 32, true - } - field(:anon_5, 72) { - number 16, true - } - field(:anon_6, 74) { - number 16, true - } - field(:anon_7, 76) { - number 32, true - } - field(:anon_8, 80) { - stl_vector - } - field(:anon_9, 92) { - number 32, true - } -end - -class HistoryEventCollectionDuelst < HistoryEventCollection - sizeof 92 - - rtti_classname :history_event_collection_duelst - - field(:anon_1, 56) { - number 32, true - } - field(:anon_2, 60) { - number 32, true - } - field(:anon_3, 64) { - number 32, true - } - field(:anon_4, 68) { - number 32, true - } - field(:anon_5, 72) { - number 16, true - } - field(:anon_6, 74) { - number 16, true - } - field(:anon_7, 76) { - number 32, true - } - field(:anon_8, 80) { - number 32, true - } - field(:anon_9, 84) { - number 32, true - } - field(:anon_10, 88) { - number 8, false - } -end - -class HistoryEventCollectionJourneyst < HistoryEventCollection - sizeof 72 - - rtti_classname :history_event_collection_journeyst - - field(:anon_1, 56) { - stl_vector - } - field(:anon_2, 68) { - number 32, true - } -end - -class HistoryEventCollectionSiteConqueredst < HistoryEventCollection - sizeof 96 - - rtti_classname :history_event_collection_site_conqueredst - - field(:anon_1, 56) { - number 32, true - } - field(:anon_2, 60) { - number 32, true - } - field(:anon_3, 64) { - stl_vector - } - field(:anon_4, 76) { - stl_vector - } - field(:anon_5, 88) { - number 32, true - } - field(:anon_6, 92) { - number 32, true - } -end - -class HistoryEventCollectionTheftst < HistoryEventCollection - sizeof 244 - - rtti_classname :history_event_collection_theftst - - field(:anon_1, 56) { - number 32, true - } - field(:anon_2, 60) { - number 32, true - } - field(:anon_3, 64) { - number 32, true - } - field(:anon_4, 68) { - number 32, true - } - field(:anon_5, 72) { - number 16, true - } - field(:anon_6, 74) { - number 16, true - } - field(:anon_7, 76) { - number 32, true - } - field(:anon_8, 80) { - number 32, true - } - field(:anon_9, 84) { - stl_vector - } - field(:anon_10, 96) { - stl_vector - } - field(:anon_11, 108) { - stl_vector - } - field(:anon_12, 120) { - stl_vector - } - field(:anon_13, 132) { - stl_vector - } - field(:anon_14, 144) { - stl_vector - } - field(:anon_15, 156) { - stl_vector - } - field(:anon_16, 168) { - stl_vector - } - field(:anon_17, 180) { - stl_vector - } - field(:anon_18, 192) { - stl_vector - } - field(:anon_19, 204) { - stl_vector - } - field(:anon_20, 216) { - stl_vector - } - field(:anon_21, 228) { - stl_vector - } - field(:anon_22, 240) { - number 32, true - } -end - -class HistoryEventCollectionWarst < HistoryEventCollection - sizeof 296 - - rtti_classname :history_event_collection_warst - - field(:anon_1, 56) { - global :LanguageName - } - field(:anon_2, 116) { - stl_vector - } - field(:anon_3, 128) { - stl_vector - } - field(:unk, 140) { - compound(:HistoryEventCollectionWarst_TUnk) { - field(:anon_1, 0) { - stl_vector - } - field(:anon_2, 12) { - stl_vector - } - field(:anon_3, 24) { - stl_vector - } - field(:anon_4, 36) { - stl_vector - } - field(:anon_5, 48) { - stl_vector - } - field(:anon_6, 60) { - number 32, true - } - field(:anon_7, 64) { - stl_vector - } - field(:anon_8, 76) { - stl_vector - } - field(:anon_9, 88) { - stl_vector - } - field(:anon_10, 100) { - stl_vector - } - field(:anon_11, 112) { - number 32, true - } - field(:anon_12, 116) { - stl_vector - } - field(:anon_13, 128) { - stl_vector - } - field(:anon_14, 140) { - stl_vector - } - field(:anon_15, 152) { - number 32, true - } - } - } -end - -class HistoryEventCreateEntityPositionst < HistoryEvent - sizeof 44 - - rtti_classname :history_event_create_entity_positionst - - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } - field(:anon_4, 36) { - number 32, true - } - field(:anon_5, 40) { - number 16, true - } -end - -class HistoryEventCreatedBuildingst < HistoryEvent - sizeof 40 - - rtti_classname :history_event_created_buildingst - - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } - field(:anon_4, 36) { - number 32, true - } -end - -class HistoryEventCreatedSitest < HistoryEvent - sizeof 36 - - rtti_classname :history_event_created_sitest - - field(:civ_id, 24) { - number 32, true - } - def civ_tg ; df.world.entities.all[civ_id] ; end - field(:group_id, 28) { - number 32, true - } - def group_tg ; df.world.entities.all[group_id] ; end - field(:site_id, 32) { - number 32, true - } - def site_tg ; df.world.world_data.sites[site_id] ; end -end - -class HistoryEventCreatedWorldConstructionst < HistoryEvent - sizeof 48 - - rtti_classname :history_event_created_world_constructionst - - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } - field(:anon_4, 36) { - number 32, true - } - field(:anon_5, 40) { - number 32, true - } - field(:anon_6, 44) { - number 32, true - } -end - -class HistoryEventCreatureDevouredst < HistoryEvent - sizeof 56 - - rtti_classname :history_event_creature_devouredst - - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 16, true - } - field(:anon_4, 36) { - number 32, true - } - field(:anon_5, 40) { - number 32, true - } - field(:anon_6, 44) { - number 32, true - } - field(:anon_7, 48) { - number 32, true - } - field(:anon_8, 52) { - number 32, true - } -end - -class HistoryEventDiplomatLostst < HistoryEvent - sizeof 36 - - rtti_classname :history_event_diplomat_lostst - - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } -end - -class HistoryEventEntityActionst < HistoryEvent - sizeof 40 - - rtti_classname :history_event_entity_actionst - - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } - field(:anon_4, 36) { - number 32, true - } -end - -class HistoryEventEntityCreatedst < HistoryEvent - sizeof 36 - - rtti_classname :history_event_entity_createdst - - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } -end - -class HistoryEventEntityIncorporatedst < HistoryEvent - sizeof 36 - - rtti_classname :history_event_entity_incorporatedst - - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } -end - -class HistoryEventEntityLawst < HistoryEvent - sizeof 40 - - rtti_classname :history_event_entity_lawst - - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } - field(:anon_4, 36) { - number 32, true - } -end - -class HistoryEventEntityRazedBuildingst < HistoryEvent - sizeof 36 - - rtti_classname :history_event_entity_razed_buildingst - - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } -end - -class HistoryEventFirstContactFailedst < HistoryEvent - sizeof 36 - - rtti_classname :history_event_first_contact_failedst - - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } -end - -class HistoryEventFirstContactst < HistoryEvent - sizeof 36 - - rtti_classname :history_event_first_contactst - - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } -end - -class HistoryEventHfActOnBuildingst < HistoryEvent - sizeof 40 - - rtti_classname :history_event_hf_act_on_buildingst - - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } - field(:anon_4, 36) { - number 32, true - } -end - -class HistoryEventHfConfrontedst < HistoryEvent - sizeof 64 - - rtti_classname :history_event_hf_confrontedst - - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } - field(:anon_4, 36) { - number 32, true - } - field(:anon_5, 40) { - number 32, true - } - field(:anon_6, 44) { - number 32, true - } - field(:anon_7, 48) { - number 32, true - } - field(:anon_8, 52) { - number 32, true - } - field(:anon_9, 56) { - number 32, true - } - field(:anon_10, 60) { - number 32, true - } -end - -class HistoryEventHfDestroyedSitest < HistoryEvent - sizeof 40 - - rtti_classname :history_event_hf_destroyed_sitest - - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } - field(:anon_4, 36) { - number 32, true - } -end - -class HistoryEventHfDoesInteractionst < HistoryEvent - sizeof 52 - - rtti_classname :history_event_hf_does_interactionst - - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } - field(:anon_4, 36) { - number 32, true - } - field(:anon_5, 40) { - number 32, true - } - field(:anon_6, 44) { - number 32, true - } - field(:anon_7, 48) { - number 32, true - } -end - -class HistoryEventHfGainsSecretGoalst < HistoryEvent - sizeof 32 - - rtti_classname :history_event_hf_gains_secret_goalst - - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } -end - -class HistoryEventHfLearnsSecretst < HistoryEvent - sizeof 44 - - rtti_classname :history_event_hf_learns_secretst - - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } - field(:anon_4, 36) { - number 32, true - } - field(:anon_5, 40) { - number 32, true - } -end - -class HistoryEventHfRazedBuildingst < HistoryEvent - sizeof 36 - - rtti_classname :history_event_hf_razed_buildingst - - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } -end - -class HistoryEventHistFigureAbductedst < HistoryEvent - sizeof 44 - - rtti_classname :history_event_hist_figure_abductedst - - field(:hfid, 24) { - number 32, true - } - def hfid_tg ; df.world.history.figures[hfid] ; end - field(:snatcher, 28) { - number 32, true - } - def snatcher_tg ; df.world.history.figures[snatcher] ; end - field(:site, 32) { - number 32, true - } - def site_tg ; df.world.world_data.sites[site] ; end - field(:region, 36) { - number 32, true - } - def region_tg ; df.world.world_data.regions[region] ; end - field(:layer, 40) { - number 32, true - } - def layer_tg ; df.world.world_data.underground_regions[layer] ; end -end - -class HistoryEventHistFigureDiedst < HistoryEvent - sizeof 88 - - rtti_classname :history_event_hist_figure_diedst - - field(:hfid, 24) { - number 32, true - } - def hfid_tg ; df.world.history.figures[hfid] ; end - field(:slayer, 28) { - number 32, true - } - def slayer_tg ; df.world.history.figures[slayer] ; end - field(:slayer_race, 32) { - number 32, true - } - def slayer_race_tg ; df.world.raws.creatures.all[slayer_race] ; end - field(:slayer_caste, 36) { - number 32, true - } - field(:weapon, 40) { - global :HistoryHitItem - } - field(:site, 72) { - number 32, true - } - def site_tg ; df.world.world_data.sites[site] ; end - field(:region, 76) { - number 32, true - } - def region_tg ; df.world.world_data.regions[region] ; end - field(:layer, 80) { - number 32, true - } - def layer_tg ; df.world.world_data.underground_regions[layer] ; end - field(:death_cause, 84) { - number 16, true - } -end - -class HistoryEventHistFigureNewPetst < HistoryEvent - sizeof 64 - - rtti_classname :history_event_hist_figure_new_petst - - field(:figures, 24) { - stl_vector(4) { - number 32, true - } - } - def figures_tg ; figures.map { |i| df.world.history.figures[i] } ; end - field(:pets, 36) { - stl_vector(2) { - number 16, true - } - } - def pets_tg ; pets.map { |i| df.world.raws.creatures.all[i] } ; end - field(:site, 48) { - number 32, true - } - def site_tg ; df.world.world_data.sites[site] ; end - field(:region, 52) { - number 32, true - } - def region_tg ; df.world.world_data.regions[region] ; end - field(:layer, 56) { - number 32, true - } - def layer_tg ; df.world.world_data.underground_regions[layer] ; end - field(:region_pos, 60) { - global :Coord2d - } -end - -class HistoryEventHistFigureReachSummitst < HistoryEvent - sizeof 48 - - rtti_classname :history_event_hist_figure_reach_summitst - - field(:anon_1, 24) { - stl_vector - } - field(:anon_2, 36) { - number 32, true - } - field(:anon_3, 40) { - number 32, true - } - field(:anon_4, 44) { - number 16, true - } - field(:anon_5, 46) { - number 16, true - } -end - -class HistoryEventHistFigureReunionst < HistoryEvent - sizeof 60 - - rtti_classname :history_event_hist_figure_reunionst - - field(:anon_1, 24) { - stl_vector - } - field(:anon_2, 36) { - stl_vector - } - field(:anon_3, 48) { - number 32, true - } - field(:anon_4, 52) { - number 32, true - } - field(:anon_5, 56) { - number 32, true - } -end - -class HistoryEventHistFigureRevivedst < HistoryEvent - sizeof 48 - - rtti_classname :history_event_hist_figure_revivedst - - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } - field(:anon_4, 36) { - number 32, true - } - field(:anon_5, 40) { - number 16, true - } - field(:anon_6, 44) { - number 32, true - } -end - -class HistoryEventHistFigureSimpleBattleEventst < HistoryEvent - sizeof 64 - - rtti_classname :history_event_hist_figure_simple_battle_eventst - - field(:side1, 24) { - stl_vector(4) { - number 32, true - } - } - def side1_tg ; side1.map { |i| df.world.history.figures[i] } ; end - field(:side2, 36) { - stl_vector(4) { - number 32, true - } - } - def side2_tg ; side2.map { |i| df.world.history.figures[i] } ; end - field(:site, 48) { - number 32, true - } - def site_tg ; df.world.world_data.sites[site] ; end - field(:region, 52) { - number 32, true - } - def region_tg ; df.world.world_data.regions[region] ; end - field(:layer, 56) { - number 32, true - } - def layer_tg ; df.world.world_data.underground_regions[layer] ; end - field(:subtype, 60) { - number 16, true - } -end - -class HistoryEventHistFigureTravelst < HistoryEvent - sizeof 56 - - rtti_classname :history_event_hist_figure_travelst - - field(:figures, 24) { - stl_vector(4) { - number 32, true - } - } - def figures_tg ; figures.map { |i| df.world.history.figures[i] } ; end - field(:anon_1, 36) { - number 32, true - } - field(:anon_2, 40) { - number 32, true - } - field(:anon_3, 44) { - number 32, true - } - field(:anon_4, 48) { - number 32, true - } - field(:region_pos, 52) { - global :Coord2d - } -end - -class HistoryEventHistFigureWoundedst < HistoryEvent - sizeof 56 - - rtti_classname :history_event_hist_figure_woundedst - - field(:victim, 24) { - number 32, true - } - def victim_tg ; df.world.history.figures[victim] ; end - field(:attacker, 28) { - number 32, true - } - def attacker_tg ; df.world.history.figures[attacker] ; end - field(:anon_1, 32) { - number 32, true - } - field(:anon_2, 36) { - number 32, true - } - field(:anon_3, 40) { - number 32, true - } - field(:anon_4, 44) { - number 32, true - } - field(:anon_5, 48) { - number 16, true - } - field(:anon_6, 50) { - number 16, true - } - field(:anon_7, 52) { - number 16, true - } - field(:anon_8, 54) { - number 8, false - } -end - -class HistoryEventItemStolenst < HistoryEvent - sizeof 72 - - rtti_classname :history_event_item_stolenst - - field(:item_type, 24) { - number 16, true, nil, ItemType - } - field(:item_subtype, 26) { - number 16, true - } - field(:mattype, 28) { - number 16, true - } - field(:matindex, 32) { - number 32, true - } - field(:anon_1, 36) { - number 32, true - } - field(:entity_id, 40) { - number 32, true - } - def entity_tg ; df.world.entities.all[entity_id] ; end - field(:hfid, 44) { - number 32, true - } - def hfid_tg ; df.world.history.figures[hfid] ; end - field(:site, 48) { - number 32, true - } - def site_tg ; df.world.world_data.sites[site] ; end - field(:anon_2, 52) { - number 32, true - } - field(:anon_3, 56) { - number 32, true - } - field(:anon_4, 60) { - number 32, true - } - field(:region_pos, 64) { - global :Coord2d - } - field(:anon_5, 68) { - number 32, true - } -end - -class HistoryEventMasterpieceCreatedst < HistoryEvent - sizeof 36 - - rtti_classname :history_event_masterpiece_createdst - - field(:maker, 24) { - number 32, true - } - def maker_tg ; df.world.history.figures[maker] ; end - field(:maker_entity, 28) { - number 32, true - } - def maker_entity_tg ; df.world.entities.all[maker_entity] ; end - field(:site, 32) { - number 32, true - } - def site_tg ; df.world.world_data.sites[site] ; end -end - -class HistoryEventMasterpieceCreatedArchConstructst < HistoryEventMasterpieceCreatedst - sizeof 52 - - rtti_classname :history_event_masterpiece_created_arch_constructst - - field(:anon_1, 36) { - number 32, true - } - field(:anon_2, 40) { - number 16, true - } - field(:anon_3, 42) { - number 16, true - } - field(:anon_4, 44) { - number 32, true - } - field(:anon_5, 48) { - number 32, true - } -end - -class HistoryEventMasterpieceCreatedArchDesignst < HistoryEventMasterpieceCreatedst - sizeof 52 - - rtti_classname :history_event_masterpiece_created_arch_designst - - field(:anon_1, 36) { - number 32, true - } - field(:anon_2, 40) { - number 16, true - } - field(:anon_3, 42) { - number 16, true - } - field(:anon_4, 44) { - number 32, true - } - field(:anon_5, 48) { - number 32, true - } -end - -class HistoryEventMasterpieceCreatedDyeItemst < HistoryEventMasterpieceCreatedst - sizeof 64 - - rtti_classname :history_event_masterpiece_created_dye_itemst - - field(:anon_1, 36) { - number 32, true - } - field(:anon_2, 40) { - number 16, true - } - field(:anon_3, 42) { - number 16, true - } - field(:anon_4, 44) { - number 16, true - } - field(:anon_5, 48) { - number 32, true - } - field(:anon_6, 52) { - number 32, true - } - field(:anon_7, 56) { - number 16, true - } - field(:anon_8, 60) { - number 32, true - } -end - -class HistoryEventMasterpieceCreatedEngravingst < HistoryEventMasterpieceCreatedst - sizeof 48 - - rtti_classname :history_event_masterpiece_created_engravingst - - field(:skill_rating, 36) { - number 32, true - } - field(:type, 40) { - number 32, true - } - field(:subtype, 44) { - number 16, true - } -end - -class HistoryEventMasterpieceCreatedFoodst < HistoryEventMasterpieceCreatedst - sizeof 48 - - rtti_classname :history_event_masterpiece_created_foodst - - field(:unk1, 36) { - number 32, true - } - field(:item_subtype, 40) { - number 16, true - } - def item_subtype_tg ; df.world.raws.itemdefs.food[item_subtype] ; end - field(:item_id, 44) { - number 32, true - } - def item_tg ; df.world.items.all[item_id] ; end -end - -class HistoryEventMasterpieceCreatedItemImprovementst < HistoryEventMasterpieceCreatedst - sizeof 80 - - rtti_classname :history_event_masterpiece_created_item_improvementst - - field(:anon_1, 36) { - number 32, true - } - field(:anon_2, 40) { - number 16, true - } - field(:anon_3, 42) { - number 16, true - } - field(:anon_4, 44) { - number 16, true - } - field(:anon_5, 48) { - number 32, true - } - field(:anon_6, 52) { - number 32, true - } - field(:anon_7, 56) { - number 16, true - } - field(:anon_8, 60) { - number 32, true - } - field(:anon_9, 64) { - number 16, true - } - field(:anon_10, 68) { - number 32, true - } - field(:anon_11, 72) { - number 32, true - } - field(:anon_12, 76) { - number 16, true - } -end - -class HistoryEventMasterpieceCreatedItemst < HistoryEventMasterpieceCreatedst - sizeof 52 - - rtti_classname :history_event_masterpiece_created_itemst - - field(:skill_used, 36) { - number 32, true, nil, JobSkill - } - field(:item_type, 40) { - number 16, true, nil, ItemType - } - field(:item_subtype, 42) { - number 16, true - } - field(:mat_type, 44) { - number 16, true - } - field(:mat_index, 46) { - number 16, true - } - field(:item_id, 48) { - number 32, true - } - def item_tg ; df.world.items.all[item_id] ; end -end - -class HistoryEventMasterpieceLostst < HistoryEvent - sizeof 40 - - rtti_classname :history_event_masterpiece_lostst - - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } - field(:anon_4, 36) { - number 32, true - } -end - -class HistoryEventMerchantst < HistoryEvent - sizeof 44 - - rtti_classname :history_event_merchantst - - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } - field(:anon_4, 36) { - number 32, true - } - field(:anon_5, 40) { - number 32, true - } -end - -class HistoryEventReclaimSitest < HistoryEvent - sizeof 36 - - rtti_classname :history_event_reclaim_sitest - - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } -end - -class HistoryEventRemoveHfEntityLinkst < HistoryEvent - sizeof 40 - - rtti_classname :history_event_remove_hf_entity_linkst - - field(:entity_id, 24) { - number 32, true - } - def entity_tg ; df.world.entities.all[entity_id] ; end - field(:hfid, 28) { - number 32, true - } - def hfid_tg ; df.world.history.figures[hfid] ; end - field(:anon_1, 32) { - number 32, true - } - field(:anon_2, 36) { - number 32, true - } -end - -class HistoryEventRemoveHfHfLinkst < HistoryEvent - sizeof 36 - - rtti_classname :history_event_remove_hf_hf_linkst - - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } -end - -class HistoryEventRemoveHfSiteLinkst < HistoryEvent - sizeof 44 - - rtti_classname :history_event_remove_hf_site_linkst - - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } - field(:anon_4, 36) { - number 32, true - } - field(:anon_5, 40) { - number 32, true - } -end - -class HistoryEventReplacedBuildingst < HistoryEvent - sizeof 44 - - rtti_classname :history_event_replaced_buildingst - - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } - field(:anon_4, 36) { - number 32, true - } - field(:anon_5, 40) { - number 32, true - } -end - -class HistoryEventSiteAbandonedst < HistoryEvent - sizeof 36 - - rtti_classname :history_event_site_abandonedst - - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } -end - -class HistoryEventSiteDiedst < HistoryEvent - sizeof 36 - - rtti_classname :history_event_site_diedst - - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } -end - -class HistoryEventTopicagreementConcludedst < HistoryEvent - sizeof 44 - - rtti_classname :history_event_topicagreement_concludedst - - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } - field(:anon_4, 36) { - number 16, true - } - field(:anon_5, 40) { - number 32, true - } -end - -class HistoryEventTopicagreementMadest < HistoryEvent - sizeof 40 - - rtti_classname :history_event_topicagreement_madest - - field(:anon_1, 24) { - number 16, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } - field(:anon_4, 36) { - number 32, true - } -end - -class HistoryEventTopicagreementRejectedst < HistoryEvent - sizeof 40 - - rtti_classname :history_event_topicagreement_rejectedst - - field(:anon_1, 24) { - number 16, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } - field(:anon_4, 36) { - number 32, true - } -end - -class HistoryEventWarAttackedSitest < HistoryEvent - sizeof 48 - - rtti_classname :history_event_war_attacked_sitest - - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } - field(:anon_4, 36) { - number 32, true - } - field(:anon_5, 40) { - number 32, true - } - field(:anon_6, 44) { - number 32, true - } -end - -class HistoryEventWarDestroyedSitest < HistoryEvent - sizeof 40 - - rtti_classname :history_event_war_destroyed_sitest - - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } - field(:anon_4, 36) { - number 32, true - } -end - -class HistoryEventWarFieldBattlest < HistoryEvent - sizeof 52 - - rtti_classname :history_event_war_field_battlest - - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } - field(:anon_4, 36) { - number 32, true - } - field(:anon_5, 40) { - number 16, true - } - field(:anon_6, 42) { - number 16, true - } - field(:anon_7, 44) { - number 32, true - } - field(:anon_8, 48) { - number 32, true - } -end - -class HistoryEventWarPeaceAcceptedst < HistoryEvent - sizeof 40 - - rtti_classname :history_event_war_peace_acceptedst - - field(:anon_1, 24) { - number 16, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } - field(:anon_4, 36) { - number 32, true - } -end - -class HistoryEventWarPeaceRejectedst < HistoryEvent - sizeof 40 - - rtti_classname :history_event_war_peace_rejectedst - - field(:anon_1, 24) { - number 16, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } - field(:anon_4, 36) { - number 32, true - } -end - -class HistoryEventWarPlunderedSitest < HistoryEvent - sizeof 40 - - rtti_classname :history_event_war_plundered_sitest - - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } - field(:anon_4, 36) { - number 32, true - } -end - -class HistoryEventWarSiteNewLeaderst < HistoryEvent - sizeof 60 - - rtti_classname :history_event_war_site_new_leaderst - - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } - field(:anon_4, 36) { - number 32, true - } - field(:anon_5, 40) { - number 32, true - } - field(:anon_6, 44) { - number 32, true - } - field(:anon_7, 48) { - number 32, true - } - field(:anon_8, 52) { - number 32, true - } - field(:anon_9, 56) { - number 32, true - } -end - -class HistoryEventWarSiteTakenOverst < HistoryEvent - sizeof 44 - - rtti_classname :history_event_war_site_taken_overst - - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } - field(:anon_4, 36) { - number 32, true - } - field(:anon_5, 40) { - number 32, true - } -end - -class HistoryEventWarSiteTributeForcedst < HistoryEvent - sizeof 40 - - rtti_classname :history_event_war_site_tribute_forcedst - - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } - field(:anon_4, 36) { - number 32, true - } -end - -class HistoryHitItem < MemHack::Compound - sizeof 32 - - field(:item, 0) { - number 32, true - } - def item_tg ; df.world.items.all[item] ; end - field(:item_type, 4) { - number 16, true, nil, ItemType - } - field(:item_subtype, 6) { - number 16, true - } - field(:mattype, 8) { - number 16, true - } - field(:matindex, 12) { - number 32, true - } - field(:bow_item, 16) { - number 32, true - } - def bow_item_tg ; df.world.items.all[bow_item] ; end - field(:bow_item_type, 20) { - number 16, true, nil, ItemType - } - field(:bow_item_subtype, 22) { - number 16, true - } - field(:bow_mattype, 24) { - number 16, true - } - field(:bow_matindex, 28) { - number 32, true - } -end - -class HospitalSupplies < MemHack::Compound - sizeof 64 - - field(:supplies_needed, 0) { - compound(:HospitalSupplies_TSuppliesNeeded) { - field(:_whole, 0) { - number 32, false - } - field(:splints, 0) { bit 0 } - field(:thread, 0) { bit 1 } - field(:cloth, 0) { bit 2 } - field(:crutches, 0) { bit 3 } - field(:plaster, 0) { bit 4 } - field(:buckets, 0) { bit 5 } - field(:soap, 0) { bit 6 } - } - } - field(:max_splints, 4) { - number 32, true, 5 - } - field(:max_thread, 8) { - number 32, true, 75000 - } - field(:max_cloth, 12) { - number 32, true, 50000 - } - field(:max_crutches, 16) { - number 32, true, 5 - } - field(:max_plaster, 20) { - number 32, true, 750 - } - field(:max_buckets, 24) { - number 32, true, 2 - } - field(:max_soap, 28) { - number 32, true, 750 - } - field(:cur_splints, 32) { - number 32, true - } - field(:cur_thread, 36) { - number 32, true - } - field(:cur_cloth, 40) { - number 32, true - } - field(:cur_crutches, 44) { - number 32, true - } - field(:cur_plaster, 48) { - number 32, true - } - field(:cur_buckets, 52) { - number 32, true - } - field(:cur_soap, 56) { - number 32, true - } - field(:supply_recheck_timer, 60) { - number 32, true - } -end - -class Init < MemHack::Compound - sizeof 4232 - - field(:display, 0) { - global :InitDisplay - } - field(:media, 40) { - global :InitMedia - } - field(:input, 52) { - global :InitInput - } - field(:font, 88) { - global :InitFont - } - field(:window, 4224) { - global :InitWindow - } -end - -class InitDisplay < MemHack::Compound - sizeof 40 - - field(:flag, 0) { - df_flagarray(InitDisplayFlags) - } - field(:windowed, 8) { - class ::DFHack::InitDisplay_TWindowed < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :True ; NUME[:True] = 0 - ENUM[1] = :False ; NUME[:False] = 1 - ENUM[2] = :Prompt ; NUME[:Prompt] = 2 - end - - number 32, true, nil, InitDisplay_TWindowed - } - field(:grid_x, 12) { - number 32, true - } - field(:grid_y, 16) { - number 32, true - } - field(:desired_fullscreen_width, 20) { - number 32, true - } - field(:desired_fullscreen_height, 24) { - number 32, true - } - field(:desired_windowed_width, 28) { - number 32, true - } - field(:desired_windowed_height, 32) { - number 32, true - } - field(:partial_print_count, 36) { - number 8, false - } -end - -class InitFont < MemHack::Compound - sizeof 4136 - - field(:small_font_texpos, 0) { - static_array(256, 4) { - number 32, true - } - } - field(:large_font_texpos, 1024) { - static_array(256, 4) { - number 32, true - } - } - field(:small_font_datapos, 2048) { - static_array(256, 4) { - number 32, true - } - } - field(:large_font_datapos, 3072) { - static_array(256, 4) { - number 32, true - } - } - field(:small_font_adjx, 4096) { - float - } - field(:small_font_adjy, 4100) { - float - } - field(:large_font_adjx, 4104) { - float - } - field(:large_font_adjy, 4108) { - float - } - field(:small_font_dispx, 4112) { - number 32, true - } - field(:small_font_dispy, 4116) { - number 32, true - } - field(:large_font_dispx, 4120) { - number 32, true - } - field(:large_font_dispy, 4124) { - number 32, true - } - field(:use_ttf, 4128) { - class ::DFHack::InitFont_TUseTtf < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :TTF_OFF ; NUME[:TTF_OFF] = 0 - ENUM[1] = :TTF_ON ; NUME[:TTF_ON] = 1 - ENUM[2] = :TTF_AUTO ; NUME[:TTF_AUTO] = 2 - end - - number 32, true, nil, InitFont_TUseTtf - } - field(:ttf_limit, 4132) { - number 32, true - } -end - -class InitInput < MemHack::Compound - sizeof 36 - - field(:hold_time, 0) { - number 32, true - } - field(:repeat_time, 4) { - number 32, true - } - field(:macro_time, 8) { - number 32, true - } - field(:pause_zoom_no_interface_ms, 12) { - number 32, true - } - field(:flag, 16) { - df_flagarray(InitInputFlags) - } - field(:zoom_speed, 24) { - number 32, true - } - field(:repeat_accel_start, 28) { - number 32, true - } - field(:repeat_accel_limit, 32) { - number 32, true - } -end - -class InitMedia < MemHack::Compound - sizeof 12 - - field(:flag, 0) { - df_flagarray(InitMediaFlags) - } - field(:volume, 8) { - number 32, true - } -end - -class InitWindow < MemHack::Compound - sizeof 8 - - field(:flag, 0) { - df_flagarray(InitWindowFlags) - } -end - -class InorganicRaw < MemHack::Compound - sizeof 756 - - field(:id, 0) { - stl_string - } - field(:str, 4) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:flags, 16) { - df_flagarray(InorganicFlags) - } - field(:metal_ore, 24) { - compound(:InorganicRaw_TMetalOre) { - field(:str, 0) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:mat_index, 12) { - stl_vector(2) { - number 16, true - } - } - def mat_index_tg ; mat_index.map { |i| df.world.raws.inorganics[i] } ; end - field(:probability, 24) { - stl_vector(2) { - number 16, true - } - } - } - } - field(:thread_metal, 60) { - compound(:InorganicRaw_TThreadMetal) { - field(:str, 0) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:mat_index, 12) { - stl_vector(2) { - number 16, true - } - } - def mat_index_tg ; mat_index.map { |i| df.world.raws.inorganics[i] } ; end - field(:probability, 24) { - stl_vector(2) { - number 16, true - } - } - } - } - field(:unk1, 96) { - stl_vector(4) { - number 32, true - } - } - field(:environment_spec, 108) { - compound(:InorganicRaw_TEnvironmentSpec) { - field(:str, 0) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:mat_index, 12) { - stl_vector(2) { - number 16, true - } - } - def mat_index_tg ; mat_index.map { |i| df.world.raws.inorganics[i] } ; end - field(:inclusion_type, 24) { - stl_vector(2) { - number 16, true, nil, InclusionType - } - } - field(:probability, 36) { - stl_vector(1) { - number 8, false - } - } - } - } - field(:environment, 156) { - compound(:InorganicRaw_TEnvironment) { - field(:location, 0) { - stl_vector(2) { - number 16, true, nil, EnvironmentType - } - } - field(:type, 12) { - stl_vector(2) { - number 16, true, nil, InclusionType - } - } - field(:probability, 24) { - stl_vector(1) { - number 8, false - } - } - } - } - field(:unk2, 192) { - number 32, true - } - field(:material, 196) { - global :Material - } -end - -class Interaction < MemHack::Compound - sizeof 64 - - field(:name, 0) { - stl_string - } - field(:id, 4) { - number 32, true - } - field(:str, 8) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:flags, 20) { - df_flagarray - } - field(:sources, 28) { - stl_vector(4) { - pointer { - } - } - } - field(:targets, 40) { - stl_vector(4) { - pointer { - } - } - } - field(:effects, 52) { - stl_vector(4) { - pointer { - } - } - } -end - -class InterfaceButton < MemHack::Compound - sizeof 12 - - rtti_classname :interface_buttonst - - field(:hotkey_id, 4) { - number 32, true - } - field(:is_hidden, 8) { - number 8, true, nil, BooleanEnum - } - def getLabel(str) - DFHack.vmethod_call(self, 4, str) ; nil - end - def click() - DFHack.vmethod_call(self, 8) ; nil - end - def setColor(selected) - DFHack.vmethod_call(self, 12, selected) ; nil - end -end - -class InterfaceButtonBuildingst < InterfaceButton - sizeof 16 - - rtti_classname :interface_button_buildingst - - field(:building, 12) { - pointer { - global :Building - } - } -end - -class InterfaceButtonBuildingCategorySelectorst < InterfaceButtonBuildingst - sizeof 24 - - rtti_classname :interface_button_building_category_selectorst - - field(:category_id, 16) { - number 32, true - } - field(:unk_14, 20) { - number 8, false - } -end - -class InterfaceButtonBuildingMaterialSelectorst < InterfaceButtonBuildingst - sizeof 32 - - rtti_classname :interface_button_building_material_selectorst - - field(:mat_type, 16) { - number 16, true - } - field(:mat_index, 20) { - number 32, true - } - field(:material_category, 24) { - global :JobMaterialCategory - } - field(:unk_1c, 28) { - number 8, false - } -end - -class InterfaceButtonBuildingNewJobst < InterfaceButtonBuildingst - sizeof 52 - - rtti_classname :interface_button_building_new_jobst - - field(:job_type, 16) { - number 32, true, nil, JobType - } - field(:reaction_name, 20) { - stl_string - } - field(:unused_30, 24) { - number 16, true - } - field(:item_subtype, 26) { - number 16, true - } - field(:mat_type, 28) { - number 16, true - } - field(:mat_index, 32) { - number 32, true - } - field(:item_category, 36) { - global :StockpileGroupSet - } - field(:hist_figure_id, 40) { - number 32, true - } - def hist_figure_tg ; df.world.history.figures[hist_figure_id] ; end - field(:material_category, 44) { - global :JobMaterialCategory - } - field(:unk_48, 48) { - number 8, true, nil, BooleanEnum - } - field(:is_custom, 49) { - number 8, true, nil, BooleanEnum - } -end - -class InterfaceButtonButtonst < InterfaceButton - sizeof 12 - - rtti_classname :interface_button_buttonst - - field(:anon_1, 9) { - number 8, true, nil, BooleanEnum - } -end - -class InterfaceButtonButtonDesignateSelectst < InterfaceButtonButtonst - sizeof 12 - - rtti_classname :interface_button_button_designate_selectst - -end - -class InterfaceButtonButtonDonest < InterfaceButtonButtonst - sizeof 12 - - rtti_classname :interface_button_button_donest - -end - -class InterfaceButtonButtonOpenBitemDesignationst < InterfaceButtonButtonst - sizeof 12 - - rtti_classname :interface_button_button_open_bitem_designationst - -end - -class InterfaceButtonButtonOpenTrafficDesignationst < InterfaceButtonButtonst - sizeof 12 - - rtti_classname :interface_button_button_open_traffic_designationst - -end - -class InterfaceButtonConstructionst < InterfaceButton - sizeof 16 - - rtti_classname :interface_button_constructionst - - field(:unused_c, 12) { - pointer { - } - } -end - -class InterfaceButtonConstructionBuildingSelectorst < InterfaceButtonConstructionst - sizeof 28 - - rtti_classname :interface_button_construction_building_selectorst - - field(:building_type, 16) { - number 16, true - } - field(:building_subtype, 18) { - number 16, true - } - field(:custom_type, 20) { - number 32, true - } - def custom_type_tg ; df.world.raws.buildings.all[custom_type] ; end - field(:existing_count, 24) { - number 32, true - } -end - -class InterfaceButtonConstructionCategorySelectorst < InterfaceButtonConstructionst - sizeof 20 - - rtti_classname :interface_button_construction_category_selectorst - - field(:category_id, 16) { - number 32, true - } -end - -class InterfaceButtonConstructionDonest < InterfaceButtonConstructionst - sizeof 16 - - rtti_classname :interface_button_construction_donest - -end - -class Interfacest < MemHack::Compound - sizeof 1812876 - - field(:original_fps, 0) { - number 32, true - } - field(:view, 4) { - global :Viewscreen - } - field(:flag, 20) { - number 32, false - } - field(:shutdown_interface_tickcount, 24) { - number 32, true - } - field(:shutdown_interface_for_ms, 28) { - number 32, true - } - field(:supermovie_on, 32) { - number 8, false - } - field(:supermovie_pos, 36) { - number 32, true - } - field(:supermovie_delayrate, 40) { - number 32, true - } - field(:supermovie_delaystep, 44) { - number 32, true - } - field(:supermovie_sound, 48) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:supermovie_sound_time, 60) { - static_array(16, 800) { - static_array(200, 4) { - number 32, true - } - } - } - field(:supermoviebuffer, 12860) { - } - field(:supermoviebuffer_comp, 812860) { - } - field(:currentblocksize, 1812860) { - number 32, true - } - field(:nextfilepos, 1812864) { - number 32, true - } - field(:first_movie_write, 1812868) { - number 8, false - } - field(:movie_file, 1812872) { - stl_string - } -end - -class InvasionInfo < MemHack::Compound - sizeof 28 - - field(:id, 0) { - number 32, true - } - field(:civ_id, 4) { - number 32, true - } - def civ_tg ; df.world.entities.all[civ_id] ; end - field(:active_size1, 8) { - number 32, true - } - field(:active_size2, 12) { - number 32, true - } - field(:size, 16) { - number 32, true - } - field(:duration_counter, 20) { - number 32, true - } - field(:flags, 24) { - compound(:InvasionInfo_TFlags) { - field(:_whole, 0) { - number 16, false - } - field(:active, 0) { bit 0 } - field(:siege, 0) { bit 1 } - } - } - field(:unk4b, 26) { - number 16, true - } -end - -class Item < MemHack::Compound - sizeof 92 - - rtti_classname :itemst - - field(:pos, 4) { - global :Coord - } - field(:flags, 12) { - global :ItemFlags - } - field(:flags2, 16) { - global :ItemFlags2 - } - field(:age, 20) { - number 32, false - } - field(:id, 24) { - number 32, true - } - field(:specific_refs, 28) { - stl_vector(4) { - pointer { - global :SpecificRef - } - } - } - field(:itemrefs, 40) { - stl_vector(4) { - pointer { - global :GeneralRef - } - } - } - field(:world_data_id, 52) { - number 32, true, -1 - } - field(:world_data_subid, 56) { - number 32, true, -1 - } - field(:temp, 60) { - compound(:Item_TTemp) { - field(:unk1a, 0) { - number 8, false - } - field(:unk1b, 1) { - number 8, false - } - field(:unk2, 2) { - number 16, true - } - field(:unk3, 4) { - number 16, true - } - field(:unk4, 6) { - number 16, true - } - field(:unk5, 8) { - number 16, true - } - field(:spec_heat, 10) { - number 16, true - } - field(:ignite_point, 12) { - number 16, true - } - field(:heatdam_point, 14) { - number 16, true - } - field(:colddam_point, 16) { - number 16, true - } - field(:boiling_point, 18) { - number 16, true - } - field(:melting_point, 20) { - number 16, true - } - field(:fixed_temp, 22) { - number 16, true - } - } - } - field(:weight, 84) { - number 32, true - } - field(:weight_fraction, 88) { - number 32, true - } - def getType() - ItemType.sym(DFHack.vmethod_call(self, 0)) - end - def getSubtype() - val = DFHack.vmethod_call(self, 4) - val &= ((1 << 16) - 1) - ((val >> (16-1)) & 1) == 0 ? val : val - (1 << 16) - end - def getMaterial() - val = DFHack.vmethod_call(self, 8) - val &= ((1 << 16) - 1) - ((val >> (16-1)) & 1) == 0 ? val : val - (1 << 16) - end - def getMaterialIndex() - val = DFHack.vmethod_call(self, 12) - end - def setSubtype(arg0) - DFHack.vmethod_call(self, 16, arg0) ; nil - end - def setMaterial(arg0) - DFHack.vmethod_call(self, 20, arg0) ; nil - end - def setMaterialIndex(arg0) - DFHack.vmethod_call(self, 24, arg0) ; nil - end - def getActualMaterial() - val = DFHack.vmethod_call(self, 28) - val &= ((1 << 16) - 1) - ((val >> (16-1)) & 1) == 0 ? val : val - (1 << 16) - end - def getActualMaterialIndex() - val = DFHack.vmethod_call(self, 32) - end - def getRace() - val = DFHack.vmethod_call(self, 36) - val &= ((1 << 16) - 1) - ((val >> (16-1)) & 1) == 0 ? val : val - (1 << 16) - end - def getCaste() - val = DFHack.vmethod_call(self, 40) - val &= ((1 << 16) - 1) - ((val >> (16-1)) & 1) == 0 ? val : val - (1 << 16) - end - def getPlantID() - val = DFHack.vmethod_call(self, 44) - val &= ((1 << 16) - 1) - ((val >> (16-1)) & 1) == 0 ? val : val - (1 << 16) - end - def getTotalDimension() - val = DFHack.vmethod_call(self, 48) - end - def setDimension(amount) - DFHack.vmethod_call(self, 52, amount) ; nil - end - def subtractDimension(amount) - val = DFHack.vmethod_call(self, 56, amount) - (val & 1) != 0 - end - def isFoodStorage() - val = DFHack.vmethod_call(self, 60) - (val & 1) != 0 - end - def isTrackCart() - val = DFHack.vmethod_call(self, 64) - (val & 1) != 0 - end - def isWheelbarrow() - val = DFHack.vmethod_call(self, 68) - (val & 1) != 0 - end - def getVehicleID() - val = DFHack.vmethod_call(self, 72) - end - def getStockpile() - ptr = DFHack.vmethod_call(self, 76) - class << self - global :ItemStockpileRef - end._at(ptr) if ptr != 0 - end - def containsPlaster() - val = DFHack.vmethod_call(self, 80) - (val & 1) != 0 - end - def isPlaster() - val = DFHack.vmethod_call(self, 84) - (val & 1) != 0 - end - def getColorOverride(arg0) - val = DFHack.vmethod_call(self, 88, arg0) - (val & 1) != 0 - end - def getHistoryInfo() - ptr = DFHack.vmethod_call(self, 92) - class << self - pointer { - global :ItemHistoryInfo - } - end._at(ptr) if ptr != 0 - end - def hasToolUse(arg0) - val = DFHack.vmethod_call(self, 96, arg0) - (val & 1) != 0 - end - def becomePaste() - DFHack.vmethod_call(self, 104) ; nil - end - def becomePressed() - DFHack.vmethod_call(self, 108) ; nil - end - def calculateWeight() - DFHack.vmethod_call(self, 112) ; nil - end - def isSharpStone() - val = DFHack.vmethod_call(self, 116) - (val & 1) != 0 - end - def isCrystalGlassable() - val = DFHack.vmethod_call(self, 120) - (val & 1) != 0 - end - def isMetalOre(matIndex) - val = DFHack.vmethod_call(self, 124, matIndex) - (val & 1) != 0 - end - def getSpecHeat() - val = DFHack.vmethod_call(self, 136) - val & ((1 << 16) - 1) - end - def getIgnitePoint() - val = DFHack.vmethod_call(self, 140) - val & ((1 << 16) - 1) - end - def getHeatdamPoint() - val = DFHack.vmethod_call(self, 144) - val & ((1 << 16) - 1) - end - def getColddamPoint() - val = DFHack.vmethod_call(self, 148) - val & ((1 << 16) - 1) - end - def getBoilingPoint() - val = DFHack.vmethod_call(self, 152) - val & ((1 << 16) - 1) - end - def getMeltingPoint() - val = DFHack.vmethod_call(self, 156) - val & ((1 << 16) - 1) - end - def getFixedTemp() - val = DFHack.vmethod_call(self, 160) - val & ((1 << 16) - 1) - end - def getSolidDensity() - val = DFHack.vmethod_call(self, 164) - end - def materialRots() - val = DFHack.vmethod_call(self, 168) - (val & 1) != 0 - end - def getTemperature() - val = DFHack.vmethod_call(self, 172) - val & ((1 << 16) - 1) - end - def adjustTemperature(target, unk) - val = DFHack.vmethod_call(self, 176, target, unk) - (val & 1) != 0 - end - def extinguish() - DFHack.vmethod_call(self, 184) ; nil - end - def getGloveHandedness() - val = DFHack.vmethod_call(self, 188) - val &= ((1 << 8) - 1) - ((val >> (8-1)) & 1) == 0 ? val : val - (1 << 8) - end - def setGloveHandedness(arg0) - DFHack.vmethod_call(self, 192, arg0) ; nil - end - def isSpike() - val = DFHack.vmethod_call(self, 196) - (val & 1) != 0 - end - def isScrew() - val = DFHack.vmethod_call(self, 200) - (val & 1) != 0 - end - def isBuildMat() - val = DFHack.vmethod_call(self, 204) - (val & 1) != 0 - end - def isTemperatureSafe(arg0) - val = DFHack.vmethod_call(self, 208, arg0) - (val & 1) != 0 - end - def setRandSubtype(arg0) - DFHack.vmethod_call(self, 212, arg0) ; nil - end - def getWear() - val = DFHack.vmethod_call(self, 220) - val &= ((1 << 16) - 1) - ((val >> (16-1)) & 1) == 0 ? val : val - (1 << 16) - end - def setWear(arg0) - DFHack.vmethod_call(self, 224, arg0) ; nil - end - def getMaker() - val = DFHack.vmethod_call(self, 228) - end - def setMaker(unit_id) - DFHack.vmethod_call(self, 232, unit_id) ; nil - end - def getCorpseInfo(prace, pcaste, phfig, punit) - DFHack.vmethod_call(self, 236, prace, pcaste, phfig, punit) ; nil - end - def getGloveFlags() - ptr = DFHack.vmethod_call(self, 244) - class << self - df_flagarray - end._at(ptr) if ptr != 0 - end - def getItemShapeDesc() - ptr = DFHack.vmethod_call(self, 248) - class << self - stl_string - end._at(ptr) if ptr != 0 - end - def isMatchingAmmoItem(arg0) - val = DFHack.vmethod_call(self, 252, arg0) - (val & 1) != 0 - end - def setSeedsUnk84(arg0) - DFHack.vmethod_call(self, 268, arg0) ; nil - end - def getCorpseUnk17c() - val = DFHack.vmethod_call(self, 272) - val &= ((1 << 16) - 1) - ((val >> (16-1)) & 1) == 0 ? val : val - (1 << 16) - end - def ageItem(amount) - DFHack.vmethod_call(self, 276, amount) ; nil - end - def getCritterUnk80() - val = DFHack.vmethod_call(self, 280) - end - def setCritterUnk80(arg0) - DFHack.vmethod_call(self, 284, arg0) ; nil - end - def incrementCritterUnk80() - DFHack.vmethod_call(self, 288) ; nil - end - def getRotTimer() - val = DFHack.vmethod_call(self, 292) - end - def setRotTimer(val) - DFHack.vmethod_call(self, 296, val) ; nil - end - def incrementRotTimer() - DFHack.vmethod_call(self, 300) ; nil - end - def isBogeymanCorpse() - val = DFHack.vmethod_call(self, 304) - (val & 1) != 0 - end - def getAmmoType(arg0) - ptr = DFHack.vmethod_call(self, 312, arg0) - class << self - stl_string - end._at(ptr) if ptr != 0 - end - def isLiquidPowder() - val = DFHack.vmethod_call(self, 316) - (val & 1) != 0 - end - def isLiquid() - val = DFHack.vmethod_call(self, 320) - (val & 1) != 0 - end - def getVolume() - val = DFHack.vmethod_call(self, 328) - end - def isArmorNotClothing() - val = DFHack.vmethod_call(self, 340) - (val & 1) != 0 - end - def isMillable() - val = DFHack.vmethod_call(self, 344) - (val & 1) != 0 - end - def isProcessableThread() - val = DFHack.vmethod_call(self, 348) - (val & 1) != 0 - end - def isProcessableVial() - val = DFHack.vmethod_call(self, 352) - (val & 1) != 0 - end - def isProcessableBag() - val = DFHack.vmethod_call(self, 356) - (val & 1) != 0 - end - def isProcessableBarrel() - val = DFHack.vmethod_call(self, 360) - (val & 1) != 0 - end - def isEdiblePlant() - val = DFHack.vmethod_call(self, 364) - (val & 1) != 0 - end - def isEdibleRaw(hunger) - val = DFHack.vmethod_call(self, 368, hunger) - (val & 1) != 0 - end - def isEdibleMeat(hunger) - val = DFHack.vmethod_call(self, 372, hunger) - (val & 1) != 0 - end - def isEdibleCorpse(hunger) - val = DFHack.vmethod_call(self, 376, hunger) - (val & 1) != 0 - end - def moveToGround(arg0, arg1, arg2) - val = DFHack.vmethod_call(self, 380, arg0, arg1, arg2) - (val & 1) != 0 - end - def categorize(arg0) - DFHack.vmethod_call(self, 384, arg0) ; nil - end - def uncategorize() - DFHack.vmethod_call(self, 388) ; nil - end - def isFurniture(empty) - val = DFHack.vmethod_call(self, 392, empty) - (val & 1) != 0 - end - def isPressed() - val = DFHack.vmethod_call(self, 396) - (val & 1) != 0 - end - def isCageOrTrap() - val = DFHack.vmethod_call(self, 400) - (val & 1) != 0 - end - def assignQuality(maker, job_skill) - DFHack.vmethod_call(self, 404, maker, JobSkill.int(job_skill)) ; nil - end - def notifyLostMasterwork() - DFHack.vmethod_call(self, 408) ; nil - end - def isDamagedByHeat() - val = DFHack.vmethod_call(self, 436) - (val & 1) != 0 - end - def needTwoHandedWield(arg0) - val = DFHack.vmethod_call(self, 440, arg0) - (val & 1) != 0 - end - def splitStack(arg0, arg1) - ptr = DFHack.vmethod_call(self, 444, arg0, arg1) - class << self - global :Item - end._at(ptr) if ptr != 0 - end - def isTameableVermin() - val = DFHack.vmethod_call(self, 448) - (val & 1) != 0 - end - def isDistillable(checkKitchenSettings) - val = DFHack.vmethod_call(self, 452, checkKitchenSettings) - (val & 1) != 0 - end - def isDye() - val = DFHack.vmethod_call(self, 456) - (val & 1) != 0 - end - def isMilkable() - val = DFHack.vmethod_call(self, 460) - (val & 1) != 0 - end - def isSandBearing() - val = DFHack.vmethod_call(self, 464) - (val & 1) != 0 - end - def isLyeBearing() - val = DFHack.vmethod_call(self, 468) - (val & 1) != 0 - end - def isAnimalProduct() - val = DFHack.vmethod_call(self, 472) - (val & 1) != 0 - end - def addWear(delta, simple, lose_masterwork) - val = DFHack.vmethod_call(self, 480, delta, simple, lose_masterwork) - (val & 1) != 0 - end - def incWearTimer(delta) - val = DFHack.vmethod_call(self, 484, delta) - (val & 1) != 0 - end - def checkWearDestroy(simple, lose_masterwork) - val = DFHack.vmethod_call(self, 488, simple, lose_masterwork) - (val & 1) != 0 - end - def addContaminant(mat_type, mat_index, mat_state, temp, size, unk, flags) - DFHack.vmethod_call(self, 492, mat_type, mat_index, MatterState.int(mat_state), temp, size, unk, flags) ; nil - end - def removeContaminantByIdx(index, amount) - DFHack.vmethod_call(self, 496, index, amount) ; nil - end - def removeContaminant(mat_type, mat_index, amount) - DFHack.vmethod_call(self, 500, mat_type, mat_index, amount) ; nil - end - def tradeUnitContaminants(arg0, body_part_id) - DFHack.vmethod_call(self, 504, arg0, body_part_id) ; nil - end - def tradeItemContaminants(arg0) - DFHack.vmethod_call(self, 508, arg0) ; nil - end - def tradeItemContaminants2(arg0) - DFHack.vmethod_call(self, 512, arg0) ; nil - end - def contaminateWound(arg0, arg1, shift, body_part_id) - DFHack.vmethod_call(self, 516, arg0, arg1, shift, body_part_id) ; nil - end - def write_file(arg0) - DFHack.vmethod_call(self, 520, arg0) ; nil - end - def read_file(arg0, loadversion) - DFHack.vmethod_call(self, 524, arg0, loadversion) ; nil - end - def getWeaponAttacks() - ptr = DFHack.vmethod_call(self, 528) - class << self - stl_vector(4) { - pointer { - } - } - end._at(ptr) if ptr != 0 - end - def isBag() - val = DFHack.vmethod_call(self, 552) - (val & 1) != 0 - end - def isSand() - val = DFHack.vmethod_call(self, 556) - (val & 1) != 0 - end - def getStackSize() - val = DFHack.vmethod_call(self, 564) - end - def addStackSize(amount) - DFHack.vmethod_call(self, 568, amount) ; nil - end - def setStackSize(amount) - DFHack.vmethod_call(self, 572, amount) ; nil - end - def isAmmoClass(arg0) - val = DFHack.vmethod_call(self, 576, arg0) - (val & 1) != 0 - end - def updateTempFromMap(local, contained, adjust, multiplier) - val = DFHack.vmethod_call(self, 596, local, contained, adjust, multiplier) - (val & 1) != 0 - end - def updateTemperature(temp, local, contained, adjust, multiplier) - val = DFHack.vmethod_call(self, 600, temp, local, contained, adjust, multiplier) - (val & 1) != 0 - end - def updateFromWeather() - val = DFHack.vmethod_call(self, 604) - (val & 1) != 0 - end - def updateContaminants() - val = DFHack.vmethod_call(self, 608) - (val & 1) != 0 - end - def checkTemperatureDamage() - val = DFHack.vmethod_call(self, 612) - (val & 1) != 0 - end - def checkHeatColdDamage() - val = DFHack.vmethod_call(self, 616) - (val & 1) != 0 - end - def checkMeltBoil() - val = DFHack.vmethod_call(self, 620) - (val & 1) != 0 - end - def getMeleeSkill() - val = DFHack.vmethod_call(self, 624) - val &= ((1 << 16) - 1) - ((val >> (16-1)) & 1) == 0 ? val : val - (1 << 16) - end - def getRangedSkill() - val = DFHack.vmethod_call(self, 628) - val &= ((1 << 16) - 1) - ((val >> (16-1)) & 1) == 0 ? val : val - (1 << 16) - end - def setQuality(quality) - DFHack.vmethod_call(self, 632, quality) ; nil - end - def getQuality() - val = DFHack.vmethod_call(self, 636) - val &= ((1 << 16) - 1) - ((val >> (16-1)) & 1) == 0 ? val : val - (1 << 16) - end - def getOverallQuality() - val = DFHack.vmethod_call(self, 640) - val &= ((1 << 16) - 1) - ((val >> (16-1)) & 1) == 0 ? val : val - (1 << 16) - end - def getImprovementQuality() - val = DFHack.vmethod_call(self, 644) - val &= ((1 << 16) - 1) - ((val >> (16-1)) & 1) == 0 ? val : val - (1 << 16) - end - def getProjectileSize() - val = DFHack.vmethod_call(self, 648) - end - def isImprovable(arg0, arg1, arg2) - val = DFHack.vmethod_call(self, 652, arg0, arg1, arg2) - (val & 1) != 0 - end - def setSharpness(unk1, unk2) - DFHack.vmethod_call(self, 656, unk1, unk2) ; nil - end - def getSharpness() - val = DFHack.vmethod_call(self, 660) - end - def isTotemable() - val = DFHack.vmethod_call(self, 664) - (val & 1) != 0 - end - def isDyeable() - val = DFHack.vmethod_call(self, 668) - (val & 1) != 0 - end - def isNotDyed() - val = DFHack.vmethod_call(self, 672) - (val & 1) != 0 - end - def isDyed() - val = DFHack.vmethod_call(self, 676) - (val & 1) != 0 - end - def canSewImage() - val = DFHack.vmethod_call(self, 680) - (val & 1) != 0 - end - def isProcessableVialAtStill() - val = DFHack.vmethod_call(self, 688) - (val & 1) != 0 - end - def getBlockChance() - val = DFHack.vmethod_call(self, 696) - end - def getMakerRace() - val = DFHack.vmethod_call(self, 704) - val &= ((1 << 16) - 1) - ((val >> (16-1)) & 1) == 0 ? val : val - (1 << 16) - end - def setMakerRace(arg0) - DFHack.vmethod_call(self, 708, arg0) ; nil - end - def getEffectiveArmorLevel() - val = DFHack.vmethod_call(self, 712) - val &= ((1 << 8) - 1) - ((val >> (8-1)) & 1) == 0 ? val : val - (1 << 8) - end - def isOrganicCloth() - val = DFHack.vmethod_call(self, 720) - (val & 1) != 0 - end - def coverWithContaminant(mat_type, mat_index, mat_state, temperature) - DFHack.vmethod_call(self, 728, mat_type, mat_index, MatterState.int(mat_state), temperature) ; nil - end - def isImproved() - val = DFHack.vmethod_call(self, 736) - (val & 1) != 0 - end - def getMagic() - ptr = DFHack.vmethod_call(self, 740) - class << self - stl_vector(4) { - pointer { - global :ItemMagicness - } - } - end._at(ptr) if ptr != 0 - end - def getItemDescription(arg0, mode) - DFHack.vmethod_call(self, 744, arg0, mode) ; nil - end - def getItemDescriptionPrefix(arg0, mode) - DFHack.vmethod_call(self, 748, arg0, mode) ; nil - end - def getItemBasicName(arg0) - DFHack.vmethod_call(self, 752, arg0) ; nil - end - def getImprovementsValue(entity_id) - val = DFHack.vmethod_call(self, 756, entity_id) - end - def isExtractBearingFish() - val = DFHack.vmethod_call(self, 760) - (val & 1) != 0 - end - def isExtractBearingVermin() - val = DFHack.vmethod_call(self, 764) - (val & 1) != 0 - end - def getBaseWeight() - val = DFHack.vmethod_call(self, 772) - end - def getWeightShiftBits() - val = DFHack.vmethod_call(self, 776) - end - def isCollected() - val = DFHack.vmethod_call(self, 780) - (val & 1) != 0 - end - def isEdibleVermin() - val = DFHack.vmethod_call(self, 784) - (val & 1) != 0 - end - def drawSelf() - DFHack.vmethod_call(self, 788) ; nil - end - def isRangedWeapon() - val = DFHack.vmethod_call(self, 792) - (val & 1) != 0 - end - def isClothing() - val = DFHack.vmethod_call(self, 796) - (val & 1) != 0 - end - def isWet() - val = DFHack.vmethod_call(self, 800) - (val & 1) != 0 - end - def isAssignedToStockpile() - val = DFHack.vmethod_call(self, 808) - (val & 1) != 0 - end - def isAssignedToThisStockpile(arg0) - val = DFHack.vmethod_call(self, 812, arg0) - (val & 1) != 0 - end - def removeStockpileAssignment() - DFHack.vmethod_call(self, 820) ; nil - end - def getStockpile2() - ptr = DFHack.vmethod_call(self, 824) - class << self - global :ItemStockpileRef - end._at(ptr) if ptr != 0 - end - def getThreadDyeValue(arg0) - val = DFHack.vmethod_call(self, 840, arg0) - end - def getSlabEngravingType() - SlabEngravingType.sym(DFHack.vmethod_call(self, 892)) - end - def getAbsorption() - val = DFHack.vmethod_call(self, 896) - end - def isGemMaterial() - val = DFHack.vmethod_call(self, 904) - (val & 1) != 0 - end - def setGemShape(shape) - DFHack.vmethod_call(self, 908, shape) ; nil - end - def hasGemShape() - val = DFHack.vmethod_call(self, 912) - (val & 1) != 0 - end - def getGemShape() - val = DFHack.vmethod_call(self, 916) - end -end - -class ItemActual < Item - sizeof 128 - - rtti_classname :item_actualst - - field(:stack_size, 92) { - number 32, true - } - field(:history_info, 96) { - pointer { - pointer { - global :ItemHistoryInfo - } - } - } - field(:magic, 100) { - pointer { - stl_vector(4) { - pointer { - global :ItemMagicness - } - } - } - } - field(:contaminants, 104) { - pointer { - stl_vector(4) { - pointer { - global :Contaminant - } - } - } - } - field(:temperature, 108) { - number 16, false - } - field(:temperature_fraction, 110) { - number 16, false - } - field(:wear, 112) { - number 16, true - } - field(:wear_timer, 116) { - number 32, true - } - field(:anon_1, 120) { - number 32, true, -1 - } - field(:temp_updated_frame, 124) { - number 32, true, -1 - } -end - -class ItemCrafted < ItemActual - sizeof 152 - - rtti_classname :item_craftedst - - field(:mat_type, 128) { - number 16, true - } - field(:mat_index, 132) { - number 32, true - } - field(:maker_race, 136) { - number 16, true - } - def maker_race_tg ; df.world.raws.creatures.all[maker_race] ; end - field(:quality, 138) { - number 16, true, nil, ItemQuality - } - field(:skill_used, 140) { - number 32, true, nil, JobSkill - } - field(:maker, 144) { - number 32, true - } - def maker_tg ; df.world.history.figures[maker] ; end - field(:masterpiece_event, 148) { - number 32, true - } - def masterpiece_event_tg ; df.world.history.events[masterpiece_event] ; end -end - -class ItemConstructed < ItemCrafted - sizeof 164 - - rtti_classname :item_constructedst - - field(:improvements, 152) { - stl_vector(4) { - pointer { - global :Itemimprovement - } - } - } -end - -class ItemAmmost < ItemConstructed - sizeof 172 - - rtti_classname :item_ammost - - field(:subtype, 164) { - pointer { - global :ItemdefAmmost - } - } - field(:sharpness, 168) { - number 32, true - } -end - -class ItemAmuletst < ItemConstructed - sizeof 164 - - rtti_classname :item_amuletst - -end - -class ItemAnimaltrapst < ItemConstructed - sizeof 164 - - rtti_classname :item_animaltrapst - -end - -class ItemAnvilst < ItemConstructed - sizeof 164 - - rtti_classname :item_anvilst - -end - -class ItemArmorst < ItemConstructed - sizeof 168 - - rtti_classname :item_armorst - - field(:subtype, 164) { - pointer { - global :ItemdefArmorst - } - } -end - -class ItemArmorstandst < ItemConstructed - sizeof 164 - - rtti_classname :item_armorstandst - -end - -class ItemBackpackst < ItemConstructed - sizeof 164 - - rtti_classname :item_backpackst - -end - -class ItemBallistaarrowheadst < ItemActual - sizeof 136 - - rtti_classname :item_ballistaarrowheadst - - field(:mat_type, 128) { - number 16, true - } - field(:mat_index, 132) { - number 32, true - } -end - -class ItemBallistapartsst < ItemConstructed - sizeof 164 - - rtti_classname :item_ballistapartsst - -end - -class ItemBarrelst < ItemConstructed - sizeof 172 - - rtti_classname :item_barrelst - - field(:stockpile, 164) { - global :ItemStockpileRef - } -end - -class ItemBarst < ItemActual - sizeof 140 - - rtti_classname :item_barst - - field(:subtype, 128) { - number 16, true - } - field(:mat_type, 130) { - number 16, true - } - field(:mat_index, 132) { - number 32, true - } - field(:dimension, 136) { - number 32, true - } -end - -class ItemBedst < ItemConstructed - sizeof 164 - - rtti_classname :item_bedst - -end - -class ItemBinst < ItemConstructed - sizeof 172 - - rtti_classname :item_binst - - field(:stockpile, 164) { - global :ItemStockpileRef - } -end - -class ItemBlocksst < ItemActual - sizeof 136 - - rtti_classname :item_blocksst - - field(:mat_type, 128) { - number 16, true - } - field(:mat_index, 132) { - number 32, true - } -end - -class ItemBodyComponent < ItemActual - sizeof 628 - - rtti_classname :item_body_componentst - - field(:race, 128) { - number 16, true - } - def race_tg ; df.world.raws.creatures.all[race] ; end - field(:hist_figure_id, 132) { - number 32, true - } - def hist_figure_tg ; df.world.history.figures[hist_figure_id] ; end - field(:unit_id, 136) { - number 32, true - } - def unit_tg ; df.world.units.all[unit_id] ; end - field(:caste, 140) { - number 16, true - } - field(:sex, 142) { - number 8, false - } - field(:race2, 144) { - number 16, true - } - def race2_tg ; df.world.raws.creatures.all[race2] ; end - field(:caste2, 146) { - number 16, true - } - field(:unk_88, 148) { - number 32, true - } - field(:unk_8c, 152) { - number 8, false - } - field(:body, 156) { - compound(:ItemBodyComponent_TBody) { - field(:wounds, 0) { - stl_vector(4) { - pointer { - } - } - } - field(:unk_100, 12) { - static_array(10, 4) { - number 32, true - } - } - field(:unk_c8, 52) { - number 32, true - } - field(:components, 56) { - global :BodyComponentInfo - } - field(:physical_attr_unk1, 152) { - static_array(6, 4, PhysicalAttributeType) { - number 32, true - } - } - field(:physical_attr_unk2, 176) { - static_array(6, 4, PhysicalAttributeType) { - number 32, true - } - } - field(:physical_attr_unk3, 200) { - static_array(6, 4, PhysicalAttributeType) { - number 32, true - } - } - field(:unk_194, 224) { - stl_vector(4) { - number 32, true - } - } - field(:unk_1a4, 236) { - stl_vector(4) { - number 32, true - } - } - field(:unk_1b4, 248) { - stl_vector(4) { - number 32, true - } - } - field(:unk_18c, 260) { - number 32, true - } - } - } - field(:birth_year, 420) { - number 32, true - } - field(:birth_time, 424) { - number 32, true - } - field(:curse_year, 428) { - number 32, true - } - field(:curse_time, 432) { - number 32, true - } - field(:anon_1, 436) { - number 32, true - } - field(:anon_2, 440) { - number 32, true - } - field(:death_year, 444) { - number 32, true - } - field(:death_time, 448) { - number 32, true - } - field(:appearance, 452) { - compound(:ItemBodyComponent_TAppearance) { - field(:colors, 0) { - stl_vector(4) { - number 32, true - } - } - field(:unk_1e8, 12) { - stl_vector(2) { - number 16, true - } - } - field(:unk_1f8, 24) { - stl_vector(4) { - number 32, true - } - } - field(:unk_208, 36) { - stl_vector(4) { - number 32, true - } - } - field(:unk_218, 48) { - stl_vector(4) { - number 32, true - } - } - } - } - field(:blood_count, 512) { - number 32, true - } - field(:unk_1e0, 516) { - number 32, true - } - field(:hist_figure_id2, 520) { - number 32, true - } - def hist_figure_tg2 ; df.world.history.figures[hist_figure_id2] ; end - field(:anon_3, 524) { - number 32, true - } - field(:unit_id2, 528) { - number 32, true - } - def unit_tg2 ; df.world.units.all[unit_id2] ; end - field(:corpse_flags, 532) { - compound(:ItemBodyComponent_TCorpseFlags) { - field(:_whole, 0) { - number 32, true - } - field(:unbutchered, 0) { bit 0 } - field(:bone, 0) { bit 4 } - field(:shell, 0) { bit 5 } - field(:skull, 0) { bit 12 } - field(:separated_part, 0) { bit 13 } - field(:hair_wool, 0) { bit 14 } - field(:yarn, 0) { bit 15 } - } - } - field(:material_amount, 536) { - static_array(19, 4, CorpseMaterialType) { - number 32, true - } - } - field(:bone1, 612) { - compound(:ItemBodyComponent_TBone1) { - field(:mat_type, 0) { - number 16, true - } - field(:mat_index, 4) { - number 32, true - } - } - } - field(:bone2, 620) { - compound(:ItemBodyComponent_TBone2) { - field(:mat_type, 0) { - number 16, true - } - field(:mat_index, 4) { - number 32, true - } - } - } -end - -class ItemBookst < ItemConstructed - sizeof 168 - - rtti_classname :item_bookst - - field(:title, 164) { - stl_string - } -end - -class ItemBoulderst < ItemActual - sizeof 136 - - rtti_classname :item_boulderst - - field(:mat_type, 128) { - number 16, true - } - field(:mat_index, 132) { - number 32, true - } -end - -class ItemBoxst < ItemConstructed - sizeof 164 - - rtti_classname :item_boxst - -end - -class ItemBraceletst < ItemConstructed - sizeof 164 - - rtti_classname :item_braceletst - -end - -class ItemBucketst < ItemConstructed - sizeof 164 - - rtti_classname :item_bucketst - -end - -class ItemCabinetst < ItemConstructed - sizeof 164 - - rtti_classname :item_cabinetst - -end - -class ItemCagest < ItemConstructed - sizeof 164 - - rtti_classname :item_cagest - -end - -class ItemCatapultpartsst < ItemConstructed - sizeof 164 - - rtti_classname :item_catapultpartsst - -end - -class ItemChainst < ItemConstructed - sizeof 164 - - rtti_classname :item_chainst - -end - -class ItemChairst < ItemConstructed - sizeof 164 - - rtti_classname :item_chairst - -end - -class ItemCheesest < ItemActual - sizeof 140 - - rtti_classname :item_cheesest - - field(:mat_type, 128) { - number 16, true - } - field(:mat_index, 132) { - number 32, true - } - field(:rot_timer, 136) { - number 32, true - } -end - -class ItemClothst < ItemConstructed - sizeof 168 - - rtti_classname :item_clothst - - field(:dimension, 164) { - number 32, true - } -end - -class ItemCoffinst < ItemConstructed - sizeof 164 - - rtti_classname :item_coffinst - -end - -class ItemCoinst < ItemConstructed - sizeof 168 - - rtti_classname :item_coinst - - field(:unk_a0, 164) { - number 16, true - } -end - -class ItemCorpsepiecest < ItemBodyComponent - sizeof 628 - - rtti_classname :item_corpsepiecest - -end - -class ItemCorpsest < ItemBodyComponent - sizeof 628 - - rtti_classname :item_corpsest - -end - -class ItemCritter < ItemActual - sizeof 140 - - rtti_classname :item_critterst - - field(:race, 128) { - number 16, true - } - def race_tg ; df.world.raws.creatures.all[race] ; end - field(:caste, 130) { - number 16, true - } - field(:unk_7c, 132) { - number 32, true - } - field(:unk_80, 136) { - number 32, true - } -end - -class ItemCrownst < ItemConstructed - sizeof 164 - - rtti_classname :item_crownst - -end - -class ItemCrutchst < ItemConstructed - sizeof 164 - - rtti_classname :item_crutchst - -end - -class ItemDoorst < ItemConstructed - sizeof 164 - - rtti_classname :item_doorst - -end - -class ItemLiquipowder < ItemActual - sizeof 144 - - rtti_classname :item_liquipowderst - - field(:mat_state, 128) { - global :ItemMatstate - } - field(:dimension, 132) { - number 32, true - } - field(:mat_type, 136) { - number 16, true - } - field(:mat_index, 140) { - number 32, true - } -end - -class ItemLiquid < ItemLiquipowder - sizeof 144 - - rtti_classname :item_liquidst - -end - -class ItemDrinkst < ItemLiquid - sizeof 144 - - rtti_classname :item_drinkst - -end - -class ItemEarringst < ItemConstructed - sizeof 164 - - rtti_classname :item_earringst - -end - -class ItemEggst < ItemActual - sizeof 244 - - rtti_classname :item_eggst - - field(:race, 128) { - number 16, true - } - def race_tg ; df.world.raws.creatures.all[race] ; end - field(:caste, 130) { - number 16, true - } - field(:unk_7c, 132) { - number 32, true - } - field(:egg_materials, 136) { - global :MaterialVecRef - } - field(:anon_1, 160) { - } - field(:anon_2, 204) { - number 32, true - } - field(:anon_3, 208) { - number 32, true - } - field(:unk_cc, 212) { - compound(:ItemEggst_TUnkCc) { - field(:anon_1, 0) { - number 16, true - } - field(:anon_2, 2) { - number 16, true - } - field(:anon_3, 4) { - number 16, true - } - field(:anon_4, 8) { - number 32, true - } - field(:anon_5, 12) { - number 32, true - } - field(:anon_6, 16) { - number 32, true - } - field(:anon_7, 20) { - number 16, true - } - } - } - field(:anon_4, 236) { - number 32, true - } - field(:size, 240) { - number 32, true - } -end - -class ItemFigurinest < ItemConstructed - sizeof 184 - - rtti_classname :item_figurinest - - field(:image, 164) { - global :ArtImageRef - } - field(:description, 180) { - stl_string - } -end - -class ItemFilterSpec < MemHack::Compound - sizeof 12 - - field(:item_type, 0) { - number 16, true, nil, ItemType - } - field(:item_subtype, 2) { - number 16, true - } - field(:material_class, 4) { - number 16, true, nil, UniformMaterialClass - } - field(:mattype, 6) { - number 16, true - } - field(:matindex, 8) { - number 32, true - } -end - -class ItemFishRawst < ItemActual - sizeof 136 - - rtti_classname :item_fish_rawst - - field(:race, 128) { - number 16, true - } - def race_tg ; df.world.raws.creatures.all[race] ; end - field(:caste, 130) { - number 16, true - } - field(:rot_timer, 132) { - number 32, true - } -end - -class ItemFishst < ItemActual - sizeof 136 - - rtti_classname :item_fishst - - field(:race, 128) { - number 16, true - } - def race_tg ; df.world.raws.creatures.all[race] ; end - field(:caste, 130) { - number 16, true - } - field(:rot_timer, 132) { - number 32, true - } -end - -class ItemFlags < MemHack::Compound - field(:_whole, 0) { - number 32, true - } - field(:on_ground, 0) { bit 0 } - field(:in_job, 0) { bit 1 } - field(:hostile, 0) { bit 2 } - field(:in_inventory, 0) { bit 3 } - field(:removed, 0) { bit 4 } - field(:in_building, 0) { bit 5 } - field(:container, 0) { bit 6 } - field(:dead_dwarf, 0) { bit 7 } - field(:rotten, 0) { bit 8 } - field(:spider_web, 0) { bit 9 } - field(:construction, 0) { bit 10 } - field(:encased, 0) { bit 11 } - field(:unk4, 0) { bit 12 } - field(:murder, 0) { bit 13 } - field(:foreign, 0) { bit 14 } - field(:trader, 0) { bit 15 } - field(:owned, 0) { bit 16 } - field(:garbage_collect, 0) { bit 17 } - field(:artifact1, 0) { bit 18 } - field(:forbid, 0) { bit 19 } - field(:unk6, 0) { bit 20 } - field(:dump, 0) { bit 21 } - field(:on_fire, 0) { bit 22 } - field(:melt, 0) { bit 23 } - field(:hidden, 0) { bit 24 } - field(:in_chest, 0) { bit 25 } - field(:unk7, 0) { bit 26 } - field(:artifact2, 0) { bit 27 } - field(:temps_computed, 0) { bit 28 } - field(:weight_computed, 0) { bit 29 } - field(:unk10, 0) { bit 30 } - field(:unk11, 0) { bit 31 } -end - -class ItemFlags2 < MemHack::Compound - field(:_whole, 0) { - number 32, true - } - field(:has_rider, 0) { bit 0 } -end - -class ItemFlaskst < ItemConstructed - sizeof 164 - - rtti_classname :item_flaskst - -end - -class ItemFloodgatest < ItemConstructed - sizeof 164 - - rtti_classname :item_floodgatest - -end - -class ItemFoodst < ItemCrafted - sizeof 180 - - rtti_classname :item_foodst - - field(:subtype, 152) { - pointer { - global :ItemdefFoodst - } - } - field(:unk_94, 156) { - number 32, true - } - field(:unk_98, 160) { - number 16, true - } - field(:ingredients, 164) { - stl_vector(4) { - pointer { - compound(:ItemFoodst_TIngredients) { - sizeof 28 - - field(:anon_1, 0) { - number 16, true - } - field(:item_type, 2) { - number 16, true, nil, ItemType - } - field(:unk_4, 4) { - number 16, true, -1 - } - field(:mat_type, 6) { - number 16, true - } - field(:mat_index, 8) { - number 32, true, -1 - } - field(:maker, 12) { - number 32, true - } - def maker_tg ; df.world.history.figures[maker] ; end - field(:unk_10, 16) { - number 16, true - } - field(:unk_14, 20) { - number 32, true - } - field(:unk_18, 24) { - number 32, true - } - } - } - } - } - field(:rot_timer, 176) { - number 32, true - } -end - -class ItemGemst < ItemConstructed - sizeof 168 - - rtti_classname :item_gemst - - field(:shape, 164) { - number 32, true - } - def shape_tg ; df.world.raws.language.shapes[shape] ; end -end - -class ItemGlobst < ItemActual - sizeof 144 - - rtti_classname :item_globst - - field(:mat_type, 128) { - number 16, true - } - field(:mat_index, 132) { - number 32, true - } - field(:rot_timer, 136) { - number 32, true - } - field(:mat_state, 140) { - global :ItemMatstate - } -end - -class ItemGlovesst < ItemConstructed - sizeof 176 - - rtti_classname :item_glovesst - - field(:subtype, 164) { - pointer { - global :ItemdefGlovesst - } - } - field(:flags, 168) { - df_flagarray - } -end - -class ItemGobletst < ItemConstructed - sizeof 164 - - rtti_classname :item_gobletst - -end - -class ItemGratest < ItemConstructed - sizeof 164 - - rtti_classname :item_gratest - -end - -class ItemHatchCoverst < ItemConstructed - sizeof 164 - - rtti_classname :item_hatch_coverst - -end - -class ItemHelmst < ItemConstructed - sizeof 168 - - rtti_classname :item_helmst - - field(:subtype, 164) { - pointer { - global :ItemdefHelmst - } - } -end - -class ItemHistoryInfo < MemHack::Compound - sizeof 12 - - field(:kills, 0) { - pointer { - global :ItemKillInfo - } - } - field(:unk1, 4) { - number 32, true - } - field(:unk2, 8) { - number 32, true - } -end - -class ItemInstrumentst < ItemConstructed - sizeof 168 - - rtti_classname :item_instrumentst - - field(:subtype, 164) { - pointer { - global :ItemdefInstrumentst - } - } -end - -class ItemKillInfo < MemHack::Compound - sizeof 120 - - field(:targets, 0) { - global :HistoricalKills - } - field(:slayers, 96) { - stl_vector(4) { - number 32, true - } - } - def slayers_tg ; slayers.map { |i| df.world.history.figures[i] } ; end - field(:slayer_kill_counts, 108) { - stl_vector(4) { - number 32, true - } - } -end - -class ItemLeavesst < ItemActual - sizeof 140 - - rtti_classname :item_leavesst - - field(:mat_type, 128) { - number 16, true - } - field(:mat_index, 132) { - number 32, true - } - field(:rot_timer, 136) { - number 32, true - } -end - -class ItemLiquidMiscst < ItemLiquid - sizeof 148 - - rtti_classname :item_liquid_miscst - - field(:unk_88, 144) { - number 32, true - } -end - -class ItemMagicness < MemHack::Compound - sizeof 12 - - field(:type, 0) { - number 16, true - } - field(:value, 2) { - number 16, true - } - field(:anon_1, 4) { - number 16, true - } - field(:flags, 8) { - number 32, true - } -end - -class ItemMatstate < MemHack::Compound - field(:_whole, 0) { - number 32, true - } - field(:pressed, 0) { bit 1 } - field(:paste, 0) { bit 2 } -end - -class ItemMeatst < ItemActual - sizeof 140 - - rtti_classname :item_meatst - - field(:mat_type, 128) { - number 16, true - } - field(:mat_index, 132) { - number 32, true - } - field(:rot_timer, 136) { - number 32, true - } -end - -class ItemMillstonest < ItemConstructed - sizeof 164 - - rtti_classname :item_millstonest - -end - -class ItemOrthopedicCastst < ItemConstructed - sizeof 172 - - rtti_classname :item_orthopedic_castst - - field(:unk_a0, 164) { - stl_string - } - field(:unk_bc, 168) { - stl_string - } -end - -class ItemPantsst < ItemConstructed - sizeof 168 - - rtti_classname :item_pantsst - - field(:subtype, 164) { - pointer { - global :ItemdefPantsst - } - } -end - -class ItemPetst < ItemCritter - sizeof 140 - - rtti_classname :item_petst - -end - -class ItemPipeSectionst < ItemConstructed - sizeof 164 - - rtti_classname :item_pipe_sectionst - -end - -class ItemPlantst < ItemActual - sizeof 140 - - rtti_classname :item_plantst - - field(:mat_type, 128) { - number 16, true - } - field(:mat_index, 132) { - number 32, true - } - field(:rot_timer, 136) { - number 32, true - } -end - -class ItemPowder < ItemLiquipowder - sizeof 144 - - rtti_classname :item_powderst - -end - -class ItemPowderMiscst < ItemPowder - sizeof 144 - - rtti_classname :item_powder_miscst - -end - -class ItemQuernst < ItemConstructed - sizeof 164 - - rtti_classname :item_quernst - -end - -class ItemQuiverst < ItemConstructed - sizeof 164 - - rtti_classname :item_quiverst - -end - -class ItemRemainsst < ItemActual - sizeof 136 - - rtti_classname :item_remainsst - - field(:race, 128) { - number 16, true - } - def race_tg ; df.world.raws.creatures.all[race] ; end - field(:caste, 130) { - number 16, true - } - field(:rot_timer, 132) { - number 32, true - } -end - -class ItemRingst < ItemConstructed - sizeof 164 - - rtti_classname :item_ringst - -end - -class ItemRockst < ItemActual - sizeof 144 - - rtti_classname :item_rockst - - field(:mat_type, 128) { - number 16, true - } - field(:mat_index, 132) { - number 32, true - } - field(:sharpness, 136) { - number 32, true - } - field(:unk_84, 140) { - number 32, true - } -end - -class ItemRoughst < ItemActual - sizeof 136 - - rtti_classname :item_roughst - - field(:mat_type, 128) { - number 16, true - } - field(:mat_index, 132) { - number 32, true - } -end - -class ItemScepterst < ItemConstructed - sizeof 164 - - rtti_classname :item_scepterst - -end - -class ItemSeedsst < ItemActual - sizeof 144 - - rtti_classname :item_seedsst - - field(:mat_type, 128) { - number 16, true - } - field(:mat_index, 132) { - number 32, true - } - field(:grow_counter, 136) { - number 32, true - } - field(:unk_84, 140) { - number 32, true - } -end - -class ItemShieldst < ItemConstructed - sizeof 168 - - rtti_classname :item_shieldst - - field(:subtype, 164) { - pointer { - global :ItemdefShieldst - } - } -end - -class ItemShoesst < ItemConstructed - sizeof 168 - - rtti_classname :item_shoesst - - field(:subtype, 164) { - pointer { - global :ItemdefShoesst - } - } -end - -class ItemSiegeammost < ItemConstructed - sizeof 168 - - rtti_classname :item_siegeammost - - field(:subtype, 164) { - pointer { - global :ItemdefSiegeammost - } - } -end - -class ItemSkinTannedst < ItemActual - sizeof 140 - - rtti_classname :item_skin_tannedst - - field(:mat_type, 128) { - number 16, true - } - field(:mat_index, 132) { - number 32, true - } - field(:unk_80, 136) { - number 32, true - } -end - -class ItemSlabst < ItemConstructed - sizeof 176 - - rtti_classname :item_slabst - - field(:description, 164) { - stl_string - } - field(:unk_bc, 168) { - number 32, true - } - field(:unk_c0, 172) { - number 16, true - } -end - -class ItemSmallgemst < ItemActual - sizeof 140 - - rtti_classname :item_smallgemst - - field(:mat_type, 128) { - number 16, true - } - field(:mat_index, 132) { - number 32, true - } - field(:shape, 136) { - number 32, true - } - def shape_tg ; df.world.raws.language.shapes[shape] ; end -end - -class ItemSplintst < ItemConstructed - sizeof 164 - - rtti_classname :item_splintst - -end - -class ItemStatuest < ItemConstructed - sizeof 184 - - rtti_classname :item_statuest - - field(:image, 164) { - global :ArtImageRef - } - field(:description, 180) { - stl_string - } -end - -class ItemStockpileRef < MemHack::Compound - sizeof 8 - - field(:id, 0) { - number 32, true - } - def id_tg ; df.world.buildings.all[id] ; end - field(:x, 4) { - number 16, true - } - field(:y, 6) { - number 16, true - } -end - -class ItemTablest < ItemConstructed - sizeof 164 - - rtti_classname :item_tablest - -end - -class ItemThreadst < ItemActual - sizeof 168 - - rtti_classname :item_threadst - - field(:mat_type, 128) { - number 16, true - } - field(:mat_index, 132) { - number 32, true - } - field(:dye_mat_type, 136) { - number 16, true - } - field(:dye_mat_index, 140) { - number 32, true - } - field(:unk_88, 144) { - number 32, true - } - field(:unk_8c, 148) { - number 32, true - } - field(:dye_quality, 152) { - number 16, true - } - field(:unk_92, 154) { - number 16, true - } - field(:unk_94, 156) { - number 32, true - } - field(:unk_98, 160) { - number 8, false - } - field(:dimension, 164) { - number 32, true - } -end - -class ItemToolst < ItemConstructed - sizeof 184 - - rtti_classname :item_toolst - - field(:subtype, 164) { - pointer { - global :ItemdefToolst - } - } - field(:sharpness, 168) { - number 32, true - } - field(:stockpile, 172) { - global :ItemStockpileRef - } - field(:vehicle_id, 180) { - number 32, true - } - def vehicle_tg ; df.world.vehicles.all[vehicle_id] ; end -end - -class ItemTotemst < ItemConstructed - sizeof 172 - - rtti_classname :item_totemst - - field(:unk_a0, 164) { - number 16, true - } - field(:unk_a2, 166) { - number 16, true - } - field(:unk_a4, 168) { - number 16, true - } -end - -class ItemToyst < ItemConstructed - sizeof 168 - - rtti_classname :item_toyst - - field(:subtype, 164) { - pointer { - global :ItemdefToyst - } - } -end - -class ItemTractionBenchst < ItemConstructed - sizeof 164 - - rtti_classname :item_traction_benchst - -end - -class ItemTrapcompst < ItemConstructed - sizeof 172 - - rtti_classname :item_trapcompst - - field(:subtype, 164) { - pointer { - global :ItemdefTrapcompst - } - } - field(:sharpness, 168) { - number 32, true - } -end - -class ItemTrappartsst < ItemConstructed - sizeof 164 - - rtti_classname :item_trappartsst - -end - -class ItemVerminst < ItemCritter - sizeof 140 - - rtti_classname :item_verminst - -end - -class ItemWeaponrackst < ItemConstructed - sizeof 164 - - rtti_classname :item_weaponrackst - -end - -class ItemWeaponst < ItemConstructed - sizeof 172 - - rtti_classname :item_weaponst - - field(:subtype, 164) { - pointer { - global :ItemdefWeaponst - } - } - field(:sharpness, 168) { - number 32, true - } -end - -class ItemWindowst < ItemConstructed - sizeof 164 - - rtti_classname :item_windowst - -end - -class ItemWoodst < ItemActual - sizeof 136 - - rtti_classname :item_woodst - - field(:mat_type, 128) { - number 16, true - } - field(:mat_index, 132) { - number 32, true - } -end - -class Itemdef < MemHack::Compound - sizeof 32 - - rtti_classname :itemdefst - - field(:id, 4) { - stl_string - } - field(:subtype, 8) { - number 16, true - } - field(:base_flags, 12) { - df_flagarray - } - field(:raw_strings, 20) { - stl_vector(4) { - pointer { - stl_string - } - } - } - def parseRaws(arg0, arg1, arg2) - DFHack.vmethod_call(self, 0, arg0, arg1, arg2) ; nil - end - def categorize() - DFHack.vmethod_call(self, 4) ; nil - end - def finalize() - DFHack.vmethod_call(self, 8) ; nil - end -end - -class ItemdefAmmost < Itemdef - sizeof 72 - - rtti_classname :itemdef_ammost - - field(:name, 32) { - stl_string - } - field(:name_plural, 36) { - stl_string - } - field(:ammo_class, 40) { - stl_string - } - field(:flags, 44) { - df_flagarray(AmmoFlags) - } - field(:size, 52) { - number 32, true - } - field(:unk_84, 56) { - number 32, true - } - field(:attacks, 60) { - stl_vector(4) { - pointer { - } - } - } -end - -class ItemdefArmorst < Itemdef - sizeof 92 - - rtti_classname :itemdef_armorst - - field(:name, 32) { - stl_string - } - field(:name_plural, 36) { - stl_string - } - field(:name_preplural, 40) { - stl_string - } - field(:material_placeholder, 44) { - stl_string - } - field(:value, 48) { - number 32, true - } - field(:armorlevel, 52) { - number 8, false - } - field(:ubstep, 54) { - number 16, true - } - field(:lbstep, 56) { - number 16, true - } - field(:material_size, 60) { - number 32, true - } - field(:props, 64) { - global :ArmorProperties - } - field(:flags, 84) { - df_flagarray(ArmorFlags) - } -end - -class ItemdefFoodst < Itemdef - sizeof 40 - - rtti_classname :itemdef_foodst - - field(:name, 32) { - stl_string - } - field(:level, 36) { - number 16, true - } -end - -class ItemdefGlovesst < Itemdef - sizeof 80 - - rtti_classname :itemdef_glovesst - - field(:name, 32) { - stl_string - } - field(:name_plural, 36) { - stl_string - } - field(:value, 40) { - number 32, true - } - field(:armorlevel, 44) { - number 8, false - } - field(:upstep, 46) { - number 16, true - } - field(:flags, 48) { - df_flagarray(GlovesFlags) - } - field(:material_size, 56) { - number 32, true - } - field(:props, 60) { - global :ArmorProperties - } -end - -class ItemdefHelmst < Itemdef - sizeof 80 - - rtti_classname :itemdef_helmst - - field(:name, 32) { - stl_string - } - field(:name_plural, 36) { - stl_string - } - field(:value, 40) { - number 32, true - } - field(:armorlevel, 44) { - number 8, false - } - field(:flags, 48) { - df_flagarray(HelmFlags) - } - field(:material_size, 56) { - number 32, true - } - field(:props, 60) { - global :ArmorProperties - } -end - -class ItemdefInstrumentst < Itemdef - sizeof 48 - - rtti_classname :itemdef_instrumentst - - field(:name, 32) { - stl_string - } - field(:name_plural, 36) { - stl_string - } - field(:flags, 40) { - df_flagarray(InstrumentFlags) - } -end - -class ItemdefPantsst < Itemdef - sizeof 92 - - rtti_classname :itemdef_pantsst - - field(:name, 32) { - stl_string - } - field(:name_plural, 36) { - stl_string - } - field(:name_preplural, 40) { - stl_string - } - field(:material_placeholder, 44) { - stl_string - } - field(:value, 48) { - number 32, true - } - field(:armorlevel, 52) { - number 8, false - } - field(:flags, 56) { - df_flagarray(PantsFlags) - } - field(:material_size, 64) { - number 32, true - } - field(:lbstep, 68) { - number 16, true - } - field(:props, 72) { - global :ArmorProperties - } -end - -class ItemdefShieldst < Itemdef - sizeof 56 - - rtti_classname :itemdef_shieldst - - field(:name, 32) { - stl_string - } - field(:name_plural, 36) { - stl_string - } - field(:value, 40) { - number 32, true - } - field(:blockchance, 44) { - number 32, true - } - field(:armorlevel, 48) { - number 8, false - } - field(:upstep, 50) { - number 16, true - } - field(:material_size, 52) { - number 32, true - } -end - -class ItemdefShoesst < Itemdef - sizeof 80 - - rtti_classname :itemdef_shoesst - - field(:name, 32) { - stl_string - } - field(:name_plural, 36) { - stl_string - } - field(:value, 40) { - number 32, true - } - field(:armorlevel, 44) { - number 8, false - } - field(:upstep, 46) { - number 16, true - } - field(:flags, 48) { - df_flagarray(ShoesFlags) - } - field(:material_size, 56) { - number 32, true - } - field(:props, 60) { - global :ArmorProperties - } -end - -class ItemdefSiegeammost < Itemdef - sizeof 44 - - rtti_classname :itemdef_siegeammost - - field(:name, 32) { - stl_string - } - field(:name_plural, 36) { - stl_string - } - field(:ammo_class, 40) { - stl_string - } -end - -class ItemdefToolst < Itemdef - sizeof 120 - - rtti_classname :itemdef_toolst - - field(:name, 32) { - stl_string - } - field(:name_plural, 36) { - stl_string - } - field(:flags, 40) { - df_flagarray(ToolFlags) - } - field(:value, 48) { - number 32, true - } - field(:tile, 52) { - number 8, false - } - field(:tool_use, 56) { - stl_vector(2) { - number 16, true, nil, ToolUses - } - } - field(:adjective, 68) { - stl_string - } - field(:size, 72) { - number 32, true - } - field(:skill_melee, 76) { - number 16, true - } - field(:skill_ranged, 78) { - number 16, true - } - field(:ranged_ammo, 80) { - stl_string - } - field(:two_handed, 84) { - number 32, true - } - field(:minimum_size, 88) { - number 32, true - } - field(:material_size, 92) { - number 32, true - } - field(:attacks, 96) { - stl_vector - } - field(:shoot_force, 108) { - number 32, true - } - field(:shoot_maxvel, 112) { - number 32, true - } - field(:container_capacity, 116) { - number 32, true - } -end - -class ItemdefToyst < Itemdef - sizeof 48 - - rtti_classname :itemdef_toyst - - field(:name, 32) { - stl_string - } - field(:name_plural, 36) { - stl_string - } - field(:flags, 40) { - df_flagarray(ToyFlags) - } -end - -class ItemdefTrapcompst < Itemdef - sizeof 80 - - rtti_classname :itemdef_trapcompst - - field(:name, 32) { - stl_string - } - field(:name_plural, 36) { - stl_string - } - field(:adjective, 40) { - stl_string - } - field(:size, 44) { - number 32, true - } - field(:unk_7c, 48) { - number 32, true - } - field(:hits, 52) { - number 32, true - } - field(:material_size, 56) { - number 32, true - } - field(:flags, 60) { - df_flagarray(TrapcompFlags) - } - field(:attacks, 68) { - stl_vector(4) { - pointer { - } - } - } -end - -class ItemdefWeaponst < Itemdef - sizeof 100 - - rtti_classname :itemdef_weaponst - - field(:name, 32) { - stl_string - } - field(:name_plural, 36) { - stl_string - } - field(:adjective, 40) { - stl_string - } - field(:size, 44) { - number 32, true - } - field(:unk_7c, 48) { - number 32, true - } - field(:skill_melee, 52) { - number 16, true - } - field(:skill_ranged, 54) { - number 16, true - } - field(:ranged_ammo, 56) { - stl_string - } - field(:two_handed, 60) { - number 32, true - } - field(:minimum_size, 64) { - number 32, true - } - field(:material_size, 68) { - number 32, true - } - field(:flags, 72) { - df_flagarray(WeaponFlags) - } - field(:attacks, 80) { - stl_vector(4) { - pointer { - } - } - } - field(:shoot_force, 92) { - number 32, true - } - field(:shoot_maxvel, 96) { - number 32, true - } -end - -class Itemimprovement < MemHack::Compound - sizeof 32 - - rtti_classname :itemimprovementst - - field(:mat_type, 4) { - number 16, true - } - field(:mat_index, 8) { - number 32, true - } - field(:maker, 12) { - number 32, true - } - def maker_tg ; df.world.history.figures[maker] ; end - field(:anon_1, 16) { - number 32, true - } - field(:quality, 20) { - number 16, true, nil, ItemQuality - } - field(:skill_rating, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - def getImage() - ptr = DFHack.vmethod_call(self, 0) - class << self - global :ArtImage - end._at(ptr) if ptr != 0 - end - def clone() - ptr = DFHack.vmethod_call(self, 8) - class << self - global :Itemimprovement - end._at(ptr) if ptr != 0 - end - def write_file(arg0) - DFHack.vmethod_call(self, 12, arg0) ; nil - end - def read_file(arg0, loadversion) - DFHack.vmethod_call(self, 16, arg0, loadversion) ; nil - end - def getType() - ImprovementType.sym(DFHack.vmethod_call(self, 20)) - end - def getDyeValue(arg0) - val = DFHack.vmethod_call(self, 36, arg0) - end - def setShape(shape) - DFHack.vmethod_call(self, 40, shape) ; nil - end -end - -class ItemimprovementArtImagest < Itemimprovement - sizeof 48 - - rtti_classname :itemimprovement_art_imagest - - field(:image, 32) { - global :ArtImageRef - } -end - -class ItemimprovementBandsst < Itemimprovement - sizeof 36 - - rtti_classname :itemimprovement_bandsst - - field(:shape, 32) { - number 32, true - } - def shape_tg ; df.world.raws.language.shapes[shape] ; end -end - -class ItemimprovementClothst < Itemimprovement - sizeof 32 - - rtti_classname :itemimprovement_clothst - -end - -class ItemimprovementCoveredst < Itemimprovement - sizeof 40 - - rtti_classname :itemimprovement_coveredst - - field(:is_glazed, 32) { - number 32, true - } - field(:shape, 36) { - number 32, true - } - def shape_tg ; df.world.raws.language.shapes[shape] ; end -end - -class ItemimprovementIllustrationst < Itemimprovement - sizeof 52 - - rtti_classname :itemimprovement_illustrationst - - field(:image, 32) { - global :ArtImageRef - } - field(:anon_1, 48) { - number 32, true - } -end - -class ItemimprovementItemspecificst < Itemimprovement - sizeof 36 - - rtti_classname :itemimprovement_itemspecificst - - field(:type, 32) { - number 32, true - } -end - -class ItemimprovementPagesst < Itemimprovement - sizeof 48 - - rtti_classname :itemimprovement_pagesst - - field(:anon_1, 32) { - number 32, true - } - field(:anon_2, 36) { - stl_vector - } -end - -class ItemimprovementRingsHangingst < Itemimprovement - sizeof 32 - - rtti_classname :itemimprovement_rings_hangingst - -end - -class ItemimprovementSewnImagest < Itemimprovement - sizeof 76 - - rtti_classname :itemimprovement_sewn_imagest - - field(:image, 32) { - global :ArtImageRef - } - field(:cloth, 48) { - compound(:ItemimprovementSewnImagest_TCloth) { - field(:unit_id, 0) { - number 32, true - } - def unit_tg ; df.world.history.figures[unit_id] ; end - field(:quality, 4) { - number 16, true - } - field(:anon_1, 6) { - number 16, true - } - } - } - field(:dye, 56) { - global :DyeInfo - } -end - -class ItemimprovementSpikesst < Itemimprovement - sizeof 32 - - rtti_classname :itemimprovement_spikesst - -end - -class ItemimprovementThreadst < Itemimprovement - sizeof 52 - - rtti_classname :itemimprovement_threadst - - field(:dye, 32) { - global :DyeInfo - } -end - -class Job < MemHack::Compound - sizeof 168 - - field(:id, 0) { - number 32, true, -1 - } - field(:list_link, 4) { - pointer { - global :JobListLink - } - } - field(:job_type, 8) { - number 16, true, nil, JobType - } - field(:unk2, 12) { - number 32, true, -1 - } - field(:pos, 16) { - global :Coord - } - field(:completion_timer, 24) { - number 32, true, -1 - } - field(:unk4a, 28) { - number 16, false - } - field(:unk4b, 30) { - number 16, false - } - field(:flags, 32) { - global :JobFlags - } - field(:mat_type, 36) { - number 16, true - } - field(:mat_index, 40) { - number 32, true, -1 - } - field(:unk5, 44) { - number 16, true, -1 - } - field(:unk6, 46) { - number 16, true, -1 - } - field(:item_subtype, 48) { - number 16, true, -1 - } - field(:item_category, 52) { - global :StockpileGroupSet - } - field(:hist_figure_id, 56) { - number 32, true - } - def hist_figure_tg ; df.world.history.figures[hist_figure_id] ; end - field(:material_category, 60) { - global :JobMaterialCategory - } - field(:reaction_name, 64) { - stl_string - } - field(:unk9, 68) { - number 32, true - } - field(:unk10a, 72) { - number 16, true - } - field(:unk10b_cntdn, 74) { - number 16, true - } - field(:unk11, 76) { - number 32, true, -1 - } - field(:items, 80) { - stl_vector(4) { - pointer { - global :JobItemRef - } - } - } - field(:specific_refs, 92) { - stl_vector(4) { - pointer { - global :SpecificRef - } - } - } - field(:references, 104) { - stl_vector(4) { - pointer { - global :GeneralRef - } - } - } - field(:job_items, 116) { - stl_vector(4) { - pointer { - global :JobItem - } - } - } - field(:guide_path, 128) { - global :CoordPath - } - field(:cur_path_index, 164) { - number 32, true - } -end - -class JobFlags < MemHack::Compound - field(:_whole, 0) { - number 32, false - } - field(:repeat, 0) { bit 0 } - field(:suspend, 0) { bit 1 } - field(:working, 0) { bit 2 } - field(:fetching, 0) { bit 3 } - field(:special, 0) { bit 4 } - field(:bringing, 0) { bit 5 } - field(:item_lost, 0) { bit 6 } - field(:by_manager, 0) { bit 9 } - field(:store_item, 0) { bit 10 } -end - -class JobItem < MemHack::Compound - sizeof 80 - - field(:item_type, 0) { - number 16, true, nil, ItemType - } - field(:item_subtype, 2) { - number 16, true - } - field(:mat_type, 4) { - number 16, true - } - field(:mat_index, 8) { - number 32, true, -1 - } - field(:flags1, 12) { - global :JobItemFlags1 - } - field(:quantity, 16) { - number 32, true, 1 - } - field(:vector_id, 20) { - number 16, true, :ANY_FREE, JobItemVectorId - } - field(:flags2, 24) { - global :JobItemFlags2 - } - field(:flags3, 28) { - global :JobItemFlags3 - } - field(:flags4, 32) { - number 32, false - } - field(:flags5, 36) { - number 32, false - } - field(:metal_ore, 40) { - number 32, true - } - def metal_ore_tg ; df.world.raws.inorganics[metal_ore] ; end - field(:reaction_class, 44) { - stl_string - } - field(:has_material_reaction_product, 48) { - stl_string - } - field(:min_dimension, 52) { - number 32, true, -1 - } - field(:reagent_index, 56) { - number 32, true, -1 - } - field(:contains, 60) { - stl_vector(4) { - number 32, true - } - } - field(:reaction_id, 72) { - number 32, true - } - def reaction_tg ; df.world.raws.reactions[reaction_id] ; end - field(:has_tool_use, 76) { - number 16, true, nil, ToolUses - } -end - -class JobItemFilter < MemHack::Compound - sizeof 140 - - field(:item_type, 0) { - number 16, true, nil, ItemType - } - field(:item_subtype, 2) { - number 16, true - } - field(:mat_type, 4) { - number 16, true - } - field(:mat_index, 8) { - number 32, true, -1 - } - field(:flags1, 12) { - global :JobItemFlags1 - } - field(:item_vector, 16) { - pointer { - stl_vector(4) { - pointer { - global :Item - } - } - } - } - field(:use_mat_index, 20) { - number 8, true, nil, BooleanEnum - } - field(:flags2, 24) { - global :JobItemFlags2 - } - field(:use_flags2, 28) { - number 8, true, nil, BooleanEnum - } - field(:flags3, 32) { - global :JobItemFlags3 - } - field(:use_flags3, 36) { - number 8, true, nil, BooleanEnum - } - field(:flags4, 40) { - number 32, false - } - field(:use_flags4, 44) { - number 8, true, nil, BooleanEnum - } - field(:flags5, 48) { - number 32, false - } - field(:use_flags5, 52) { - number 8, true, nil, BooleanEnum - } - field(:reaction_class, 56) { - stl_string - } - field(:has_material_reaction_product, 60) { - stl_string - } - field(:metal_ore, 64) { - number 32, true - } - def metal_ore_tg ; df.world.raws.inorganics[metal_ore] ; end - field(:use_metal_ore, 68) { - number 8, true, nil, BooleanEnum - } - field(:use_reaction_class, 69) { - number 8, true, nil, BooleanEnum - } - field(:use_reaction_product, 70) { - number 8, true, nil, BooleanEnum - } - field(:min_dimension, 72) { - number 32, true, -1 - } - field(:reaction_id, 76) { - number 32, true - } - def reaction_tg ; df.world.raws.reactions[reaction_id] ; end - field(:contains, 80) { - stl_vector(4) { - number 32, true - } - } - field(:use_contains, 92) { - number 8, true, nil, BooleanEnum - } - field(:has_tool_use, 94) { - number 16, true, nil, ToolUses - } - field(:has_melee_skill, 96) { - number 16, true, nil, JobSkill - } - field(:pos, 98) { - global :Coord - } - field(:unit, 104) { - pointer { - global :Unit - } - } - field(:job, 108) { - pointer { - global :Job - } - } - field(:building, 112) { - pointer { - global :Building - } - } - field(:unk_74, 116) { - number 32, true - } - field(:burrows, 120) { - stl_vector(4) { - number 32, true - } - } - def burrows_tg ; burrows.map { |i| df.ui.burrows.list[i] } ; end - field(:use_burrows, 132) { - number 8, true, nil, BooleanEnum - } - field(:take_from, 136) { - pointer { - stl_vector(4) { - pointer { - global :Building - } - } - } - } -end - -class JobItemFlags1 < MemHack::Compound - field(:_whole, 0) { - number 32, false - } - field(:improvable, 0) { bit 0 } - field(:butcherable, 0) { bit 1 } - field(:millable, 0) { bit 2 } - field(:allow_buryable, 0) { bit 3 } - field(:unrotten, 0) { bit 4 } - field(:undisturbed, 0) { bit 5 } - field(:collected, 0) { bit 6 } - field(:sharpenable, 0) { bit 7 } - field(:murdered, 0) { bit 8 } - field(:distillable, 0) { bit 9 } - field(:empty, 0) { bit 10 } - field(:processable, 0) { bit 11 } - field(:bag, 0) { bit 12 } - field(:cookable, 0) { bit 13 } - field(:extract_bearing_plant, 0) { bit 14 } - field(:extract_bearing_fish, 0) { bit 15 } - field(:extract_bearing_vermin, 0) { bit 16 } - field(:processable_to_vial, 0) { bit 17 } - field(:processable_to_bag, 0) { bit 18 } - field(:processable_to_barrel, 0) { bit 19 } - field(:solid, 0) { bit 20 } - field(:tameable_vermin, 0) { bit 21 } - field(:nearby, 0) { bit 22 } - field(:sand_bearing, 0) { bit 23 } - field(:glass, 0) { bit 24 } - field(:milk, 0) { bit 25 } - field(:milkable, 0) { bit 26 } - field(:finished_goods, 0) { bit 27 } - field(:ammo, 0) { bit 28 } - field(:furniture, 0) { bit 29 } - field(:not_bin, 0) { bit 30 } - field(:lye_bearing, 0) { bit 31 } -end - -class JobItemFlags2 < MemHack::Compound - field(:_whole, 0) { - number 32, false - } - field(:dye, 0) { bit 0 } - field(:dyeable, 0) { bit 1 } - field(:dyed, 0) { bit 2 } - field(:sewn_imageless, 0) { bit 3 } - field(:glass_making, 0) { bit 4 } - field(:screw, 0) { bit 5 } - field(:building_material, 0) { bit 6 } - field(:fire_safe, 0) { bit 7 } - field(:magma_safe, 0) { bit 8 } - field(:deep_material, 0) { bit 9 } - field(:melt_designated, 0) { bit 10 } - field(:non_economic, 0) { bit 11 } - field(:allow_melt_dump, 0) { bit 12 } - field(:allow_artifact, 0) { bit 13 } - field(:plant, 0) { bit 14 } - field(:silk, 0) { bit 15 } - field(:leather, 0) { bit 16 } - field(:bone, 0) { bit 17 } - field(:shell, 0) { bit 18 } - field(:totemable, 0) { bit 19 } - field(:horn, 0) { bit 20 } - field(:pearl, 0) { bit 21 } - field(:plaster_containing, 0) { bit 22 } - field(:soap, 0) { bit 24 } - field(:body_part, 0) { bit 25 } - field(:ivory_tooth, 0) { bit 26 } - field(:lye_milk_free, 0) { bit 27 } - field(:blunt, 0) { bit 28 } - field(:unengraved, 0) { bit 29 } - field(:hair_wool, 0) { bit 30 } - field(:yarn, 0) { bit 31 } -end - -class JobItemFlags3 < MemHack::Compound - field(:_whole, 0) { - number 32, false - } - field(:unimproved, 0) { bit 0 } - field(:any_raw_material, 0) { bit 1 } - field(:non_absorbent, 0) { bit 2 } - field(:non_pressed, 0) { bit 3 } - field(:allow_liquid_powder, 0) { bit 4 } - field(:any_craft, 0) { bit 5 } - field(:hard, 0) { bit 6 } - field(:food_storage, 0) { bit 7 } -end - -class JobItemRef < MemHack::Compound - sizeof 16 - - field(:item, 0) { - pointer { - global :Item - } - } - field(:role, 4) { - class ::DFHack::JobItemRef_TRole < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[1] = :Reagent ; NUME[:Reagent] = 1 - ENUM[2] = :Hauled ; NUME[:Hauled] = 2 - ENUM[6] = :TargetContainer ; NUME[:TargetContainer] = 6 - end - - number 32, true, nil, JobItemRef_TRole - } - field(:is_fetching, 8) { - number 32, true - } - field(:job_item_idx, 12) { - number 32, true - } -end - -class JobListLink < MemHack::Compound - sizeof 12 - - field(:item, 0) { - pointer { - global :Job - } - } - field(:prev, 4) { - pointer { - global :JobListLink - } - } - field(:next, 8) { - pointer { - global :JobListLink - } - } -end - -class JobMaterialCategory < MemHack::Compound - field(:_whole, 0) { - number 32, false - } - field(:plant, 0) { bit 0 } - field(:wood, 0) { bit 1 } - field(:cloth, 0) { bit 2 } - field(:silk, 0) { bit 3 } - field(:leather, 0) { bit 4 } - field(:bone, 0) { bit 5 } - field(:shell, 0) { bit 6 } - field(:wood2, 0) { bit 7 } - field(:soap, 0) { bit 8 } - field(:tooth, 0) { bit 9 } - field(:horn, 0) { bit 10 } - field(:pearl, 0) { bit 11 } - field(:yarn, 0) { bit 12 } -end - -class LanguageName < MemHack::Compound - sizeof 60 - - field(:first_name, 0) { - stl_string - } - field(:nickname, 4) { - stl_string - } - field(:words, 8) { - static_array(7, 4) { - number 32, true - } - } - field(:parts_of_speech, 36) { - static_array(7, 2) { - number 16, true, nil, PartOfSpeech - } - } - field(:language, 52) { - number 32, true - } - def language_tg ; df.world.raws.language.translations[language] ; end - field(:unknown, 56) { - number 16, true - } - field(:has_name, 58) { - number 8, true, nil, BooleanEnum - } -end - -class LanguageSymbol < MemHack::Compound - sizeof 28 - - field(:name, 0) { - stl_string - } - field(:unknown, 4) { - stl_vector - } - field(:words, 16) { - stl_vector(4) { - number 32, true - } - } - def words_tg ; words.map { |i| df.world.raws.language.words[i] } ; end -end - -class LanguageTranslation < MemHack::Compound - sizeof 40 - - field(:name, 0) { - stl_string - } - field(:unknown1, 4) { - stl_vector - } - field(:unknown2, 16) { - stl_vector - } - field(:words, 28) { - stl_vector(4) { - pointer { - stl_string - } - } - } -end - -class LanguageWord < MemHack::Compound - sizeof 56 - - field(:word, 0) { - stl_string - } - field(:forms, 4) { - static_array(9, 4, PartOfSpeech) { - stl_string - } - } - field(:adj_dist, 40) { - number 8, false - } - field(:anon_1, 41) { - } - field(:flags, 48) { - df_flagarray(LanguageWordFlags) - } -end - -class LayerObject < MemHack::Compound - sizeof 8 - - rtti_classname :layer_objectst - - field(:enabled, 4) { - number 8, true, nil, BooleanEnum - } - field(:bright, 5) { - number 8, true, nil, BooleanEnum - } -end - -class LayerObjectListst < LayerObject - sizeof 60 - - rtti_classname :layer_object_listst - - field(:cursor, 8) { - number 32, true - } - field(:num_entries, 12) { - number 32, true - } - field(:x1, 16) { - number 32, true - } - field(:y1, 20) { - number 32, true - } - field(:page_size, 24) { - number 32, true - } - field(:x2, 28) { - number 32, true - } - field(:y2, 32) { - number 32, true - } - field(:anon_1, 36) { - number 32, true - } - field(:anon_2, 40) { - number 32, true - } - field(:anon_3, 44) { - number 8, true, nil, BooleanEnum - } - field(:anon_4, 48) { - number 32, true - } - field(:anon_5, 52) { - number 32, true - } - field(:anon_6, 56) { - number 32, true - } -end - -class Machine < MemHack::Compound - sizeof 48 - - rtti_classname :machinest - - field(:x, 4) { - number 32, true - } - field(:y, 8) { - number 32, true - } - field(:z, 12) { - number 32, true - } - field(:id, 16) { - number 32, true - } - field(:components, 20) { - stl_vector(4) { - pointer { - compound(:Machine_TComponents) { - sizeof 16 - - field(:building_id, 0) { - number 32, true - } - def building_tg ; df.world.buildings.all[building_id] ; end - field(:connections, 4) { - stl_vector(4) { - number 32, true - } - } - } - } - } - } - field(:cur_power, 32) { - number 32, true - } - field(:min_power, 36) { - number 32, true - } - field(:visual_phase, 40) { - number 8, false - } - field(:phase_timer, 42) { - number 16, true - } - field(:is_active, 44) { - number 32, true - } - def getType() - MachineType.sym(DFHack.vmethod_call(self, 0)) - end - def moveMachine(x, y, z) - DFHack.vmethod_call(self, 4, x, y, z) ; nil - end - def write_file(arg0) - DFHack.vmethod_call(self, 8, arg0) ; nil - end - def read_file(arg0, loadversion) - DFHack.vmethod_call(self, 12, arg0, loadversion) ; nil - end -end - -class MachineConnModes < MemHack::Compound - field(:_whole, 0) { - number 8, false - } - field(:up, 0) { bit 0 } - field(:down, 0) { bit 1 } - field(:right, 0) { bit 2 } - field(:left, 0) { bit 3 } - field(:z_up, 0) { bit 4 } - field(:z_down, 0) { bit 5 } -end - -class MachineInfo < MemHack::Compound - sizeof 8 - - field(:machine_id, 0) { - number 32, true - } - def machine_tg ; df.world.machines.all[machine_id] ; end - field(:anon_1, 4) { - number 32, true - } -end - -class MachineStandardst < Machine - sizeof 48 - - rtti_classname :machine_standardst - -end - -class MachineTileSet < MemHack::Compound - sizeof 48 - - field(:tiles, 0) { - global :CoordPath - } - field(:can_connect, 36) { - stl_vector(1) { - global :MachineConnModes - } - } -end - -class ManagerOrder < MemHack::Compound - sizeof 40 - - field(:job_type, 0) { - number 16, true, nil, JobType - } - field(:unk_2, 2) { - number 16, true - } - field(:item_subtype, 4) { - number 16, true - } - field(:reaction_name, 8) { - stl_string - } - field(:mat_type, 12) { - number 16, true - } - field(:mat_index, 16) { - number 32, true - } - field(:item_category, 20) { - global :StockpileGroupSet - } - field(:hist_figure_id, 24) { - number 32, true - } - def hist_figure_tg ; df.world.history.figures[hist_figure_id] ; end - field(:material_category, 28) { - global :JobMaterialCategory - } - field(:amount_left, 32) { - number 16, true - } - field(:amount_total, 34) { - number 16, true - } - field(:is_validated, 36) { - number 32, true - } -end - -class ManagerOrderTemplate < MemHack::Compound - sizeof 36 - - field(:job_type, 0) { - number 16, true, nil, JobType - } - field(:reaction_name, 4) { - stl_string - } - field(:anon_1, 8) { - number 16, true, -1 - } - field(:item_subtype, 10) { - number 16, true - } - field(:mat_type, 12) { - number 16, true - } - field(:mat_index, 16) { - number 32, true - } - field(:item_category, 20) { - global :StockpileGroupSet - } - field(:anon_2, 24) { - number 32, true, -1 - } - field(:material_category, 28) { - global :JobMaterialCategory - } - field(:anon_3, 32) { - number 8, false, 1 - } -end - -class Mandate < MemHack::Compound - sizeof 48 - - field(:unit, 0) { - pointer { - global :Unit - } - } - field(:mode, 4) { - number 16, true - } - field(:item_type, 6) { - number 16, true, nil, ItemType - } - field(:item_subtype, 8) { - number 16, true - } - field(:mat_type, 10) { - number 16, true - } - field(:mat_index, 12) { - number 32, true - } - field(:amount_total, 16) { - number 16, true - } - field(:amount_remaining, 18) { - number 16, true - } - field(:timeout_counter, 20) { - number 32, true - } - field(:timeout_limit, 24) { - number 32, true - } - field(:anon_1, 28) { - number 32, true - } - field(:anon_2, 32) { - number 32, true - } - field(:unk2, 36) { - number 32, true - } - field(:unk3, 40) { - number 8, false - } - field(:unk4, 44) { - number 32, true - } -end - -class MapBlock < MemHack::Compound - sizeof 7544 - - field(:flags, 0) { - global :BlockFlags - } - field(:block_events, 4) { - stl_vector(4) { - pointer { - global :BlockSquareEvent - } - } - } - field(:block_burrows, 16) { - df_linked_list { - global :BlockBurrowLink - } - } - field(:local_feature, 28) { - number 32, true - } - field(:global_feature, 32) { - number 32, true - } - field(:unk2, 36) { - number 32, true - } - field(:unk3, 40) { - number 32, true - } - field(:dsgn_check_cooldown, 44) { - number 32, true - } - field(:default_liquid, 48) { - global :TileDesignation - } - field(:items, 52) { - stl_vector(4) { - number 32, true - } - } - def items_tg ; items.map { |i| df.world.items.all[i] } ; end - field(:flows, 64) { - stl_vector(4) { - pointer { - global :FlowInfo - } - } - } - field(:unk7, 76) { - number 32, true - } - field(:unk8, 80) { - number 32, true - } - field(:plants, 84) { - stl_vector(4) { - pointer { - global :Plant - } - } - } - field(:map_pos, 96) { - global :Coord - } - field(:region_pos, 102) { - global :Coord2d - } - field(:tiletype, 106) { - static_array(16, 32) { - static_array(16, 2) { - number 16, true, nil, Tiletype - } - } - } - field(:designation, 620) { - static_array(16, 64) { - static_array(16, 4) { - global :TileDesignation - } - } - } - field(:occupancy, 1644) { - static_array(16, 64) { - static_array(16, 4) { - global :TileOccupancy - } - } - } - field(:unk9, 2668) { - static_array(16, 16) { - static_array(16, 1) { - number 8, false - } - } - } - field(:path_cost, 2924) { - static_array(16, 64) { - static_array(16, 4) { - number 32, true - } - } - } - field(:path_tag, 3948) { - static_array(16, 32) { - static_array(16, 2) { - number 16, false - } - } - } - field(:walkable, 4460) { - static_array(16, 32) { - static_array(16, 2) { - number 16, false - } - } - } - field(:map_edge_distance, 4972) { - static_array(16, 32) { - static_array(16, 2) { - number 16, false - } - } - } - field(:temperature_1, 5484) { - static_array(16, 32) { - static_array(16, 2) { - number 16, false - } - } - } - field(:temperature_2, 5996) { - static_array(16, 32) { - static_array(16, 2) { - number 16, false - } - } - } - field(:unk13, 6508) { - static_array(16, 32) { - static_array(16, 2) { - number 16, false - } - } - } - field(:liquid_flow, 7020) { - static_array(16, 32) { - static_array(16, 2) { - global :TileLiquidFlow - } - } - } - field(:region_offset, 7532) { - static_array(9, 1) { - number 8, false - } - } -end - -class MapBlockColumn < MemHack::Compound - sizeof 3132 - - field(:unk_0, 0) { - number 16, true - } - field(:unk_2, 2) { - number 16, true - } - field(:unk_4, 4) { - number 16, true - } - field(:unk_8, 8) { - stl_vector(4) { - pointer { - compound(:MapBlockColumn_TUnk8) { - sizeof 20 - - field(:unk1, 0) { - static_array(8, 2) { - number 16, true - } - } - field(:unk2, 16) { - static_array(4, 1) { - number 8, false - } - } - } - } - } - } - field(:z_base, 20) { - number 16, true - } - field(:cave_columns, 24) { - static_array(16, 192) { - static_array(16, 12) { - df_linked_list { - global :CaveColumnLink - } - } - } - } - field(:column_rectangles, 3096) { - stl_vector(4) { - pointer { - } - } - } - field(:unk_c2c, 3108) { - number 16, true - } - field(:flags, 3112) { - df_flagarray - } - field(:tile_min_x, 3120) { - number 16, true - } - field(:tile_min_y, 3122) { - number 16, true - } - field(:unk_c3c, 3124) { - number 16, true - } - field(:unk_c3e, 3126) { - number 16, true - } - field(:unk_c40, 3128) { - number 16, true - } -end - -class MaterialCommon < MemHack::Compound - sizeof 380 - - field(:id, 0) { - stl_string - } - field(:gem_name1, 4) { - stl_string - } - field(:gem_name2, 8) { - stl_string - } - field(:stone_name, 12) { - stl_string - } - field(:heat, 16) { - compound(:MaterialCommon_THeat) { - field(:spec_heat, 0) { - number 16, false - } - field(:heatdam_point, 2) { - number 16, false - } - field(:colddam_point, 4) { - number 16, false - } - field(:ignite_point, 6) { - number 16, false - } - field(:melting_point, 8) { - number 16, false - } - field(:boiling_point, 10) { - number 16, false - } - field(:mat_fixed_temp, 12) { - number 16, false - } - } - } - field(:solid_density, 32) { - number 32, true - } - field(:liquid_density, 36) { - number 32, true - } - field(:molar_mass, 40) { - number 32, true - } - field(:state_color, 44) { - static_array(6, 4, MatterState) { - number 32, true - } - } - field(:state_name, 68) { - static_array(6, 4, MatterState) { - stl_string - } - } - field(:state_adj, 92) { - static_array(6, 4, MatterState) { - stl_string - } - } - field(:strength, 116) { - compound(:MaterialCommon_TStrength) { - field(:absorption, 0) { - number 32, true - } - field(:bending_yield, 4) { - number 32, true - } - field(:shear_yield, 8) { - number 32, true - } - field(:torsion_yield, 12) { - number 32, true - } - field(:impact_yield, 16) { - number 32, true - } - field(:tensile_yield, 20) { - number 32, true - } - field(:compressive_yield, 24) { - number 32, true - } - field(:bending_fracture, 28) { - number 32, true - } - field(:shear_fracture, 32) { - number 32, true - } - field(:torsion_fracture, 36) { - number 32, true - } - field(:impact_fracture, 40) { - number 32, true - } - field(:tensile_fracture, 44) { - number 32, true - } - field(:compressive_fracture, 48) { - number 32, true - } - field(:bending_strain_at_yield, 52) { - number 32, true - } - field(:shear_strain_at_yield, 56) { - number 32, true - } - field(:torsion_strain_at_yield, 60) { - number 32, true - } - field(:impact_strain_at_yield, 64) { - number 32, true - } - field(:tensile_strain_at_yield, 68) { - number 32, true - } - field(:compressive_strain_at_yield, 72) { - number 32, true - } - field(:max_edge, 76) { - number 32, true - } - } - } - field(:material_value, 196) { - number 32, true - } - field(:flags, 200) { - df_flagarray(MaterialFlags) - } - field(:extract_storage, 208) { - number 16, true, nil, ItemType - } - field(:butcher_special_type, 210) { - number 16, true, nil, ItemType - } - field(:butcher_special_subtype, 212) { - number 16, true - } - field(:meat_name, 216) { - static_array(3, 4) { - stl_string - } - } - field(:block_name, 228) { - static_array(2, 4) { - stl_string - } - } - field(:reaction_product, 236) { - compound(:MaterialCommon_TReactionProduct) { - field(:id, 0) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:material, 12) { - global :MaterialVecRef - } - field(:str, 36) { - static_array(3, 12) { - stl_vector(4) { - pointer { - stl_string - } - } - } - } - } - } - field(:hardens_with_water, 308) { - compound(:MaterialCommon_THardensWithWater) { - field(:mat_type, 0) { - number 16, true - } - field(:mat_index, 4) { - number 32, true - } - field(:str, 8) { - static_array(3, 4) { - stl_string - } - } - } - } - field(:reaction_class, 328) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:tile, 340) { - number 8, false - } - field(:basic_color, 342) { - static_array(2, 2) { - number 16, true - } - } - field(:build_color, 346) { - static_array(3, 2) { - number 16, true - } - } - field(:tile_color, 352) { - static_array(3, 2) { - number 16, true - } - } - field(:item_symbol, 358) { - number 8, false - } - field(:powder_dye, 360) { - number 16, true - } - field(:temp_diet_info, 362) { - number 16, true - } - field(:syndrome, 364) { - stl_vector(4) { - pointer { - global :Syndrome - } - } - } - field(:soap_level, 376) { - number 32, true - } -end - -class Material < MaterialCommon - sizeof 560 - - field(:prefix, 380) { - stl_string - } - field(:food_mat_index, 384) { - static_array(37, 4, OrganicMatCategory) { - number 32, true - } - } - field(:powder_dye_str, 532) { - stl_string - } - field(:state_color_str, 536) { - static_array(6, 4, MatterState) { - stl_string - } - } -end - -class MaterialTemplate < MaterialCommon - sizeof 408 - - field(:powder_dye_str, 380) { - stl_string - } - field(:state_color_str, 384) { - static_array(6, 4, MatterState) { - stl_string - } - } -end - -class MaterialVecRef < MemHack::Compound - sizeof 24 - - field(:mat_type, 0) { - stl_vector(2) { - number 16, true - } - } - field(:mat_index, 12) { - stl_vector(4) { - number 32, true - } - } -end - -class MeetingDiplomatInfo < MemHack::Compound - sizeof 188 - - field(:civ_id, 0) { - number 32, true - } - def civ_tg ; df.world.entities.all[civ_id] ; end - field(:unk1, 4) { - number 16, true - } - field(:diplomat_id, 8) { - number 32, true - } - def diplomat_tg ; df.world.history.figures[diplomat_id] ; end - field(:unk2, 12) { - number 32, true - } - field(:unk_10, 16) { - stl_vector - } - field(:unk_20, 28) { - stl_vector - } - field(:unk_30, 40) { - number 32, true - } - field(:unk_34, 44) { - number 32, true - } - field(:dipscript, 48) { - pointer { - global :DipscriptInfo - } - } - field(:unk_3c, 52) { - number 32, true - } - field(:unk_40, 56) { - stl_vector - } - field(:unk_50, 68) { - stl_string - } - field(:unk_6c, 72) { - stl_string - } - field(:unk_88, 76) { - number 32, true - } - field(:unk_8c, 80) { - stl_vector - } - field(:unk_9c, 92) { - stl_vector - } - field(:unk_ac, 104) { - stl_vector - } - field(:unk_bc, 116) { - stl_vector - } - field(:unk_cc, 128) { - stl_vector - } - field(:unk_dc, 140) { - stl_vector - } - field(:unk_ec, 152) { - stl_vector - } - field(:unk_fc, 164) { - stl_vector - } - field(:unk_10c, 176) { - stl_vector - } -end - -class NemesisRecord < MemHack::Compound - sizeof 60 - - field(:id, 0) { - number 32, true - } - field(:unit_id, 4) { - number 32, true - } - def unit_tg ; df.world.units.all[unit_id] ; end - field(:save_file_id, 8) { - number 32, true - } - field(:member_idx, 12) { - number 16, true - } - field(:figure, 16) { - pointer { - global :HistoricalFigure - } - } - field(:unit, 20) { - pointer { - global :Unit - } - } - field(:group_leader_id, 24) { - number 32, true - } - def group_leader_tg ; df.world.nemesis.all[group_leader_id] ; end - field(:companions, 28) { - stl_vector(4) { - number 32, true - } - } - def companions_tg ; companions.map { |i| df.world.nemesis.all[i] } ; end - field(:unk10, 40) { - number 16, true - } - field(:unk11, 44) { - number 32, true - } - field(:unk12, 48) { - number 32, true - } - field(:flags, 52) { - df_flagarray - } -end - -class PartyInfo < MemHack::Compound - sizeof 20 - - field(:units, 0) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - field(:location, 12) { - pointer { - global :Building - } - } - field(:timer, 16) { - number 32, true - } -end - -class PetInfo < MemHack::Compound - sizeof 80 - - field(:unk0, 0) { - number 32, true - } - field(:unk1, 4) { - number 32, true - } - field(:pet_id, 8) { - number 32, true - } - def pet_tg ; df.world.units.all[pet_id] ; end - field(:name, 12) { - global :LanguageName - } - field(:unk3, 72) { - number 32, true - } - field(:owner_id, 76) { - number 32, true - } - def owner_tg ; df.world.units.all[owner_id] ; end -end - -class Plant < MemHack::Compound - sizeof 116 - - field(:name, 0) { - global :LanguageName - } - field(:flags, 60) { - global :PlantFlags - } - field(:material, 62) { - number 16, true - } - def material_tg ; df.world.raws.plants.all[material] ; end - field(:pos, 64) { - global :Coord - } - field(:grow_counter, 72) { - number 32, true - } - field(:temperature_1, 76) { - number 16, false - } - field(:temperature_2, 78) { - number 16, false - } - field(:is_burning, 80) { - number 32, true - } - field(:hitpoints, 84) { - number 32, true - } - field(:update_order, 88) { - number 16, true - } - field(:anon_1, 92) { - stl_vector - } - field(:anon_2, 104) { - number 32, true - } - field(:temperature_3, 108) { - number 16, false - } - field(:temperature_4, 110) { - number 16, false - } - field(:temperature_5, 112) { - number 16, false - } -end - -class PlantFlags < MemHack::Compound - field(:_whole, 0) { - number 16, false - } - field(:watery, 0) { bit 0 } - field(:is_shrub, 0) { bit 1 } -end - -class PlantRaw < MemHack::Compound - sizeof 412 - - field(:id, 0) { - stl_string - } - field(:flags, 4) { - df_flagarray(PlantRawFlags) - } - field(:name, 12) { - stl_string - } - field(:name_plural, 16) { - stl_string - } - field(:adj, 20) { - stl_string - } - field(:seed_singular, 24) { - stl_string - } - field(:seed_plural, 28) { - stl_string - } - field(:leaves_singular, 32) { - stl_string - } - field(:leaves_plural, 36) { - stl_string - } - field(:unk1, 40) { - number 8, false - } - field(:unk2, 41) { - number 8, false - } - field(:tiles, 42) { - compound(:PlantRaw_TTiles) { - field(:picked_tile, 0) { - number 8, false - } - field(:dead_picked_tile, 1) { - number 8, false - } - field(:shrub_tile, 2) { - number 8, false - } - field(:dead_shrub_tile, 3) { - number 8, false - } - field(:leaves_tile, 4) { - number 8, false - } - field(:tree_tile, 5) { - number 8, false - } - field(:dead_tree_tile, 6) { - number 8, false - } - field(:sapling_tile, 7) { - number 8, false - } - field(:dead_sapling_tile, 8) { - number 8, false - } - field(:grass_tiles, 9) { - static_array(16, 1) { - number 8, false - } - } - field(:alt_grass_tiles, 25) { - static_array(12, 1) { - number 8, false - } - } - } - } - field(:growdur, 80) { - number 32, true - } - field(:value, 84) { - number 32, true - } - field(:colors, 88) { - compound(:PlantRaw_TColors) { - field(:picked_color, 0) { - static_array(3, 1) { - number 8, false - } - } - field(:dead_picked_color, 3) { - static_array(3, 1) { - number 8, false - } - } - field(:shrub_color, 6) { - static_array(3, 1) { - number 8, false - } - } - field(:dead_shrub_color, 9) { - static_array(3, 1) { - number 8, false - } - } - field(:seed_color, 12) { - static_array(3, 1) { - number 8, false - } - } - field(:leaves_color, 15) { - static_array(3, 1) { - number 8, false - } - } - field(:dead_leaves_color, 18) { - static_array(3, 1) { - number 8, false - } - } - field(:tree_color, 21) { - static_array(3, 1) { - number 8, false - } - } - field(:dead_tree_color, 24) { - static_array(3, 1) { - number 8, false - } - } - field(:sapling_color, 27) { - static_array(3, 1) { - number 8, false - } - } - field(:dead_sapling_color, 30) { - static_array(3, 1) { - number 8, false - } - } - field(:grass_colors_0, 33) { - static_array(20, 1) { - number 8, false - } - } - field(:grass_colors_1, 53) { - static_array(20, 1) { - number 8, false - } - } - field(:grass_colors_2, 73) { - static_array(20, 1) { - number 8, false - } - } - } - } - field(:alt_period, 184) { - static_array(2, 4) { - number 32, true - } - } - field(:shrub_drown_level, 192) { - number 8, false - } - field(:tree_drown_level, 193) { - number 8, false - } - field(:sapling_drown_level, 194) { - number 8, false - } - field(:frequency, 196) { - number 16, true - } - field(:clustersize, 198) { - number 16, true - } - field(:prefstring, 200) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:material, 212) { - stl_vector(4) { - pointer { - global :Material - } - } - } - field(:material_defs, 224) { - compound(:PlantRaw_TMaterialDefs) { - field(:type_basic_mat, 0) { - number 16, true - } - field(:type_tree, 2) { - number 16, true - } - field(:type_drink, 4) { - number 16, true - } - field(:type_seed, 6) { - number 16, true - } - field(:type_thread, 8) { - number 16, true - } - field(:type_mill, 10) { - number 16, true - } - field(:type_extract_vial, 12) { - number 16, true - } - field(:type_extract_barrel, 14) { - number 16, true - } - field(:type_extract_still_vial, 16) { - number 16, true - } - field(:type_leaves, 18) { - number 16, true - } - field(:idx_basic_mat, 20) { - number 32, true - } - field(:idx_tree, 24) { - number 32, true - } - field(:idx_drink, 28) { - number 32, true - } - field(:idx_seed, 32) { - number 32, true - } - field(:idx_thread, 36) { - number 32, true - } - field(:idx_mill, 40) { - number 32, true - } - field(:idx_extract_vial, 44) { - number 32, true - } - field(:idx_extract_barrel, 48) { - number 32, true - } - field(:idx_extract_still_vial, 52) { - number 32, true - } - field(:idx_leaves, 56) { - number 32, true - } - field(:str_basic_mat, 60) { - static_array(3, 4) { - stl_string - } - } - field(:str_tree, 72) { - static_array(3, 4) { - stl_string - } - } - field(:str_drink, 84) { - static_array(3, 4) { - stl_string - } - } - field(:str_seed, 96) { - static_array(3, 4) { - stl_string - } - } - field(:str_thread, 108) { - static_array(3, 4) { - stl_string - } - } - field(:str_mill, 120) { - static_array(3, 4) { - stl_string - } - } - field(:str_extract_vial, 132) { - static_array(3, 4) { - stl_string - } - } - field(:str_extract_barrel, 144) { - static_array(3, 4) { - stl_string - } - } - field(:str_extract_still_vial, 156) { - static_array(3, 4) { - stl_string - } - } - field(:str_leaves, 168) { - static_array(3, 4) { - stl_string - } - } - } - } - field(:underground_depth_min, 404) { - number 32, true - } - field(:underground_depth_max, 408) { - number 32, true - } -end - -class PopupMessage < MemHack::Compound - sizeof 8 - - field(:text, 0) { - stl_string - } - field(:color, 4) { - number 16, true, 7 - } - field(:bright, 6) { - number 8, true, 1, BooleanEnum - } -end - -class PowerInfo < MemHack::Compound - sizeof 8 - - field(:produced, 0) { - number 32, true - } - field(:consumed, 4) { - number 32, true - } -end - -class PressurePlateInfo < MemHack::Compound - sizeof 24 - - field(:unit_min, 0) { - number 32, true, 50000 - } - field(:unit_max, 4) { - number 32, true, 200000 - } - field(:water_min, 8) { - number 8, false, 1 - } - field(:water_max, 9) { - number 8, false, 7 - } - field(:magma_min, 10) { - number 8, false, 1 - } - field(:magma_max, 11) { - number 8, false, 7 - } - field(:track_min, 12) { - number 32, true, 1 - } - field(:track_max, 16) { - number 32, true, 2000 - } - field(:flags, 20) { - compound(:PressurePlateInfo_TFlags) { - field(:_whole, 0) { - number 32, true, 0x10 - } - field(:units, 0) { bit 0 } - field(:water, 0) { bit 1 } - field(:magma, 0) { bit 2 } - field(:citizens, 0) { bit 3 } - field(:resets, 0) { bit 4 } - field(:track, 0) { bit 5 } - } - } -end - -class Projectile < MemHack::Compound - sizeof 80 - - rtti_classname :projst - - field(:link, 4) { - pointer { - global :ProjListLink - } - } - field(:id, 8) { - number 32, true - } - field(:firer, 12) { - pointer { - global :Unit - } - } - field(:origin_pos, 16) { - global :Coord - } - field(:target_pos, 22) { - global :Coord - } - field(:cur_pos, 28) { - global :Coord - } - field(:prev_pos, 34) { - global :Coord - } - field(:distance_flown, 40) { - number 32, true - } - field(:unk14, 44) { - number 32, true - } - field(:unk15, 48) { - number 32, true - } - field(:unk16, 52) { - number 32, true - } - field(:collided, 56) { - number 8, true, nil, BooleanEnum - } - field(:fall_counter, 58) { - number 16, true - } - field(:fall_delay, 60) { - number 16, true - } - field(:unk20, 64) { - number 32, true - } - field(:unk21, 68) { - number 32, true - } - field(:unk22, 72) { - number 32, true - } - field(:unk23, 76) { - number 32, true - } - def getType() - ProjectileType.sym(DFHack.vmethod_call(self, 0)) - end - def write_file(arg0) - DFHack.vmethod_call(self, 12, arg0) ; nil - end - def read_file(arg0, loadversion) - DFHack.vmethod_call(self, 16, arg0, loadversion) ; nil - end -end - -class ProjItemst < Projectile - sizeof 84 - - rtti_classname :proj_itemst - - field(:item, 80) { - pointer { - global :Item - } - } -end - -class ProjListLink < MemHack::Compound - sizeof 12 - - field(:item, 0) { - pointer { - global :Projectile - } - } - field(:prev, 4) { - pointer { - global :ProjListLink - } - } - field(:next, 8) { - pointer { - global :ProjListLink - } - } -end - -class ProjMagicst < Projectile - sizeof 84 - - rtti_classname :proj_magicst - - field(:unk, 80) { - pointer { - } - } -end - -class ProjUnitst < Projectile - sizeof 84 - - rtti_classname :proj_unitst - - field(:unit, 80) { - pointer { - global :Unit - } - } -end - -class QuestListLink < MemHack::Compound - sizeof 12 - - field(:item, 0) { - pointer { - global :AdvTask - } - } - field(:prev, 4) { - pointer { - global :QuestListLink - } - } - field(:next, 8) { - pointer { - global :QuestListLink - } - } -end - -class Reaction < MemHack::Compound - sizeof 120 - - field(:code, 0) { - stl_string - } - field(:name, 4) { - stl_string - } - field(:flags, 8) { - df_flagarray(ReactionFlags) - } - field(:reagents, 16) { - stl_vector(4) { - pointer { - global :ReactionReagent - } - } - } - field(:products, 28) { - stl_vector(4) { - pointer { - global :ReactionProduct - } - } - } - field(:skill, 40) { - number 16, true, nil, JobSkill - } - field(:building, 44) { - compound(:Reaction_TBuilding) { - field(:str, 0) { - static_array(2, 12) { - stl_vector(4) { - pointer { - stl_string - } - } - } - } - field(:type, 24) { - stl_vector(4) { - number 32, true, nil, BuildingType - } - } - field(:subtype, 36) { - stl_vector(4) { - number 32, true - } - } - field(:custom, 48) { - stl_vector(4) { - number 32, true - } - } - field(:hotkey, 60) { - stl_vector(4) { - number 32, true - } - } - } - } - field(:index, 116) { - number 32, true - } -end - -class ReactionProduct < MemHack::Compound - sizeof 4 - - rtti_classname :reaction_productst - - def getType() - ReactionProductType.sym(DFHack.vmethod_call(self, 0)) - end - def resolveTokens(reactionID) - DFHack.vmethod_call(self, 4, reactionID) ; nil - end - def getDescription(desc) - DFHack.vmethod_call(self, 12, desc) ; nil - end -end - -class ReactionProductItemImprovementst < ReactionProduct - sizeof 56 - - rtti_classname :reaction_product_item_improvementst - - field(:anon_1, 4) { - stl_string - } - field(:target_reagent, 8) { - stl_string - } - field(:improvement_type, 12) { - number 32, true, nil, ImprovementType - } - field(:mat_type, 16) { - number 16, true - } - field(:mat_index, 20) { - number 32, true - } - field(:probability, 24) { - number 16, true - } - field(:flags, 28) { - df_flagarray(ReactionProductImprovementFlags) - } - field(:get_material, 36) { - compound(:ReactionProductItemImprovementst_TGetMaterial) { - field(:reagent_code, 0) { - stl_string - } - field(:product_code, 4) { - stl_string - } - } - } - field(:material_str, 44) { - static_array(3, 4) { - stl_string - } - } -end - -class ReactionProductItemst < ReactionProduct - sizeof 64 - - rtti_classname :reaction_product_itemst - - field(:product_to_container, 4) { - stl_string - } - field(:item_type, 8) { - number 16, true, nil, ItemType - } - field(:item_subtype, 10) { - number 16, true - } - field(:mat_type, 12) { - number 16, true - } - field(:mat_index, 16) { - number 32, true - } - field(:probability, 20) { - number 16, true - } - field(:count, 22) { - number 16, true - } - field(:product_dimension, 24) { - number 32, true - } - field(:flags, 28) { - df_flagarray(ReactionProductItemFlags) - } - field(:get_material, 36) { - compound(:ReactionProductItemst_TGetMaterial) { - field(:reagent_code, 0) { - stl_string - } - field(:product_code, 4) { - stl_string - } - } - } - field(:item_str, 44) { - static_array(2, 4) { - stl_string - } - } - field(:material_str, 52) { - static_array(3, 4) { - stl_string - } - } -end - -class ReactionReagent < MemHack::Compound - sizeof 8 - - rtti_classname :reaction_reagentst - - field(:code, 4) { - stl_string - } - def getType() - ReactionReagentType.sym(DFHack.vmethod_call(self, 0)) - end - def resolveTokens(reactionID) - DFHack.vmethod_call(self, 16, reactionID) ; nil - end - def isLyeBearing() - val = DFHack.vmethod_call(self, 36) - (val & 1) != 0 - end -end - -class ReactionReagentFlags < MemHack::Compound - field(:_whole, 0) { - number 32, true - } - field(:PRESERVE_REAGENT, 0) { bit 0 } - field(:IN_CONTAINER, 0) { bit 1 } - field(:DOES_NOT_DETERMINE_PRODUCT_AMOUNT, 0) { bit 2 } -end - -class ReactionReagentItemst < ReactionReagent - sizeof 112 - - rtti_classname :reaction_reagent_itemst - - field(:quantity, 8) { - number 32, true - } - field(:flags, 12) { - global :ReactionReagentFlags - } - field(:item_type, 16) { - number 16, true, nil, ItemType - } - field(:item_subtype, 18) { - number 16, true - } - field(:mat_type, 20) { - number 16, true - } - field(:mat_index, 22) { - number 16, true - } - field(:reaction_class, 24) { - stl_string - } - field(:has_material_reaction_product, 28) { - stl_string - } - field(:flags1, 32) { - global :JobItemFlags1 - } - field(:flags2, 36) { - global :JobItemFlags2 - } - field(:flags3, 40) { - global :JobItemFlags3 - } - field(:flags4, 44) { - number 32, false - } - field(:flags5, 48) { - number 32, false - } - field(:metal_ore, 52) { - number 32, true - } - def metal_ore_tg ; df.world.raws.inorganics[metal_ore] ; end - field(:min_dimension, 56) { - number 32, true - } - field(:contains, 60) { - stl_vector(4) { - number 32, true - } - } - field(:has_tool_use, 72) { - number 16, true, nil, ToolUses - } - field(:item_str, 76) { - static_array(2, 4) { - stl_string - } - } - field(:material_str, 84) { - static_array(3, 4) { - stl_string - } - } - field(:metal_ore_str, 96) { - stl_string - } - field(:contains_str, 100) { - stl_vector(4) { - pointer { - stl_string - } - } - } -end - -class Report < MemHack::Compound - sizeof 44 - - field(:type, 0) { - number 16, true, nil, AnnouncementType - } - field(:text, 4) { - stl_string - } - field(:color, 8) { - number 16, true, 7 - } - field(:bright, 10) { - number 8, true, 1, BooleanEnum - } - field(:duration, 12) { - number 32, true, 100 - } - field(:flags, 16) { - compound(:Report_TFlags) { - field(:_whole, 0) { - number 8, false - } - field(:continuation, 0) { bit 0 } - field(:unk1, 0) { bit 1 } - field(:announcement, 0) { bit 2 } - } - } - field(:repeat_count, 20) { - number 32, true - } - field(:pos, 24) { - global :Coord - } - field(:id, 32) { - number 32, true - } - field(:year, 36) { - number 32, true - } - field(:time, 40) { - number 32, true - } -end - -class ResourceAllotmentSpecifier < MemHack::Compound - sizeof 16 - - rtti_classname :resource_allotment_specifierst - - field(:anon_1, 4) { - number 32, true - } - field(:anon_2, 8) { - number 32, true - } - field(:anon_3, 12) { - number 32, true - } - def getType() - ResourceAllotmentSpecifierType.sym(DFHack.vmethod_call(self, 0)) - end - def write_file(arg0) - DFHack.vmethod_call(self, 4, arg0) ; nil - end - def read_file(arg0, loadversion) - DFHack.vmethod_call(self, 8, arg0, loadversion) ; nil - end -end - -class ResourceAllotmentSpecifierAmmost < ResourceAllotmentSpecifier - sizeof 24 - - rtti_classname :resource_allotment_specifier_ammost - - field(:mat_type, 16) { - number 16, true - } - field(:mat_index, 20) { - number 32, true - } -end - -class ResourceAllotmentSpecifierAnvilst < ResourceAllotmentSpecifier - sizeof 24 - - rtti_classname :resource_allotment_specifier_anvilst - - field(:mat_type, 16) { - number 16, true - } - field(:mat_index, 20) { - number 32, true - } -end - -class ResourceAllotmentSpecifierArmorBodyst < ResourceAllotmentSpecifier - sizeof 24 - - rtti_classname :resource_allotment_specifier_armor_bodyst - - field(:mat_type, 16) { - number 16, true - } - field(:mat_index, 20) { - number 32, true - } -end - -class ResourceAllotmentSpecifierArmorBootsst < ResourceAllotmentSpecifier - sizeof 24 - - rtti_classname :resource_allotment_specifier_armor_bootsst - - field(:mat_type, 16) { - number 16, true - } - field(:mat_index, 20) { - number 32, true - } -end - -class ResourceAllotmentSpecifierArmorGlovesst < ResourceAllotmentSpecifier - sizeof 24 - - rtti_classname :resource_allotment_specifier_armor_glovesst - - field(:mat_type, 16) { - number 16, true - } - field(:mat_index, 20) { - number 32, true - } -end - -class ResourceAllotmentSpecifierArmorHelmst < ResourceAllotmentSpecifier - sizeof 24 - - rtti_classname :resource_allotment_specifier_armor_helmst - - field(:mat_type, 16) { - number 16, true - } - field(:mat_index, 20) { - number 32, true - } -end - -class ResourceAllotmentSpecifierArmorPantsst < ResourceAllotmentSpecifier - sizeof 24 - - rtti_classname :resource_allotment_specifier_armor_pantsst - - field(:mat_type, 16) { - number 16, true - } - field(:mat_index, 20) { - number 32, true - } -end - -class ResourceAllotmentSpecifierBackpackst < ResourceAllotmentSpecifier - sizeof 24 - - rtti_classname :resource_allotment_specifier_backpackst - - field(:mat_type, 16) { - number 16, true - } - field(:mat_index, 20) { - number 32, true - } -end - -class ResourceAllotmentSpecifierBagst < ResourceAllotmentSpecifier - sizeof 24 - - rtti_classname :resource_allotment_specifier_bagst - - field(:mat_type, 16) { - number 16, true - } - field(:mat_index, 20) { - number 32, true - } -end - -class ResourceAllotmentSpecifierBedst < ResourceAllotmentSpecifier - sizeof 24 - - rtti_classname :resource_allotment_specifier_bedst - - field(:mat_type, 16) { - number 16, true - } - field(:mat_index, 20) { - number 32, true - } -end - -class ResourceAllotmentSpecifierBonest < ResourceAllotmentSpecifier - sizeof 28 - - rtti_classname :resource_allotment_specifier_bonest - - field(:mat_type, 16) { - number 16, true - } - field(:mat_index, 20) { - number 32, true - } - field(:anon_1, 24) { - number 32, true - } -end - -class ResourceAllotmentSpecifierBoxst < ResourceAllotmentSpecifier - sizeof 24 - - rtti_classname :resource_allotment_specifier_boxst - - field(:mat_type, 16) { - number 16, true - } - field(:mat_index, 20) { - number 32, true - } -end - -class ResourceAllotmentSpecifierCabinetst < ResourceAllotmentSpecifier - sizeof 24 - - rtti_classname :resource_allotment_specifier_cabinetst - - field(:mat_type, 16) { - number 16, true - } - field(:mat_index, 20) { - number 32, true - } -end - -class ResourceAllotmentSpecifierChairst < ResourceAllotmentSpecifier - sizeof 24 - - rtti_classname :resource_allotment_specifier_chairst - - field(:mat_type, 16) { - number 16, true - } - field(:mat_index, 20) { - number 32, true - } -end - -class ResourceAllotmentSpecifierCheesest < ResourceAllotmentSpecifier - sizeof 24 - - rtti_classname :resource_allotment_specifier_cheesest - - field(:mat_type, 16) { - number 16, true - } - field(:mat_index, 20) { - number 32, true - } -end - -class ResourceAllotmentSpecifierClothingBodyst < ResourceAllotmentSpecifier - sizeof 24 - - rtti_classname :resource_allotment_specifier_clothing_bodyst - - field(:mat_type, 16) { - number 16, true - } - field(:mat_index, 20) { - number 32, true - } -end - -class ResourceAllotmentSpecifierClothingBootsst < ResourceAllotmentSpecifier - sizeof 24 - - rtti_classname :resource_allotment_specifier_clothing_bootsst - - field(:mat_type, 16) { - number 16, true - } - field(:mat_index, 20) { - number 32, true - } -end - -class ResourceAllotmentSpecifierClothingGlovesst < ResourceAllotmentSpecifier - sizeof 24 - - rtti_classname :resource_allotment_specifier_clothing_glovesst - - field(:mat_type, 16) { - number 16, true - } - field(:mat_index, 20) { - number 32, true - } -end - -class ResourceAllotmentSpecifierClothingHelmst < ResourceAllotmentSpecifier - sizeof 24 - - rtti_classname :resource_allotment_specifier_clothing_helmst - - field(:mat_type, 16) { - number 16, true - } - field(:mat_index, 20) { - number 32, true - } -end - -class ResourceAllotmentSpecifierClothingPantsst < ResourceAllotmentSpecifier - sizeof 24 - - rtti_classname :resource_allotment_specifier_clothing_pantsst - - field(:mat_type, 16) { - number 16, true - } - field(:mat_index, 20) { - number 32, true - } -end - -class ResourceAllotmentSpecifierClothst < ResourceAllotmentSpecifier - sizeof 44 - - rtti_classname :resource_allotment_specifier_clothst - - field(:mat_type, 16) { - number 16, true - } - field(:mat_index, 20) { - number 32, true - } - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } - field(:anon_4, 36) { - number 32, true - } - field(:anon_5, 40) { - number 32, true - } -end - -class ResourceAllotmentSpecifierCraftsst < ResourceAllotmentSpecifier - sizeof 24 - - rtti_classname :resource_allotment_specifier_craftsst - - field(:mat_type, 16) { - number 16, true - } - field(:mat_index, 20) { - number 32, true - } -end - -class ResourceAllotmentSpecifierCropst < ResourceAllotmentSpecifier - sizeof 44 - - rtti_classname :resource_allotment_specifier_cropst - - field(:anon_1, 16) { - number 32, true - } - field(:anon_2, 20) { - number 32, true - } - field(:anon_3, 24) { - static_array(5, 4) { - number 32, true - } - } -end - -class ResourceAllotmentSpecifierExtractst < ResourceAllotmentSpecifier - sizeof 40 - - rtti_classname :resource_allotment_specifier_extractst - - field(:mat_type, 16) { - number 16, true - } - field(:mat_index, 20) { - number 32, true - } - field(:anon_1, 24) { - number 32, true - } - field(:mat_type2, 28) { - number 16, true - } - field(:mat_index2, 32) { - number 32, true - } - field(:anon_2, 36) { - number 32, true - } -end - -class ResourceAllotmentSpecifierFlaskst < ResourceAllotmentSpecifier - sizeof 24 - - rtti_classname :resource_allotment_specifier_flaskst - - field(:mat_type, 16) { - number 16, true - } - field(:mat_index, 20) { - number 32, true - } -end - -class ResourceAllotmentSpecifierGemsst < ResourceAllotmentSpecifier - sizeof 24 - - rtti_classname :resource_allotment_specifier_gemsst - - field(:mat_type, 16) { - number 16, true - } - field(:mat_index, 20) { - number 32, true - } -end - -class ResourceAllotmentSpecifierHornst < ResourceAllotmentSpecifier - sizeof 28 - - rtti_classname :resource_allotment_specifier_hornst - - field(:mat_type, 16) { - number 16, true - } - field(:mat_index, 20) { - number 32, true - } - field(:anon_1, 24) { - number 32, true - } -end - -class ResourceAllotmentSpecifierLeatherst < ResourceAllotmentSpecifier - sizeof 64 - - rtti_classname :resource_allotment_specifier_leatherst - - field(:mat_type, 16) { - number 16, true - } - field(:mat_index, 20) { - number 32, true - } - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } - field(:anon_4, 36) { - number 32, true - } - field(:anon_5, 40) { - number 32, true - } - field(:anon_6, 44) { - number 32, true - } - field(:anon_7, 48) { - number 32, true - } - field(:anon_8, 52) { - number 32, true - } - field(:anon_9, 56) { - number 32, true - } - field(:anon_10, 60) { - number 32, true - } -end - -class ResourceAllotmentSpecifierMeatst < ResourceAllotmentSpecifier - sizeof 24 - - rtti_classname :resource_allotment_specifier_meatst - - field(:mat_type, 16) { - number 16, true - } - field(:mat_index, 20) { - number 32, true - } -end - -class ResourceAllotmentSpecifierMetalst < ResourceAllotmentSpecifier - sizeof 76 - - rtti_classname :resource_allotment_specifier_metalst - - field(:mat_type, 16) { - number 16, true - } - field(:mat_index, 20) { - number 32, true - } - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - static_array(12, 4) { - number 32, true - } - } -end - -class ResourceAllotmentSpecifierPearlst < ResourceAllotmentSpecifier - sizeof 24 - - rtti_classname :resource_allotment_specifier_pearlst - - field(:mat_type, 16) { - number 16, true - } - field(:mat_index, 20) { - number 32, true - } -end - -class ResourceAllotmentSpecifierPowderst < ResourceAllotmentSpecifier - sizeof 28 - - rtti_classname :resource_allotment_specifier_powderst - - field(:mat_type, 16) { - number 16, true - } - field(:mat_index, 20) { - number 32, true - } - field(:anon_1, 24) { - number 32, true - } -end - -class ResourceAllotmentSpecifierQuiverst < ResourceAllotmentSpecifier - sizeof 24 - - rtti_classname :resource_allotment_specifier_quiverst - - field(:mat_type, 16) { - number 16, true - } - field(:mat_index, 20) { - number 32, true - } -end - -class ResourceAllotmentSpecifierShellst < ResourceAllotmentSpecifier - sizeof 28 - - rtti_classname :resource_allotment_specifier_shellst - - field(:mat_type, 16) { - number 16, true - } - field(:mat_index, 20) { - number 32, true - } - field(:anon_1, 24) { - number 32, true - } -end - -class ResourceAllotmentSpecifierSkinst < ResourceAllotmentSpecifier - sizeof 36 - - rtti_classname :resource_allotment_specifier_skinst - - field(:mat_type, 16) { - number 16, true - } - field(:mat_index, 20) { - number 32, true - } - field(:mat_type2, 24) { - number 16, true - } - field(:mat_index2, 28) { - number 32, true - } - field(:anon_1, 32) { - number 32, true - } -end - -class ResourceAllotmentSpecifierSoapst < ResourceAllotmentSpecifier - sizeof 24 - - rtti_classname :resource_allotment_specifier_soapst - - field(:mat_type, 16) { - number 16, true - } - field(:mat_index, 20) { - number 32, true - } -end - -class ResourceAllotmentSpecifierStonest < ResourceAllotmentSpecifier - sizeof 52 - - rtti_classname :resource_allotment_specifier_stonest - - field(:mat_type, 16) { - number 16, true - } - field(:mat_index, 20) { - number 32, true - } - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - static_array(5, 4) { - number 32, true - } - } -end - -class ResourceAllotmentSpecifierTablest < ResourceAllotmentSpecifier - sizeof 24 - - rtti_classname :resource_allotment_specifier_tablest - - field(:mat_type, 16) { - number 16, true - } - field(:mat_index, 20) { - number 32, true - } -end - -class ResourceAllotmentSpecifierTallowst < ResourceAllotmentSpecifier - sizeof 24 - - rtti_classname :resource_allotment_specifier_tallowst - - field(:mat_type, 16) { - number 16, true - } - field(:mat_index, 20) { - number 32, true - } -end - -class ResourceAllotmentSpecifierThreadst < ResourceAllotmentSpecifier - sizeof 28 - - rtti_classname :resource_allotment_specifier_threadst - - field(:mat_type, 16) { - number 16, true - } - field(:mat_index, 20) { - number 32, true - } - field(:anon_1, 24) { - number 32, true - } -end - -class ResourceAllotmentSpecifierToothst < ResourceAllotmentSpecifier - sizeof 28 - - rtti_classname :resource_allotment_specifier_toothst - - field(:mat_type, 16) { - number 16, true - } - field(:mat_index, 20) { - number 32, true - } - field(:anon_1, 24) { - number 32, true - } -end - -class ResourceAllotmentSpecifierWeaponMeleest < ResourceAllotmentSpecifier - sizeof 24 - - rtti_classname :resource_allotment_specifier_weapon_meleest - - field(:mat_type, 16) { - number 16, true - } - field(:mat_index, 20) { - number 32, true - } -end - -class ResourceAllotmentSpecifierWeaponRangedst < ResourceAllotmentSpecifier - sizeof 24 - - rtti_classname :resource_allotment_specifier_weapon_rangedst - - field(:mat_type, 16) { - number 16, true - } - field(:mat_index, 20) { - number 32, true - } -end - -class ResourceAllotmentSpecifierWoodst < ResourceAllotmentSpecifier - sizeof 48 - - rtti_classname :resource_allotment_specifier_woodst - - field(:mat_type, 16) { - number 16, true - } - field(:mat_index, 20) { - number 32, true - } - field(:anon_1, 24) { - number 32, true - } - field(:anon_2, 28) { - number 32, true - } - field(:anon_3, 32) { - number 32, true - } - field(:anon_4, 36) { - number 32, true - } - field(:anon_5, 40) { - number 32, true - } - field(:anon_6, 44) { - number 32, true - } -end - -class RoomRentInfo < MemHack::Compound - sizeof 20 - - field(:elements, 0) { - stl_vector(4) { - pointer { - global :Building - } - } - } - field(:rent_value, 12) { - number 32, true - } - field(:anon_1, 16) { - number 32, true - } -end - -class RouteStockpileLink < MemHack::Compound - sizeof 8 - - field(:building_id, 0) { - number 32, true - } - def building_tg ; df.world.buildings.all[building_id] ; end - field(:mode, 4) { - compound(:RouteStockpileLink_TMode) { - field(:_whole, 0) { - number 32, true - } - field(:take, 0) { bit 0 } - field(:give, 0) { bit 1 } - } - } -end - -class SpecialMatTable < MemHack::Compound - sizeof 3968 - - field(:organic_types, 0) { - static_array(37, 12, OrganicMatCategory) { - stl_vector(2) { - number 16, true - } - } - } - field(:organic_indexes, 444) { - static_array(37, 12, OrganicMatCategory) { - stl_vector(4) { - number 32, true - } - } - } - field(:organic_unknown, 888) { - static_array(37, 12, OrganicMatCategory) { - stl_vector(4) { - number 32, true - } - } - } - field(:builtin, 1332) { - static_array(659, 4, BuiltinMats) { - pointer { - global :Material - } - } - } -end - -class SpecificRef < MemHack::Compound - sizeof 12 - - field(:type, 0) { - number 32, true, nil, SpecificRefType - } - field(:object, 4) { - pointer { - } - } - field(:unit, 4) { - pointer { - global :Unit - } - } - field(:activity, 4) { - pointer { - global :ActivityInfo - } - } - field(:pet, 4) { - pointer { - global :PetInfo - } - } - field(:screen, 4) { - pointer { - global :Viewscreen - } - } - field(:vermin, 4) { - pointer { - global :Vermin - } - } - field(:effect, 4) { - pointer { - global :EffectInfo - } - } - field(:job, 4) { - pointer { - global :Job - } - } - field(:arg2, 8) { - compound(:SpecificRef_TArg2) { - field(:wrestle, 0) { - pointer { - global :UnitItemWrestle - } - } - } - } -end - -class Squad < MemHack::Compound - sizeof 216 - - field(:id, 0) { - number 32, true - } - field(:name, 4) { - global :LanguageName - } - field(:alias, 64) { - stl_string - } - field(:positions, 68) { - stl_vector(4) { - pointer { - global :SquadPosition - } - } - } - field(:orders, 80) { - stl_vector(4) { - pointer { - global :SquadOrder - } - } - } - field(:schedule, 92) { - stl_vector(4) { - pointer { - static_array(12, 32) { - compound(:Squad_TSchedule) { - sizeof 32 - - field(:name, 0) { - stl_string - } - field(:sleep_mode, 4) { - number 16, true - } - field(:uniform_mode, 6) { - number 16, true - } - field(:orders, 8) { - stl_vector(4) { - pointer { - compound(:Squad_TSchedule_TOrders) { - sizeof 24 - - field(:order, 0) { - pointer { - global :SquadOrder - } - } - field(:min_count, 4) { - number 32, true - } - field(:unk_8, 8) { - stl_vector(4) { - number 32, true - } - } - field(:unk_18, 20) { - number 32, true - } - } - } - } - } - field(:order_assignments, 20) { - stl_vector(4) { - pointer { - number 32, true - } - } - } - } - } - } - } - } - field(:cur_alert_idx, 104) { - number 32, true - } - field(:rooms, 108) { - stl_vector(4) { - pointer { - compound(:Squad_TRooms) { - sizeof 8 - - field(:building_id, 0) { - number 32, true - } - def building_tg ; df.world.buildings.all[building_id] ; end - field(:mode, 4) { - global :SquadUseFlags - } - } - } - } - } - field(:unk_d0, 120) { - stl_vector - } - field(:unk_e0, 132) { - stl_vector - } - field(:uniform_priority, 144) { - number 32, true - } - field(:activity, 148) { - number 32, true - } - def activity_tg ; df.world.activities.all[activity] ; end - field(:ammunition, 152) { - stl_vector(4) { - pointer { - global :SquadAmmoSpec - } - } - } - field(:weapons_free, 164) { - stl_vector(4) { - number 32, true - } - } - def weapons_free_tg ; weapons_free.map { |i| df.world.items.all[i] } ; end - field(:weapons_inuse, 176) { - stl_vector(4) { - number 32, true - } - } - def weapons_inuse_tg ; weapons_inuse.map { |i| df.world.items.all[i] } ; end - field(:ammo_items, 188) { - stl_vector(4) { - number 32, true - } - } - def ammo_items_tg ; ammo_items.map { |i| df.world.items.all[i] } ; end - field(:ammo_units, 200) { - stl_vector(4) { - number 32, true - } - } - def ammo_units_tg ; ammo_units.map { |i| df.world.units.all[i] } ; end - field(:carry_food, 212) { - number 16, true - } - field(:carry_water, 214) { - number 16, true - } -end - -class SquadAmmoSpec < MemHack::Compound - sizeof 32 - - field(:item_filter, 0) { - global :ItemFilterSpec - } - field(:amount, 12) { - number 32, true - } - field(:flags, 16) { - compound(:SquadAmmoSpec_TFlags) { - field(:_whole, 0) { - number 32, false - } - field(:use_combat, 0) { bit 0 } - field(:use_training, 0) { bit 1 } - } - } - field(:assigned, 20) { - stl_vector(4) { - number 32, true - } - } - def assigned_tg ; assigned.map { |i| df.world.items.all[i] } ; end -end - -class SquadOrder < MemHack::Compound - sizeof 4 - - rtti_classname :squad_orderst - - def isPatrol() - val = DFHack.vmethod_call(self, 16) - (val & 1) != 0 - end - def isFulfilled() - val = DFHack.vmethod_call(self, 44) - (val & 1) != 0 - end - def getTargetUnits() - ptr = DFHack.vmethod_call(self, 48) - class << self - stl_vector(4) { - number 32, true - } - end._at(ptr) if ptr != 0 - end - def getDescription(arg0) - DFHack.vmethod_call(self, 56, arg0) ; nil - end - def isInactive() - val = DFHack.vmethod_call(self, 60) - (val & 1) != 0 - end -end - -class SquadOrderKillListst < SquadOrder - sizeof 32 - - rtti_classname :squad_order_kill_listst - - field(:units, 4) { - stl_vector(4) { - number 32, true - } - } - def units_tg ; units.map { |i| df.world.units.all[i] } ; end - field(:histfigs, 16) { - stl_vector(4) { - number 32, true - } - } - def histfigs_tg ; histfigs.map { |i| df.world.history.figures[i] } ; end - field(:title, 28) { - stl_string - } -end - -class SquadOrderMovest < SquadOrder - sizeof 16 - - rtti_classname :squad_order_movest - - field(:pos, 4) { - global :Coord - } - field(:unk, 12) { - number 32, true - } -end - -class SquadOrderTrainst < SquadOrder - sizeof 4 - - rtti_classname :squad_order_trainst - -end - -class SquadPosition < MemHack::Compound - sizeof 212 - - field(:occupant, 0) { - number 32, true - } - def occupant_tg ; df.world.history.figures[occupant] ; end - field(:orders, 4) { - stl_vector(4) { - pointer { - global :SquadOrder - } - } - } - field(:preferences, 16) { - compound(:SquadPosition_TPreferences) { - field(:bed, 0) { - stl_vector(4) { - number 32, true - } - } - def bed_tg ; bed.map { |i| df.world.buildings.all[i] } ; end - field(:armor_stand, 12) { - stl_vector(4) { - number 32, true - } - } - def armor_stand_tg ; armor_stand.map { |i| df.world.buildings.all[i] } ; end - field(:box, 24) { - stl_vector(4) { - number 32, true - } - } - def box_tg ; box.map { |i| df.world.buildings.all[i] } ; end - } - } - field(:unk_44, 52) { - stl_vector - } - field(:uniform, 64) { - static_array(7, 12, UniformCategory) { - stl_vector(4) { - pointer { - global :SquadUniformSpec - } - } - } - } - field(:unk_c4, 148) { - stl_string - } - field(:flags, 152) { - global :UniformFlags - } - field(:assigned_items, 156) { - stl_vector(4) { - number 32, true - } - } - def assigned_items_tg ; assigned_items.map { |i| df.world.items.all[i] } ; end - field(:quiver, 168) { - number 32, true - } - def quiver_tg ; df.world.items.all[quiver] ; end - field(:backpack, 172) { - number 32, true - } - def backpack_tg ; df.world.items.all[backpack] ; end - field(:flask, 176) { - number 32, true - } - def flask_tg ; df.world.items.all[flask] ; end - field(:activity1, 180) { - number 32, true - } - def activity1_tg ; df.world.activities.all[activity1] ; end - field(:activity2, 184) { - number 32, true - } - def activity2_tg ; df.world.activities.all[activity2] ; end - field(:activity3, 188) { - number 32, true - } - def activity3_tg ; df.world.activities.all[activity3] ; end - field(:unk_10c, 192) { - number 32, true - } - field(:unk_110, 196) { - number 32, true - } - field(:unk_114, 200) { - number 32, true - } - field(:unk_118, 204) { - number 32, true - } - field(:unk_11c, 208) { - number 32, true - } -end - -class SquadUniformSpec < MemHack::Compound - sizeof 36 - - field(:item, 0) { - number 32, true - } - def item_tg ; df.world.items.all[item] ; end - field(:item_filter, 4) { - global :ItemFilterSpec - } - field(:color, 16) { - number 32, true - } - field(:assigned, 20) { - stl_vector(4) { - number 32, true - } - } - def assigned_tg ; assigned.map { |i| df.world.items.all[i] } ; end - field(:indiv_choice, 32) { - global :UniformIndivChoice - } -end - -class SquadUseFlags < MemHack::Compound - field(:_whole, 0) { - number 32, false - } - field(:sleep, 0) { bit 0 } - field(:train, 0) { bit 1 } - field(:indiv_eq, 0) { bit 2 } - field(:squad_eq, 0) { bit 3 } -end - -class StockpileGroupSet < MemHack::Compound - field(:_whole, 0) { - number 32, false - } - field(:animals, 0) { bit 0 } - field(:food, 0) { bit 1 } - field(:furniture, 0) { bit 2 } - field(:corpses, 0) { bit 3 } - field(:refuse, 0) { bit 4 } - field(:stone, 0) { bit 5 } - field(:ammo, 0) { bit 6 } - field(:coins, 0) { bit 7 } - field(:bars, 0) { bit 8 } - field(:gems, 0) { bit 9 } - field(:goods, 0) { bit 10 } - field(:leather, 0) { bit 11 } - field(:cloth, 0) { bit 12 } - field(:wood, 0) { bit 13 } - field(:weapons, 0) { bit 14 } - field(:armor, 0) { bit 15 } -end - -class StockpileSettings < MemHack::Compound - sizeof 956 - - field(:flags, 0) { - global :StockpileGroupSet - } - field(:animals, 4) { - compound(:StockpileSettings_TAnimals) { - field(:animals_empty_cages, 0) { - number 8, true, nil, BooleanEnum - } - field(:animals_empty_traps, 1) { - number 8, true, nil, BooleanEnum - } - field(:enabled, 4) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - } - } - field(:food, 20) { - compound(:StockpileSettings_TFood) { - field(:type, 0) { - global :StockpileSettingsFood - } - field(:prepared_meals, 228) { - number 8, true, nil, BooleanEnum - } - } - } - field(:furniture, 252) { - compound(:StockpileSettings_TFurniture) { - field(:type, 0) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:other_mats, 12) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:mats, 24) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:quality_core, 36) { - static_array(7, 1, ItemQuality) { - number 8, true, nil, BooleanEnum - } - } - field(:quality_total, 43) { - static_array(7, 1, ItemQuality) { - number 8, true, nil, BooleanEnum - } - } - field(:sand_bags, 50) { - number 8, true, nil, BooleanEnum - } - } - } - field(:unk1, 304) { - number 32, true - } - field(:refuse, 308) { - compound(:StockpileSettings_TRefuse) { - field(:type, 0) { - global :StockpileSettingsRefuse - } - field(:fresh_raw_hide, 108) { - number 8, true, nil, BooleanEnum - } - field(:rotten_raw_hide, 109) { - number 8, true, nil, BooleanEnum - } - } - } - field(:stone, 420) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:unk2, 432) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:ammo, 444) { - compound(:StockpileSettings_TAmmo) { - field(:type, 0) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:other_mats, 12) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:mats, 24) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:quality_core, 36) { - static_array(7, 1, ItemQuality) { - number 8, true, nil, BooleanEnum - } - } - field(:quality_total, 43) { - static_array(7, 1, ItemQuality) { - number 8, true, nil, BooleanEnum - } - } - } - } - field(:coins, 496) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:bars_other_mats, 508) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:blocks_other_mats, 520) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:bars_mats, 532) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:blocks_mats, 544) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:gems, 556) { - compound(:StockpileSettings_TGems) { - field(:rough_other_mats, 0) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:cut_other_mats, 12) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:rough_mats, 24) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:cut_mats, 36) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - } - } - field(:finished_goods, 604) { - compound(:StockpileSettings_TFinishedGoods) { - field(:type, 0) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:other_mats, 12) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:mats, 24) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:quality_core, 36) { - static_array(7, 1, ItemQuality) { - number 8, true, nil, BooleanEnum - } - } - field(:quality_total, 43) { - static_array(7, 1, ItemQuality) { - number 8, true, nil, BooleanEnum - } - } - } - } - field(:leather, 656) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:cloth, 668) { - compound(:StockpileSettings_TCloth) { - field(:thread_silk, 0) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:thread_plant, 12) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:thread_yarn, 24) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:thread_metal, 36) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:cloth_silk, 48) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:cloth_plant, 60) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:cloth_yarn, 72) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:cloth_metal, 84) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - } - } - field(:wood, 764) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:weapons, 776) { - compound(:StockpileSettings_TWeapons) { - field(:weapon_type, 0) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:trapcomp_type, 12) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:other_mats, 24) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:mats, 36) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:quality_core, 48) { - static_array(7, 1, ItemQuality) { - number 8, true, nil, BooleanEnum - } - } - field(:quality_total, 55) { - static_array(7, 1, ItemQuality) { - number 8, true, nil, BooleanEnum - } - } - field(:usable, 62) { - number 8, true, nil, BooleanEnum - } - field(:unusable, 63) { - number 8, true, nil, BooleanEnum - } - } - } - field(:armor, 840) { - compound(:StockpileSettings_TArmor) { - field(:body, 0) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:head, 12) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:feet, 24) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:hands, 36) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:legs, 48) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:shield, 60) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:other_mats, 72) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:mats, 84) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:quality_core, 96) { - static_array(7, 1, ItemQuality) { - number 8, true, nil, BooleanEnum - } - } - field(:quality_total, 103) { - static_array(7, 1, ItemQuality) { - number 8, true, nil, BooleanEnum - } - } - field(:usable, 110) { - number 8, true, nil, BooleanEnum - } - field(:unusable, 111) { - number 8, true, nil, BooleanEnum - } - } - } - field(:allow_organic, 952) { - number 8, true, 1, BooleanEnum - } - field(:allow_inorganic, 953) { - number 8, true, 1, BooleanEnum - } -end - -class StockpileSettingsFood < MemHack::Compound - sizeof 228 - - field(:meat, 0) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:fish, 12) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:unprepared_fish, 24) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:egg, 36) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:plants, 48) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:drink_plant, 60) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:drink_animal, 72) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:cheese_plant, 84) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:cheese_animal, 96) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:seeds, 108) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:leaves, 120) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:powder_plant, 132) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:powder_creature, 144) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:glob, 156) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:glob_paste, 168) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:glob_pressed, 180) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:liquid_plant, 192) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:liquid_animal, 204) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:liquid_misc, 216) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } -end - -class StockpileSettingsRefuse < MemHack::Compound - sizeof 108 - - field(:type, 0) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:corpses, 12) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:body_parts, 24) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:skulls, 36) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:bones, 48) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:hair, 60) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:shells, 72) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:teeth, 84) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:horns, 96) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } -end - -class StopDepartCondition < MemHack::Compound - sizeof 56 - - field(:timeout, 0) { - number 32, true - } - field(:direction, 4) { - class ::DFHack::StopDepartCondition_TDirection < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :North ; NUME[:North] = 0 - ENUM[1] = :South ; NUME[:South] = 1 - ENUM[2] = :East ; NUME[:East] = 2 - ENUM[3] = :West ; NUME[:West] = 3 - end - - number 32, true, nil, StopDepartCondition_TDirection - } - field(:mode, 8) { - class ::DFHack::StopDepartCondition_TMode < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :Push ; NUME[:Push] = 0 - ENUM[1] = :Ride ; NUME[:Ride] = 1 - ENUM[2] = :Guide ; NUME[:Guide] = 2 - end - - number 32, true, nil, StopDepartCondition_TMode - } - field(:load_percent, 12) { - number 32, true - } - field(:flags, 16) { - compound(:StopDepartCondition_TFlags) { - field(:_whole, 0) { - number 32, true - } - field(:at_most, 0) { bit 0 } - field(:desired, 0) { bit 1 } - } - } - field(:guide_path, 20) { - global :CoordPath - } -end - -class Syndrome < MemHack::Compound - sizeof 108 - - field(:syn_name, 0) { - stl_string - } - field(:ce, 4) { - stl_vector(4) { - pointer { - global :CreatureInteractionEffect - } - } - } - field(:syn_affected_class, 16) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:syn_affected_creature_1, 28) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:syn_affected_creature_2, 40) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:syn_immune_class, 52) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:syn_immune_creature_1, 64) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:syn_immune_creature_2, 76) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:syn_class, 88) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:flags, 100) { - global :SyndromeFlags - } - field(:id, 104) { - number 32, true - } -end - -class SyndromeFlags < MemHack::Compound - field(:_whole, 0) { - number 32, false - } - field(:SYN_INJECTED, 0) { bit 0 } - field(:SYN_CONTACT, 0) { bit 1 } - field(:SYN_INHALED, 0) { bit 2 } - field(:SYN_INGESTED, 0) { bit 4 } -end - -class TaskKillNemesisst < AdvTask - sizeof 64 - - rtti_classname :task_kill_nemesisst - - field(:anon_1, 48) { - number 32, true - } - field(:target_site, 52) { - number 32, true - } - def target_site_tg ; df.world.world_data.sites[target_site] ; end - field(:target_hfid, 56) { - number 32, true - } - def target_hfid_tg ; df.world.history.figures[target_hfid] ; end - field(:anon_2, 60) { - number 8, false - } -end - -class TaskSeekNemesisst < AdvTask - sizeof 60 - - rtti_classname :task_seek_nemesisst - - field(:anon_1, 48) { - number 32, true - } - field(:target_site, 52) { - number 32, true - } - def target_site_tg ; df.world.world_data.sites[target_site] ; end - field(:target_hfid, 56) { - number 32, true - } - def target_hfid_tg ; df.world.history.figures[target_hfid] ; end -end - -class TextureHandler < MemHack::Compound - sizeof 36 - - field(:page, 0) { - stl_vector(4) { - pointer { - global :TilePage - } - } - } - field(:texpos, 12) { - stl_vector(4) { - number 32, true - } - } - field(:datapos, 24) { - stl_vector(4) { - number 32, true - } - } -end - -class TileBitmask < MemHack::Compound - sizeof 32 - - field(:bits, 0) { - static_array(16, 2) { - number 16, false - } - } -end - -class TileDesignation < MemHack::Compound - field(:_whole, 0) { - number 32, true - } - field(:flow_size, 0) { bits 0, 3 } - field(:pile, 0) { bit 3 } - field(:dig, 0) { bits 4, 3, TileDigDesignation } - field(:smooth, 0) { bits 7, 2 } - field(:hidden, 0) { bit 9 } - field(:geolayer_index, 0) { bits 10, 4 } - field(:light, 0) { bit 14 } - field(:subterranean, 0) { bit 15 } - field(:outside, 0) { bit 16 } - field(:biome, 0) { bits 17, 4 } - field(:liquid_type, 0) { bit 21 } - field(:water_table, 0) { bit 22 } - field(:rained, 0) { bit 23 } - field(:traffic, 0) { bits 24, 2, TileTraffic } - field(:flow_forbid, 0) { bit 26 } - field(:liquid_static, 0) { bit 27 } - field(:feature_local, 0) { bit 28 } - field(:feature_global, 0) { bit 29 } - field(:water_stagnant, 0) { bit 30 } - field(:water_salt, 0) { bit 31 } -end - -class TileLiquidFlow < MemHack::Compound - field(:_whole, 0) { - number 16, false - } - field(:temp_flow_timer, 0) { bits 0, 3 } - field(:unk_1, 0) { bits 3, 3 } - field(:perm_flow_dir, 0) { bits 6, 4, TileLiquidFlowDir } - field(:unk_2, 0) { bits 10, 6 } -end - -class TileOccupancy < MemHack::Compound - field(:_whole, 0) { - number 32, true - } - field(:building, 0) { bits 0, 3, TileBuildingOcc } - field(:unit, 0) { bit 3 } - field(:unit_grounded, 0) { bit 4 } - field(:item, 0) { bit 5 } - field(:edge_flow_in, 0) { bit 6 } - field(:moss, 0) { bit 7 } - field(:arrow_color, 0) { bits 8, 4 } - field(:arrow_variant, 0) { bit 12 } - field(:unk13, 0) { bit 13 } - field(:monster_lair, 0) { bit 14 } - field(:no_grow, 0) { bit 15 } - field(:unk16, 0) { bit 16 } - field(:unk17, 0) { bit 17 } - field(:carve_track_north, 0) { bit 18 } - field(:carve_track_south, 0) { bit 19 } - field(:carve_track_east, 0) { bit 20 } - field(:carve_track_west, 0) { bit 21 } -end - -class TilePage < MemHack::Compound - sizeof 68 - - field(:token, 0) { - stl_string - } - field(:filename, 4) { - stl_string - } - field(:tile_dim_x, 8) { - number 16, true - } - field(:tile_dim_y, 10) { - number 16, true - } - field(:page_dim_x, 12) { - number 16, true - } - field(:page_dim_y, 14) { - number 16, true - } - field(:texpos, 16) { - stl_vector(4) { - number 32, true - } - } - field(:datapos, 28) { - stl_vector(4) { - number 32, true - } - } - field(:texpos_gs, 40) { - stl_vector(4) { - number 32, true - } - } - field(:datapos_gs, 52) { - stl_vector(4) { - number 32, true - } - } - field(:loaded, 64) { - number 8, true, nil, BooleanEnum - } -end - -class TimedEvent < MemHack::Compound - sizeof 24 - - field(:type, 0) { - number 16, true, nil, TimedEventType - } - field(:season, 2) { - number 8, false - } - field(:season_ticks, 4) { - number 16, true - } - field(:entity, 8) { - pointer { - global :HistoricalEntity - } - } - field(:anon_1, 12) { - number 16, true - } - field(:anon_2, 16) { - number 32, true - } - field(:anon_3, 20) { - number 16, true - } - field(:anon_4, 22) { - number 16, true - } -end - -class TissueTemplate < MemHack::Compound - sizeof 80 - - field(:id, 0) { - stl_string - } - field(:flags, 4) { - df_flagarray(TissueTemplateFlags) - } - field(:tissue_name_singular, 12) { - stl_string - } - field(:tissue_name_plural, 16) { - stl_string - } - field(:tissue_material_str, 20) { - static_array(3, 4) { - stl_string - } - } - field(:anon_1, 32) { - number 16, true - } - field(:anon_2, 36) { - number 32, true - } - field(:relative_thickness, 40) { - number 32, true - } - field(:healing_rate, 44) { - number 32, true - } - field(:vascular, 48) { - number 32, true - } - field(:pain_receptors, 52) { - number 32, true - } - field(:tissue_shape, 56) { - number 16, true - } - field(:anon_3, 60) { - number 32, true - } - field(:insulation, 64) { - number 16, true - } - field(:subordinate_to_tissue, 68) { - stl_string - } - field(:tissue_mat_state, 72) { - number 16, true - } - field(:tissue_shape_str, 76) { - stl_string - } -end - -class TrainingAssignment < MemHack::Compound - sizeof 12 - - field(:animal_id, 0) { - number 32, true - } - def animal_tg ; df.world.units.all[animal_id] ; end - field(:trainer_id, 4) { - number 32, true - } - def trainer_tg ; df.world.units.all[trainer_id] ; end - field(:auto_mode, 8) { - class ::DFHack::TrainingAssignment_TAutoMode < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :None ; NUME[:None] = 0 - ENUM[1] = :Any ; NUME[:Any] = 1 - ENUM[2] = :AnyUnassigned ; NUME[:AnyUnassigned] = 2 - end - - number 32, true, nil, TrainingAssignment_TAutoMode - } -end - -class Ui < MemHack::Compound - sizeof 28420 - - field(:game_state, 0) { - number 16, true - } - field(:lost_to_siege_civ, 4) { - number 32, true - } - def lost_to_siege_civ_tg ; df.world.entities.all[lost_to_siege_civ] ; end - field(:unk8, 8) { - compound(:Ui_TUnk8) { - field(:anon_1, 0) { - number 16, true - } - field(:anon_2, 4) { - number 32, true - } - field(:unk10, 8) { - stl_vector(4) { - pointer { - global :Building - } - } - } - field(:anon_3, 20) { - number 32, true - } - field(:anon_4, 24) { - number 32, true - } - field(:anon_5, 28) { - static_array(2, 4) { - number 32, true - } - } - field(:anon_6, 36) { - number 16, true - } - field(:anon_7, 38) { - number 16, true - } - field(:anon_8, 40) { - number 16, true - } - field(:anon_9, 42) { - number 16, true - } - field(:anon_10, 44) { - number 16, true - } - field(:anon_11, 46) { - static_array(2, 2) { - number 16, true - } - } - field(:anon_12, 50) { - static_array(2, 2) { - number 16, true - } - } - field(:anon_13, 54) { - static_array(2, 2) { - number 16, true - } - } - field(:anon_14, 60) { - number 32, true - } - field(:anon_15, 64) { - number 32, true - } - field(:anon_16, 68) { - number 32, true - } - field(:anon_17, 72) { - number 8, false - } - } - } - field(:anon_1, 84) { - number 32, true - } - field(:anon_2, 88) { - number 32, true - } - field(:anon_3, 92) { - number 32, true - } - field(:anon_4, 96) { - number 32, true - } - field(:bookkeeper_settings, 100) { - number 16, true - } - field(:caravans, 104) { - stl_vector(4) { - pointer { - global :CaravanState - } - } - } - field(:anon_5, 116) { - number 8, false - } - field(:fortress_rank, 118) { - number 16, true - } - field(:anon_6, 120) { - number 16, true - } - field(:anon_7, 122) { - number 16, true - } - field(:anon_8, 124) { - number 16, true - } - field(:anon_9, 126) { - number 8, false - } - field(:anon_10, 127) { - number 8, false - } - field(:economy_enabled, 128) { - number 8, true, nil, BooleanEnum - } - field(:anon_11, 129) { - number 8, false - } - field(:justice_active, 130) { - number 8, true, nil, BooleanEnum - } - field(:anon_12, 132) { - number 16, true - } - field(:anon_13, 134) { - number 16, true - } - field(:anon_14, 136) { - number 16, true - } - field(:becoming_capital, 140) { - compound(:Ui_TBecomingCapital) { - field(:desired_architecture, 0) { - number 32, true - } - field(:desired_offerings, 4) { - number 32, true - } - } - } - field(:anon_15, 148) { - static_array(152, 2) { - number 16, true - } - } - field(:guild_wages, 452) { - static_array(6, 4, GuildId) { - number 32, true - } - } - field(:guild_happiness, 476) { - static_array(6, 2, GuildId) { - number 16, true - } - } - field(:labor_slowdown_timer, 488) { - static_array(6, 2, GuildId) { - number 16, true - } - } - field(:currency_value, 500) { - stl_vector(4) { - number 32, true - } - } - field(:anon_16, 512) { - number 32, true - } - field(:anon_17, 516) { - number 32, true - } - field(:anon_18, 520) { - number 32, true - } - field(:tasks, 524) { - global :EntityActivityStatistics - } - field(:unk22e8, 8844) { - stl_vector - } - field(:activities, 8856) { - stl_vector(4) { - pointer { - global :ActivityInfo - } - } - } - field(:dip_meeting_info, 8868) { - stl_vector(4) { - pointer { - global :MeetingDiplomatInfo - } - } - } - field(:unk230c, 8880) { - stl_vector(4) { - number 32, true - } - } - def unk230c_tg ; unk230c.map { |i| df.world.units.all[i] } ; end - field(:game_over, 8892) { - number 8, true, nil, BooleanEnum - } - field(:invasions, 8896) { - compound(:Ui_TInvasions) { - field(:list, 0) { - stl_vector(4) { - pointer { - global :InvasionInfo - } - } - } - field(:next_id, 12) { - number 32, true - } - } - } - field(:crimes, 8912) { - stl_vector(4) { - pointer { - compound(:Ui_TCrimes) { - sizeof 24 - - field(:mode, 0) { - class ::DFHack::Ui_TCrimes_TMode < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :ProductionOrderViolation ; NUME[:ProductionOrderViolation] = 0 - ENUM[1] = :ExportViolation ; NUME[:ExportViolation] = 1 - ENUM[2] = :JobOrderViolation ; NUME[:JobOrderViolation] = 2 - ENUM[3] = :ConspiracyToSlowLabor ; NUME[:ConspiracyToSlowLabor] = 3 - ENUM[4] = :Murder ; NUME[:Murder] = 4 - ENUM[5] = :DisorderlyBehavior ; NUME[:DisorderlyBehavior] = 5 - ENUM[6] = :BuildingDestruction ; NUME[:BuildingDestruction] = 6 - ENUM[7] = :Vandalism ; NUME[:Vandalism] = 7 - end - - number 16, true, nil, Ui_TCrimes_TMode - } - field(:unk2, 2) { - number 16, true - } - field(:unk3, 4) { - number 16, true - } - field(:unk4, 6) { - number 16, true - } - field(:unk5, 8) { - number 32, true - } - field(:criminal, 12) { - pointer { - global :Unit - } - } - field(:victim, 16) { - pointer { - global :Unit - } - } - field(:punishment_assigned, 20) { - number 32, true - } - } - } - } - } - field(:punishments, 8924) { - stl_vector(4) { - pointer { - compound(:Ui_TPunishments) { - sizeof 36 - - field(:criminal, 0) { - pointer { - global :Unit - } - } - field(:officer, 4) { - pointer { - global :Unit - } - } - field(:beating, 8) { - number 16, true - } - field(:hammer_strikes, 10) { - number 16, true - } - field(:prison_counter, 12) { - number 32, true - } - field(:unk_10, 16) { - number 16, true - } - field(:chain, 20) { - pointer { - global :Building - } - } - field(:victims, 24) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - } - } - } - } - field(:pets, 8936) { - stl_vector(4) { - pointer { - global :PetInfo - } - } - } - field(:parties, 8948) { - stl_vector(4) { - pointer { - global :PartyInfo - } - } - } - field(:room_rent, 8960) { - stl_vector(4) { - pointer { - global :RoomRentInfo - } - } - } - field(:dipscripts, 8972) { - stl_vector(4) { - pointer { - global :DipscriptInfo - } - } - } - field(:dipscript_popups, 8984) { - stl_vector(4) { - pointer { - } - } - } - field(:kitchen, 8996) { - compound(:Ui_TKitchen) { - field(:item_types, 0) { - stl_vector(2) { - number 16, true, nil, ItemType - } - } - field(:item_subtypes, 12) { - stl_vector(2) { - number 16, true - } - } - field(:mat_types, 24) { - stl_vector(2) { - number 16, true - } - } - field(:mat_indices, 36) { - stl_vector(4) { - number 32, true - } - } - field(:exc_types, 48) { - stl_vector(1) { - number 8, false - } - } - } - } - field(:economic_stone, 9056) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:unk23c8_flags, 9068) { - number 32, false - } - field(:unk23cc, 9072) { - number 16, true - } - field(:mood_cooldown, 9074) { - number 16, true - } - field(:civ_id, 9076) { - number 32, true - } - def civ_tg ; df.world.entities.all[civ_id] ; end - field(:site_id, 9080) { - number 32, true - } - def site_tg ; df.world.world_data.sites[site_id] ; end - field(:group_id, 9084) { - number 32, true - } - def group_tg ; df.world.entities.all[group_id] ; end - field(:race_id, 9088) { - number 32, true - } - def race_tg ; df.world.raws.creatures.all[race_id] ; end - field(:unk23e0, 9092) { - stl_vector(2) { - number 16, true - } - } - field(:unk23ec, 9104) { - stl_vector(1) { - number 8, false - } - } - field(:economy_prices, 9116) { - compound(:Ui_TEconomyPrices) { - field(:price_adjustment, 0) { - compound(:Ui_TEconomyPrices_TPriceAdjustment) { - field(:general_items, 0) { - stl_vector(4) { - number 32, true - } - } - field(:weapons, 12) { - stl_vector(4) { - number 32, true - } - } - field(:armor, 24) { - stl_vector(4) { - number 32, true - } - } - field(:handwear, 36) { - stl_vector(4) { - number 32, true - } - } - field(:footwear, 48) { - stl_vector(4) { - number 32, true - } - } - field(:headwear, 60) { - stl_vector(4) { - number 32, true - } - } - field(:legwear, 72) { - stl_vector(4) { - number 32, true - } - } - field(:prepared_food, 84) { - stl_vector(4) { - number 32, true - } - } - field(:wood, 96) { - stl_vector(4) { - number 32, true - } - } - field(:thread_cloth, 108) { - stl_vector(4) { - number 32, true - } - } - field(:bone, 120) { - stl_vector(4) { - number 32, true - } - } - field(:tooth, 132) { - stl_vector(4) { - number 32, true - } - } - field(:horn, 144) { - stl_vector(4) { - number 32, true - } - } - field(:pearl, 156) { - stl_vector(4) { - number 32, true - } - } - field(:shell, 168) { - stl_vector(4) { - number 32, true - } - } - field(:leather, 180) { - stl_vector(4) { - number 32, true - } - } - field(:silk, 192) { - stl_vector(4) { - number 32, true - } - } - field(:inorganic, 204) { - stl_vector(4) { - number 32, true - } - } - field(:meat, 216) { - stl_vector(4) { - number 32, true - } - } - field(:fish, 228) { - stl_vector(4) { - number 32, true - } - } - field(:plants, 240) { - stl_vector(4) { - number 32, true - } - } - field(:drinks, 252) { - stl_vector(4) { - number 32, true - } - } - field(:extract_animal, 264) { - stl_vector(4) { - number 32, true - } - } - field(:extract_plant, 276) { - stl_vector(4) { - number 32, true - } - } - field(:mill_animal, 288) { - stl_vector(4) { - number 32, true - } - } - field(:mill_plant, 300) { - stl_vector(4) { - number 32, true - } - } - field(:cheese_animal, 312) { - stl_vector(4) { - number 32, true - } - } - field(:cheese_plant, 324) { - stl_vector(4) { - number 32, true - } - } - field(:pets, 336) { - stl_vector(4) { - number 32, true - } - } - field(:yarn, 348) { - stl_vector(4) { - number 32, true - } - } - } - } - field(:price_setter, 360) { - compound(:Ui_TEconomyPrices_TPriceSetter) { - field(:general_items, 0) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - field(:weapons, 12) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - field(:armor, 24) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - field(:handwear, 36) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - field(:footwear, 48) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - field(:headwear, 60) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - field(:legwear, 72) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - field(:prepared_food, 84) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - field(:wood, 96) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - field(:thread_cloth, 108) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - field(:bone, 120) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - field(:tooth, 132) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - field(:horn, 144) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - field(:pearl, 156) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - field(:shell, 168) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - field(:leather, 180) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - field(:silk, 192) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - field(:inorganic, 204) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - field(:meat, 216) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - field(:fish, 228) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - field(:plants, 240) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - field(:drinks, 252) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - field(:extract_animal, 264) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - field(:extract_plant, 276) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - field(:mill_animal, 288) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - field(:mill_plant, 300) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - field(:cheese_animal, 312) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - field(:cheese_plant, 324) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - field(:pets, 336) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - field(:yarn, 348) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - } - } - } - } - field(:stockpile, 9836) { - compound(:Ui_TStockpile) { - field(:reserved_bins, 0) { - number 32, true - } - field(:reserved_barrels, 4) { - number 32, true - } - field(:custom_settings, 8) { - global :StockpileSettings - } - } - } - field(:unk2a8c, 10800) { - static_array(4, 3072) { - static_array(768, 4) { - compound(:Ui_TUnk2a8c) { - field(:unk1, 0) { - number 16, true - } - field(:unk2, 2) { - number 16, true - } - } - } - } - } - field(:unk5a8c, 23088) { - stl_vector(2) { - number 16, true - } - } - field(:unk5a98, 23100) { - stl_vector(2) { - number 16, true - } - } - field(:unk5aa4, 23112) { - stl_vector(2) { - number 16, true - } - } - field(:unk5ab0, 23124) { - static_array(5, 12) { - stl_vector(2) { - number 16, true - } - } - } - field(:unk5aec, 23184) { - stl_vector(2) { - number 16, true - } - } - field(:unk5af8, 23196) { - static_array(5, 12) { - stl_vector(2) { - number 16, true - } - } - } - field(:unk5b34, 23256) { - stl_vector(2) { - number 16, true - } - } - field(:unk5b40, 23268) { - static_array(5, 12) { - stl_vector(2) { - number 16, true - } - } - } - field(:unk5b7c, 23328) { - stl_vector(2) { - number 16, true - } - } - field(:unk5b88, 23340) { - static_array(7, 12) { - stl_vector - } - } - field(:waypoints, 23424) { - compound(:Ui_TWaypoints) { - field(:points, 0) { - stl_vector(4) { - pointer { - compound(:Ui_TWaypoints_TPoints) { - sizeof 28 - - field(:id, 0) { - number 32, true - } - field(:tile, 4) { - number 8, false - } - field(:fg_color, 6) { - number 16, true - } - field(:bg_color, 8) { - number 16, true - } - field(:name, 12) { - stl_string - } - field(:comment, 16) { - stl_string - } - field(:pos, 20) { - global :Coord - } - } - } - } - } - field(:routes, 12) { - stl_vector(4) { - pointer { - compound(:Ui_TWaypoints_TRoutes) { - sizeof 20 - - field(:id, 0) { - number 32, true - } - field(:name, 4) { - stl_string - } - field(:points, 8) { - stl_vector(4) { - number 32, true - } - } - } - } - } - } - field(:sym_selector, 24) { - number 16, true - } - field(:anon_1, 26) { - number 16, true - } - field(:cur_point_index, 28) { - number 32, true - } - field(:in_edit_name_mode, 32) { - number 8, true, nil, BooleanEnum - } - field(:anon_2, 33) { - number 8, false - } - field(:sym_tile, 34) { - number 8, false - } - field(:sym_fg_color, 36) { - number 16, true - } - field(:sym_bg_color, 38) { - number 16, true - } - field(:unk5c04, 40) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:next_point_id, 52) { - number 32, true - } - field(:next_route_id, 56) { - number 32, true - } - field(:sel_route_idx, 60) { - number 32, true - } - field(:sel_route_waypt_idx, 64) { - number 32, true - } - field(:in_edit_waypts_mode, 68) { - number 8, true, nil, BooleanEnum - } - } - } - field(:burrows, 23496) { - compound(:Ui_TBurrows) { - field(:list, 0) { - stl_vector(4) { - pointer { - global :Burrow - } - } - } - field(:next_id, 12) { - number 32, true - } - field(:sel_index, 16) { - number 32, true - } - field(:sel_id, 20) { - number 32, true - } - def sel_tg ; df.ui.burrows.list[sel_id] ; end - field(:in_confirm_delete, 24) { - number 8, true, nil, BooleanEnum - } - field(:in_add_units_mode, 25) { - number 8, true, nil, BooleanEnum - } - field(:list_units, 28) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - field(:sel_units, 40) { - stl_bit_vector - } - field(:unit_cursor_pos, 60) { - number 32, true - } - field(:in_define_mode, 64) { - number 8, true, nil, BooleanEnum - } - field(:rect_start, 66) { - global :Coord - } - field(:brush_mode, 72) { - number 16, true - } - field(:in_edit_name_mode, 74) { - number 8, true, nil, BooleanEnum - } - field(:sym_selector, 76) { - number 16, true - } - field(:sym_tile, 78) { - number 16, true - } - field(:sym_fg_color, 80) { - number 16, true - } - field(:sym_bg_color, 82) { - number 16, true - } - } - } - field(:alerts, 23580) { - compound(:Ui_TAlerts) { - field(:list, 0) { - stl_vector(4) { - pointer { - compound(:Ui_TAlerts_TList) { - sizeof 20 - - field(:id, 0) { - number 32, true - } - field(:name, 4) { - stl_string - } - field(:anon_1, 8) { - stl_vector - } - } - } - } - } - field(:next_id, 12) { - number 32, true - } - field(:civ_alert_idx, 16) { - number 32, true - } - } - } - field(:equipment, 23600) { - compound(:Ui_TEquipment) { - field(:items_by_type1, 0) { - static_array(112, 12, ItemType) { - stl_vector(4) { - pointer { - global :Item - } - } - } - } - field(:items_unassigned, 1344) { - static_array(112, 12, ItemType) { - stl_vector(4) { - pointer { - global :Item - } - } - } - } - field(:items_assigned, 2688) { - static_array(112, 12, ItemType) { - stl_vector(4) { - pointer { - global :Item - } - } - } - } - field(:update, 4032) { - compound(:Ui_TEquipment_TUpdate) { - field(:_whole, 0) { - number 32, true - } - field(:weapon, 0) { bit 0 } - field(:armor, 0) { bit 1 } - field(:shoes, 0) { bit 2 } - field(:shield, 0) { bit 3 } - field(:helm, 0) { bit 4 } - field(:gloves, 0) { bit 5 } - field(:ammo, 0) { bit 6 } - field(:pants, 0) { bit 7 } - field(:backpack, 0) { bit 8 } - field(:quiver, 0) { bit 9 } - field(:flask, 0) { bit 10 } - field(:buildings, 0) { bit 12 } - } - } - field(:work_weapons, 4036) { - stl_vector(4) { - number 32, true - } - } - def work_weapons_tg ; work_weapons.map { |i| df.world.items.all[i] } ; end - field(:work_units, 4048) { - stl_vector(4) { - number 32, true - } - } - def work_units_tg ; work_units.map { |i| df.world.units.all[i] } ; end - field(:hunter_ammunition, 4060) { - stl_vector(4) { - pointer { - global :SquadAmmoSpec - } - } - } - field(:ammo_items, 4072) { - stl_vector(4) { - number 32, true - } - } - def ammo_items_tg ; ammo_items.map { |i| df.world.items.all[i] } ; end - field(:ammo_units, 4084) { - stl_vector(4) { - number 32, true - } - } - def ammo_units_tg ; ammo_units.map { |i| df.world.units.all[i] } ; end - field(:training_assignments, 4096) { - stl_vector(4) { - pointer { - global :TrainingAssignment - } - } - } - } - } - field(:hauling, 27708) { - compound(:Ui_THauling) { - field(:routes, 0) { - stl_vector(4) { - pointer { - global :HaulingRoute - } - } - } - field(:next_id, 12) { - number 32, true - } - field(:view_routes, 16) { - stl_vector(4) { - pointer { - global :HaulingRoute - } - } - } - field(:view_stops, 28) { - stl_vector(4) { - pointer { - global :HaulingStop - } - } - } - field(:view_bad, 40) { - stl_vector(4) { - number 32, true - } - } - field(:cursor_top, 52) { - number 32, true - } - field(:in_stop, 56) { - number 8, true, nil, BooleanEnum - } - field(:cursor_stop, 60) { - number 32, true - } - field(:stop_conditions, 64) { - stl_vector(4) { - pointer { - global :StopDepartCondition - } - } - } - field(:stop_links, 76) { - stl_vector(4) { - pointer { - global :RouteStockpileLink - } - } - } - field(:in_advanced_cond, 88) { - number 8, true, nil, BooleanEnum - } - field(:in_assign_vehicle, 89) { - number 8, true, nil, BooleanEnum - } - field(:cursor_vehicle, 92) { - number 32, true - } - field(:vehicles, 96) { - stl_vector(4) { - pointer { - global :Vehicle - } - } - } - field(:in_name, 108) { - number 8, true, nil, BooleanEnum - } - field(:old_name, 112) { - stl_string - } - } - } - field(:main, 27824) { - compound(:Ui_TMain) { - field(:hotkeys, 0) { - static_array(16, 24) { - global :UiHotkey - } - } - field(:traffic_cost_high, 384) { - number 32, true - } - field(:traffic_cost_normal, 388) { - number 32, true - } - field(:traffic_cost_low, 392) { - number 32, true - } - field(:traffic_cost_restricted, 396) { - number 32, true - } - field(:dead_citizens, 400) { - stl_vector(4) { - pointer { - compound(:Ui_TMain_TDeadCitizens) { - sizeof 24 - - field(:unit_id, 0) { - number 32, true - } - def unit_tg ; df.world.units.all[unit_id] ; end - field(:histfig_id, 4) { - number 32, true - } - def histfig_tg ; df.world.history.figures[histfig_id] ; end - field(:death_year, 8) { - number 32, true - } - field(:death_time, 12) { - number 32, true - } - field(:timer, 16) { - number 32, true - } - field(:unk6, 20) { - number 16, true - } - } - } - } - } - field(:fortress_entity, 412) { - pointer { - global :HistoricalEntity - } - } - field(:mode, 416) { - number 16, true, nil, UiSidebarMode - } - field(:unk1, 418) { - number 16, true - } - field(:selected_traffic_cost, 420) { - number 16, true - } - field(:autosave_request, 422) { - number 8, true, nil, BooleanEnum - } - field(:unk6df4, 424) { - number 32, true - } - field(:selected_hotkey, 428) { - number 16, true - } - field(:in_rename_hotkey, 430) { - number 8, true, nil, BooleanEnum - } - } - } - field(:squads, 28256) { - compound(:Ui_TSquads) { - field(:list, 0) { - stl_vector(4) { - pointer { - global :Squad - } - } - } - field(:unk6e08, 12) { - stl_vector - } - field(:sel_squads, 24) { - stl_bit_vector - } - field(:indiv_selected, 44) { - stl_vector(4) { - number 32, true - } - } - def indiv_selected_tg ; indiv_selected.map { |i| df.world.history.figures[i] } ; end - field(:in_select_indiv, 56) { - number 8, true, nil, BooleanEnum - } - field(:sel_indiv_squad, 60) { - number 32, true - } - field(:anon_1, 64) { - } - field(:unk48, 72) { - number 32, true - } - field(:unk4c, 76) { - pointer { - global :Squad - } - } - field(:in_move_order, 80) { - number 8, true, nil, BooleanEnum - } - field(:point_list_scroll, 84) { - number 32, true - } - field(:in_kill_order, 88) { - number 8, true, nil, BooleanEnum - } - field(:kill_rect_targets, 92) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - field(:anon_2, 104) { - } - field(:in_kill_list, 108) { - number 8, true, nil, BooleanEnum - } - field(:kill_targets, 112) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - field(:sel_kill_targets, 124) { - stl_bit_vector - } - field(:anon_3, 144) { - } - field(:in_kill_rect, 148) { - number 8, true, nil, BooleanEnum - } - field(:rect_start, 150) { - global :Coord - } - } - } - field(:follow_unit, 28412) { - number 32, true - } - def follow_unit_tg ; df.world.units.all[follow_unit] ; end - field(:follow_item, 28416) { - number 32, true - } - def follow_item_tg ; df.world.items.all[follow_item] ; end -end - -class UiAdvmode < MemHack::Compound - sizeof 460 - - field(:menu, 0) { - number 16, true, nil, UiAdvmodeMenu - } - field(:anon_1, 2) { - number 16, true - } - field(:anon_2, 4) { - number 32, true - } - field(:anon_3, 8) { - number 32, true - } - field(:anon_4, 12) { - number 16, true - } - field(:anon_5, 14) { - number 16, true - } - field(:anon_6, 16) { - number 32, true - } - field(:anon_7, 20) { - number 32, true - } - field(:anon_8, 24) { - number 32, true - } - field(:anon_9, 28) { - number 32, true - } - field(:anon_10, 32) { - number 32, true - } - field(:anon_11, 36) { - number 32, true - } - field(:anon_12, 40) { - number 32, true - } - field(:anon_13, 44) { - number 32, true - } - field(:anon_14, 48) { - stl_vector - } - field(:anon_15, 60) { - stl_vector - } - field(:anon_16, 72) { - stl_vector - } - field(:anon_17, 84) { - stl_vector - } - field(:anon_18, 96) { - number 32, true - } - field(:anon_19, 100) { - number 32, true - } - field(:anon_20, 104) { - number 32, true - } - field(:anon_21, 108) { - number 32, true - } - field(:anon_22, 112) { - number 32, true - } - field(:anon_23, 116) { - stl_vector(4) { - number 32, true - } - } - def anon_23_tg ; anon_23.map { |i| df.world.world_data.sites[i] } ; end - field(:anon_24, 128) { - stl_vector(4) { - number 32, true - } - } - field(:anon_25, 140) { - stl_vector(4) { - number 32, true - } - } - field(:anon_26, 152) { - number 16, true - } - field(:anon_27, 154) { - number 16, true - } - field(:anon_28, 156) { - number 16, true - } - field(:anon_29, 158) { - number 16, true - } - field(:player_id, 160) { - number 32, true - } - def player_tg ; df.world.nemesis.all[player_id] ; end - field(:anon_30, 164) { - stl_vector - } - field(:talks, 176) { - stl_vector - } - field(:unk_e0, 188) { - number 32, true - } - field(:unk_e4, 192) { - number 8, false - } - field(:unk_e8, 196) { - number 32, true - } - field(:unk_ec, 200) { - number 32, true - } - field(:unk_f0, 204) { - number 32, true - } - field(:unk_f4, 208) { - number 32, true - } - field(:unk_f8, 212) { - number 32, true - } - field(:unk_fc, 216) { - number 16, true - } - field(:unk_100, 220) { - number 32, true - } - field(:unk_104, 224) { - number 32, true - } - field(:unk_108, 228) { - number 32, true - } - field(:unk_10c, 232) { - number 32, true - } - field(:anon_31, 236) { - stl_vector - } - field(:anon_32, 248) { - stl_vector - } - field(:anon_33, 260) { - stl_vector - } - field(:actions, 272) { - stl_vector(4) { - pointer { - global :AdventureMovementOption - } - } - } - field(:anon_34, 284) { - stl_vector - } - field(:anon_35, 296) { - number 32, true - } - field(:anon_36, 300) { - number 16, true - } - field(:anon_37, 302) { - number 16, true - } - field(:anon_38, 304) { - number 32, true - } - field(:anon_39, 308) { - number 32, true - } - field(:companions, 312) { - compound(:UiAdvmode_TCompanions) { - field(:unit, 0) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - field(:unit_visible, 12) { - stl_bit_vector - } - field(:unit_position, 32) { - global :CoordPath - } - field(:all_histfigs, 68) { - stl_vector(4) { - number 32, true - } - } - def all_histfigs_tg ; all_histfigs.map { |i| df.world.history.figures[i] } ; end - } - } - field(:anon_40, 392) { - stl_vector - } - field(:anon_41, 404) { - stl_vector - } - field(:unk_1e4, 416) { - number 32, true - } - field(:unk_1e8, 420) { - number 32, true - } - field(:unk_1ec, 424) { - number 32, true - } - field(:unk_1f0, 428) { - number 32, true - } - field(:unk_1f4, 432) { - number 32, true - } - field(:unk_1f8, 436) { - number 32, true - } - field(:unk_1fc, 440) { - number 32, true - } - field(:unk_200, 444) { - number 32, true - } - field(:anon_42, 448) { - stl_string - } - field(:unk_220, 452) { - number 32, true - } - field(:unk_224, 456) { - number 32, true - } -end - -class UiBuildItemReq < MemHack::Compound - sizeof 196 - - field(:filter, 0) { - global :JobItemFilter - } - field(:candidates, 140) { - stl_vector(4) { - pointer { - global :Item - } - } - } - field(:candidate_selected, 152) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:unk_a0, 164) { - stl_vector(2) { - number 16, true - } - } - field(:candidate_enabled, 176) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:count_required, 188) { - number 16, true - } - field(:count_max, 190) { - number 16, true - } - field(:count_provided, 192) { - number 16, true - } -end - -class UiBuildSelector < MemHack::Compound - sizeof 3988 - - field(:requirements, 0) { - stl_vector(4) { - pointer { - global :UiBuildItemReq - } - } - } - field(:choices, 12) { - stl_vector(4) { - pointer { - global :BuildReqChoicest - } - } - } - field(:building_type, 24) { - number 32, true, nil, BuildingType - } - field(:building_subtype, 28) { - number 16, true - } - field(:custom_type, 32) { - number 32, true - } - def custom_type_tg ; df.world.raws.buildings.all[custom_type] ; end - field(:stage, 36) { - number 32, true - } - field(:req_index, 40) { - number 16, true - } - field(:sel_index, 42) { - number 16, true - } - field(:is_grouped, 44) { - number 32, true - } - field(:unk3, 48) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:unk4, 60) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:tiles, 72) { - static_array(31, 124) { - static_array(31, 4) { - number 32, true - } - } - } - field(:unk5_0a, 3916) { - number 16, true - } - field(:unk5_0b, 3918) { - number 16, true - } - field(:plate_info, 3920) { - global :PressurePlateInfo - } - field(:unk6, 3944) { - stl_vector(2) { - number 16, true - } - } - field(:unk7, 3956) { - stl_vector(2) { - number 16, true - } - } - field(:friction, 3968) { - number 32, true, 50000 - } - field(:use_dump, 3972) { - number 32, true - } - field(:dump_x_shift, 3976) { - number 32, true - } - field(:dump_y_shift, 3980) { - number 32, true - } - field(:speed, 3984) { - number 32, true, 50000 - } -end - -class UiHotkey < MemHack::Compound - sizeof 24 - - field(:name, 0) { - stl_string - } - field(:cmd, 4) { - class ::DFHack::UiHotkey_TCmd < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[-1] = :None ; NUME[:None] = -1 - ENUM[0] = :Zoom ; NUME[:Zoom] = 0 - ENUM[1] = :FollowUnit ; NUME[:FollowUnit] = 1 - ENUM[2] = :FollowItem ; NUME[:FollowItem] = 2 - end - - number 16, true, nil, UiHotkey_TCmd - } - field(:x, 8) { - number 32, true - } - field(:y, 12) { - number 32, true - } - field(:z, 16) { - number 32, true - } - field(:unit_id, 20) { - number 32, true - } - def unit_tg ; df.world.units.all[unit_id] ; end - field(:item_id, 20) { - number 32, true - } - def item_tg ; df.world.items.all[item_id] ; end -end - -class UiLookList < MemHack::Compound - sizeof 12 - - field(:items, 0) { - stl_vector(4) { - pointer { - compound(:UiLookList_TItems) { - sizeof 16 - - field(:type, 0) { - class ::DFHack::UiLookList_TItems_TType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :Item ; NUME[:Item] = 0 - ENUM[1] = :Floor ; NUME[:Floor] = 1 - ENUM[2] = :Unit ; NUME[:Unit] = 2 - ENUM[3] = :Building ; NUME[:Building] = 3 - ENUM[4] = :Vermin ; NUME[:Vermin] = 4 - ENUM[5] = :Flow ; NUME[:Flow] = 5 - ENUM[6] = :Campfire ; NUME[:Campfire] = 6 - ENUM[7] = :Spatter ; NUME[:Spatter] = 7 - end - - number 16, true, nil, UiLookList_TItems_TType - } - field(:spatter_mat_type, 2) { - number 16, true - } - field(:spatter_mat_index, 4) { - number 32, true - } - field(:spatter_mat_state, 8) { - number 16, true, nil, MatterState - } - field(:item, 12) { - pointer { - global :Item - } - } - field(:unit, 12) { - pointer { - global :Unit - } - } - field(:building, 12) { - pointer { - global :Building - } - } - field(:vermin, 12) { - pointer { - global :Vermin - } - } - field(:flow, 12) { - pointer { - global :FlowInfo - } - } - field(:spatter_size, 12) { - number 8, false - } - } - } - } - } -end - -class UiSidebarMenus < MemHack::Compound - sizeof 6208 - - field(:workshop_job, 0) { - compound(:UiSidebarMenus_TWorkshopJob) { - field(:choices_all, 0) { - stl_vector(4) { - pointer { - global :InterfaceButtonBuildingst - } - } - } - field(:choices_visible, 12) { - stl_vector(4) { - pointer { - global :InterfaceButtonBuildingst - } - } - } - field(:cursor, 24) { - number 32, true - } - field(:category_id, 28) { - number 32, true - } - field(:mat_type, 32) { - number 16, true - } - field(:mat_index, 36) { - number 32, true - } - field(:material_category, 40) { - global :JobMaterialCategory - } - } - } - field(:building, 44) { - compound(:UiSidebarMenus_TBuilding) { - field(:choices_all, 0) { - stl_vector(4) { - pointer { - global :InterfaceButtonConstructionst - } - } - } - field(:choices_visible, 12) { - stl_vector(4) { - pointer { - global :InterfaceButtonConstructionst - } - } - } - field(:category_id, 24) { - number 32, true - } - field(:cursor, 28) { - number 32, true - } - } - } - field(:anon_1, 76) { - stl_vector(4) { - pointer { - } - } - } - field(:unk_58, 88) { - number 32, true - } - field(:unk_5c, 92) { - number 32, true - } - field(:unk_60, 96) { - number 32, true - } - field(:unk_64, 100) { - number 32, true - } - field(:unit, 104) { - compound(:UiSidebarMenus_TUnit) { - field(:inv_items, 0) { - stl_vector(4) { - pointer { - global :UnitInventoryItem - } - } - } - field(:inv_spatters, 12) { - stl_vector(4) { - pointer { - global :UnitSpatter - } - } - } - field(:in_new_squad, 24) { - number 8, true, nil, BooleanEnum - } - field(:cursor_uniform, 28) { - number 32, true - } - field(:unk_88n, 32) { - number 32, true - } - field(:squads, 36) { - stl_vector(4) { - pointer { - global :Squad - } - } - } - field(:squad_pos, 48) { - stl_vector(4) { - pointer { - global :EntityPosition - } - } - } - field(:squad_assn, 60) { - stl_vector(4) { - pointer { - global :EntityPositionAssignment - } - } - } - field(:squad_unk1, 72) { - stl_bit_vector - } - field(:squad_unk2, 92) { - stl_vector - } - field(:anon_1, 104) { - pointer { - global :EntityPosition - } - } - field(:anon_2, 108) { - pointer { - global :EntityPositionAssignment - } - } - field(:anon_3, 112) { - pointer { - global :EntityPosition - } - } - field(:in_squad, 116) { - number 16, true - } - field(:anon_4, 118) { - number 16, true - } - field(:anon_5, 120) { - number 16, true - } - field(:anon_6, 122) { - number 16, true - } - field(:unk_80, 124) { - number 32, true - } - field(:unk_84, 128) { - number 32, true - } - field(:unk_88, 132) { - number 32, true - } - field(:unk_8c, 136) { - number 32, true - } - field(:unk_90, 140) { - number 32, true - } - field(:list, 144) { - stl_vector(4) { - number 32, true - } - } - field(:unk_a0, 156) { - number 32, true - } - field(:skills, 160) { - stl_vector(4) { - number 32, true - } - } - field(:show_combat, 172) { - number 8, true, nil, BooleanEnum - } - field(:show_labor, 173) { - number 8, true, nil, BooleanEnum - } - field(:show_misc, 174) { - number 8, true, nil, BooleanEnum - } - } - } - field(:barracks, 280) { - compound(:UiSidebarMenus_TBarracks) { - field(:squad_cursor, 0) { - number 32, true - } - field(:squads, 4) { - stl_vector(4) { - pointer { - global :Squad - } - } - } - field(:uses, 16) { - stl_vector(4) { - global :SquadUseFlags - } - } - field(:in_rename, 28) { - number 8, true, nil, BooleanEnum - } - field(:in_positions, 29) { - number 8, true, nil, BooleanEnum - } - field(:position_squad, 32) { - pointer { - global :Squad - } - } - field(:position_cursor, 36) { - number 32, true - } - field(:in_position_squads, 40) { - number 8, true, nil, BooleanEnum - } - field(:position_squads, 44) { - stl_vector(4) { - pointer { - global :Squad - } - } - } - field(:position_squad_cursor, 56) { - number 32, true - } - } - } - field(:anon_2, 340) { - } - field(:anon_3, 6164) { - stl_string - } - field(:anon_4, 6168) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:unk_17c0, 6180) { - number 32, true - } - field(:unk_17c4, 6184) { - number 32, true - } - field(:unk_17c8, 6188) { - number 32, true - } - field(:anon_5, 6192) { - stl_string - } - field(:unk_17d0, 6196) { - number 32, true - } - field(:unk_17d4, 6200) { - number 32, true - } - field(:unk_17d8, 6204) { - number 32, true - } -end - -class UiUnitViewMode < MemHack::Compound - sizeof 4 - - field(:value, 0) { - class ::DFHack::UiUnitViewMode_TValue < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :General ; NUME[:General] = 0 - ENUM[1] = :Inventory ; NUME[:Inventory] = 1 - ENUM[2] = :Preferences ; NUME[:Preferences] = 2 - ENUM[3] = :Wounds ; NUME[:Wounds] = 3 - ENUM[4] = :PrefLabor ; NUME[:PrefLabor] = 4 - ENUM[5] = :PrefDogs ; NUME[:PrefDogs] = 5 - end - - number 32, true, nil, UiUnitViewMode_TValue - } -end - -class UniformFlags < MemHack::Compound - field(:_whole, 0) { - number 32, false - } - field(:replace_clothing, 0) { bit 0 } - field(:exact_matches, 0) { bit 1 } -end - -class UniformIndivChoice < MemHack::Compound - field(:_whole, 0) { - number 32, true - } - field(:any, 0) { bit 0 } - field(:melee, 0) { bit 1 } - field(:ranged, 0) { bit 2 } -end - -class Unit < MemHack::Compound - sizeof 2224 - - field(:name, 0) { - global :LanguageName - } - field(:custom_profession, 60) { - stl_string - } - field(:profession, 64) { - number 16, true, nil, Profession - } - field(:profession2, 66) { - number 16, true, nil, Profession - } - field(:race, 68) { - number 32, true - } - def race_tg ; df.world.raws.creatures.all[race] ; end - field(:pos, 72) { - global :Coord - } - field(:old_pos, 78) { - global :Coord - } - field(:unknown1, 84) { - compound(:Unit_TUnknown1) { - field(:unk_9c, 0) { - number 32, false - } - field(:unk_a0, 4) { - number 16, true - } - field(:anon_1, 6) { - } - field(:unk_a4a, 8) { - number 16, true - } - field(:unk_a4b, 10) { - number 16, true - } - } - } - field(:path, 96) { - compound(:Unit_TPath) { - field(:dest, 0) { - global :Coord - } - field(:unk_ae, 6) { - number 16, true - } - field(:path, 8) { - global :CoordPath - } - } - } - field(:flags1, 140) { - global :UnitFlags1 - } - field(:flags2, 144) { - global :UnitFlags2 - } - field(:flags3, 148) { - global :UnitFlags3 - } - field(:unknown2, 152) { - compound(:Unit_TUnknown2) { - field(:unk_ec, 0) { - number 8, false - } - field(:unk_f0, 4) { - number 32, true - } - def unk_f0_tg ; df.world.entities.all[unk_f0] ; end - field(:unk_f4, 8) { - number 16, true - } - field(:anon_1, 10) { - } - } - } - field(:caste, 164) { - number 16, true - } - field(:sex, 166) { - number 8, false - } - field(:id, 168) { - number 32, true - } - field(:unk_100, 172) { - number 16, true - } - field(:training_level, 176) { - number 32, true, :WildUntamed, AnimalTrainingLevel - } - field(:unk_104, 180) { - number 32, true - } - field(:civ_id, 184) { - number 32, true - } - def civ_tg ; df.world.entities.all[civ_id] ; end - field(:population_id, 188) { - number 32, true - } - def population_tg ; df.world.entity_populations[population_id] ; end - field(:anon_1, 192) { - number 32, true - } - field(:invasion_id, 196) { - number 32, true - } - def invasion_tg ; df.ui.invasions.list[invasion_id] ; end - field(:unknown3, 200) { - compound(:Unit_TUnknown3) { - field(:unk_path, 0) { - global :CoordPath - } - field(:unk_144, 36) { - number 32, false - } - } - } - field(:specific_refs, 240) { - stl_vector(4) { - pointer { - global :SpecificRef - } - } - } - field(:refs, 252) { - stl_vector(4) { - pointer { - global :GeneralRef - } - } - } - field(:military, 264) { - compound(:Unit_TMilitary) { - field(:squad_index, 0) { - number 32, true - } - def squad_index_tg ; df.world.squads.all[squad_index] ; end - field(:squad_position, 4) { - number 32, true - } - field(:patrol_cooldown, 8) { - number 32, true - } - field(:patrol_timer, 12) { - number 32, true - } - field(:cur_uniform, 16) { - number 16, true - } - field(:uniforms, 20) { - static_array(4, 12) { - stl_vector(4) { - number 32, true - } - } - } - field(:anon_1, 68) { - stl_vector - } - field(:pickup_flags, 80) { - compound(:Unit_TMilitary_TPickupFlags) { - field(:_whole, 0) { - number 32, true - } - field(:update, 0) { bit 0 } - } - } - field(:uniform_pickup, 84) { - stl_vector(4) { - number 32, true - } - } - def uniform_pickup_tg ; uniform_pickup.map { |i| df.world.items.all[i] } ; end - field(:uniform_drop, 96) { - stl_vector(4) { - number 32, true - } - } - def uniform_drop_tg ; uniform_drop.map { |i| df.world.items.all[i] } ; end - field(:individual_drills, 108) { - stl_vector(4) { - number 32, true - } - } - def individual_drills_tg ; individual_drills.map { |i| df.world.activities.all[i] } ; end - } - } - field(:unknown4, 384) { - compound(:Unit_TUnknown4) { - field(:population, 0) { - global :WorldPopulationRef - } - field(:animal_leave_countdown, 24) { - number 32, false - } - field(:unk_20c, 28) { - number 32, false - } - } - } - field(:mood, 416) { - number 16, true, nil, MoodType - } - field(:unk_18e, 418) { - number 16, true - } - field(:relations, 420) { - compound(:Unit_TRelations) { - field(:pregnancy_timer, 0) { - number 32, false - } - field(:pregnancy_ptr, 4) { - pointer { - global :UnitGenes - } - } - field(:pregnancy_mystery, 8) { - number 16, true - } - field(:unk_21c_b, 10) { - number 16, true - } - field(:ghost_info, 12) { - pointer { - global :UnitGhostInfo - } - } - field(:anon_1, 16) { - number 32, true - } - field(:birth_year, 20) { - number 32, true - } - field(:birth_time, 24) { - number 32, true - } - field(:curse_year, 28) { - number 32, true - } - field(:curse_time, 32) { - number 32, true - } - field(:anon_2, 36) { - number 32, true - } - field(:anon_3, 40) { - number 32, true - } - field(:old_year, 44) { - number 32, true - } - field(:old_time, 48) { - number 32, true - } - field(:following, 52) { - pointer { - global :Unit - } - } - field(:unk_238, 56) { - number 16, false - } - field(:pet_owner_id, 60) { - number 32, true - } - def pet_owner_tg ; df.world.units.all[pet_owner_id] ; end - field(:spouse_id, 64) { - number 32, true - } - def spouse_tg ; df.world.units.all[spouse_id] ; end - field(:mother_id, 68) { - number 32, true - } - def mother_tg ; df.world.units.all[mother_id] ; end - field(:father_id, 72) { - number 32, true - } - def father_tg ; df.world.units.all[father_id] ; end - field(:last_attacker_id, 76) { - number 32, true - } - def last_attacker_tg ; df.world.units.all[last_attacker_id] ; end - field(:group_leader_id, 80) { - number 32, true - } - def group_leader_tg ; df.world.units.all[group_leader_id] ; end - field(:draggee_id, 84) { - number 32, true - } - def draggee_tg ; df.world.units.all[draggee_id] ; end - field(:dragger_id, 88) { - number 32, true - } - def dragger_tg ; df.world.units.all[dragger_id] ; end - field(:rider_mount_id, 92) { - number 32, true - } - def rider_mount_tg ; df.world.units.all[rider_mount_id] ; end - field(:lover_id, 96) { - number 32, true - } - def lover_tg ; df.world.units.all[lover_id] ; end - field(:unk_264, 100) { - number 16, true - } - } - } - field(:last_hit, 524) { - global :HistoryHitItem - } - field(:riding_item_id, 556) { - number 32, true - } - def riding_item_tg ; df.world.items.all[riding_item_id] ; end - field(:inventory, 560) { - stl_vector(4) { - pointer { - global :UnitInventoryItem - } - } - } - field(:owned_items, 572) { - stl_vector(4) { - number 32, true - } - } - def owned_items_tg ; owned_items.map { |i| df.world.items.all[i] } ; end - field(:traded_items, 584) { - stl_vector(4) { - number 32, true - } - } - def traded_items_tg ; traded_items.map { |i| df.world.items.all[i] } ; end - field(:owned_buildings, 596) { - stl_vector(4) { - pointer { - global :Building - } - } - } - field(:corpse_parts, 608) { - stl_vector(4) { - number 32, true - } - } - def corpse_parts_tg ; corpse_parts.map { |i| df.world.items.all[i] } ; end - field(:job, 620) { - compound(:Unit_TJob) { - field(:unk_2d8, 0) { - number 32, false - } - field(:unk_2dc, 4) { - number 32, false - } - field(:hunt_target, 8) { - pointer { - global :Unit - } - } - field(:destroy_target, 12) { - pointer { - global :Building - } - } - field(:unk_2e8, 16) { - number 16, true - } - field(:unk_2ea, 18) { - number 16, true - } - field(:unk_2ec, 20) { - number 16, false - } - field(:unk_2ee, 22) { - number 16, false - } - field(:unk_2f0_cntr, 24) { - number 16, false - } - field(:current_job, 28) { - pointer { - global :Job - } - } - field(:mood_skill, 32) { - number 16, true, nil, JobSkill - } - field(:unk_2fc, 36) { - number 32, false - } - field(:unk_300, 40) { - number 32, false - } - field(:unk_304, 44) { - number 32, false - } - } - } - field(:body, 668) { - compound(:Unit_TBody) { - field(:components, 0) { - global :BodyComponentInfo - } - field(:wounds, 96) { - stl_vector(4) { - pointer { - global :UnitWound - } - } - } - field(:wound_next_id, 108) { - number 32, true - } - field(:unk_39c, 112) { - static_array(10, 4) { - number 32, true - } - } - field(:body_plan, 152) { - pointer { - global :CasteBodyInfo - } - } - field(:unk_3c8, 156) { - number 16, false - } - field(:physical_attrs, 160) { - static_array(6, 28, PhysicalAttributeType) { - global :UnitAttribute - } - } - field(:physical_attr_unk3, 328) { - static_array(6, 4, PhysicalAttributeType) { - number 32, true - } - } - field(:blood_max, 352) { - number 32, false - } - field(:blood_count, 356) { - number 32, false - } - field(:unk_494, 360) { - number 32, false - } - field(:spatters, 364) { - stl_vector(4) { - pointer { - global :UnitSpatter - } - } - } - field(:body_app_modifiers, 376) { - stl_vector(4) { - number 32, false - } - } - field(:unk_4b8, 388) { - stl_vector(4) { - number 32, false - } - } - field(:unk_4c8, 400) { - number 32, false - } - } - } - field(:appearance, 1072) { - compound(:Unit_TAppearance) { - field(:unk_4cc, 0) { - stl_vector(2) { - number 16, true - } - } - field(:unk_4dc, 12) { - stl_vector(4) { - number 32, true - } - } - field(:unk_4ec, 24) { - stl_vector(4) { - number 32, true - } - } - field(:unk_4fc, 36) { - stl_vector(4) { - number 32, true - } - } - field(:unk_50c, 48) { - stl_vector(4) { - number 32, true - } - } - field(:genes, 60) { - global :UnitGenes - } - field(:colors, 76) { - stl_vector(4) { - number 32, true - } - } - } - } - field(:counters, 1160) { - compound(:Unit_TCounters) { - field(:think_counter, 0) { - number 32, true - } - field(:job_counter, 4) { - number 32, true - } - field(:unk_544, 8) { - number 32, true - } - field(:unk_548, 12) { - number 16, true - } - field(:death_id, 16) { - number 32, true - } - def death_tg ; df.world.deaths.all[death_id] ; end - field(:winded, 20) { - number 16, true - } - field(:stunned, 22) { - number 16, true - } - field(:unconscious, 24) { - number 16, true - } - field(:unk_550, 26) { - number 16, true - } - field(:webbed, 28) { - number 16, true - } - field(:unk_554, 30) { - global :Coord - } - field(:unk_55a, 36) { - global :Coord - } - field(:soldier_mood_countdown, 42) { - number 16, true - } - field(:soldier_mood, 44) { - class ::DFHack::Unit_TCounters_TSoldierMood < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[-1] = :None ; NUME[:None] = -1 - ENUM[0] = :MartialTrance ; NUME[:MartialTrance] = 0 - ENUM[1] = :Enranged ; NUME[:Enranged] = 1 - ENUM[2] = :Tantrum ; NUME[:Tantrum] = 2 - end - - number 16, true, nil, Unit_TCounters_TSoldierMood - } - field(:pain, 48) { - number 32, false - } - field(:nausea, 52) { - number 32, false - } - field(:dizziness, 56) { - number 32, false - } - } - } - field(:curse, 1220) { - compound(:Unit_TCurse) { - field(:add_tags1, 0) { - global :CieAddTagMask1 - } - field(:rem_tags1, 4) { - global :CieAddTagMask1 - } - field(:add_tags2, 8) { - global :CieAddTagMask2 - } - field(:rem_tags2, 12) { - global :CieAddTagMask2 - } - field(:name_visible, 16) { - number 8, true, nil, BooleanEnum - } - field(:name, 20) { - stl_string - } - field(:name_plural, 24) { - stl_string - } - field(:name_adjective, 28) { - stl_string - } - field(:sym_and_color1, 32) { - number 32, false - } - field(:sym_and_color2, 36) { - number 32, false - } - field(:flash_period, 40) { - number 32, false - } - field(:flash_time2, 44) { - number 32, false - } - field(:anon_1, 48) { - stl_vector - } - field(:appearance_change, 60) { - stl_vector(4) { - number 32, true - } - } - field(:anon_2, 72) { - number 32, false - } - field(:anon_3, 76) { - number 32, false - } - field(:attr_change, 80) { - pointer { - compound(:Unit_TCurse_TAttrChange) { - sizeof 152 - - field(:phys_att_perc, 0) { - static_array(6, 4, PhysicalAttributeType) { - number 32, true - } - } - field(:phys_att_unk, 24) { - static_array(6, 4, PhysicalAttributeType) { - number 32, true - } - } - field(:ment_att_perc, 48) { - static_array(13, 4, MentalAttributeType) { - number 32, true - } - } - field(:ment_att_unk, 100) { - static_array(13, 4, MentalAttributeType) { - number 32, true - } - } - } - } - } - field(:anon_4, 84) { - number 32, false - } - field(:anon_5, 88) { - stl_vector - } - field(:anon_6, 100) { - stl_vector - } - field(:anon_7, 112) { - stl_vector - } - field(:time_on_site, 124) { - number 32, true - } - field(:anon_8, 128) { - stl_vector(4) { - number 32, true - } - } - field(:anon_9, 140) { - stl_vector(4) { - number 32, true - } - } - } - } - field(:counters2, 1372) { - compound(:Unit_TCounters2) { - field(:paralysis, 0) { - number 32, false - } - field(:numbness, 4) { - number 32, false - } - field(:fever, 8) { - number 32, false - } - field(:exhaustion, 12) { - number 32, false - } - field(:hunger_timer, 16) { - number 32, false - } - field(:thirst_timer, 20) { - number 32, false - } - field(:sleepiness_timer, 24) { - number 32, false - } - field(:stomach_content, 28) { - number 32, false - } - field(:stomach_food, 32) { - number 32, false - } - field(:vomit_timeout, 36) { - number 32, false - } - field(:stored_fat, 40) { - number 32, false - } - field(:unk_59c, 44) { - number 32, false - } - } - } - field(:status, 1420) { - compound(:Unit_TStatus) { - field(:misc_traits, 0) { - stl_vector(4) { - pointer { - global :UnitMiscTrait - } - } - } - field(:eat_history, 12) { - pointer { - compound(:Unit_TStatus_TEatHistory) { - sizeof 144 - - field(:food, 0) { - compound(:Unit_TStatus_TEatHistory_TFood) { - field(:item_type, 0) { - stl_vector(2) { - number 16, true, nil, ItemType - } - } - field(:item_subtype, 12) { - stl_vector(2) { - number 16, true - } - } - field(:material, 24) { - global :MaterialVecRef - } - field(:year, 48) { - stl_vector(4) { - number 32, true - } - } - field(:year_time, 60) { - stl_vector(4) { - number 32, true - } - } - } - } - field(:drink, 72) { - compound(:Unit_TStatus_TEatHistory_TDrink) { - field(:item_type, 0) { - stl_vector(2) { - number 16, true, nil, ItemType - } - } - field(:item_subtype, 12) { - stl_vector(2) { - number 16, true - } - } - field(:material, 24) { - global :MaterialVecRef - } - field(:year, 48) { - stl_vector(4) { - number 32, true - } - } - field(:year_time, 60) { - stl_vector(4) { - number 32, true - } - } - } - } - } - } - } - field(:unk_5b4, 16) { - number 32, false - } - field(:unk_5b8, 20) { - number 32, false - } - field(:attacker_ids, 24) { - stl_vector(4) { - number 32, true - } - } - def attacker_tgs ; attacker_ids.map { |i| df.world.units.all[i] } ; end - field(:attacker_unk, 36) { - stl_vector(2) { - number 16, true - } - } - field(:unk_5dc, 48) { - number 8, false - } - field(:artifact_name, 52) { - global :LanguageName - } - field(:souls, 112) { - stl_vector(4) { - pointer { - global :UnitSoul - } - } - } - field(:current_soul, 124) { - pointer { - global :UnitSoul - } - } - field(:demands, 128) { - stl_vector(4) { - pointer { - global :UnitDemand - } - } - } - field(:labors, 140) { - static_array(94, 1, UnitLabor) { - number 8, true, nil, BooleanEnum - } - } - field(:wrestle_items, 236) { - stl_vector(4) { - pointer { - global :UnitItemWrestle - } - } - } - field(:unk_6e0, 248) { - stl_vector(4) { - number 32, true - } - } - field(:recent_events, 260) { - stl_vector(4) { - pointer { - global :UnitThought - } - } - } - field(:unk_700, 272) { - stl_vector - } - field(:happiness, 284) { - number 32, false - } - field(:unk_714, 288) { - number 16, false - } - field(:unk_718, 292) { - stl_vector - } - field(:unk_728, 304) { - stl_vector - } - field(:acquintances, 316) { - stl_vector(4) { - pointer { - compound(:Unit_TStatus_TAcquintances) { - sizeof 16 - - field(:unit_id, 0) { - number 32, true - } - def unit_tg ; df.world.units.all[unit_id] ; end - field(:acquintance_level, 4) { - number 32, true - } - field(:timer, 8) { - number 32, true - } - field(:is_friend, 12) { - number 32, true - } - } - } - } - } - field(:unk_748, 328) { - stl_vector - } - field(:unk_758, 340) { - number 16, false - } - field(:unk_75a, 342) { - global :Coord - } - field(:unk_760, 348) { - global :CoordPath - } - } - } - field(:hist_figure_id, 1804) { - number 32, true - } - def hist_figure_tg ; df.world.history.figures[hist_figure_id] ; end - field(:hist_figure_id2, 1808) { - number 32, true - } - def hist_figure_tg2 ; df.world.history.figures[hist_figure_id2] ; end - field(:status2, 1812) { - compound(:Unit_TStatus2) { - field(:able_stand, 0) { - number 16, false - } - field(:able_stand_impair, 2) { - number 16, false - } - field(:able_grasp, 4) { - number 16, false - } - field(:able_grasp_impair, 6) { - number 16, false - } - field(:unk_7a0, 8) { - number 32, false - } - field(:body_part_temperature, 12) { - stl_vector(4) { - pointer { - compound(:Unit_TStatus2_TBodyPartTemperature) { - sizeof 4 - - field(:whole, 0) { - number 16, false - } - field(:fraction, 2) { - number 16, false - } - } - } - } - } - field(:unk_7b4, 24) { - number 32, false - } - field(:unk_7b8, 28) { - number 32, false - } - field(:unk_7bc, 32) { - number 8, false - } - field(:unk_7c0, 36) { - number 32, true - } - } - } - field(:unknown7, 1852) { - compound(:Unit_TUnknown7) { - field(:unk_7c4, 0) { - stl_vector - } - field(:anon_1, 12) { - stl_vector - } - } - } - field(:syndromes, 1876) { - compound(:Unit_TSyndromes) { - field(:active, 0) { - stl_vector(4) { - pointer { - global :UnitSyndrome - } - } - } - field(:unk_7d4, 12) { - stl_vector(4) { - number 32, true - } - } - def unk_7d4_tg ; unk_7d4.map { |i| df.world.raws.syndromes.all[i] } ; end - field(:unk_7e4, 24) { - stl_vector(2) { - number 16, true - } - } - } - } - field(:reports, 1912) { - compound(:Unit_TReports) { - field(:combat_log, 0) { - stl_vector(4) { - number 32, true - } - } - def combat_log_tg ; combat_log.map { |i| df.world.status.reports[i] } ; end - field(:sparring_log, 12) { - stl_vector(4) { - number 32, true - } - } - def sparring_log_tg ; sparring_log.map { |i| df.world.status.reports[i] } ; end - field(:unk_log, 24) { - stl_vector(4) { - number 32, true - } - } - def unk_log_tg ; unk_log.map { |i| df.world.status.reports[i] } ; end - field(:last_combat_year, 36) { - number 32, false - } - field(:last_sparring_year, 40) { - number 32, false - } - field(:last_unk_year, 44) { - number 32, false - } - field(:last_combat_time, 48) { - number 32, false - } - field(:last_sparring_time, 52) { - number 32, false - } - field(:last_unk_time, 56) { - number 32, false - } - } - } - field(:health, 1972) { - pointer { - global :UnitHealthInfo - } - } - field(:used_items, 1976) { - stl_vector(4) { - pointer { - global :UnitItemUse - } - } - } - field(:adventurer_knows, 1988) { - stl_vector(4) { - number 32, true - } - } - def adventurer_knows_tg ; adventurer_knows.map { |i| df.world.units.all[i] } ; end - field(:unknown8, 2000) { - compound(:Unit_TUnknown8) { - field(:unk1, 0) { - stl_vector - } - field(:unk2, 12) { - pointer { - } - } - field(:were_race, 16) { - number 32, true - } - def were_race_tg ; df.world.raws.creatures.all[were_race] ; end - field(:were_caste, 20) { - number 32, true - } - field(:normal_race, 24) { - number 32, true - } - def normal_race_tg ; df.world.raws.creatures.all[normal_race] ; end - field(:normal_caste, 28) { - number 32, true - } - field(:unk3, 32) { - number 32, true, -1 - } - field(:unk_850, 36) { - stl_vector - } - field(:unk_860, 48) { - stl_vector(4) { - number 32, true - } - } - field(:enemy_status_slot, 60) { - number 32, true - } - field(:unk_874_cntr, 64) { - number 32, true - } - field(:body_part_878, 68) { - stl_vector(1) { - number 8, false - } - } - field(:body_part_888, 80) { - stl_vector(1) { - number 8, false - } - } - field(:body_part_898, 92) { - stl_vector(4) { - number 32, false - } - } - field(:body_part_8a8, 104) { - stl_vector(1) { - number 8, false - } - } - field(:body_part_base_ins, 116) { - stl_vector(2) { - number 16, false - } - } - field(:body_part_clothing_ins, 128) { - stl_vector(2) { - number 16, false - } - } - field(:body_part_8d8, 140) { - stl_vector(2) { - number 16, false - } - } - field(:unk_8e8, 152) { - stl_vector - } - field(:unk_8f8, 164) { - stl_vector(2) { - number 16, false - } - } - field(:body_layer_908, 176) { - stl_vector(4) { - number 32, false - } - } - field(:unk_918, 188) { - number 32, true - } - field(:unk_91c, 192) { - number 32, true - } - field(:unk_920, 196) { - number 32, true - } - field(:unk_924, 200) { - number 32, false - } - field(:unk_928, 204) { - number 32, false - } - } - } - field(:burrows, 2208) { - stl_vector(4) { - number 32, true - } - } - def burrows_tg ; burrows.map { |i| df.ui.burrows.list[i] } ; end - field(:combat_side_id, 2220) { - number 32, true - } -end - -class UnitAttribute < MemHack::Compound - sizeof 28 - - field(:value, 0) { - number 32, true - } - field(:max_value, 4) { - number 32, true - } - field(:improve_counter, 8) { - number 32, true - } - field(:unused_counter, 12) { - number 32, true - } - field(:soft_demotion, 16) { - number 32, true - } - field(:rust_counter, 20) { - number 32, true - } - field(:demotion_counter, 24) { - number 32, true - } -end - -class UnitDemand < MemHack::Compound - sizeof 24 - - field(:unk_0, 0) { - number 16, true - } - field(:place, 2) { - class ::DFHack::UnitDemand_TPlace < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :Office ; NUME[:Office] = 0 - ENUM[1] = :Bedroom ; NUME[:Bedroom] = 1 - ENUM[2] = :DiningRoom ; NUME[:DiningRoom] = 2 - ENUM[3] = :Tomb ; NUME[:Tomb] = 3 - end - - number 16, true, nil, UnitDemand_TPlace - } - field(:item_type, 4) { - number 16, true, nil, ItemType - } - field(:item_subtype, 6) { - number 16, true - } - field(:mat_type, 8) { - number 16, true - } - field(:mat_index, 12) { - number 32, true, -1 - } - field(:timeout_counter, 16) { - number 32, true - } - field(:timeout_limit, 20) { - number 32, true - } -end - -class UnitFlags1 < MemHack::Compound - field(:_whole, 0) { - number 32, false - } - field(:move_state, 0) { bit 0 } - field(:dead, 0) { bit 1 } - field(:has_mood, 0) { bit 2 } - field(:had_mood, 0) { bit 3 } - field(:marauder, 0) { bit 4 } - field(:drowning, 0) { bit 5 } - field(:merchant, 0) { bit 6 } - field(:forest, 0) { bit 7 } - field(:left, 0) { bit 8 } - field(:rider, 0) { bit 9 } - field(:incoming, 0) { bit 10 } - field(:diplomat, 0) { bit 11 } - field(:zombie, 0) { bit 12 } - field(:skeleton, 0) { bit 13 } - field(:can_swap, 0) { bit 14 } - field(:on_ground, 0) { bit 15 } - field(:projectile, 0) { bit 16 } - field(:active_invader, 0) { bit 17 } - field(:hidden_in_ambush, 0) { bit 18 } - field(:invader_origin, 0) { bit 19 } - field(:coward, 0) { bit 20 } - field(:hidden_ambusher, 0) { bit 21 } - field(:invades, 0) { bit 22 } - field(:check_flows, 0) { bit 23 } - field(:ridden, 0) { bit 24 } - field(:caged, 0) { bit 25 } - field(:tame, 0) { bit 26 } - field(:chained, 0) { bit 27 } - field(:royal_guard, 0) { bit 28 } - field(:fortress_guard, 0) { bit 29 } - field(:suppress_wield, 0) { bit 30 } - field(:important_historical_figure, 0) { bit 31 } -end - -class UnitFlags2 < MemHack::Compound - field(:_whole, 0) { - number 32, false - } - field(:swimming, 0) { bit 0 } - field(:sparring, 0) { bit 1 } - field(:no_notify, 0) { bit 2 } - field(:unused, 0) { bit 3 } - field(:calculated_nerves, 0) { bit 4 } - field(:calculated_bodyparts, 0) { bit 5 } - field(:important_historical_figure, 0) { bit 6 } - field(:killed, 0) { bit 7 } - field(:cleanup_1, 0) { bit 8 } - field(:cleanup_2, 0) { bit 9 } - field(:cleanup_3, 0) { bit 10 } - field(:for_trade, 0) { bit 11 } - field(:trade_resolved, 0) { bit 12 } - field(:has_breaks, 0) { bit 13 } - field(:gutted, 0) { bit 14 } - field(:circulatory_spray, 0) { bit 15 } - field(:locked_in_for_trading, 0) { bit 16 } - field(:slaughter, 0) { bit 17 } - field(:underworld, 0) { bit 18 } - field(:resident, 0) { bit 19 } - field(:cleanup_4, 0) { bit 20 } - field(:calculated_insulation, 0) { bit 21 } - field(:visitor_uninvited, 0) { bit 22 } - field(:visitor, 0) { bit 23 } - field(:calculated_inventory, 0) { bit 24 } - field(:vision_good, 0) { bit 25 } - field(:vision_damaged, 0) { bit 26 } - field(:vision_missing, 0) { bit 27 } - field(:breathing_good, 0) { bit 28 } - field(:breathing_problem, 0) { bit 29 } - field(:roaming_wilderness_population_source, 0) { bit 30 } - field(:roaming_wilderness_population_source_not_a_map_feature, 0) { bit 31 } -end - -class UnitFlags3 < MemHack::Compound - field(:_whole, 0) { - number 32, false - } - field(:unk0, 0) { bit 0 } - field(:unk1, 0) { bit 1 } - field(:unk2, 0) { bit 2 } - field(:unk3, 0) { bit 3 } - field(:announce_titan, 0) { bit 4 } - field(:unk5, 0) { bit 5 } - field(:unk6, 0) { bit 6 } - field(:unk7, 0) { bit 7 } - field(:body_temp_in_range, 0) { bit 8 } - field(:wait_until_reveal, 0) { bit 9 } - field(:scuttle, 0) { bit 10 } - field(:unk11, 0) { bit 11 } - field(:ghostly, 0) { bit 12 } - field(:unk13, 0) { bit 13 } - field(:unk14, 0) { bit 14 } - field(:unk15, 0) { bit 15 } - field(:unk16, 0) { bit 16 } -end - -class UnitGenes < MemHack::Compound - sizeof 16 - - field(:appearance, 0) { - df_array(1) { - number 8, false - } - } - field(:colors, 8) { - df_array(2) { - number 16, true - } - } -end - -class UnitGhostInfo < MemHack::Compound - sizeof 44 - - field(:type, 0) { - number 16, true, nil, GhostType - } - field(:unk_2, 2) { - number 16, true - } - field(:unk_4, 4) { - number 16, true - } - field(:unk_8, 8) { - number 32, true - } - field(:unk_pos, 12) { - global :Coord - } - field(:unk_14, 20) { - number 32, true - } - field(:unk_18, 24) { - number 32, true - } - field(:unk_1c, 28) { - number 32, true - } - field(:unk_20, 32) { - number 32, true - } - field(:unk_24, 36) { - number 32, true - } - field(:unk_28, 40) { - number 32, true - } -end - -class UnitHealthInfo < MemHack::Compound - sizeof 56 - - field(:unit_id, 0) { - number 32, true - } - def unit_tg ; df.world.units.all[unit_id] ; end - field(:unk_4, 4) { - number 32, true - } - field(:body_part_8, 8) { - stl_vector(4) { - number 32, true - } - } - field(:unk_18, 20) { - number 32, true - } - field(:unk_1c, 24) { - number 32, true - } - field(:unk_20, 28) { - number 16, true - } - field(:op_history, 32) { - stl_vector(4) { - pointer { - compound(:UnitHealthInfo_TOpHistory) { - sizeof 36 - - field(:job_type, 0) { - number 16, true, nil, JobType - } - field(:info, 4) { - compound(:UnitHealthInfo_TOpHistory_TInfo) { - field(:crutch, 0) { - compound(:UnitHealthInfo_TOpHistory_TInfo_TCrutch) { - field(:item_type, 0) { - number 32, true - } - field(:item_subtype, 4) { - number 32, true, -1 - } - field(:mat_type, 8) { - number 32, true - } - field(:mat_index, 12) { - number 32, true, -1 - } - field(:item_id, 16) { - number 32, true - } - def item_tg ; df.world.items.all[item_id] ; end - } - } - field(:bed_id, 0) { - number 32, true - } - def bed_tg ; df.world.buildings.all[bed_id] ; end - field(:bandage, 0) { - compound(:UnitHealthInfo_TOpHistory_TInfo_TBandage) { - field(:mat_type, 0) { - number 32, true - } - field(:mat_index, 4) { - number 32, true, -1 - } - field(:body_part_id, 8) { - number 32, true, -1 - } - field(:item_id, 12) { - number 32, true - } - def item_tg ; df.world.items.all[item_id] ; end - } - } - } - } - field(:year, 24) { - number 32, true - } - field(:year_time, 28) { - number 32, true - } - field(:doctor_id, 32) { - number 32, true - } - def doctor_tg ; df.world.units.all[doctor_id] ; end - } - } - } - } - field(:unk_34, 44) { - stl_vector - } -end - -class UnitInventoryItem < MemHack::Compound - sizeof 16 - - field(:item, 0) { - pointer { - global :Item - } - } - field(:mode, 4) { - class ::DFHack::UnitInventoryItem_TMode < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :Carried ; NUME[:Carried] = 0 - ENUM[1] = :Weapon ; NUME[:Weapon] = 1 - ENUM[2] = :Worn ; NUME[:Worn] = 2 - ENUM[3] = :InBody ; NUME[:InBody] = 3 - ENUM[4] = :Flask ; NUME[:Flask] = 4 - ENUM[5] = :WrappedAround ; NUME[:WrappedAround] = 5 - ENUM[6] = :StuckIn ; NUME[:StuckIn] = 6 - ENUM[7] = :Unk7 ; NUME[:Unk7] = 7 - ENUM[8] = :Shouldered ; NUME[:Shouldered] = 8 - ENUM[9] = :SewnInto ; NUME[:SewnInto] = 9 - end - - number 16, true, nil, UnitInventoryItem_TMode - } - field(:body_part_id, 6) { - number 16, true - } - field(:anon_1, 8) { - number 32, true - } - field(:anon_2, 12) { - number 32, true, -1 - } -end - -class UnitItemUse < MemHack::Compound - sizeof 16 - - field(:id, 0) { - number 32, true - } - def id_tg ; df.world.items.all[id] ; end - field(:time_in_use, 4) { - number 32, true - } - field(:has_grown_attached, 8) { - number 32, true - } - field(:affection_level, 12) { - number 32, true - } -end - -class UnitItemWrestle < MemHack::Compound - sizeof 28 - - field(:anon_1, 0) { - } - field(:item1, 20) { - number 32, true - } - def item1_tg ; df.world.items.all[item1] ; end - field(:item2, 24) { - number 32, true - } - def item2_tg ; df.world.items.all[item2] ; end -end - -class UnitMiscTrait < MemHack::Compound - sizeof 8 - - field(:id, 0) { - number 16, true, nil, MiscTraitType - } - field(:value, 4) { - number 32, true - } -end - -class UnitPreference < MemHack::Compound - sizeof 20 - - field(:type, 0) { - class ::DFHack::UnitPreference_TType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :LikeMaterial ; NUME[:LikeMaterial] = 0 - ENUM[1] = :LikeCreature ; NUME[:LikeCreature] = 1 - ENUM[2] = :LikeFood ; NUME[:LikeFood] = 2 - ENUM[3] = :HateCreature ; NUME[:HateCreature] = 3 - ENUM[4] = :LikeItem ; NUME[:LikeItem] = 4 - ENUM[5] = :LikePlant ; NUME[:LikePlant] = 5 - ENUM[6] = :LikeTree ; NUME[:LikeTree] = 6 - ENUM[7] = :LikeColor ; NUME[:LikeColor] = 7 - ENUM[8] = :LikeShape ; NUME[:LikeShape] = 8 - end - - number 16, true, nil, UnitPreference_TType - } - field(:item_type, 2) { - number 16, true, nil, ItemType - } - field(:creature_id, 2) { - number 16, true - } - def creature_tg ; df.world.raws.creatures.all[creature_id] ; end - field(:color_id, 2) { - number 16, true - } - def color_tg ; df.world.raws.language.colors[color_id] ; end - field(:shape_id, 2) { - number 16, true - } - def shape_tg ; df.world.raws.language.shapes[shape_id] ; end - field(:plant_id, 2) { - number 16, true - } - def plant_tg ; df.world.raws.plants.all[plant_id] ; end - field(:item_subtype, 4) { - number 16, true - } - field(:mattype, 6) { - number 16, true - } - field(:matindex, 8) { - number 32, true - } - field(:active, 12) { - number 8, true, nil, BooleanEnum - } - field(:unk, 16) { - number 32, false - } -end - -class UnitSkill < MemHack::Compound - sizeof 32 - - field(:id, 0) { - number 16, true, nil, JobSkill - } - field(:rating, 4) { - number 32, true - } - field(:experience, 8) { - number 32, false - } - field(:unk_c, 12) { - number 32, true - } - field(:rusty, 16) { - number 32, true - } - field(:unk_14, 20) { - number 32, true - } - field(:unk_18, 24) { - number 32, true - } - field(:unk_1c, 28) { - number 32, true - } -end - -class UnitSoul < MemHack::Compound - sizeof 576 - - field(:unit_id, 0) { - number 32, true - } - def unit_tg ; df.world.units.all[unit_id] ; end - field(:name, 4) { - global :LanguageName - } - field(:race, 64) { - number 32, false - } - def race_tg ; df.world.raws.creatures.all[race] ; end - field(:sex, 68) { - number 8, false - } - field(:caste, 70) { - number 16, false - } - field(:unk1, 72) { - number 32, true - } - field(:unk2, 76) { - number 32, true - } - field(:unk3, 80) { - number 32, true - } - field(:unk4, 84) { - number 32, true - } - field(:anon_1, 88) { - number 32, true - } - field(:anon_2, 92) { - number 32, true - } - field(:anon_3, 96) { - number 32, true - } - field(:anon_4, 100) { - number 32, true - } - field(:mental_attrs, 104) { - static_array(13, 28, MentalAttributeType) { - global :UnitAttribute - } - } - field(:skills, 468) { - stl_vector(4) { - pointer { - global :UnitSkill - } - } - } - field(:preferences, 480) { - stl_vector(4) { - pointer { - global :UnitPreference - } - } - } - field(:traits, 492) { - static_array(30, 2, PersonalityFacetType) { - number 16, false - } - } - field(:unk5, 552) { - stl_vector(4) { - pointer { - compound(:UnitSoul_TUnk5) { - sizeof 4 - - field(:unk1, 0) { - number 16, true - } - field(:unk2, 2) { - number 16, true - } - } - } - } - } - field(:unk6, 564) { - stl_vector - } -end - -class UnitSpatter < MemHack::Compound - sizeof 24 - - field(:mat_type, 0) { - number 16, true - } - field(:mat_index, 4) { - number 32, true, -1 - } - field(:mat_state, 8) { - number 16, true, nil, MatterState - } - field(:temperature, 10) { - number 16, false - } - field(:temperature_fraction, 12) { - number 16, false - } - field(:size, 16) { - number 32, true - } - field(:body_part_id, 20) { - number 16, true - } - field(:unk_16, 22) { - number 16, true - } -end - -class UnitSyndrome < MemHack::Compound - sizeof 64 - - field(:type, 0) { - number 32, true - } - def type_tg ; df.world.raws.syndromes.all[type] ; end - field(:year, 4) { - number 32, true - } - field(:year_time, 8) { - number 32, true - } - field(:ticks, 12) { - number 32, true - } - field(:anon_1, 16) { - stl_vector(4) { - number 32, true - } - } - field(:unk1, 28) { - number 32, true - } - field(:symptoms, 32) { - stl_vector(4) { - pointer { - compound(:UnitSyndrome_TSymptoms) { - sizeof 76 - - field(:unk1, 0) { - number 32, true - } - field(:unk2, 4) { - number 32, true - } - field(:ticks, 8) { - number 32, true - } - field(:target_bp, 12) { - stl_vector(2) { - number 16, true - } - } - field(:target_layer, 24) { - stl_vector(2) { - number 16, true - } - } - field(:target_unk1, 36) { - stl_vector(4) { - number 32, true - } - } - field(:target_unk2, 48) { - stl_vector(4) { - number 32, true - } - } - field(:target_ticks, 60) { - stl_vector(4) { - number 32, true - } - } - field(:flags, 72) { - number 32, false - } - } - } - } - } - field(:unk2, 44) { - number 16, true - } - field(:unk3, 48) { - number 32, true - } - field(:unk4, 52) { - stl_vector(4) { - number 32, true - } - } -end - -class UnitThought < MemHack::Compound - sizeof 16 - - field(:type, 0) { - number 16, true, nil, UnitThoughtType - } - field(:age, 4) { - number 32, true - } - field(:subtype, 8) { - number 32, true, -1 - } - field(:severity, 12) { - number 32, true - } -end - -class UnitWound < MemHack::Compound - sizeof 64 - - field(:id, 0) { - number 32, true - } - field(:parts, 4) { - stl_vector(4) { - pointer { - compound(:UnitWound_TParts) { - sizeof 108 - - field(:unk_0, 0) { - number 32, true - } - field(:body_part_id, 4) { - number 16, true - } - field(:layer_idx, 6) { - number 16, true - } - field(:unk_8, 8) { - number 32, true - } - field(:unk_c, 12) { - number 16, true - } - field(:unk_10, 16) { - number 32, true - } - field(:unk_14, 20) { - stl_vector(2) { - number 16, true - } - } - field(:unk_24, 32) { - stl_vector(2) { - number 16, true - } - } - field(:unk_34, 44) { - stl_vector(2) { - number 16, true - } - } - field(:unk_44, 56) { - number 16, true - } - field(:unk_48, 60) { - number 32, true - } - field(:unk_4c, 64) { - number 32, true - } - field(:unk_50, 68) { - number 32, true - } - field(:unk_54, 72) { - number 32, true - } - field(:unk_58, 76) { - number 32, true - } - field(:unk_5c, 80) { - number 32, true - } - field(:unk_60, 84) { - number 32, true - } - field(:unk_64, 88) { - number 32, true - } - field(:unk_68, 92) { - number 32, true - } - field(:unk_6c, 96) { - number 32, true - } - field(:unk_70, 100) { - number 16, true - } - field(:unk_72, 102) { - number 16, true - } - field(:unk_74, 104) { - number 32, true - } - } - } - } - } - field(:unk_14, 16) { - number 32, true - } - field(:unk_18, 20) { - number 32, true - } - field(:unk_1c, 24) { - number 32, true - } - field(:unk_20, 28) { - number 32, true - } - field(:unk_24, 32) { - number 32, true - } - field(:unk_28, 36) { - number 32, true - } - field(:unk_2c, 40) { - number 32, true - } - field(:unk_30, 44) { - number 32, true - } - field(:unk_34, 48) { - number 32, true - } - field(:unk_38, 52) { - number 32, true - } - field(:unk_3c, 56) { - number 32, true - } - field(:unk_40, 60) { - pointer { - } - } -end - -class Vehicle < MemHack::Compound - sizeof 64 - - field(:id, 0) { - number 32, true - } - field(:item_id, 4) { - number 32, true - } - def item_tg ; df.world.items.all[item_id] ; end - field(:offset_x, 8) { - number 32, true - } - field(:offset_y, 12) { - number 32, true - } - field(:offset_z, 16) { - number 32, true - } - field(:speed_x, 20) { - number 32, true - } - field(:speed_y, 24) { - number 32, true - } - field(:speed_z, 28) { - number 32, true - } - field(:anon_1, 32) { - } - field(:route_id, 48) { - number 32, true - } - def route_tg ; df.ui.hauling.routes[route_id] ; end - field(:pos, 52) { - global :Coord - } - field(:time_stopped, 60) { - number 32, true - } -end - -class Vermin < MemHack::Compound - sizeof 60 - - field(:race, 0) { - number 16, true - } - def race_tg ; df.world.raws.creatures.all[race] ; end - field(:caste, 2) { - number 16, true - } - field(:pos, 4) { - global :Coord - } - field(:visible, 10) { - number 8, true, nil, BooleanEnum - } - field(:countdown, 12) { - number 16, true - } - field(:item, 16) { - pointer { - global :Item - } - } - field(:flags, 20) { - global :VerminFlags - } - field(:amount, 24) { - number 32, true - } - field(:population, 28) { - global :WorldPopulationRef - } - field(:unk_34, 52) { - number 16, true - } - field(:unk_38, 56) { - number 32, true - } -end - -class VerminFlags < MemHack::Compound - field(:_whole, 0) { - number 32, true - } - field(:is_colony, 0) { bit 1 } -end - -class Viewscreen < MemHack::Compound - sizeof 16 - - rtti_classname :viewscreenst - - field(:child, 4) { - pointer { - global :Viewscreen - } - } - field(:parent, 8) { - pointer { - global :Viewscreen - } - } - field(:breakdown_level, 12) { - number 8, false, nil, InterfaceBreakdownTypes - } - field(:option_key_pressed, 13) { - number 8, false - } - def feed(events) - DFHack.vmethod_call(self, 0, events) ; nil - end - def logic() - DFHack.vmethod_call(self, 4) ; nil - end - def render() - DFHack.vmethod_call(self, 8) ; nil - end - def resize(w, h) - DFHack.vmethod_call(self, 12, w, h) ; nil - end - def help() - DFHack.vmethod_call(self, 16) ; nil - end - def movies_okay() - val = DFHack.vmethod_call(self, 20) - (val & 1) != 0 - end - def is_option_screen() - val = DFHack.vmethod_call(self, 24) - (val & 1) != 0 - end - def is_save_screen() - val = DFHack.vmethod_call(self, 28) - (val & 1) != 0 - end - def key_conflict(arg0) - val = DFHack.vmethod_call(self, 40, arg0) - (val & 1) != 0 - end -end - -class ViewscreenChooseStartSitest < Viewscreen - sizeof 320 - - rtti_classname :viewscreen_choose_start_sitest - - field(:page, 16) { - class ::DFHack::ViewscreenChooseStartSitest_TPage < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :Biome ; NUME[:Biome] = 0 - ENUM[1] = :Neighbors ; NUME[:Neighbors] = 1 - ENUM[2] = :Civilization ; NUME[:Civilization] = 2 - ENUM[3] = :Elevation ; NUME[:Elevation] = 3 - ENUM[4] = :Cliffs ; NUME[:Cliffs] = 4 - ENUM[5] = :Reclaim ; NUME[:Reclaim] = 5 - ENUM[6] = :Reclaim2 ; NUME[:Reclaim2] = 6 - ENUM[7] = :Find ; NUME[:Find] = 7 - ENUM[8] = :Notes ; NUME[:Notes] = 8 - end - - number 32, true, nil, ViewscreenChooseStartSitest_TPage - } - field(:region_pos, 20) { - global :Coord2d - } - field(:reclaim_site, 24) { - number 32, true - } - def reclaim_site_tg ; df.world.world_data.sites[reclaim_site] ; end - field(:biome_rgn, 28) { - global :Coord2dPath - } - field(:embark_pos_min, 52) { - global :Coord2d - } - field(:embark_pos_max, 56) { - global :Coord2d - } - field(:embark_biome_rgn, 60) { - global :Coord2d - } - field(:biome_idx, 64) { - number 32, true - } - field(:biome_highlighted, 68) { - number 8, true, nil, BooleanEnum - } - field(:in_embark_aquifer, 69) { - number 8, true, nil, BooleanEnum - } - field(:in_embark_salt, 70) { - number 8, true, nil, BooleanEnum - } - field(:in_embark_large, 71) { - number 8, true, nil, BooleanEnum - } - field(:in_embark_normal, 72) { - number 8, true, nil, BooleanEnum - } - field(:highlighted_sites, 76) { - stl_vector(4) { - pointer { - global :WorldSite - } - } - } - field(:local_sites, 88) { - stl_vector(4) { - pointer { - global :WorldSite - } - } - } - field(:unk_74, 100) { - number 32, true - } - field(:civ_idx, 104) { - number 32, true - } - field(:available_civs, 108) { - stl_vector(4) { - pointer { - global :HistoricalEntity - } - } - } - field(:finder, 120) { - compound(:ViewscreenChooseStartSitest_TFinder) { - field(:anon_1, 0) { - number 32, true - } - field(:unk_90, 4) { - number 32, true - } - field(:unk_94, 8) { - number 32, true - } - field(:cursor, 12) { - number 32, true - } - field(:options, 16) { - static_array(22, 4, EmbarkFinderOption) { - number 32, true - } - } - field(:unmatched, 104) { - static_array(22, 1, EmbarkFinderOption) { - number 8, true, nil, BooleanEnum - } - } - field(:visible_options, 128) { - stl_vector(4) { - number 32, true, nil, EmbarkFinderOption - } - } - field(:unk_11c, 140) { - number 16, true, -1 - } - field(:unk_11e, 142) { - number 16, true - } - field(:unk_120, 144) { - number 16, true - } - field(:unk_122, 146) { - number 16, true - } - field(:unk_124, 148) { - number 16, true - } - field(:unk_126, 150) { - number 16, true - } - field(:unk_128, 152) { - number 16, true - } - } - } - field(:unk_12c, 276) { - stl_vector - } - field(:unk_13c, 288) { - stl_vector - } - field(:unk_14c, 300) { - number 32, true - } - field(:unk_150, 304) { - number 32, true - } - field(:unk_154, 308) { - number 16, true - } - field(:unk_156, 310) { - number 16, true - } - field(:unk_158, 312) { - number 16, true - } - field(:unk_15a, 314) { - number 16, true - } - field(:unk_15c, 316) { - number 32, true - } -end - -class ViewscreenCreatequotast < Viewscreen - sizeof 308 - - rtti_classname :viewscreen_createquotast - - field(:str_filter, 14) { - static_string(256) - } - field(:top_idx, 272) { - number 32, true - } - field(:sel_idx, 276) { - number 32, true - } - field(:orders, 280) { - stl_vector(4) { - pointer { - global :ManagerOrderTemplate - } - } - } - field(:anon_1, 292) { - stl_vector(4) { - number 32, true - } - } - field(:want_quantity, 304) { - number 8, true, nil, BooleanEnum - } -end - -class ViewscreenDungeonMonsterstatusst < Viewscreen - sizeof 68 - - rtti_classname :viewscreen_dungeon_monsterstatusst - - field(:unit, 16) { - pointer { - global :Unit - } - } - field(:inventory_cursor, 20) { - number 32, true - } - field(:body_part_cursor, 24) { - number 32, true - } - field(:body_part, 28) { - stl_vector(2) { - number 16, true - } - } - field(:view_skills, 40) { - number 8, true, nil, BooleanEnum - } - field(:inventory, 44) { - stl_vector(4) { - pointer { - global :UnitInventoryItem - } - } - } - field(:spatters, 56) { - stl_vector(4) { - pointer { - global :UnitSpatter - } - } - } -end - -class ViewscreenDungeonmodest < Viewscreen - sizeof 40 - - rtti_classname :viewscreen_dungeonmodest - - field(:x, 16) { - number 32, true - } - field(:y, 20) { - number 32, true - } - field(:z, 24) { - number 32, true - } - field(:unk_1c, 28) { - number 32, true - } - field(:unk_20, 32) { - number 32, true - } - field(:unk_24, 36) { - number 8, false - } -end - -class ViewscreenDwarfmodest < Viewscreen - sizeof 100 - - rtti_classname :viewscreen_dwarfmodest - - field(:unk_10, 14) { - number 8, false - } - field(:anon_1, 15) { - } - field(:unk_14, 20) { - stl_vector - } - field(:unk_24, 32) { - stl_vector - } - field(:unk_34, 44) { - stl_vector(4) { - number 32, true - } - } - field(:unk_44, 56) { - stl_vector(4) { - number 32, true - } - } - field(:unk_54, 68) { - number 32, true - } - field(:unk_58, 72) { - number 8, false - } - field(:keyRepeat, 73) { - number 8, false - } - field(:anon_2, 76) { - stl_vector - } - field(:anon_3, 88) { - } -end - -class ViewscreenItemst < Viewscreen - sizeof 88 - - rtti_classname :viewscreen_itemst - - field(:item, 16) { - pointer { - global :Item - } - } - field(:entry_ref, 20) { - stl_vector(4) { - pointer { - global :GeneralRef - } - } - } - field(:entry_indent, 32) { - stl_vector(2) { - number 16, true - } - } - field(:unk_34, 44) { - stl_vector(4) { - pointer { - } - } - } - field(:entry_string, 56) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:entry_reaction, 68) { - stl_vector(4) { - number 32, true - } - } - field(:cursor_pos, 80) { - number 32, true - } - field(:caption_uses, 84) { - number 8, true, nil, BooleanEnum - } - field(:caption_contents, 85) { - number 8, true, nil, BooleanEnum - } -end - -class ViewscreenJoblistst < Viewscreen - sizeof 44 - - rtti_classname :viewscreen_joblistst - - field(:allow_zoom, 14) { - number 8, true, nil, BooleanEnum - } - field(:cursor_pos, 16) { - number 32, true - } - field(:jobs, 20) { - stl_vector(4) { - pointer { - global :Job - } - } - } - field(:units, 32) { - stl_vector(4) { - pointer { - global :Unit - } - } - } -end - -class ViewscreenKitchenprefst < Viewscreen - sizeof 104 - - rtti_classname :viewscreen_kitchenprefst - - field(:cursor, 16) { - number 32, true - } - field(:item_type, 20) { - stl_vector(2) { - number 16, true, nil, ItemType - } - } - field(:item_subtype, 32) { - stl_vector(2) { - number 16, true - } - } - field(:mat_type, 44) { - stl_vector(2) { - number 16, true - } - } - field(:mat_index, 56) { - stl_vector(4) { - number 32, true - } - } - field(:count, 68) { - stl_vector(4) { - number 32, true - } - } - field(:forbidden, 80) { - stl_vector(1) { - number 8, false - } - } - field(:possible, 92) { - stl_vector(1) { - number 8, false - } - } -end - -class ViewscreenLayerst < Viewscreen - sizeof 28 - - rtti_classname :viewscreen_layerst - - field(:layer_objects, 16) { - stl_vector(4) { - pointer { - global :LayerObject - } - } - } -end - -class ViewscreenLayerArenaCreaturest < ViewscreenLayerst - sizeof 48 - - rtti_classname :viewscreen_layer_arena_creaturest - - field(:unk_1c, 28) { - number 8, false - } - field(:unk_1e, 30) { - number 16, true - } - field(:unk_20, 32) { - } - field(:cur_side, 40) { - number 32, true - } - field(:cur_interaction, 44) { - number 32, true - } - def cur_interaction_tg ; df.world.arena_spawn.interactions[cur_interaction] ; end -end - -class ViewscreenLayerAssigntradest < ViewscreenLayerst - sizeof 796 - - rtti_classname :viewscreen_layer_assigntradest - - field(:info, 28) { - stl_vector(4) { - pointer { - global :AssignTradeStatus - } - } - } - field(:depot, 40) { - pointer { - global :BuildingTradedepotst - } - } - field(:lists, 44) { - static_array(61, 12) { - stl_vector(4) { - number 32, true - } - } - } - field(:visible_lists, 776) { - stl_vector(2) { - number 16, true - } - } - field(:sort_distance, 788) { - number 8, true, nil, BooleanEnum - } - field(:pending_on_top, 789) { - number 8, true, nil, BooleanEnum - } - field(:filter_mandates, 790) { - number 8, true, nil, BooleanEnum - } - field(:filter, 792) { - stl_string - } -end - -class ViewscreenLayerMilitaryst < ViewscreenLayerst - sizeof 632 - - rtti_classname :viewscreen_layer_militaryst - - field(:squads, 28) { - compound(:ViewscreenLayerMilitaryst_TSquads) { - field(:list, 0) { - stl_vector(4) { - pointer { - global :Squad - } - } - } - field(:leader_positions, 12) { - stl_vector(4) { - pointer { - global :EntityPosition - } - } - } - field(:leader_assignments, 24) { - stl_vector(4) { - pointer { - global :EntityPositionAssignment - } - } - } - field(:can_appoint, 36) { - stl_bit_vector - } - } - } - field(:positions, 84) { - compound(:ViewscreenLayerMilitaryst_TPositions) { - field(:assigned, 0) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - field(:skill, 12) { - stl_vector(2) { - number 16, true, nil, JobSkill - } - } - field(:unk_84, 24) { - stl_vector(4) { - number 32, true - } - } - field(:candidates, 36) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - } - } - field(:page, 132) { - class ::DFHack::ViewscreenLayerMilitaryst_TPage < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :Positions ; NUME[:Positions] = 0 - ENUM[1] = :Alerts ; NUME[:Alerts] = 1 - ENUM[2] = :Equip ; NUME[:Equip] = 2 - ENUM[3] = :Uniforms ; NUME[:Uniforms] = 3 - ENUM[4] = :Supplies ; NUME[:Supplies] = 4 - ENUM[5] = :Ammunition ; NUME[:Ammunition] = 5 - end - - number 32, true, nil, ViewscreenLayerMilitaryst_TPage - } - field(:num_squads, 136) { - number 32, true - } - field(:num_soldiers, 140) { - number 32, true - } - field(:num_active, 144) { - number 32, true - } - field(:squad_members, 148) { - compound(:ViewscreenLayerMilitaryst_TSquadMembers) { - field(:profession, 0) { - stl_vector(2) { - number 16, true, nil, Profession - } - } - field(:count, 12) { - stl_vector(4) { - number 32, true - } - } - field(:max_count, 24) { - stl_vector(4) { - number 32, true - } - } - } - } - field(:in_create_squad, 184) { - number 8, true, nil, BooleanEnum - } - field(:in_new_squad, 185) { - number 8, true, nil, BooleanEnum - } - field(:unk_e6, 186) { - number 8, true, nil, BooleanEnum - } - field(:captain_positions, 188) { - stl_vector(4) { - pointer { - global :EntityPosition - } - } - } - field(:new_position, 200) { - pointer { - global :EntityPosition - } - } - field(:unk_fc, 204) { - number 8, true, nil, BooleanEnum - } - field(:in_rename_alert, 205) { - number 8, true, nil, BooleanEnum - } - field(:in_delete_alert, 206) { - number 8, true, nil, BooleanEnum - } - field(:alert_squads, 208) { - stl_vector(4) { - pointer { - global :Squad - } - } - } - field(:equip, 220) { - compound(:ViewscreenLayerMilitaryst_TEquip) { - field(:mode, 0) { - class ::DFHack::ViewscreenLayerMilitaryst_TEquip_TMode < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :Customize ; NUME[:Customize] = 0 - ENUM[1] = :Uniform ; NUME[:Uniform] = 1 - ENUM[2] = :Priority ; NUME[:Priority] = 2 - end - - number 32, true, nil, ViewscreenLayerMilitaryst_TEquip_TMode - } - field(:squads, 4) { - stl_vector(4) { - pointer { - global :Squad - } - } - } - field(:units, 16) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - field(:specific_items, 28) { - stl_vector(4) { - pointer { - global :Item - } - } - } - field(:prio_in_move, 40) { - number 32, true - } - field(:assigned, 44) { - compound(:ViewscreenLayerMilitaryst_TEquip_TAssigned) { - field(:spec, 0) { - stl_vector(4) { - pointer { - global :SquadUniformSpec - } - } - } - field(:category, 12) { - stl_vector(2) { - number 16, true, nil, UniformCategory - } - } - field(:index, 24) { - stl_vector(4) { - number 32, true - } - } - } - } - field(:unk_178, 80) { - stl_vector - } - field(:edit_spec, 92) { - pointer { - global :SquadUniformSpec - } - } - field(:uniforms, 96) { - stl_vector(4) { - pointer { - global :EntityUniform - } - } - } - field(:uniform, 108) { - compound(:ViewscreenLayerMilitaryst_TEquip_TUniform) { - field(:type, 0) { - stl_vector(2) { - number 16, true, nil, ItemType - } - } - field(:subtype, 12) { - stl_vector(2) { - number 16, true - } - } - field(:category, 24) { - stl_vector(2) { - number 16, true, nil, UniformCategory - } - } - field(:index, 36) { - stl_vector(2) { - number 16, true - } - } - field(:info, 48) { - stl_vector(4) { - pointer { - global :EntityUniformItem - } - } - } - } - } - field(:edit_mode, 168) { - class ::DFHack::ViewscreenLayerMilitaryst_TEquip_TEditMode < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :Armor ; NUME[:Armor] = 0 - ENUM[1] = :Helm ; NUME[:Helm] = 1 - ENUM[2] = :Legs ; NUME[:Legs] = 2 - ENUM[3] = :Gloves ; NUME[:Gloves] = 3 - ENUM[4] = :Boots ; NUME[:Boots] = 4 - ENUM[5] = :Shield ; NUME[:Shield] = 5 - ENUM[6] = :Weapon ; NUME[:Weapon] = 6 - ENUM[7] = :Material ; NUME[:Material] = 7 - ENUM[8] = :Color ; NUME[:Color] = 8 - ENUM[9] = :SpecificArmor ; NUME[:SpecificArmor] = 9 - ENUM[10] = :SpecificHelm ; NUME[:SpecificHelm] = 10 - ENUM[11] = :SpecificLegs ; NUME[:SpecificLegs] = 11 - ENUM[12] = :SpecificGloves ; NUME[:SpecificGloves] = 12 - ENUM[13] = :SpecificBoots ; NUME[:SpecificBoots] = 13 - ENUM[14] = :SpecificShield ; NUME[:SpecificShield] = 14 - ENUM[15] = :SpecificWeapon ; NUME[:SpecificWeapon] = 15 - end - - number 32, true, nil, ViewscreenLayerMilitaryst_TEquip_TEditMode - } - field(:unk_1ec, 172) { - } - field(:add_item, 176) { - compound(:ViewscreenLayerMilitaryst_TEquip_TAddItem) { - field(:type, 0) { - stl_vector(2) { - number 16, true, nil, ItemType - } - } - field(:subtype, 12) { - stl_vector(2) { - number 16, true - } - } - field(:unk_214, 24) { - stl_vector - } - field(:foreign, 36) { - stl_bit_vector - } - } - } - field(:material, 232) { - compound(:ViewscreenLayerMilitaryst_TEquip_TMaterial) { - field(:generic, 0) { - stl_vector(2) { - number 16, true, nil, UniformMaterialClass - } - } - field(:specific, 12) { - global :MaterialVecRef - } - } - } - field(:color, 268) { - compound(:ViewscreenLayerMilitaryst_TEquip_TColor) { - field(:id, 0) { - stl_vector(4) { - number 32, true - } - } - def id_tg ; id.map { |i| df.world.raws.language.colors[i] } ; end - field(:dye, 12) { - stl_bit_vector - } - } - } - field(:in_name_uniform, 300) { - number 8, true, nil, BooleanEnum - } - } - } - field(:ammo, 524) { - compound(:ViewscreenLayerMilitaryst_TAmmo) { - field(:squads, 0) { - stl_vector(4) { - pointer { - global :Squad - } - } - } - field(:in_add_item, 12) { - number 8, true, nil, BooleanEnum - } - field(:in_set_material, 13) { - number 8, true, nil, BooleanEnum - } - field(:add_item, 16) { - compound(:ViewscreenLayerMilitaryst_TAmmo_TAddItem) { - field(:type, 0) { - stl_vector(2) { - number 16, true, nil, ItemType - } - } - field(:subtype, 12) { - stl_vector(2) { - number 16, true - } - } - field(:foreign, 24) { - stl_bit_vector - } - } - } - field(:material, 60) { - compound(:ViewscreenLayerMilitaryst_TAmmo_TMaterial) { - field(:generic, 0) { - stl_vector(2) { - number 16, true, nil, UniformMaterialClass - } - } - field(:specific, 12) { - global :MaterialVecRef - } - } - } - } - } - field(:supplies_squads, 620) { - stl_vector(4) { - pointer { - global :Squad - } - } - } -end - -class ViewscreenLayerNoblelistst < ViewscreenLayerst - sizeof 92 - - rtti_classname :viewscreen_layer_noblelistst - - field(:mode, 28) { - class ::DFHack::ViewscreenLayerNoblelistst_TMode < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :List ; NUME[:List] = 0 - ENUM[1] = :Appoint ; NUME[:Appoint] = 1 - ENUM[2] = :Settings ; NUME[:Settings] = 2 - end - - number 16, true, nil, ViewscreenLayerNoblelistst_TMode - } - field(:info, 32) { - stl_vector(4) { - pointer { - compound(:ViewscreenLayerNoblelistst_TInfo) { - sizeof 28 - - field(:unit, 0) { - pointer { - global :Unit - } - } - field(:nemesis, 4) { - pointer { - global :NemesisRecord - } - } - field(:unk_8, 8) { - pointer { - } - } - field(:position, 12) { - pointer { - global :EntityPosition - } - } - field(:assignment, 16) { - pointer { - global :EntityPositionAssignment - } - } - field(:group, 20) { - number 32, true - } - def group_tg ; df.world.entities.all[group] ; end - field(:precedence, 24) { - number 32, true - } - } - } - } - } - field(:candidates, 44) { - stl_vector(4) { - pointer { - compound(:ViewscreenLayerNoblelistst_TCandidates) { - sizeof 8 - - field(:unit, 0) { - pointer { - global :Unit - } - } - field(:weight, 4) { - number 32, true - } - } - } - } - } - field(:assignments, 56) { - stl_vector(4) { - pointer { - global :EntityPositionAssignment - } - } - } - field(:histfigs, 68) { - stl_vector(4) { - number 32, true - } - } - def histfigs_tg ; histfigs.map { |i| df.world.history.figures[i] } ; end - field(:groups, 80) { - stl_vector(4) { - number 32, true - } - } - def groups_tg ; groups.map { |i| df.world.entities.all[i] } ; end -end - -class ViewscreenLayerOverallHealthst < ViewscreenLayerst - sizeof 84 - - rtti_classname :viewscreen_layer_overall_healthst - - field(:anon_1, 28) { - number 32, true - } - field(:unit, 32) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - field(:bits1, 44) { - stl_vector(4) { - global :HealthViewBits1 - } - } - field(:bits2, 56) { - stl_vector(4) { - global :HealthViewBits2 - } - } - field(:bits3, 68) { - stl_vector(4) { - global :HealthViewBits3 - } - } - field(:x_cursor_pos, 80) { - number 32, true - } -end - -class ViewscreenLayerStockpilest < ViewscreenLayerst - sizeof 104 - - rtti_classname :viewscreen_layer_stockpilest - - field(:settings, 28) { - pointer { - global :StockpileSettings - } - } - field(:cur_group, 32) { - number 32, true, nil, StockpileList - } - field(:cur_list, 36) { - number 32, true, nil, StockpileList - } - field(:group_ids, 40) { - stl_vector(4) { - number 32, true, nil, StockpileList - } - } - field(:group_bits, 52) { - stl_vector(4) { - global :StockpileGroupSet - } - } - field(:list_ids, 64) { - stl_vector(4) { - number 32, true, nil, StockpileList - } - } - field(:item_names, 76) { - stl_vector(4) { - pointer { - stl_string - } - } - } - field(:item_status, 88) { - stl_vector(4) { - pointer { - number 8, true, nil, BooleanEnum - } - } - } - field(:title, 100) { - stl_string - } -end - -class ViewscreenLayerWorkshopProfilest < ViewscreenLayerst - sizeof 44 - - rtti_classname :viewscreen_layer_workshop_profilest - - field(:profile, 28) { - pointer { - global :WorkshopProfile - } - } - field(:workers, 32) { - stl_vector(4) { - pointer { - global :Unit - } - } - } -end - -class ViewscreenOptionst < Viewscreen - sizeof 16 - - rtti_classname :viewscreen_optionst - -end - -class ViewscreenOverallstatusst < Viewscreen - sizeof 32 - - rtti_classname :viewscreen_overallstatusst - - field(:visible_pages, 16) { - stl_vector(2) { - number 16, true - } - } - field(:page_cursor, 28) { - number 32, true - } -end - -class ViewscreenPetst < Viewscreen - sizeof 128 - - rtti_classname :viewscreen_petst - - field(:cursor, 16) { - number 32, true - } - field(:animal, 20) { - stl_vector(4) { - pointer { - } - } - } - field(:is_vermin, 32) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:pet_info, 44) { - stl_vector(4) { - pointer { - global :PetInfo - } - } - } - field(:is_tame, 56) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:is_adopting, 68) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:mode, 80) { - class ::DFHack::ViewscreenPetst_TMode < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :List ; NUME[:List] = 0 - ENUM[1] = :TrainingKnowledge ; NUME[:TrainingKnowledge] = 1 - ENUM[2] = :SelectTrainer ; NUME[:SelectTrainer] = 2 - end - - number 32, true, nil, ViewscreenPetst_TMode - } - field(:knowledge_page, 84) { - number 32, true - } - field(:known, 88) { - stl_vector(4) { - number 32, true - } - } - def known_tg ; known.map { |i| df.world.raws.creatures.all[i] } ; end - field(:trainer_cursor, 100) { - number 32, true - } - field(:trainer_unit, 104) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - field(:trainer_mode, 116) { - stl_vector(4) { - number 32, true - } - } -end - -class ViewscreenStoresst < Viewscreen - sizeof 396 - - rtti_classname :viewscreen_storesst - - field(:title, 14) { - static_string(256) - } - field(:category_cursor, 272) { - number 32, true - } - field(:item_cursor, 276) { - number 32, true - } - field(:in_right_list, 280) { - number 16, true - } - field(:in_group_mode, 282) { - number 16, true - } - field(:category_total, 284) { - stl_vector(4) { - number 32, true - } - } - field(:category_busy, 296) { - stl_vector(4) { - number 32, true - } - } - field(:items, 308) { - stl_vector(4) { - pointer { - global :Item - } - } - } - field(:group_item_type, 320) { - stl_vector(2) { - number 16, true, nil, ItemType - } - } - field(:group_item_subtype, 332) { - stl_vector(2) { - number 16, true - } - } - field(:group_mat_type, 344) { - stl_vector(2) { - number 16, true - } - } - field(:group_mat_index, 356) { - stl_vector(2) { - number 16, true - } - } - field(:group_count, 368) { - stl_vector(4) { - number 32, true - } - } - field(:category_order, 380) { - stl_vector(2) { - number 16, true, nil, ItemType - } - } - field(:can_zoom, 392) { - number 8, true, nil, BooleanEnum - } -end - -class ViewscreenTitlest < Viewscreen - sizeof 636 - - rtti_classname :viewscreen_titlest - - field(:str_histories, 14) { - static_string(256) - } - field(:menu_items, 270) { - static_string(256) - } - field(:sel_subpage, 526) { - class ::DFHack::ViewscreenTitlest_TSelSubpage < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :None ; NUME[:None] = 0 - ENUM[1] = :StartGame ; NUME[:StartGame] = 1 - ENUM[2] = :Unk2 ; NUME[:Unk2] = 2 - ENUM[3] = :Arena ; NUME[:Arena] = 3 - ENUM[4] = :About ; NUME[:About] = 4 - end - - number 16, true, nil, ViewscreenTitlest_TSelSubpage - } - field(:sel_menu_line, 528) { - number 32, true - } - field(:sel_submenu_line, 532) { - number 32, true - } - field(:unk_218, 536) { - number 8, false - } - field(:unk_21c, 540) { - stl_vector(4) { - number 32, true - } - } - field(:unk_228, 552) { - stl_vector - } - field(:unk_234, 564) { - stl_vector - } - field(:start_savegames, 576) { - stl_vector(4) { - pointer { - } - } - } - field(:continue_savegames, 588) { - stl_vector(4) { - pointer { - } - } - } - field(:str_slaves, 600) { - stl_string - } - field(:str_chapter, 604) { - stl_string - } - field(:str_copyright, 608) { - stl_string - } - field(:str_version, 612) { - stl_string - } - field(:str_unk, 616) { - stl_string - } - field(:str_programmed, 620) { - stl_string - } - field(:str_designed, 624) { - stl_string - } - field(:str_visit, 628) { - stl_string - } - field(:str_site, 632) { - stl_string - } -end - -class ViewscreenTradegoodsst < Viewscreen - sizeof 420 - - rtti_classname :viewscreen_tradegoodsst - - field(:title, 14) { - static_string(256) - } - field(:merchant_name, 272) { - stl_string - } - field(:merchant_entity, 276) { - stl_string - } - field(:depot, 280) { - pointer { - global :BuildingTradedepotst - } - } - field(:caravan, 284) { - pointer { - global :CaravanState - } - } - field(:entity, 288) { - pointer { - global :HistoricalEntity - } - } - field(:is_unloading, 292) { - number 8, true, nil, BooleanEnum - } - field(:has_traders, 293) { - number 8, true, nil, BooleanEnum - } - field(:trader, 296) { - pointer { - global :Unit - } - } - field(:broker, 300) { - pointer { - global :Unit - } - } - field(:trader_items, 304) { - stl_vector(4) { - pointer { - global :Item - } - } - } - field(:broker_items, 316) { - stl_vector(4) { - pointer { - global :Item - } - } - } - field(:trader_selected, 328) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:broker_selected, 340) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - field(:trader_count, 352) { - stl_vector(4) { - number 32, true - } - } - field(:broker_count, 364) { - stl_vector(4) { - number 32, true - } - } - field(:trader_cursor, 376) { - number 32, true - } - field(:broker_cursor, 380) { - number 32, true - } - field(:in_right_pane, 384) { - number 8, true, nil, BooleanEnum - } - field(:trade_reply, 386) { - number 16, true - } - field(:anon_1, 388) { - number 16, true - } - field(:anon_2, 392) { - number 32, true - } - field(:has_offer, 396) { - number 8, false - } - field(:unk_1d8, 400) { - stl_vector - } - field(:in_edit_count, 412) { - number 8, false - } - field(:edit_count, 416) { - stl_string - } -end - -class ViewscreenTradelistst < Viewscreen - sizeof 36 - - rtti_classname :viewscreen_tradelistst - - field(:unk_10, 16) { - number 32, true - } - field(:depot, 20) { - pointer { - global :BuildingTradedepotst - } - } - field(:caravans, 24) { - stl_vector(4) { - pointer { - global :CaravanState - } - } - } -end - -class ViewscreenUnitlistst < Viewscreen - sizeof 132 - - rtti_classname :viewscreen_unitlistst - - field(:allow_zoom, 14) { - number 8, true, nil, BooleanEnum - } - field(:page, 16) { - class ::DFHack::ViewscreenUnitlistst_TPage < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :Citizens ; NUME[:Citizens] = 0 - ENUM[1] = :Livestock ; NUME[:Livestock] = 1 - ENUM[2] = :Others ; NUME[:Others] = 2 - ENUM[3] = :Dead ; NUME[:Dead] = 3 - end - - number 32, true, nil, ViewscreenUnitlistst_TPage - } - field(:cursor_pos, 20) { - static_array(4, 4) { - number 32, true - } - } - field(:jobs, 36) { - static_array(4, 12) { - stl_vector(4) { - pointer { - global :Job - } - } - } - } - field(:units, 84) { - static_array(4, 12) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - } -end - -class WorkshopProfile < MemHack::Compound - sizeof 20 - - field(:permitted_workers, 0) { - stl_vector(4) { - number 32, true - } - } - def permitted_workers_tg ; permitted_workers.map { |i| df.world.units.all[i] } ; end - field(:min_level, 12) { - number 32, true - } - field(:max_level, 16) { - number 32, true, 3000 - } -end - -class World < MemHack::Compound - sizeof 1652052 - - field(:glowing_barriers, 0) { - stl_vector(4) { - pointer { - compound(:World_TGlowingBarriers) { - sizeof 24 - - field(:id, 0) { - number 32, true - } - field(:anon_1, 4) { - stl_vector - } - field(:pos, 16) { - global :Coord - } - } - } - } - } - field(:deep_vein_hollows, 12) { - stl_vector(4) { - pointer { - compound(:World_TDeepVeinHollows) { - sizeof 52 - - field(:anon_1, 0) { - number 8, false - } - field(:anon_2, 4) { - number 32, true - } - field(:tiles, 8) { - global :CoordPath - } - field(:anon_3, 44) { - number 32, true - } - field(:anon_4, 48) { - number 16, true - } - } - } - } - } - field(:unk_20, 24) { - stl_vector(4) { - pointer { - global :WorldUnk20 - } - } - } - field(:engravings, 36) { - stl_vector(4) { - pointer { - global :Engraving - } - } - } - field(:vermin, 48) { - compound(:World_TVermin) { - field(:all, 0) { - stl_vector(4) { - pointer { - global :Vermin - } - } - } - field(:colonies, 12) { - stl_vector(4) { - pointer { - global :Vermin - } - } - } - } - } - field(:unk_3C, 72) { - stl_vector(4) { - pointer { - global :Coord - } - } - } - field(:unk_48, 84) { - stl_vector(4) { - pointer { - compound(:World_TUnk48) { - sizeof 12 - - field(:anon_1, 0) { - number 16, true - } - field(:anon_2, 2) { - number 16, true - } - field(:anon_3, 4) { - number 16, true - } - field(:anon_4, 8) { - number 32, true - } - } - } - } - } - field(:unk_54, 96) { - stl_vector(4) { - pointer { - compound(:World_TUnk54) { - sizeof 52 - - field(:anon_1, 0) { - stl_vector(2) { - number 16, true - } - } - field(:anon_2, 12) { - stl_vector(2) { - number 16, true - } - } - field(:anon_3, 24) { - number 16, true - } - field(:anon_4, 26) { - number 16, true - } - field(:anon_5, 28) { - number 16, true - } - field(:anon_6, 30) { - number 16, true - } - field(:anon_7, 32) { - number 16, true - } - field(:anon_8, 34) { - number 16, true - } - field(:anon_9, 36) { - number 16, true - } - field(:anon_10, 40) { - stl_vector(4) { - number 32, true - } - } - } - } - } - } - field(:unk_60, 108) { - stl_vector(4) { - pointer { - compound(:World_TUnk60) { - sizeof 16 - - field(:anon_1, 0) { - number 16, true - } - field(:anon_2, 2) { - number 16, true - } - field(:anon_3, 4) { - number 16, true - } - field(:anon_4, 6) { - number 16, true - } - field(:anon_5, 8) { - number 16, true - } - field(:anon_6, 10) { - number 16, true - } - field(:anon_7, 12) { - number 16, true - } - field(:anon_8, 14) { - number 16, true - } - } - } - } - } - field(:unk_6C, 120) { - stl_vector(4) { - pointer { - compound(:World_TUnk6C) { - sizeof 56 - - field(:anon_1, 0) { - number 16, true - } - field(:anon_2, 2) { - number 16, true - } - field(:anon_3, 4) { - number 16, true - } - field(:anon_4, 6) { - number 8, false - } - field(:anon_5, 8) { - stl_vector(2) { - number 16, true - } - } - field(:anon_6, 20) { - stl_vector(2) { - number 16, true - } - } - field(:anon_7, 32) { - stl_vector(2) { - number 16, true - } - } - field(:anon_8, 44) { - stl_vector(2) { - number 16, true - } - } - } - } - } - } - field(:unk_78, 132) { - stl_vector(4) { - pointer { - compound(:World_TUnk78) { - sizeof 14 - - field(:anon_1, 0) { - number 16, true - } - field(:anon_2, 2) { - number 16, true - } - field(:anon_3, 4) { - number 16, true - } - field(:anon_4, 6) { - number 16, true - } - field(:anon_5, 8) { - number 16, true - } - field(:anon_6, 10) { - number 8, false - } - field(:anon_7, 11) { - number 8, false - } - field(:anon_8, 12) { - number 8, false - } - } - } - } - } - field(:constructions, 144) { - stl_vector(4) { - pointer { - global :Construction - } - } - } - field(:unk_90, 156) { - stl_vector(4) { - pointer { - compound(:World_TUnk90) { - sizeof 10 - - field(:anon_1, 0) { - number 16, true - } - field(:anon_2, 2) { - number 16, true - } - field(:anon_3, 4) { - number 16, true - } - field(:anon_4, 6) { - number 16, true - } - field(:anon_5, 8) { - number 16, true - } - } - } - } - } - field(:unk_9C, 168) { - stl_vector(4) { - pointer { - compound(:World_TUnk9C) { - sizeof 32 - - field(:anon_1, 0) { - number 16, true - } - field(:anon_2, 2) { - number 16, true - } - field(:anon_3, 4) { - number 16, true - } - field(:anon_4, 6) { - number 16, true - } - field(:anon_5, 8) { - number 16, true - } - field(:anon_6, 12) { - number 32, true - } - field(:anon_7, 16) { - number 32, true - } - field(:anon_8, 20) { - number 16, true - } - field(:anon_9, 22) { - number 16, true - } - field(:anon_10, 24) { - number 16, true - } - field(:anon_11, 26) { - number 16, true - } - field(:anon_12, 28) { - number 16, true - } - } - } - } - } - field(:unk_A8, 180) { - stl_vector(4) { - pointer { - compound(:World_TUnkA8) { - sizeof 28 - - field(:anon_1, 0) { - number 8, false - } - field(:anon_2, 4) { - number 32, true - } - field(:anon_3, 8) { - stl_vector(4) { - number 32, true - } - } - field(:anon_4, 20) { - number 16, true - } - field(:anon_5, 22) { - number 16, true - } - field(:anon_6, 24) { - number 16, true - } - } - } - } - } - field(:unk_B4, 192) { - stl_vector(4) { - pointer { - compound(:World_TUnkB4) { - sizeof 52 - - field(:anon_1, 0) { - number 8, false - } - field(:anon_2, 4) { - number 32, true - } - field(:anon_3, 8) { - stl_vector(2) { - number 16, true - } - } - field(:anon_4, 20) { - stl_vector(2) { - number 16, true - } - } - field(:anon_5, 32) { - stl_vector(2) { - number 16, true - } - } - field(:anon_6, 44) { - number 16, true - } - field(:anon_7, 46) { - number 16, true - } - field(:anon_8, 48) { - number 16, true - } - } - } - } - } - field(:unk_C0, 204) { - stl_vector(4) { - pointer { - global :WorldUnkC0 - } - } - } - field(:unk_CC, 216) { - stl_vector(4) { - pointer { - compound(:World_TUnkCC) { - sizeof 44 - - field(:anon_1, 0) { - number 32, true - } - field(:anon_2, 4) { - number 32, true - } - field(:anon_3, 8) { - number 32, true - } - field(:anon_4, 12) { - number 16, true - } - field(:anon_5, 14) { - number 16, true - } - field(:anon_6, 16) { - number 16, true - } - field(:anon_7, 20) { - number 32, true - } - field(:anon_8, 24) { - number 8, false - } - field(:anon_9, 28) { - number 32, true - } - field(:anon_10, 32) { - number 16, true - } - field(:anon_11, 34) { - number 16, true - } - field(:anon_12, 36) { - number 32, true - } - field(:anon_13, 40) { - number 32, true - } - } - } - } - } - field(:unk_D8, 228) { - stl_vector(4) { - pointer { - compound(:World_TUnkD8) { - sizeof 20 - - field(:anon_1, 0) { - number 16, true - } - field(:anon_2, 2) { - number 16, true - } - field(:anon_3, 4) { - number 16, true - } - field(:anon_4, 6) { - number 16, true - } - field(:anon_5, 8) { - number 16, true - } - field(:anon_6, 10) { - number 16, true - } - field(:anon_7, 12) { - number 32, true - } - field(:anon_8, 16) { - number 8, false - } - field(:anon_9, 18) { - number 16, true - } - } - } - } - } - field(:unk_E4, 240) { - stl_vector(4) { - pointer { - compound(:World_TUnkE4) { - sizeof 32 - - field(:anon_1, 0) { - number 16, true - } - field(:anon_2, 2) { - number 16, true - } - field(:anon_3, 4) { - number 16, true - } - field(:anon_4, 6) { - number 16, true - } - field(:anon_5, 8) { - number 16, true - } - field(:anon_6, 12) { - number 32, true - } - field(:anon_7, 16) { - number 32, true - } - field(:anon_8, 20) { - number 16, true - } - field(:anon_9, 22) { - number 16, true - } - field(:anon_10, 24) { - number 16, true - } - field(:anon_11, 26) { - number 16, true - } - field(:anon_12, 28) { - number 16, true - } - } - } - } - } - field(:unk_F0, 252) { - stl_vector(4) { - pointer { - compound(:World_TUnkF0) { - sizeof 56 - - field(:anon_1, 0) { - number 16, true - } - field(:anon_2, 2) { - number 16, true - } - field(:anon_3, 4) { - number 16, true - } - field(:anon_4, 6) { - number 8, false - } - field(:anon_5, 8) { - stl_vector(2) { - number 16, true - } - } - field(:anon_6, 20) { - stl_vector(2) { - number 16, true - } - } - field(:anon_7, 32) { - stl_vector(2) { - number 16, true - } - } - field(:anon_8, 44) { - stl_vector(2) { - number 16, true - } - } - } - } - } - } - field(:unk_FC, 264) { - stl_vector(4) { - pointer { - compound(:World_TUnkFC) { - sizeof 10 - - field(:anon_1, 0) { - number 16, true - } - field(:anon_2, 2) { - number 16, true - } - field(:anon_3, 4) { - number 16, true - } - field(:anon_4, 6) { - number 16, true - } - field(:anon_5, 8) { - number 16, true - } - } - } - } - } - field(:effects, 276) { - stl_vector(4) { - pointer { - global :EffectInfo - } - } - } - field(:coin_batches, 288) { - stl_vector(4) { - pointer { - compound(:World_TCoinBatches) { - sizeof 36 - - field(:year, 0) { - number 32, true - } - field(:mat_type, 4) { - number 16, true - } - field(:mat_index, 8) { - number 32, true - } - field(:entity, 12) { - number 32, true - } - def entity_tg ; df.world.entities.all[entity] ; end - field(:ruler, 16) { - number 32, true - } - def ruler_tg ; df.world.history.figures[ruler] ; end - field(:image_front, 20) { - compound(:World_TCoinBatches_TImageFront) { - field(:id, 0) { - number 32, true - } - def id_tg ; df.world.art_images[id] ; end - field(:subid, 4) { - number 16, true - } - } - } - field(:image_back, 28) { - compound(:World_TCoinBatches_TImageBack) { - field(:id, 0) { - number 32, true - } - def id_tg ; df.world.art_images[id] ; end - field(:subid, 4) { - number 16, true - } - } - } - } - } - } - } - field(:populations, 300) { - stl_vector(4) { - pointer { - compound(:World_TPopulations) { - sizeof 48 - - field(:type, 0) { - number 8, false, nil, WorldPopulationType - } - field(:race, 2) { - number 16, true - } - def race_tg ; df.world.raws.creatures.all[race] ; end - field(:plant, 2) { - number 16, true - } - def plant_tg ; df.world.raws.plants.all[plant] ; end - field(:quantity, 4) { - number 32, true - } - field(:unk_8, 8) { - number 8, false - } - field(:population, 12) { - global :WorldPopulationRef - } - field(:anon_1, 36) { - number 32, true, -1 - } - field(:anon_2, 40) { - number 32, true, -1 - } - field(:anon_3, 44) { - number 32, true, -1 - } - } - } - } - } - field(:manager_orders, 312) { - stl_vector(4) { - pointer { - global :ManagerOrder - } - } - } - field(:mandates, 324) { - stl_vector(4) { - pointer { - global :Mandate - } - } - } - field(:entities, 336) { - compound(:World_TEntities) { - field(:all, 0) { - stl_vector(4) { - pointer { - global :HistoricalEntity - } - } - } - field(:bad, 12) { - stl_vector(4) { - pointer { - global :HistoricalEntity - } - } - } - } - } - field(:anon_1, 360) { - } - field(:units, 80364) { - compound(:World_TUnits) { - field(:all, 0) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - field(:active, 12) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - field(:other, 24) { - static_array(3, 12, UnitsOtherId) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - } - field(:bad, 60) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - } - } - field(:unit_chunks, 80436) { - stl_vector(4) { - pointer { - } - } - } - field(:art_images, 80448) { - stl_vector(4) { - pointer { - global :ArtImageCollection - } - } - } - field(:nemesis, 80460) { - compound(:World_TNemesis) { - field(:all, 0) { - stl_vector(4) { - pointer { - global :NemesisRecord - } - } - } - field(:bad, 12) { - stl_vector(4) { - pointer { - global :NemesisRecord - } - } - } - } - } - field(:unk4, 80484) { - number 8, true, nil, BooleanEnum - } - field(:items, 80488) { - compound(:World_TItems) { - field(:all, 0) { - stl_vector(4) { - pointer { - global :Item - } - } - } - field(:other, 12) { - static_array(129, 12, ItemsOtherId) { - stl_vector(4) { - pointer { - global :Item - } - } - } - } - field(:bad, 1560) { - stl_vector(4) { - pointer { - global :Item - } - } - } - field(:bad_tag, 1572) { - stl_vector(4) { - number 32, true - } - } - } - } - field(:artifacts, 82072) { - compound(:World_TArtifacts) { - field(:all, 0) { - stl_vector(4) { - pointer { - global :ArtifactRecord - } - } - } - field(:bad, 12) { - stl_vector(4) { - pointer { - global :ArtifactRecord - } - } - } - } - } - field(:job_list, 82096) { - df_linked_list { - global :JobListLink - } - } - field(:proj_list, 82108) { - df_linked_list { - global :ProjListLink - } - } - field(:buildings, 82120) { - compound(:World_TBuildings) { - field(:all, 0) { - stl_vector(4) { - pointer { - global :Building - } - } - } - field(:other, 12) { - static_array(87, 12, BuildingsOtherId) { - stl_vector(4) { - pointer { - global :Building - } - } - } - } - field(:bad, 1056) { - stl_vector(4) { - pointer { - global :Building - } - } - } - } - } - field(:check_bridge_collapse, 83188) { - number 8, true, nil, BooleanEnum - } - field(:check_machine_collapse, 83189) { - number 8, true, nil, BooleanEnum - } - field(:machines, 83192) { - compound(:World_TMachines) { - field(:all, 0) { - stl_vector(4) { - pointer { - global :Machine - } - } - } - field(:bad, 12) { - stl_vector(4) { - pointer { - global :Machine - } - } - } - } - } - field(:flow_guides, 83216) { - compound(:World_TFlowGuides) { - field(:all, 0) { - stl_vector(4) { - pointer { - } - } - } - field(:bad, 12) { - stl_vector(4) { - pointer { - } - } - } - } - } - field(:anon_2, 83240) { - } - field(:unk_item_classifier, 83320) { - compound(:World_TUnkItemClassifier) { - field(:simple1, 0) { - compound(:World_TUnkItemClassifier_TSimple1) { - field(:anon_1, 0) { - number 8, false - } - field(:food, 1) { - number 8, false - } - field(:anon_2, 2) { - number 8, false - } - field(:anon_3, 3) { - number 8, false - } - } - } - field(:seeds, 4) { - stl_vector(1) { - number 8, false - } - } - field(:plants, 16) { - stl_vector(1) { - number 8, false - } - } - field(:cheese, 28) { - stl_vector(1) { - number 8, false - } - } - field(:meat_fish, 40) { - stl_vector(1) { - number 8, false - } - } - field(:eggs, 52) { - stl_vector(1) { - number 8, false - } - } - field(:leaves, 64) { - stl_vector(1) { - number 8, false - } - } - field(:plant_powder, 76) { - stl_vector(1) { - number 8, false - } - } - field(:simple2, 88) { - compound(:World_TUnkItemClassifier_TSimple2) { - field(:seeds, 0) { - number 8, false - } - field(:plants, 1) { - number 8, false - } - field(:cheese, 2) { - number 8, false - } - field(:fish, 3) { - number 8, false - } - field(:meat, 4) { - number 8, false - } - field(:leaves, 5) { - number 8, false - } - field(:powder, 6) { - number 8, false - } - field(:eggs, 7) { - number 8, false - } - } - } - field(:liquid_plant, 96) { - stl_vector(1) { - number 8, false - } - } - field(:liquid_animal, 108) { - stl_vector(1) { - number 8, false - } - } - field(:liquid_builtin, 120) { - stl_vector(1) { - number 8, false - } - } - field(:simple3, 132) { - compound(:World_TUnkItemClassifier_TSimple3) { - field(:glob_fat, 0) { - number 8, false - } - field(:glob_tallow, 1) { - number 8, false - } - field(:glob_paste, 2) { - number 8, false - } - field(:glob_pressed, 3) { - number 8, false - } - field(:weapons, 4) { - number 8, false - } - field(:shields, 5) { - number 8, false - } - field(:ammo, 6) { - number 8, false - } - field(:coins, 7) { - number 8, false - } - field(:bar_blocks, 8) { - number 8, false - } - field(:gems, 9) { - number 8, false - } - field(:finished_goods, 10) { - number 8, false - } - field(:tanned_skins, 11) { - number 8, false - } - field(:thread_cloth, 12) { - number 8, false - } - field(:anon_1, 13) { - number 8, false - } - field(:anon_2, 14) { - number 8, false - } - field(:anon_3, 15) { - number 8, false - } - } - } - } - } - field(:plants, 83468) { - compound(:World_TPlants) { - field(:all, 0) { - stl_vector(4) { - pointer { - global :Plant - } - } - } - field(:shrub_dry, 12) { - stl_vector(4) { - pointer { - global :Plant - } - } - } - field(:shrub_wet, 24) { - stl_vector(4) { - pointer { - global :Plant - } - } - } - field(:tree_dry, 36) { - stl_vector(4) { - pointer { - global :Plant - } - } - } - field(:tree_wet, 48) { - stl_vector(4) { - pointer { - global :Plant - } - } - } - field(:empty, 60) { - stl_vector(4) { - pointer { - global :Plant - } - } - } - } - } - field(:quests, 83540) { - df_linked_list { - global :QuestListLink - } - } - field(:enemy_status_cache, 83552) { - compound(:World_TEnemyStatusCache) { - field(:slot_used, 0) { - static_array(500, 1) { - number 8, true, nil, BooleanEnum - } - } - field(:rel_map, 500) { - static_array(500, 500) { - static_array(500, 1) { - number 8, false - } - } - } - field(:next_slot, 250500) { - number 32, true - } - } - } - field(:schedules, 334056) { - compound(:World_TSchedules) { - field(:all, 0) { - stl_vector(4) { - pointer { - } - } - } - field(:bad, 12) { - stl_vector(4) { - pointer { - } - } - } - } - } - field(:squads, 334080) { - compound(:World_TSquads) { - field(:all, 0) { - stl_vector(4) { - pointer { - global :Squad - } - } - } - field(:bad, 12) { - stl_vector(4) { - pointer { - global :Squad - } - } - } - } - } - field(:unk_518dc, 334104) { - compound(:World_TUnk518dc) { - field(:all, 0) { - stl_vector(4) { - pointer { - number 32, true - } - } - } - field(:bad, 12) { - stl_vector(4) { - pointer { - } - } - } - } - } - field(:activities, 334128) { - compound(:World_TActivities) { - field(:all, 0) { - stl_vector(4) { - pointer { - global :ActivityEntry - } - } - } - field(:bad, 12) { - stl_vector(4) { - pointer { - global :ActivityEntry - } - } - } - } - } - field(:status, 334152) { - compound(:World_TStatus) { - field(:reports, 0) { - stl_vector(4) { - pointer { - global :Report - } - } - } - field(:announcements, 12) { - stl_vector(4) { - pointer { - global :Report - } - } - } - field(:popups, 24) { - stl_vector(4) { - pointer { - global :PopupMessage - } - } - } - field(:next_report_id, 36) { - number 32, true - } - field(:anon_1, 40) { - number 32, true - } - field(:display_timer, 44) { - number 32, true - } - field(:slots, 48) { - static_array(100, 48) { - compound(:World_TStatus_TSlots) { - field(:id, 0) { - number 16, true - } - field(:info, 4) { - } - field(:unk3a, 28) { - stl_string - } - field(:unk3b, 32) { - stl_string - } - field(:unk3c, 36) { - stl_string - } - field(:unk3d, 40) { - stl_string - } - field(:unk4, 44) { - number 32, true - } - } - } - } - field(:slot_id_used, 4848) { - static_array(34, 2) { - number 16, true - } - } - field(:slot_id_idx1, 4916) { - static_array(34, 2) { - number 16, true - } - } - field(:slot_id_idx2, 4984) { - static_array(34, 2) { - number 16, true - } - } - field(:slots_used, 5052) { - number 16, true - } - } - } - field(:interaction_instances, 339208) { - compound(:World_TInteractionInstances) { - field(:all, 0) { - stl_vector(4) { - pointer { - } - } - } - field(:bad, 12) { - stl_vector(4) { - pointer { - } - } - } - } - } - field(:written_contents, 339232) { - compound(:World_TWrittenContents) { - field(:all, 0) { - stl_vector(4) { - pointer { - } - } - } - field(:bad, 12) { - stl_vector(4) { - pointer { - } - } - } - } - } - field(:assumed_identities, 339256) { - compound(:World_TAssumedIdentities) { - field(:all, 0) { - stl_vector(4) { - pointer { - global :AssumedIdentity - } - } - } - field(:bad, 12) { - stl_vector(4) { - pointer { - global :AssumedIdentity - } - } - } - } - } - field(:deaths, 339280) { - compound(:World_TDeaths) { - field(:all, 0) { - stl_vector(4) { - pointer { - global :DeathInfo - } - } - } - field(:bad, 12) { - stl_vector(4) { - pointer { - global :DeathInfo - } - } - } - } - } - field(:criminal_cases, 339304) { - compound(:World_TCriminalCases) { - field(:all, 0) { - stl_vector(4) { - pointer { - global :CriminalCase - } - } - } - field(:bad, 12) { - stl_vector(4) { - pointer { - global :CriminalCase - } - } - } - } - } - field(:vehicles, 339328) { - compound(:World_TVehicles) { - field(:all, 0) { - stl_vector(4) { - pointer { - global :Vehicle - } - } - } - field(:active, 12) { - stl_vector(4) { - pointer { - global :Vehicle - } - } - } - field(:bad, 24) { - stl_vector(4) { - pointer { - global :Vehicle - } - } - } - } - } - field(:selected_building, 339364) { - pointer { - global :Building - } - } - field(:selected_stockpile_type, 339368) { - number 16, true, nil, StockpileCategory - } - field(:update_selected_building, 339370) { - number 8, true, nil, BooleanEnum - } - field(:building_width, 339372) { - number 16, true - } - field(:building_height, 339374) { - number 16, true - } - field(:selected_direction, 339376) { - number 8, false, nil, ScrewPumpDirection - } - field(:map, 339380) { - compound(:World_TMap) { - field(:map_blocks, 0) { - stl_vector(4) { - pointer { - global :MapBlock - } - } - } - field(:block_index, 12) { - pointer_ary(4) { - pointer_ary(4) { - pointer_ary(4) { - pointer { - global :MapBlock - } - } - } - } - } - field(:map_block_columns, 16) { - stl_vector(4) { - pointer { - global :MapBlockColumn - } - } - } - field(:column_index, 28) { - pointer_ary(4) { - pointer_ary(4) { - pointer { - global :MapBlockColumn - } - } - } - } - field(:x_count_block, 32) { - number 32, true - } - field(:y_count_block, 36) { - number 32, true - } - field(:z_count_block, 40) { - number 32, true - } - field(:x_count, 44) { - number 32, true - } - field(:y_count, 48) { - number 32, true - } - field(:z_count, 52) { - number 32, true - } - field(:region_x, 56) { - number 32, true - } - field(:region_y, 60) { - number 32, true - } - field(:region_z, 64) { - number 32, true - } - field(:unknown_52d20, 68) { - static_array(2810, 2) { - number 16, true - } - } - field(:z_level_flags, 5688) { - pointer_ary(4) { - global :ZLevelFlags - } - } - } - } - field(:world_data, 345072) { - pointer { - global :WorldData - } - } - field(:anon_3, 345076) { - } - field(:unk_54318, 345080) { - compound(:World_TUnk54318) { - field(:anon_1, 0) { - } - field(:anon_2, 1188) { - stl_vector - } - field(:anon_3, 1200) { - stl_vector - } - field(:anon_4, 1212) { - } - field(:anon_5, 1220) { - stl_vector - } - field(:anon_6, 1232) { - stl_vector - } - field(:anon_7, 1244) { - } - field(:anon_8, 1252) { - number 8, true, nil, BooleanEnum - } - field(:anon_9, 1256) { - stl_string - } - field(:anon_10, 1260) { - stl_string - } - field(:anon_11, 1264) { - stl_string - } - field(:anon_12, 1268) { - stl_string - } - field(:anon_13, 1272) { - stl_string - } - field(:anon_14, 1276) { - } - field(:anon_15, 1284) { - stl_vector - } - field(:anon_16, 1296) { - stl_vector - } - field(:anon_17, 1308) { - } - field(:anon_18, 1316) { - stl_vector - } - field(:anon_19, 1328) { - stl_vector - } - field(:anon_20, 1340) { - } - field(:anon_21, 1348) { - static_array(10, 12) { - stl_vector - } - } - field(:anon_22, 1468) { - static_array(10, 12) { - stl_vector - } - } - field(:anon_23, 1588) { - static_array(10, 12) { - stl_vector - } - } - field(:anon_24, 1708) { - stl_vector - } - field(:anon_25, 1720) { - stl_vector - } - field(:anon_26, 1732) { - stl_vector - } - field(:anon_27, 1744) { - stl_vector - } - field(:anon_28, 1756) { - stl_vector - } - field(:anon_29, 1768) { - stl_vector - } - } - } - field(:anon_4, 346860) { - } - field(:unk_54a0c, 346868) { - number 32, true - } - field(:unk_54a10, 346872) { - number 32, true - } - field(:raws, 346876) { - global :WorldRaws - } - field(:unk_59dc4, 368708) { - compound(:World_TUnk59dc4) { - field(:regions, 0) { - global :Coord2dPath - } - field(:unk1, 24) { - stl_vector(4) { - pointer { - compound(:World_TUnk59dc4_TUnk1) { - sizeof 36 - - field(:ref, 0) { - global :WorldPopulationRef - } - field(:unk, 24) { - stl_vector(4) { - number 32, true - } - } - } - } - } - } - } - } - field(:flow_engine, 368744) { - compound(:World_TFlowEngine) { - field(:rnd_16, 0) { - number 8, false - } - field(:rnd_256, 2) { - number 16, true - } - field(:rnd_pos, 4) { - number 16, true - } - field(:rnd_x, 6) { - static_array(16, 2) { - number 16, true - } - } - field(:rnd_y, 38) { - static_array(16, 2) { - number 16, true - } - } - field(:block_idx, 72) { - number 32, true - } - field(:unk7a, 76) { - stl_vector(2) { - number 16, true - } - } - field(:unk7b, 88) { - stl_vector(2) { - number 16, true - } - } - field(:unk7c, 100) { - stl_vector(2) { - number 16, true - } - } - field(:unk7_cntdn, 112) { - stl_vector(2) { - number 16, true - } - } - field(:unk8, 124) { - stl_vector(4) { - number 32, true - } - } - field(:flags, 136) { - df_flagarray - } - } - } - field(:unk_59e78, 368888) { - number 32, true - } - field(:worldgen, 368892) { - compound(:World_TWorldgen) { - field(:version, 0) { - stl_string - } - field(:next_unit_chunk_id, 4) { - number 32, true - } - field(:next_unit_chunk_offset, 8) { - number 16, true - } - field(:next_art_image_chunk_id, 12) { - number 32, true - } - field(:next_art_image_chunk_offset, 16) { - number 16, true - } - field(:worldgen_parms, 20) { - compound(:World_TWorldgen_TWorldgenParms) { - field(:title, 0) { - stl_string - } - field(:seed, 4) { - stl_string - } - field(:history_seed, 8) { - stl_string - } - field(:name_seed, 12) { - stl_string - } - field(:creature_seed, 16) { - stl_string - } - field(:dim_x, 20) { - number 32, true - } - field(:dim_y, 24) { - number 32, true - } - field(:custom_name, 28) { - stl_string - } - field(:has_seed, 32) { - number 8, true, nil, BooleanEnum - } - field(:has_history_seed, 33) { - number 8, true, nil, BooleanEnum - } - field(:has_name_seed, 34) { - number 8, true, nil, BooleanEnum - } - field(:has_creature_seed, 35) { - number 8, true, nil, BooleanEnum - } - field(:embark_points, 36) { - number 32, true - } - field(:peak_number_min, 40) { - number 32, true - } - field(:partial_ocean_edge_min, 44) { - number 32, true - } - field(:complete_ocean_edge_min, 48) { - number 32, true - } - field(:volcano_min, 52) { - number 32, true - } - field(:region_counts, 56) { - static_array(3, 40) { - static_array(10, 4, WorldgenRegionType) { - number 32, true - } - } - } - field(:river_mins, 176) { - static_array(2, 4) { - number 32, true - } - } - field(:subregion_max, 184) { - number 32, true - } - field(:cavern_layer_count, 188) { - number 32, true - } - field(:cavern_layer_openness_min, 192) { - number 32, true - } - field(:cavern_layer_openness_max, 196) { - number 32, true - } - field(:cavern_layer_passage_density_min, 200) { - number 32, true - } - field(:cavern_layer_passage_density_max, 204) { - number 32, true - } - field(:cavern_layer_water_min, 208) { - number 32, true - } - field(:cavern_layer_water_max, 212) { - number 32, true - } - field(:have_bottom_layer_1, 216) { - number 8, true, nil, BooleanEnum - } - field(:have_bottom_layer_2, 217) { - number 8, true, nil, BooleanEnum - } - field(:levels_above_ground, 220) { - number 32, true - } - field(:levels_above_layer_1, 224) { - number 32, true - } - field(:levels_above_layer_2, 228) { - number 32, true - } - field(:levels_above_layer_3, 232) { - number 32, true - } - field(:levels_above_layer_4, 236) { - number 32, true - } - field(:levels_above_layer_5, 240) { - number 32, true - } - field(:levels_at_bottom, 244) { - number 32, true - } - field(:cave_min_size, 248) { - number 32, true - } - field(:cave_max_size, 252) { - number 32, true - } - field(:mountain_cave_min, 256) { - number 32, true - } - field(:non_mountain_cave_min, 260) { - number 32, true - } - field(:total_civ_number, 264) { - number 32, true - } - field(:rain_ranges_1, 268) { - number 32, true - } - field(:rain_ranges_0, 272) { - number 32, true - } - field(:rain_ranges_2, 276) { - number 32, true - } - field(:drainage_ranges_1, 280) { - number 32, true - } - field(:drainage_ranges_0, 284) { - number 32, true - } - field(:drainage_ranges_2, 288) { - number 32, true - } - field(:savagery_ranges_1, 292) { - number 32, true - } - field(:savagery_ranges_0, 296) { - number 32, true - } - field(:savagery_ranges_2, 300) { - number 32, true - } - field(:volcanism_ranges_1, 304) { - number 32, true - } - field(:volcanism_ranges_0, 308) { - number 32, true - } - field(:volcanism_ranges_2, 312) { - number 32, true - } - field(:ranges, 316) { - static_array(4, 96) { - static_array(24, 4, WorldgenRangeType) { - number 32, true - } - } - } - field(:beast_end_year, 700) { - number 32, true - } - field(:end_year, 704) { - number 32, true - } - field(:beast_end_year_percent, 708) { - number 32, true - } - field(:total_civ_population, 712) { - number 32, true - } - field(:site_cap, 716) { - number 32, true - } - field(:elevation_ranges_1, 720) { - number 32, true - } - field(:elevation_ranges_0, 724) { - number 32, true - } - field(:elevation_ranges_2, 728) { - number 32, true - } - field(:mineral_scarcity, 732) { - number 32, true - } - field(:megabeast_cap, 736) { - number 32, true - } - field(:semimegabeast_cap, 740) { - number 32, true - } - field(:titan_number, 744) { - number 32, true - } - field(:titan_attack_trigger, 748) { - static_array(3, 4) { - number 32, true - } - } - field(:demon_number, 760) { - number 32, true - } - field(:night_creature_number, 764) { - number 32, true - } - field(:good_sq_counts_0, 768) { - number 32, true - } - field(:evil_sq_counts_0, 772) { - number 32, true - } - field(:good_sq_counts_1, 776) { - number 32, true - } - field(:evil_sq_counts_1, 780) { - number 32, true - } - field(:good_sq_counts_2, 784) { - number 32, true - } - field(:evil_sq_counts_2, 788) { - number 32, true - } - field(:elevation_frequency, 792) { - static_array(6, 4) { - number 32, true - } - } - field(:rain_frequency, 816) { - static_array(6, 4) { - number 32, true - } - } - field(:drainage_frequency, 840) { - static_array(6, 4) { - number 32, true - } - } - field(:savagery_frequency, 864) { - static_array(6, 4) { - number 32, true - } - } - field(:temperature_frequency, 888) { - static_array(6, 4) { - number 32, true - } - } - field(:volcanism_frequency, 912) { - static_array(6, 4) { - number 32, true - } - } - field(:ps, 936) { - pointer { - } - } - field(:reveal_all_history, 940) { - number 32, true - } - field(:cull_historical_figures, 944) { - number 32, true - } - field(:erosion_cycle_count, 948) { - number 32, true - } - field(:periodically_erode_extremes, 952) { - number 32, true - } - field(:orographic_precipitation, 956) { - number 32, true - } - field(:playable_civilization_required, 960) { - number 32, true - } - field(:all_caves_visible, 964) { - number 32, true - } - field(:show_embark_tunnel, 968) { - number 32, true - } - field(:anon_1, 972) { - number 8, true, nil, BooleanEnum - } - } - } - } - } - field(:anon_5, 369888) { - } - field(:history, 369920) { - global :WorldHistory - } - field(:entity_populations, 370240) { - stl_vector(4) { - pointer { - global :EntityPopulation - } - } - } - field(:reindex_pathfinding, 370252) { - number 8, true, nil, BooleanEnum - } - field(:frame_counter, 370256) { - number 32, true - } - field(:unk_5a39c, 370260) { - compound(:World_TUnk5a39c) { - field(:orphaned_flows, 0) { - stl_vector(4) { - pointer { - global :FlowInfo - } - } - } - field(:unk, 12) { - static_array(80000, 16) { - compound(:World_TUnk5a39c_TUnk) { - field(:unk1a, 0) { - number 16, false - } - field(:tag, 2) { - number 16, false - } - field(:unk2, 4) { - number 32, true - } - field(:x, 8) { - number 16, true - } - field(:y, 10) { - number 16, true - } - field(:z, 12) { - number 32, true - } - } - } - } - field(:anon_1, 1280012) { - number 32, true - } - field(:pos1, 1280016) { - global :Coord - } - field(:pos2, 1280022) { - global :Coord - } - field(:anon_2, 1280028) { - number 32, true - } - field(:anon_3, 1280032) { - number 32, true - } - field(:anon_4, 1280036) { - number 32, true - } - field(:anon_5, 1280040) { - number 16, false - } - field(:tag, 1280042) { - number 16, false - } - field(:anon_6, 1280044) { - number 8, true, nil, BooleanEnum - } - field(:anon_7, 1280046) { - number 16, false - } - field(:anon_8, 1280048) { - number 8, true, nil, BooleanEnum - } - field(:anon_9, 1280050) { - number 16, true - } - field(:plant_update_step, 1280052) { - number 16, true - } - field(:anon_10, 1280054) { - number 8, true, nil, BooleanEnum - } - field(:anon_11, 1280056) { - number 32, true - } - } - } - field(:cur_savegame, 1650320) { - compound(:World_TCurSavegame) { - field(:save_dir, 0) { - stl_string - } - field(:anon_1, 4) { - } - field(:map_features, 8) { - stl_vector(4) { - pointer { - global :FeatureInit - } - } - } - field(:anon_2, 20) { - static_array(18, 12) { - stl_vector - } - } - } - } - field(:unk_192cc4, 1650556) { - number 32, true - } - field(:arena_spawn, 1650560) { - compound(:World_TArenaSpawn) { - field(:race, 0) { - stl_vector(2) { - number 16, true - } - } - def race_tg ; race.map { |i| df.world.raws.creatures.all[i] } ; end - field(:caste, 12) { - stl_vector(2) { - number 16, true - } - } - field(:type, 24) { - number 32, true - } - field(:anon_1, 28) { - stl_string - } - field(:item_types, 32) { - static_array(105, 12) { - stl_vector(4) { - pointer { - compound(:World_TArenaSpawn_TItemTypes) { - sizeof 16 - - field(:item_type, 0) { - number 16, true, nil, ItemType - } - field(:item_subtype, 2) { - number 16, true - } - field(:mattype, 4) { - number 16, true - } - field(:matindex, 8) { - number 32, true - } - field(:anon_1, 12) { - number 8, true, nil, BooleanEnum - } - } - } - } - } - } - field(:anon_2, 1292) { - stl_vector - } - field(:anon_3, 1304) { - stl_vector - } - field(:anon_4, 1316) { - stl_vector - } - field(:equipment, 1328) { - compound(:World_TArenaSpawn_TEquipment) { - field(:skills, 0) { - stl_vector(2) { - number 16, true, nil, JobSkill - } - } - field(:skill_levels, 12) { - stl_vector(4) { - number 32, true - } - } - field(:item_types, 24) { - stl_vector(2) { - number 16, true, nil, ItemType - } - } - field(:item_subtypes, 36) { - stl_vector(2) { - number 16, true - } - } - field(:item_materials, 48) { - global :MaterialVecRef - } - field(:item_counts, 72) { - stl_vector(4) { - number 32, true - } - } - } - } - field(:side, 1412) { - number 32, true - } - field(:interaction, 1416) { - number 32, true - } - field(:interactions, 1420) { - stl_vector(4) { - pointer { - } - } - } - field(:creature_cnt, 1432) { - stl_vector(4) { - number 32, true - } - } - } - } - field(:unk_19325c, 1652004) { - compound(:World_TUnk19325c) { - field(:anon_1, 0) { - stl_vector(4) { - pointer { - compound(:World_TUnk19325c_TAnon1) { - sizeof 24 - - field(:anon_1, 0) { - number 32, true - } - field(:anon_2, 4) { - number 32, true - } - field(:anon_3, 8) { - number 16, true - } - field(:anon_4, 12) { - number 32, true - } - field(:anon_5, 16) { - number 32, true - } - field(:anon_6, 20) { - number 32, true - } - } - } - } - } - field(:anon_2, 12) { - stl_vector(4) { - pointer { - compound(:World_TUnk19325c_TAnon2) { - sizeof 8 - - field(:anon_1, 0) { - number 32, true - } - field(:anon_2, 4) { - number 32, true - } - } - } - } - } - field(:anon_3, 24) { - stl_vector(4) { - pointer { - compound(:World_TUnk19325c_TAnon3) { - sizeof 16 - - field(:anon_1, 0) { - number 16, true - } - field(:anon_2, 4) { - number 32, true - } - field(:anon_3, 8) { - number 32, true - } - field(:anon_4, 12) { - number 32, true - } - } - } - } - } - field(:anon_4, 36) { - number 32, true - } - field(:anon_5, 40) { - number 32, true - } - field(:anon_6, 44) { - number 32, true - } - } - } -end - -class WorldData < MemHack::Compound - sizeof 564 - - field(:name, 0) { - global :LanguageName - } - field(:unk1, 60) { - static_array(15, 1) { - number 8, false - } - } - field(:next_site_id, 76) { - number 32, true - } - field(:next_site_unk136_id, 80) { - number 32, true - } - field(:next_unk_140_id, 84) { - number 32, true - } - field(:next_unk_150_id, 88) { - number 32, true - } - field(:anon_1, 92) { - number 32, true - } - field(:anon_2, 96) { - number 32, true - } - field(:world_width, 100) { - number 32, true - } - field(:world_height, 104) { - number 32, true - } - field(:unk2, 108) { - stl_vector(4) { - pointer { - compound(:WorldData_TUnk2) { - sizeof 84 - - field(:unk_0, 0) { - number 16, true - } - field(:unk_2, 2) { - number 16, true - } - field(:unk_4, 4) { - number 16, true - } - field(:unk_c, 8) { - number 32, true - } - field(:unk_10, 12) { - number 32, true - } - field(:unk_14, 16) { - stl_vector(4) { - pointer { - } - } - } - field(:unk_24, 28) { - number 32, true - } - field(:flags, 32) { - df_flagarray - } - field(:unk_30, 40) { - stl_vector - } - field(:unk_40, 52) { - stl_vector - } - field(:unk_70, 64) { - number 16, true - } - field(:unk_72, 66) { - number 16, true - } - field(:unk_74, 68) { - number 16, true - } - field(:unk_7c, 72) { - number 32, true - } - field(:unk_80, 76) { - number 32, true - } - field(:unk_84, 80) { - number 32, true - } - } - } - } - } - field(:anon_3, 120) { - number 32, true - } - field(:anon_4, 124) { - number 32, true - } - field(:anon_5, 128) { - number 16, true - } - field(:anon_6, 130) { - number 16, true - } - field(:anon_7, 132) { - number 16, true - } - field(:anon_8, 134) { - number 16, true - } - field(:anon_9, 136) { - number 16, true - } - field(:anon_10, 138) { - number 16, true - } - field(:anon_11, 140) { - number 16, true - } - field(:anon_12, 142) { - number 16, true - } - field(:world_width2, 144) { - number 32, true - } - field(:world_height2, 148) { - number 32, true - } - field(:anon_13, 152) { - pointer_ary(4) { - number 32, false - } - } - field(:anon_14, 156) { - pointer_ary(4) { - number 32, false - } - } - field(:anon_15, 160) { - pointer_ary(4) { - number 32, false - } - } - field(:anon_16, 164) { - pointer_ary(1) { - number 8, false - } - } - field(:region_details, 168) { - stl_vector(4) { - pointer { - global :WorldRegionDetails - } - } - } - field(:unk_dc, 180) { - number 32, true - } - field(:unk_e0, 184) { - number 32, true - } - field(:unk_e4, 188) { - number 32, true - } - field(:unk_e8, 192) { - number 32, true - } - field(:unk_ec, 196) { - number 32, true - } - field(:unk_f0, 200) { - number 32, true - } - field(:construction_squares, 204) { - compound(:WorldData_TConstructionSquares) { - field(:width, 0) { - number 16, true - } - field(:height, 2) { - number 16, true - } - field(:table, 4) { - pointer_ary(4) { - pointer_ary(12) { - stl_vector(4) { - pointer { - } - } - } - } - } - } - } - field(:constructions, 212) { - stl_vector(4) { - pointer { - } - } - } - field(:next_construction_id, 224) { - number 32, true - } - field(:unk_110, 228) { - static_array(2, 8) { - compound(:WorldData_TUnk110) { - field(:table, 0) { - pointer_ary(4) { - pointer_ary(24) { - compound(:WorldData_TUnk110_TTable) { - sizeof 24 - - field(:unk1, 0) { - stl_vector(4) { - number 32, true - } - } - field(:unk2, 12) { - stl_vector(4) { - pointer_ary(1) { - number 8, false - } - } - } - } - } - } - } - field(:width, 4) { - number 16, true - } - field(:height, 6) { - number 16, true - } - } - } - } - field(:sites, 244) { - stl_vector(4) { - pointer { - global :WorldSite - } - } - } - field(:site_unk130, 256) { - stl_vector(4) { - pointer { - global :WorldSiteUnk130 - } - } - } - field(:unk_140, 268) { - stl_vector(4) { - pointer { - compound(:WorldData_TUnk140) { - sizeof 1232 - - field(:index, 0) { - number 32, true - } - field(:resource_allotments, 4) { - static_array(100, 12) { - stl_vector(4) { - pointer { - global :ResourceAllotmentSpecifier - } - } - } - } - field(:unk1, 1204) { - number 32, true - } - field(:unk2, 1208) { - number 32, true - } - field(:unk3, 1212) { - number 32, true - } - field(:unk_650, 1216) { - number 32, true - } - field(:unk_654, 1220) { - stl_vector - } - } - } - } - } - field(:unk_150, 280) { - stl_vector(4) { - pointer { - compound(:WorldData_TUnk150) { - sizeof 44 - - field(:index, 0) { - number 32, true - } - field(:unk_4, 4) { - number 32, true - } - field(:unk_8, 8) { - stl_vector(4) { - pointer { - compound(:WorldData_TUnk150_TUnk8) { - sizeof 12 - - field(:index, 0) { - number 32, true - } - field(:unk_4, 4) { - number 32, true - } - field(:unk_8, 8) { - number 32, true - } - } - } - } - } - field(:unk_18, 20) { - stl_vector(4) { - pointer { - compound(:WorldData_TUnk150_TUnk18) { - sizeof 12 - - field(:index, 0) { - number 32, true - } - field(:unk_4, 4) { - number 32, true - } - field(:unk_8, 8) { - number 32, true - } - } - } - } - } - field(:unk_28, 32) { - stl_vector(4) { - pointer { - compound(:WorldData_TUnk150_TUnk28) { - sizeof 8 - - field(:unk_0, 0) { - number 32, true - } - field(:unk_4, 4) { - number 32, true - } - } - } - } - } - } - } - } - } - field(:anon_17, 292) { - stl_vector(4) { - pointer { - } - } - } - field(:anon_18, 304) { - stl_vector(4) { - pointer { - } - } - } - field(:building_data, 316) { - stl_vector(4) { - pointer { - } - } - } - field(:landmasses, 328) { - stl_vector(4) { - pointer { - global :WorldLandmass - } - } - } - field(:regions, 340) { - stl_vector(4) { - pointer { - global :WorldRegion - } - } - } - field(:underground_regions, 352) { - stl_vector(4) { - pointer { - global :WorldUndergroundRegion - } - } - } - field(:geo_biomes, 364) { - stl_vector(4) { - pointer { - global :WorldGeoBiome - } - } - } - field(:mountain_peaks, 376) { - stl_vector(4) { - pointer { - compound(:WorldData_TMountainPeaks) { - sizeof 76 - - field(:name, 0) { - global :LanguageName - } - field(:pos, 60) { - global :Coord2d - } - field(:flags, 64) { - df_flagarray - } - field(:unk_78, 72) { - number 16, true - } - } - } - } - } - field(:rivers, 388) { - stl_vector(4) { - pointer { - global :WorldRiver - } - } - } - field(:region_map, 400) { - pointer_ary(4) { - pointer_ary(88) { - compound(:WorldData_TRegionMap) { - sizeof 88 - - field(:unk_0, 0) { - number 32, true - } - field(:unk_4, 4) { - } - field(:sites, 8) { - stl_vector(4) { - pointer { - global :WorldSite - } - } - } - field(:flags, 20) { - df_flagarray - } - field(:elevation, 28) { - number 16, true - } - field(:wetness, 30) { - number 16, true - } - field(:vegetation, 32) { - number 16, true - } - field(:temperature, 34) { - number 16, true - } - field(:evilness, 36) { - number 16, true - } - field(:hilliness, 38) { - number 16, true - } - field(:unk_2c, 40) { - number 16, true - } - field(:savagery, 42) { - number 16, true - } - field(:unk_30, 44) { - number 16, true - } - field(:unk_32, 46) { - number 16, true - } - field(:unk_34, 48) { - number 16, true - } - field(:unk_36, 50) { - number 16, true - } - field(:unk_38, 52) { - number 16, true - } - field(:unk_3a, 54) { - number 16, true - } - field(:saltiness, 56) { - number 16, true - } - field(:unk_3e, 58) { - global :Coord - } - field(:unk_44, 64) { - global :Coord - } - field(:unk_4a, 70) { - global :Coord - } - field(:region_id, 76) { - number 32, true - } - def region_tg ; df.world.world_data.regions[region_id] ; end - field(:landmass_id, 80) { - number 32, true - } - def landmass_tg ; df.world.world_data.landmasses[landmass_id] ; end - field(:geo_index, 84) { - number 16, true - } - def geo_index_tg ; df.world.world_data.geo_biomes[geo_index] ; end - } - } - } - } - field(:unk_1c4, 404) { - pointer { - } - } - field(:unk_1c8, 408) { - } - field(:unk_1cc, 412) { - stl_vector - } - field(:unk_1dc, 424) { - pointer_ary(4) { - pointer_ary(12) { - stl_vector - } - } - } - field(:unk_1e0, 428) { - pointer_ary(4) { - pointer_ary(12) { - stl_vector - } - } - } - field(:unk_1e4, 432) { - pointer_ary(4) { - pointer_ary(12) { - stl_vector - } - } - } - field(:unk_1e8, 436) { - pointer_ary(4) { - pointer_ary(12) { - stl_vector - } - } - } - field(:unk_1ec, 440) { - pointer_ary(4) { - pointer_ary(12) { - stl_vector - } - } - } - field(:unk_1f0, 444) { - pointer_ary(4) { - pointer_ary(12) { - stl_vector - } - } - } - field(:active_site, 448) { - stl_vector(4) { - pointer { - global :WorldSite - } - } - } - field(:unk_204, 460) { - pointer_ary(4) { - pointer_ary(16) { - compound(:WorldData_TUnk204) { - sizeof 16 - - field(:x, 0) { - number 16, true - } - field(:y, 2) { - number 16, true - } - field(:features, 4) { - pointer { - compound(:WorldData_TUnk204_TFeatures) { - sizeof 33792 - - field(:feature_init, 0) { - static_array(16, 192) { - static_array(16, 12) { - stl_vector(4) { - pointer { - global :FeatureInit - } - } - } - } - } - field(:unk, 3072) { - static_array(16, 1920) { - static_array(16, 120) { - static_array(30, 4) { - number 32, true - } - } - } - } - } - } - } - field(:unk_8, 8) { - pointer_ary(2) { - number 16, true - } - } - field(:unk_c, 12) { - pointer_ary(4) { - number 32, true - } - } - } - } - } - } - field(:flags, 464) { - df_flagarray - } - field(:old_sites, 472) { - stl_vector(4) { - number 32, true - } - } - def old_sites_tg ; old_sites.map { |i| df.world.world_data.sites[i] } ; end - field(:old_site_x, 484) { - stl_vector(4) { - number 32, true - } - } - field(:old_site_y, 496) { - stl_vector(4) { - number 32, true - } - } - field(:land_rgns, 508) { - global :Coord2dPath - } - field(:unk_260, 532) { - number 32, true - } - field(:unk_264, 536) { - number 8, false - } - field(:unk_265, 537) { - } - field(:unk_268, 540) { - } - field(:unk_26c, 544) { - number 8, false - } - field(:unk_26d, 545) { - } - field(:unk_270, 548) { - number 32, true - } - field(:unk_274, 552) { - stl_vector(4) { - pointer { - compound(:WorldData_TUnk274) { - sizeof 44 - - field(:unk_0, 0) { - stl_vector(4) { - pointer { - global :HistoricalFigure - } - } - } - field(:unk_10, 12) { - stl_vector(4) { - pointer { - compound(:WorldData_TUnk274_TUnk10) { - sizeof 12 - - field(:unk_0, 0) { - number 32, true - } - field(:unk_4, 4) { - number 32, true - } - field(:unk_8, 8) { - number 32, true - } - } - } - } - } - field(:unk_20, 24) { - pointer { - global :HistoricalEntity - } - } - field(:unk_24, 28) { - number 32, true - } - field(:unk_28, 32) { - pointer { - global :LanguageName - } - } - field(:unk_2c, 36) { - number 32, true - } - field(:unk_30, 40) { - number 32, true - } - } - } - } - } -end - -class WorldGeoBiome < MemHack::Compound - sizeof 16 - - field(:unk1, 0) { - number 16, true - } - field(:index, 2) { - number 16, true - } - field(:layers, 4) { - stl_vector(4) { - pointer { - global :WorldGeoLayer - } - } - } -end - -class WorldGeoLayer < MemHack::Compound - sizeof 60 - - field(:type, 0) { - number 16, true, nil, GeoLayerType - } - field(:mat_index, 4) { - number 32, true - } - def mat_index_tg ; df.world.raws.inorganics[mat_index] ; end - field(:vein_mat, 8) { - stl_vector(4) { - number 32, true - } - } - def vein_mat_tg ; vein_mat.map { |i| df.world.raws.inorganics[i] } ; end - field(:vein_nested_in, 20) { - stl_vector(2) { - number 16, true - } - } - field(:vein_type, 32) { - stl_vector(1) { - number 8, false, nil, InclusionType - } - } - field(:vein_unk_38, 44) { - stl_vector(1) { - number 8, false - } - } - field(:top_height, 56) { - number 16, true - } - field(:bottom_height, 58) { - number 16, true - } -end - -class WorldHistory < MemHack::Compound - sizeof 320 - - field(:events, 0) { - stl_vector(4) { - pointer { - global :HistoryEvent - } - } - } - field(:events2, 12) { - stl_vector(4) { - pointer { - global :HistoryEvent - } - } - } - field(:figures, 24) { - stl_vector(4) { - pointer { - global :HistoricalFigure - } - } - } - field(:event_collections, 36) { - compound(:WorldHistory_TEventCollections) { - field(:all, 0) { - stl_vector(4) { - pointer { - global :HistoryEventCollection - } - } - } - field(:other, 12) { - static_array(8, 12) { - stl_vector(4) { - pointer { - global :HistoryEventCollection - } - } - } - } - } - } - field(:ages, 144) { - stl_vector(4) { - pointer { - } - } - } - field(:unk1, 156) { - stl_vector(4) { - number 32, true - } - } - field(:unk2, 168) { - stl_vector(2) { - number 16, true - } - } - field(:anon_1, 180) { - number 32, true - } - field(:anon_2, 184) { - number 32, true - } - field(:anon_3, 188) { - number 32, true - } - field(:anon_4, 192) { - number 32, true - } - field(:anon_5, 196) { - stl_vector - } - field(:anon_6, 208) { - stl_vector - } - field(:anon_7, 220) { - stl_vector - } - field(:anon_8, 232) { - stl_vector - } - field(:anon_9, 244) { - stl_vector - } - field(:anon_10, 256) { - stl_vector - } - field(:anon_11, 268) { - number 8, true, nil, BooleanEnum - } - field(:anon_12, 272) { - stl_vector - } - field(:anon_13, 284) { - stl_vector - } - field(:anon_14, 296) { - stl_vector - } - field(:anon_15, 308) { - number 32, true - } - field(:anon_16, 312) { - number 32, true - } - field(:anon_17, 316) { - number 32, true - } -end - -class WorldLandmass < MemHack::Compound - sizeof 92 - - field(:name, 0) { - global :LanguageName - } - field(:index, 60) { - number 32, true - } - field(:area, 64) { - number 32, true - } - field(:unk_74, 68) { - stl_vector - } - field(:unk_84, 80) { - stl_vector - } -end - -class WorldPopulation < MemHack::Compound - sizeof 32 - - field(:type, 0) { - number 16, true, nil, WorldPopulationType - } - field(:race, 2) { - number 16, true - } - def race_tg ; df.world.raws.creatures.all[race] ; end - field(:plant, 2) { - number 16, true - } - def plant_tg ; df.world.raws.plants.all[plant] ; end - field(:count_min, 4) { - number 32, true, 10000001 - } - field(:count_max, 8) { - number 32, true, 10000001 - } - field(:owner, 12) { - number 32, true - } - def owner_tg ; df.world.entities.all[owner] ; end - field(:unk_10, 16) { - number 32, true, -1 - } - field(:unk_14, 20) { - number 32, true, -1 - } - field(:anon_1, 24) { - number 32, true, -1 - } - field(:anon_2, 28) { - number 32, true, -1 - } -end - -class WorldPopulationRef < MemHack::Compound - sizeof 24 - - field(:region_x, 0) { - number 16, true - } - field(:region_y, 2) { - number 16, true - } - field(:feature_idx, 4) { - number 16, true, -1 - } - field(:cave_id, 8) { - number 32, true - } - def cave_tg ; df.world.world_data.underground_regions[cave_id] ; end - field(:unk_28, 12) { - number 32, true - } - field(:population_idx, 16) { - number 32, true - } - field(:unk_30, 20) { - number 16, true - } -end - -class WorldRaws < MemHack::Compound - sizeof 21832 - - field(:material_templates, 0) { - stl_vector(4) { - pointer { - global :MaterialTemplate - } - } - } - field(:inorganics, 12) { - stl_vector(4) { - pointer { - global :InorganicRaw - } - } - } - field(:inorganics_subset, 24) { - stl_vector(4) { - pointer { - global :InorganicRaw - } - } - } - field(:plants, 36) { - compound(:WorldRaws_TPlants) { - field(:all, 0) { - stl_vector(4) { - pointer { - global :PlantRaw - } - } - } - field(:bushes, 12) { - stl_vector(4) { - pointer { - global :PlantRaw - } - } - } - field(:bushes_idx, 24) { - stl_vector(4) { - number 32, true - } - } - def bushes_tgx ; bushes_idx.map { |i| df.world.raws.plants.all[i] } ; end - field(:trees, 36) { - stl_vector(4) { - pointer { - global :PlantRaw - } - } - } - field(:trees_idx, 48) { - stl_vector(4) { - number 32, true - } - } - def trees_tgx ; trees_idx.map { |i| df.world.raws.plants.all[i] } ; end - field(:grasses, 60) { - stl_vector(4) { - pointer { - global :PlantRaw - } - } - } - field(:grasses_idx, 72) { - stl_vector(4) { - number 32, true - } - } - def grasses_tgx ; grasses_idx.map { |i| df.world.raws.plants.all[i] } ; end - } - } - field(:tissue_templates, 120) { - stl_vector(4) { - pointer { - global :TissueTemplate - } - } - } - field(:body_detail_plans, 132) { - stl_vector(4) { - pointer { - global :BodyDetailPlan - } - } - } - field(:body_templates, 144) { - stl_vector(4) { - pointer { - global :BodyTemplate - } - } - } - field(:bodyglosses, 156) { - stl_vector(4) { - pointer { - compound(:WorldRaws_TBodyglosses) { - sizeof 20 - - field(:id, 0) { - stl_string - } - field(:old_singular, 4) { - stl_string - } - field(:new_singular, 8) { - stl_string - } - field(:old_plural, 12) { - stl_string - } - field(:new_plural, 16) { - stl_string - } - } - } - } - } - field(:creature_variations, 168) { - stl_vector(4) { - pointer { - global :CreatureVariation - } - } - } - field(:creatures, 180) { - compound(:WorldRaws_TCreatures) { - field(:alphabetic, 0) { - stl_vector(4) { - pointer { - global :CreatureRaw - } - } - } - field(:all, 12) { - stl_vector(4) { - pointer { - global :CreatureRaw - } - } - } - field(:unk1, 24) { - number 32, true - } - field(:list_creature, 28) { - stl_vector(4) { - number 32, true - } - } - field(:list_caste, 40) { - stl_vector(4) { - number 32, true - } - } - } - } - field(:itemdefs, 232) { - compound(:WorldRaws_TItemdefs) { - field(:all, 0) { - stl_vector(4) { - pointer { - global :Itemdef - } - } - } - field(:weapons, 12) { - stl_vector(4) { - pointer { - global :ItemdefWeaponst - } - } - } - field(:trapcomps, 24) { - stl_vector(4) { - pointer { - global :ItemdefTrapcompst - } - } - } - field(:toys, 36) { - stl_vector(4) { - pointer { - global :ItemdefToyst - } - } - } - field(:tools, 48) { - stl_vector(4) { - pointer { - global :ItemdefToolst - } - } - } - field(:tools_by_type, 60) { - static_array(17, 12, ToolUses) { - stl_vector(4) { - pointer { - global :ItemdefToolst - } - } - } - } - field(:instruments, 264) { - stl_vector(4) { - pointer { - global :ItemdefInstrumentst - } - } - } - field(:armor, 276) { - stl_vector(4) { - pointer { - global :ItemdefArmorst - } - } - } - field(:ammo, 288) { - stl_vector(4) { - pointer { - global :ItemdefAmmost - } - } - } - field(:siege_ammo, 300) { - stl_vector(4) { - pointer { - global :ItemdefSiegeammost - } - } - } - field(:gloves, 312) { - stl_vector(4) { - pointer { - global :ItemdefGlovesst - } - } - } - field(:shoes, 324) { - stl_vector(4) { - pointer { - global :ItemdefShoesst - } - } - } - field(:shields, 336) { - stl_vector(4) { - pointer { - global :ItemdefShieldst - } - } - } - field(:helms, 348) { - stl_vector(4) { - pointer { - global :ItemdefHelmst - } - } - } - field(:pants, 360) { - stl_vector(4) { - pointer { - global :ItemdefPantsst - } - } - } - field(:food, 372) { - stl_vector(4) { - pointer { - global :ItemdefFoodst - } - } - } - } - } - field(:entities, 616) { - stl_vector(4) { - pointer { - global :EntityRaw - } - } - } - field(:language, 628) { - compound(:WorldRaws_TLanguage) { - field(:words, 0) { - stl_vector(4) { - pointer { - global :LanguageWord - } - } - } - field(:symbols, 12) { - stl_vector(4) { - pointer { - global :LanguageSymbol - } - } - } - field(:translations, 24) { - stl_vector(4) { - pointer { - global :LanguageTranslation - } - } - } - field(:word_table, 36) { - static_array(2, 8496) { - static_array(59, 144) { - compound(:WorldRaws_TLanguage_TWordTable) { - field(:words, 0) { - static_array(6, 12) { - stl_vector(4) { - number 32, true - } - } - } - field(:parts, 72) { - static_array(6, 12) { - stl_vector(4) { - number 32, true, nil, PartOfSpeech - } - } - } - } - } - } - } - field(:colors, 17028) { - stl_vector(4) { - pointer { - global :DescriptorColor - } - } - } - field(:shapes, 17040) { - stl_vector(4) { - pointer { - global :DescriptorShape - } - } - } - field(:patterns, 17052) { - stl_vector(4) { - pointer { - global :DescriptorPattern - } - } - } - } - } - field(:reactions, 17692) { - stl_vector(4) { - pointer { - global :Reaction - } - } - } - field(:buildings, 17704) { - compound(:WorldRaws_TBuildings) { - field(:all, 0) { - stl_vector(4) { - pointer { - global :BuildingDef - } - } - } - field(:workshops, 12) { - stl_vector(4) { - pointer { - global :BuildingDefWorkshopst - } - } - } - field(:furnaces, 24) { - stl_vector(4) { - pointer { - global :BuildingDefFurnacest - } - } - } - field(:next_id, 36) { - number 32, true - } - } - } - field(:interactions, 17744) { - stl_vector(4) { - pointer { - global :Interaction - } - } - } - field(:mat_table, 17756) { - global :SpecialMatTable - } - field(:syndromes, 21724) { - compound(:WorldRaws_TSyndromes) { - field(:mat_types, 0) { - stl_vector(2) { - number 16, true - } - } - field(:mat_indexes, 12) { - stl_vector(4) { - number 32, true - } - } - field(:interactions, 24) { - stl_vector(4) { - number 32, true - } - } - def interactions_tg ; interactions.map { |i| df.world.raws.interactions[i] } ; end - field(:all, 36) { - stl_vector(4) { - pointer { - global :Syndrome - } - } - } - } - } - field(:effects, 21772) { - compound(:WorldRaws_TEffects) { - field(:mat_types, 0) { - stl_vector(2) { - number 16, true - } - } - field(:mat_indexes, 12) { - stl_vector(4) { - number 32, true - } - } - field(:interactions, 24) { - stl_vector(4) { - number 32, true - } - } - def interactions_tg ; interactions.map { |i| df.world.raws.interactions[i] } ; end - field(:all, 36) { - stl_vector(4) { - pointer { - global :CreatureInteractionEffect - } - } - } - } - } - field(:anon_1, 21820) { - number 32, true - } - field(:anon_2, 21824) { - number 32, true - } - field(:anon_3, 21828) { - number 32, true - } -end - -class WorldRegion < MemHack::Compound - sizeof 448 - - field(:name, 0) { - global :LanguageName - } - field(:index, 60) { - number 32, true - } - field(:unk_70, 64) { - number 16, true - } - field(:region_coords, 68) { - global :Coord2dPath - } - field(:unk_94, 92) { - number 32, true - } - field(:unk_98, 96) { - number 32, true - } - field(:unk_9c, 100) { - number 32, true - } - field(:unk_a0, 104) { - number 32, true - } - field(:unk_a4, 108) { - number 32, true - } - field(:population, 112) { - stl_vector(4) { - pointer { - global :WorldPopulation - } - } - } - field(:unk_118, 124) { - static_array(51, 4) { - number 32, true - } - } - field(:unk_184, 328) { - stl_vector(2) { - number 16, true - } - } - field(:unk_194, 340) { - stl_vector(2) { - number 16, true - } - } - field(:unk_1a4, 352) { - stl_vector(2) { - number 16, true - } - } - field(:unk_1b4, 364) { - stl_vector(2) { - number 16, true - } - } - field(:unk_1c4, 376) { - stl_vector(2) { - number 16, true - } - } - field(:unk_1d4, 388) { - stl_vector(2) { - number 16, true - } - } - field(:unk_1e4, 400) { - number 32, true - } - field(:unk_1e8, 404) { - number 16, true - } - field(:unk_1ec, 406) { - number 16, true - } - field(:unk_1f0, 408) { - stl_vector - } - field(:unk_200, 420) { - } - field(:mid_x, 424) { - number 32, true - } - field(:mid_y, 428) { - number 32, true - } - field(:min_x, 432) { - number 32, true - } - field(:max_x, 436) { - number 32, true - } - field(:min_y, 440) { - number 32, true - } - field(:max_y, 444) { - number 32, true - } -end - -class WorldRegionDetails < MemHack::Compound - sizeof 13528 - - field(:biome, 0) { - static_array(17, 17) { - static_array(17, 1) { - number 8, false - } - } - } - field(:elevation, 290) { - static_array(17, 34) { - static_array(17, 2) { - number 16, true - } - } - } - field(:unk3, 868) { - static_array(256, 4) { - number 32, false - } - } - field(:unk4, 1892) { - static_array(1088, 2) { - number 16, true - } - } - field(:unk5, 4068) { - static_array(256, 1) { - number 8, false - } - } - field(:unk6, 4324) { - static_array(256, 1) { - number 8, false - } - } - field(:unk7, 4580) { - static_array(256, 1) { - number 8, false - } - } - field(:pos, 4836) { - global :Coord2d - } - field(:anon_1, 4840) { - number 16, true - } - field(:anon_2, 4842) { - number 16, true - } - field(:anon_3, 4844) { - number 16, true - } - field(:anon_4, 4846) { - number 16, true - } - field(:anon_5, 4848) { - number 16, true - } - field(:rivers_vertical, 4850) { - compound(:WorldRegionDetails_TRiversVertical) { - field(:x_min, 0) { - static_array(16, 34) { - static_array(17, 2) { - number 16, true - } - } - } - field(:x_max, 544) { - static_array(16, 34) { - static_array(17, 2) { - number 16, true - } - } - } - field(:active, 1088) { - static_array(16, 17) { - static_array(17, 1) { - number 8, false - } - } - } - field(:local_id, 1360) { - static_array(16, 34) { - static_array(17, 2) { - number 16, true - } - } - } - } - } - field(:rivers_horizontal, 6754) { - compound(:WorldRegionDetails_TRiversHorizontal) { - field(:y_min, 0) { - static_array(17, 32) { - static_array(16, 2) { - number 16, true - } - } - } - field(:y_max, 544) { - static_array(17, 32) { - static_array(16, 2) { - number 16, true - } - } - } - field(:active, 1088) { - static_array(17, 16) { - static_array(16, 1) { - number 8, false - } - } - } - field(:local_id, 1360) { - static_array(17, 32) { - static_array(16, 2) { - number 16, true - } - } - } - } - } - field(:unk11, 8658) { - static_array(256, 1) { - number 8, false - } - } - field(:unk_objects, 8916) { - static_array(16, 192) { - static_array(16, 12) { - stl_vector(4) { - pointer { - } - } - } - } - } - field(:lava_stone, 11988) { - number 16, true - } - def lava_stone_tg ; df.world.raws.inorganics[lava_stone] ; end - field(:elevation2, 11990) { - static_array(16, 32) { - static_array(16, 2) { - number 16, true - } - } - } - field(:undef13, 12504) { - static_array(256, 4) { - number 32, true - } - } -end - -class WorldRiver < MemHack::Compound - sizeof 132 - - field(:name, 0) { - global :LanguageName - } - field(:path, 60) { - global :Coord2dPath - } - field(:unk_8c, 84) { - stl_vector(4) { - number 32, true - } - } - field(:unk_9c, 96) { - stl_vector(2) { - number 16, true - } - } - field(:local_id, 108) { - stl_vector(2) { - number 16, true - } - } - field(:end_pos, 120) { - global :Coord2d - } - field(:flags, 124) { - df_flagarray - } -end - -class WorldSite < MemHack::Compound - sizeof 372 - - field(:name, 0) { - global :LanguageName - } - field(:civ_id, 60) { - number 32, true - } - def civ_tg ; df.world.entities.all[civ_id] ; end - field(:owner1, 64) { - number 32, true - } - def owner1_tg ; df.world.entities.all[owner1] ; end - field(:owner2, 68) { - number 32, true - } - def owner2_tg ; df.world.entities.all[owner2] ; end - field(:anon_1, 72) { - number 32, true - } - field(:type, 76) { - class ::DFHack::WorldSite_TType < MemHack::Enum - ENUM = Hash.new - NUME = Hash.new - ENUM[0] = :PlayerFortress ; NUME[:PlayerFortress] = 0 - ENUM[1] = :DarkFortress ; NUME[:DarkFortress] = 1 - ENUM[2] = :Cave ; NUME[:Cave] = 2 - ENUM[3] = :MountainHalls ; NUME[:MountainHalls] = 3 - ENUM[4] = :ForestRetreat ; NUME[:ForestRetreat] = 4 - ENUM[5] = :Town ; NUME[:Town] = 5 - ENUM[6] = :Unk6 ; NUME[:Unk6] = 6 - ENUM[7] = :LairShrine ; NUME[:LairShrine] = 7 - ENUM[8] = :Fortress ; NUME[:Fortress] = 8 - ENUM[9] = :Camp ; NUME[:Camp] = 9 - end - - number 16, true, nil, WorldSite_TType - } - field(:pos, 78) { - global :Coord2d - } - field(:id, 84) { - number 32, true - } - field(:nemesis, 88) { - stl_vector(4) { - number 32, true - } - } - def nemesis_tg ; nemesis.map { |i| df.world.nemesis.all[i] } ; end - field(:unk_94, 100) { - stl_vector - } - field(:animals, 112) { - stl_vector(4) { - pointer { - global :WorldPopulation - } - } - } - field(:inhabitants, 124) { - stl_vector(4) { - pointer { - compound(:WorldSite_TInhabitants) { - sizeof 20 - - field(:count, 0) { - number 32, true - } - field(:race, 4) { - number 32, true - } - def race_tg ; df.world.raws.creatures.all[race] ; end - field(:unk_8, 8) { - number 32, true - } - field(:unk_c, 12) { - number 32, true - } - def unk_c_tg ; df.world.entities.all[unk_c] ; end - field(:unk_10, 16) { - number 32, true - } - } - } - } - } - field(:unk_c4, 136) { - stl_vector - } - field(:unk_d4, 148) { - stl_vector - } - field(:index, 160) { - number 32, true - } - field(:unk_e8, 164) { - number 16, true - } - field(:unk_ea, 166) { - number 16, true - } - field(:unk_ec, 168) { - number 16, true - } - field(:unk_ee, 170) { - number 16, true - } - field(:unk_f0, 172) { - number 32, true - } - field(:unk_f4, 176) { - number 32, true - } - field(:unk_f8, 180) { - number 32, true - } - field(:unk_fc, 184) { - number 32, true - } - field(:unk_100, 188) { - number 32, true - } - field(:unk_104, 192) { - number 32, false - } - field(:unk_108, 196) { - number 32, false - } - field(:unk_10c, 200) { - number 32, true - } - field(:unk_110, 204) { - number 32, true - } - field(:unk_114, 208) { - number 32, true - } - field(:unk_118, 212) { - number 32, true - } - field(:unk_11c, 216) { - number 32, true - } - field(:unk_120, 220) { - number 32, true - } - field(:unk_124, 224) { - number 32, true - } - field(:unk_128, 228) { - number 32, true - } - field(:unk_12c, 232) { - number 32, true - } - field(:unk_130, 236) { - number 32, true - } - field(:unk_134, 240) { - number 32, true - } - field(:unk_138, 244) { - number 32, true - } - field(:anon_2, 248) { - number 32, true - } - field(:unk_13c, 252) { - stl_vector(4) { - pointer { - compound(:WorldSite_TUnk13c) { - sizeof 16 - - field(:unk_0, 0) { - number 32, true - } - field(:unk_4, 4) { - number 32, true - } - field(:unk_8, 8) { - number 32, true - } - field(:unk_c, 12) { - number 32, true - } - } - } - } - } - field(:flags, 264) { - df_flagarray - } - field(:unk_154, 272) { - stl_vector - } - field(:unk_164, 284) { - number 32, true - } - field(:unk_168, 288) { - number 32, true - } - field(:unk_16c, 292) { - number 32, true - } - field(:unk_170, 296) { - number 32, true - } - field(:unk_174, 300) { - number 32, true - } - field(:unk_178, 304) { - global :Coord - } - field(:unk_180, 312) { - pointer { - } - } - field(:unk_184, 316) { - pointer { - compound(:WorldSite_TUnk184) { - sizeof 32 - - field(:unk_0, 0) { - number 32, true - } - field(:unk_4, 4) { - number 16, true - } - field(:unk_8, 8) { - stl_vector - } - field(:unk_14, 20) { - number 32, true - } - field(:unk_18, 24) { - number 32, true - } - field(:unk_1c, 28) { - number 32, true - } - } - } - } - field(:anon_3, 320) { - stl_vector(4) { - pointer { - } - } - } - field(:anon_4, 332) { - stl_vector(4) { - number 32, true - } - } - field(:unk_188, 344) { - pointer { - global :WorldSiteUnk130 - } - } - field(:unk_18c, 348) { - stl_vector - } - field(:unk_19c, 360) { - stl_vector - } -end - -class WorldSiteUnk130 < MemHack::Compound - sizeof 52 - - field(:index, 0) { - number 32, true - } - field(:unk_4, 4) { - static_array(4, 12) { - stl_vector(4) { - pointer { - compound(:WorldSiteUnk130_TUnk4) { - sizeof 24 - - field(:unk_0, 0) { - number 32, true - } - field(:index, 4) { - number 32, true - } - field(:unk_8, 8) { - number 32, true - } - field(:unk_c, 12) { - stl_vector(4) { - number 32, true - } - } - } - } - } - } - } -end - -class WorldUndergroundRegion < MemHack::Compound - sizeof 152 - - field(:unk1, 0) { - number 16, true - } - field(:name, 4) { - global :LanguageName - } - field(:index, 64) { - number 32, true - } - field(:unk_74, 68) { - number 16, true - } - field(:unk_76, 70) { - number 16, true - } - field(:unk_78, 72) { - number 16, true - } - field(:unk_7a, 74) { - number 16, true - } - field(:unk_7c, 76) { - number 32, true - } - field(:unk_80, 80) { - number 16, true - } - field(:unk_82, 82) { - number 16, true - } - field(:unk_84, 84) { - number 16, true - } - field(:region_coords, 88) { - global :Coord2dPath - } - field(:region_min_z, 112) { - stl_vector(2) { - number 16, true - } - } - field(:region_max_z, 124) { - stl_vector(2) { - number 16, true - } - } - field(:unk_c8, 136) { - stl_vector - } - field(:feature_init, 148) { - pointer { - global :FeatureInit - } - } -end - -class WorldUnk20 < MemHack::Compound - sizeof 60 - - field(:anon_1, 0) { - number 8, false - } - field(:anon_2, 4) { - stl_vector(4) { - number 32, true - } - } - field(:anon_3, 16) { - number 32, true - } - field(:anon_4, 20) { - stl_vector(4) { - number 32, true - } - } - field(:anon_5, 32) { - number 32, true - } - field(:anon_6, 36) { - number 32, true - } - field(:anon_7, 40) { - stl_vector(4) { - pointer { - compound(:WorldUnk20_TAnon7) { - sizeof 24 - - field(:anon_1, 0) { - number 32, true - } - field(:anon_2, 4) { - number 32, true - } - field(:anon_3, 8) { - number 32, true - } - field(:anon_4, 12) { - number 32, true - } - field(:anon_5, 16) { - number 32, true - } - field(:anon_6, 20) { - number 32, true - } - } - } - } - } - field(:anon_8, 52) { - number 16, true - } - field(:anon_9, 54) { - number 16, true - } - field(:anon_10, 56) { - number 16, true - } -end - -class WorldUnkC0 < MemHack::Compound - sizeof 60 - - field(:anon_1, 0) { - number 8, false - } - field(:anon_2, 4) { - stl_vector(4) { - number 32, true - } - } - field(:anon_3, 16) { - number 32, true - } - field(:anon_4, 20) { - stl_vector(4) { - number 32, true - } - } - field(:anon_5, 32) { - number 32, true - } - field(:anon_6, 36) { - number 32, true - } - field(:anon_7, 40) { - stl_vector(4) { - pointer { - compound(:WorldUnkC0_TAnon7) { - sizeof 24 - - field(:anon_1, 0) { - number 32, true - } - field(:anon_2, 4) { - number 32, true - } - field(:anon_3, 8) { - number 32, true - } - field(:anon_4, 12) { - number 32, true - } - field(:anon_5, 16) { - number 32, true - } - field(:anon_6, 20) { - number 32, true - } - } - } - } - } - field(:anon_8, 52) { - number 16, true - } - field(:anon_9, 54) { - number 16, true - } - field(:anon_10, 56) { - number 16, true - } -end - -class ZLevelFlags < MemHack::Compound - field(:_whole, 0) { - number 32, true - } - field(:update, 0) { bit 0 } - field(:can_stop, 0) { bit 1 } - field(:update_twice, 0) { bit 2 } -end - -class GlobalObjects < MemHack::Compound - addr = DFHack.get_global_address('cursor') - if addr != 0 - field(:cursor, addr) { - compound(:Global_TCursor) { - field(:x, 0) { - number 32, true - } - field(:y, 4) { - number 32, true - } - field(:z, 8) { - number 32, true - } - } - } - end - addr = DFHack.get_global_address('selection_rect') - if addr != 0 - field(:selection_rect, addr) { - compound(:Global_TSelectionRect) { - field(:start_x, 0) { - number 32, true - } - field(:start_y, 4) { - number 32, true - } - field(:start_z, 8) { - number 32, true - } - field(:end_x, 12) { - number 32, true - } - field(:end_y, 16) { - number 32, true - } - field(:end_z, 20) { - number 32, true - } - } - } - end - addr = DFHack.get_global_address('gamemode') - if addr != 0 - field(:gamemode, addr) { - number 32, true, nil, GameMode - } - end - addr = DFHack.get_global_address('gametype') - if addr != 0 - field(:gametype, addr) { - number 32, true, nil, GameType - } - end - addr = DFHack.get_global_address('ui_area_map_width') - if addr != 0 - field(:ui_area_map_width, addr) { - number 8, false - } - end - addr = DFHack.get_global_address('ui_menu_width') - if addr != 0 - field(:ui_menu_width, addr) { - number 8, false - } - end - addr = DFHack.get_global_address('cursor_unit_list') - if addr != 0 - field(:cursor_unit_list, addr) { - compound(:Global_TCursorUnitList) { - field(:anon_1, 0) { - } - field(:units, 65536) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - } - } - end - addr = DFHack.get_global_address('d_init') - if addr != 0 - field(:d_init, addr) { - global :DInit - } - end - addr = DFHack.get_global_address('enabler') - if addr != 0 - field(:enabler, addr) { - global :Enabler - } - end - addr = DFHack.get_global_address('gps') - if addr != 0 - field(:gps, addr) { - global :Graphic - } - end - addr = DFHack.get_global_address('gview') - if addr != 0 - field(:gview, addr) { - global :Interfacest - } - end - addr = DFHack.get_global_address('init') - if addr != 0 - field(:init, addr) { - global :Init - } - end - addr = DFHack.get_global_address('timed_events') - if addr != 0 - field(:timed_events, addr) { - stl_vector(4) { - pointer { - global :TimedEvent - } - } - } - end - addr = DFHack.get_global_address('ui') - if addr != 0 - field(:ui, addr) { - global :Ui - } - end - addr = DFHack.get_global_address('ui_advmode') - if addr != 0 - field(:ui_advmode, addr) { - global :UiAdvmode - } - end - addr = DFHack.get_global_address('ui_build_selector') - if addr != 0 - field(:ui_build_selector, addr) { - global :UiBuildSelector - } - end - addr = DFHack.get_global_address('ui_building_assign_type') - if addr != 0 - field(:ui_building_assign_type, addr) { - stl_vector(1) { - number 8, false - } - } - end - addr = DFHack.get_global_address('ui_building_assign_is_marked') - if addr != 0 - field(:ui_building_assign_is_marked, addr) { - stl_vector(1) { - number 8, true, nil, BooleanEnum - } - } - end - addr = DFHack.get_global_address('ui_building_assign_units') - if addr != 0 - field(:ui_building_assign_units, addr) { - stl_vector(4) { - pointer { - global :Unit - } - } - } - end - addr = DFHack.get_global_address('ui_building_assign_items') - if addr != 0 - field(:ui_building_assign_items, addr) { - stl_vector(4) { - pointer { - global :Item - } - } - } - end - addr = DFHack.get_global_address('ui_look_list') - if addr != 0 - field(:ui_look_list, addr) { - global :UiLookList - } - end - addr = DFHack.get_global_address('ui_sidebar_menus') - if addr != 0 - field(:ui_sidebar_menus, addr) { - global :UiSidebarMenus - } - end - addr = DFHack.get_global_address('world') - if addr != 0 - field(:world, addr) { - global :World - } - end - addr = DFHack.get_global_address('activity_next_id') - if addr != 0 - field(:activity_next_id, addr) { - number 32, true - } - end - addr = DFHack.get_global_address('art_image_chunk_next_id') - if addr != 0 - field(:art_image_chunk_next_id, addr) { - number 32, true - } - end - addr = DFHack.get_global_address('artifact_next_id') - if addr != 0 - field(:artifact_next_id, addr) { - number 32, true - } - end - addr = DFHack.get_global_address('building_next_id') - if addr != 0 - field(:building_next_id, addr) { - number 32, true - } - end - addr = DFHack.get_global_address('crime_next_id') - if addr != 0 - field(:crime_next_id, addr) { - number 32, true - } - end - addr = DFHack.get_global_address('entity_next_id') - if addr != 0 - field(:entity_next_id, addr) { - number 32, true - } - end - addr = DFHack.get_global_address('flow_guide_next_id') - if addr != 0 - field(:flow_guide_next_id, addr) { - number 32, true - } - end - addr = DFHack.get_global_address('formation_next_id') - if addr != 0 - field(:formation_next_id, addr) { - number 32, true - } - end - addr = DFHack.get_global_address('hist_event_collection_next_id') - if addr != 0 - field(:hist_event_collection_next_id, addr) { - number 32, true - } - end - addr = DFHack.get_global_address('hist_event_next_id') - if addr != 0 - field(:hist_event_next_id, addr) { - number 32, true - } - end - addr = DFHack.get_global_address('hist_figure_next_id') - if addr != 0 - field(:hist_figure_next_id, addr) { - number 32, true - } - end - addr = DFHack.get_global_address('identity_next_id') - if addr != 0 - field(:identity_next_id, addr) { - number 32, true - } - end - addr = DFHack.get_global_address('incident_next_id') - if addr != 0 - field(:incident_next_id, addr) { - number 32, true - } - end - addr = DFHack.get_global_address('interaction_instance_next_id') - if addr != 0 - field(:interaction_instance_next_id, addr) { - number 32, true - } - end - addr = DFHack.get_global_address('item_next_id') - if addr != 0 - field(:item_next_id, addr) { - number 32, true - } - end - addr = DFHack.get_global_address('job_next_id') - if addr != 0 - field(:job_next_id, addr) { - number 32, true - } - end - addr = DFHack.get_global_address('machine_next_id') - if addr != 0 - field(:machine_next_id, addr) { - number 32, true - } - end - addr = DFHack.get_global_address('nemesis_next_id') - if addr != 0 - field(:nemesis_next_id, addr) { - number 32, true - } - end - addr = DFHack.get_global_address('proj_next_id') - if addr != 0 - field(:proj_next_id, addr) { - number 32, true - } - end - addr = DFHack.get_global_address('schedule_next_id') - if addr != 0 - field(:schedule_next_id, addr) { - number 32, true - } - end - addr = DFHack.get_global_address('squad_next_id') - if addr != 0 - field(:squad_next_id, addr) { - number 32, true - } - end - addr = DFHack.get_global_address('task_next_id') - if addr != 0 - field(:task_next_id, addr) { - number 32, true - } - end - addr = DFHack.get_global_address('unit_chunk_next_id') - if addr != 0 - field(:unit_chunk_next_id, addr) { - number 32, true - } - end - addr = DFHack.get_global_address('unit_next_id') - if addr != 0 - field(:unit_next_id, addr) { - number 32, true - } - end - addr = DFHack.get_global_address('vehicle_next_id') - if addr != 0 - field(:vehicle_next_id, addr) { - number 32, true - } - end - addr = DFHack.get_global_address('written_content_next_id') - if addr != 0 - field(:written_content_next_id, addr) { - number 32, true - } - end - addr = DFHack.get_global_address('announcements') - if addr != 0 - field(:announcements, addr) { - global :Announcements - } - end - addr = DFHack.get_global_address('cur_year') - if addr != 0 - field(:cur_year, addr) { - number 32, true - } - end - addr = DFHack.get_global_address('cur_year_tick') - if addr != 0 - field(:cur_year_tick, addr) { - number 32, true - } - end - addr = DFHack.get_global_address('current_weather') - if addr != 0 - field(:current_weather, addr) { - static_array(5, 5) { - static_array(5, 1) { - number 8, false, nil, WeatherType - } - } - } - end - addr = DFHack.get_global_address('pause_state') - if addr != 0 - field(:pause_state, addr) { - number 8, true, nil, BooleanEnum - } - end - addr = DFHack.get_global_address('process_dig') - if addr != 0 - field(:process_dig, addr) { - number 8, true, nil, BooleanEnum - } - end - addr = DFHack.get_global_address('process_jobs') - if addr != 0 - field(:process_jobs, addr) { - number 8, true, nil, BooleanEnum - } - end - addr = DFHack.get_global_address('ui_building_in_assign') - if addr != 0 - field(:ui_building_in_assign, addr) { - number 8, true, nil, BooleanEnum - } - end - addr = DFHack.get_global_address('ui_building_in_resize') - if addr != 0 - field(:ui_building_in_resize, addr) { - number 8, true, nil, BooleanEnum - } - end - addr = DFHack.get_global_address('ui_building_item_cursor') - if addr != 0 - field(:ui_building_item_cursor, addr) { - number 32, true - } - end - addr = DFHack.get_global_address('ui_look_cursor') - if addr != 0 - field(:ui_look_cursor, addr) { - number 32, true - } - end - addr = DFHack.get_global_address('ui_selected_unit') - if addr != 0 - field(:ui_selected_unit, addr) { - number 32, true - } - end - addr = DFHack.get_global_address('ui_unit_view_mode') - if addr != 0 - field(:ui_unit_view_mode, addr) { - global :UiUnitViewMode - } - end - addr = DFHack.get_global_address('ui_workshop_in_add') - if addr != 0 - field(:ui_workshop_in_add, addr) { - number 8, true, nil, BooleanEnum - } - end - addr = DFHack.get_global_address('ui_workshop_job_cursor') - if addr != 0 - field(:ui_workshop_job_cursor, addr) { - number 32, true - } - end - addr = DFHack.get_global_address('window_x') - if addr != 0 - field(:window_x, addr) { - number 32, true - } - end - addr = DFHack.get_global_address('window_y') - if addr != 0 - field(:window_y, addr) { - number 32, true - } - end - addr = DFHack.get_global_address('window_z') - if addr != 0 - field(:window_z, addr) { - number 32, true - } - end -end - Global = GlobalObjects.new._at(0) - def self.cursor ; Global.cursor ; end - def self.cursor=(v) ; Global.cursor = v ; end - def self.selection_rect ; Global.selection_rect ; end - def self.selection_rect=(v) ; Global.selection_rect = v ; end - def self.gamemode ; Global.gamemode ; end - def self.gamemode=(v) ; Global.gamemode = v ; end - def self.gametype ; Global.gametype ; end - def self.gametype=(v) ; Global.gametype = v ; end - def self.ui_area_map_width ; Global.ui_area_map_width ; end - def self.ui_area_map_width=(v) ; Global.ui_area_map_width = v ; end - def self.ui_menu_width ; Global.ui_menu_width ; end - def self.ui_menu_width=(v) ; Global.ui_menu_width = v ; end - def self.cursor_unit_list ; Global.cursor_unit_list ; end - def self.cursor_unit_list=(v) ; Global.cursor_unit_list = v ; end - def self.d_init ; Global.d_init ; end - def self.d_init=(v) ; Global.d_init = v ; end - def self.enabler ; Global.enabler ; end - def self.enabler=(v) ; Global.enabler = v ; end - def self.gps ; Global.gps ; end - def self.gps=(v) ; Global.gps = v ; end - def self.gview ; Global.gview ; end - def self.gview=(v) ; Global.gview = v ; end - def self.init ; Global.init ; end - def self.init=(v) ; Global.init = v ; end - def self.timed_events ; Global.timed_events ; end - def self.timed_events=(v) ; Global.timed_events = v ; end - def self.ui ; Global.ui ; end - def self.ui=(v) ; Global.ui = v ; end - def self.ui_advmode ; Global.ui_advmode ; end - def self.ui_advmode=(v) ; Global.ui_advmode = v ; end - def self.ui_build_selector ; Global.ui_build_selector ; end - def self.ui_build_selector=(v) ; Global.ui_build_selector = v ; end - def self.ui_building_assign_type ; Global.ui_building_assign_type ; end - def self.ui_building_assign_type=(v) ; Global.ui_building_assign_type = v ; end - def self.ui_building_assign_is_marked ; Global.ui_building_assign_is_marked ; end - def self.ui_building_assign_is_marked=(v) ; Global.ui_building_assign_is_marked = v ; end - def self.ui_building_assign_units ; Global.ui_building_assign_units ; end - def self.ui_building_assign_units=(v) ; Global.ui_building_assign_units = v ; end - def self.ui_building_assign_items ; Global.ui_building_assign_items ; end - def self.ui_building_assign_items=(v) ; Global.ui_building_assign_items = v ; end - def self.ui_look_list ; Global.ui_look_list ; end - def self.ui_look_list=(v) ; Global.ui_look_list = v ; end - def self.ui_sidebar_menus ; Global.ui_sidebar_menus ; end - def self.ui_sidebar_menus=(v) ; Global.ui_sidebar_menus = v ; end - def self.world ; Global.world ; end - def self.world=(v) ; Global.world = v ; end - def self.activity_next_id ; Global.activity_next_id ; end - def self.activity_next_id=(v) ; Global.activity_next_id = v ; end - def self.art_image_chunk_next_id ; Global.art_image_chunk_next_id ; end - def self.art_image_chunk_next_id=(v) ; Global.art_image_chunk_next_id = v ; end - def self.artifact_next_id ; Global.artifact_next_id ; end - def self.artifact_next_id=(v) ; Global.artifact_next_id = v ; end - def self.building_next_id ; Global.building_next_id ; end - def self.building_next_id=(v) ; Global.building_next_id = v ; end - def self.crime_next_id ; Global.crime_next_id ; end - def self.crime_next_id=(v) ; Global.crime_next_id = v ; end - def self.entity_next_id ; Global.entity_next_id ; end - def self.entity_next_id=(v) ; Global.entity_next_id = v ; end - def self.flow_guide_next_id ; Global.flow_guide_next_id ; end - def self.flow_guide_next_id=(v) ; Global.flow_guide_next_id = v ; end - def self.formation_next_id ; Global.formation_next_id ; end - def self.formation_next_id=(v) ; Global.formation_next_id = v ; end - def self.hist_event_collection_next_id ; Global.hist_event_collection_next_id ; end - def self.hist_event_collection_next_id=(v) ; Global.hist_event_collection_next_id = v ; end - def self.hist_event_next_id ; Global.hist_event_next_id ; end - def self.hist_event_next_id=(v) ; Global.hist_event_next_id = v ; end - def self.hist_figure_next_id ; Global.hist_figure_next_id ; end - def self.hist_figure_next_id=(v) ; Global.hist_figure_next_id = v ; end - def self.identity_next_id ; Global.identity_next_id ; end - def self.identity_next_id=(v) ; Global.identity_next_id = v ; end - def self.incident_next_id ; Global.incident_next_id ; end - def self.incident_next_id=(v) ; Global.incident_next_id = v ; end - def self.interaction_instance_next_id ; Global.interaction_instance_next_id ; end - def self.interaction_instance_next_id=(v) ; Global.interaction_instance_next_id = v ; end - def self.item_next_id ; Global.item_next_id ; end - def self.item_next_id=(v) ; Global.item_next_id = v ; end - def self.job_next_id ; Global.job_next_id ; end - def self.job_next_id=(v) ; Global.job_next_id = v ; end - def self.machine_next_id ; Global.machine_next_id ; end - def self.machine_next_id=(v) ; Global.machine_next_id = v ; end - def self.nemesis_next_id ; Global.nemesis_next_id ; end - def self.nemesis_next_id=(v) ; Global.nemesis_next_id = v ; end - def self.proj_next_id ; Global.proj_next_id ; end - def self.proj_next_id=(v) ; Global.proj_next_id = v ; end - def self.schedule_next_id ; Global.schedule_next_id ; end - def self.schedule_next_id=(v) ; Global.schedule_next_id = v ; end - def self.squad_next_id ; Global.squad_next_id ; end - def self.squad_next_id=(v) ; Global.squad_next_id = v ; end - def self.task_next_id ; Global.task_next_id ; end - def self.task_next_id=(v) ; Global.task_next_id = v ; end - def self.unit_chunk_next_id ; Global.unit_chunk_next_id ; end - def self.unit_chunk_next_id=(v) ; Global.unit_chunk_next_id = v ; end - def self.unit_next_id ; Global.unit_next_id ; end - def self.unit_next_id=(v) ; Global.unit_next_id = v ; end - def self.vehicle_next_id ; Global.vehicle_next_id ; end - def self.vehicle_next_id=(v) ; Global.vehicle_next_id = v ; end - def self.written_content_next_id ; Global.written_content_next_id ; end - def self.written_content_next_id=(v) ; Global.written_content_next_id = v ; end - def self.announcements ; Global.announcements ; end - def self.announcements=(v) ; Global.announcements = v ; end - def self.cur_year ; Global.cur_year ; end - def self.cur_year=(v) ; Global.cur_year = v ; end - def self.cur_year_tick ; Global.cur_year_tick ; end - def self.cur_year_tick=(v) ; Global.cur_year_tick = v ; end - def self.current_weather ; Global.current_weather ; end - def self.current_weather=(v) ; Global.current_weather = v ; end - def self.pause_state ; Global.pause_state ; end - def self.pause_state=(v) ; Global.pause_state = v ; end - def self.process_dig ; Global.process_dig ; end - def self.process_dig=(v) ; Global.process_dig = v ; end - def self.process_jobs ; Global.process_jobs ; end - def self.process_jobs=(v) ; Global.process_jobs = v ; end - def self.ui_building_in_assign ; Global.ui_building_in_assign ; end - def self.ui_building_in_assign=(v) ; Global.ui_building_in_assign = v ; end - def self.ui_building_in_resize ; Global.ui_building_in_resize ; end - def self.ui_building_in_resize=(v) ; Global.ui_building_in_resize = v ; end - def self.ui_building_item_cursor ; Global.ui_building_item_cursor ; end - def self.ui_building_item_cursor=(v) ; Global.ui_building_item_cursor = v ; end - def self.ui_look_cursor ; Global.ui_look_cursor ; end - def self.ui_look_cursor=(v) ; Global.ui_look_cursor = v ; end - def self.ui_selected_unit ; Global.ui_selected_unit ; end - def self.ui_selected_unit=(v) ; Global.ui_selected_unit = v ; end - def self.ui_unit_view_mode ; Global.ui_unit_view_mode ; end - def self.ui_unit_view_mode=(v) ; Global.ui_unit_view_mode = v ; end - def self.ui_workshop_in_add ; Global.ui_workshop_in_add ; end - def self.ui_workshop_in_add=(v) ; Global.ui_workshop_in_add = v ; end - def self.ui_workshop_job_cursor ; Global.ui_workshop_job_cursor ; end - def self.ui_workshop_job_cursor=(v) ; Global.ui_workshop_job_cursor = v ; end - def self.window_x ; Global.window_x ; end - def self.window_x=(v) ; Global.window_x = v ; end - def self.window_y ; Global.window_y ; end - def self.window_y=(v) ; Global.window_y = v ; end - def self.window_z ; Global.window_z ; end - def self.window_z=(v) ; Global.window_z = v ; end -end diff --git a/plugins/ruby/ruby.cpp b/plugins/ruby/ruby.cpp index 0f526451..482714d2 100644 --- a/plugins/ruby/ruby.cpp +++ b/plugins/ruby/ruby.cpp @@ -4,10 +4,10 @@ #include "Export.h" #include "PluginManager.h" #include "VersionInfo.h" +#include "MemAccess.h" #include "DataDefs.h" -#include "df/world.h" -#include "df/unit.h" +#include "df/global_objects.h" #include "tinythread.h" @@ -35,9 +35,13 @@ tthread::mutex *m_irun; tthread::mutex *m_mutex; static volatile RB_command r_type; static volatile command_result r_result; +static color_ostream *r_console; // color_ostream given as argument, if NULL resort to console_proxy static const char *r_command; static tthread::thread *r_thread; static int onupdate_active; +static int onupdate_minyear, onupdate_minyeartick; +static color_ostream_proxy *console_proxy; + DFHACK_PLUGIN("ruby") @@ -115,7 +119,7 @@ DFhackCExport command_result plugin_shutdown ( color_ostream &out ) } // send a single ruby line to be evaluated by the ruby thread -DFhackCExport command_result plugin_eval_ruby(const char *command) +DFhackCExport command_result plugin_eval_ruby( color_ostream &out, const char *command) { // if dlopen failed if (!r_thread) @@ -136,6 +140,7 @@ DFhackCExport command_result plugin_eval_ruby(const char *command) r_type = RB_EVAL; r_command = command; + r_console = &out; // wake ruby thread up m_irun->unlock(); @@ -144,6 +149,7 @@ DFhackCExport command_result plugin_eval_ruby(const char *command) tthread::this_thread::yield(); ret = r_result; + r_console = NULL; // block ruby thread m_irun->lock(); @@ -160,11 +166,16 @@ DFhackCExport command_result plugin_onupdate ( color_ostream &out ) // ruby sets this flag when needed, to avoid lag running ruby code every // frame if not necessary - // TODO dynamic check on df::cur_year{_tick} if (!onupdate_active) return CR_OK; - return plugin_eval_ruby("DFHack.onupdate"); + if (*df::global::cur_year < onupdate_minyear) + return CR_OK; + if (*df::global::cur_year == onupdate_minyear && + *df::global::cur_year_tick < onupdate_minyeartick) + return CR_OK; + + return plugin_eval_ruby(out, "DFHack.onupdate"); } DFhackCExport command_result plugin_onstatechange ( color_ostream &out, state_change_event e) @@ -184,10 +195,12 @@ DFhackCExport command_result plugin_onstatechange ( color_ostream &out, state_ch // if we go through plugin_eval at BEGIN_UNLOAD, it'll // try to get the suspend lock and deadlock at df exit case SC_BEGIN_UNLOAD : return CR_OK; + SCASE(PAUSED); + SCASE(UNPAUSED); #undef SCASE } - return plugin_eval_ruby(cmd.c_str()); + return plugin_eval_ruby(out, cmd.c_str()); } static command_result df_rubyeval(color_ostream &out, std::vector <std::string> & parameters) @@ -209,7 +222,7 @@ static command_result df_rubyeval(color_ostream &out, std::vector <std::string> full += " "; } - return plugin_eval_ruby(full.c_str()); + return plugin_eval_ruby(out, full.c_str()); } @@ -265,7 +278,7 @@ static int df_loadruby(void) #if defined(WIN32) "./libruby.dll"; #elif defined(__APPLE__) - "/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/libruby.1.dylib"; + "/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/libruby.1.dylib"; #else "hack/libruby.so"; #endif @@ -310,6 +323,13 @@ static void df_unloadruby(void) } } +static void printerr(const char* fmt, const char *arg) +{ + if (r_console) + r_console->printerr(fmt, arg); + else + Core::printerr(fmt, arg); +} // ruby thread code static void dump_rb_error(void) @@ -320,19 +340,17 @@ static void dump_rb_error(void) s = rb_funcall(err, rb_intern("class"), 0); s = rb_funcall(s, rb_intern("name"), 0); - Core::printerr("E: %s: ", rb_string_value_ptr(&s)); + printerr("E: %s: ", rb_string_value_ptr(&s)); s = rb_funcall(err, rb_intern("message"), 0); - Core::printerr("%s\n", rb_string_value_ptr(&s)); + printerr("%s\n", rb_string_value_ptr(&s)); err = rb_funcall(err, rb_intern("backtrace"), 0); for (int i=0 ; i<8 ; ++i) if ((s = rb_ary_shift(err)) != Qnil) - Core::printerr(" %s\n", rb_string_value_ptr(&s)); + printerr(" %s\n", rb_string_value_ptr(&s)); } -static color_ostream_proxy *console_proxy; - // ruby thread main loop static void df_rubythread(void *p) { @@ -412,7 +430,7 @@ static VALUE rb_cDFHack; // DFHack module ruby methods, binds specific dfhack methods // enable/disable calls to DFHack.onupdate() -static VALUE rb_dfonupdateactive(VALUE self) +static VALUE rb_dfonupdate_active(VALUE self) { if (onupdate_active) return Qtrue; @@ -420,21 +438,46 @@ static VALUE rb_dfonupdateactive(VALUE self) return Qfalse; } -static VALUE rb_dfonupdateactiveset(VALUE self, VALUE val) +static VALUE rb_dfonupdate_active_set(VALUE self, VALUE val) { onupdate_active = (BOOL_ISFALSE(val) ? 0 : 1); return Qtrue; } +static VALUE rb_dfonupdate_minyear(VALUE self) +{ + return rb_uint2inum(onupdate_minyear); +} + +static VALUE rb_dfonupdate_minyear_set(VALUE self, VALUE val) +{ + onupdate_minyear = rb_num2ulong(val); + return Qtrue; +} + +static VALUE rb_dfonupdate_minyeartick(VALUE self) +{ + return rb_uint2inum(onupdate_minyeartick); +} + +static VALUE rb_dfonupdate_minyeartick_set(VALUE self, VALUE val) +{ + onupdate_minyeartick = rb_num2ulong(val); + return Qtrue; +} + static VALUE rb_dfprint_str(VALUE self, VALUE s) { - console_proxy->print("%s", rb_string_value_ptr(&s)); + if (r_console) + r_console->print("%s", rb_string_value_ptr(&s)); + else + console_proxy->print("%s", rb_string_value_ptr(&s)); return Qnil; } static VALUE rb_dfprint_err(VALUE self, VALUE s) { - Core::printerr("%s", rb_string_value_ptr(&s)); + printerr("%s", rb_string_value_ptr(&s)); return Qnil; } @@ -486,7 +529,7 @@ static VALUE rb_dfmalloc(VALUE self, VALUE len) if (!ptr) return Qnil; memset(ptr, 0, FIX2INT(len)); - return rb_uint2inum((long)ptr); + return rb_uint2inum((uint32_t)ptr); } static VALUE rb_dffree(VALUE self, VALUE ptr) @@ -555,8 +598,59 @@ static VALUE rb_dfmemory_write_float(VALUE self, VALUE addr, VALUE val) return Qtrue; } +// return memory permissions at address (eg "rx", nil if unmapped) +static VALUE rb_dfmemory_check(VALUE self, VALUE addr) +{ + void *ptr = (void*)rb_num2ulong(addr); + std::vector<t_memrange> ranges; + Core::getInstance().p->getMemRanges(ranges); + + unsigned i = 0; + while (i < ranges.size() && ranges[i].end <= ptr) + i++; + + if (i >= ranges.size() || ranges[i].start > ptr || !ranges[i].valid) + return Qnil; + + std::string perm = ""; + if (ranges[i].read) + perm += "r"; + if (ranges[i].write) + perm += "w"; + if (ranges[i].execute) + perm += "x"; + if (ranges[i].shared) + perm += "s"; + + return rb_str_new(perm.c_str(), perm.length()); +} + +// memory write (tmp override page permissions, eg patch code) +static VALUE rb_dfmemory_patch(VALUE self, VALUE addr, VALUE raw) +{ + int strlen = FIX2INT(rb_funcall(raw, rb_intern("length"), 0)); + bool ret; + + ret = Core::getInstance().p->patchMemory((void*)rb_num2ulong(addr), + rb_string_value_ptr(&raw), strlen); + + return ret ? Qtrue : Qfalse; +} + // stl::string +static VALUE rb_dfmemory_stlstring_new(VALUE self) +{ + std::string *ptr = new std::string; + return rb_uint2inum((uint32_t)ptr); +} +static VALUE rb_dfmemory_stlstring_delete(VALUE self, VALUE addr) +{ + std::string *ptr = (std::string*)rb_num2ulong(addr); + if (ptr) + delete ptr; + return Qtrue; +} static VALUE rb_dfmemory_stlstring_init(VALUE self, VALUE addr) { // XXX THIS IS TERRIBLE @@ -579,6 +673,18 @@ static VALUE rb_dfmemory_write_stlstring(VALUE self, VALUE addr, VALUE val) // vector access +static VALUE rb_dfmemory_vec_new(VALUE self) +{ + std::vector<uint8_t> *ptr = new std::vector<uint8_t>; + return rb_uint2inum((uint32_t)ptr); +} +static VALUE rb_dfmemory_vec_delete(VALUE self, VALUE addr) +{ + std::vector<uint8_t> *ptr = (std::vector<uint8_t>*)rb_num2ulong(addr); + if (ptr) + delete ptr; + return Qtrue; +} static VALUE rb_dfmemory_vec_init(VALUE self, VALUE addr) { std::vector<uint8_t> *ptr = new std::vector<uint8_t>; @@ -596,13 +702,13 @@ static VALUE rb_dfmemory_vec8_ptrat(VALUE self, VALUE addr, VALUE idx) std::vector<uint8_t> *v = (std::vector<uint8_t>*)rb_num2ulong(addr); return rb_uint2inum((uint32_t)&v->at(FIX2INT(idx))); } -static VALUE rb_dfmemory_vec8_insert(VALUE self, VALUE addr, VALUE idx, VALUE val) +static VALUE rb_dfmemory_vec8_insertat(VALUE self, VALUE addr, VALUE idx, VALUE val) { std::vector<uint8_t> *v = (std::vector<uint8_t>*)rb_num2ulong(addr); v->insert(v->begin()+FIX2INT(idx), rb_num2ulong(val)); return Qtrue; } -static VALUE rb_dfmemory_vec8_delete(VALUE self, VALUE addr, VALUE idx) +static VALUE rb_dfmemory_vec8_deleteat(VALUE self, VALUE addr, VALUE idx) { std::vector<uint8_t> *v = (std::vector<uint8_t>*)rb_num2ulong(addr); v->erase(v->begin()+FIX2INT(idx)); @@ -620,13 +726,13 @@ static VALUE rb_dfmemory_vec16_ptrat(VALUE self, VALUE addr, VALUE idx) std::vector<uint16_t> *v = (std::vector<uint16_t>*)rb_num2ulong(addr); return rb_uint2inum((uint32_t)&v->at(FIX2INT(idx))); } -static VALUE rb_dfmemory_vec16_insert(VALUE self, VALUE addr, VALUE idx, VALUE val) +static VALUE rb_dfmemory_vec16_insertat(VALUE self, VALUE addr, VALUE idx, VALUE val) { std::vector<uint16_t> *v = (std::vector<uint16_t>*)rb_num2ulong(addr); v->insert(v->begin()+FIX2INT(idx), rb_num2ulong(val)); return Qtrue; } -static VALUE rb_dfmemory_vec16_delete(VALUE self, VALUE addr, VALUE idx) +static VALUE rb_dfmemory_vec16_deleteat(VALUE self, VALUE addr, VALUE idx) { std::vector<uint16_t> *v = (std::vector<uint16_t>*)rb_num2ulong(addr); v->erase(v->begin()+FIX2INT(idx)); @@ -644,13 +750,13 @@ static VALUE rb_dfmemory_vec32_ptrat(VALUE self, VALUE addr, VALUE idx) std::vector<uint32_t> *v = (std::vector<uint32_t>*)rb_num2ulong(addr); return rb_uint2inum((uint32_t)&v->at(FIX2INT(idx))); } -static VALUE rb_dfmemory_vec32_insert(VALUE self, VALUE addr, VALUE idx, VALUE val) +static VALUE rb_dfmemory_vec32_insertat(VALUE self, VALUE addr, VALUE idx, VALUE val) { std::vector<uint32_t> *v = (std::vector<uint32_t>*)rb_num2ulong(addr); v->insert(v->begin()+FIX2INT(idx), rb_num2ulong(val)); return Qtrue; } -static VALUE rb_dfmemory_vec32_delete(VALUE self, VALUE addr, VALUE idx) +static VALUE rb_dfmemory_vec32_deleteat(VALUE self, VALUE addr, VALUE idx) { std::vector<uint32_t> *v = (std::vector<uint32_t>*)rb_num2ulong(addr); v->erase(v->begin()+FIX2INT(idx)); @@ -658,6 +764,24 @@ static VALUE rb_dfmemory_vec32_delete(VALUE self, VALUE addr, VALUE idx) } // vector<bool> +static VALUE rb_dfmemory_vecbool_new(VALUE self) +{ + std::vector<bool> *ptr = new std::vector<bool>; + return rb_uint2inum((uint32_t)ptr); +} +static VALUE rb_dfmemory_vecbool_delete(VALUE self, VALUE addr) +{ + std::vector<bool> *ptr = (std::vector<bool>*)rb_num2ulong(addr); + if (ptr) + delete ptr; + return Qtrue; +} +static VALUE rb_dfmemory_vecbool_init(VALUE self, VALUE addr) +{ + std::vector<bool> *ptr = new std::vector<bool>; + memcpy((void*)rb_num2ulong(addr), (void*)ptr, sizeof(*ptr)); + return Qtrue; +} static VALUE rb_dfmemory_vecbool_length(VALUE self, VALUE addr) { std::vector<bool> *v = (std::vector<bool>*)rb_num2ulong(addr); @@ -674,13 +798,13 @@ static VALUE rb_dfmemory_vecbool_setat(VALUE self, VALUE addr, VALUE idx, VALUE v->at(FIX2INT(idx)) = (BOOL_ISFALSE(val) ? 0 : 1); return Qtrue; } -static VALUE rb_dfmemory_vecbool_insert(VALUE self, VALUE addr, VALUE idx, VALUE val) +static VALUE rb_dfmemory_vecbool_insertat(VALUE self, VALUE addr, VALUE idx, VALUE val) { std::vector<bool> *v = (std::vector<bool>*)rb_num2ulong(addr); v->insert(v->begin()+FIX2INT(idx), (BOOL_ISFALSE(val) ? 0 : 1)); return Qtrue; } -static VALUE rb_dfmemory_vecbool_delete(VALUE self, VALUE addr, VALUE idx) +static VALUE rb_dfmemory_vecbool_deleteat(VALUE self, VALUE addr, VALUE idx) { std::vector<bool> *v = (std::vector<bool>*)rb_num2ulong(addr); v->erase(v->begin()+FIX2INT(idx)); @@ -764,8 +888,12 @@ static VALUE rb_dfvcall(VALUE self, VALUE cppobj, VALUE cppvoff, VALUE a0, VALUE static void ruby_bind_dfhack(void) { rb_cDFHack = rb_define_module("DFHack"); - rb_define_singleton_method(rb_cDFHack, "onupdate_active", RUBY_METHOD_FUNC(rb_dfonupdateactive), 0); - rb_define_singleton_method(rb_cDFHack, "onupdate_active=", RUBY_METHOD_FUNC(rb_dfonupdateactiveset), 1); + rb_define_singleton_method(rb_cDFHack, "onupdate_active", RUBY_METHOD_FUNC(rb_dfonupdate_active), 0); + rb_define_singleton_method(rb_cDFHack, "onupdate_active=", RUBY_METHOD_FUNC(rb_dfonupdate_active_set), 1); + rb_define_singleton_method(rb_cDFHack, "onupdate_minyear", RUBY_METHOD_FUNC(rb_dfonupdate_minyear), 0); + rb_define_singleton_method(rb_cDFHack, "onupdate_minyear=", RUBY_METHOD_FUNC(rb_dfonupdate_minyear_set), 1); + rb_define_singleton_method(rb_cDFHack, "onupdate_minyeartick", RUBY_METHOD_FUNC(rb_dfonupdate_minyeartick), 0); + rb_define_singleton_method(rb_cDFHack, "onupdate_minyeartick=", RUBY_METHOD_FUNC(rb_dfonupdate_minyeartick_set), 1); rb_define_singleton_method(rb_cDFHack, "get_global_address", RUBY_METHOD_FUNC(rb_dfget_global_address), 1); rb_define_singleton_method(rb_cDFHack, "get_vtable", RUBY_METHOD_FUNC(rb_dfget_vtable), 1); rb_define_singleton_method(rb_cDFHack, "get_rtti_classname", RUBY_METHOD_FUNC(rb_dfget_rtti_classname), 1); @@ -787,28 +915,37 @@ static void ruby_bind_dfhack(void) { rb_define_singleton_method(rb_cDFHack, "memory_write_int16", RUBY_METHOD_FUNC(rb_dfmemory_write_int16), 2); rb_define_singleton_method(rb_cDFHack, "memory_write_int32", RUBY_METHOD_FUNC(rb_dfmemory_write_int32), 2); rb_define_singleton_method(rb_cDFHack, "memory_write_float", RUBY_METHOD_FUNC(rb_dfmemory_write_float), 2); + rb_define_singleton_method(rb_cDFHack, "memory_check", RUBY_METHOD_FUNC(rb_dfmemory_check), 1); + rb_define_singleton_method(rb_cDFHack, "memory_patch", RUBY_METHOD_FUNC(rb_dfmemory_patch), 2); + rb_define_singleton_method(rb_cDFHack, "memory_stlstring_new", RUBY_METHOD_FUNC(rb_dfmemory_stlstring_new), 0); + rb_define_singleton_method(rb_cDFHack, "memory_stlstring_delete", RUBY_METHOD_FUNC(rb_dfmemory_stlstring_delete), 1); rb_define_singleton_method(rb_cDFHack, "memory_stlstring_init", RUBY_METHOD_FUNC(rb_dfmemory_stlstring_init), 1); rb_define_singleton_method(rb_cDFHack, "memory_read_stlstring", RUBY_METHOD_FUNC(rb_dfmemory_read_stlstring), 1); rb_define_singleton_method(rb_cDFHack, "memory_write_stlstring", RUBY_METHOD_FUNC(rb_dfmemory_write_stlstring), 2); + rb_define_singleton_method(rb_cDFHack, "memory_vector_new", RUBY_METHOD_FUNC(rb_dfmemory_vec_new), 0); + rb_define_singleton_method(rb_cDFHack, "memory_vector_delete", RUBY_METHOD_FUNC(rb_dfmemory_vec_delete), 1); rb_define_singleton_method(rb_cDFHack, "memory_vector_init", RUBY_METHOD_FUNC(rb_dfmemory_vec_init), 1); rb_define_singleton_method(rb_cDFHack, "memory_vector8_length", RUBY_METHOD_FUNC(rb_dfmemory_vec8_length), 1); rb_define_singleton_method(rb_cDFHack, "memory_vector8_ptrat", RUBY_METHOD_FUNC(rb_dfmemory_vec8_ptrat), 2); - rb_define_singleton_method(rb_cDFHack, "memory_vector8_insert", RUBY_METHOD_FUNC(rb_dfmemory_vec8_insert), 3); - rb_define_singleton_method(rb_cDFHack, "memory_vector8_delete", RUBY_METHOD_FUNC(rb_dfmemory_vec8_delete), 2); + rb_define_singleton_method(rb_cDFHack, "memory_vector8_insertat", RUBY_METHOD_FUNC(rb_dfmemory_vec8_insertat), 3); + rb_define_singleton_method(rb_cDFHack, "memory_vector8_deleteat", RUBY_METHOD_FUNC(rb_dfmemory_vec8_deleteat), 2); rb_define_singleton_method(rb_cDFHack, "memory_vector16_length", RUBY_METHOD_FUNC(rb_dfmemory_vec16_length), 1); rb_define_singleton_method(rb_cDFHack, "memory_vector16_ptrat", RUBY_METHOD_FUNC(rb_dfmemory_vec16_ptrat), 2); - rb_define_singleton_method(rb_cDFHack, "memory_vector16_insert", RUBY_METHOD_FUNC(rb_dfmemory_vec16_insert), 3); - rb_define_singleton_method(rb_cDFHack, "memory_vector16_delete", RUBY_METHOD_FUNC(rb_dfmemory_vec16_delete), 2); + rb_define_singleton_method(rb_cDFHack, "memory_vector16_insertat", RUBY_METHOD_FUNC(rb_dfmemory_vec16_insertat), 3); + rb_define_singleton_method(rb_cDFHack, "memory_vector16_deleteat", RUBY_METHOD_FUNC(rb_dfmemory_vec16_deleteat), 2); rb_define_singleton_method(rb_cDFHack, "memory_vector32_length", RUBY_METHOD_FUNC(rb_dfmemory_vec32_length), 1); rb_define_singleton_method(rb_cDFHack, "memory_vector32_ptrat", RUBY_METHOD_FUNC(rb_dfmemory_vec32_ptrat), 2); - rb_define_singleton_method(rb_cDFHack, "memory_vector32_insert", RUBY_METHOD_FUNC(rb_dfmemory_vec32_insert), 3); - rb_define_singleton_method(rb_cDFHack, "memory_vector32_delete", RUBY_METHOD_FUNC(rb_dfmemory_vec32_delete), 2); + rb_define_singleton_method(rb_cDFHack, "memory_vector32_insertat", RUBY_METHOD_FUNC(rb_dfmemory_vec32_insertat), 3); + rb_define_singleton_method(rb_cDFHack, "memory_vector32_deleteat", RUBY_METHOD_FUNC(rb_dfmemory_vec32_deleteat), 2); + rb_define_singleton_method(rb_cDFHack, "memory_vectorbool_new", RUBY_METHOD_FUNC(rb_dfmemory_vecbool_new), 0); + rb_define_singleton_method(rb_cDFHack, "memory_vectorbool_delete", RUBY_METHOD_FUNC(rb_dfmemory_vecbool_delete), 1); + rb_define_singleton_method(rb_cDFHack, "memory_vectorbool_init", RUBY_METHOD_FUNC(rb_dfmemory_vecbool_init), 1); rb_define_singleton_method(rb_cDFHack, "memory_vectorbool_length", RUBY_METHOD_FUNC(rb_dfmemory_vecbool_length), 1); rb_define_singleton_method(rb_cDFHack, "memory_vectorbool_at", RUBY_METHOD_FUNC(rb_dfmemory_vecbool_at), 2); rb_define_singleton_method(rb_cDFHack, "memory_vectorbool_setat", RUBY_METHOD_FUNC(rb_dfmemory_vecbool_setat), 3); - rb_define_singleton_method(rb_cDFHack, "memory_vectorbool_insert", RUBY_METHOD_FUNC(rb_dfmemory_vecbool_insert), 3); - rb_define_singleton_method(rb_cDFHack, "memory_vectorbool_delete", RUBY_METHOD_FUNC(rb_dfmemory_vecbool_delete), 2); + rb_define_singleton_method(rb_cDFHack, "memory_vectorbool_insertat", RUBY_METHOD_FUNC(rb_dfmemory_vecbool_insertat), 3); + rb_define_singleton_method(rb_cDFHack, "memory_vectorbool_deleteat", RUBY_METHOD_FUNC(rb_dfmemory_vecbool_deleteat), 2); rb_define_singleton_method(rb_cDFHack, "memory_bitarray_length", RUBY_METHOD_FUNC(rb_dfmemory_bitarray_length), 1); rb_define_singleton_method(rb_cDFHack, "memory_bitarray_resize", RUBY_METHOD_FUNC(rb_dfmemory_bitarray_resize), 2); rb_define_singleton_method(rb_cDFHack, "memory_bitarray_isset", RUBY_METHOD_FUNC(rb_dfmemory_bitarray_isset), 2); diff --git a/plugins/ruby/ruby.rb b/plugins/ruby/ruby.rb index 64592e3e..8c2c9796 100644 --- a/plugins/ruby/ruby.rb +++ b/plugins/ruby/ruby.rb @@ -23,26 +23,80 @@ module Kernel end module DFHack + class OnupdateCallback + attr_accessor :callback, :timelimit, :minyear, :minyeartick + def initialize(cb, tl) + @callback = cb + @ticklimit = tl + @minyear = (tl ? df.cur_year : 0) + @minyeartick = (tl ? df.cur_year_tick : 0) + end + + # run callback if timedout + def check_run(year, yeartick, yearlen) + if !@ticklimit + @callback.call + else + if year > @minyear or (year == @minyear and yeartick >= @minyeartick) + @minyear = year + @minyeartick = yeartick + @ticklimit + if @minyeartick > yearlen + @minyear += 1 + @minyeartick -= yearlen + end + @callback.call + end + end + rescue + puts_err "onupdate cb #$!", $!.backtrace + end + + def <=>(o) + [@minyear, @minyeartick] <=> [o.minyear, o.minyeartick] + end + end + class << self + attr_accessor :onupdate_list, :onstatechange_list + # register a callback to be called every gframe or more # ex: DFHack.onupdate_register { DFHack.world.units[0].counters.job_counter = 0 } - def onupdate_register(&b) + def onupdate_register(ticklimit=nil, &b) @onupdate_list ||= [] - @onupdate_list << b + @onupdate_list << OnupdateCallback.new(b, ticklimit) DFHack.onupdate_active = true + if onext = @onupdate_list.sort.first + DFHack.onupdate_minyear = onext.minyear + DFHack.onupdate_minyeartick = onext.minyeartick + end @onupdate_list.last end # delete the callback for onupdate ; use the value returned by onupdate_register def onupdate_unregister(b) @onupdate_list.delete b - DFHack.onupdate_active = false if @onupdate_list.empty? + if @onupdate_list.empty? + DFHack.onupdate_active = false + DFHack.onupdate_minyear = DFHack.onupdate_minyeartick = 0 + end end + TICKS_PER_YEAR = 1200*28*12 # this method is called by dfhack every 'onupdate' if onupdate_active is true def onupdate @onupdate_list ||= [] - @onupdate_list.each { |cb| cb.call } + + ticks_per_year = TICKS_PER_YEAR + ticks_per_year *= 72 if gametype == :ADVENTURE_MAIN or gametype == :ADVENTURE_ARENA + + @onupdate_list.each { |o| + o.check_run(cur_year, cur_year_tick, ticks_per_year) + } + + if onext = @onupdate_list.sort.first + DFHack.onupdate_minyear = onext.minyear + DFHack.onupdate_minyeartick = onext.minyeartick + end end # register a callback to be called every gframe or more @@ -85,6 +139,57 @@ module DFHack may = rawlist.find_all { |r| r.downcase.index(name.downcase) } may.first if may.length == 1 end + + def translate_name(name, english=true, onlylastpart=false) + out = [] + + if not onlylastpart + out << name.first_name if name.first_name != '' + if name.nickname != '' + case respond_to?(:d_init) && d_init.nickname_dwarf + when :REPLACE_ALL; return "`#{name.nickname}'" + when :REPLACE_FIRST; out.pop + end + out << "`#{name.nickname}'" + end + end + return out.join(' ') unless name.words.find { |w| w >= 0 } + + if not english + tsl = world.raws.language.translations[name.language] + if name.words[0] >= 0 or name.words[1] >= 0 + out << '' + out.last << tsl.words[name.words[0]] if name.words[0] >= 0 + out.last << tsl.words[name.words[1]] if name.words[1] >= 0 + end + if name.words[5] >= 0 + out << '' + (2..5).each { |i| out.last << tsl.words[name.words[i]] if name.words[i] >= 0 } + end + if name.words[6] >= 0 + out << tsl.words[name.words[6]] + end + else + wl = world.raws.language + if name.words[0] >= 0 or name.words[1] >= 0 + out << '' + out.last << wl.words[name.words[0]].forms[name.parts_of_speech[0]] if name.words[0] >= 0 + out.last << wl.words[name.words[1]].forms[name.parts_of_speech[1]] if name.words[1] >= 0 + end + if name.words[5] >= 0 + out << 'the ' + out.last.capitalize! if out.length == 1 + (2..5).each { |i| out.last << wl.words[name.words[i]].forms[name.parts_of_speech[i]] if name.words[i] >= 0 } + end + if name.words[6] >= 0 + out << 'of' + out.last.capitalize! if out.length == 1 + out << wl.words[name.words[6]].forms[name.parts_of_speech[6]] + end + end + + out.join(' ') + end end end diff --git a/plugins/ruby/ui.rb b/plugins/ruby/ui.rb index fbe7ced7..9dded66c 100644 --- a/plugins/ruby/ui.rb +++ b/plugins/ruby/ui.rb @@ -1,6 +1,13 @@ # df user-interface related methods module DFHack class << self + # returns the current active viewscreen + def curview + ret = gview.view + ret = ret.child while ret.child + ret + end + # center the DF screen on something # updates the cursor position if visible def center_viewscreen(x, y=nil, z=nil) @@ -61,5 +68,14 @@ module DFHack world.status.display_timer = 2000 end end + + # add an announcement to display in a game popup message + # (eg "the megabeast foobar arrived") + def popup_announcement(str, color=nil, bright=nil) + pop = PopupMessage.cpp_new(:text => str) + pop.color = color if color + pop.bright = bright if bright + world.status.popups << pop + end end end diff --git a/plugins/ruby/unit.rb b/plugins/ruby/unit.rb index e7d4335f..1a619c5c 100644 --- a/plugins/ruby/unit.rb +++ b/plugins/ruby/unit.rb @@ -4,19 +4,34 @@ module DFHack # with no arg, return currently selected unit in df UI ('v' or 'k' menu) # with numeric arg, search unit by unit.id # with an argument that respond to x/y/z (eg cursor), find first unit at this position - def unit_find(what=:selected) + def unit_find(what=:selected, y=nil, z=nil) if what == :selected - case ui.main.mode - when :ViewUnits - # nobody selected => idx == 0 - v = world.units.active[ui_selected_unit] - v if v and v.pos.z == cursor.z - when :LookAround - k = ui_look_list.items[ui_look_cursor] - k.unit if k.type == :Unit + case curview._rtti_classname + when :viewscreen_itemst + ref = curview.entry_ref[curview.cursor_pos] + ref.unit_tg if ref.kind_of?(GeneralRefUnit) + when :viewscreen_unitlistst + v = curview + # TODO fix xml to use enums everywhere + page = DFHack::ViewscreenUnitlistst_TPage.int(v.page) + v.units[page][v.cursor_pos[page]] + else + case ui.main.mode + when :ViewUnits + # nobody selected => idx == 0 + v = world.units.active[ui_selected_unit] + v if v and v.pos.z == cursor.z + when :LookAround + k = ui_look_list.items[ui_look_cursor] + k.unit if k.type == :Unit + end end elsif what.kind_of?(Integer) - world.units.all.binsearch(what) + # search by id + return world.units.all.binsearch(what) if not z + # search by coords + x = what + world.units.all.find { |u| u.pos.x == x and u.pos.y == y and u.pos.z == z } elsif what.respond_to?(:x) or what.respond_to?(:pos) world.units.all.find { |u| same_pos?(what, u) } else @@ -26,48 +41,60 @@ module DFHack # returns an Array of all units that are current fort citizen (dwarves, on map, not hostile) def unit_citizens - race = ui.race_id - civ = ui.civ_id world.units.active.find_all { |u| - u.race == race and u.civ_id == civ and !u.flags1.dead and !u.flags1.merchant and - !u.flags1.diplomat and !u.flags2.resident and !u.flags3.ghostly and - !u.curse.add_tags1.OPPOSED_TO_LIFE and !u.curse.add_tags1.CRAZED and - u.mood != :Berserk - # TODO check curse ; currently this should keep vampires, but may include werebeasts + unit_iscitizen(u) } end + def unit_iscitizen(u) + u.race == ui.race_id and u.civ_id == ui.civ_id and !u.flags1.dead and !u.flags1.merchant and + !u.flags1.diplomat and !u.flags2.resident and !u.flags3.ghostly and + !u.curse.add_tags1.OPPOSED_TO_LIFE and !u.curse.add_tags1.CRAZED and + u.mood != :Berserk + # TODO check curse ; currently this should keep vampires, but may include werebeasts + end + # list workers (citizen, not crazy / child / inmood / noble) def unit_workers - unit_citizens.find_all { |u| - u.mood == :None and - u.profession != :CHILD and - u.profession != :BABY and - # TODO MENIAL_WORK_EXEMPTION_SPOUSE - !unit_entitypositions(u).find { |pos| pos.flags[:MENIAL_WORK_EXEMPTION] } + world.units.active.find_all { |u| + unit_isworker(u) } end + def unit_isworker(u) + unit_iscitizen(u) and + u.mood == :None and + u.profession != :CHILD and + u.profession != :BABY and + # TODO MENIAL_WORK_EXEMPTION_SPOUSE + !unit_entitypositions(u).find { |pos| pos.flags[:MENIAL_WORK_EXEMPTION] } + end + # list currently idle workers def unit_idlers - unit_workers.find_all { |u| - # current_job includes eat/drink/sleep/pickupequip - !u.job.current_job and - # filter 'attend meeting' - u.meetings.length == 0 and - # filter soldiers (TODO check schedule) - u.military.squad_index == -1 and - # filter 'on break' - !u.status.misc_traits.find { |t| id == :OnBreak } + world.units.active.find_all { |u| + unit_isidler(u) } end + def unit_isidler(u) + unit_isworker(u) and + # current_job includes eat/drink/sleep/pickupequip + !u.job.current_job and + # filter 'attend meeting' + not u.specific_refs.find { |s| s.type == :ACTIVITY } and + # filter soldiers (TODO check schedule) + u.military.squad_index == -1 and + # filter 'on break' + not u.status.misc_traits.find { |t| t.id == :OnBreak } + end + def unit_entitypositions(unit) list = [] - return list if not hf = world.history.figures.binsearch(unit.hist_figure_id) + return list if not hf = unit.hist_figure_tg hf.entity_links.each { |el| next if el._rtti_classname != :histfig_entity_link_positionst - next if not ent = world.entities.all.binsearch(el.entity_id) + next if not ent = el.entity_tg next if not pa = ent.positions.assignments.binsearch(el.assignment_id) next if not pos = ent.positions.own.binsearch(pa.position_id) list << pos @@ -75,4 +102,10 @@ module DFHack list end end + + class LanguageName + def to_s(english=true) + df.translate_name(self, english) + end + end end diff --git a/plugins/seedwatch.cpp b/plugins/seedwatch.cpp index ae9ff0e1..676c02ed 100755 --- a/plugins/seedwatch.cpp +++ b/plugins/seedwatch.cpp @@ -111,7 +111,8 @@ command_result df_seedwatch(color_ostream &out, vector<string>& parameters) w->ReadGameMode(gm);// FIXME: check return value // if game mode isn't fortress mode - if(gm.g_mode != game_mode::DWARF || gm.g_type != game_type::DWARF_MAIN) + if(gm.g_mode != game_mode::DWARF || + !(gm.g_type == game_type::DWARF_MAIN || gm.g_type == game_type::DWARF_RECLAIM)) { // just print the help printHelp(out); @@ -299,7 +300,8 @@ DFhackCExport command_result plugin_onupdate(color_ostream &out) t_gamemodes gm; w->ReadGameMode(gm);// FIXME: check return value // if game mode isn't fortress mode - if(gm.g_mode != game_mode::DWARF || gm.g_type != game_type::DWARF_MAIN) + if(gm.g_mode != game_mode::DWARF || + !(gm.g_type == game_type::DWARF_MAIN || gm.g_type == game_type::DWARF_RECLAIM)) { // stop running. running = false; diff --git a/plugins/showmood.cpp b/plugins/showmood.cpp index 7926e2ac..0b3fa8a9 100644 --- a/plugins/showmood.cpp +++ b/plugins/showmood.cpp @@ -12,6 +12,7 @@ #include "df/world.h" #include "df/job.h" #include "df/job_item.h" +#include "df/job_item_ref.h" #include "df/general_ref.h" #include "df/builtin_mats.h" #include "df/inorganic_raw.h" @@ -165,6 +166,11 @@ command_result df_showmood (color_ostream &out, vector <string> & parameters) out.print("not yet claimed a workshop but will want"); out.print(" the following items:\n"); + // total amount of stuff fetched so far + int count_got = 0; + for (size_t i = 0; i < job->items.size(); i++) + count_got += job->items[i]->item->getTotalDimension(); + for (size_t i = 0; i < job->job_items.size(); i++) { df::job_item *item = job->job_items[i]; @@ -267,7 +273,13 @@ command_result df_showmood (color_ostream &out, vector <string> & parameters) } } - out.print(", quantity %i\n", item->quantity); + // total amount of stuff fetched for this requirement + // XXX may fail with cloth/thread/bars if need 1 and fetch 2 + int got = count_got; + if (got > item->quantity) + got = item->quantity; + out.print(", quantity %i (got %i)\n", item->quantity, got); + count_got -= got; } } if (!found) diff --git a/plugins/sort.cpp b/plugins/sort.cpp index 5748a065..ff51fc77 100644 --- a/plugins/sort.cpp +++ b/plugins/sort.cpp @@ -431,12 +431,17 @@ DEFINE_SORT_HANDLER(unit_sorters, dwarfmode, "/QueryBuilding/Some/Assign", scree sort_null_first(parameters); PARSE_SPEC("units", parameters); - if (compute_order(*pout, L, top, &order, *ui_building_assign_units)) { reorder_cursor(ui_building_item_cursor, order); reorder_vector(ui_building_assign_type, order); reorder_vector(ui_building_assign_units, order); + // this is for cages. cages need some extra sorting + if(ui_building_assign_items->size() == ui_building_assign_units->size()) + { + reorder_vector(ui_building_assign_items, order); + reorder_vector(ui_building_assign_is_marked, order); + } } } diff --git a/plugins/workflow.cpp b/plugins/workflow.cpp index 9e0e4529..98258682 100644 --- a/plugins/workflow.cpp +++ b/plugins/workflow.cpp @@ -20,6 +20,7 @@ #include "df/job_list_link.h" #include "df/dfhack_material_category.h" #include "df/item.h" +#include "df/item_quality.h" #include "df/items_other_id.h" #include "df/tool_uses.h" #include "df/general_ref.h" @@ -283,6 +284,8 @@ struct ItemConstraint { int weight; std::vector<ProtectedJob*> jobs; + item_quality::item_quality min_quality; + int item_amount, item_count, item_inuse; bool request_suspend, request_resume; @@ -292,8 +295,8 @@ struct ItemConstraint { public: ItemConstraint() - : is_craft(false), weight(0), item_amount(0), item_count(0), item_inuse(0) - , is_active(false), cant_resume_reported(false) + : is_craft(false), weight(0), min_quality(item_quality::Ordinary),item_amount(0), + item_count(0), item_inuse(0), is_active(false), cant_resume_reported(false) {} int goalCount() { return config.ival(0); } @@ -646,7 +649,7 @@ static ItemConstraint *get_constraint(color_ostream &out, const std::string &str std::vector<std::string> tokens; split_string(&tokens, str, "/"); - if (tokens.size() > 3) + if (tokens.size() > 4) return NULL; int weight = 0; @@ -670,10 +673,10 @@ static ItemConstraint *get_constraint(color_ostream &out, const std::string &str out.printerr("Cannot decode material mask: %s\n", maskstr.c_str()); return NULL; } - + if (mat_mask.whole != 0) weight += 100; - + MaterialInfo material; std::string matstr = vector_get(tokens,2); if (!matstr.empty() && (!material.find(matstr) || !material.isValid())) { @@ -681,6 +684,21 @@ static ItemConstraint *get_constraint(color_ostream &out, const std::string &str return NULL; } + item_quality::item_quality minqual = item_quality::Ordinary; + std::string qualstr = vector_get(tokens, 3); + if(!qualstr.empty()) { + if(qualstr == "ordinary") minqual = item_quality::Ordinary; + else if(qualstr == "wellcrafted") minqual = item_quality::WellCrafted; + else if(qualstr == "finelycrafted") minqual = item_quality::FinelyCrafted; + else if(qualstr == "superior") minqual = item_quality::Superior; + else if(qualstr == "exceptional") minqual = item_quality::Exceptional; + else if(qualstr == "masterful") minqual = item_quality::Masterful; + else { + out.printerr("Cannot find quality: %s\nKnown qualities: ordinary, wellcrafted, finelycrafted, superior, exceptional, masterful\n", qualstr.c_str()); + return NULL; + } + } + if (material.type >= 0) weight += (material.index >= 0 ? 5000 : 1000); @@ -694,7 +712,8 @@ static ItemConstraint *get_constraint(color_ostream &out, const std::string &str ItemConstraint *ct = constraints[i]; if (ct->is_craft == is_craft && ct->item == item && ct->material == material && - ct->mat_mask.whole == mat_mask.whole) + ct->mat_mask.whole == mat_mask.whole && + ct->min_quality == minqual) return ct; } @@ -703,6 +722,7 @@ static ItemConstraint *get_constraint(color_ostream &out, const std::string &str nct->item = item; nct->material = material; nct->mat_mask = mat_mask; + nct->min_quality = minqual; nct->weight = weight; if (cfg) @@ -1179,6 +1199,9 @@ static void map_job_items(color_ostream &out) (cv->item.subtype != -1 && cv->item.subtype != isubtype)) continue; } + if(item->getQuality() < cv->min_quality) { + continue; + } TMaterialCache::iterator it = cv->material_cache.find(matkey); @@ -1357,15 +1380,15 @@ static void print_constraint(color_ostream &out, ItemConstraint *cv, bool no_job { Console::color_value color; if (cv->request_resume) - color = Console::COLOR_GREEN; + color = COLOR_GREEN; else if (cv->request_suspend) - color = Console::COLOR_CYAN; + color = COLOR_CYAN; else - color = Console::COLOR_DARKGREY; + color = COLOR_DARKGREY; out.color(color); out << prefix << "Constraint " << flush; - out.color(Console::COLOR_GREY); + out.color(COLOR_GREY); out << cv->config.val() << " " << flush; out.color(color); out << (cv->goalByCount() ? "count " : "amount ") @@ -1414,18 +1437,18 @@ static void print_constraint(color_ostream &out, ItemConstraint *cv, bool no_job { if (pj->want_resumed) { - out.color(Console::COLOR_YELLOW); + out.color(COLOR_YELLOW); out << start << " (delayed)" << endl; } else { - out.color(Console::COLOR_BLUE); + out.color(COLOR_BLUE); out << start << " (suspended)" << endl; } } else { - out.color(Console::COLOR_GREEN); + out.color(COLOR_GREEN); out << start << endl; } @@ -1449,11 +1472,11 @@ static void print_job(color_ostream &out, ProtectedJob *pj) isOptionEnabled(CF_AUTOMELT)) { if (meltable_count <= 0) - out.color(Console::COLOR_CYAN); + out.color(COLOR_CYAN); else if (pj->want_resumed && !pj->isActuallyResumed()) - out.color(Console::COLOR_YELLOW); + out.color(COLOR_YELLOW); else - out.color(Console::COLOR_GREEN); + out.color(COLOR_GREEN); out << " Meltable: " << meltable_count << " objects." << endl; out.reset_color(); } @@ -1480,13 +1503,14 @@ static command_result workflow_cmd(color_ostream &out, vector <string> & paramet } df::building *workshop = NULL; - df::job *job = NULL; + //FIXME: unused variable! + //df::job *job = NULL; if (Gui::dwarfmode_hotkey(Core::getTopViewscreen()) && ui->main.mode == ui_sidebar_mode::QueryBuilding) { workshop = world->selected_building; - job = Gui::getSelectedWorkshopJob(out, true); + //job = Gui::getSelectedWorkshopJob(out, true); } std::string cmd = parameters.empty() ? "list" : parameters[0]; diff --git a/plugins/zone.cpp b/plugins/zone.cpp index b5e45f5c..c496f49b 100644 --- a/plugins/zone.cpp +++ b/plugins/zone.cpp @@ -420,6 +420,7 @@ bool isTame(df::unit* creature) { switch (creature->training_level) { + case df::animal_training_level::SemiWild: //?? case df::animal_training_level::Trained: case df::animal_training_level::WellTrained: case df::animal_training_level::SkilfullyTrained: @@ -429,7 +430,6 @@ bool isTame(df::unit* creature) case df::animal_training_level::Domesticated: tame=true; break; - case df::animal_training_level::SemiWild: //?? case df::animal_training_level::Unk8: //?? case df::animal_training_level::WildUntamed: default: @@ -1232,7 +1232,7 @@ bool isFreeEgglayer(df::unit * unit) { if( !isDead(unit) && !isUndead(unit) && isFemale(unit) - && isDomesticated(unit) // better strict than sorry (medium trained wild animals can revert into wild state) + && isTame(unit) && isOwnCiv(unit) && isEggLayer(unit) && !isAssigned(unit) @@ -1856,14 +1856,18 @@ command_result df_zone (color_ostream &out, vector <string> & parameters) // if followed by another parameter, check if it's numeric if(i < parameters.size()-1) { - stringstream ss(parameters[i+1]); - int new_building = -1; - ss >> new_building; - if(new_building != -1) + auto & str = parameters[i+1]; + if(str.size() > 0 && str[0] >= '0' && str[0] <= '9') { - i++; - target_building = new_building; - out << "Assign selected unit(s) to building #" << target_building <<std::endl; + stringstream ss(parameters[i+1]); + int new_building = -1; + ss >> new_building; + if(new_building != -1) + { + i++; + target_building = new_building; + out << "Assign selected unit(s) to building #" << target_building <<std::endl; + } } } if(target_building == -1) diff --git a/scripts/devel/prepare-save.lua b/scripts/devel/prepare-save.lua index 781e3b89..c282c8a4 100644 --- a/scripts/devel/prepare-save.lua +++ b/scripts/devel/prepare-save.lua @@ -1,7 +1,22 @@ -- Prepare the current save for use with devel/find-offsets. +local utils = require 'utils' + df.global.pause_state = true +print[[ +WARNING: THIS SCRIPT IS STRICTLY FOR DFHACK DEVELOPERS. + +This script prepares the current savegame to be used +with devel/find-offsets. It CHANGES THE GAME STATE +to predefined values, and initiates an immediate +quicksave, thus PERMANENTLY MODIFYING the save. +]] + +if not utils.prompt_yes_no('Proceed?') then + return +end + --[[print('Placing anchor...') do diff --git a/scripts/fix/loyaltycascade.rb b/scripts/fix/loyaltycascade.rb new file mode 100644 index 00000000..6fad2947 --- /dev/null +++ b/scripts/fix/loyaltycascade.rb @@ -0,0 +1,64 @@ +# script to fix loyalty cascade, when you order your militia to kill friendly units + +def fixunit(unit) + return if unit.race != df.ui.race_id or unit.civ_id != df.ui.civ_id + links = unit.hist_figure_tg.entity_links + fixed = false + + # check if the unit is a civ renegade + if i1 = links.index { |l| + l.kind_of?(DFHack::HistfigEntityLinkFormerMemberst) and + l.entity_id == df.ui.civ_id + } and i2 = links.index { |l| + l.kind_of?(DFHack::HistfigEntityLinkEnemyst) and + l.entity_id == df.ui.civ_id + } + fixed = true + i1, i2 = i2, i1 if i1 > i2 + links.delete_at i2 + links.delete_at i1 + links << DFHack::HistfigEntityLinkMemberst.cpp_new(:entity_id => df.ui.civ_id, :link_strength => 100) + df.add_announcement "fixloyalty: #{unit.name} is now a member of #{df.ui.civ_tg.name} again" + end + + # check if the unit is a group renegade + if i1 = links.index { |l| + l.kind_of?(DFHack::HistfigEntityLinkFormerMemberst) and + l.entity_id == df.ui.group_id + } and i2 = links.index { |l| + l.kind_of?(DFHack::HistfigEntityLinkEnemyst) and + l.entity_id == df.ui.group_id + } + fixed = true + i1, i2 = i2, i1 if i1 > i2 + links.delete_at i2 + links.delete_at i1 + links << DFHack::HistfigEntityLinkMemberst.cpp_new(:entity_id => df.ui.group_id, :link_strength => 100) + df.add_announcement "fixloyalty: #{unit.name} is now a member of #{df.ui.group_tg.name} again" + end + + # fix the 'is an enemy' cache matrix (mark to be recalculated by the game when needed) + if fixed and unit.unknown8.enemy_status_slot != -1 + i = unit.unknown8.enemy_status_slot + unit.unknown8.enemy_status_slot = -1 + cache = df.world.enemy_status_cache + cache.slot_used[i] = false + cache.rel_map[i].map! { -1 } + cache.rel_map.each { |a| a[i] = -1 } + cache.next_slot = i if cache.next_slot > i + end + + # return true if we actually fixed the unit + fixed +end + +count = 0 +df.unit_citizens.each { |u| + count += 1 if fixunit(u) +} + +if count > 0 + puts "loyalty cascade fixed (#{count} dwarves)" +else + puts "no loyalty cascade found" +end diff --git a/scripts/fix/stuckdoors.rb b/scripts/fix/stuckdoors.rb new file mode 100644 index 00000000..619ceeeb --- /dev/null +++ b/scripts/fix/stuckdoors.rb @@ -0,0 +1,20 @@ +# fix doors that are frozen in 'open' state + +# door is stuck in open state if the map occupancy flag incorrectly indicates +# that an unit is present (and creatures will prone to pass through) + +count = 0 +df.world.buildings.all.each { |bld| + # for all doors + next if bld._rtti_classname != :building_doorst + # check if it is open + next if bld.close_timer == 0 + # check if occupancy is set + occ = df.map_occupancy_at(bld.x1, bld.y1, bld.z) + next if not occ.unit + # check if an unit is present + next if df.world.units.active.find { |u| u.pos.x == bld.x1 and u.pos.y == bld.y1 and u.pos.z == bld.z } + count += 1 + occ.unit = false +} +puts "unstuck #{count} doors" diff --git a/scripts/fixnaked.lua b/scripts/fixnaked.lua new file mode 100644 index 00000000..3f1ee6fd --- /dev/null +++ b/scripts/fixnaked.lua @@ -0,0 +1,41 @@ +function fixnaked() +local total_fixed = 0 +local total_removed = 0 + +for fnUnitCount,fnUnit in ipairs(df.global.world.units.all) do + if fnUnit.race == df.global.ui.race_id then + local listEvents = fnUnit.status.recent_events + --for lkey,lvalue in pairs(listEvents) do + -- print(df.unit_thought_type[lvalue.type],lvalue.type,lvalue.age,lvalue.subtype,lvalue.severity) + --end + + local found = 1 + local fixed = 0 + while found == 1 do + local events = fnUnit.status.recent_events + found = 0 + for k,v in pairs(events) do + if v.type == df.unit_thought_type.Uncovered + or v.type == df.unit_thought_type.NoShirt + or v.type == df.unit_thought_type.NoShoes + or v.type == df.unit_thought_type.NoCloak + or v.type == df.unit_thought_type.OldClothing + or v.type == df.unit_thought_type.TatteredClothing + or v.type == df.unit_thought_type.RottedClothing then + events:erase(k) + found = 1 + total_removed = total_removed + 1 + fixed = 1 + break + end + end + end + if fixed == 1 then + total_fixed = total_fixed + 1 + print(total_fixed, total_removed, dfhack.TranslateName(dfhack.units.getVisibleName(fnUnit))) + end + end +end +print("Total Fixed: "..total_fixed) +end +fixnaked() diff --git a/scripts/gui/hello-world.lua b/scripts/gui/hello-world.lua new file mode 100644 index 00000000..80986bbf --- /dev/null +++ b/scripts/gui/hello-world.lua @@ -0,0 +1,22 @@ +-- Test lua viewscreens. + +local gui = require 'gui' + +local text = 'Woohoo, lua viewscreen :)' + +local screen = mkinstance(gui.FramedScreen, { + frame_style = gui.GREY_LINE_FRAME, + frame_title = 'Hello World', + frame_width = #text+6, + frame_height = 3, + onRenderBody = function(self, dc) + dc:seek(3,1):string(text, COLOR_LIGHTGREEN) + end, + onInput = function(self,keys) + if keys.LEAVESCREEN or keys.SELECT then + self:dismiss() + end + end +}):init() + +screen:show() diff --git a/scripts/gui/mechanisms.lua b/scripts/gui/mechanisms.lua new file mode 100644 index 00000000..6b4b4042 --- /dev/null +++ b/scripts/gui/mechanisms.lua @@ -0,0 +1,131 @@ +-- Shows mechanisms linked to the current building. + +local utils = require 'utils' +local gui = require 'gui' +local guidm = require 'gui.dwarfmode' + +function listMechanismLinks(building) + local lst = {} + local function push(item, mode) + if item then + lst[#lst+1] = { + obj = item, mode = mode, + name = utils.getBuildingName(item) + } + end + end + + push(building, 'self') + + if not df.building_actual:is_instance(building) then + return lst + end + + local item, tref, tgt + for _,v in ipairs(building.contained_items) do + item = v.item + if df.item_trappartsst:is_instance(item) then + tref = dfhack.items.getGeneralRef(item, df.general_ref_type.BUILDING_TRIGGER) + if tref then + push(tref:getBuilding(), 'trigger') + end + tref = dfhack.items.getGeneralRef(item, df.general_ref_type.BUILDING_TRIGGERTARGET) + if tref then + push(tref:getBuilding(), 'target') + end + end + end + + return lst +end + +MechanismList = defclass(MechanismList, guidm.MenuOverlay) + +MechanismList.focus_path = 'mechanisms' + +function MechanismList:init(building) + self:init_fields{ + links = {}, selected = 1 + } + guidm.MenuOverlay.init(self) + self:fillList(building) + return self +end + +function MechanismList:fillList(building) + local links = listMechanismLinks(building) + + self.old_viewport = self:getViewport() + self.old_cursor = guidm.getCursorPos() + + if #links <= 1 then + links[1].mode = 'none' + end + + self.links = links + self.selected = 1 +end + +local colors = { + self = COLOR_CYAN, none = COLOR_CYAN, + trigger = COLOR_GREEN, target = COLOR_GREEN +} +local icons = { + self = 128, none = 63, trigger = 27, target = 26 +} + +function MechanismList:onRenderBody(dc) + dc:clear() + dc:seek(1,1):string("Mechanism Links", COLOR_WHITE):newline() + + for i,v in ipairs(self.links) do + local pen = { fg=colors[v.mode], bold = (i == self.selected) } + dc:newline(1):pen(pen):char(icons[v.mode]) + dc:advance(1):string(v.name) + end + + local nlinks = #self.links + + if nlinks <= 1 then + dc:newline():newline(1):string("This building has no links", COLOR_LIGHTRED) + end + + dc:newline():newline(1):pen(COLOR_WHITE) + dc:string("Esc", COLOR_LIGHTGREEN):string(": Back, ") + dc:string("Enter", COLOR_LIGHTGREEN):string(": Switch") +end + +function MechanismList:changeSelected(delta) + if #self.links <= 1 then return end + self.selected = 1 + (self.selected + delta - 1) % #self.links + self:selectBuilding(self.links[self.selected].obj) +end + +function MechanismList:onInput(keys) + if keys.SECONDSCROLL_UP then + self:changeSelected(-1) + elseif keys.SECONDSCROLL_DOWN then + self:changeSelected(1) + elseif keys.LEAVESCREEN then + self:dismiss() + if self.selected ~= 1 then + self:selectBuilding(self.links[1].obj, self.old_cursor, self.old_view) + end + elseif keys.SELECT_ALL then + if self.selected > 1 then + self:fillList(self.links[self.selected].obj) + end + elseif keys.SELECT then + self:dismiss() + elseif self:simulateViewScroll(keys) then + return + end +end + +if dfhack.gui.getCurFocus() ~= 'dwarfmode/QueryBuilding/Some' then + qerror("This script requires the main dwarfmode view in 'q' mode") +end + +local list = mkinstance(MechanismList):init(df.global.world.selected_building) +list:show() +list:changeSelected(1) diff --git a/scripts/gui/room-list.lua b/scripts/gui/room-list.lua new file mode 100644 index 00000000..a4507466 --- /dev/null +++ b/scripts/gui/room-list.lua @@ -0,0 +1,246 @@ +-- Browses rooms owned by a unit. + +local utils = require 'utils' +local gui = require 'gui' +local guidm = require 'gui.dwarfmode' + +local room_type_table = { + [df.building_bedst] = { token = 'bed', qidx = 2, tile = 233 }, + [df.building_tablest] = { token = 'table', qidx = 3, tile = 209 }, + [df.building_chairst] = { token = 'chair', qidx = 4, tile = 210 }, + [df.building_coffinst] = { token = 'coffin', qidx = 5, tile = 48 }, +} + +local room_quality_table = { + { 1, 'Meager Quarters', 'Meager Dining Room', 'Meager Office', 'Grave' }, + { 100, 'Modest Quarters', 'Modest Dining Room', 'Modest Office', "Servant's Burial Chamber" }, + { 250, 'Quarters', 'Dining Room', 'Office', 'Burial Chamber' }, + { 500, 'Decent Quarters', 'Decent Dining Room', 'Decent Office', 'Tomb' }, + { 1000, 'Fine Quarters', 'Fine Dining Room', 'Splendid Office', 'Fine Tomb' }, + { 1500, 'Great Bedroom', 'Great Dining Room', 'Throne Room', 'Mausoleum' }, + { 2500, 'Grand Bedroom', 'Grand Dining Room', 'Opulent Throne Room', 'Grand Mausoleum' }, + { 10000, 'Royal Bedroom', 'Royal Dining Room', 'Royal Throne Room', 'Royal Mausoleum' } +} + +function getRoomName(building, unit) + local info = room_type_table[building._type] + if not info or not building.is_room then + return utils.getBuildingName(building) + end + + local quality = building:getRoomValue(unit) + local row = room_quality_table[1] + for _,v in ipairs(room_quality_table) do + if v[1] <= quality then + row = v + else + break + end + end + return row[info.qidx] +end + +function makeRoomEntry(bld, unit, is_spouse) + local info = room_type_table[bld._type] or {} + + return { + obj = bld, + token = info.token or '?', + tile = info.tile or '?', + caption = getRoomName(bld, unit), + can_use = (not is_spouse or bld:canUseSpouseRoom()), + owner = unit + } +end + +function listRooms(unit, spouse) + local rv = {} + for _,v in pairs(unit.owned_buildings) do + if v.owner == unit then + rv[#rv+1] = makeRoomEntry(v, unit, spouse) + end + end + return rv +end + +function concat_lists(...) + local rv = {} + for i = 1,select('#',...) do + local v = select(i,...) + if v then + for _,x in ipairs(v) do rv[#rv+1] = x end + end + end + return rv +end + +RoomList = defclass(RoomList, guidm.MenuOverlay) + +RoomList.focus_path = 'room-list' + +function RoomList:init(unit) + local base_bld = df.global.world.selected_building + + self:init_fields{ + unit = unit, base_building = base_bld, + items = {}, selected = 1, + own_rooms = {}, spouse_rooms = {} + } + guidm.MenuOverlay.init(self) + + self.old_viewport = self:getViewport() + self.old_cursor = guidm.getCursorPos() + + if unit then + self.own_rooms = listRooms(unit) + self.spouse = df.unit.find(unit.relations.spouse_id) + if self.spouse then + self.spouse_rooms = listRooms(self.spouse, unit) + end + self.items = concat_lists(self.own_rooms, self.spouse_rooms) + end + + if base_bld then + for i,v in ipairs(self.items) do + if v.obj == base_bld then + self.selected = i + v.tile = 26 + goto found + end + end + self.base_item = makeRoomEntry(base_bld, unit) + self.base_item.owner = unit + self.base_item.old_owner = base_bld.owner + self.base_item.tile = 26 + self.items = concat_lists({self.base_item}, self.items) + ::found:: + end + + return self +end + +local sex_char = { [0] = 12, [1] = 11 } + +function drawUnitName(dc, unit) + dc:pen(COLOR_GREY) + if unit then + local color = dfhack.units.getProfessionColor(unit) + dc:char(sex_char[unit.sex] or '?'):advance(1):pen(color) + + local vname = dfhack.units.getVisibleName(unit) + if vname and vname.has_name then + dc:string(dfhack.TranslateName(vname)..', ') + end + dc:string(dfhack.units.getProfessionName(unit)) + else + dc:string("No Owner Assigned") + end +end + +function drawRoomEntry(dc, entry, selected) + local color = COLOR_GREEN + if not entry.can_use then + color = COLOR_RED + elseif entry.obj.owner ~= entry.owner or not entry.owner then + color = COLOR_CYAN + end + dc:pen{fg = color, bold = (selected == entry)} + dc:char(entry.tile):advance(1):string(entry.caption) +end + +function can_modify(sel_item) + return sel_item and sel_item.owner + and sel_item.can_use and not sel_item.owner.flags1.dead +end + +function RoomList:onRenderBody(dc) + local sel_item = self.items[self.selected] + + dc:clear():seek(1,1) + drawUnitName(dc, self.unit) + + if self.base_item then + dc:newline():newline(2) + drawRoomEntry(dc, self.base_item, sel_item) + end + if #self.own_rooms > 0 then + dc:newline() + for _,v in ipairs(self.own_rooms) do + dc:newline(2) + drawRoomEntry(dc, v, sel_item) + end + end + if #self.spouse_rooms > 0 then + dc:newline():newline(1) + drawUnitName(dc, self.spouse) + + dc:newline() + for _,v in ipairs(self.spouse_rooms) do + dc:newline(2) + drawRoomEntry(dc, v, sel_item) + end + end + if self.unit and #self.own_rooms == 0 and #self.spouse_rooms == 0 then + dc:newline():newline(2):string("No already assigned rooms.", COLOR_LIGHTRED) + end + + dc:newline():newline(1):pen(COLOR_WHITE) + dc:string("Esc", COLOR_LIGHTGREEN):string(": Back") + + if can_modify(sel_item) then + dc:string(", "):string("Enter", COLOR_LIGHTGREEN) + if sel_item.obj.owner == sel_item.owner then + dc:string(": Unassign") + else + dc:string(": Assign") + end + end +end + +function RoomList:changeSelected(delta) + if #self.items <= 1 then return end + self.selected = 1 + (self.selected + delta - 1) % #self.items + self:selectBuilding(self.items[self.selected].obj) +end + +function RoomList:onInput(keys) + local sel_item = self.items[self.selected] + + if keys.SECONDSCROLL_UP then + self:changeSelected(-1) + elseif keys.SECONDSCROLL_DOWN then + self:changeSelected(1) + elseif keys.LEAVESCREEN then + self:dismiss() + + if self.base_building then + if not sel_item or self.base_building ~= sel_item.obj then + self:selectBuilding(self.base_building, self.old_cursor, self.old_view) + end + if self.unit and self.base_building.owner == self.unit then + df.global.ui_building_in_assign = false + end + end + elseif keys.SELECT then + if can_modify(sel_item) then + local owner = sel_item.owner + if sel_item.obj.owner == owner then + owner = sel_item.old_owner + end + dfhack.buildings.setOwner(sel_item.obj, owner) + end + elseif self:simulateViewScroll(keys) then + return + end +end + +local focus = dfhack.gui.getCurFocus() +if focus == 'dwarfmode/QueryBuilding/Some' then + local base = df.global.world.selected_building + mkinstance(RoomList):init(base.owner):show() +elseif focus == 'dwarfmode/QueryBuilding/Some/Assign/Unit' then + local unit = df.global.ui_building_assign_units[df.global.ui_building_item_cursor] + mkinstance(RoomList):init(unit):show() +else + qerror("This script requires the main dwarfmode view in 'q' mode") +end diff --git a/scripts/magmasource.rb b/scripts/magmasource.rb new file mode 100644 index 00000000..e9708083 --- /dev/null +++ b/scripts/magmasource.rb @@ -0,0 +1,56 @@ +# create an infinite magma source at the cursor + +$magma_sources ||= [] + +case $script_args[0] +when 'here' + $magma_onupdate ||= df.onupdate_register(12) { + # called every 12 game ticks (100x a dwarf day) + if $magma_sources.empty? + df.onupdate_unregister($magma_onupdate) + $magma_onupdate = nil + end + + $magma_sources.each { |x, y, z| + if tile = df.map_tile_at(x, y, z) and tile.shape_passableflow + des = tile.designation + tile.spawn_magma(des.flow_size + 1) if des.flow_size < 7 + end + } + } + + if df.cursor.x != -30000 + if tile = df.map_tile_at(df.cursor) + if tile.shape_passableflow + $magma_sources << [df.cursor.x, df.cursor.y, df.cursor.z] + else + puts "Impassable tile: I'm afraid I can't do that, Dave" + end + else + puts "Unallocated map block - build something here first" + end + else + puts "Please put the game cursor where you want a magma source" + end + +when 'delete-here' + $magma_sources.delete [df.cursor.x, df.cursor.y, df.cursor.z] + +when 'stop' + $magma_sources.clear + +else + puts <<EOS +Creates a new infinite magma source at the cursor. + +Arguments: + here - create a new source at the current cursor position + (call multiple times for higher flow) + delete-here - delete the source under the cursor + stop - delete all created magma sources +EOS + + if $magma_sources.first + puts '', 'Current magma sources:', $magma_sources.map { |s| " #{s.inspect}" } + end +end diff --git a/scripts/slayrace.rb b/scripts/slayrace.rb index 27b1ba3c..b1fc24e3 100644 --- a/scripts/slayrace.rb +++ b/scripts/slayrace.rb @@ -1,6 +1,9 @@ # slay all creatures of a given race +# race = name of the race to eradicate, use 'him' to target only the selected creature race = $script_args[0] +# if the 2nd parameter is 'magma', magma rain for the targets instead of instant death +magma = ($script_args[1] == 'magma') checkunit = lambda { |u| u.body.blood_count != 0 and @@ -9,12 +12,39 @@ checkunit = lambda { |u| not df.map_designation_at(u).hidden } +slayit = lambda { |u| + if not magma + # just make them drop dead + u.body.blood_count = 0 + # some races dont mind having no blood, ensure they are still taken care of. + u.animal.vanish_countdown = 2 + else + # it's getting hot around here + # !!WARNING!! do not call on a magma-safe creature + ouh = df.onupdate_register(1) { + if u.flags1.dead + df.onupdate_unregister(ouh) + else + x, y, z = u.pos.x, u.pos.y, u.pos.z + z += 1 while tile = df.map_tile_at(x, y, z+1) and tile.shape_passableflow + df.map_tile_at(x, y, z).spawn_magma(7) + end + } + end +} + all_races = df.world.units.active.map { |u| u.race_tg.creature_id if checkunit[u] }.compact.uniq.sort if !race puts all_races +elsif race == 'him' + if him = df.unit_find + slayit[him] + else + puts "Choose target" + end else raw_race = df.match_rawname(race, all_races) raise 'invalid race' if not raw_race @@ -24,7 +54,7 @@ else count = 0 df.world.units.active.each { |u| if u.race == race_nr and checkunit[u] - u.body.blood_count = 0 + slayit[u] count += 1 end } |
