30 lines
617 B
C++
30 lines
617 B
C++
#pragma once
|
|
|
|
#include "CustomizationData.hpp"
|
|
|
|
#include <cstdint>
|
|
|
|
namespace moonwell::customization
|
|
{
|
|
class CustomizationState
|
|
{
|
|
public:
|
|
uint32_t Choice(uint32_t optionId) const
|
|
{
|
|
return optionId == kHornsOption.id ? hornsChoice_ : 0;
|
|
}
|
|
|
|
bool SetChoice(uint32_t optionId, uint32_t choiceId)
|
|
{
|
|
if (optionId != kHornsOption.id || !FindChoice(choiceId)) return false;
|
|
hornsChoice_ = choiceId;
|
|
return true;
|
|
}
|
|
|
|
void Clear() { hornsChoice_ = 0; }
|
|
|
|
private:
|
|
uint32_t hornsChoice_ = 0;
|
|
};
|
|
}
|