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

This commit is contained in:
Liza 2023-12-30 21:54:38 +01:00
parent b0888ba0cb
commit 54a89d30be
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">
<PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework>
<Version>2.22</Version>
<Version>2.23</Version>
<LangVersion>11.0</LangVersion>
<Nullable>enable</Nullable>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>

View File

@ -176,6 +176,14 @@ partial class DeliverooPlugin
LAddon.IsAddonReady(addonExchange))
{
addonExchange->FireCallbackInt(-1);
// 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;
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;
addon->FireCallbackInt(-1);
return;