From 370ee8f1b3c48982f92c089cfce8e9a8c1bcc6f8 Mon Sep 17 00:00:00 2001 From: Evil Factory <36804725+evilfactory@users.noreply.github.com> Date: Tue, 28 Dec 2021 15:16:43 -0300 Subject: [PATCH] convert UInt64 type to string, to avoid loosing precision with SteamIDs --- .../SharedSource/Lua/LuaCustomConverters.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Barotrauma/BarotraumaShared/SharedSource/Lua/LuaCustomConverters.cs b/Barotrauma/BarotraumaShared/SharedSource/Lua/LuaCustomConverters.cs index 0b4969ed6..459852ff3 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/Lua/LuaCustomConverters.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/Lua/LuaCustomConverters.cs @@ -51,6 +51,12 @@ namespace Barotrauma { return new Pair((JobPrefab)v.Table.Get(1).ToObject(), (int)v.Table.Get(2).CastToNumber()); }); + + Script.GlobalOptions.CustomConverters.SetClrToScriptCustomConversion( + (Script script, UInt64 v) => + { + return DynValue.NewString(v.ToString()); + }); } public static void RegisterAction()