Doing both lookups in parallel saves around 1 ms in the happy case (20% of baseline time), and in case nonce does not match, the error is simply raised as per usual with the inventory request being lightweight enough to be negligible.
Noteworthy that this reasoning doesn't really work for other controllers because in the error case, the inventory request would still be quite significant, even if the HTTP request itself would still finish quickly.
Reviewed-on: OpenWF/SpaceNinjaServer#2359
Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com>
Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
By calling JSON.parse before setting everything to undefined, we don't lose the old config in case of an error.
Reviewed-on: OpenWF/SpaceNinjaServer#2353
Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com>
Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
The error message had regressed in the case where connection could not be established.
Reviewed-on: OpenWF/SpaceNinjaServer#2346
Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com>
Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
Adding "wsid" to uniquely identify a given tab (by the websocket connection) so we can avoid needless refreshing on the same tab.
Closes#2316
Reviewed-on: OpenWF/SpaceNinjaServer#2325
Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com>
Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
Daily first win is kinda weird because the client doesn't even seem to acknowledge it.
Also fixed missionCompletionCredits being added to inventory inconsistently (sometimes once, sometimes twice).
Closes#1086Closes#2322
Reviewed-on: OpenWF/SpaceNinjaServer#2324
Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com>
Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
Permanent offers were not satisfying bin constraints
Reviewed-on: OpenWF/SpaceNinjaServer#2326
Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com>
Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
cryotic amount should not be multiplied by 3000...
Reviewed-on: OpenWF/SpaceNinjaServer#2321
Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com>
Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
With the 'IsNew' flag + webui delete item, this is quite easy to trigger and shouldn't prevent the other changes from going through.
Reviewed-on: OpenWF/SpaceNinjaServer#2320
Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com>
Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
Re #2312. Will need some follow-up considerations for circuit game modes.
Reviewed-on: OpenWF/SpaceNinjaServer#2318
Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com>
Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
It's just a lot snappier + works flawlessly under Bun.
Reviewed-on: OpenWF/SpaceNinjaServer#2315
Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com>
Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
I saw "trash their traps" show up twice on Eudico in different tiers, I don't think that's correct.
Reviewed-on: OpenWF/SpaceNinjaServer#2273
Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com>
Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
I'm not sure if this was always this way and I was just really confused when I initially implemented this, or if this was changed in a later version, but at least now it seems to be tracking everything correctly for 38.6.0.
Closes#2264
Reviewed-on: OpenWF/SpaceNinjaServer#2265
Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com>
Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>