Ejemplo n.º 1
0
        private void OnGUIDebugFunctions()
        {
            using (new GUISubScope("Debug", "box"))
            {
                if (Game.Instance.Player.MainCharacter != null)
                {
                    var position = Game.Instance.Player.MainCharacter.Value.Position;
                    var rotation = Game.Instance.Player.MainCharacter.Value.OrientationDirection;
                    var combined = $"{position.x}f, {position.y}f, {position.z}f {rotation.x}f, {rotation.y}f, {rotation.z}f";
                    GL.TextField(combined, falseWidth);
                }
                if (GL.Button("TP Throne Room", falseWidth))
                {
                    GameHelper.EnterToArea(Library.Get <BlueprintAreaEnterPoint>("21fb2ff53d1e2fb4c9b06f067ab89435"), Kingmaker.EntitySystem.Persistence.AutoSaveMode.None);
                }
                if (GL.Button("TP Stone Throne", falseWidth))
                {
                    GameHelper.EnterToArea(Library.Get <BlueprintAreaEnterPoint>("3a9748aba32e1694f80a6cae9b7b3f99"), Kingmaker.EntitySystem.Persistence.AutoSaveMode.None);
                }
                if (GL.Button("TP Guild", falseWidth))
                {
                    GameHelper.EnterToArea(Library.Get <BlueprintAreaEnterPoint>("26b7b66f082f46dd8e9223be3148b5ad"), Kingmaker.EntitySystem.Persistence.AutoSaveMode.None);
                }
                tpEP = GL.TextField(tpEP);
                if (GL.Button("TP EP", falseWidth))
                {
                    if (tpEP != "")
                    {
                        GameHelper.EnterToArea(Library.Get <BlueprintAreaEnterPoint>(tpEP), Kingmaker.EntitySystem.Persistence.AutoSaveMode.None);
                    }
                }

                if (GL.Button("Reload Library", falseWidth))
                {
                    Library = ResourcesLibrary.LibraryObject;
                    Helpers.Load();
                    Helpers.Reload();
                }
                if (GL.Button("Add Stock", falseWidth))
                {
                    Vendors.ProgressionLogic.AddStock();
                }
                if (GL.Button("Spawn Throne Vendors", falseWidth))
                {
                    Vendors.ThroneRoom.HandleAreaLoad();
                }
                if (GL.Button("Despawn Throne Vendors", falseWidth))
                {
                    foreach (KeyValuePair <string, Vendors.Vendor> kvp in Vendors.VendorBlueprints.NewVendors.Where(n => n.Value.AreaId == Vendors.Vendor.Area.ThroneRoom))
                    {
                        kvp.Value.Destroy();
                    }
                }
                if (GL.Button("Recreate Vendors", falseWidth))
                {
                    VendorBlueprints.CreateAllVendors();
                }
                if (GL.Button("Recreate VendorTables", falseWidth))
                {
                    VendorTableBlueprints.CreateVendorTables();
                }
                if (GL.Button("Reset Vendors", falseWidth))
                {
                    VendorBlueprints.ResetPositions();
                }
                if (GL.Button("Respawn Guild", falseWidth))
                {
                    MechantGuild.LibraryLoad(true);
                }
                if (GL.Button("Test getter/setter", falseWidth))
                {
                    BlueprintAbilityResource bar = Library.Get <BlueprintAbilityResource>("17b6158d363e4844fa073483eb2655f8");
                    bar.TestSetGet();
                }
            }
        }