Updated Moonsharp Interpreter, added support for implicit conversions, new types: LuaByte, LuaUShort and LuaFloat added to solve method overload conflict, support for setting UserData metatables, remove LuaUserData.AddCallMetaMethod and moved GUI object to Lua
This commit is contained in:
@@ -8,63 +8,6 @@ namespace Barotrauma
|
||||
{
|
||||
partial class LuaSetup
|
||||
{
|
||||
public class LuaGUI
|
||||
{
|
||||
LuaSetup env;
|
||||
public LuaGUI(LuaSetup _env)
|
||||
{
|
||||
env = _env;
|
||||
}
|
||||
|
||||
public void CreateStaticValues()
|
||||
{
|
||||
RectTransform = UserData.CreateStatic<RectTransform>();
|
||||
LayoutGroup = UserData.CreateStatic<GUILayoutGroup>();
|
||||
Button = UserData.CreateStatic<GUIButton>();
|
||||
TextBox = UserData.CreateStatic<GUITextBox>();
|
||||
Canvas = UserData.CreateStatic<GUICanvas>();
|
||||
Frame = UserData.CreateStatic<GUIFrame>();
|
||||
TextBlock = UserData.CreateStatic<GUITextBlock>();
|
||||
TickBox = UserData.CreateStatic<GUITickBox>();
|
||||
Image = UserData.CreateStatic<GUIImage>();
|
||||
ListBox = UserData.CreateStatic<GUIListBox>();
|
||||
ScrollBar = UserData.CreateStatic<GUIScrollBar>();
|
||||
DropDown = UserData.CreateStatic<GUIDropDown>();
|
||||
|
||||
Screen = UserData.CreateStatic<Screen>();
|
||||
|
||||
Anchor = UserData.CreateStatic<Anchor>();
|
||||
Alignment = UserData.CreateStatic<Alignment>();
|
||||
Pivot = UserData.CreateStatic<Pivot>();
|
||||
}
|
||||
|
||||
public ChatBox ChatBox
|
||||
{
|
||||
get
|
||||
{
|
||||
return GameMain.Client.ChatBox;
|
||||
}
|
||||
}
|
||||
|
||||
public static object Screen;
|
||||
|
||||
public static object RectTransform;
|
||||
public static object LayoutGroup;
|
||||
public static object Button;
|
||||
public static object TextBox;
|
||||
public static object Canvas;
|
||||
public static object Frame;
|
||||
public static object TextBlock;
|
||||
public static object TickBox;
|
||||
public static object Image;
|
||||
public static object ListBox;
|
||||
public static object ScrollBar;
|
||||
public static object DropDown;
|
||||
|
||||
public static object Pivot;
|
||||
public static object Anchor;
|
||||
public static object Alignment;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,7 +121,6 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MonoMod.Common" Version="22.1.20.1" />
|
||||
<PackageReference Include="MoonSharp" Version="2.0.0" />
|
||||
<PackageReference Include="NVorbis" Version="0.8.6" />
|
||||
<PackageReference Include="RestSharp" Version="106.12.0" />
|
||||
</ItemGroup>
|
||||
@@ -130,6 +129,9 @@
|
||||
<Reference Include="0Harmony">
|
||||
<HintPath>..\..\Libraries\0Harmony.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MoonSharp.Interpreter">
|
||||
<HintPath>..\..\Libraries\MoonSharp.Interpreter.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Sourced from https://stackoverflow.com/a/45248069 -->
|
||||
|
||||
@@ -122,7 +122,6 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MonoMod.Common" Version="22.1.20.1" />
|
||||
<PackageReference Include="MoonSharp" Version="2.0.0" />
|
||||
<PackageReference Include="NVorbis" Version="0.8.6" />
|
||||
<PackageReference Include="RestSharp" Version="106.12.0" />
|
||||
</ItemGroup>
|
||||
@@ -138,6 +137,9 @@
|
||||
<Reference Include="0Harmony">
|
||||
<HintPath>..\..\Libraries\0Harmony.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MoonSharp.Interpreter">
|
||||
<HintPath>..\..\Libraries\MoonSharp.Interpreter.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Update="libfreetype6.dylib">
|
||||
|
||||
@@ -128,7 +128,6 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MonoMod.Common" Version="22.1.20.1" />
|
||||
<PackageReference Include="MoonSharp" Version="2.0.0" />
|
||||
<PackageReference Include="NVorbis" Version="0.8.6" />
|
||||
<PackageReference Include="RestSharp" Version="106.12.0" />
|
||||
</ItemGroup>
|
||||
@@ -137,6 +136,9 @@
|
||||
<Reference Include="0Harmony">
|
||||
<HintPath>..\..\Libraries\0Harmony.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MoonSharp.Interpreter">
|
||||
<HintPath>..\..\Libraries\MoonSharp.Interpreter.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user