Replace all raw string comparisons with StringKey, source generator that creates cache keys for all names for Gen7 plugin
All checks were successful
Build / Build (push) Successful in 2m21s
All checks were successful
Build / Build (push) Successful in 2m21s
This commit is contained in:
@@ -21,16 +21,16 @@ public class WeatherBall : Script, IScriptChangeMoveType, IScriptChangeBasePower
|
||||
return;
|
||||
|
||||
if (weather == ScriptUtils.ResolveName<Weather.HarshSunlight>() &&
|
||||
typeLibrary.TryGetTypeIdentifier("fire", out var fireType))
|
||||
typeLibrary.TryGetTypeIdentifier(TypeNames.Fire, out var fireType))
|
||||
typeIdentifier = fireType;
|
||||
else if (weather == ScriptUtils.ResolveName<Weather.Rain>() &&
|
||||
typeLibrary.TryGetTypeIdentifier("water", out var waterType))
|
||||
typeLibrary.TryGetTypeIdentifier(TypeNames.Water, out var waterType))
|
||||
typeIdentifier = waterType;
|
||||
else if (weather == ScriptUtils.ResolveName<Weather.Hail>() &&
|
||||
typeLibrary.TryGetTypeIdentifier("ice", out var iceType))
|
||||
typeLibrary.TryGetTypeIdentifier(TypeNames.Ice, out var iceType))
|
||||
typeIdentifier = iceType;
|
||||
else if (weather == ScriptUtils.ResolveName<Weather.Sandstorm>() &&
|
||||
typeLibrary.TryGetTypeIdentifier("rock", out var rockType))
|
||||
typeLibrary.TryGetTypeIdentifier(TypeNames.Rock, out var rockType))
|
||||
typeIdentifier = rockType;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user