diff --git a/Memory.xml b/Memory.xml
index 46bb1aa5f..e8f2dd24f 100644
--- a/Memory.xml
+++ b/Memory.xml
@@ -2304,6 +2304,9 @@
+
+
+
cmake
item vector:
diff --git a/library/include/dfhack/modules/Creatures.h b/library/include/dfhack/modules/Creatures.h
index f6d6d0c95..d4dc39be4 100644
--- a/library/include/dfhack/modules/Creatures.h
+++ b/library/include/dfhack/modules/Creatures.h
@@ -597,7 +597,8 @@ namespace DFHack
uint32_t unk_48c; // blood_max?
uint32_t blood_count; // 490
uint32_t unk_494;
- std::vector unk_498;
+ // dirt, grime, FB blood, mud and plain old filth stuck to the poor thing's parts and pieces
+ std::vector contaminants;
std::vector unk_4a8;
std::vector unk_4b8;
uint32_t unk_4c8;
diff --git a/plugins/filltraffic.cpp b/plugins/filltraffic.cpp
index ed8e1130d..c27029a85 100644
--- a/plugins/filltraffic.cpp
+++ b/plugins/filltraffic.cpp
@@ -54,42 +54,45 @@ DFhackCExport command_result filltraffic(DFHack::Core * c, std::vectorcon.print("Flood-fill selected traffic type from the cursor.\n"
- "Traffic Type Codes:\n"
- " H: High Traffic\n"
- " N: Normal Traffic\n"
- " L: Low Traffic\n"
- " R: Restricted Traffic\n"
- "Other Options:\n"
- " X: Fill accross z-levels.\n"
- " B: Include buildings and stockpiles.\n"
- " P: Include empty space.\n"
+ "Traffic Type Codes:\n"
+ "\tH: High Traffic\n"
+ "\tN: Normal Traffic\n"
+ "\tL: Low Traffic\n"
+ "\tR: Restricted Traffic\n"
+ "Other Options:\n"
+ "\tX: Fill accross z-levels.\n"
+ "\tB: Include buildings and stockpiles.\n"
+ "\tP: Include empty space.\n"
+ "Example:\n"
+ "'filltraffic H' - When used in a room with doors,\n"
+ " it will set traffic to HIGH in just that room."
);
return CR_OK;
}
- switch (toupper(params[i][0]))
- {
- case 'H':
- target = traffic_high; break;
- case 'N':
- target = traffic_normal; break;
- case 'L':
- target = traffic_low; break;
- case 'R':
- target = traffic_restricted; break;
- case 'X':
- updown = true; break;
- case 'B':
- checkbuilding = false; break;
- case 'P':
- checkpit = false; break;
- }
+ switch (toupper(params[i][0]))
+ {
+ case 'H':
+ target = traffic_high; break;
+ case 'N':
+ target = traffic_normal; break;
+ case 'L':
+ target = traffic_low; break;
+ case 'R':
+ target = traffic_restricted; break;
+ case 'X':
+ updown = true; break;
+ case 'B':
+ checkbuilding = false; break;
+ case 'P':
+ checkpit = false; break;
+ }
}
- //Initialization.
- c->Suspend();
+ //Initialization.
+ c->Suspend();
- DFHack::Maps * Maps = c->getMaps();
+ DFHack::Maps * Maps = c->getMaps();
DFHack::Gui * Gui = c->getGui();
// init the map
if(!Maps->Start())
@@ -111,17 +114,17 @@ DFhackCExport command_result filltraffic(DFHack::Core * c, std::vectordesignationAt(xy);
- int16_t tt = MCache->tiletypeAt(xy);
- DFHack::t_occupancy oc;
+ DFHack::DFCoord xy ((uint32_t)cx,(uint32_t)cy,cz);
+ MapExtras::MapCache * MCache = new MapExtras::MapCache(Maps);
+
+ DFHack::t_designation des = MCache->designationAt(xy);
+ int16_t tt = MCache->tiletypeAt(xy);
+ DFHack::t_occupancy oc;
- if (checkbuilding)
- oc = MCache->occupancyAt(xy);
+ if (checkbuilding)
+ oc = MCache->occupancyAt(xy);
- source = des.bits.traffic;
+ source = des.bits.traffic;
if(source == target)
{
c->con.printerr("This tile is already set to the target traffic type.\n");
@@ -130,13 +133,13 @@ DFhackCExport command_result filltraffic(DFHack::Core * c, std::vectorcon.printerr("This tile is a wall. Please select a passable tile.\n");
+ if(DFHack::isWallTerrain(tt))
+ {
+ c->con.printerr("This tile is a wall. Please select a passable tile.\n");
delete MCache;
c->Resume();
return CR_FAILURE;
- }
+ }
if(checkpit && DFHack::isOpenTerrain(tt))
{
diff --git a/plugins/stonesense b/plugins/stonesense
index c140ed8d6..8a907d1cb 160000
--- a/plugins/stonesense
+++ b/plugins/stonesense
@@ -1 +1 @@
-Subproject commit c140ed8d6dbe05854ee1499540814d5f358a960a
+Subproject commit 8a907d1cb391aebf8447a5921544517e48af02c7