示例#1
0
 public void OnPreUpdate()
 {
     Inventory_Enhancements.Update(null, null);
     Inventory_Enhancements_UI.Update(null, null);
     CycleAmmo.Update(null, null);
     AutoTrash.Update(null, null);
     Input.Update();
 }
示例#2
0
 public bool OnPlayerGetItem(Player player, Item newItem, out Item resultItem)
 {
     if (AutoTrash.Trash(player, newItem))
     {
         resultItem = new Item();
         return(true);
     }
     resultItem = null;
     return(false);
 }
 public static void Update(object sender, EventArgs e)
 {
     if (Main.gameMenu && !_notInGame)
     {
         _notInGame = true;
     }
     if (Main.gameMenu)
     {
         return;
     }
     if (Input.KeyPressed(Config.CharToXnaKey(config.SortKey)) && Main.keyState.IsKeyUp(Keys.LeftShift) && config.SortHotkeyEnabled)
     {
         AutoTrash.Trash();
         Clean();
         Sort();
     }
     if (Input.KeyPressed(Config.CharToXnaKey(config.HotbarSwapKey)) && config.HotbarSwapKeyEnabled)
     {
         SwapHotbar(config.HotbarCycle);
     }
     if (Input.KeyPressed(Config.CharToXnaKey(config.QSKey)) && config.QSHotkeyEnabled)
     {
         QuickStack();
     }
     if (Input.KeyPressed(Keys.O) && (Main.keyState.IsKeyDown(Keys.LeftShift) || Main.keyState.IsKeyDown(Keys.LeftAlt)))
     {
         if (Main.keyState.IsKeyDown(Keys.LeftShift))
         {
             ReloadConfig();
         }
         else
         {
             LaunchConfigurator();
         }
     }
     if (_notInGame)
     {
         ReloadConfig(true);
     }
     _notInGame = false;
 }
 private static void BtnChestSortClick(object sender, EventArgs e)
 {
     AutoTrash.Trash();
     Inventory_Enhancements.Clean();
     Inventory_Enhancements.Sort();
 }