mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-10 09:32:29 +01:00
* Add award plugin apis * Address review feedback (use erase_if, extract AwardAdd method) * Address review feedback (remove redundant comments, make AwardAdd static) * Address review feedback (bump plugin api version, add changelog entry)
54 lines
1.3 KiB
C++
54 lines
1.3 KiB
C++
/*****************************************************************************
|
|
* Copyright (c) 2014-2025 OpenRCT2 developers
|
|
*
|
|
* For a complete list of all authors, please refer to contributors.md
|
|
* Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2
|
|
*
|
|
* OpenRCT2 is licensed under the GNU General Public License version 3.
|
|
*****************************************************************************/
|
|
|
|
#pragma once
|
|
|
|
#include "../SpriteIds.h"
|
|
#include "../localisation/StringIds.h"
|
|
|
|
#include <cstdint>
|
|
#include <vector>
|
|
|
|
enum class AwardType : uint16_t
|
|
{
|
|
MostUntidy,
|
|
MostTidy,
|
|
BestRollerCoasters,
|
|
BestValue,
|
|
MostBeautiful,
|
|
WorstValue,
|
|
Safest,
|
|
BestStaff,
|
|
BestFood,
|
|
WorstFood,
|
|
BestToilets,
|
|
MostDisappointing,
|
|
BestWaterRides,
|
|
BestCustomDesignedRides,
|
|
MostDazzlingRideColours,
|
|
MostConfusingLayout,
|
|
BestGentleRides,
|
|
Count
|
|
};
|
|
static_assert(static_cast<uint32_t>(AwardType::Count) < 32); // Awards are used in a 32bit bitset
|
|
|
|
struct Award
|
|
{
|
|
uint16_t Time;
|
|
AwardType Type;
|
|
};
|
|
|
|
bool AwardIsPositive(AwardType type);
|
|
ImageIndex AwardGetSprite(AwardType type);
|
|
StringId AwardGetText(AwardType type);
|
|
StringId AwardGetNews(AwardType type);
|
|
void AwardGrant(AwardType type);
|
|
void AwardReset();
|
|
void AwardUpdateAll();
|