Fix ore/gem sorting.

develop
Petr Mrázek 2011-07-22 03:00:56 +02:00
parent 7325808c98
commit e00a4e8888
3 changed files with 13 additions and 22 deletions

@ -123,7 +123,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 <std::string> REACTION_CLASS;
int16_t TILE;
int8_t TILE;
int16_t BASIC_COLOR_foreground;
int16_t BASIC_COLOR_bright;
// what exactly ARE those colors?
@ -134,7 +134,7 @@ namespace DFHack
int16_t TILE_COLOR1;
int16_t TILE_COLOR2;
int16_t TILE_COLOR3;
int16_t ITEM_SYMBOL;
int8_t ITEM_SYMBOL;
int16_t POWDER_DYE; // (color token index)
int16_t TEMP_DIET_INFO;// (whatever it means)
std::vector <t_syndrome *> SYNDROME;
@ -179,8 +179,8 @@ namespace DFHack
uint8_t bright;
int32_t value; // Material value
uint16_t wall_tile; // Tile when a natural wall
uint16_t boulder_tile; // Tile when a dug-out stone;
uint8_t wall_tile; // Tile when a natural wall
uint8_t boulder_tile; // Tile when a dug-out stone;
public:
t_matgloss();

@ -156,28 +156,19 @@ t_matgloss::t_matgloss()
wall_tile = 0;
boulder_tile = 0;
}
// FIXME: implement properly
bool t_matglossInorganic::isOre()
{
/*
if (ore_chances != NULL && !ore_chances->empty())
{
if ( (*ore_chances)[0] > 0)
return true;
}
if (strand_chances != NULL && !strand_chances->empty())
{
if ( (*strand_chances)[0] > 0)
return true;
}
*/
if (!ore_chances.empty())
return true;
if (!strand_chances.empty())
return true;
return false;
}
// FIXME: implement properly
bool t_matglossInorganic::isGem()
{
//return (wall_tile == 15 && boulder_tile == 7);
return (wall_tile == 15 && boulder_tile == 7);
}
// good for now

@ -94,10 +94,10 @@ void printVeins(DFHack::Console & con, MatMap &mat_map,
{
DFHack::t_matglossInorganic &gloss = mats->inorganic[it->first];
if (gloss.isOre())
ores[it->first] = it->second;
else if (gloss.isGem())
if (gloss.isGem())
gems[it->first] = it->second;
else if (gloss.isOre())
ores[it->first] = it->second;
else
rest[it->first] = it->second;
}