small code stuff

Co-Authored-By: David Higueros <111460331+TheDavSmasher@users.noreply.github.com>
This commit is contained in:
AzandDavid Higueros committed 2026-11-11 14:57:30 -05:00
1 parent 45d4793df3
commit a75be40e4a
3 files changed
+8 -5

No files matched your search

@@ -154,9 +154,6 @@ public abstract class AbstractOptionGroup<T> : AbstractOptionGroup
public abstract class AbstractRoleOptionGroup<T> : AbstractOptionGroup<T>
where T : ICustomRole
{
/// <inheritdoc />
public override Type OptionableType => typeof(T);
/// <inheritdoc />
public override MenuCategory ParentMenu => MenuCategory.Roles;
+2 -2
View File
@@ -26,9 +26,9 @@ public abstract class LoadableAsset<T>
/// Converts the <see cref="LoadableAsset{T}"/> into its <typeparamref name="T"/> by loading the asset.
/// </summary>
/// <param name="loadable">The <see cref="LoadableAsset{T}"/> to get the asset from.</param>
public static implicit operator T(LoadableAsset<T> loadable)
public static implicit operator T(LoadableAsset<T>? loadable)
{
return loadable.LoadAsset();
return loadable?.LoadAsset()!;
}
/// <summary>
+6
View File
@@ -96,4 +96,10 @@ public class StateMachineWrapper<T>
_propertyCache[parameterName] = property;
return (TField)property.GetValue(_stateMachine)!;
}
/// <summary>
/// Implicitly converts a state machine wrapper into its <typeparamref name="T"/> instance.
/// </summary>
/// <param name="wrapper">The wrapper.</param>
public static implicit operator T(StateMachineWrapper<T> wrapper) => wrapper.Instance;
}