@@ -105,9 +105,8 @@ internal static int StackItems(Player player, Inventory fromInventory, Inventory
105105 bool flag = QuickerStackPlugin . CoalesceTrophies && list2 . Count != 0 ;
106106 int num = 0 ;
107107 foreach ( ItemDrop . ItemData itemData in list )
108- {
109- if ( ! itemData . IsEquipable ( ) &&
110- itemData . m_shared . m_maxStackSize != 1 &&
108+ {
109+ if ( itemData . m_shared . m_maxStackSize != 1 &&
111110 ( ! QuickerStackPlugin . IgnoreAmmo || itemData . m_shared . m_itemType != ItemDrop . ItemData . ItemType . Ammo ) &&
112111 ( ! QuickerStackPlugin . IgnoreConsumable || itemData . m_shared . m_itemType != ItemDrop . ItemData . ItemType . Consumable ) &&
113112 ! playerConfig . IsMarked ( itemData . m_gridPos ) &&
@@ -166,7 +165,6 @@ public static void reportResult(Player player, int movedCount)
166165
167166 private static void StackToMany ( Player player , List < Container > containers )
168167 {
169- var watch = System . Diagnostics . Stopwatch . StartNew ( ) ;
170168 Inventory inventory = player . GetInventory ( ) ;
171169 int num = 0 ;
172170 foreach ( Container container in containers )
@@ -185,25 +183,19 @@ private static void StackToMany(Player player, List<Container> containers)
185183 }
186184 }
187185 QuickerStackPlugin . reportResult ( player , num ) ;
188- watch . Stop ( ) ;
189- var elapsedMs = watch . ElapsedMilliseconds ;
190- Debug . Log ( String . Format ( "DoQuickStack() in {0}ms." , elapsedMs ) ) ;
191186 }
192187
193188 public static void DoQuickStack ( Player player )
194189 {
195- Debug . Log ( "DoQuickStack() " ) ;
190+ Debug . Log ( "DoQuickStack" ) ;
196191 if ( player . IsTeleporting ( ) )
197192 return ;
198193
199- var watch = System . Diagnostics . Stopwatch . StartNew ( ) ;
200194 List < Container > list = QuickerStackPlugin . FindNearbyContainers ( player . transform . position ) ;
201- watch . Stop ( ) ;
202- var elapsedMs = watch . ElapsedMilliseconds ;
203- Debug . Log ( String . Format ( "Found nearby containers in {0}ms." , elapsedMs ) ) ;
204195 if ( list . Count != 0 )
205196 {
206197 player . Message ( MessageHud . MessageType . Center , String . Format ( "found {0} containers in range" , list . Count ) ) ;
198+ //StackToMany(player, list);
207199 Thread stackThread = new Thread ( ( ) => QuickerStackPlugin . StackToMany ( player , list ) ) ;
208200 stackThread . Start ( ) ;
209201 }
0 commit comments