diff --git a/Memory.xml b/Memory.xml
index 7126413b5..6bd926e99 100644
--- a/Memory.xml
+++ b/Memory.xml
@@ -872,72 +872,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1223,56 +1160,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- the skill that will be increased at the end of the mood (or not)
-
- seems to be indexes in the list of possible colors defined in the raws for each group
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Incrementaly assigned
- seems to be just like the old occupations
-
-
- like mood materials, 0=bars, 4=stone, 5=wood, 57=cloth, 54=leather ...
- subsubtype ?
- subtype ?
- index of material (for example, 2 is for silver)
- set only for shell / bone mood requirements ?
-
-
@@ -1396,15 +1283,6 @@
-
-
-
-
-
-
-
-
-
@@ -1592,18 +1470,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1799,49 +1665,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- is it a vector?
-
-
-
-
-
-
@@ -2016,28 +1839,6 @@
maybe
-
-
-
-
-
-
-
-
- THIS IS TOTAL BS
- DT: 0x3C4, I don't believe that's OK'
- DT calls it 'states' it seems
- maybe
-
-
-
-
-
-
-
-
-
-
@@ -2263,21 +2064,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -2422,57 +2209,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
- CHMOD
- It's good
-
-
- chmod
-
-
-
-
-
-
-
-
-
-
-
-
@@ -2553,24 +2289,6 @@
-
-
- VERIFY
-
-
-
-
-
-
-
-
-
-
- CHMOD
-
-
-
-
@@ -2920,48 +2638,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- MAYBE, DT SAYS SO
-
-
-
-
-
-
@@ -3074,21 +2750,6 @@
Maybe, possibly.
- Address name="vector" value="0x0940b174"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/library/include/dfhack/modules/Maps.h b/library/include/dfhack/modules/Maps.h
index 3ef0556b8..2a181dc8a 100644
--- a/library/include/dfhack/modules/Maps.h
+++ b/library/include/dfhack/modules/Maps.h
@@ -163,7 +163,7 @@ namespace DFHack
/// bit mask describing how the vein maps to the map block
/// assignment[y] & (1 << x) describes the tile (x, y) of the block
int16_t assignment[16];
- uint32_t flags;
+ uint32_t flags; // FIXME: figure those out
//zilpin: Functions to more conveniently check the assignment flags of the vein.
//Coordinates are given in tile within the block.
diff --git a/library/include/dfhack/modules/Materials.h b/library/include/dfhack/modules/Materials.h
index 5c77659be..229ef3273 100644
--- a/library/include/dfhack/modules/Materials.h
+++ b/library/include/dfhack/modules/Materials.h
@@ -32,6 +32,7 @@ distribution.
#include "dfhack/Export.h"
#include "dfhack/Module.h"
#include "dfhack/Types.h"
+#include "dfhack/BitArray.h"
#include
#include
@@ -42,6 +43,157 @@ namespace DFHack
{
// it's lonely here...
};
+ enum material_flags
+ {
+ MATERIAL_BONE = 0,
+ MATERIAL_MEAT,
+ MATERIAL_EDIBLE_VERMIN,
+ MATERIAL_EDIBLE_RAW,
+ MATERIAL_EDIBLE_COOKED,
+ MATERIAL_UNK5,
+ MATERIAL_ITEMS_METAL,
+ MATERIAL_ITEMS_BARRED,
+
+ MATERIAL_ITEMS_SCALED = 8,
+ MATERIAL_ITEMS_LEATHER,
+ MATERIAL_ITEMS_SOFT,
+ MATERIAL_ITEMS_HARD,
+ MATERIAL_IMPLIES_ANIMAL_KILL,
+ MATERIAL_ALCOHOL_PLANT,
+ MATERIAL_ALCOHOL_CREATURE,
+ MATERIAL_CHEESE_PLANT,
+
+ MATERIAL_CHEESE_CREATURE = 16,
+ MATERIAL_POWDER_MISC_PLANT,
+ MATERIAL_POWDER_MISC_CREATURE,
+ MATERIAL_STOCKPILE_GLOB,
+ MATERIAL_LIQUID_MISC_PLANT,
+ MATERIAL_LIQUID_MISC_CREATURE,
+ MATERIAL_LIQUID_MISC_OTHER,
+ MATERIAL_WOOD,
+
+ MATERIAL_THREAD_PLANT = 24,
+ MATERIAL_TOOTH,
+ MATERIAL_HORN,
+ MATERIAL_PEARL,
+ MATERIAL_SHELL,
+ MATERIAL_LEATHER,
+ MATERIAL_SILK,
+ MATERIAL_SOAP,
+
+ MATERIAL_ROTS = 32,
+ MATERIAL_UNK33,
+ MATERIAL_UNK34,
+ MATERIAL_UNK35,
+ MATERIAL_STRUCTURAL_PLANT_MAT,
+ MATERIAL_SEED_MAT,
+ MATERIAL_LEAF_MAT,
+ MATERIAL_UNK39,
+
+ MATERIAL_ENTERS_BLOOD = 40,
+ MATERIAL_BLOOD_MAP_DESCRIPTOR,
+ MATERIAL_ICHOR_MAP_DESCRIPTOR,
+ MATERIAL_GOO_MAP_DESCRIPTOR,
+ MATERIAL_SLIME_MAP_DESCRIPTOR,
+ MATERIAL_PUS_MAP_DESCRIPTOR,
+ MATERIAL_GENERATES_MIASMA,
+ MATERIAL_IS_METAL,
+
+ MATERIAL_IS_GEM = 48,
+ MATERIAL_IS_GLASS,
+ MATERIAL_CRYSTAL_GLASSABLE,
+ MATERIAL_ITEMS_WEAPON,
+ MATERIAL_ITEMS_WEAPON_RANGED,
+ MATERIAL_ITEMS_ANVIL,
+ MATERIAL_ITEMS_AMMO,
+ MATERIAL_ITEMS_DIGGER,
+
+ MATERIAL_ITEMS_ARMOR = 56,
+ MATERIAL_ITEMS_DELICATE,
+ MATERIAL_ITEMS_SIEGE_ENGINE,
+ MATERIAL_ITEMS_QUERN,
+ MATERIAL_IS_STONE,
+ MATERIAL_UNDIGGABLE,
+ MATERIAL_YARN,
+ MATERIAL_STOCKPILE_GLOB_PASTE,
+
+ MATERIAL_STOCKPILE_GLOB_PRESSED = 64,
+ MATERIAL_DISPLAY_UNGLAZED,
+ MATERIAL_DO_NOT_CLEAN_GLOB,
+ MATERIAL_NO_STONE_STOCKPILE,
+ MATERIAL_STOCKPILE_THREAD_METAL,
+ MATERIAL_UNK69,
+ MATERIAL_UNK70,
+ MATERIAL_UNK71,
+
+ MATERIAL_UNK72 = 72,
+ MATERIAL_UNK73,
+ MATERIAL_UNK74,
+ MATERIAL_UNK75,
+ MATERIAL_UNK76,
+ MATERIAL_UNK77,
+ MATERIAL_UNK78,
+ MATERIAL_UNK79,
+ };
+ enum inorganic_flags
+ {
+ INORGANIC_LAVA = 0,
+ INORGANIC_UNK1,
+ INORGANIC_UNK2,
+ INORGANIC_SEDIMENTARY,
+ INORGANIC_SEDIMENTARY_OCEAN_SHALLOW,
+ INORGANIC_IGNEOUS_INTRUSIVE,
+ INORGANIC_IGNEOUS_EXTRUSIVE,
+ INORGANIC_METAMORPHIC,
+
+ INORGANIC_DEEP_SURFACE = 8,
+ INORGANIC_METAL_ORE, // maybe
+ INORGANIC_AQUIFER,
+ INORGANIC_SOIL,
+ INORGANIC_SOIL_OCEAN,
+ INORGANIC_SOIL_SAND,
+ INORGANIC_SEDIMENTARY_OCEAN_DEEP,
+ INORGANIC_THREAD_METAL, // maybe
+
+ INORGANIC_DEEP = 16, // in general
+ INORGANIC_SOIL2, // more soil?
+ INORGANIC_DEEP_SPECIAL,
+ INORGANIC_UNK19,
+ INORGANIC_UNK20,
+ INORGANIC_UNK21,
+ INORGANIC_UNK22,
+ INORGANIC_UNK23,
+
+ INORGANIC_UNK24 = 24,
+ INORGANIC_WAFERS,
+ INORGANIC_UNK26,
+ INORGANIC_UNK27,
+ INORGANIC_UNK28,
+ INORGANIC_UNK29,
+ INORGANIC_UNK30,
+ INORGANIC_UNK31,
+ };
+ //Environment locations:
+ enum environment_location
+ {
+ ENV_SOIL,
+ ENV_SOIL_OCEAN,
+ ENV_SOIL_SAND,
+ ENV_METAMORPHIC,
+ ENV_SEDIMENTARY,
+ ENV_IGNEOUS_INTRUSIVE,
+ ENV_IGNEOUS_EXTRUSIVE,
+ ENV_ALLUVIAL,
+ };
+ //Inclusion types:
+ enum inclusion_type
+ {
+ INCLUSION_NONE, // maybe
+ INCLUSION_VEIN,
+ INCLUSION_CLUSTER,
+ INCLUSION_CLUSTER_SMALL,
+ INCLUSION_CLUSTER_ONE,
+ };
/// Research by Quietust
struct df_material
{
@@ -99,9 +251,7 @@ namespace DFHack
int32_t COMPRESSIVE_STRAIN_AT_YIELD;
int32_t MAX_EDGE;
int32_t MATERIAL_VALUE;
- // FIXME: needs flagarray implementation!
- uint8_t * flagarray_properties;
- uint32_t flagarray_properties_length;
+ BitArray mat_flags;
int16_t EXTRACT_STORAGE;// (item type)
int16_t BUTCHER_SPECIAL_type;// (item type)
int16_t BUTCHER_SPECIAL_subtype;// (item subtype)
@@ -124,7 +274,7 @@ namespace DFHack
std::string HARDENS_WITH_WATER_2nd_parm;// (e.g. GYPSUM)
std::string HARDENS_WITH_WATER_3rd_parm;// (if you used CREATURE_MAT or PLANT_MAT)
std::vector REACTION_CLASS;
- int8_t TILE;
+ int8_t TILE; // Tile when material is a natural wall
int16_t BASIC_COLOR_foreground;
int16_t BASIC_COLOR_bright;
// what exactly ARE those colors?
@@ -135,7 +285,7 @@ namespace DFHack
int16_t TILE_COLOR_foreground;
int16_t TILE_COLOR_background;
int16_t TILE_COLOR_bright;
- int8_t ITEM_SYMBOL;
+ int8_t ITEM_SYMBOL; // Tile when material is a dug out stone
int16_t POWDER_DYE; // (color token index)
int16_t TEMP_DIET_INFO;// (whatever it means)
std::vector SYNDROME;
@@ -143,19 +293,18 @@ namespace DFHack
std::string PREFIX;
// etc...
};
+
/// Research by Quietust
struct df_inorganic_base
{
std::string Inorganic_ID;
- // FIXME: needs flagarray implementation!
- uint8_t * flagarray_inorganic;
- uint32_t flagarray_inorganic_length;
+ BitArray inorg_flags;
std::vector empty1;
- std::vector METAL_ORE_matID;
- std::vector METAL_ORE_prob;
+ std::vector METAL_ORE_matID; // Vector of indexes of metals produced when ore is smelted
+ std::vector METAL_ORE_prob; // Vector of percent chance of each type of metal being produced on smelting
std::vector empty2;
- std::vector THREAD_METAL_matID;
- std::vector THREAD_METAL_prob;
+ std::vector THREAD_METAL_matID;// Vector of indexes of metals produced when ore undergoes strand extraction
+ std::vector THREAD_METAL_prob; // Vector of percent chance of each type of metal being produced on strand extraction
std::vector unknown_in_1;
std::vector empty3;
std::vector ENVIRONMENT_SPEC_matID;
@@ -183,6 +332,7 @@ namespace DFHack
int32_t value; // Material value
uint8_t wall_tile; // Tile when a natural wall
uint8_t boulder_tile; // Tile when a dug-out stone;
+ bool is_gem;
public:
t_matgloss();
diff --git a/library/modules/Materials.cpp b/library/modules/Materials.cpp
index 55145f002..ccf96babf 100644
--- a/library/modules/Materials.cpp
+++ b/library/modules/Materials.cpp
@@ -103,10 +103,10 @@ bool t_matglossInorganic::isOre()
return true;
return false;
}
-// FIXME: implement properly
+
bool t_matglossInorganic::isGem()
{
- return (wall_tile == 15 && boulder_tile == 7);
+ return is_gem;
}
// good for now
@@ -147,6 +147,7 @@ bool Materials::ReadInorganicMaterials (void)
mat.boulder_tile = orig->ITEM_SYMBOL;
mat.bright = orig->BASIC_COLOR_bright;
mat.fore = orig->BASIC_COLOR_foreground;
+ mat.is_gem = orig->mat_flags.is_set(MATERIAL_IS_GEM);
inorganic.push_back(mat);
}
return true;