added set_potion_known to player

This commit is contained in:
2024-07-20 15:31:41 -04:00
parent 2e4ccf74c7
commit bf796470cd
2 changed files with 6 additions and 0 deletions

View File

@ -344,3 +344,7 @@ void player_base::inventory::print(output *out, unsigned long known_potions) {
static_cast<int>(curr) + INV_TOP + INV_Y_OFFSET}, static_cast<int>(curr) + INV_TOP + INV_Y_OFFSET},
"->"); "->");
} }
void player_base::set_potion_known(const potion_type &type) {
known_potions |= 1 << type;
}

View File

@ -61,6 +61,8 @@ public:
long_result throw_potion(level *lvl, long_result throw_potion(level *lvl,
std::unique_ptr<potion> p, direction dir); std::unique_ptr<potion> p, direction dir);
void set_potion_known(const potion_type &type);
}; };
#endif #endif