diff --git a/COMPILE.rst b/COMPILE.rst index beb738363..8fca0e1f5 100644 --- a/COMPILE.rst +++ b/COMPILE.rst @@ -152,10 +152,13 @@ Valid and useful build types include 'Release', 'Debug' and ================================ Using the library as a developer ================================ -Currently, the only way to use the library is to write a plugin that can be loaded by it. + +Currently, the most direct way to use the library is to write a plugin that can be loaded by it. All the plugins can be found in the 'plugins' folder. There's no in-depth documentation on how to write one yet, but it should be easy enough to copy one and just follow the pattern. +Other than through plugins, it is possible to use DFHack via remote access interface, or by writing Lua scripts. + The most important parts of DFHack are the Core, Console, Modules and Plugins. * Core acts as the centerpiece of DFHack - it acts as a filter between DF and SDL and synchronizes the various plugins with DF. @@ -171,6 +174,24 @@ The main license is zlib/libpng, some bits are MIT licensed, and some are BSD li Feel free to add your own extensions and plugins. Contributing back to the dfhack repository is welcome and the right thing to do :) +DF data structure definitions +============================= + +DFHack uses information about the game data structures, represented via xml files in the library/xml/ submodule. + +Data structure layouts are described in files following the df.*.xml name pattern. This information is transformed by a perl script into C++ headers describing the structures, and associated metadata for the Lua wrapper. These headers and data are then compiled into the DFHack libraries, thus necessitating a compatibility break every time layouts change; in return it significantly boosts the efficiency and capabilities of DFHack code. + +Global object addresses are stored in symbols.xml, which is copied to the dfhack release package and loaded as data at runtime. + +Remote access interface +======================= + +DFHack supports remote access by exchanging Google protobuf messages via a TCP socket. Both the core and plugins can define remotely accessible methods. The ``dfhack-run`` command uses this interface to invoke ordinary console commands. + +Currently the supported set of requests is limited, because the developers don't know what exactly is most useful. + +Protocol client implementations exist for Java and C#. + Contributing to DFHack ====================== diff --git a/Compile.html b/Compile.html index b0f9e9c6e..e17e57e22 100644 --- a/Compile.html +++ b/Compile.html @@ -334,10 +334,12 @@ ul.auto-toc {
  • Build types
  • Using the library as a developer
    -

    Event type

    +

    Event type

    An event is just a lua table with a predefined metatable that contains a __call metamethod. When it is invoked, it loops through the table with next and calls all contained values. @@ -1411,15 +1480,45 @@ order using dfhack.safecall.

    +
    +

    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/. +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:

    +
      +
    • mkmodule(name)

      +

      Creates an environment table for the module. Intended to be used as:

      +
      +local _ENV = mkmodule('foo')
      +...
      +return _ENV
      +
      +

      If called the second time, returns the same table; thus providing reload support.

      +
    • +
    • reload(name)

      +

      Reloads a previously require-d module "name" from the file. +Intended as a help for module development.

      +
    • +
    • dfhack.BASE_G

      +

      This variable contains the root global environment table, which is +used as a base for all module and script environments. Its contents +should be kept limited to the standard Lua library and API described +in this document.

      +
    • +
    +
    -

    Plugins

    +

    Plugins

    DFHack plugins may export native functions and events to lua contexts. They are automatically imported by mkmodule('plugins.<name>'); this means that a lua module file is still necessary for require to read.

    The following plugins have lua support.

    -

    burrows

    +

    burrows

    Implements extended burrow manipulations.

    Events:

      @@ -1457,11 +1556,41 @@ set is the same as used by the command line.

      The lua module file also re-exports functions from dfhack.burrows.

    -

    sort

    +

    sort

    Does not export any native functions as of now. Instead, it calls lua code to perform the actual ordering of list items.

    +
    +

    Scripts

    +

    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.

    +

    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. +When calling such scripts, always use '/' as the separator for +directories, e.g. devel/lua-example.

    +

    Scripts are re-read from disk every time they are used +(this may be changed later to check the file change time); however +the global variable values persist in memory between calls. +Every script gets its own separate environment for global +variables.

    +

    Arguments are passed in to the scripts via the ... built-in +quasi-variable; when the script is called by the DFHack core, +they are all guaranteed to be non-nil strings.

    +

    DFHack core invokes the scripts in the core context (see above); +however it is possible to call them from any lua code (including +from other scripts) in any context, via the same function the core uses:

    +
      +
    • dfhack.run_script(name[,args...])

      +

      Run a lua script in hack/scripts/, as if it was started from dfhack command-line. +The name argument should be the name stem, as would be used on the command line.

      +
    • +
    +

    Note that this function lets errors propagate to the caller.

    +
    diff --git a/README.rst b/README.rst index d57cf2a72..9543e63a0 100644 --- a/README.rst +++ b/README.rst @@ -1361,3 +1361,60 @@ also tries to have dwarves specialize in specific skills. while it is enabled. For detailed usage information, see 'help autolabor'. + + +growcrops +========= +Instantly grow seeds inside farming plots. + +With no argument, this command list the various seed types currently in +use in your farming plots. +With a seed type, the script will grow 100 of these seeds, ready to be +harvested. You can change the number with a 2nd argument. + +For exemple, to grow 40 plump helmet spawn: +:: + + growcrops plump 40 + +This is a ruby script and needs the ruby plugin. + + +removebadthoughts +================= +This script remove negative thoughts from your dwarves. Very useful against +tantrum spirals. + +With a selected unit in 'v' mode, will clear this unit's mind, otherwise +clear all your fort's units minds. + +Individual dwarf happiness may not increase right after this command is run, +but in the short term your dwarves will get much more joyful. +The thoughts are set to be very old, and the game will remove them soon when +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 +======== +Kills any unit of a given race. + +With no argument, lists the available races. + +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. + +Targets 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: +:: + rb_eval df.unit_find.body.blood_count = 0 + diff --git a/Readme.html b/Readme.html index cd579d374..50ceae999 100644 --- a/Readme.html +++ b/Readme.html @@ -1350,7 +1350,12 @@ produce undesirable results. There are a few good ones though.

    You are in fort game mode, managing your fortress and paused. You switch to the arena game mode, assume control of a creature and then switch to adventure game mode(1). -You just lost a fortress and gained an adventurer.

    +You just lost a fortress and gained an adventurer. +You could also do this. +You are in fort game mode, managing your fortress and paused at the esc menu. +You switch to the adventure game mode, then use Dfusion to assume control of a creature and then +save or retire. +You just created a returnable mountain home and gained an adventurer.

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

    diff --git a/depends/clsocket b/depends/clsocket index 651c72229..3808a8ac4 160000 --- a/depends/clsocket +++ b/depends/clsocket @@ -1 +1 @@ -Subproject commit 651c722295da233ca8d918e298ed226cc0e6c9b9 +Subproject commit 3808a8ac4fc1bbc0422492cb042099c47a312b58 diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt index 73f6c9ec7..75485ff22 100644 --- a/library/CMakeLists.txt +++ b/library/CMakeLists.txt @@ -8,8 +8,8 @@ IF(UNIX) OPTION(CONSOLE_NO_CATCH "Make the console not catch 'CTRL+C' events for easier debugging." OFF) ENDIF() -include_directories (include) include_directories (proto) +include_directories (include) SET(PERL_EXECUTABLE "perl" CACHE FILEPATH "This is the perl executable to run in the codegen step. Tweak it if you need to run a specific one.") diff --git a/library/Core.cpp b/library/Core.cpp index f30e19c27..09344135c 100644 --- a/library/Core.cpp +++ b/library/Core.cpp @@ -204,7 +204,7 @@ struct sortable }; }; -static std::string getLuaHelp(std::string path) +static std::string getScriptHelp(std::string path, std::string helpprefix) { ifstream script(path.c_str()); @@ -212,14 +212,14 @@ static std::string getLuaHelp(std::string path) { std::string help; if (getline(script, help) && - help.substr(0,3) == "-- ") - return help.substr(3); + help.substr(0,helpprefix.length()) == helpprefix) + return help.substr(helpprefix.length()); } - return "Lua script."; + return "No help available."; } -static std::map listLuaScripts(std::string path) +static std::map listScripts(PluginManager *plug_mgr, std::string path) { std::vector files; getdir(path, files); @@ -229,10 +229,16 @@ static std::map listLuaScripts(std::string path) { if (hasEnding(files[i], ".lua")) { - std::string help = getLuaHelp(path + files[i]); + std::string help = getScriptHelp(path + files[i], "-- "); pset[files[i].substr(0, files[i].size()-4)] = help; } + else if (plug_mgr->eval_ruby && hasEnding(files[i], ".rb")) + { + std::string help = getScriptHelp(path + files[i], "# "); + + pset[files[i].substr(0, files[i].size()-3)] = help; + } } return pset; } @@ -275,31 +281,34 @@ 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 &args) +{ + std::string rbcmd = "$script_args = ["; + for (size_t i = 0; i < args.size(); i++) + rbcmd += "'" + args[i] + "', "; + rbcmd += "]\n"; + + rbcmd += "load './hack/scripts/" + name + ".rb'"; + + return plug_mgr->eval_ruby(rbcmd.c_str()); +} + command_result Core::runCommand(color_ostream &out, const std::string &command) { - //fprintf(stderr,"Inside runCommand"); - //fprintf(stderr," with command %s\n",command.c_str()); if (!command.empty()) { - //fprintf(stderr,"Command is not empty, tokenizing\n"); vector parts; Core::cheap_tokenise(command,parts); - //fprintf(stderr,"Tokenized, got %d parts\n",parts.size()); if(parts.size() == 0) return CR_NOT_IMPLEMENTED; string first = parts[0]; - //fprintf(stderr,"Erasing beginning\n"); parts.erase(parts.begin()); - - //fprintf(stderr,"I think we're about there\n"); if (first[0] == '#') return CR_OK; cerr << "Invoking: " << command << endl; - - //fprintf(stderr,"Returning with the next recursion\n"); return runCommand(out, first, parts); } else @@ -357,10 +366,16 @@ command_result Core::runCommand(color_ostream &con, const std::string &first, ve return CR_OK; } } - auto filename = getHackPath() + "scripts/" + parts[0] + ".lua"; - if (fileExists(filename)) + auto filename = getHackPath() + "scripts/" + parts[0]; + if (fileExists(filename + ".lua")) + { + string help = getScriptHelp(filename + ".lua", "-- "); + con.print("%s: %s\n", parts[0].c_str(), help.c_str()); + return CR_OK; + } + if (plug_mgr->eval_ruby && fileExists(filename + ".rb")) { - string help = getLuaHelp(filename); + string help = getScriptHelp(filename + ".rb", "# "); con.print("%s: %s\n", parts[0].c_str(), help.c_str()); return CR_OK; } @@ -508,7 +523,7 @@ command_result Core::runCommand(color_ostream &con, const std::string &first, ve con.print(" %-22s- %s\n",(*iter).name.c_str(), (*iter).description.c_str()); con.reset_color(); } - auto scripts = listLuaScripts(getHackPath() + "scripts/"); + auto scripts = listScripts(plug_mgr, getHackPath() + "scripts/"); if (!scripts.empty()) { con.print("\nscripts:\n"); @@ -613,9 +628,11 @@ command_result Core::runCommand(color_ostream &con, const std::string &first, ve command_result res = plug_mgr->InvokeCommand(con, first, parts); if(res == CR_NOT_IMPLEMENTED) { - auto filename = getHackPath() + "scripts/" + first + ".lua"; - if (fileExists(filename)) + auto filename = getHackPath() + "scripts/" + first; + if (fileExists(filename + ".lua")) res = runLuaScript(con, first, parts); + else if (plug_mgr->eval_ruby && fileExists(filename + ".rb")) + res = runRubyScript(plug_mgr, first, parts); else con.printerr("%s is not a recognized command.\n", first.c_str()); } @@ -680,7 +697,7 @@ void fIOthread(void * iodata) { string command = ""; int ret = con.lineedit("[DFHack]# ",command, main_history); - //fprintf(stderr,"Command: [%s]\n",command.c_str()); + fprintf(stderr,"Command: [%s]\n",command.c_str()); if(ret == -2) { cerr << "Console is shutting down properly." << endl; @@ -694,13 +711,13 @@ void fIOthread(void * iodata) else if(ret) { // a proper, non-empty command was entered - //fprintf(stderr,"Adding command to history\n"); + fprintf(stderr,"Adding command to history\n"); main_history.add(command); - //fprintf(stderr,"Saving history\n"); + fprintf(stderr,"Saving history\n"); main_history.save("dfhack.history"); } - //fprintf(stderr,"Running command\n"); + fprintf(stderr,"Running command\n"); auto rv = core->runCommand(con, command); @@ -1207,7 +1224,8 @@ bool Core::ncurses_wgetch(int in, int & out) { df::viewscreen * ws = Gui::GetCurrentScreen(); if (strict_virtual_cast(ws) && - df::global::ui->main.mode != ui_sidebar_mode::Hotkeys) + df::global::ui->main.mode != ui_sidebar_mode::Hotkeys && + df::global::ui->main.hotkeys[idx].cmd == df::ui_hotkey::T_cmd::None) { setHotkeyCmd(df::global::ui->main.hotkeys[idx].name); return false; @@ -1355,7 +1373,8 @@ bool Core::SelectHotkey(int sym, int modifiers) idx += 8; if (strict_virtual_cast(screen) && - df::global::ui->main.mode != ui_sidebar_mode::Hotkeys) + df::global::ui->main.mode != ui_sidebar_mode::Hotkeys && + df::global::ui->main.hotkeys[idx].cmd == df::ui_hotkey::T_cmd::None) { cmd = df::global::ui->main.hotkeys[idx].name; } diff --git a/library/Hooks-darwin.cpp b/library/Hooks-darwin.cpp index ef89105d4..190616b86 100644 --- a/library/Hooks-darwin.cpp +++ b/library/Hooks-darwin.cpp @@ -38,11 +38,11 @@ distribution. #include #include -/*typedef struct interpose_s +typedef struct interpose_s { void *new_func; void *orig_func; -} interpose_t;*/ +} interpose_t; #include "DFHack.h" #include "Core.h" @@ -58,11 +58,18 @@ distribution. };*/ +#define DYLD_INTERPOSE(_replacment,_replacee) __attribute__((used)) static struct{ const void* replacment; const void* replacee; } _interpose_##_replacee __attribute__ ((section ("__DATA,__interpose"))) = { (const void*)(unsigned long)&_replacment, (const void*)(unsigned long)&_replacee }; + +DYLD_INTERPOSE(DFH_SDL_Init,SDL_Init); +DYLD_INTERPOSE(DFH_SDL_PollEvent,SDL_PollEvent); +DYLD_INTERPOSE(DFH_SDL_Quit,SDL_Quit); +DYLD_INTERPOSE(DFH_SDL_NumJoysticks,SDL_NumJoysticks); + /******************************************************************************* * SDL part starts here * *******************************************************************************/ // hook - called for each game tick (or more often) -DFhackCExport int SDL_NumJoysticks(void) +DFhackCExport int DFH_SDL_NumJoysticks(void) { DFHack::Core & c = DFHack::Core::getInstance(); return c.Update(); @@ -70,7 +77,7 @@ DFhackCExport int SDL_NumJoysticks(void) // hook - called at program exit static void (*_SDL_Quit)(void) = 0; -DFhackCExport void SDL_Quit(void) +DFhackCExport void DFH_SDL_Quit(void) { DFHack::Core & c = DFHack::Core::getInstance(); c.Shutdown(); @@ -79,16 +86,16 @@ DFhackCExport void SDL_Quit(void) _SDL_Quit(); }*/ - _SDL_Quit(); + SDL_Quit(); } // called by DF to check input events static int (*_SDL_PollEvent)(SDL::Event* event) = 0; -DFhackCExport int SDL_PollEvent(SDL::Event* event) +DFhackCExport int DFH_SDL_PollEvent(SDL::Event* event) { pollevent_again: // if SDL returns 0 here, it means there are no more events. return 0 - int orig_return = _SDL_PollEvent(event); + int orig_return = SDL_PollEvent(event); if(!orig_return) return 0; // otherwise we have an event to filter @@ -128,7 +135,7 @@ DFhackCExport int wgetch(WINDOW *win) // hook - called at program start, initialize some stuffs we'll use later static int (*_SDL_Init)(uint32_t flags) = 0; -DFhackCExport int SDL_Init(uint32_t flags) +DFhackCExport int DFH_SDL_Init(uint32_t flags) { // reroute stderr fprintf(stderr,"dfhack: attempting to hook in\n"); @@ -158,6 +165,7 @@ DFhackCExport int SDL_Init(uint32_t flags) DFHack::Core & c = DFHack::Core::getInstance(); //c.Init(); - int ret = _SDL_Init(flags); + //int ret = _SDL_Init(flags); + int ret = SDL_Init(flags); return ret; } \ No newline at end of file diff --git a/library/LuaApi.cpp b/library/LuaApi.cpp index 631b3c499..b0a085eca 100644 --- a/library/LuaApi.cpp +++ b/library/LuaApi.cpp @@ -1036,10 +1036,10 @@ static void *checkaddr(lua_State *L, int idx, bool allow_null = false) return rv; } -static uint32_t getBase() { return Core::getInstance().p->getBase(); } +static int getRebaseDelta() { return Core::getInstance().vinfo->getRebaseDelta(); } static const LuaWrapper::FunctionReg dfhack_internal_module[] = { - WRAP(getBase), + WRAP(getRebaseDelta), { NULL, NULL } }; @@ -1074,8 +1074,9 @@ static int internal_setAddress(lua_State *L) } // Print via printerr, so that it is definitely logged to stderr.log. - std::string msg = stl_sprintf("", name.c_str(), addr); - dfhack_printerr(L, msg); + uint32_t iaddr = addr - Core::getInstance().vinfo->getRebaseDelta(); + fprintf(stderr, "Setting global '%s' to %x (%x)\n", name.c_str(), addr, iaddr); + fflush(stderr); return 1; } diff --git a/library/LuaTools.cpp b/library/LuaTools.cpp index 752c341b2..28571a0f7 100644 --- a/library/LuaTools.cpp +++ b/library/LuaTools.cpp @@ -256,8 +256,11 @@ static int lua_dfhack_color(lua_State *S) luaL_argerror(S, 1, "invalid color value"); color_ostream *out = Lua::GetOutput(S); - if (out) + if (out) { + lua_pushinteger(S, (int)out->color()); out->color(color_ostream::color_value(cv)); + return 1; + } return 0; } @@ -423,10 +426,12 @@ static bool convert_to_exception(lua_State *L, int slevel, lua_State *thread = N // Create a new exception for this thread lua_newtable(L); - luaL_where(L, 1); + luaL_where(L, slevel); + lua_setfield(L, -2, "where"); lua_pushstring(L, "coroutine resume failed"); - lua_concat(L, 2); lua_setfield(L, -2, "message"); + lua_getfield(L, -2, "verbose"); + lua_setfield(L, -2, "verbose"); lua_swap(L); lua_setfield(L, -2, "cause"); } @@ -480,12 +485,57 @@ static int dfhack_onerror(lua_State *L) return 1; } +static int dfhack_error(lua_State *L) +{ + luaL_checkany(L, 1); + lua_settop(L, 3); + int level = std::max(1, luaL_optint(L, 2, 1)); + + lua_pushvalue(L, 1); + + if (convert_to_exception(L, level)) + { + luaL_where(L, level); + lua_setfield(L, -2, "where"); + + if (!lua_isnil(L, 3)) + { + lua_pushvalue(L, 3); + lua_setfield(L, -2, "verbose"); + } + } + + return lua_error(L); +} + static int dfhack_exception_tostring(lua_State *L) { luaL_checktype(L, 1, LUA_TTABLE); + lua_settop(L, 2); + + if (lua_isnil(L, 2)) + { + lua_rawgetp(L, LUA_REGISTRYINDEX, &DFHACK_EXCEPTION_META_TOKEN); + lua_getfield(L, -1, "verbose"); + lua_insert(L, 2); + lua_settop(L, 2); + } + + lua_getfield(L, 1, "verbose"); + + bool verbose = + lua_toboolean(L, 2) || lua_toboolean(L, 3) || + (lua_isnil(L, 2) && lua_isnil(L, 3)); int base = lua_gettop(L); + if (verbose || lua_isnil(L, 3)) + { + lua_getfield(L, 1, "where"); + if (!lua_isstring(L, -1)) + lua_pop(L, 1); + } + lua_getfield(L, 1, "message"); if (!lua_isstring(L, -1)) { @@ -493,15 +543,26 @@ static int dfhack_exception_tostring(lua_State *L) lua_pushstring(L, "(error message is not a string)"); } - lua_pushstring(L, "\n"); - lua_getfield(L, 1, "stacktrace"); - if (!lua_isstring(L, -1)) - lua_pop(L, 2); + if (verbose) + { + lua_pushstring(L, "\n"); + lua_getfield(L, 1, "stacktrace"); + if (!lua_isstring(L, -1)) + lua_pop(L, 2); + } lua_pushstring(L, "\ncaused by:\n"); lua_getfield(L, 1, "cause"); if (lua_isnil(L, -1)) lua_pop(L, 2); + else if (lua_istable(L, -1)) + { + lua_pushcfunction(L, dfhack_exception_tostring); + lua_swap(L); + lua_pushvalue(L, 2); + if (lua_pcall(L, 2, 1, 0) != LUA_OK) + error_tostring(L); + } else error_tostring(L); @@ -652,7 +713,12 @@ static int dfhack_coauxwrap (lua_State *L) { if (Lua::IsSuccess(r)) return lua_gettop(L); else + { + if (lua_checkstack(L, LUA_MINSTACK)) + convert_to_exception(L, 1); + return lua_error(L); + } } static int dfhack_cowrap (lua_State *L) { @@ -1159,6 +1225,7 @@ static const luaL_Reg dfhack_funcs[] = { { "safecall", dfhack_safecall }, { "saferesume", dfhack_saferesume }, { "onerror", dfhack_onerror }, + { "error", dfhack_error }, { "call_with_finalizer", dfhack_call_with_finalizer }, { "with_suspend", lua_dfhack_with_suspend }, { "open_plugin", dfhack_open_plugin }, @@ -1359,6 +1426,8 @@ lua_State *DFHack::Lua::Open(color_ostream &out, lua_State *state) lua_newtable(state); lua_pushcfunction(state, dfhack_exception_tostring); lua_setfield(state, -2, "__tostring"); + lua_pushcfunction(state, dfhack_exception_tostring); + lua_setfield(state, -2, "tostring"); lua_dup(state); lua_rawsetp(state, LUA_REGISTRYINDEX, &DFHACK_EXCEPTION_META_TOKEN); lua_setfield(state, -2, "exception"); diff --git a/library/PluginManager.cpp b/library/PluginManager.cpp index ae8cc755f..a314883e1 100644 --- a/library/PluginManager.cpp +++ b/library/PluginManager.cpp @@ -188,6 +188,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"); index_lua(plug); this->name = *plug_name; plugin_lib = plug; @@ -538,6 +539,7 @@ PluginManager::PluginManager(Core * core) const string searchstr = ".plug.dll"; #endif cmdlist_mutex = new mutex(); + eval_ruby = NULL; vector filez; getdir(path, filez); for(size_t i = 0; i < filez.size();i++) @@ -620,6 +622,8 @@ void PluginManager::registerCommands( Plugin * p ) { belongs[cmds[i].name] = p; } + if (p->plugin_eval_ruby) + eval_ruby = p->plugin_eval_ruby; cmdlist_mutex->unlock(); } @@ -632,5 +636,7 @@ void PluginManager::unregisterCommands( Plugin * p ) { belongs.erase(cmds[i].name); } + if (p->plugin_eval_ruby) + eval_ruby = NULL; cmdlist_mutex->unlock(); -} \ No newline at end of file +} diff --git a/library/Process-windows.cpp b/library/Process-windows.cpp index 944a773c6..7eb6ff5f7 100644 --- a/library/Process-windows.cpp +++ b/library/Process-windows.cpp @@ -233,19 +233,55 @@ struct HeapBlock ULONG reserved; }; */ -// FIXME: NEEDS TESTING! -// FIXME: i noticed that if you enumerate it twice, second time it returns wrong .text region size + +static void GetDosNames(std::map &table) +{ + // Partially based on example from msdn: + // Translate path with device name to drive letters. + TCHAR szTemp[512]; + szTemp[0] = '\0'; + + if (GetLogicalDriveStrings(sizeof(szTemp)-1, szTemp)) + { + TCHAR szName[MAX_PATH]; + TCHAR szDrive[3] = " :"; + BOOL bFound = FALSE; + TCHAR* p = szTemp; + + do + { + // Copy the drive letter to the template string + *szDrive = *p; + + // Look up each device name + if (QueryDosDevice(szDrive, szName, MAX_PATH)) + table[szName] = szDrive; + + // Go to the next NULL character. + while (*p++); + } while (*p); // end of string + } +} + void Process::getMemRanges( vector & ranges ) { MEMORY_BASIC_INFORMATION MBI; //map heaps; uint64_t movingStart = 0; + PVOID LastAllocationBase = 0; map nameMap; + map dosDrives; // get page size SYSTEM_INFO si; GetSystemInfo(&si); uint64_t PageSize = si.dwPageSize; + + // get dos drive names + GetDosNames(dosDrives); + + ranges.clear(); + // enumerate heaps // HeapNodes(d->my_pid, heaps); // go through all the VM regions, convert them to our internal format @@ -254,52 +290,106 @@ void Process::getMemRanges( vector & ranges ) movingStart = ((uint64_t)MBI.BaseAddress + MBI.RegionSize); if(movingStart % PageSize != 0) movingStart = (movingStart / PageSize + 1) * PageSize; - // skip empty regions and regions we share with other processes (DLLs) - if( !(MBI.State & MEM_COMMIT) /*|| !(MBI.Type & MEM_PRIVATE)*/ ) + + // Skip unallocated address space + if (MBI.State & MEM_FREE) continue; + + // Find range and permissions t_memrange temp; + memset(&temp, 0, sizeof(temp)); + temp.start = (char *) MBI.BaseAddress; temp.end = ((char *)MBI.BaseAddress + (uint64_t)MBI.RegionSize); - temp.read = MBI.Protect & PAGE_EXECUTE_READ || MBI.Protect & PAGE_EXECUTE_READWRITE || MBI.Protect & PAGE_READONLY || MBI.Protect & PAGE_READWRITE; - temp.write = MBI.Protect & PAGE_EXECUTE_READWRITE || MBI.Protect & PAGE_READWRITE; - temp.execute = MBI.Protect & PAGE_EXECUTE_READ || MBI.Protect & PAGE_EXECUTE_READWRITE || MBI.Protect & PAGE_EXECUTE; - temp.valid = true; - if(!GetModuleBaseName(d->my_handle, (HMODULE) temp.start, temp.name, 1024)) + temp.valid = true; + + if (!(MBI.State & MEM_COMMIT)) + temp.valid = false; // reserved address space + else if (MBI.Protect & PAGE_EXECUTE) + temp.execute = true; + else if (MBI.Protect & PAGE_EXECUTE_READ) + temp.execute = temp.read = true; + else if (MBI.Protect & PAGE_EXECUTE_READWRITE) + temp.execute = temp.read = temp.write = true; + else if (MBI.Protect & PAGE_EXECUTE_WRITECOPY) + temp.execute = temp.read = temp.write = true; + else if (MBI.Protect & PAGE_READONLY) + temp.read = true; + else if (MBI.Protect & PAGE_READWRITE) + temp.read = temp.write = true; + else if (MBI.Protect & PAGE_WRITECOPY) + temp.read = temp.write = true; + + // Merge areas with the same properties + if (!ranges.empty() && LastAllocationBase == MBI.AllocationBase) { - if(nameMap.count((char *)temp.start)) + auto &last = ranges.back(); + + if (last.end == temp.start && + last.valid == temp.valid && last.execute == temp.execute && + last.read == temp.read && last.write == temp.write) { - // potential buffer overflow... - strcpy(temp.name, nameMap[(char *)temp.start].c_str()); + last.end = temp.end; + continue; } - else + } + +#if 1 + // Find the mapped file name + if (GetMappedFileName(d->my_handle, temp.start, temp.name, 1024)) + { + int vsize = strlen(temp.name); + + // Translate NT name to DOS name + for (auto it = dosDrives.begin(); it != dosDrives.end(); ++it) { - // filter away shared segments without a name. - if( !(MBI.Type & MEM_PRIVATE) ) + int ksize = it->first.size(); + if (strncmp(temp.name, it->first.data(), ksize) != 0) continue; - else - temp.name[0]=0; + + memcpy(temp.name, it->second.data(), it->second.size()); + memmove(temp.name + it->second.size(), temp.name + ksize, vsize + 1 - ksize); + break; } } else + temp.name[0] = 0; +#else + // Find the executable name + char *base = (char*)MBI.AllocationBase; + + if(nameMap.count(base)) + { + strncpy(temp.name, nameMap[base].c_str(), 1023); + } + else if(GetModuleBaseName(d->my_handle, (HMODULE)base, temp.name, 1024)) { + std::string nm(temp.name); + + nameMap[base] = nm; + // this is our executable! (could be generalized to pull segments from libs, but whatever) - if(d->base == temp.start) + if(d->base == base) { for(int i = 0; i < d->pe_header.FileHeader.NumberOfSections; i++) { - char sectionName[9]; + /*char sectionName[9]; memcpy(sectionName,d->sections[i].Name,8); sectionName[8] = 0; string nm; nm.append(temp.name); nm.append(" : "); - nm.append(sectionName); - nameMap[(char *)temp.start + d->sections[i].VirtualAddress] = nm; + nm.append(sectionName);*/ + nameMap[base + d->sections[i].VirtualAddress] = nm; } } - else - continue; } + else + temp.name[0] = 0; +#endif + + // Push the entry + LastAllocationBase = MBI.AllocationBase; ranges.push_back(temp); } } diff --git a/library/include/ColorText.h b/library/include/ColorText.h index 105832efd..0cc286dcf 100644 --- a/library/include/ColorText.h +++ b/library/include/ColorText.h @@ -111,6 +111,8 @@ namespace DFHack void printerr(const char *format, ...); void vprinterr(const char *format, va_list args); + /// Get color + color_value color() { return cur_color; } /// Set color (ANSI color number) void color(color_value c); /// Reset color to default diff --git a/library/include/Core.h b/library/include/Core.h index e4d1080d6..653298d8f 100644 --- a/library/include/Core.h +++ b/library/include/Core.h @@ -83,10 +83,17 @@ namespace DFHack // Better than tracking some weird variables all over the place. class DFHACK_EXPORT Core { +#ifdef _DARWIN + friend int ::DFH_SDL_NumJoysticks(void); + friend void ::DFH_SDL_Quit(void); + friend int ::DFH_SDL_PollEvent(SDL::Event *); + friend int ::DFH_SDL_Init(uint32_t flags); +#else friend int ::SDL_NumJoysticks(void); friend void ::SDL_Quit(void); friend int ::SDL_PollEvent(SDL::Event *); friend int ::SDL_Init(uint32_t flags); +#endif friend int ::wgetch(WINDOW * w); friend int ::egg_init(void); friend int ::egg_shutdown(void); diff --git a/library/include/Hooks.h b/library/include/Hooks.h index 418a5ce3b..325af43eb 100644 --- a/library/include/Hooks.h +++ b/library/include/Hooks.h @@ -44,6 +44,12 @@ namespace SDL // these functions are here because they call into DFHack::Core and therefore need to // be declared as friend functions/known +#ifdef _DARWIN +DFhackCExport int DFH_SDL_NumJoysticks(void); +DFhackCExport void DFH_SDL_Quit(void); +DFhackCExport int DFH_SDL_PollEvent(SDL::Event* event); +DFhackCExport int DFH_SDL_Init(uint32_t flags); +#endif DFhackCExport int SDL_NumJoysticks(void); DFhackCExport void SDL_Quit(void); DFhackCExport int SDL_PollEvent(SDL::Event* event); diff --git a/library/include/PluginManager.h b/library/include/PluginManager.h index b76df437d..5da9fc92f 100644 --- a/library/include/PluginManager.h +++ b/library/include/PluginManager.h @@ -209,6 +209,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*); }; class DFHACK_EXPORT PluginManager { @@ -237,6 +238,7 @@ namespace DFHack { return all_plugins.size(); } + command_result (*eval_ruby)(const char*); // DATA private: tthread::mutex * cmdlist_mutex; diff --git a/library/lua/dfhack.lua b/library/lua/dfhack.lua index 4cdb4c950..d56d4df60 100644 --- a/library/lua/dfhack.lua +++ b/library/lua/dfhack.lua @@ -49,6 +49,10 @@ function dfhack.pcall(f, ...) return xpcall(f, dfhack.onerror, ...) end +function qerror(msg, level) + dfhack.error(msg, (level or 1) + 1, false) +end + function dfhack.with_finalize(...) return dfhack.call_with_finalizer(0,true,...) end @@ -64,6 +68,8 @@ function dfhack.with_temp_object(obj,fn,...) return dfhack.call_with_finalizer(1,true,call_delete,obj,fn,obj,...) end +dfhack.exception.__index = dfhack.exception + -- Module loading function mkmodule(module,env) diff --git a/library/lua/memscan.lua b/library/lua/memscan.lua index 95b9197b1..970f821c2 100644 --- a/library/lua/memscan.lua +++ b/library/lua/memscan.lua @@ -154,7 +154,8 @@ function MemoryArea.new(astart, aend) int16_t = CheckedArray.new('int16_t',astart,aend), uint16_t = CheckedArray.new('uint16_t',astart,aend), int32_t = CheckedArray.new('int32_t',astart,aend), - uint32_t = CheckedArray.new('uint32_t',astart,aend) + uint32_t = CheckedArray.new('uint32_t',astart,aend), + float = CheckedArray.new('float',astart,aend) } setmetatable(obj, MemoryArea) return obj @@ -168,7 +169,7 @@ function MemoryArea:__tostring() return string.format('', self.start_addr, self.end_addr) end function MemoryArea:contains_range(start,size) - return start >= self.start_addr and (start+size) <= self.end_addr + return size >= 0 and start >= self.start_addr and (start+size) <= self.end_addr end function MemoryArea:contains_obj(obj,count) local size, base = df.sizeof(obj) @@ -208,7 +209,8 @@ local function find_data_segment() end elseif mem.read and mem.write and (string.match(mem.name,'/dwarfort%.exe$') - or string.match(mem.name,'/Dwarf_Fortress$')) + or string.match(mem.name,'/Dwarf_Fortress$') + or string.match(mem.name,'Dwarf Fortress%.exe')) then data_start = mem.start_addr data_end = mem.end_addr @@ -233,7 +235,7 @@ function found_offset(name,val) if not val then print('Could not find offset '..name) if not cval and not utils.prompt_yes_no('Continue with the script?') then - error('User quit') + qerror('User quit') end return end @@ -250,6 +252,16 @@ function found_offset(name,val) end else dfhack.internal.setAddress(name, val) + + local ival = val - dfhack.internal.getRebaseDelta() + local entry = string.format("\n", name, ival) + + local ccolor = dfhack.color(COLOR_LIGHTGREEN) + dfhack.print(entry) + dfhack.color(ccolor) + + io.stdout:write(entry) + io.stdout:flush() end end @@ -452,4 +464,30 @@ function DiffSearcher:find_counter(prompt,data_type,delta,action_prompt) ) end +-- Screen size + +function get_screen_size() + -- Use already known globals + if dfhack.internal.getAddress('init') then + local d = df.global.init.display + return d.grid_x, d.grid_y + end + if dfhack.internal.getAddress('gps') then + local g = df.global.gps + return g.dimx, g.dimy + end + + -- Parse stdout.log for resize notifications + io.stdout:flush() + + local w,h = 80,25 + for line in io.lines('stdout.log') do + local cw, ch = string.match(line, '^Resizing grid to (%d+)x(%d+)$') + if cw and ch then + w, h = tonumber(cw), tonumber(ch) + end + end + return w,h +end + return _ENV diff --git a/library/lua/utils.lua b/library/lua/utils.lua index 93ee840c4..f303091d6 100644 --- a/library/lua/utils.lua +++ b/library/lua/utils.lua @@ -379,7 +379,7 @@ function prompt_yes_no(msg,default) elseif string.match(rv,'^[Nn]') then return false elseif rv == 'abort' then - error('User abort in utils.prompt_yes_no()') + qerror('User abort in utils.prompt_yes_no()') elseif rv == '' and default ~= nil then return default end diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 3afdbcacc..6de03e49d 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)." OFF) +OPTION(BUILD_STONESENSE "Build stonesense (needs a checkout first)." ON) if(BUILD_STONESENSE) add_subdirectory (stonesense) endif() @@ -36,7 +36,7 @@ if (BUILD_DWARFEXPORT) add_subdirectory (dwarfexport) endif() -OPTION(BUILD_RUBY "Build ruby binding." OFF) +OPTION(BUILD_RUBY "Build ruby binding." ON) if (BUILD_RUBY) add_subdirectory (ruby) endif() diff --git a/plugins/Plugins.cmake b/plugins/Plugins.cmake index a8252e706..0ea37ace9 100644 --- a/plugins/Plugins.cmake +++ b/plugins/Plugins.cmake @@ -7,8 +7,8 @@ ENDIF() include_directories("${dfhack_SOURCE_DIR}/library/include") include_directories("${dfhack_SOURCE_DIR}/library/proto") -include_directories("${dfhack_SOURCE_DIR}/library/depends/xgetopt") include_directories("${CMAKE_CURRENT_SOURCE_DIR}/proto") +include_directories("${dfhack_SOURCE_DIR}/library/depends/xgetopt") MACRO(CAR var) SET(${var} ${ARGV1}) diff --git a/plugins/ruby/CMakeLists.txt b/plugins/ruby/CMakeLists.txt index e69632e61..a9a85636c 100644 --- a/plugins/ruby/CMakeLists.txt +++ b/plugins/ruby/CMakeLists.txt @@ -1,5 +1,5 @@ OPTION(DL_RUBY "download libruby from the internet" ON) -IF (DL_RUBY) +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 EXPECTED_MD5 eb2adea59911f68e6066966c1352f291) @@ -15,7 +15,7 @@ IF (DL_RUBY) FILE(RENAME msvcrt-ruby18.dll libruby.dll) SET(RUBYLIB libruby.dll) ENDIF(UNIX) -ENDIF(DL_RUBY) +ENDIF(DL_RUBY AND NOT APPLE) ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/ruby-autogen.rb @@ -30,4 +30,8 @@ INCLUDE_DIRECTORIES("${dfhack_SOURCE_DIR}/depends/tthread") DFHACK_PLUGIN(ruby ruby.cpp LINK_LIBRARIES dfhack-tinythread) ADD_DEPENDENCIES(ruby ruby-autogen-rb) -INSTALL(FILES ruby.rb ruby-autogen.rb ${RUBYLIB} DESTINATION ${DFHACK_LIBRARY_DESTINATION}) +INSTALL(FILES ${RUBYLIB} DESTINATION ${DFHACK_LIBRARY_DESTINATION}) + +INSTALL(DIRECTORY . + DESTINATION hack/ruby + FILES_MATCHING PATTERN "*.rb") diff --git a/plugins/ruby/README b/plugins/ruby/README index 9dc7d49f6..690e83ca0 100644 --- a/plugins/ruby/README +++ b/plugins/ruby/README @@ -2,61 +2,185 @@ This plugins embeds a ruby interpreter inside DFHack (ie inside Dwarf Fortress). The plugin maps all the structures available in library/xml/ to ruby objects. -These objects are described in ruby-autogen.rb, they are all in the DFHack:: +These objects are described in ruby-autogen.rb, they are all in the DFHack module. The toplevel 'df' method is a shortcut to the DFHack module. The plugin does *not* map most of dfhack methods (MapCache, ...) ; only direct access to the raw DF data structures in memory is provided. -Some library methods are stored in the ruby.rb file, with shortcuts to read a -map block, find an unit or an item, etc. +Some library methods are stored in the various .rb file, e.g. shortcuts to read +a map block, find an unit or an item, etc. -Global objects are accessible through the 'df' accessor (eg df.world). +Global dfhack objects are accessible through the 'df' accessor (eg 'df.world'). -The ruby plugin defines 2 dfhack console commands: - rb_load ; load a ruby script. Ex: rb_load hack/plants.rb (no quotes) - rb_eval ; evaluate a ruby expression, show the result in the -console. Ex: rb_eval df.find_unit.name.first_name +DFHack structures are renamed in CamelCase in the ruby namespace. + +For a list of the structures and their methods, grep the ruby-autogen.rb file. + +All ruby code runs while the main DF process and other plugins are suspended. + + +DFHack console +-------------- + +The ruby plugin defines 1 dfhack console command: + rb_eval ; 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 -and removed by the dfhack console. +and removed by the dfhack console code. + +Text output from ruby code, through the standard 'puts', 'p' or 'raise' are +redirected to the dfhack console window. If dfhack reports 'rb_eval is not a recognized command', check stderr.log. You need a valid 32-bit ruby library to work, and ruby1.8 is prefered (ruby1.9 may crash DF on startup for now). Install the library in the df root folder (or -hack/ on linux), the library should be named 'libruby.dll' (.so on linux). +df/hack/ on linux), the library should be named 'libruby.dll' (.so on linux). You can download a tested version at http://github.com/jjyg/dfhack/downloads/ -The plugin also interfaces with dfhack 'onupdate' hook. + +Ruby scripts +------------ + +The ruby plugin allows the creation of '.rb' scripts in df/hack/scripts/. + +If you create such a script, e.g. 'test.rb', that will add a new dfhack console +command 'test'. +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 '# '). + + +Ruby helper functions +--------------------- + +This is an excerpt of the functions defined in dfhack/plugins/ruby/*.rb. Check +the files and the comments for a complete list. + + df.same_pos?(obj1, obj2) +Returns true if both objects are at the same game coordinates. +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.each_map_block { |b| } + df.each_map_block_z(zlevel) { |b| } +Iterates over every map block (opt. on a single z-level). + + df.center_viewscreen(coords) +Centers the DF view on the given coordinates. Accepts x/y/z arguments, or a +single argument responding to pos/x/y/z, eg an Unit, Item, ... + + df.unit_find(arg) +Returns an Unit. +With no arg, returns the currently selected unit (through the (v) or (k) menus) +With a number, returns the unit with this ID +With something else, returns the first unit at the same game coordinates + + df.unit_workers +Returns a list of worker citizen: units of your race & civilization, adults, +not dead, crazy, ghosts or nobles exempted of work. + + df.unit_entitypositions(unit) +Returns the list of EntityPosition occupied by the unit. +Check the 'code' field for a readable name (MANAGER, CHIEF_MEDICAL_DWARF, ...) + + df.match_rawname(name, list) +String fuzzy matching. Returns the list entry most similar to 'name'. +First searches for an exact match, then for a case-insensitive match, and +finally for a case-insensitive substring. +Returns the element from list if there is only one match, or nil. +Most useful to allow the user to specify a raw-defined name, +eg 'gob' for 'GOBLIN' or 'coal' for 'COAL_BITUMINOUS', hence the name. + + df.building_alloc(type, subtype, customtype) + df.building_position(bld, pos, w, h) + df.building_construct(bld, item_list) +Allocates a new building in DF memory, define its position / dimensions, and +create a dwarf job to construct it from the given list of items. +See buildings.rb/buildbed for an exemple. + + df.each_tree(material) { |t| } +Iterates over every tree of the given material (eg 'maple'). + + +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' } To stop being called, use: df.onupdate_unregister handle -The same mechanism is available for onstatechange. +The same mechanism is available for 'onstatechange', but the +SC_BEGIN_UNLOAD event is not propagated to the ruby handler. + + +C++ object manipulation +----------------------- + +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. + +Deallocation is not supported. You may manually call df.free if you know +what you are doing (maps directly to the native malloc/free) + +C++ std::string fields may be directly re-allocated using standard ruby strings, +e.g. some_unit.name.nickname = 'moo' +More subtle string manipulation, e.g. changing a single character, are not +supported. Read the whole string, manipulate it in ruby, and re-assign it +instead. + +C++ std::vector<> can be iterated as standard ruby Enumerable objects, using +each/map/etc. +To append data to a vector, use vector << newelement or vector.push(newelement) +To insert at a given pos, vector.insert_at(index, value) +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 +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. + +Virtual method calls are supported for C++ objects, with a maximum of 4 +arguments. Arguments / return value are interpreted as Compound/Enums as +specified in the vmethod definition in the xmls. + +Pointer fields are automatically dereferenced ; so a vector of pointer to +Units will yield Units directly. NULL pointers yield the 'nil' value. Exemples -------- -For more complex exemples, check the ruby/plugins/ source folder. +For more complex exemples, check the dfhack/scripts/*.rb files. Show info on the currently selected unit ('v' or 'k' DF menu) - p df.find_unit.flags1 + p df.unit_find.flags1 Set a custom nickname to unit with id '123' - df.find_unit(123).name.nickname = 'moo' + df.unit_find(123).name.nickname = 'moo' Show current unit profession - p df.find_unit.profession + p df.unit_find.profession Change current unit profession - df.find_unit.profession = :MASON + df.unit_find.profession = :MASON -Center the screen on unit '123' - df.center_viewscreen(df.find_unit(123)) +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 - df.find_item(df.cursor)._rtti_classname + p df.item_find(df.cursor)._rtti_classname Find the raws name of the plant under cursor plant = df.world.plants.all.find { |plt| df.at_cursor?(plt) } @@ -67,15 +191,14 @@ Dig a channel under the cursor df.map_block_at(df.cursor).flags.designated = true -Compilation ------------ +Plugin compilation +------------------ -The plugin consists of the ruby.rb file including user comfort functions and +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 generated code is generated by codegen.pl, which takes the codegen.out.xml -file as input. +autogen is output by codegen.pl from dfhack/library/include/df/codegen.out.xml For exemple, @@ -89,17 +212,10 @@ Will generate field(:custom_profession, 60) { stl_string } field(:profession, 64) { number 16, true } -The syntax for the 'field' method is: +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 struct. - +2nd argument = offset of this field from the beginning of the current struct. The block argument describes the type of the field: uint32, ptr to global... -Primitive type access is done through native methods in ruby.cpp (vector length, +Primitive type access is done through native methods from ruby.cpp (vector length, raw memory access, etc) - -MemHack::Pointers are automatically dereferenced ; so a vector of pointer to -Units will yield Units directly. Null pointers yield the 'nil' value. - -This allows to use code such as 'df.world.units.all[0].pos', with 'all' being -in fact a vector of *pointers* to DFHack::Unit objects. diff --git a/plugins/ruby/building.rb b/plugins/ruby/building.rb new file mode 100644 index 000000000..826cd26b9 --- /dev/null +++ b/plugins/ruby/building.rb @@ -0,0 +1,265 @@ +module DFHack + class << self + # allocate a new building object + def building_alloc(type, subtype=-1, custom=-1) + cls = rtti_n2c[BuildingType::Classname[type].to_sym] + raise "invalid building type #{type.inspect}" if not cls + bld = cls.cpp_new + bld.race = ui.race_id + bld.setSubtype(subtype) if subtype != -1 + bld.setCustomType(custom) if custom != -1 + case type + when :Furnace; bld.melt_remainder[world.raws.inorganics.length] = 0 + when :Coffin; bld.initBurialFlags + when :Trap; bld.unk_cc = 500 if bld.trap_type == :PressurePlate + end + bld + end + + # used by building_setsize + def building_check_bridge_support(bld) + x1 = bld.x1-1 + x2 = bld.x2+1 + y1 = bld.y1-1 + y2 = bld.y2+1 + z = bld.z + (x1..x2).each { |x| + (y1..y2).each { |y| + next if ((x == x1 or x == x2) and + (y == y1 or y == y2)) + if mb = map_block_at(x, y, z) and tile = mb.tiletype[x%16][y%16] and TiletypeShape::BasicShape[Tiletype::Shape[tile]] != :Open + bld.gate_flags.has_support = true + return + end + } + } + bld.gate_flags.has_support = false + end + + # sets x2/centerx/y2/centery from x1/y1/bldtype + # x2/y2 preserved for :FarmPlot etc + def building_setsize(bld) + bld.x2 = bld.x1 if bld.x1 > bld.x2 + bld.y2 = bld.y1 if bld.y1 > bld.y2 + case bld.getType + when :Bridge + bld.centerx = bld.x1 + (bld.x2+1-bld.x1)/2 + bld.centery = bld.y1 + (bld.y2+1-bld.y1)/2 + building_check_bridge_support(bld) + when :FarmPlot, :RoadDirt, :RoadPaved, :Stockpile, :Civzone + bld.centerx = bld.x1 + (bld.x2+1-bld.x1)/2 + bld.centery = bld.y1 + (bld.y2+1-bld.y1)/2 + when :TradeDepot, :Shop + bld.x2 = bld.x1+4 + bld.y2 = bld.y1+4 + bld.centerx = bld.x1+2 + bld.centery = bld.y1+2 + when :SiegeEngine, :Windmill, :Wagon + bld.x2 = bld.x1+2 + bld.y2 = bld.y1+2 + bld.centerx = bld.x1+1 + bld.centery = bld.y1+1 + when :AxleHorizontal + if bld.is_vertical == 1 + bld.x2 = bld.centerx = bld.x1 + bld.centery = bld.y1 + (bld.y2+1-bld.y1)/2 + else + bld.centerx = bld.x1 + (bld.x2+1-bld.x1)/2 + bld.y2 = bld.centery = bld.y1 + end + when :WaterWheel + if bld.is_vertical == 1 + bld.x2 = bld.centerx = bld.x1 + bld.y2 = bld.y1+2 + bld.centery = bld.y1+1 + else + bld.x2 = bld.x1+2 + bld.centerx = bld.x1+1 + bld.y2 = bld.centery = bld.y1 + end + when :Workshop, :Furnace + # Furnace = Custom or default case only + case bld.type + when :Quern, :Millstone, :Tool + bld.x2 = bld.centerx = bld.x1 + bld.y2 = bld.centery = bld.y1 + when :Siege, :Kennels + bld.x2 = bld.x1+4 + bld.y2 = bld.y1+4 + bld.centerx = bld.x1+2 + bld.centery = bld.y1+2 + when :Custom + if bdef = world.raws.buildings.all.binsearch(bld.getCustomType) + bld.x2 = bld.x1 + bdef.dim_x - 1 + bld.y2 = bld.y1 + bdef.dim_y - 1 + bld.centerx = bld.x1 + bdef.workloc_x + bld.centery = bld.y1 + bdef.workloc_y + end + else + bld.x2 = bld.x1+2 + bld.y2 = bld.y1+2 + bld.centerx = bld.x1+1 + bld.centery = bld.y1+1 + end + when :ScrewPump + case bld.direction + when :FromEast + bld.x2 = bld.centerx = bld.x1+1 + bld.y2 = bld.centery = bld.y1 + when :FromSouth + bld.x2 = bld.centerx = bld.x1 + bld.y2 = bld.centery = bld.y1+1 + when :FromWest + bld.x2 = bld.x1+1 + bld.y2 = bld.centery = bld.y1 + bld.centerx = bld.x1 + else + bld.x2 = bld.x1+1 + bld.y2 = bld.centery = bld.y1 + bld.centerx = bld.x1 + end + when :Well + bld.bucket_z = bld.z + bld.x2 = bld.centerx = bld.x1 + bld.y2 = bld.centery = bld.y1 + when :Construction + bld.x2 = bld.centerx = bld.x1 + bld.y2 = bld.centery = bld.y1 + bld.setMaterialAmount(1) + return + else + bld.x2 = bld.centerx = bld.x1 + bld.y2 = bld.centery = bld.y1 + end + bld.setMaterialAmount((bld.x2-bld.x1+1)*(bld.y2-bld.y1+1)/4+1) + end + + # set building at position, with optional width/height + def building_position(bld, pos, w=nil, h=nil) + bld.x1 = pos.x + bld.y1 = pos.y + bld.z = pos.z + bld.x2 = bld.x1+w-1 if w + bld.y2 = bld.y1+h-1 if h + building_setsize(bld) + end + + # set map occupancy/stockpile/etc for a building + def building_setoccupancy(bld) + stockpile = (bld.getType == :Stockpile) + complete = (bld.getBuildStage >= bld.getMaxBuildStage) + extents = (bld.room.extents and bld.isExtentShaped) + + z = bld.z + (bld.x1..bld.x2).each { |x| + (bld.y1..bld.y2).each { |y| + next if !extents or bld.room.extents[bld.room.width*(y-bld.room.y)+(x-bld.room.x)] == 0 + next if not mb = map_block_at(x, y, z) + des = mb.designation[x%16][y%16] + des.pile = stockpile + des.dig = :No + if complete + bld.updateOccupancy(x, y) + else + mb.occupancy[x%16][y%16].building = :Planned + end + } + } + end + + # link bld into other rooms if it is inside their extents + def building_linkrooms(bld) + didstuff = false + world.buildings.other[:ANY_FREE].each { |ob| + next if !ob.is_room or ob.z != bld.z + next if !ob.room.extents or !ob.isExtentShaped or ob.room.extents[ob.room.width*(bld.y1-ob.room.y)+(bld.x1-ob.room.x)] == 0 + didstuff = true + ob.children << bld + bld.parents << ob + } + ui.equipment.update.buildings = true if didstuff + end + + # link the building into the world, set map data, link rooms, bld.id + def building_link(bld) + bld.id = df.building_next_id + df.building_next_id += 1 + + world.buildings.all << bld + bld.categorize(true) + building_setoccupancy(bld) if bld.isSettingOccupancy + building_linkrooms(bld) + end + + # set a design for the building + def building_createdesign(bld, rough=true) + job = bld.jobs[0] + job.mat_type = bld.mat_type + job.mat_index = bld.mat_index + if bld.needsDesign + bld.design = BuildingDesign.cpp_new + bld.design.flags.rough = rough + end + end + + # creates a job to build bld, return it + def building_linkforconstruct(bld) + building_link bld + ref = GeneralRefBuildingHolderst.cpp_new + ref.building_id = bld.id + job = Job.cpp_new + job.job_type = :ConstructBuilding + job.pos = [bld.centerx, bld.centery, bld.z] + job.references << ref + bld.jobs << job + job_link job + job + end + + # construct a building with items or JobItems + def building_construct(bld, items) + job = building_linkforconstruct(bld) + rough = false + items.each { |item| + if items.kind_of?(JobItem) + item.quantity = (bld.x2-bld.x1+1)*(bld.y2-bld.y1+1)/4+1 if item.quantity < 0 + job.job_items << item + else + job_attachitem(job, item, :Hauled) + end + rough = true if item.getType == :BOULDER + bld.mat_type = item.getMaterial if bld.mat_type == -1 + bld.mat_index = item.getMaterialIndex if bld.mat_index == -1 + } + building_createdesign(bld, rough) + end + + # creates a job to deconstruct the building + def building_deconstruct(bld) + job = Job.cpp_new + refbuildingholder = GeneralRefBuildingHolderst.cpp_new + job.job_type = :DestroyBuilding + refbuildingholder.building_id = building.id + job.references << refbuildingholder + building.jobs << job + job_link job + job + 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 + } + raise 'no free bed, build more !' if not item + + bld = building_alloc(:Bed) + building_position(bld, pos) + building_construct(bld, [item]) + end + end +end diff --git a/plugins/ruby/codegen.pl b/plugins/ruby/codegen.pl index 5cdeeedd9..c7fb210c9 100755 --- a/plugins/ruby/codegen.pl +++ b/plugins/ruby/codegen.pl @@ -13,6 +13,7 @@ if ($^O =~ /linux/i) { } else { $os = 'windows'; } +$os = $ARGV[2] if ($ARGV[2]); sub indent_rb(&) { my ($sub) = @_; @@ -260,6 +261,8 @@ sub render_struct_fields { render_item($field); }; push @lines_rb, "}"; + + render_struct_field_refs($type, $field, $name); } } @@ -267,6 +270,80 @@ sub render_struct_fields { } } +# handle generating accessor for xml attributes ref-target, refers-to etc +sub render_struct_field_refs { + my ($parent, $field, $name) = @_; + + my $reftg = $field->getAttribute('ref-target'); + render_field_reftarget($parent, $field, $name, $reftg) if ($reftg); + + my $refto = $field->getAttribute('refers-to'); + render_field_refto($parent, $name, $refto) if ($refto); + + my $meta = $field->getAttribute('ld:meta'); + my $item = $field->findnodes('child::ld:item')->[0]; + if ($meta and $meta eq 'container' and $item) { + my $itemreftg = $item->getAttribute('ref-target'); + render_container_reftarget($parent, $item, $name, $itemreftg) if $itemreftg; + } +} + +sub render_field_reftarget { + my ($parent, $field, $name, $reftg) = @_; + + my $aux = $field->getAttribute('aux-value'); + return if ($aux); # TODO + + my $tg = $global_types{$reftg}; + return if (!$tg); + my $tgvec = $tg->getAttribute('instance-vector'); + return if (!$tgvec); + + render_field_refto($parent, $name, $tgvec); +} + +sub render_field_refto { + my ($parent, $name, $tgvec) = @_; + + $tgvec =~ s/^\$global/df/; + $tgvec =~ s/\[\$\]$//; + 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); + } + + push @lines_rb, "def $tgname ; ${tgvec}[$name] ; end"; +} + +sub render_container_reftarget { + my ($parent, $item, $name, $reftg) = @_; + + my $aux = $item->getAttribute('aux-value'); + return if ($aux); # TODO + + my $tg = $global_types{$reftg}; + return if (!$tg); + my $tgvec = $tg->getAttribute('instance-vector'); + return if (!$tgvec); + + $tgvec =~ s/^\$global/df/; + $tgvec =~ s/\[\$\]$//; + 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); + } + + push @lines_rb, "def $tgname ; $name.map { |i| ${tgvec}[i] } ; end"; +} + sub render_class_vmethods { my ($vms) = @_; my $voff = 0; @@ -687,6 +764,7 @@ sub render_item_number { my $initvalue = $item->getAttribute('init-value'); my $typename = $item->getAttribute('type-name'); undef $typename if ($meta and $meta eq 'bitfield-type'); + my $g = $global_types{$typename} if ($typename); $typename = rb_ucase($typename) if $typename; $typename = $classname if (!$typename and $subtype and $subtype eq 'enum'); # compound enum @@ -695,6 +773,7 @@ sub render_item_number { $initvalue ||= 'nil' if $typename; $subtype = $item->getAttribute('base-type') if (!$subtype or $subtype eq 'bitfield' or $subtype eq 'enum'); + $subtype ||= $g->getAttribute('base-type') if ($g); $subtype = 'int32_t' if (!$subtype); if ($subtype eq 'int64_t') { @@ -713,7 +792,7 @@ sub render_item_number { push @lines_rb, 'number 8, false'; } elsif ($subtype eq 'bool') { push @lines_rb, 'number 8, true'; - $initvalue ||= 'nil'; + $initvalue ||= 'nil'; $typename ||= 'BooleanEnum'; } elsif ($subtype eq 's-float') { push @lines_rb, 'float'; diff --git a/plugins/ruby/item.rb b/plugins/ruby/item.rb new file mode 100644 index 000000000..cd95e82a9 --- /dev/null +++ b/plugins/ruby/item.rb @@ -0,0 +1,21 @@ +module DFHack + class << self + # return an Item + # arg similar to unit.rb/unit_find; no arg = 'k' menu + def item_find(what=:selected) + if what == :selected + case ui.main.mode + when :LookAround + k = ui_look_list.items[ui_look_cursor] + k.item if k.type == :Item + end + elsif what.kind_of?(Integer) + world.items.all.binsearch(what) + elsif what.respond_to?(:x) or what.respond_to?(:pos) + world.items.all.find { |i| same_pos?(what, i) } + else + raise "what what?" + end + end + end +end diff --git a/plugins/ruby/job.rb b/plugins/ruby/job.rb new file mode 100644 index 000000000..e489dcc91 --- /dev/null +++ b/plugins/ruby/job.rb @@ -0,0 +1,35 @@ +module DFHack + class << self + # link a job to the world + # allocate & set job.id, allocate a JobListLink, link to job & world.job_list + def job_link(job) + lastjob = world.job_list + lastjob = lastjob.next while lastjob.next + joblink = JobListLink.cpp_new + joblink.prev = lastjob + joblink.item = job + job.list_link = joblink + job.id = df.job_next_id + df.job_next_id += 1 + lastjob.next = joblink + end + + # attach an item to a job, flag item in_job + def job_attachitem(job, item, role=:Hauled, filter_idx=-1) + if role != :TargetContainer + item.flags.in_job = true + end + + itemlink = SpecificRef.cpp_new + itemlink.type = :JOB + itemlink.job = job + item.specific_refs << itemlink + + joblink = JobItemRef.cpp_new + joblink.item = item + joblink.role = role + joblink.job_item_idx = filter_idx + job.items << joblink + end + end +end diff --git a/plugins/ruby/map.rb b/plugins/ruby/map.rb new file mode 100644 index 000000000..af9e8b804 --- /dev/null +++ b/plugins/ruby/map.rb @@ -0,0 +1,54 @@ +module DFHack + class << self + # return a map block by tile coordinates + # you can also use find_map_block(cursor) or anything that respond to x/y/z + def map_block_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) + if x >= 0 and x < world.map.x_count and y >= 0 and y < world.map.y_count and z >= 0 and z < world.map.z_count + world.map.block_index[x/16][y/16][z] + end + end + + def map_designation_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) + if b = map_block_at(x, y, z) + b.designation[x%16][y%16] + end + end + + def map_occupancy_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) + if b = map_block_at(x, y, z) + b.occupancy[x%16][y%16] + end + end + + # yields every map block + def each_map_block + (0...world.map.x_count_block).each { |xb| + xl = world.map.block_index[xb] + (0...world.map.y_count_block).each { |yb| + yl = xl[yb] + (0...world.map.z_count_block).each { |z| + p = yl[z] + yield p if p + } + } + } + end + + # yields every map block for a given z level + def each_map_block_z(z) + (0...world.map.x_count_block).each { |xb| + xl = world.map.block_index[xb] + (0...world.map.y_count_block).each { |yb| + p = xl[yb][z] + yield p if p + } + } + end + end +end diff --git a/plugins/ruby/plant.rb b/plugins/ruby/plant.rb new file mode 100644 index 000000000..5d6b9d724 --- /dev/null +++ b/plugins/ruby/plant.rb @@ -0,0 +1,111 @@ +module DFHack + class << self + # return a Plant + # arg similar to unit.rb/unit_find, no menu + def plant_find(what=cursor) + if what.kind_of?(Integer) + world.items.all.binsearch(what) + elsif what.respond_to?(:x) or what.respond_to?(:pos) + world.plants.all.find { |p| same_pos?(what, p) } + else + raise "what what?" + end + end + + def each_tree(material=:any) + @raws_tree_name ||= {} + if @raws_tree_name.empty? + df.world.raws.plants.all.each_with_index { |p, idx| + @raws_tree_name[idx] = p.id if p.flags[:TREE] + } + end + + if material != :any + mat = match_rawname(material, @raws_tree_name.values) + unless wantmat = @raws_tree_name.index(mat) + raise "invalid tree material #{material}" + end + end + + world.plants.all.each { |plant| + next if not @raws_tree_name[plant.material] + next if wantmat and plant.material != wantmat + yield plant + } + end + + def each_shrub(material=:any) + @raws_shrub_name ||= {} + if @raws_tree_name.empty? + df.world.raws.plants.all.each_with_index { |p, idx| + @raws_shrub_name[idx] = p.id if not p.flags[:GRASS] and not p.flags[:TREE] + } + end + + if material != :any + mat = match_rawname(material, @raws_shrub_name.values) + unless wantmat = @raws_shrub_name.index(mat) + raise "invalid shrub material #{material}" + end + end + end + + SaplingToTreeAge = 120960 + def cuttrees(material=nil, count_max=100) + if !material + # list trees + cnt = Hash.new(0) + each_tree { |plant| + next if plant.grow_counter < SaplingToTreeAge + next if map_designation_at(plant).hidden + cnt[plant.material] += 1 + } + cnt.sort_by { |mat, c| c }.each { |mat, c| + name = @raws_tree_name[mat] + puts " #{name} #{c}" + } + else + cnt = 0 + each_tree(material) { |plant| + next if plant.grow_counter < SaplingToTreeAge + b = map_block_at(plant) + d = b.designation[plant.pos.x%16][plant.pos.y%16] + next if d.hidden + if d.dig == :No + d.dig = :Default + b.flags.designated = true + cnt += 1 + break if cnt == count_max + end + } + puts "Updated #{cnt} plant designations" + end + end + + def growtrees(material=nil, count_max=100) + if !material + # list plants + cnt = Hash.new(0) + each_tree { |plant| + next if plant.grow_counter >= SaplingToTreeAge + next if map_designation_at(plant).hidden + cnt[plant.material] += 1 + } + cnt.sort_by { |mat, c| c }.each { |mat, c| + name = @raws_tree_name[mat] + puts " #{name} #{c}" + } + else + cnt = 0 + each_tree(material) { |plant| + next if plant.grow_counter >= SaplingToTreeAge + next if map_designation_at(plant).hidden + plant.grow_counter = SaplingToTreeAge + cnt += 1 + break if cnt == count_max + } + puts "Grown #{cnt} saplings" + end + end + end +end diff --git a/plugins/ruby/plugins/building.rb b/plugins/ruby/plugins/building.rb deleted file mode 100644 index 5dfbcdacd..000000000 --- a/plugins/ruby/plugins/building.rb +++ /dev/null @@ -1,266 +0,0 @@ -module DFHack - -# allocate a new building object -def self.building_alloc(type, subtype=-1, custom=-1) - cls = rtti_n2c[BuildingType::Classname[type].to_sym] - raise "invalid building type #{type.inspect}" if not cls - bld = cls.cpp_new - bld.race = ui.race_id - bld.setSubtype(subtype) if subtype != -1 - bld.setCustomType(custom) if custom != -1 - case type - when :Furnace; bld.melt_remainder[world.raws.inorganics.length] = 0 - when :Coffin; bld.initBurialFlags - when :Trap; bld.unk_cc = 500 if bld.trap_type == :PressurePlate - end - bld -end - -# used by building_setsize -def self.building_check_bridge_support(bld) - x1 = bld.x1-1 - x2 = bld.x2+1 - y1 = bld.y1-1 - y2 = bld.y2+1 - z = bld.z - (x1..x2).each { |x| - (y1..y2).each { |y| - next if ((x == x1 or x == x2) and - (y == y1 or y == y2)) - if mb = map_block_at(x, y, z) and tile = mb.tiletype[x%16][y%16] and TiletypeShape::BasicShape[Tiletype::Shape[tile]] == :Open - bld.gate_flags.has_support = true - return - end - } - } - bld.gate_flags.has_support = false -end - -# sets x2/centerx/y2/centery from x1/y1/bldtype -# x2/y2 preserved for :FarmPlot etc -def self.building_setsize(bld) - bld.x2 = bld.x1 if bld.x1 > bld.x2 - bld.y2 = bld.y1 if bld.y1 > bld.y2 - case bld.getType - when :Bridge - bld.centerx = bld.x1 + (bld.x2+1-bld.x1)/2 - bld.centery = bld.y1 + (bld.y2+1-bld.y1)/2 - building_check_bridge_support(bld) - when :FarmPlot, :RoadDirt, :RoadPaved, :Stockpile, :Civzone - bld.centerx = bld.x1 + (bld.x2+1-bld.x1)/2 - bld.centery = bld.y1 + (bld.y2+1-bld.y1)/2 - when :TradeDepot, :Shop - bld.x2 = bld.x1+4 - bld.y2 = bld.y1+4 - bld.centerx = bld.x1+2 - bld.centery = bld.y1+2 - when :SiegeEngine, :Windmill, :Wagon - bld.x2 = bld.x1+2 - bld.y2 = bld.y1+2 - bld.centerx = bld.x1+1 - bld.centery = bld.y1+1 - when :AxleHorizontal - if bld.is_vertical == 1 - bld.x2 = bld.centerx = bld.x1 - bld.centery = bld.y1 + (bld.y2+1-bld.y1)/2 - else - bld.centerx = bld.x1 + (bld.x2+1-bld.x1)/2 - bld.y2 = bld.centery = bld.y1 - end - when :WaterWheel - if bld.is_vertical == 1 - bld.x2 = bld.centerx = bld.x1 - bld.y2 = bld.y1+2 - bld.centery = bld.y1+1 - else - bld.x2 = bld.x1+2 - bld.centerx = bld.x1+1 - bld.y2 = bld.centery = bld.y1 - end - when :Workshop, :Furnace - # Furnace = Custom or default case only - case bld.type - when :Quern, :Millstone, :Tool - bld.x2 = bld.centerx = bld.x1 - bld.y2 = bld.centery = bld.y1 - when :Siege, :Kennels - bld.x2 = bld.x1+4 - bld.y2 = bld.y1+4 - bld.centerx = bld.x1+2 - bld.centery = bld.y1+2 - when :Custom - if bdef = world.raws.buildings.all.binsearch(bld.getCustomType) - bld.x2 = bld.x1 + bdef.dim_x - 1 - bld.y2 = bld.y1 + bdef.dim_y - 1 - bld.centerx = bld.x1 + bdef.workloc_x - bld.centery = bld.y1 + bdef.workloc_y - end - else - bld.x2 = bld.x1+2 - bld.y2 = bld.y1+2 - bld.centerx = bld.x1+1 - bld.centery = bld.y1+1 - end - when :ScrewPump - case bld.direction - when :FromEast - bld.x2 = bld.centerx = bld.x1+1 - bld.y2 = bld.centery = bld.y1 - when :FromSouth - bld.x2 = bld.centerx = bld.x1 - bld.y2 = bld.centery = bld.y1+1 - when :FromWest - bld.x2 = bld.x1+1 - bld.y2 = bld.centery = bld.y1 - bld.centerx = bld.x1 - else - bld.x2 = bld.x1+1 - bld.y2 = bld.centery = bld.y1 - bld.centerx = bld.x1 - end - when :Well - bld.bucket_z = bld.z - bld.x2 = bld.centerx = bld.x1 - bld.y2 = bld.centery = bld.y1 - when :Construction - bld.x2 = bld.centerx = bld.x1 - bld.y2 = bld.centery = bld.y1 - bld.setMaterialAmount(1) - return - else - bld.x2 = bld.centerx = bld.x1 - bld.y2 = bld.centery = bld.y1 - end - bld.setMaterialAmount((bld.x2-bld.x1+1)*(bld.y2-bld.y1+1)/4+1) -end - -# set building at position, with optional width/height -def self.building_position(bld, pos, w=nil, h=nil) - bld.x1 = pos.x - bld.y1 = pos.y - bld.z = pos.z - bld.x2 = bld.x1+w-1 if w - bld.y2 = bld.y1+h-1 if h - building_setsize(bld) -end - -# set map occupancy/stockpile/etc for a building -def self.building_setoccupancy(bld) - stockpile = (bld.getType == :Stockpile) - complete = (bld.getBuildStage >= bld.getMaxBuildStage) - extents = (bld.room.extents and bld.isExtentShaped) - - z = bld.z - (bld.x1..bld.x2).each { |x| - (bld.y1..bld.y2).each { |y| - next if !extents or bld.room.extents[bld.room.width*(y-bld.room.y)+(x-bld.room.x)] == 0 - next if not mb = map_block_at(x, y, z) - des = mb.designation[x%16][y%16] - des.pile = stockpile - des.dig = :No - if complete - bld.updateOccupancy(x, y) - else - mb.occupancy[x%16][y%16].building = :Planned - end - } - } -end - -# link bld into other rooms if it is inside their extents -def self.building_linkrooms(bld) - didstuff = false - world.buildings.other[:ANY_FREE].each { |ob| - next if !ob.is_room or ob.z != bld.z - next if !ob.room.extents or !ob.isExtentShaped or ob.room.extents[ob.room.width*(bld.y1-ob.room.y)+(bld.x1-ob.room.x)] == 0 - didstuff = true - ob.children << bld - bld.parents << ob - } - ui.equipment.update.buildings = true if didstuff -end - -# link the building into the world, set map data, link rooms, bld.id -def self.building_link(bld) - bld.id = df.building_next_id - df.building_next_id += 1 - - world.buildings.all << bld - bld.categorize(true) - building_setoccupancy(bld) if bld.isSettingOccupancy - building_linkrooms(bld) -end - -# set a design for the building -def self.building_createdesign(bld, rough=true) - job = bld.jobs[0] - job.mat_type = bld.mat_type - job.mat_index = bld.mat_index - if bld.needsDesign - bld.design = BuildingDesign.cpp_new - bld.design.flags.rough = rough - end -end - -# creates a job to build bld, return it -def self.building_linkforconstruct(bld) - building_link bld - ref = GeneralRefBuildingHolderst.cpp_new - ref.building_id = bld.id - job = Job.cpp_new - job.job_type = :ConstructBuilding - job.pos = [bld.centerx, bld.centery, bld.z] - job.references << ref - bld.jobs << job - job_link job - job -end - -# construct a building with items or JobItems -def self.building_construct(bld, items) - job = building_linkforconstruct(bld) - rough = false - items.each { |item| - if items.kind_of?(JobItem) - item.quantity = (bld.x2-bld.x1+1)*(bld.y2-bld.y1+1)/4+1 if item.quantity < 0 - job.job_items << item - else - job_attachitem(job, item, :Hauled) - end - rough = true if item.getType == :BOULDER - bld.mat_type = item.getMaterial if bld.mat_type == -1 - bld.mat_index = item.getMaterialIndex if bld.mat_index == -1 - } - building_createdesign(bld, rough) -end - -# creates a job to deconstruct the building -def self.building_deconstruct(bld) - job = Job.cpp_new - refbuildingholder = GeneralRefBuildingHolderst.cpp_new - job.job_type = :DestroyBuilding - refbuildingholder.building_id = building.id - job.references << refbuildingholder - building.jobs << job - job_link job - job -end - -# exemple usage -def self.buildbed(pos=cursor) - suspend { - 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 - } - raise 'no free bed, build more !' if not item - - bld = building_alloc(:Bed) - building_position(bld, pos) - building_construct(bld, [item]) - } -end -end diff --git a/plugins/ruby/plugins/plant.rb b/plugins/ruby/plugins/plant.rb deleted file mode 100644 index 64f17b493..000000000 --- a/plugins/ruby/plugins/plant.rb +++ /dev/null @@ -1,152 +0,0 @@ -module DFHack -def self.each_tree(material=:any) - @raws_tree_name ||= {} - if @raws_tree_name.empty? - df.world.raws.plants.all.each_with_index { |p, idx| - @raws_tree_name[idx] = p.id if p.flags[:TREE] - } - end - - if material != :any - mat = match_rawname(material, @raws_tree_name.values) - unless wantmat = @raws_tree_name.index(mat) - raise "invalid tree material #{material}" - end - end - - world.plants.all.each { |plant| - next if not @raws_tree_name[plant.material] - next if wantmat and plant.material != wantmat - yield plant - } -end - -def self.each_shrub(material=:any) - @raws_shrub_name ||= {} - if @raws_tree_name.empty? - df.world.raws.plants.all.each_with_index { |p, idx| - @raws_shrub_name[idx] = p.id if not p.flags[:GRASS] and not p.flags[:TREE] - } - end - - if material != :any - mat = match_rawname(material, @raws_shrub_name.values) - unless wantmat = @raws_shrub_name.index(mat) - raise "invalid shrub material #{material}" - end - end -end - -SaplingToTreeAge = 120960 -def self.cuttrees(material=nil, count_max=100) - if !material - # list trees - cnt = Hash.new(0) - suspend { - each_tree { |plant| - next if plant.grow_counter < SaplingToTreeAge - next if map_designation_at(plant).hidden - cnt[plant.material] += 1 - } - } - cnt.sort_by { |mat, c| c }.each { |mat, c| - name = @raws_tree_name[mat] - puts " #{name} #{c}" - } - else - cnt = 0 - suspend { - each_tree(material) { |plant| - next if plant.grow_counter < SaplingToTreeAge - b = map_block_at(plant) - d = b.designation[plant.pos.x%16][plant.pos.y%16] - next if d.hidden - if d.dig == :No - d.dig = :Default - b.flags.designated = true - cnt += 1 - break if cnt == count_max - end - } - } - puts "Updated #{cnt} plant designations" - end -end - -def self.growtrees(material=nil, count_max=100) - if !material - # list plants - cnt = Hash.new(0) - suspend { - each_tree { |plant| - next if plant.grow_counter >= SaplingToTreeAge - next if map_designation_at(plant).hidden - cnt[plant.material] += 1 - } - } - cnt.sort_by { |mat, c| c }.each { |mat, c| - name = @raws_tree_name[mat] - puts " #{name} #{c}" - } - else - cnt = 0 - suspend { - each_tree(material) { |plant| - next if plant.grow_counter >= SaplingToTreeAge - next if map_designation_at(plant).hidden - plant.grow_counter = SaplingToTreeAge - cnt += 1 - break if cnt == count_max - } - } - puts "Grown #{cnt} saplings" - end -end - -def self.growcrops(material=nil, count_max=100) - @raws_plant_name ||= {} - @raws_plant_growdur ||= {} - if @raws_plant_name.empty? - df.world.raws.plants.all.each_with_index { |p, idx| - @raws_plant_name[idx] = p.id - @raws_plant_growdur[idx] = p.growdur - } - end - - if !material - cnt = Hash.new(0) - suspend { - world.items.other[:SEEDS].each { |seed| - next if not seed.flags.in_building - next if not seed.itemrefs.find { |ref| ref._rtti_classname == :general_ref_building_holderst } - next if seed.grow_counter >= @raws_plant_growdur[seed.mat_index] - cnt[seed.mat_index] += 1 - } - } - cnt.sort_by { |mat, c| c }.each { |mat, c| - name = world.raws.plants.all[mat].id - puts " #{name} #{c}" - } - else - if material != :any - mat = match_rawname(material, @raws_plant_name.values) - unless wantmat = @raws_plant_name.index(mat) - raise "invalid plant material #{material}" - end - end - - cnt = 0 - suspend { - world.items.other[:SEEDS].each { |seed| - next if wantmat and seed.mat_index != wantmat - next if not seed.flags.in_building - next if not seed.itemrefs.find { |ref| ref._rtti_classname == :general_ref_building_holderst } - next if seed.grow_counter >= @raws_plant_growdur[seed.mat_index] - seed.grow_counter = @raws_plant_growdur[seed.mat_index] - cnt += 1 - } - } - puts "Grown #{cnt} crops" - end -end -end diff --git a/plugins/ruby/plugins/unit.rb b/plugins/ruby/plugins/unit.rb deleted file mode 100644 index 9a00b2bfa..000000000 --- a/plugins/ruby/plugins/unit.rb +++ /dev/null @@ -1,52 +0,0 @@ -module DFHack -# returns an Array of all units that are current fort citizen (dwarves, on map, not hostile) -def self.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 - } -end - -# list workers (citizen, not crazy / child / inmood / noble) -def self.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] } - } -end - -# list currently idle workers -def self.unit_idlers - unit_workers.find_all { |u| - # current_job includes eat/drink/sleep/pickupequip - !u.job.current_job._getv 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 } - } -end - -def self.unit_entitypositions(unit) - list = [] - return list if not hf = world.history.figures.binsearch(unit.hist_figure_id) - 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 pa = ent.positions.assignments.binsearch(el.assignment_id) - next if not pos = ent.positions.own.binsearch(pa.position_id) - list << pos - } - list -end -end diff --git a/plugins/ruby/ruby-autogen-defs.rb b/plugins/ruby/ruby-autogen-defs.rb new file mode 100644 index 000000000..64da12ff9 --- /dev/null +++ b/plugins/ruby/ruby-autogen-defs.rb @@ -0,0 +1,752 @@ +# definition of classes used by ruby-autogen +module DFHack + module MemHack + INSPECT_SIZE_LIMIT=16384 + class MemStruct + attr_accessor :_memaddr + def _at(addr) ; d = dup ; d._memaddr = addr ; d ; end + def _get ; self ; end + def _cpp_init ; end + end + + class Compound < MemStruct + class << self + attr_accessor :_fields, :_rtti_classname, :_sizeof + def field(name, offset) + struct = yield + return if not struct + @_fields ||= [] + @_fields << [name, offset, struct] + define_method(name) { struct._at(@_memaddr+offset)._get } + define_method("#{name}=") { |v| struct._at(@_memaddr+offset)._set(v) } + end + def _fields_ancestors + if superclass.respond_to?(:_fields_ancestors) + superclass._fields_ancestors + _fields.to_a + else + _fields.to_a + end + end + + def number(bits, signed, initvalue=nil, enum=nil) + Number.new(bits, signed, initvalue, enum) + end + def float + Float.new + end + def bit(shift) + BitField.new(shift, 1) + end + def bits(shift, len, enum=nil) + BitField.new(shift, len, enum) + end + def pointer + Pointer.new((yield if block_given?)) + end + def pointer_ary(tglen) + PointerAry.new(tglen, yield) + end + def static_array(len, tglen, indexenum=nil) + StaticArray.new(tglen, len, indexenum, yield) + end + def static_string(len) + StaticString.new(len) + end + + def stl_vector(tglen=nil) + tg = yield if tglen + case tglen + when 1; StlVector8.new(tg) + when 2; StlVector16.new(tg) + else StlVector32.new(tg) + end + end + def stl_string + StlString.new + end + def stl_bit_vector + StlBitVector.new + end + def stl_deque(tglen) + StlDeque.new(tglen, yield) + end + + def df_flagarray(indexenum=nil) + DfFlagarray.new(indexenum) + end + def df_array(tglen) + DfArray.new(tglen, yield) + end + def df_linked_list + DfLinkedList.new(yield) + end + + def global(glob) + Global.new(glob) + end + def compound(name=nil, &b) + m = Class.new(Compound) + DFHack.const_set(name, m) if name + m.instance_eval(&b) + m.new + end + def rtti_classname(n) + DFHack.rtti_register(n, self) + @_rtti_classname = n + end + def sizeof(n) + @_sizeof = n + end + + # allocate a new c++ object, return its ruby wrapper + def cpp_new(init=nil) + ptr = DFHack.malloc(_sizeof) + if _rtti_classname and vt = DFHack.rtti_getvtable(_rtti_classname) + DFHack.memory_write_int32(ptr, vt) + # TODO call constructor + end + o = new._at(ptr) + o._cpp_init + o._set(init) if init + o + end + end + def _cpp_init + _fields_ancestors.each { |n, o, s| s._at(@_memaddr+o)._cpp_init } + end + def _set(h) + case h + when Hash; h.each { |k, v| send("#{k}=", v) } + when Array; names = _field_names ; raise 'bad size' if names.length != h.length ; names.zip(h).each { |n, a| send("#{n}=", a) } + when Compound; _field_names.each { |n| send("#{n}=", h.send(n)) } + else raise 'wut?' + end + end + def _fields ; self.class._fields.to_a ; end + def _fields_ancestors ; self.class._fields_ancestors.to_a ; end + def _field_names ; _fields_ancestors.map { |n, o, s| n } ; end + def _rtti_classname ; self.class._rtti_classname ; end + def _sizeof ; self.class._sizeof ; end + @@inspecting = {} # avoid infinite recursion on mutually-referenced objects + def inspect + cn = self.class.name.sub(/^DFHack::/, '') + cn << ' @' << ('0x%X' % _memaddr) if cn != '' + out = "#<#{cn}" + return out << ' ...>' if @@inspecting[_memaddr] + @@inspecting[_memaddr] = true + _fields_ancestors.each { |n, o, s| + out << ' ' if out.length != 0 and out[-1, 1] != ' ' + if out.length > INSPECT_SIZE_LIMIT + out << '...' + break + end + out << inspect_field(n, o, s) + } + out.chomp!(' ') + @@inspecting.delete _memaddr + out << '>' + end + def inspect_field(n, o, s) + if s.kind_of?(BitField) and s._len == 1 + send(n) ? n.to_s : '' + elsif s.kind_of?(Pointer) + "#{n}=#{s._at(@_memaddr+o).inspect}" + elsif n == :_whole + "_whole=0x#{_whole.to_s(16)}" + else + v = send(n).inspect + "#{n}=#{v}" + end + rescue + "#{n}=ERR(#{$!})" + end + end + + class Enum + # number -> symbol + def self.enum + # ruby weirdness, needed to make the constants 'virtual' + @enum ||= const_get(:ENUM) + end + # symbol -> number + def self.nume + @nume ||= const_get(:NUME) + end + + def self.int(i) + nume[i] || i + end + def self.sym(i) + enum[i] || i + end + end + + class Number < MemStruct + attr_accessor :_bits, :_signed, :_initvalue, :_enum + def initialize(bits, signed, initvalue, enum) + @_bits = bits + @_signed = signed + @_initvalue = initvalue + @_enum = enum + end + + def _get + v = case @_bits + when 32; DFHack.memory_read_int32(@_memaddr) + when 16; DFHack.memory_read_int16(@_memaddr) + when 8; DFHack.memory_read_int8( @_memaddr) + when 64;(DFHack.memory_read_int32(@_memaddr) & 0xffffffff) + (DFHack.memory_read_int32(@_memaddr+4) << 32) + end + v &= (1 << @_bits) - 1 if not @_signed + v = @_enum.sym(v) if @_enum + v + end + + def _set(v) + v = @_enum.int(v) if @_enum + case @_bits + when 32; DFHack.memory_write_int32(@_memaddr, v) + when 16; DFHack.memory_write_int16(@_memaddr, v) + when 8; DFHack.memory_write_int8( @_memaddr, v) + when 64; DFHack.memory_write_int32(@_memaddr, v & 0xffffffff) ; DFHack.memory_write_int32(@memaddr+4, v>>32) + end + end + + def _cpp_init + _set(@_initvalue) if @_initvalue + end + end + class Float < MemStruct + def _get + DFHack.memory_read_float(@_memaddr) + end + + def _set(v) + DFHack.memory_write_float(@_memaddr, v) + end + + def _cpp_init + _set(0.0) + end + end + class BitField < MemStruct + attr_accessor :_shift, :_len, :_enum + def initialize(shift, len, enum=nil) + @_shift = shift + @_len = len + @_enum = enum + end + def _mask + (1 << @_len) - 1 + end + + def _get + v = DFHack.memory_read_int32(@_memaddr) >> @_shift + if @_len == 1 + ((v & 1) == 0) ? false : true + else + v &= _mask + v = @_enum.sym(v) if @_enum + v + end + end + + def _set(v) + if @_len == 1 + # allow 'bit = 0' + v = (v && v != 0 ? 1 : 0) + end + v = @_enum.int(v) if @_enum + v = (v & _mask) << @_shift + + ori = DFHack.memory_read_int32(@_memaddr) & 0xffffffff + DFHack.memory_write_int32(@_memaddr, ori - (ori & ((-1 & _mask) << @_shift)) + v) + end + end + + class Pointer < MemStruct + attr_accessor :_tg + def initialize(tg) + @_tg = tg + end + + def _getp + DFHack.memory_read_int32(@_memaddr) & 0xffffffff + end + + def _get + addr = _getp + return if addr == 0 + @_tg._at(addr)._get + end + + # XXX shaky... + def _set(v) + if v.kind_of?(Pointer) + DFHack.memory_write_int32(@_memaddr, v._getp) + elsif v.kind_of?(MemStruct) + DFHack.memory_write_int32(@_memaddr, v._memaddr) + else + _get._set(v) + end + end + + def inspect + ptr = _getp + if ptr == 0 + 'NULL' + else + cn = '' + cn = @_tg.class.name.sub(/^DFHack::/, '').sub(/^MemHack::/, '') if @_tg + cn = @_tg._glob if cn == 'Global' + "#" + end + end + end + class PointerAry < MemStruct + attr_accessor :_tglen, :_tg + def initialize(tglen, tg) + @_tglen = tglen + @_tg = tg + end + + def _getp(i=0) + delta = (i != 0 ? i*@_tglen : 0) + (DFHack.memory_read_int32(@_memaddr) & 0xffffffff) + delta + end + + def _get + addr = _getp + return if addr == 0 + self + end + + def [](i) + addr = _getp(i) + return if addr == 0 + @_tg._at(addr)._get + end + def []=(i, v) + addr = _getp(i) + raise 'null pointer' if addr == 0 + @_tg._at(addr)._set(v) + end + + def inspect ; ptr = _getp ; (ptr == 0) ? 'NULL' : "#" ; end + end + module Enumerable + include ::Enumerable + attr_accessor :_indexenum + def each ; (0...length).each { |i| yield self[i] } ; end + def inspect + out = '[' + each_with_index { |e, idx| + out << ', ' if out.length > 1 + if out.length > INSPECT_SIZE_LIMIT + out << '...' + break + end + out << "#{_indexenum.sym(idx)}=" if _indexenum + out << e.inspect + } + out << ']' + 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 + end + class StaticArray < MemStruct + attr_accessor :_tglen, :_length, :_indexenum, :_tg + def initialize(tglen, length, indexenum, tg) + @_tglen = tglen + @_length = length + @_indexenum = indexenum + @_tg = tg + end + def _set(a) + a.each_with_index { |v, i| self[i] = v } + end + def _cpp_init + _length.times { |i| _tgat(i)._cpp_init } + end + alias length _length + alias size _length + def _tgat(i) + @_tg._at(@_memaddr + i*@_tglen) if i >= 0 and i < @_length + end + def [](i) + i = _indexenum.int(i) if _indexenum + i += @_length if i < 0 + _tgat(i)._get + end + def []=(i, v) + i = _indexenum.int(i) if _indexenum + i += @_length if i < 0 + _tgat(i)._set(v) + end + + include Enumerable + end + class StaticString < MemStruct + attr_accessor :_length + def initialize(length) + @_length = length + end + def _get + DFHack.memory_read(@_memaddr, @_length) + end + def _set(v) + DFHack.memory_write(@_memaddr, v[0, @_length]) + end + end + + class StlVector32 < MemStruct + attr_accessor :_tg + def initialize(tg) + @_tg = tg + end + + def length + DFHack.memory_vector32_length(@_memaddr) + end + def size ; length ; end # alias wouldnt work for subclasses + def valueptr_at(idx) + DFHack.memory_vector32_ptrat(@_memaddr, idx) + end + def insert_at(idx, val) + DFHack.memory_vector32_insert(@_memaddr, idx, val) + end + def delete_at(idx) + DFHack.memory_vector32_delete(@_memaddr, idx) + end + + def _set(v) + delete_at(length-1) while length > v.length # match lengthes + v.each_with_index { |e, i| self[i] = e } # patch entries + end + + def _cpp_init + DFHack.memory_vector_init(@_memaddr) + end + + def clear + delete_at(length-1) while length > 0 + end + def [](idx) + idx += length if idx < 0 + @_tg._at(valueptr_at(idx))._get if idx >= 0 and idx < length + end + def []=(idx, v) + idx += length if idx < 0 + if idx >= length + insert_at(idx, 0) + elsif idx < 0 + raise 'invalid idx' + end + @_tg._at(valueptr_at(idx))._set(v) + end + def push(v) + self[length] = v + self + end + def <<(v) ; push(v) ; end + def pop + l = length + if l > 0 + v = self[l-1] + delete_at(l-1) + end + v + end + + include Enumerable + # do a binary search in an ordered vector for a specific target attribute + # ex: world.history.figures.binsearch(unit.hist_figure_id) + def binsearch(target, field=:id) + o_start = 0 + o_end = length - 1 + while o_end >= o_start + o_half = o_start + (o_end-o_start)/2 + obj = self[o_half] + oval = obj.send(field) + if oval == target + return obj + elsif oval < target + o_start = o_half+1 + else + o_end = o_half-1 + end + end + end + end + class StlVector16 < StlVector32 + def length + DFHack.memory_vector16_length(@_memaddr) + end + def valueptr_at(idx) + DFHack.memory_vector16_ptrat(@_memaddr, idx) + end + def insert_at(idx, val) + DFHack.memory_vector16_insert(@_memaddr, idx, val) + end + def delete_at(idx) + DFHack.memory_vector16_delete(@_memaddr, idx) + end + end + class StlVector8 < StlVector32 + def length + DFHack.memory_vector8_length(@_memaddr) + end + def valueptr_at(idx) + DFHack.memory_vector8_ptrat(@_memaddr, idx) + end + def insert_at(idx, val) + DFHack.memory_vector8_insert(@_memaddr, idx, val) + end + def delete_at(idx) + DFHack.memory_vector8_delete(@_memaddr, idx) + end + end + class StlBitVector < StlVector32 + def initialize ; end + def length + DFHack.memory_vectorbool_length(@_memaddr) + end + def insert_at(idx, val) + DFHack.memory_vectorbool_insert(@_memaddr, idx, val) + end + def delete_at(idx) + DFHack.memory_vectorbool_delete(@_memaddr, idx) + end + def [](idx) + idx += length if idx < 0 + DFHack.memory_vectorbool_at(@_memaddr, idx) if idx >= 0 and idx < length + end + def []=(idx, v) + idx += length if idx < 0 + if idx >= length + insert_at(idx, v) + elsif idx < 0 + raise 'invalid idx' + else + DFHack.memory_vectorbool_setat(@_memaddr, idx, v) + end + end + end + class StlString < MemStruct + def _get + DFHack.memory_read_stlstring(@_memaddr) + end + + def _set(v) + DFHack.memory_write_stlstring(@_memaddr, v) + end + + def _cpp_init + DFHack.memory_stlstring_init(@_memaddr) + end + end + class StlDeque < MemStruct + attr_accessor :_tglen, :_tg + def initialize(tglen, tg) + @_tglen = tglen + @_tg = tg + end + # XXX DF uses stl::deque, so to have a C binding we'd need to single-case every + # possible struct size, like for StlVector. Just ignore it for now, deque are rare enough. + def inspect ; "#" ; end + end + + class DfFlagarray < MemStruct + attr_accessor :_indexenum + def initialize(indexenum) + @_indexenum = indexenum + end + def length + DFHack.memory_bitarray_length(@_memaddr) + end + # TODO _cpp_init + def size ; length ; end + def resize(len) + DFHack.memory_bitarray_resize(@_memaddr, len) + end + def [](idx) + idx = _indexenum.int(idx) if _indexenum + idx += length if idx < 0 + DFHack.memory_bitarray_isset(@_memaddr, idx) if idx >= 0 and idx < length + end + def []=(idx, v) + idx = _indexenum.int(idx) if _indexenum + idx += length if idx < 0 + if idx >= length or idx < 0 + raise 'invalid idx' + else + DFHack.memory_bitarray_set(@_memaddr, idx, v) + end + end + + include Enumerable + end + class DfArray < Compound + attr_accessor :_tglen, :_tg + def initialize(tglen, tg) + @_tglen = tglen + @_tg = tg + end + + field(:_ptr, 0) { number 32, false } + field(:_length, 4) { number 16, false } + + def length ; _length ; end + def size ; _length ; end + # TODO _cpp_init + 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 + end + def []=(i, v) + i += _length if i < 0 + _tgat(i)._set(v) + end + def _set(a) + a.each_with_index { |v, i| self[i] = v } + end + + include Enumerable + end + class DfLinkedList < Compound + attr_accessor :_tg + def initialize(tg) + @_tg = tg + end + + field(:_ptr, 0) { number 32, false } + field(:_prev, 4) { number 32, false } + field(:_next, 8) { number 32, false } + + def item + # With the current xml structure, currently _tg designate + # the type of the 'next' and 'prev' fields, not 'item'. + # List head has item == NULL, so we can safely return nil. + + #addr = _ptr + #return if addr == 0 + #@_tg._at(addr)._get + end + + def item=(v) + #addr = _ptr + #raise 'null pointer' if addr == 0 + #@_tg.at(addr)._set(v) + raise 'null pointer' + end + + def prev + addr = _prev + return if addr == 0 + @_tg._at(addr)._get + end + + def next + addr = _next + return if addr == 0 + @_tg._at(addr)._get + end + + include Enumerable + def each + o = self + while o + yield o.item if o.item + o = o.next + end + end + def inspect ; "#" ; end + end + + class Global < MemStruct + attr_accessor :_glob + def initialize(glob) + @_glob = glob + end + def _at(addr) + g = DFHack.const_get(@_glob) + g = DFHack.rtti_getclassat(g, addr) + g.new._at(addr) + end + def inspect ; "#<#{@_glob}>" ; end + end + + end + + class BooleanEnum + def self.int(v) ; ((v == true) || (v == 1)) ? 1 : 0 ; end + def self.sym(v) ; (!v || (v == 0)) ? false : true ; end + end + + # cpp rtti name -> rb class + @rtti_n2c = {} + @rtti_c2n = {} + + # cpp rtti name -> vtable ptr + @rtti_n2v = {} + @rtti_v2n = {} + + def self.rtti_n2c ; @rtti_n2c ; end + def self.rtti_c2n ; @rtti_c2n ; end + def self.rtti_n2v ; @rtti_n2v ; end + def self.rtti_v2n ; @rtti_v2n ; end + + # register a ruby class with a cpp rtti class name + def self.rtti_register(cppname, cls) + @rtti_n2c[cppname] = cls + @rtti_c2n[cls] = cppname + end + + # return the ruby class to use for the cpp object at address if rtti info is available + def self.rtti_getclassat(cls, addr) + if addr != 0 and @rtti_c2n[cls] + # rtti info exist for class => cpp object has a vtable + @rtti_n2c[rtti_readclassname(get_vtable_ptr(addr))] || cls + else + cls + end + end + + # try to read the rtti classname from an object vtable pointer + def self.rtti_readclassname(vptr) + unless n = @rtti_v2n[vptr] + n = @rtti_v2n[vptr] = get_rtti_classname(vptr).to_sym + @rtti_n2v[n] = vptr + end + n + end + + # return the vtable pointer from the cpp rtti name + def self.rtti_getvtable(cppname) + unless v = @rtti_n2v[cppname] + v = get_vtable(cppname.to_s) + @rtti_n2v[cppname] = v + @rtti_v2n[v] = cppname if v != 0 + end + v if v != 0 + end + + def self.vmethod_call(obj, voff, a0=0, a1=0, a2=0, a3=0, a4=0) + vmethod_do_call(obj._memaddr, voff, vmethod_arg(a0), vmethod_arg(a1), vmethod_arg(a2), vmethod_arg(a3)) + end + + def self.vmethod_arg(arg) + case arg + when nil, false; 0 + when true; 1 + when Integer; arg + #when String; [arg].pack('p').unpack('L')[0] # raw pointer to buffer + when MemHack::Compound; arg._memaddr + else raise "bad vmethod arg #{arg.class}" + end + end +end diff --git a/plugins/ruby/ruby-autogen.rb b/plugins/ruby/ruby-autogen.rb new file mode 100644 index 000000000..3c2aea775 --- /dev/null +++ b/plugins/ruby/ruby-autogen.rb @@ -0,0 +1,36842 @@ +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 49119c9aa..0f5264515 100644 --- a/plugins/ruby/ruby.cpp +++ b/plugins/ruby/ruby.cpp @@ -21,7 +21,6 @@ using namespace DFHack; static int df_loadruby(void); static void df_unloadruby(void); static void df_rubythread(void*); -static command_result df_rubyload(color_ostream &out, std::vector & parameters); static command_result df_rubyeval(color_ostream &out, std::vector & parameters); static void ruby_bind_dfhack(void); @@ -31,13 +30,12 @@ enum RB_command { RB_INIT, RB_DIE, RB_EVAL, - RB_CUSTOM, }; tthread::mutex *m_irun; tthread::mutex *m_mutex; -static RB_command r_type; +static volatile RB_command r_type; +static volatile command_result r_result; static const char *r_command; -static command_result r_result; static tthread::thread *r_thread; static int onupdate_active; @@ -45,31 +43,39 @@ DFHACK_PLUGIN("ruby") DFhackCExport command_result plugin_init ( color_ostream &out, std::vector &commands) { - // fail silently instead of spamming the console with 'failed to initialize' if libruby is not present - // the error is still logged in stderr.log + onupdate_active = 0; + + // fail silently instead of spamming the console with 'failed to initialize' + // if libruby is not present, the error is still logged in stderr.log if (!df_loadruby()) return CR_OK; + // the ruby thread sleeps trying to lock this + // when it gets it, it runs according to r_type + // when finished, it sets r_type to IDLE and unlocks m_irun = new tthread::mutex(); + + // when any thread is going to request something to the ruby thread, + // lock this before anything, and release when everything is done m_mutex = new tthread::mutex(); + r_type = RB_INIT; + // create the dedicated ruby thread + // df_rubythread starts the ruby interpreter and goes to type=IDLE when done r_thread = new tthread::thread(df_rubythread, 0); + // wait until init phase 1 is done while (r_type != RB_IDLE) tthread::this_thread::yield(); + // ensure the ruby thread sleeps until we have a command to handle m_irun->lock(); + // check return value from rbinit if (r_result == CR_FAILURE) return CR_FAILURE; - onupdate_active = 0; - - commands.push_back(PluginCommand("rb_load", - "Ruby interpreter. Loads the given ruby script.", - df_rubyload)); - commands.push_back(PluginCommand("rb_eval", "Ruby interpreter. Eval() a ruby string.", df_rubyeval)); @@ -79,70 +85,86 @@ DFhackCExport command_result plugin_init ( color_ostream &out, std::vector lock(); r_type = RB_DIE; - r_command = 0; + r_command = NULL; + // start ruby thread m_irun->unlock(); + // wait until ruby thread ends after RB_DIE r_thread->join(); + // cleanup everything delete r_thread; r_thread = 0; delete m_irun; + // we can release m_mutex, other users will check r_thread m_mutex->unlock(); delete m_mutex; + // dlclose libruby df_unloadruby(); return CR_OK; } // send a single ruby line to be evaluated by the ruby thread -static command_result plugin_eval_rb(const char *command) +DFhackCExport command_result plugin_eval_ruby(const char *command) { + // if dlopen failed + if (!r_thread) + return CR_FAILURE; + + // wrap all ruby code inside a suspend block + // if we dont do that and rely on ruby code doing it, we'll deadlock in + // onupdate + CoreSuspender suspend; + command_result ret; - // serialize 'accesses' to the ruby thread + // ensure ruby thread is idle m_mutex->lock(); if (!r_thread) - // raced with plugin_shutdown ? + // raced with plugin_shutdown return CR_OK; r_type = RB_EVAL; r_command = command; + // wake ruby thread up m_irun->unlock(); - // could use a condition_variable or something... + // semi-active loop until ruby thread is done while (r_type != RB_IDLE) tthread::this_thread::yield(); - // XXX non-atomic with previous r_type change check ret = r_result; + // block ruby thread m_irun->lock(); + // let other plugin_eval_ruby run m_mutex->unlock(); return ret; } -static command_result plugin_eval_rb(std::string &command) -{ - return plugin_eval_rb(command.c_str()); -} - DFhackCExport command_result plugin_onupdate ( color_ostream &out ) { if (!r_thread) return CR_OK; + // 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_rb("DFHack.onupdate"); + return plugin_eval_ruby("DFHack.onupdate"); } DFhackCExport command_result plugin_onstatechange ( color_ostream &out, state_change_event e) @@ -159,26 +181,13 @@ DFhackCExport command_result plugin_onstatechange ( color_ostream &out, state_ch SCASE(MAP_UNLOADED); SCASE(VIEWSCREEN_CHANGED); SCASE(CORE_INITIALIZED); - SCASE(BEGIN_UNLOAD); + // 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; #undef SCASE } - return plugin_eval_rb(cmd); -} - -static command_result df_rubyload(color_ostream &out, std::vector & parameters) -{ - if (parameters.size() == 1 && (parameters[0] == "help" || parameters[0] == "?")) - { - out.print("This command loads the ruby script whose path is given as parameter, and run it.\n"); - return CR_OK; - } - - std::string cmd = "load '"; - cmd += parameters[0]; // TODO escape singlequotes - cmd += "'"; - - return plugin_eval_rb(cmd); + return plugin_eval_ruby(cmd.c_str()); } static command_result df_rubyeval(color_ostream &out, std::vector & parameters) @@ -191,6 +200,7 @@ static command_result df_rubyeval(color_ostream &out, std::vector return CR_OK; } + // reconstruct the text from dfhack console line std::string full = ""; for (unsigned i=0 ; i full += " "; } - return plugin_eval_rb(full); + return plugin_eval_ruby(full.c_str()); } // ruby stuff -// ruby-dev on windows is messy -// ruby.h on linux 64 is broken -// so we dynamically load libruby instead of linking it at compile time -// lib path can be set in dfhack.ini to use the system libruby, but by -// default we'll embed our own (downloaded by cmake) +// - ruby-dev on windows is messy +// - ruby.h with gcc -m32 on linux 64 is broken +// so we dynamically load libruby with dlopen/LoadLibrary +// lib path is hardcoded here, and by default downloaded by cmake +// this code should work with ruby1.9, but ruby1.9 doesn't like running +// in a dedicated non-main thread, so use ruby1.8 binaries only for now -// these ruby definitions are invalid for windows 64bit +// these ruby definitions are invalid for windows 64bit (need long long) typedef unsigned long VALUE; typedef unsigned long ID; @@ -224,23 +235,17 @@ typedef unsigned long ID; #define FIX2INT(i) (((long)i) >> 1) #define RUBY_METHOD_FUNC(func) ((VALUE(*)(...))func) -VALUE *rb_eRuntimeError; - void (*ruby_sysinit)(int *, const char ***); void (*ruby_init)(void); void (*ruby_init_loadpath)(void); void (*ruby_script)(const char*); void (*ruby_finalize)(void); ID (*rb_intern)(const char*); -VALUE (*rb_raise)(VALUE, const char*, ...); VALUE (*rb_funcall)(VALUE, ID, int, ...); VALUE (*rb_define_module)(const char*); void (*rb_define_singleton_method)(VALUE, const char*, VALUE(*)(...), int); -void (*rb_define_const)(VALUE, const char*, VALUE); -void (*rb_load_protect)(VALUE, int, int*); VALUE (*rb_gv_get)(const char*); VALUE (*rb_str_new)(const char*, long); -VALUE (*rb_str_new2)(const char*); char* (*rb_string_value_ptr)(VALUE*); VALUE (*rb_eval_string_protect)(const char*, int*); VALUE (*rb_ary_shift)(VALUE); @@ -257,8 +262,10 @@ DFHack::DFLibrary *libruby_handle; static int df_loadruby(void) { const char *libpath = -#ifdef WIN32 +#if defined(WIN32) "./libruby.dll"; +#elif defined(__APPLE__) + "/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/libruby.1.dylib"; #else "hack/libruby.so"; #endif @@ -269,11 +276,6 @@ static int df_loadruby(void) return 0; } - if (!(rb_eRuntimeError = (VALUE*)LookupPlugin(libruby_handle, "rb_eRuntimeError"))) - return 0; - - // XXX does msvc support decltype ? might need a #define decltype typeof - // or just assign to *(void**)(&s) = ... // ruby_sysinit is optional (ruby1.9 only) ruby_sysinit = (decltype(ruby_sysinit))LookupPlugin(libruby_handle, "ruby_sysinit"); #define rbloadsym(s) if (!(s = (decltype(s))LookupPlugin(libruby_handle, #s))) return 0 @@ -282,15 +284,11 @@ static int df_loadruby(void) rbloadsym(ruby_script); rbloadsym(ruby_finalize); rbloadsym(rb_intern); - rbloadsym(rb_raise); rbloadsym(rb_funcall); rbloadsym(rb_define_module); rbloadsym(rb_define_singleton_method); - rbloadsym(rb_define_const); - rbloadsym(rb_load_protect); rbloadsym(rb_gv_get); rbloadsym(rb_str_new); - rbloadsym(rb_str_new2); rbloadsym(rb_string_value_ptr); rbloadsym(rb_eval_string_protect); rbloadsym(rb_ary_shift); @@ -358,12 +356,25 @@ static void df_rubythread(void *p) console_proxy = new color_ostream_proxy(Core::getInstance().getConsole()); + // ensure noone bothers us while we load data defs in the background + m_mutex->lock(); + + // tell the main thread our initialization is finished r_result = CR_OK; r_type = RB_IDLE; + // load the default ruby-level definitions in the background + state=0; + rb_eval_string_protect("require './hack/ruby/ruby'", &state); + if (state) + dump_rb_error(); + + // ready to go + m_mutex->unlock(); + running = 1; while (running) { - // wait for new command + // sleep waiting for new command m_irun->lock(); switch (r_type) { @@ -382,10 +393,6 @@ static void df_rubythread(void *p) if (state) dump_rb_error(); break; - - case RB_CUSTOM: - // TODO handle ruby custom commands - break; } r_result = CR_OK; @@ -419,42 +426,6 @@ static VALUE rb_dfonupdateactiveset(VALUE self, VALUE val) return Qtrue; } -static VALUE rb_dfresume(VALUE self) -{ - Core::getInstance().Resume(); - return Qtrue; -} - -static VALUE rb_dfsuspend(VALUE self) -{ - Core::getInstance().Suspend(); - return Qtrue; -} - -// returns the delta to apply to dfhack xml addrs wrt actual memory addresses -// usage: real_addr = addr_from_xml + this_delta; -static VALUE rb_dfrebase_delta(void) -{ - uint32_t expected_base_address; - uint32_t actual_base_address = 0; -#ifdef WIN32 - expected_base_address = 0x00400000; - actual_base_address = (uint32_t)GetModuleHandle(0); -#else - expected_base_address = 0x08048000; - FILE *f = fopen("/proc/self/maps", "r"); - char line[256]; - while (fgets(line, sizeof(line), f)) { - if (strstr(line, "libs/Dwarf_Fortress")) { - actual_base_address = strtoul(line, 0, 16); - break; - } - } -#endif - - return rb_int2inum(actual_base_address - expected_base_address); -} - static VALUE rb_dfprint_str(VALUE self, VALUE s) { console_proxy->print("%s", rb_string_value_ptr(&s)); @@ -467,24 +438,6 @@ static VALUE rb_dfprint_err(VALUE self, VALUE s) return Qnil; } -/* TODO needs main dfhack support - this needs a custom DFHack::Plugin subclass to pass the cmdname to invoke(), to match the ruby callback -// register a ruby method as dfhack console command -// usage: DFHack.register("moo", "this commands prints moo on the console") { DFHack.puts "moo !" } -static VALUE rb_dfregister(VALUE self, VALUE name, VALUE descr) -{ - commands.push_back(PluginCommand(rb_string_value_ptr(&name), - rb_string_value_ptr(&descr), - df_rubycustom)); - - return Qtrue; -} -*/ -static VALUE rb_dfregister(VALUE self, VALUE name, VALUE descr) -{ - rb_raise(*rb_eRuntimeError, "not implemented"); -} - static VALUE rb_dfget_global_address(VALUE self, VALUE name) { return rb_uint2inum(Core::getInstance().vinfo->getAddress(rb_string_value_ptr(&name))); @@ -510,7 +463,7 @@ static VALUE rb_dfget_rtti_classname(VALUE self, VALUE vptr) char *typestring = *(char**)(typeinfo + 0x4); while (*typestring >= '0' && *typestring <= '9') typestring++; - return rb_str_new2(typestring); + return rb_str_new(typestring, strlen(typestring)); #endif } @@ -531,7 +484,7 @@ static VALUE rb_dfmalloc(VALUE self, VALUE len) { char *ptr = (char*)malloc(FIX2INT(len)); if (!ptr) - rb_raise(*rb_eRuntimeError, "no memory"); + return Qnil; memset(ptr, 0, FIX2INT(len)); return rb_uint2inum((long)ptr); } @@ -760,17 +713,49 @@ static VALUE rb_dfmemory_bitarray_set(VALUE self, VALUE addr, VALUE idx, VALUE v /* call an arbitrary object virtual method */ -static VALUE rb_dfvcall(VALUE self, VALUE cppobj, VALUE cppvoff, VALUE a0, VALUE a1, VALUE a2, VALUE a3) -{ #ifdef WIN32 - __thiscall -#endif +__declspec(naked) static int raw_vcall(char **that, unsigned long voff, unsigned long a0, + unsigned long a1, unsigned long a2, unsigned long a3) +{ + // __thiscall requires that the callee cleans up the stack + // here we dont know how many arguments it will take, so + // we simply fix esp across the funcall + __asm { + push ebp + mov ebp, esp + + push a3 + push a2 + push a1 + push a0 + + mov ecx, that + + mov eax, [ecx] + add eax, voff + call [eax] + + mov esp, ebp + pop ebp + ret + } +} +#else +static int raw_vcall(char **that, unsigned long voff, unsigned long a0, + unsigned long a1, unsigned long a2, unsigned long a3) +{ int (*fptr)(char **me, int, int, int, int); - char **that = (char**)rb_num2ulong(cppobj); - int ret; - fptr = (decltype(fptr))*(void**)(*that + rb_num2ulong(cppvoff)); - ret = fptr(that, rb_num2ulong(a0), rb_num2ulong(a1), rb_num2ulong(a2), rb_num2ulong(a3)); - return rb_int2inum(ret); + fptr = (decltype(fptr))*(void**)(*that + voff); + return fptr(that, a0, a1, a2, a3); +} +#endif + +// call an arbitrary vmethod, convert args/ret to native values for raw_vcall +static VALUE rb_dfvcall(VALUE self, VALUE cppobj, VALUE cppvoff, VALUE a0, VALUE a1, VALUE a2, VALUE a3) +{ + return rb_int2inum(raw_vcall((char**)rb_num2ulong(cppobj), rb_num2ulong(cppvoff), + rb_num2ulong(a0), rb_num2ulong(a1), + rb_num2ulong(a2), rb_num2ulong(a3))); } @@ -779,22 +764,17 @@ 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"); - // global DFHack commands 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, "resume", RUBY_METHOD_FUNC(rb_dfresume), 0); - rb_define_singleton_method(rb_cDFHack, "do_suspend", RUBY_METHOD_FUNC(rb_dfsuspend), 0); 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); rb_define_singleton_method(rb_cDFHack, "get_vtable_ptr", RUBY_METHOD_FUNC(rb_dfget_vtable_ptr), 1); - rb_define_singleton_method(rb_cDFHack, "register_dfcommand", RUBY_METHOD_FUNC(rb_dfregister), 2); rb_define_singleton_method(rb_cDFHack, "print_str", RUBY_METHOD_FUNC(rb_dfprint_str), 1); rb_define_singleton_method(rb_cDFHack, "print_err", RUBY_METHOD_FUNC(rb_dfprint_err), 1); rb_define_singleton_method(rb_cDFHack, "malloc", RUBY_METHOD_FUNC(rb_dfmalloc), 1); rb_define_singleton_method(rb_cDFHack, "free", RUBY_METHOD_FUNC(rb_dffree), 1); rb_define_singleton_method(rb_cDFHack, "vmethod_do_call", RUBY_METHOD_FUNC(rb_dfvcall), 6); - rb_define_const(rb_cDFHack, "REBASE_DELTA", rb_dfrebase_delta()); rb_define_singleton_method(rb_cDFHack, "memory_read", RUBY_METHOD_FUNC(rb_dfmemory_read), 2); rb_define_singleton_method(rb_cDFHack, "memory_read_int8", RUBY_METHOD_FUNC(rb_dfmemory_read_int8), 1); @@ -833,10 +813,4 @@ static void ruby_bind_dfhack(void) { 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); rb_define_singleton_method(rb_cDFHack, "memory_bitarray_set", RUBY_METHOD_FUNC(rb_dfmemory_bitarray_set), 3); - - // load the default ruby-level definitions - int state=0; - rb_load_protect(rb_str_new2("./hack/ruby.rb"), Qfalse, &state); - if (state) - dump_rb_error(); } diff --git a/plugins/ruby/ruby.rb b/plugins/ruby/ruby.rb index fd597e43f..64592e3eb 100644 --- a/plugins/ruby/ruby.rb +++ b/plugins/ruby/ruby.rb @@ -1,41 +1,29 @@ -module DFHack - class << self - # update the ruby.cpp version to accept a block - def suspend - if block_given? - begin - do_suspend - yield - ensure - resume - end - else - do_suspend - end - end - - module ::Kernel - def puts(*a) - a.flatten.each { |l| - DFHack.print_str(l.to_s.chomp + "\n") - } - nil - end +# redefine standard i/o methods to use the dfhack console +module Kernel + def puts(*a) + a.flatten.each { |l| + DFHack.print_str(l.to_s.chomp + "\n") + } + nil + end - def puts_err(*a) - a.flatten.each { |l| - DFHack.print_err(l.to_s.chomp + "\n") - } - nil - end + def puts_err(*a) + a.flatten.each { |l| + DFHack.print_err(l.to_s.chomp + "\n") + } + nil + end - def p(*a) - a.each { |e| - puts_err e.inspect - } - end - end + def p(*a) + a.each { |e| + puts_err e.inspect + } + nil + end +end +module DFHack + class << self # 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) @@ -76,104 +64,6 @@ module DFHack @onstatechange_list.each { |cb| cb.call(newstate) } end - - # return an Unit - # 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 find_unit(what=:selected) - 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 - end - elsif what.kind_of?(Integer) - world.units.all.binsearch(what) - elsif what.respond_to?(:x) or what.respond_to?(:pos) - what = what.pos if what.respond_to?(:pos) - x, y, z = what.x, what.y, what.z - world.units.all.find { |u| u.pos.x == x and u.pos.y == y and u.pos.z == z } - else - raise "what what?" - end - end - - # return an Item - # arg similar to find_unit; no arg = 'k' menu - def find_item(what=:selected) - if what == :selected - case ui.main.mode - when :LookAround - k = ui_look_list.items[ui_look_cursor] - k.item if k.type == :Item - end - elsif what.kind_of?(Integer) - world.items.all.binsearch(what) - elsif what.respond_to?(:x) or what.respond_to?(:pos) - what = what.pos if what.respond_to?(:pos) - x, y, z = what.x, what.y, what.z - world.items.all.find { |i| i.pos.x == x and i.pos.y == y and i.pos.z == z } - else - raise "what what?" - end - end - - # return a map block by tile coordinates - # you can also use find_map_block(cursor) or anything that respond to x/y/z - def map_block_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) - if x >= 0 and x < world.map.x_count and y >= 0 and y < world.map.y_count and z >= 0 and z < world.map.z_count - world.map.block_index[x/16][y/16][z] - end - end - - def map_designation_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) - if b = map_block_at(x, y, z) - b.designation[x%16][y%16] - end - end - - def map_occupancy_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) - if b = map_block_at(x, y, z) - b.occupancy[x%16][y%16] - end - end - - # yields every map block - def each_map_block - (0...world.map.x_count_block).each { |xb| - xl = world.map.block_index[xb] - (0...world.map.y_count_block).each { |yb| - yl = xl[yb] - (0...world.map.z_count_block).each { |z| - p = yl[z] - yield p if p - } - } - } - end - - # yields every map block for a given z level - def each_map_block_z(z) - (0...world.map.x_count_block).each { |xb| - xl = world.map.block_index[xb] - (0...world.map.y_count_block).each { |yb| - p = xl[yb][z] - yield p if p - } - } - end - # return true if the argument is under the cursor def at_cursor?(obj) same_pos?(obj, cursor) @@ -186,67 +76,6 @@ module DFHack pos1.x == pos2.x and pos1.y == pos2.y and pos1.z == pos2.z end - # center the DF screen on something - # updates the cursor position if visible - def center_viewscreen(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) - - # compute screen 'map' size (tiles) - menuwidth = ui_menu_width - # ui_menu_width shows only the 'tab' status - menuwidth = 1 if menuwidth == 2 and ui_area_map_width == 2 and cursor.x != -30000 - menuwidth = 2 if menuwidth == 3 and cursor.x != -30000 - w_w = gps.dimx - 2 - w_h = gps.dimy - 2 - case menuwidth - when 1; w_w -= 55 - when 2; w_w -= (ui_area_map_width == 2 ? 24 : 31) - end - - # center view - w_x = x - w_w/2 - w_y = y - w_h/2 - w_z = z - # round view coordinates (optional) - #w_x -= w_x % 10 - #w_y -= w_y % 10 - # crop to map limits - w_x = [[w_x, world.map.x_count - w_w].min, 0].max - w_y = [[w_y, world.map.y_count - w_h].min, 0].max - - self.window_x = w_x - self.window_y = w_y - self.window_z = w_z - - if cursor.x != -30000 - cursor.x, cursor.y, cursor.z = x, y, z - end - end - - # add an announcement - # color = integer, bright = bool - def add_announcement(str, color=nil, bright=nil) - cont = false - while str.length > 0 - rep = Report.cpp_new - rep.color = color if color - rep.bright = ((bright && bright != 0) ? 1 : 0) if bright != nil - rep.year = cur_year - rep.time = cur_year_tick - rep.flags.continuation = cont - cont = true - rep.flags.announcement = true - rep.text = str[0, 73] - str = str[73..-1].to_s - rep.id = world.status.next_report_id - world.status.next_report_id += 1 - world.status.reports << rep - world.status.announcements << rep - world.status.display_timer = 2000 - end - end - # try to match a user-specified name to one from the raws # uses case-switching and substring matching # eg match_rawname('coal', ['COAL_BITUMINOUS', 'BAUXITE']) => 'COAL_BITUMINOUS' @@ -256,38 +85,6 @@ module DFHack may = rawlist.find_all { |r| r.downcase.index(name.downcase) } may.first if may.length == 1 end - - # link a job to the world - # allocate & set job.id, allocate a JobListLink, link to job & world.job_list - def job_link(job) - lastjob = world.job_list - lastjob = lastjob.next while lastjob.next - joblink = JobListLink.cpp_new - joblink.prev = lastjob - joblink.item = job - job.list_link = joblink - job.id = df.job_next_id - df.job_next_id += 1 - lastjob.next = joblink - end - - # attach an item to a job, flag item in_job - def job_attachitem(job, item, role=:Hauled, filter_idx=-1) - if role != :TargetContainer - item.flags.in_job = true - end - - itemlink = SpecificRef.cpp_new - itemlink.type = :JOB - itemlink.job = job - item.specific_refs << itemlink - - joblink = JobItemRef.cpp_new - joblink.item = item - joblink.role = role - joblink.job_item_idx = filter_idx - job.items << joblink - end end end @@ -296,759 +93,9 @@ def df DFHack end -# following: definitions used by ruby-autogen.rb -module DFHack -module MemHack -INSPECT_SIZE_LIMIT=16384 -class MemStruct - attr_accessor :_memaddr - def _at(addr) ; d = dup ; d._memaddr = addr ; d ; end - def _get ; self ; end - def _cpp_init ; end -end - -class Compound < MemStruct - class << self - attr_accessor :_fields, :_rtti_classname, :_sizeof - def field(name, offset) - struct = yield - return if not struct - @_fields ||= [] - @_fields << [name, offset, struct] - define_method(name) { struct._at(@_memaddr+offset)._get } - define_method("#{name}=") { |v| struct._at(@_memaddr+offset)._set(v) } - end - def _fields_ancestors - if superclass.respond_to?(:_fields_ancestors) - superclass._fields_ancestors + _fields.to_a - else - _fields.to_a - end - end - - def number(bits, signed, initvalue=nil, enum=nil) - Number.new(bits, signed, initvalue, enum) - end - def float - Float.new - end - def bit(shift) - BitField.new(shift, 1) - end - def bits(shift, len, enum=nil) - BitField.new(shift, len, enum) - end - def pointer - Pointer.new((yield if block_given?)) - end - def pointer_ary(tglen) - PointerAry.new(tglen, yield) - end - def static_array(len, tglen, indexenum=nil) - StaticArray.new(tglen, len, indexenum, yield) - end - def static_string(len) - StaticString.new(len) - end - - def stl_vector(tglen=nil) - tg = yield if tglen - case tglen - when 1; StlVector8.new(tg) - when 2; StlVector16.new(tg) - else StlVector32.new(tg) - end - end - def stl_string - StlString.new - end - def stl_bit_vector - StlBitVector.new - end - def stl_deque(tglen) - StlDeque.new(tglen, yield) - end - - def df_flagarray(indexenum=nil) - DfFlagarray.new(indexenum) - end - def df_array(tglen) - DfArray.new(tglen, yield) - end - def df_linked_list - DfLinkedList.new(yield) - end - - def global(glob) - Global.new(glob) - end - def compound(name=nil, &b) - m = Class.new(Compound) - DFHack.const_set(name, m) if name - m.instance_eval(&b) - m.new - end - def rtti_classname(n) - DFHack.rtti_register(n, self) - @_rtti_classname = n - end - def sizeof(n) - @_sizeof = n - end - - # allocate a new c++ object, return its ruby wrapper - def cpp_new - ptr = DFHack.malloc(_sizeof) - if _rtti_classname and vt = DFHack.rtti_getvtable(_rtti_classname) - DFHack.memory_write_int32(ptr, vt) - # TODO call constructor - end - o = new._at(ptr) - o._cpp_init - o - end - end - def _cpp_init - _fields_ancestors.each { |n, o, s| s._at(@_memaddr+o)._cpp_init } - end - def _set(h) - case h - when Hash; h.each { |k, v| send("_#{k}=", v) } - when Array; names = _field_names ; raise 'bad size' if names.length != h.length ; names.zip(h).each { |n, a| send("#{n}=", a) } - when Compound; _field_names.each { |n| send("#{n}=", h.send(n)) } - else raise 'wut?' - end - end - def _fields ; self.class._fields.to_a ; end - def _fields_ancestors ; self.class._fields_ancestors.to_a ; end - def _field_names ; _fields_ancestors.map { |n, o, s| n } ; end - def _rtti_classname ; self.class._rtti_classname ; end - def _sizeof ; self.class._sizeof ; end - @@inspecting = {} # avoid infinite recursion on mutually-referenced objects - def inspect - cn = self.class.name.sub(/^DFHack::/, '') - cn << ' @' << ('0x%X' % _memaddr) if cn != '' - out = "#<#{cn}" - return out << ' ...>' if @@inspecting[_memaddr] - @@inspecting[_memaddr] = true - _fields_ancestors.each { |n, o, s| - out << ' ' if out.length != 0 and out[-1, 1] != ' ' - if out.length > INSPECT_SIZE_LIMIT - out << '...' - break - end - out << inspect_field(n, o, s) - } - out.chomp!(' ') - @@inspecting.delete _memaddr - out << '>' - end - def inspect_field(n, o, s) - if s.kind_of?(BitField) and s._len == 1 - send(n) ? n.to_s : '' - elsif s.kind_of?(Pointer) - "#{n}=#{s._at(@_memaddr+o).inspect}" - elsif n == :_whole - "_whole=0x#{_whole.to_s(16)}" - else - v = send(n).inspect - "#{n}=#{v}" - end - rescue - "#{n}=ERR(#{$!})" - end -end - -class Enum - # number -> symbol - def self.enum - # ruby weirdness, needed to make the constants 'virtual' - @enum ||= const_get(:ENUM) - end - # symbol -> number - def self.nume - @nume ||= const_get(:NUME) - end - - def self.int(i) - nume[i] || i - end - def self.sym(i) - enum[i] || i - end -end - -class Number < MemStruct - attr_accessor :_bits, :_signed, :_initvalue, :_enum - def initialize(bits, signed, initvalue, enum) - @_bits = bits - @_signed = signed - @_initvalue = initvalue - @_enum = enum - end - - def _get - v = case @_bits - when 32; DFHack.memory_read_int32(@_memaddr) - when 16; DFHack.memory_read_int16(@_memaddr) - when 8; DFHack.memory_read_int8( @_memaddr) - when 64;(DFHack.memory_read_int32(@_memaddr) & 0xffffffff) + (DFHack.memory_read_int32(@_memaddr+4) << 32) - end - v &= (1 << @_bits) - 1 if not @_signed - v = @_enum.sym(v) if @_enum - v - end - - def _set(v) - v = @_enum.int(v) if @_enum - case @_bits - when 32; DFHack.memory_write_int32(@_memaddr, v) - when 16; DFHack.memory_write_int16(@_memaddr, v) - when 8; DFHack.memory_write_int8( @_memaddr, v) - when 64; DFHack.memory_write_int32(@_memaddr, v & 0xffffffff) ; DFHack.memory_write_int32(@memaddr+4, v>>32) - end - end - - def _cpp_init - _set(@_initvalue) if @_initvalue - end -end -class Float < MemStruct - def _get - DFHack.memory_read_float(@_memaddr) - end - - def _set(v) - DFHack.memory_write_float(@_memaddr, v) - end - - def _cpp_init - _set(0.0) - end -end -class BitField < MemStruct - attr_accessor :_shift, :_len, :_enum - def initialize(shift, len, enum=nil) - @_shift = shift - @_len = len - @_enum = enum - end - def _mask - (1 << @_len) - 1 - end - - def _get - v = DFHack.memory_read_int32(@_memaddr) >> @_shift - if @_len == 1 - ((v & 1) == 0) ? false : true - else - v &= _mask - v = @_enum.sym(v) if @_enum - v - end - end - - def _set(v) - if @_len == 1 - # allow 'bit = 0' - v = (v && v != 0 ? 1 : 0) - end - v = @_enum.int(v) if @_enum - v = (v & _mask) << @_shift - - ori = DFHack.memory_read_int32(@_memaddr) & 0xffffffff - DFHack.memory_write_int32(@_memaddr, ori - (ori & ((-1 & _mask) << @_shift)) + v) - end -end - -class Pointer < MemStruct - attr_accessor :_tg - def initialize(tg) - @_tg = tg - end - - def _getp - DFHack.memory_read_int32(@_memaddr) & 0xffffffff - end - - def _get - addr = _getp - return if addr == 0 - @_tg._at(addr)._get - end - - # XXX shaky... - def _set(v) - if v.kind_of?(Pointer) - DFHack.memory_write_int32(@_memaddr, v._getp) - elsif v.kind_of?(MemStruct) - DFHack.memory_write_int32(@_memaddr, v._memaddr) - else - _get._set(v) - end - end - - def inspect - ptr = _getp - if ptr == 0 - 'NULL' - else - cn = '' - cn = @_tg.class.name.sub(/^DFHack::/, '').sub(/^MemHack::/, '') if @_tg - cn = @_tg._glob if cn == 'Global' - "#" - end - end -end -class PointerAry < MemStruct - attr_accessor :_tglen, :_tg - def initialize(tglen, tg) - @_tglen = tglen - @_tg = tg - end - - def _getp(i=0) - delta = (i != 0 ? i*@_tglen : 0) - (DFHack.memory_read_int32(@_memaddr) & 0xffffffff) + delta - end - - def _get - addr = _getp - return if addr == 0 - self - end - - def [](i) - addr = _getp(i) - return if addr == 0 - @_tg._at(addr)._get - end - def []=(i, v) - addr = _getp(i) - raise 'null pointer' if addr == 0 - @_tg._at(addr)._set(v) - end - - def inspect ; ptr = _getp ; (ptr == 0) ? 'NULL' : "#" ; end -end -module Enumerable - include ::Enumerable - attr_accessor :_indexenum - def each ; (0...length).each { |i| yield self[i] } ; end - def inspect - out = '[' - each_with_index { |e, idx| - out << ', ' if out.length > 1 - if out.length > INSPECT_SIZE_LIMIT - out << '...' - break - end - out << "#{_indexenum.sym(idx)}=" if _indexenum - out << e.inspect - } - out << ']' - end - def empty? ; length == 0 ; end - def flatten ; map { |e| e.respond_to?(:flatten) ? e.flatten : e }.flatten ; end -end -class StaticArray < MemStruct - attr_accessor :_tglen, :_length, :_indexenum, :_tg - def initialize(tglen, length, indexenum, tg) - @_tglen = tglen - @_length = length - @_indexenum = indexenum - @_tg = tg - end - def _set(a) - a.each_with_index { |v, i| self[i] = v } - end - def _cpp_init - _length.times { |i| _tgat(i)._cpp_init } - end - alias length _length - alias size _length - def _tgat(i) - @_tg._at(@_memaddr + i*@_tglen) if i >= 0 and i < @_length - end - def [](i) - i = _indexenum.int(i) if _indexenum - i += @_length if i < 0 - _tgat(i)._get - end - def []=(i, v) - i = _indexenum.int(i) if _indexenum - i += @_length if i < 0 - _tgat(i)._set(v) - end - - include Enumerable -end -class StaticString < MemStruct - attr_accessor :_length - def initialize(length) - @_length = length - end - def _get - DFHack.memory_read(@_memaddr, @_length) - end - def _set(v) - DFHack.memory_write(@_memaddr, v[0, @_length]) - end -end - -class StlVector32 < MemStruct - attr_accessor :_tg - def initialize(tg) - @_tg = tg - end - - def length - DFHack.memory_vector32_length(@_memaddr) - end - def size ; length ; end # alias wouldnt work for subclasses - def valueptr_at(idx) - DFHack.memory_vector32_ptrat(@_memaddr, idx) - end - def insert_at(idx, val) - DFHack.memory_vector32_insert(@_memaddr, idx, val) - end - def delete_at(idx) - DFHack.memory_vector32_delete(@_memaddr, idx) - end - - def _set(v) - delete_at(length-1) while length > v.length # match lengthes - v.each_with_index { |e, i| self[i] = e } # patch entries - end - - def _cpp_init - DFHack.memory_vector_init(@_memaddr) - end - - def clear - delete_at(length-1) while length > 0 - end - def [](idx) - idx += length if idx < 0 - @_tg._at(valueptr_at(idx))._get if idx >= 0 and idx < length - end - def []=(idx, v) - idx += length if idx < 0 - if idx >= length - insert_at(idx, 0) - elsif idx < 0 - raise 'invalid idx' - end - @_tg._at(valueptr_at(idx))._set(v) - end - def push(v) - self[length] = v - self - end - def <<(v) ; push(v) ; end - def pop - l = length - if l > 0 - v = self[l-1] - delete_at(l-1) - end - v - end - - include Enumerable - # do a binary search in an ordered vector for a specific target attribute - # ex: world.history.figures.binsearch(unit.hist_figure_id) - def binsearch(target, field=:id) - o_start = 0 - o_end = length - 1 - while o_end >= o_start - o_half = o_start + (o_end-o_start)/2 - obj = self[o_half] - oval = obj.send(field) - if oval == target - return obj - elsif oval < target - o_start = o_half+1 - else - o_end = o_half-1 - end - end - end -end -class StlVector16 < StlVector32 - def length - DFHack.memory_vector16_length(@_memaddr) - end - def valueptr_at(idx) - DFHack.memory_vector16_ptrat(@_memaddr, idx) - end - def insert_at(idx, val) - DFHack.memory_vector16_insert(@_memaddr, idx, val) - end - def delete_at(idx) - DFHack.memory_vector16_delete(@_memaddr, idx) - end -end -class StlVector8 < StlVector32 - def length - DFHack.memory_vector8_length(@_memaddr) - end - def valueptr_at(idx) - DFHack.memory_vector8_ptrat(@_memaddr, idx) - end - def insert_at(idx, val) - DFHack.memory_vector8_insert(@_memaddr, idx, val) - end - def delete_at(idx) - DFHack.memory_vector8_delete(@_memaddr, idx) - end -end -class StlBitVector < StlVector32 - def initialize ; end - def length - DFHack.memory_vectorbool_length(@_memaddr) - end - def insert_at(idx, val) - DFHack.memory_vectorbool_insert(@_memaddr, idx, val) - end - def delete_at(idx) - DFHack.memory_vectorbool_delete(@_memaddr, idx) - end - def [](idx) - idx += length if idx < 0 - DFHack.memory_vectorbool_at(@_memaddr, idx) if idx >= 0 and idx < length - end - def []=(idx, v) - idx += length if idx < 0 - if idx >= length - insert_at(idx, v) - elsif idx < 0 - raise 'invalid idx' - else - DFHack.memory_vectorbool_setat(@_memaddr, idx, v) - end - end -end -class StlString < MemStruct - def _get - DFHack.memory_read_stlstring(@_memaddr) - end - - def _set(v) - DFHack.memory_write_stlstring(@_memaddr, v) - end - - def _cpp_init - DFHack.memory_stlstring_init(@_memaddr) - end -end -class StlDeque < MemStruct - attr_accessor :_tglen, :_tg - def initialize(tglen, tg) - @_tglen = tglen - @_tg = tg - end - # XXX DF uses stl::deque, so to have a C binding we'd need to single-case every - # possible struct size, like for StlVector. Just ignore it for now, deque are rare enough. - def inspect ; "#" ; end -end - -class DfFlagarray < MemStruct - attr_accessor :_indexenum - def initialize(indexenum) - @_indexenum = indexenum - end - def length - DFHack.memory_bitarray_length(@_memaddr) - end - # TODO _cpp_init - def size ; length ; end - def resize(len) - DFHack.memory_bitarray_resize(@_memaddr, len) - end - def [](idx) - idx = _indexenum.int(idx) if _indexenum - idx += length if idx < 0 - DFHack.memory_bitarray_isset(@_memaddr, idx) if idx >= 0 and idx < length - end - def []=(idx, v) - idx = _indexenum.int(idx) if _indexenum - idx += length if idx < 0 - if idx >= length or idx < 0 - raise 'invalid idx' - else - DFHack.memory_bitarray_set(@_memaddr, idx, v) - end - end - - include Enumerable -end -class DfArray < Compound - attr_accessor :_tglen, :_tg - def initialize(tglen, tg) - @_tglen = tglen - @_tg = tg - end - - field(:_ptr, 0) { number 32, false } - field(:_length, 4) { number 16, false } - - def length ; _length ; end - def size ; _length ; end - # TODO _cpp_init - 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 - end - def []=(i, v) - i += _length if i < 0 - _tgat(i)._set(v) - end - def _set(a) - a.each_with_index { |v, i| self[i] = v } - end - - include Enumerable -end -class DfLinkedList < Compound - attr_accessor :_tg - def initialize(tg) - @_tg = tg - end - - field(:_ptr, 0) { number 32, false } - field(:_prev, 4) { number 32, false } - field(:_next, 8) { number 32, false } - - def item - # With the current xml structure, currently _tg designate - # the type of the 'next' and 'prev' fields, not 'item'. - # List head has item == NULL, so we can safely return nil. - - #addr = _ptr - #return if addr == 0 - #@_tg._at(addr)._get - end - - def item=(v) - #addr = _ptr - #raise 'null pointer' if addr == 0 - #@_tg.at(addr)._set(v) - raise 'null pointer' - end - - def prev - addr = _prev - return if addr == 0 - @_tg._at(addr)._get - end - - def next - addr = _next - return if addr == 0 - @_tg._at(addr)._get - end - - include Enumerable - def each - o = self - while o - yield o.item if o.item - o = o.next - end - end - def inspect ; "#" ; end -end - -class Global < MemStruct - attr_accessor :_glob - def initialize(glob) - @_glob = glob - end - def _at(addr) - g = DFHack.const_get(@_glob) - g = DFHack.rtti_getclassat(g, addr) - g.new._at(addr) - end - def inspect ; "#<#{@_glob}>" ; end -end -end # module MemHack - -class BooleanEnum - def self.int(v) ; ((v == true) || (v == 1)) ? 1 : 0 ; end - def self.sym(v) ; (!v || (v == 0)) ? false : true ; end -end - -# cpp rtti name -> rb class -@rtti_n2c = {} -@rtti_c2n = {} - -# cpp rtti name -> vtable ptr -@rtti_n2v = {} -@rtti_v2n = {} - -def self.rtti_n2c ; @rtti_n2c ; end -def self.rtti_c2n ; @rtti_c2n ; end -def self.rtti_n2v ; @rtti_n2v ; end -def self.rtti_v2n ; @rtti_v2n ; end - -# register a ruby class with a cpp rtti class name -def self.rtti_register(cppname, cls) - @rtti_n2c[cppname] = cls - @rtti_c2n[cls] = cppname -end - -# return the ruby class to use for the cpp object at address if rtti info is available -def self.rtti_getclassat(cls, addr) - if addr != 0 and @rtti_c2n[cls] - # rtti info exist for class => cpp object has a vtable - @rtti_n2c[rtti_readclassname(get_vtable_ptr(addr))] || cls - else - cls - end -end - -# try to read the rtti classname from an object vtable pointer -def self.rtti_readclassname(vptr) - unless n = @rtti_v2n[vptr] - n = @rtti_v2n[vptr] = get_rtti_classname(vptr).to_sym - @rtti_n2v[n] = vptr - end - n -end - -# return the vtable pointer from the cpp rtti name -def self.rtti_getvtable(cppname) - unless v = @rtti_n2v[cppname] - v = get_vtable(cppname.to_s) - @rtti_n2v[cppname] = v - @rtti_v2n[v] = cppname if v != 0 - end - v if v != 0 -end - -def self.vmethod_call(obj, voff, a0=0, a1=0, a2=0, a3=0, a4=0) - vmethod_do_call(obj._memaddr, voff, vmethod_arg(a0), vmethod_arg(a1), vmethod_arg(a2), vmethod_arg(a3)) -end - -def self.vmethod_arg(arg) - case arg - when nil, false; 0 - when true; 1 - when Integer; arg - #when String; [arg].pack('p').unpack('L')[0] # raw pointer to buffer - when MemHack::Compound; arg._memaddr - else raise "bad vmethod arg #{arg.class}" - end -end - -end - -# load autogen'd file -require 'hack/ruby-autogen' +# load autogenned file +require './hack/ruby/ruby-autogen-defs' +require './hack/ruby/ruby-autogen' -# load optional user-specified startup file -load 'ruby_custom.rb' if File.exist?('ruby_custom.rb') +# load all modules +Dir['./hack/ruby/*.rb'].each { |m| require m.chomp('.rb') } diff --git a/plugins/ruby/ui.rb b/plugins/ruby/ui.rb new file mode 100644 index 000000000..fbe7ced77 --- /dev/null +++ b/plugins/ruby/ui.rb @@ -0,0 +1,65 @@ +# df user-interface related methods +module DFHack + class << self + # center the DF screen on something + # updates the cursor position if visible + def center_viewscreen(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) + + # compute screen 'map' size (tiles) + menuwidth = ui_menu_width + # ui_menu_width shows only the 'tab' status + menuwidth = 1 if menuwidth == 2 and ui_area_map_width == 2 and cursor.x != -30000 + menuwidth = 2 if menuwidth == 3 and cursor.x != -30000 + w_w = gps.dimx - 2 + w_h = gps.dimy - 2 + case menuwidth + when 1; w_w -= 55 + when 2; w_w -= (ui_area_map_width == 2 ? 24 : 31) + end + + # center view + w_x = x - w_w/2 + w_y = y - w_h/2 + w_z = z + # round view coordinates (optional) + #w_x -= w_x % 10 + #w_y -= w_y % 10 + # crop to map limits + w_x = [[w_x, world.map.x_count - w_w].min, 0].max + w_y = [[w_y, world.map.y_count - w_h].min, 0].max + + self.window_x = w_x + self.window_y = w_y + self.window_z = w_z + + if cursor.x != -30000 + cursor.x, cursor.y, cursor.z = x, y, z + end + end + + # add an announcement + # color = integer, bright = bool + def add_announcement(str, color=nil, bright=nil) + cont = false + while str.length > 0 + rep = Report.cpp_new + rep.color = color if color + rep.bright = ((bright && bright != 0) ? 1 : 0) if bright != nil + rep.year = cur_year + rep.time = cur_year_tick + rep.flags.continuation = cont + cont = true + rep.flags.announcement = true + rep.text = str[0, 73] + str = str[73..-1].to_s + rep.id = world.status.next_report_id + world.status.next_report_id += 1 + world.status.reports << rep + world.status.announcements << rep + world.status.display_timer = 2000 + end + end + end +end diff --git a/plugins/ruby/unit.rb b/plugins/ruby/unit.rb new file mode 100644 index 000000000..e7d4335f0 --- /dev/null +++ b/plugins/ruby/unit.rb @@ -0,0 +1,78 @@ +module DFHack + class << self + # return an Unit + # 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) + 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 + end + elsif what.kind_of?(Integer) + world.units.all.binsearch(what) + elsif what.respond_to?(:x) or what.respond_to?(:pos) + world.units.all.find { |u| same_pos?(what, u) } + else + raise "what what?" + end + end + + # 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 + } + 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] } + } + 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 } + } + end + + def unit_entitypositions(unit) + list = [] + return list if not hf = world.history.figures.binsearch(unit.hist_figure_id) + 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 pa = ent.positions.assignments.binsearch(el.assignment_id) + next if not pos = ent.positions.own.binsearch(pa.position_id) + list << pos + } + list + end + end +end diff --git a/scripts/devel/find-offsets.lua b/scripts/devel/find-offsets.lua index 6b3c31576..6fc127351 100644 --- a/scripts/devel/find-offsets.lua +++ b/scripts/devel/find-offsets.lua @@ -5,6 +5,8 @@ local ms = require 'memscan' local is_known = dfhack.internal.getAddress +local os_type = dfhack.getOSType() + local force_scan = {} for _,v in ipairs({...}) do force_scan[v] = true @@ -20,10 +22,17 @@ MAKE IT RUN CORRECTLY if any data structures changed, thus possibly leading to CRASHES AND/OR PERMANENT SAVE CORRUPTION. -This script should be initially started immediately -after loading the game, WITHOUT first loading a world. -It expects vanilla game configuration, without any -custom tilesets or init file changes. +Finding the first few globals requires this script to be +started immediately after loading the game, WITHOUT +first loading a world. The rest expect a loaded save, +not a fresh embark. Finding current_weather requires +a special save previously processed with devel/prepare-save +on a DF version with working dfhack. + +The script expects vanilla game configuration, without +any custom tilesets or init file changes. Never unpause +the game unless instructed. When done, quit the game +without saving using 'die'. ]] if not utils.prompt_yes_no('Proceed?') then @@ -34,12 +43,12 @@ end local data = ms.get_data_segment() if not data then - error('Could not find data segment') + qerror('Could not find data segment') end print('\nData section: '..tostring(data)) if data.size < 5000000 then - error('Data segment too short.') + qerror('Data segment too short.') end local searcher = ms.DiffSearcher.new(data) @@ -52,6 +61,34 @@ local function validate_offset(name,validator,addr,tname,...) ms.found_offset(name,obj) end +local function zoomed_searcher(startn, end_or_sz) + if force_scan.nozoom then + return nil + end + local sv = is_known(startn) + if not sv then + return nil + end + local ev + if type(end_or_sz) == 'number' then + ev = sv + end_or_sz + if end_or_sz < 0 then + sv, ev = ev, sv + end + else + ev = is_known(end_or_sz) + if not ev then + return nil + end + end + sv = sv - (sv % 4) + ev = ev + 3 + ev = ev - (ev % 4) + if data:contains_range(sv, ev-sv) then + return ms.DiffSearcher.new(ms.MemoryArea.new(sv,ev)) + end +end + local function exec_finder(finder, names) if type(names) ~= 'table' then names = { names } @@ -66,7 +103,7 @@ local function exec_finder(finder, names) if not dfhack.safecall(finder) then if not utils.prompt_yes_no('Proceed with the rest of the script?') then searcher:reset() - error('Quit') + qerror('Quit') end end else @@ -76,7 +113,8 @@ end local ordinal_names = { [0] = '1st entry', - [1] = '2nd entry' + [1] = '2nd entry', + [2] = '3rd entry' } setmetatable(ordinal_names, { __index = function(self,idx) return (idx+1)..'th entry' end @@ -140,8 +178,6 @@ local function find_cursor() return false end -exec_finder(find_cursor, { 'cursor', 'selection_rect', 'gamemode', 'gametype' }) - -- -- Announcements -- @@ -158,8 +194,6 @@ local function find_announcements() dfhack.printerr('Could not find announcements.') end -exec_finder(find_announcements, 'announcements') - -- -- d_init -- @@ -198,8 +232,6 @@ local function find_d_init() dfhack.printerr('Could not find d_init') end -exec_finder(find_d_init, 'd_init') - -- -- gview -- @@ -220,7 +252,82 @@ local function find_gview() dfhack.printerr('Could not find gview') end -exec_finder(find_gview, 'gview') +-- +-- enabler +-- + +local function is_valid_enabler(e) + if not ms.is_valid_vector(e.textures.raws, 4) + or not ms.is_valid_vector(e.text_system, 4) + then + dfhack.printerr('Vector layout check failed.') + return false + end + + return true +end + +local function find_enabler() + -- Data from data/init/colors.txt + local colors = { + 0, 0, 0, 0, 0, 128, 0, 128, 0, + 0, 128, 128, 128, 0, 0, 128, 0, 128, + 128, 128, 0, 192, 192, 192, 128, 128, 128, + 0, 0, 255, 0, 255, 0, 0, 255, 255, + 255, 0, 0, 255, 0, 255, 255, 255, 0, + 255, 255, 255 + } + + for i = 1,#colors do colors[i] = colors[i]/255 end + + local idx, addr = data.float:find_one(colors) + if idx then + validate_offset('enabler', is_valid_enabler, addr, df.enabler, 'ccolor') + return + end + + dfhack.printerr('Could not find enabler') +end + +-- +-- gps +-- + +local function is_valid_gps(g) + if g.clipx[0] < 0 or g.clipx[0] > g.clipx[1] or g.clipx[1] >= g.dimx then + dfhack.printerr('Invalid clipx: ', g.clipx[0], g.clipx[1], g.dimx) + end + if g.clipy[0] < 0 or g.clipy[0] > g.clipy[1] or g.clipy[1] >= g.dimy then + dfhack.printerr('Invalid clipy: ', g.clipy[0], g.clipy[1], g.dimy) + end + + return true +end + +local function find_gps() + print('\nPlease ensure the mouse cursor is not over the game window.') + if not utils.prompt_yes_no('Proceed?', true) then + return + end + + local zone + if os_type == 'windows' or os_type == 'linux' then + zone = zoomed_searcher('cursor', 0x1000) + elseif os_type == 'darwin' then + zone = zoomed_searcher('enabler', 0x1000) + end + zone = zone or searcher + + local w,h = ms.get_screen_size() + + local idx, addr = zone.area.int32_t:find_one{w, h, -1, -1} + if idx then + validate_offset('gps', is_valid_gps, addr, df.graphic, 'dimx') + return + end + + dfhack.printerr('Could not find gps') +end -- -- World @@ -257,8 +364,6 @@ menu, and select different types as instructed below:]], validate_offset('world', is_valid_world, addr, df.world, 'selected_stockpile_type') end -exec_finder(find_world, 'world') - -- -- UI -- @@ -291,8 +396,6 @@ menu, and switch modes as instructed below:]], validate_offset('ui', is_valid_ui, addr, df.ui, 'main', 'mode') end -exec_finder(find_ui, 'ui') - -- -- ui_sidebar_menus -- @@ -319,9 +422,9 @@ end local function find_ui_sidebar_menus() local addr = searcher:find_menu_cursor([[ -Searching for ui_sidebar_menus. Please open the add job -ui of Mason, Craftsdwarfs, or Carpenters workshop, and -select entries in the list:]], +Searching for ui_sidebar_menus. Please switch to 'q' mode, +select a Mason, Craftsdwarfs, or Carpenters workshop, open +the Add Job menu, and move the cursor within:]], 'int32_t', { 0, 1, 2, 3, 4, 5, 6 }, ordinal_names @@ -330,8 +433,6 @@ select entries in the list:]], addr, df.ui_sidebar_menus, 'workshop_job', 'cursor') end -exec_finder(find_ui_sidebar_menus, 'ui_sidebar_menus') - -- -- ui_build_selector -- @@ -366,7 +467,107 @@ number, so when it shows "Min (5000df", it means 50000:]], addr, df.ui_build_selector, 'plate_info', 'unit_min') end -exec_finder(find_ui_build_selector, 'ui_build_selector') +-- +-- init +-- + +local function is_valid_init(i) + -- derived from curses_*.png image sizes presumably + if i.font.small_font_dispx ~= 8 or i.font.small_font_dispy ~= 12 or + i.font.large_font_dispx ~= 10 or i.font.large_font_dispy ~= 12 then + print('Unexpected font sizes: ', + i.font.small_font_dispx, i.font.small_font_dispy, + i.font.large_font_dispx, i.font.large_font_dispy) + if not utils.prompt_yes_no('Ignore?') then + return false + end + end + + return true +end + +local function find_init() + local zone + if os_type == 'windows' then + zone = zoomed_searcher('ui_build_selector', 0x3000) + elseif os_type == 'linux' or os_type == 'darwin' then + zone = zoomed_searcher('d_init', -0x2000) + end + zone = zone or searcher + + local idx, addr = zone.area.int32_t:find_one{250, 150, 15, 0} + if idx then + validate_offset('init', is_valid_init, addr, df.init, 'input', 'hold_time') + return + end + + local w,h = ms.get_screen_size() + + local idx, addr = zone.area.int32_t:find_one{w, h} + if idx then + validate_offset('init', is_valid_init, addr, df.init, 'display', 'grid_x') + return + end + + dfhack.printerr('Could not find init') +end + +-- +-- current_weather +-- + +local function find_current_weather() + print('\nPlease load the save previously processed with prepare-save.') + if not utils.prompt_yes_no('Proceed?', true) then + return + end + + local zone + if os_type == 'windows' then + zone = zoomed_searcher('crime_next_id', 512) + elseif os_type == 'darwin' then + zone = zoomed_searcher('cursor', -64) + elseif os_type == 'linux' then + zone = zoomed_searcher('ui_building_assign_type', -512) + end + zone = zone or searcher + + local wbytes = { + 2, 1, 0, 2, 0, + 1, 2, 1, 0, 0, + 2, 0, 2, 1, 2, + 1, 2, 0, 1, 1, + 2, 0, 1, 0, 2 + } + + local idx, addr = zone.area.int8_t:find_one(wbytes) + if idx then + ms.found_offset('current_weather', addr) + return + end + + dfhack.printerr('Could not find current_weather - must be a wrong save.') +end + +-- +-- ui_menu_width +-- + +local function find_ui_menu_width() + local addr = searcher:find_menu_cursor([[ +Searching for ui_menu_width. Please exit to the main +dwarfmode menu, then use Tab to do as instructed below:]], + 'int8_t', + { 2, 3, 1 }, + { [2] = 'switch to the most usual [mapmap][menu] layout', + [3] = 'hide the menu completely', + [1] = 'switch to the default [map][menu][map] layout' } + ) + ms.found_offset('ui_menu_width', addr) + + -- NOTE: Assume that the vars are adjacent, as always + ms.found_offset('ui_area_map_width', addr+1) +end -- -- ui_selected_unit @@ -395,8 +596,6 @@ into the prompts below:]], ms.found_offset('ui_selected_unit', addr) end -exec_finder(find_ui_selected_unit, 'ui_selected_unit') - -- -- ui_unit_view_mode -- @@ -412,8 +611,6 @@ with 'v', switch the pages as requested:]], ms.found_offset('ui_unit_view_mode', addr) end -exec_finder(find_ui_unit_view_mode, 'ui_unit_view_mode') - -- -- ui_look_cursor -- @@ -434,8 +631,6 @@ and select list entries as instructed:]], ms.found_offset('ui_look_cursor', addr) end -exec_finder(find_ui_look_cursor, 'ui_look_cursor') - -- -- ui_building_item_cursor -- @@ -456,8 +651,6 @@ with many contained items, and select as instructed:]], ms.found_offset('ui_building_item_cursor', addr) end -exec_finder(find_ui_building_item_cursor, 'ui_building_item_cursor') - -- -- ui_workshop_in_add -- @@ -468,7 +661,7 @@ Searching for ui_workshop_in_add. Please activate the 'q' mode, find a workshop without jobs (or delete jobs), and do as instructed below. -NOTE: After first 3 steps resize the game window.]], +NOTE: If not done after first 3-4 steps, resize the game window.]], 'int8_t', { 1, 0 }, { [1] = 'enter the add job menu', @@ -477,8 +670,6 @@ NOTE: After first 3 steps resize the game window.]], ms.found_offset('ui_workshop_in_add', addr) end -exec_finder(find_ui_workshop_in_add, 'ui_workshop_in_add') - -- -- ui_workshop_job_cursor -- @@ -498,8 +689,6 @@ mode, find a workshop with many jobs, and select as instructed:]], ms.found_offset('ui_workshop_job_cursor', addr) end -exec_finder(find_ui_workshop_job_cursor, 'ui_workshop_job_cursor') - -- -- ui_building_in_assign -- @@ -510,7 +699,7 @@ Searching for ui_building_in_assign. Please activate the 'q' mode, select a room building (e.g. a bedroom) and do as instructed below. -NOTE: After first 3 steps resize the game window.]], +NOTE: If not done after first 3-4 steps, resize the game window.]], 'int8_t', { 1, 0 }, { [1] = 'enter the Assign owner menu', @@ -519,8 +708,6 @@ NOTE: After first 3 steps resize the game window.]], ms.found_offset('ui_building_in_assign', addr) end -exec_finder(find_ui_building_in_assign, 'ui_building_in_assign') - -- -- ui_building_in_resize -- @@ -531,7 +718,7 @@ Searching for ui_building_in_resize. Please activate the 'q' mode, select a room building (e.g. a bedroom) and do as instructed below. -NOTE: After first 3 steps resize the game window.]], +NOTE: If not done after first 3-4 steps, resize the game window.]], 'int8_t', { 1, 0 }, { [1] = 'enter the Resize room mode', @@ -540,9 +727,6 @@ NOTE: After first 3 steps resize the game window.]], ms.found_offset('ui_building_in_resize', addr) end -exec_finder(find_ui_building_in_resize, 'ui_building_in_resize') - - -- -- window_x -- @@ -557,8 +741,6 @@ scroll to the LEFT edge, then do as instructed:]], ms.found_offset('window_x', addr) end -exec_finder(find_window_x, 'window_x') - -- -- window_y -- @@ -573,8 +755,6 @@ scroll to the TOP edge, then do as instructed:]], ms.found_offset('window_y', addr) end -exec_finder(find_window_y, 'window_y') - -- -- window_z -- @@ -582,20 +762,177 @@ exec_finder(find_window_y, 'window_y') local function find_window_z() local addr = searcher:find_counter([[ Searching for window_z. Please exit to main dwarfmode menu, -scroll to ground level, then do as instructed below. +scroll to a Z level near surface, then do as instructed below. -NOTE: After first 3 steps resize the game window.]], +NOTE: If not done after first 3-4 steps, resize the game window.]], 'int32_t', -1, "Please press '>' to scroll one Z level down." ) ms.found_offset('window_z', addr) end -exec_finder(find_window_z, 'window_z') +-- +-- cur_year +-- + +local function find_cur_year() + local zone + if os_type == 'windows' then + zone = zoomed_searcher('formation_next_id', 32) + elseif os_type == 'darwin' then + zone = zoomed_searcher('cursor', -32) + elseif os_type == 'linux' then + zone = zoomed_searcher('ui_building_assign_type', -512) + end + if not zone then + dfhack.printerr('Cannot search for cur_year - prerequisites missing.') + return + end + + local yvalue = utils.prompt_input('Please enter current in-game year: ', utils.check_number) + local idx, addr = zone.area.int32_t:find_one{yvalue} + if idx then + ms.found_offset('cur_year', addr) + return + end + + dfhack.printerr('Could not find cur_year') +end + +-- +-- cur_year_tick +-- + +local function find_cur_year_tick() + local zone + if os_type == 'windows' then + zone = zoomed_searcher('artifact_next_id', -32) + else + zone = zoomed_searcher('cur_year', 128) + end + if not zone then + dfhack.printerr('Cannot search for cur_year_tick - prerequisites missing.') + return + end + + local addr = zone:find_counter([[ +Searching for cur_year_tick. Please exit to main dwarfmode +menu, then do as instructed below:]], + 'int32_t', 1, + "Please press '.' to step the game one frame." + ) + ms.found_offset('cur_year_tick', addr) +end + +-- +-- process_jobs +-- + +local function get_process_zone() + if os_type == 'windows' then + return zoomed_searcher('ui_workshop_job_cursor', 'ui_building_in_resize') + elseif os_type == 'linux' or os_type == 'darwin' then + return zoomed_searcher('cur_year', 'cur_year_tick') + end +end + +local function find_process_jobs() + local zone = get_process_zone() or searcher + + local addr = zone:find_menu_cursor([[ +Searching for process_jobs. Please do as instructed below:]], + 'int8_t', + { 1, 0 }, + { [1] = 'designate a building to be constructed, e.g a bed', + [0] = 'step or unpause the game to reset the flag' } + ) + ms.found_offset('process_jobs', addr) +end + +-- +-- process_dig +-- + +local function find_process_dig() + local zone = get_process_zone() or searcher + + local addr = zone:find_menu_cursor([[ +Searching for process_dig. Please do as instructed below:]], + 'int8_t', + { 1, 0 }, + { [1] = 'designate a tile to be mined out', + [0] = 'step or unpause the game to reset the flag' } + ) + ms.found_offset('process_dig', addr) +end + +-- +-- pause_state +-- + +local function find_pause_state() + local zone + if os_type == 'linux' or os_type == 'darwin' then + zone = zoomed_searcher('ui_look_cursor', 32) + elseif os_type == 'windows' then + zone = zoomed_searcher('ui_workshop_job_cursor', 80) + end + zone = zone or searcher + + local addr = zone:find_menu_cursor([[ +Searching for pause_state. Please do as instructed below:]], + 'int8_t', + { 1, 0 }, + { [1] = 'PAUSE the game', + [0] = 'UNPAUSE the game' } + ) + ms.found_offset('pause_state', addr) +end -- --- THE END +-- MAIN FLOW -- -print('Done.') +print('\nInitial globals (need title screen):\n') + +exec_finder(find_cursor, { 'cursor', 'selection_rect', 'gamemode', 'gametype' }) +exec_finder(find_announcements, 'announcements') +exec_finder(find_d_init, 'd_init') +exec_finder(find_gview, 'gview') +exec_finder(find_enabler, 'enabler') +exec_finder(find_gps, 'gps') + +print('\nCompound globals (need loaded world):\n') + +exec_finder(find_world, 'world') +exec_finder(find_ui, 'ui') +exec_finder(find_ui_sidebar_menus, 'ui_sidebar_menus') +exec_finder(find_ui_build_selector, 'ui_build_selector') +exec_finder(find_init, 'init') + +print('\nPrimitive globals:\n') + +exec_finder(find_current_weather, 'current_weather') +exec_finder(find_ui_menu_width, { 'ui_menu_width', 'ui_area_map_width' }) +exec_finder(find_ui_selected_unit, 'ui_selected_unit') +exec_finder(find_ui_unit_view_mode, 'ui_unit_view_mode') +exec_finder(find_ui_look_cursor, 'ui_look_cursor') +exec_finder(find_ui_building_item_cursor, 'ui_building_item_cursor') +exec_finder(find_ui_workshop_in_add, 'ui_workshop_in_add') +exec_finder(find_ui_workshop_job_cursor, 'ui_workshop_job_cursor') +exec_finder(find_ui_building_in_assign, 'ui_building_in_assign') +exec_finder(find_ui_building_in_resize, 'ui_building_in_resize') +exec_finder(find_window_x, 'window_x') +exec_finder(find_window_y, 'window_y') +exec_finder(find_window_z, 'window_z') + +print('\nUnpausing globals:\n') + +exec_finder(find_cur_year, 'cur_year') +exec_finder(find_cur_year_tick, 'cur_year_tick') +exec_finder(find_process_jobs, 'process_jobs') +exec_finder(find_process_dig, 'process_dig') +exec_finder(find_pause_state, 'pause_state') + +print('\nDone. Now add newly-found globals to symbols.xml.') searcher:reset() diff --git a/scripts/devel/prepare-save.lua b/scripts/devel/prepare-save.lua new file mode 100644 index 000000000..781e3b892 --- /dev/null +++ b/scripts/devel/prepare-save.lua @@ -0,0 +1,71 @@ +-- Prepare the current save for use with devel/find-offsets. + +df.global.pause_state = true + +--[[print('Placing anchor...') + +do + local wp = df.global.ui.waypoints + + for _,pt in ipairs(wp.points) do + if pt.name == 'dfhack_anchor' then + print('Already placed.') + goto found + end + end + + local x,y,z = pos2xyz(df.global.cursor) + + if not x then + error("Place cursor at your preferred anchor point.") + end + + local id = wp.next_point_id + wp.next_point_id = id + 1 + + wp.points:insert('#',{ + new = true, id = id, name = 'dfhack_anchor', + comment=(x..','..y..','..z), + tile = string.byte('!'), fg_color = COLOR_LIGHTRED, bg_color = COLOR_BLUE, + pos = xyz2pos(x,y,z) + }) + +::found:: +end]] + +print('Nicknaming units...') + +for i,unit in ipairs(df.global.world.units.active) do + dfhack.units.setNickname(unit, i..':'..unit.id) +end + +print('Setting weather...') + +local wbytes = { + 2, 1, 0, 2, 0, + 1, 2, 1, 0, 0, + 2, 0, 2, 1, 2, + 1, 2, 0, 1, 1, + 2, 0, 1, 0, 2 +} + +for i=0,4 do + for j = 0,4 do + df.global.current_weather[i][j] = (wbytes[i*5+j+1] or 2) + end +end + +local yearstr = df.global.cur_year..','..df.global.cur_year_tick + +print('Cur year and tick: '..yearstr) + +dfhack.persistent.save{ + key='prepare-save/cur_year', + value=yearstr, + ints={df.global.cur_year, df.global.cur_year_tick} +} + +-- Save + +dfhack.run_script('quicksave') + diff --git a/scripts/fix/item-occupancy.lua b/scripts/fix/item-occupancy.lua index b5466b7a8..09c6b3030 100644 --- a/scripts/fix/item-occupancy.lua +++ b/scripts/fix/item-occupancy.lua @@ -116,8 +116,7 @@ if opt then if opt == '--fix' then fix = true else - dfhack.printerr('Invalid option: '..opt) - return + qerror('Invalid option: '..opt) end end diff --git a/scripts/growcrops.rb b/scripts/growcrops.rb new file mode 100644 index 000000000..e3abe54ac --- /dev/null +++ b/scripts/growcrops.rb @@ -0,0 +1,49 @@ +# grow crops in farm plots. ex: growcrops helmet_plump 20 + +material = $script_args[0] +count_max = $script_args[1].to_i +count_max = 100 if count_max == 0 + +# cache information from the raws +@raws_plant_name ||= {} +@raws_plant_growdur ||= {} +if @raws_plant_name.empty? + df.world.raws.plants.all.each_with_index { |p, idx| + @raws_plant_name[idx] = p.id + @raws_plant_growdur[idx] = p.growdur + } +end + +inventory = Hash.new(0) +df.world.items.other[:SEEDS].each { |seed| + next if not seed.flags.in_building + next if not seed.itemrefs.find { |ref| ref._rtti_classname == :general_ref_building_holderst } + next if seed.grow_counter >= @raws_plant_growdur[seed.mat_index] + inventory[seed.mat_index] += 1 +} + +if !material or material == 'help' or material == 'list' + # show a list of available crop types + inventory.sort_by { |mat, c| c }.each { |mat, c| + name = df.world.raws.plants.all[mat].id + puts " #{name} #{c}" + } + +else + + mat = df.match_rawname(material, inventory.keys.map { |k| @raws_plant_name[k] }) + unless wantmat = @raws_plant_name.index(mat) + raise "invalid plant material #{material}" + end + + count = 0 + df.world.items.other[:SEEDS].each { |seed| + next if seed.mat_index != wantmat + next if not seed.flags.in_building + next if not seed.itemrefs.find { |ref| ref._rtti_classname == :general_ref_building_holderst } + next if seed.grow_counter >= @raws_plant_growdur[seed.mat_index] + seed.grow_counter = @raws_plant_growdur[seed.mat_index] + count += 1 + } + puts "Grown #{count} #{mat}" +end diff --git a/scripts/quicksave.lua b/scripts/quicksave.lua index c54cc730b..f4886b35b 100644 --- a/scripts/quicksave.lua +++ b/scripts/quicksave.lua @@ -1,8 +1,7 @@ -- Makes the game immediately save the state. if not dfhack.isMapLoaded() then - dfhack.printerr("World and map aren't loaded.") - return + qerror("World and map aren't loaded.") end local ui_main = df.global.ui.main diff --git a/scripts/removebadthoughts.rb b/scripts/removebadthoughts.rb new file mode 100644 index 000000000..99b742643 --- /dev/null +++ b/scripts/removebadthoughts.rb @@ -0,0 +1,27 @@ +# remove bad thoughts for the selected unit or the whole fort + +# with removebadthoughts -v, dump the bad thoughts types we removed +verbose = $script_args.delete('-v') + +if u = df.unit_find(:selected) + targets = [u] +else + targets = df.unit_citizens +end + +seenbad = Hash.new(0) + +targets.each { |u| + u.status.recent_events.each { |e| + next if DFHack::UnitThoughtType::Value[e.type].to_s[0, 1] != '-' + seenbad[e.type] += 1 + e.age = 0x1000_0000 + } +} + +if verbose + seenbad.sort_by { |k, v| v }.each { |k, v| puts " #{v} #{k}" } +end + +count = seenbad.values.inject(0) { |s, v| s+v } +puts "removed #{count} bad thought#{'s' if count != 1}" diff --git a/scripts/slayrace.rb b/scripts/slayrace.rb new file mode 100644 index 000000000..27b1ba3cc --- /dev/null +++ b/scripts/slayrace.rb @@ -0,0 +1,33 @@ +# slay all creatures of a given race + +race = $script_args[0] + +checkunit = lambda { |u| + u.body.blood_count != 0 and + not u.flags1.dead and + not u.flags1.caged and + not df.map_designation_at(u).hidden +} + +all_races = df.world.units.active.map { |u| + u.race_tg.creature_id if checkunit[u] +}.compact.uniq.sort + +if !race + puts all_races +else + raw_race = df.match_rawname(race, all_races) + raise 'invalid race' if not raw_race + + race_nr = df.world.raws.creatures.all.index { |cr| cr.creature_id == raw_race } + + count = 0 + df.world.units.active.each { |u| + if u.race == race_nr and checkunit[u] + u.body.blood_count = 0 + count += 1 + end + } + + puts "slain #{count} #{raw_race}" +end