AcManager.Tools.Miscellaneous.LuaHelper.GetExtended C# (CSharp) 메소드

GetExtended() 개인적인 메소드

private GetExtended ( ) : Script
리턴 Script
        public static Script GetExtended() {
            try {
                if (!_registered) {
                    UserData.RegisterAssembly();
                    _registered = true;
                }

                var script = new Script();

                script.Globals["log"] = (Action<object[]>)Log;
                script.Globals["numutils"] = new Table(script) {
                    ["numvalue"] = (Func<string, double>)GetNumberValue
                };
                script.Globals["strutils"] = new Table(script) {
                    ["equals"] = (Func<string, string, bool>)CompareStrings,
                    ["equals_i"] = (Func<string, string, bool>)CompareStringsIgnoringCase
                };

                return script;
            } catch (Exception e) {
                Logging.Warning("Can’t initialize: " + e);
                return null;
            }
        }
    }