This commit is contained in:
aozhiwei 2023-07-17 13:10:16 +08:00
parent 76c04da51b
commit f0c63489fd
2 changed files with 7 additions and 0 deletions

View File

@ -81,4 +81,10 @@ namespace mt
return _can_revive; return _can_revive;
} }
bool SafeArea::IsLastGas() const
{
const mt::SafeArea* next_meta = mt::SafeArea::GetById(id() + 1);
return !next_meta || next_meta->type() != type();
}
} }

View File

@ -17,6 +17,7 @@ namespace mt
int GetSmallRingCount() const { return small_ring_count_; } int GetSmallRingCount() const { return small_ring_count_; }
const mt::SafeArea* GetLastArea() const { return last_area_; } const mt::SafeArea* GetLastArea() const { return last_area_; }
bool CanRevive() const; bool CanRevive() const;
bool IsLastGas() const;
static const SafeArea* GetByType(int type); static const SafeArea* GetByType(int type);