1
0
mirror of https://github.com/soarqin/DSP_Mods.git synced 2025-12-08 22:13:30 +08:00

Dustbin: WIP

This commit is contained in:
2023-10-19 23:07:40 +08:00
parent 932e8c189b
commit 0b16ae8424
3 changed files with 34 additions and 41 deletions

View File

@@ -131,17 +131,7 @@ public static class StoragePatch
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static int DustbinAddItem(int itemId, int count)
{
var fluidArr = Dustbin.IsFluid;
var sandIndex = itemId < fluidArr.Length && fluidArr[itemId]
? 0
: itemId switch
{
1005 => 2,
1003 => 3,
1013 => 4,
_ => 1,
};
var sandsPerItem = Dustbin.SandsFactors[sandIndex];
var sandsPerItem = itemId <= 12000 ? 0 : Dustbin.SandsFactors[itemId];
if (sandsPerItem <= 0) return count;
var player = GameMain.mainPlayer;
var addCount = count * sandsPerItem;