Support for (un)suppressing weather, adds hook to block weather changes.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-11-19 14:56:29 +01:00
parent ea3bc7ee33
commit b2accd720e
5 changed files with 33 additions and 4 deletions

View File

@@ -22,8 +22,19 @@ namespace PkmnLib::Battling {
virtual ~Battle() = default;
void SetWeather(const ArbUt::StringView& name);
bool SetWeather(const ArbUt::StringView& name);
void ClearWeather();
void SuppressWeather() {
if (_weatherScript != nullptr) {
_weatherScript->Suppress();
}
}
void UnsuppressWeather() {
if (_weatherScript != nullptr) {
_weatherScript->Unsuppress();
}
}
const ArbUt::StringView& GetWeatherName() noexcept {
if (_weatherScript == nullptr)
return ArbUt::StringView::EmptyString();