解锁时矿架放进机器区;在干净存档走通三项 Web3 升级

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
ZHU MINCHAOandClaude Sonnet 5.5 committed 2026-11-04 20:26:28 +08:00
1 parent 6d9725e825
commit 9ab1e3cbf8
3 files changed
+13 -1

No files matched your search

+11
View File
@@ -635,6 +635,17 @@ namespace Decentralized
/// 放进储藏区(游戏 EmporiumTryAdd 的默认目标,放不下时游戏自己找位置)。
/// 不放柜台:测试中柜台上的物品过夜后会消失(未在正常流程中确认);ModHelper.MoveItemTo* 放满时会静默失败。
/// </summary>
/// <summary>优先放进机器区(machine_bay*)的格子里,没有位置时退回 <see cref="Give"/>。矿架这类机器该待在机器区。</summary>
public static void GiveToMachineBay(GameItem item)
{
GeneralHelper.SetItemOwned(item, true);
var e = EmporiumEntry.Instance;
if (e?.invElement != null)
foreach (var box in e.invElement.childItems.Where(i => i.identifier != null && i.identifier.StartsWith("machine_bay")).ToList())
if (GraphUtils.CanAccept(box, item) && GraphUtils.TryAcceptAll(box, item) == 0) return;
Give(item);
}
public static void Give(GameItem item)
{
GeneralHelper.SetItemOwned(item, true);