chore: fix typos [skip changelog]

This commit is contained in:
Horror Proton
2023-10-20 11:36:22 +08:00
parent 7d6ed14536
commit d38f5b2d6b
2 changed files with 9 additions and 9 deletions

View File

@@ -794,10 +794,10 @@ std::vector<asst::Point> asst::RoguelikeBattleTaskPlugin::available_locations(ba
{
std::vector<Point> result;
for (const auto& [loc, tile] : m_normal_tile_info) {
bool position_mathced = tile.buildable == type || tile.buildable == battle::LocationType::All;
position_mathced |= (type == battle::LocationType::All) && (tile.buildable == battle::LocationType::Melee ||
bool position_matched = tile.buildable == type || tile.buildable == battle::LocationType::All;
position_matched |= (type == battle::LocationType::All) && (tile.buildable == battle::LocationType::Melee ||
tile.buildable == battle::LocationType::Ranged);
if (position_mathced &&
if (position_matched &&
tile.key != TilePack::TileKey::DeepSea && // 水上要先放板子才能放人,肉鸽里也没板子,那就当作不可放置
!m_used_tiles.contains(loc) && !m_blacklist_location.contains(loc)) {
result.emplace_back(loc);

View File

@@ -124,14 +124,14 @@ bool asst::RoguelikeShoppingTaskPlugin::_run()
}
if (!goods.roles.empty()) {
bool role_mathced = false;
bool role_matched = false;
for (const auto& role : goods.roles) {
if (map_roles_count[role] != 0) {
role_mathced = true;
role_matched = true;
break;
}
}
if (!role_mathced) {
if (!role_matched) {
Log.trace("Ready to buy", goods.name, ", but there is no such professional operator, skip");
continue;
}
@@ -143,14 +143,14 @@ bool asst::RoguelikeShoppingTaskPlugin::_run()
continue;
}
if (!goods.roles.empty()) {
bool role_mathced = false;
bool role_matched = false;
for (const auto& role : goods.roles) {
if (map_wait_promotion[role] != 0) {
role_mathced = true;
role_matched = true;
break;
}
}
if (!role_mathced) {
if (!role_matched) {
Log.trace("Ready to buy", goods.name, ", but there is no one waiting for promotion, skip");
continue;
}