Support for (un)suppressing weather, adds hook to block weather changes.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user