コード例 #1
0
        private void OnGUIThroneRoom()
        {
            using (new GUISubScope(Local["Menu_Tab_TRV"], "box"))
            {
                if (!HamHelpers.InThroneRoom())
                {
                    GL.Label(Local["Menu_Txt_NotInThrone"]);
                    return;
                }

                GL.Label(Local["Menu_Lbl_MoveVendor"], MenuHelpers.LabelStyleWrap, falseWidth);

                foreach (KeyValuePair <string, Vendors.Vendor> kvp in Vendors.VendorBlueprints.NewVendors.Where(n => n.Value.AreaId == Vendors.Vendor.Area.ThroneRoom))
                {
                    OnGUIVendors(kvp.Value);
                }

                GL.Label(Local["Menu_Txt_CleanOld"]);
                if (GL.Button(Local["Menu_Btn_CleanOld"], MenuHelpers.ButtonStyle, falseWidth))
                {
                    foreach (UnitEntityData unit in Game.Instance.State.Units)
                    {
                        if (oldVendors.Contains(unit.Blueprint.AssetGuid))
                        {
                            unit.Destroy();
                        }
                    }
                }
                GUI.enabled = true;
            }
        }
コード例 #2
0
 public static void HandleSceneLoaded()
 {
     Main.Mod.Debug(MethodBase.GetCurrentMethod());
     InThroneRoom = HamHelpers.InThroneRoom();
     if ((InGuild = Game.Instance.CurrentlyLoadedArea.AssetGuid.Equals(merchGuildId)))
     {
         LibraryLoad();
     }
 }
コード例 #3
0
 public static bool NotInThroneRoomMessage()
 {
     if (!HamHelpers.InThroneRoom())
     {
         GL.Label(Main.Local["Menu_Txt_NotInThrone"]);
         return(false);
     }
     else
     {
         return(true);
     }
 }
コード例 #4
0
 private void OnGUIMerchant()
 {
     using (new GUISubScope("Merchant Guild", "box"))
     {
         GUI.enabled = (HamHelpers.InThroneRoom() || HamHelpers.InGuildHall());
         GL.Label(Local["Menu_Lbl_Teleport"], MenuHelpers.LabelStyleWrap, falseWidth);
         if (GL.Button(Local["Menu_Btn_Teleport"], MenuHelpers.ButtonStyle, falseWidth))
         {
             Vendors.MechantGuild.TP();
         }
         GUI.enabled = true;
     }
 }