Skip to content

Commit 6a52fb3

Browse files
committed
Fix item duplication when canceling manual research
1 parent 777bd53 commit 6a52fb3

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

NebulaPatcher/Patches/Dynamic/GameHistoryData_Patch.cs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -148,18 +148,5 @@ public static bool UnlockTech_Prefix()
148148
//Wait for the authoritative packet for unlocking tech features in multiplayer for clients
149149
return !Multiplayer.IsActive || Multiplayer.Session.LocalPlayer.IsHost || Multiplayer.Session.History.IsIncomingRequest;
150150
}
151-
152-
[HarmonyPrefix]
153-
[HarmonyPatch(nameof(GameHistoryData.RemoveTechInQueue))]
154-
public static void RemoveTechInQueue_Prefix(int index, out int __state)
155-
{
156-
__state = GameMain.history.techQueue[index];
157-
if (Multiplayer.IsActive && Multiplayer.Session.LocalPlayer.IsHost)
158-
{
159-
//we need to know which itemtypes are currently needed for refunds, so trigger refund before cancelling own research
160-
Multiplayer.Session.Network.PlayerManager.SendTechRefundPackagesToClients(__state);
161-
}
162-
Log.Info($"RemoveTechInQueue: remove tech at index {index} with techId { __state}");
163-
}
164151
}
165152
}

0 commit comments

Comments
 (0)