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

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

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