Don't target Personnel Officer as last step (if all items have been delivered)

pull/3/head v2.23
Liza 2023-12-30 21:54:38 +01:00
parent b0888ba0cb
commit c165b77d8f
Signed by: liza
GPG Key ID: 7199F8D727D55F67
3 changed files with 11 additions and 3 deletions

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework> <TargetFramework>net7.0-windows</TargetFramework>
<Version>2.22</Version> <Version>2.23</Version>
<LangVersion>11.0</LangVersion> <LangVersion>11.0</LangVersion>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>

View File

@ -176,7 +176,15 @@ partial class DeliverooPlugin
LAddon.IsAddonReady(addonExchange)) LAddon.IsAddonReady(addonExchange))
{ {
addonExchange->FireCallbackInt(-1); addonExchange->FireCallbackInt(-1);
CurrentStage = Stage.TargetPersonnelOfficer;
// If we just turned in the final item, there's no need to talk to the personnel officer again
if (_lastTurnInListSize == 1)
{
_turnInWindow.State = false;
CurrentStage = Stage.RequestStop;
}
else
CurrentStage = Stage.TargetPersonnelOfficer;
} }
} }
} }

View File

@ -98,7 +98,7 @@ partial class DeliverooPlugin
int currentListSize = addonGc->ExpertDeliveryList->ListLength; int currentListSize = addonGc->ExpertDeliveryList->ListLength;
if (addonGc->ListEmptyTextNode->AtkResNode.IsVisible || currentListSize == 0) if (addonGc->ListEmptyTextNode->AtkResNode.IsVisible || currentListSize == 0)
{ {
_pluginLog.Information($"No items to turn in {addonGc->ListEmptyTextNode->AtkResNode.IsVisible}, {currentListSize})"); _pluginLog.Information($"No items to turn in ({addonGc->ListEmptyTextNode->AtkResNode.IsVisible}, {currentListSize})");
CurrentStage = Stage.CloseGcSupplyThenStop; CurrentStage = Stage.CloseGcSupplyThenStop;
addon->FireCallbackInt(-1); addon->FireCallbackInt(-1);
return; return;