fix: shop error pane and vehicle storage defaults - #649
Merged
Merged
Conversation
…or uncovered vehicle classes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Two unrelated one-line fixes.
Shop purchase errors highlighted the wrong pane. Three failure paths in
handlePurchase(html/app.js) calledinventoryError(sourceSlot)without thesecond argument, so they fell back to the
inventory = "player"default in thesignature. All three now pass
"other".Uncovered vehicle classes got stash-sized storage.
server/commands.luafellback to
VehicleStorage.default.slotsandVehicleStorage.default.maxWeight, butthe
defaultblock definestrunkSlots,trunkWeight,gloveboxSlotsandgloveboxWeight. Both fallbacks resolved to nil, soOpenInventoryreceived{ slots = nil, maxweight = nil }and landed onConfig.StashSize. Classes 10(Industrial) and 11 (Utility) are the two absent from
config/vehicles.lua, so towtrucks, tractors, trailers, mixers, tippers and flatbeds were getting 2,000kg / 100
slot trunks and gloveboxes instead of the intended 60kg / 35 and 10kg / 5. The
defaultblock had never been reachableRelated issue
No issue.
Change type
Testing
on the shop item in the shop pane.
read 10kg, previously 2,000kg. Opened the trunk; read 60kg, previously 2,000kg.
Compatibility and migration
Behaviour note: Industrial and Utility class vehicles now have correctly sized trunks
and gloveboxes. On servers where players have been using those vehicles, existing
contents may exceed the corrected limit, in which case items are retained but nothing
further can be added until it is back under the cap.
Checklist
fix(scope): ...orfeat(scope): ....