diff options
Diffstat (limited to 'StardewModdingAPI/Extensions.cs')
-rw-r--r-- | StardewModdingAPI/Extensions.cs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/StardewModdingAPI/Extensions.cs b/StardewModdingAPI/Extensions.cs index c504f470..28eb2d7d 100644 --- a/StardewModdingAPI/Extensions.cs +++ b/StardewModdingAPI/Extensions.cs @@ -60,5 +60,10 @@ namespace StardewModdingAPI } return hash; } + + public static T Cast<T>(this object o) where T : StardewValley.Object + { + return o as T; + } } }
\ No newline at end of file |