diff --git a/Barotrauma/BarotraumaShared/LuaCsDependencies.props b/Barotrauma/BarotraumaShared/LuaCsDependencies.props
index 21439206a..dde50c674 100644
--- a/Barotrauma/BarotraumaShared/LuaCsDependencies.props
+++ b/Barotrauma/BarotraumaShared/LuaCsDependencies.props
@@ -3,6 +3,6 @@
-
+
diff --git a/Barotrauma/BarotraumaShared/SharedSource/LuaCs/LuaCsHook.cs b/Barotrauma/BarotraumaShared/SharedSource/LuaCs/LuaCsHook.cs
index 08729c8f2..344856c46 100644
--- a/Barotrauma/BarotraumaShared/SharedSource/LuaCs/LuaCsHook.cs
+++ b/Barotrauma/BarotraumaShared/SharedSource/LuaCs/LuaCsHook.cs
@@ -91,7 +91,7 @@ namespace Barotrauma
}
// Copied from https://github.com/evilfactory/moonsharp/blob/5264656c6442e783f3c75082cce69a93d66d4cc0/src/MoonSharp.Interpreter/Interop/Converters/ScriptToClrConversions.cs#L79-L99
- private static MethodInfo HasImplicitConversion(Type baseType, Type targetType)
+ private static MethodInfo GetImplicitOperatorMethod(Type baseType, Type targetType)
{
try
{
@@ -101,12 +101,12 @@ namespace Barotrauma
{
if (baseType.BaseType != null)
{
- return HasImplicitConversion(baseType.BaseType, targetType);
+ return GetImplicitOperatorMethod(baseType.BaseType, targetType);
}
if (targetType.BaseType != null)
{
- return HasImplicitConversion(baseType, targetType.BaseType);
+ return GetImplicitOperatorMethod(baseType, targetType.BaseType);
}
return null;
@@ -141,18 +141,18 @@ namespace Barotrauma
il.Call(typeof(object).GetMethod("GetType"));
il.StoreLocal(baseType);
- // IL: var implicitConversionMethod = SigilExtensions.HasImplicitConversion(baseType, );
- var implicitConversionMethod = il.DeclareLocal(typeof(MethodInfo), $"cast_implicitConversionMethod_{guid}");
+ // IL: var implicitOperatorMethod = SigilExtensions.GetImplicitOperatorMethod(baseType, );
+ var implicitOperatorMethod = il.DeclareLocal(typeof(MethodInfo), $"cast_implicitOperatorMethod_{guid}");
il.LoadLocal(baseType);
il.LoadType(targetType);
- il.Call(typeof(SigilExtensions).GetMethod(nameof(HasImplicitConversion), BindingFlags.NonPublic | BindingFlags.Static));
- il.StoreLocal(implicitConversionMethod);
+ il.Call(typeof(SigilExtensions).GetMethod(nameof(GetImplicitOperatorMethod), BindingFlags.NonPublic | BindingFlags.Static));
+ il.StoreLocal(implicitOperatorMethod);
// IL: castValue;
var castValue = il.DeclareLocal(targetType, $"cast_castValue_{guid}");
// IL: if (implicitConversionMethod != null)
- il.LoadLocal(implicitConversionMethod);
+ il.LoadLocal(implicitOperatorMethod);
il.Branch((il) =>
{
// IL: var methodInvokeParams = new object[1];
@@ -168,7 +168,7 @@ namespace Barotrauma
il.StoreElement