DrakiaXYZ / SPT-Waypoints

SPTarkov Waypoint client plugin
MIT License
17 stars 3 forks source link

Bug: Export points causes Reserve to fail to load #9

Closed Solarint closed 1 year ago

Solarint commented 1 year ago

[Info   :ModulePatch] Creating custom patrol Custom in ZoneBarrack
[Debug  :ModulePatch] Injecting custom PatrolPoint at -267.0186, -10.86893, -76.06432
[Debug  :ModulePatch] Injecting custom PatrolPoint at -262.8676, -10.86893, -65.14
[Debug  :ModulePatch] Injecting custom PatrolPoint at -256.353, -3.262594, -74.30244
[Debug  :ModulePatch] Injecting custom PatrolPoint at -197.8433, -4.792203, -103.5721
[Info   :ModulePatch] Loaded 4 custom waypoints!
[Error  : Unity Log] ArgumentException: An item with the same key has already been added. Key: PatrolReserved
Stack trace:
System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
DrakiaXYZ.Waypoints.Patches.WaypointPatch.ExportWaypoints (System.String exportFile, BotZone[] botZones) (at <e149d58d1c3c446cbb7fe638d1f8f9cc>:0)
DrakiaXYZ.Waypoints.Patches.WaypointPatch.PatchPrefix (BotControllerClass __instance, IBotGame botGame, IBotCreator botCreator, BotZone[] botZones, ISpawnSystem spawnSystem, BotLocationModifier botLocationModifier, System.Boolean botEnable, System.Boolean freeForAll, System.Boolean enableWaveControl, System.Boolean online, System.Boolean haveSectants, System.String openZones) (at <e149d58d1c3c446cbb7fe638d1f8f9cc>:0)
(wrapper dynamic-method) BotControllerClass.DMD<BotControllerClass::Init>(BotControllerClass,IBotGame,IBotCreator,BotZone[],ISpawnSystem,BotLocationModifier,bool,bool,bool,bool,bool,GInterface285,string)
EFT.LocalGame+Class1295.MoveNext () (at <271403381cd84de5968b5716580292e3>:0)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <85d1d3e7744a4a47b5f51883bf40bba2>:0)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
Class310:UnityEngine.ILogHandler.LogException(Exception, Object)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
EFT.BaseLocalGame`1:method_4(BotControllerSettings, ISpawnSystem, Callback)
EFT.Class1288:method_1()
EFT.Struct344:MoveNext()
System.Runtime.CompilerServices.AsyncTaskMethodBuilder:SetResult()
Struct190:MoveNext()
System.Runtime.CompilerServices.AsyncTaskMethodBuilder:SetResult()
Struct188:MoveNext()
System.Runtime.CompilerServices.AsyncTaskMethodBuilder:SetResult()
Struct189:MoveNext()
System.Runtime.CompilerServices.AsyncTaskMethodBuilder:SetResult()
Struct658:MoveNext()
System.Runtime.CompilerServices.AsyncTaskMethodBuilder:SetResult()
Struct664:MoveNext()
System.Runtime.CompilerServices.AsyncTaskMethodBuilder:SetResult()
Struct663:MoveNext()
System.Runtime.CompilerServices.AsyncTaskMethodBuilder:SetResult()
Struct665:MoveNext()
System.Runtime.CompilerServices.AsyncTaskMethodBuilder:SetResult()
Struct666:MoveNext()
System.Runtime.CompilerServices.AsyncTaskMethodBuilder:SetResult()
Struct847:MoveNext()
System.Runtime.CompilerServices.MoveNextRunner:Run()
Struct846:Execute()
Class2920:Execute(Struct846&)
Diz.Jobs.JobScheduler:method_2(List`1&, List`1&, List`1, Interface17)
Diz.Jobs.JobScheduler:method_1(Interface17)
Diz.Jobs.JobScheduler:method_0()
Diz.Jobs.JobScheduler:LateUpdate()

[Error  :UnityExplorer] [Unity] ArgumentException: An item with the same key has already been added. Key: PatrolReserved```
DrakiaXYZ commented 1 year ago

Pretty sure this is fixed in the latest version. Downside being the exported format no longer matches the format used for importing, but it's good enough for debugging purposes