From 5ef87773bedcc6907a607b69f07578caf08a7de1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sun, 11 Apr 2010 13:03:00 +0200 Subject: [PATCH] Infinite loop fix related to block events. Added traction bench to known buildings. --- dfhack/modules/Maps.cpp | 13 ++++++++--- output/Memory.xml | 48 +++++++++++++++++++++-------------------- 2 files changed, 35 insertions(+), 26 deletions(-) diff --git a/dfhack/modules/Maps.cpp b/dfhack/modules/Maps.cpp index e3e0f48d6..1714b13f8 100644 --- a/dfhack/modules/Maps.cpp +++ b/dfhack/modules/Maps.cpp @@ -378,21 +378,28 @@ try_again: } else { - if(g_pProcess->readClassName(type) == "block_square_event_frozen_liquidst") + string cname = g_pProcess->readClassName(type); + if(ices && cname == "block_square_event_frozen_liquidst") { off.vein_ice_vptr = type; goto try_again; } - else if(g_pProcess->readClassName(type) == "block_square_event_mineralst") + else if(veins && cname == "block_square_event_mineralst") { off.vein_mineral_vptr = type; goto try_again; } - else if(g_pProcess->readClassName(type) == "block_square_event_material_spatterst") + else if(splatter && cname == "block_square_event_material_spatterst") { off.vein_spatter_vptr = type; goto try_again; } + #ifdef DEBUG + else + { + cerr << "unknown vein " << cname << endl; + } + #endif // or it was something we don't care about } } diff --git a/output/Memory.xml b/output/Memory.xml index a35627451..c91b56268 100644 --- a/output/Memory.xml +++ b/output/Memory.xml @@ -2820,8 +2820,20 @@ (for stonesense) ==================================================================== + + + + + + + + + + + + + - @@ -2855,33 +2867,22 @@ - - - - - - - - - - - - - - - - - + + - + + + + + @@ -2893,6 +2894,7 @@ + @@ -2905,11 +2907,11 @@ - - - - + + + +