mirror of https://github.com/OpenRCT2/OpenRCT2.git
Fix #11914: Notification spam when opening a new scenario
This commit is contained in:
parent
8287ef4e7a
commit
5660a59c18
|
@ -114,8 +114,17 @@ bool NewsItemQueues::IsEmpty() const
|
||||||
*
|
*
|
||||||
* rct2: 0x0066DF32
|
* rct2: 0x0066DF32
|
||||||
*/
|
*/
|
||||||
|
void NewsItemQueues::Clear()
|
||||||
|
{
|
||||||
|
Recent.clear();
|
||||||
|
Archived.clear();
|
||||||
|
}
|
||||||
|
|
||||||
void news_item_init_queue()
|
void news_item_init_queue()
|
||||||
{
|
{
|
||||||
|
gNewsItems.Clear();
|
||||||
|
assert(gNewsItems.IsEmpty());
|
||||||
|
|
||||||
// Throttles for warning types (PEEP_*_WARNING)
|
// Throttles for warning types (PEEP_*_WARNING)
|
||||||
for (auto& warningThrottle : gPeepWarningThrottle)
|
for (auto& warningThrottle : gPeepWarningThrottle)
|
||||||
{
|
{
|
||||||
|
|
|
@ -179,6 +179,11 @@ public:
|
||||||
return N;
|
return N;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void clear() noexcept
|
||||||
|
{
|
||||||
|
front().Type = NEWS_ITEM_NULL;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::array<NewsItem, N> Queue;
|
std::array<NewsItem, N> Queue;
|
||||||
};
|
};
|
||||||
|
@ -190,7 +195,7 @@ struct NewsItemQueues
|
||||||
NewsItem* At(int32_t index);
|
NewsItem* At(int32_t index);
|
||||||
const NewsItem* At(int32_t index) const;
|
const NewsItem* At(int32_t index) const;
|
||||||
bool IsEmpty() const;
|
bool IsEmpty() const;
|
||||||
void Init();
|
void Clear();
|
||||||
uint16_t IncrementTicks();
|
uint16_t IncrementTicks();
|
||||||
NewsItem& Current();
|
NewsItem& Current();
|
||||||
const NewsItem& Current() const;
|
const NewsItem& Current() const;
|
||||||
|
|
Loading…
Reference in New Issue