fix some debug strings

develop
Myk Taylor 2023-03-20 16:05:07 -07:00
parent 16f0d680ef
commit fde51e5948
No known key found for this signature in database
2 changed files with 6 additions and 6 deletions

@ -21,7 +21,7 @@ namespace DFHack {
*/
void OrganicMatLookup::food_mat_by_idx(organic_mat_category::organic_mat_category mat_category, std::vector<int16_t>::size_type food_idx, FoodMat& food_mat) {
DEBUG(log).print("food_lookup: food_idx(%zd) ", food_idx);
DEBUG(log).print("food_lookup: food_idx(%zd)\n", food_idx);
df::world_raws& raws = world->raws;
df::special_mat_table table = raws.mat_table;
int32_t main_idx = table.organic_indexes[mat_category][food_idx];
@ -31,11 +31,11 @@ void OrganicMatLookup::food_mat_by_idx(organic_mat_category::organic_mat_categor
mat_category == organic_mat_category::Eggs) {
food_mat.creature = raws.creatures.all[type];
food_mat.caste = food_mat.creature->caste[main_idx];
DEBUG(log).print("special creature type(%d) caste(%d)", type, main_idx);
DEBUG(log).print("special creature type(%d) caste(%d)\n", type, main_idx);
}
else {
food_mat.material.decode(type, main_idx);
DEBUG(log).print("type(%d) index(%d) token(%s)", type, main_idx, food_mat.material.getToken().c_str());
DEBUG(log).print("type(%d) index(%d) token(%s)\n", type, main_idx, food_mat.material.getToken().c_str());
}
}
std::string OrganicMatLookup::food_token_by_idx(organic_mat_category::organic_mat_category mat_category, std::vector<int16_t>::size_type idx) {
@ -74,7 +74,7 @@ void OrganicMatLookup::food_build_map() {
int16_t OrganicMatLookup::food_idx_by_token(organic_mat_category::organic_mat_category mat_category, const std::string& token) {
df::world_raws& raws = world->raws;
df::special_mat_table table = raws.mat_table;
DEBUG(log).print("food_idx_by_token: ");
DEBUG(log).print("food_idx_by_token:\n");
if (mat_category == organic_mat_category::Fish ||
mat_category == organic_mat_category::UnpreparedFish ||
mat_category == organic_mat_category::Eggs) {

@ -1642,8 +1642,8 @@ bool StockpileSerializer::write_food(StockpileSettings::FoodSet* food) {
food_pair p = food_map((organic_mat_category)mat_category);
if (!p.valid)
continue;
DEBUG(log).print("food: %s\n", traits::key_table[mat_category]);
all = serialize_list_organic_mat(p.set_value, p.stockpile_values, (organic_mat_category)mat_category) && all;
all = serialize_list_organic_mat(p.set_value, p.stockpile_values,
(organic_mat_category)mat_category) && all;
}
return all;