autopopulate flea offer price; update flea offer price when bulk; ammobox unload in place fixes

This commit is contained in:
Tyfon
2024-07-23 16:46:45 -07:00
parent 35d54c282e
commit 48faa97082
7 changed files with 207 additions and 11 deletions

View File

@@ -1,5 +1,7 @@
using EFT.InventoryLogic;
using EFT.UI.DragAndDrop;
using EFT.UI.Ragfair;
using System;
using System.Runtime.CompilerServices;
using UnityEngine;
@@ -87,3 +89,16 @@ public static class ExtraItemViewStatsProperties
public static void SetHideMods(this ItemViewStats itemViewStats, bool value) => properties.GetOrCreateValue(itemViewStats).HideMods = value;
}
public static class ExtraItemMarketPricesPanelProperties
{
private static readonly ConditionalWeakTable<ItemMarketPricesPanel, Properties> properties = new();
private class Properties
{
public Action OnMarketPricesCallback = null;
}
public static Action GetOnMarketPricesCallback(this ItemMarketPricesPanel panel) => properties.GetOrCreateValue(panel).OnMarketPricesCallback;
public static Action SetOnMarketPricesCallback(this ItemMarketPricesPanel panel, Action handler) => properties.GetOrCreateValue(panel).OnMarketPricesCallback = handler;
}