Feat: Add a hotkey to enable price tooltip #18
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As described in #5 and #11, the game stutters heavily when playing the multiplayer version of SPT, FIKA, more evident with weapons which has a bunch of mods that generates a bunch of calls to the server causing a considerable freeze on the game if you're also playing with people overseas with over a hundred ping, sometimes it being 5 seconds freezes during raids or whatnot (my case). This is very bad and I understand you're looking into a way of fixing this - a price caching approach isn't that bad but for now we really need a band-aid fix to at least put it at bay and have us control when we want the game to actually freeze to check the flea market prices through a hotkey.
In the PR #8, this hotkey was added but it wasn't merged in for some reason and the code got stale and needed to be updated. I went ahead and fixed the conflicts myself through this fork and urge for this to be merged at your earliest convenience.
Furthermore, I'll make a suggestion of how I'd approach the fetching based on my developer knowledge. I'm not that knowledgeable with SPT/FIKA/EFT coding so bear with me:
What key improvements I suggest are:
Task.WhenAll
inFetchWeaponModsFleaPrices
allows all flea price requests to run concurrently..Result
calls prevent blocking the main thread, allowing smoother gameplay.Obviously this depends on adaptation to your mod and some tweaks here and there for actual usage - but this is what I could think of in my current knowledge.