This commit is contained in:
Tourswen
2025-11-04 00:45:25 +08:00
parent 0c02135040
commit 9905782298
36 changed files with 1851 additions and 1238 deletions

View File

@@ -35,16 +35,17 @@ namespace WulaFallenEmpire
breakdownableComp = GetComp<CompBreakdownable>();
}
// 在 Building_GlobalWorkTable 类中修改 Tick 方法
protected override void Tick()
{
base.Tick();
// 改为每tick处理以实现精确的工作量控制
if (Find.TickManager.TicksGame % ProcessInterval == 0 &&
// 修复改为每60 ticks1秒处理一次避免每tick处理导致的精度问题
if (Find.TickManager.TicksGame % 60 == 0 &&
Find.TickManager.TicksGame != lastProcessTick)
{
lastProcessTick = Find.TickManager.TicksGame;
if (CurrentlyUsableForGlobalBills())
{
globalOrderStack.ProcessOrders();
@@ -84,7 +85,7 @@ namespace WulaFallenEmpire
action = StartAirdropTargeting,
defaultLabel = "WULA_AirdropProducts".Translate(),
defaultDesc = "WULA_AirdropProductsDesc".Translate(),
icon = ContentFinder<Texture2D>.Get("UI/Commands/Airdrop"),
icon = ContentFinder<Texture2D>.Get("Wula/UI/Commands/WULA_AirdropProducts"),
disabledReason = "WULA_CannotAirdrop".Translate()
};
}