You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bikes cannot be unlocked when they are taken out of a garage.
Reproduction
Own a motorcycle / bicycle (if not, buy one from a dealership, then store it).
Take it out of a garage.
NOTE: In qbx_garages, the config option doorsLocked must be set to true.
Expected behavior
The vehicle should be unlocked upon taken out, while other vehicles, like cars, for example, should be locked, considering doorsLocked is true in qbx_garage's config.
Actual behavior
The motorcycle/bicycle is locked. The owner can't get in the vehicle, and it can't be unlocked due to qbx_vehiclekeys preventing bikes to lock/unlock.
Additional context
I have tried to open a pull request for qbx_garages that adds a config option for vehicle classes that won't be locked upon taken out, but I have been informed that this is not a needed feature. I will link this PR down below.
So the root of the issue is a conflict between qbx_vehiclekeys and qbx_garages. qbx_garages uses the native to lock vehicles by default, assuming that all vehicles should have locks. However qbx_vehiclekeys makes some vehicles not have a lock like bikes.
qbx_garages seems wrong to blindly lock any vehicle being spawned. qbx_vehiclekeys is the source of truth on which vehicles have locks and which do not. Some possible solutions:
modify qbx_garages to add a dependency on qbx_vehiclekeys, and do the locking through API call which will exempt the same vehicles that qbx_vehiclekeys exempts
remove the feature from qbx_garages altogether; instead trigger an event that qbx_vehiclekeys can consume to lock the vehicle, putting business logic of what to do when a vehicle is spawned from a garage on qbx_vehiclekeys.
The choice here comes down to whether garages should depend on vehiclekeys or whether vehiclekeys should depend on garages. I lean towards number 1 as it is the same solution we used in core.
I can additionally add a workaround to qbx_vehiclekeys, which allows you to unlock vehicles that are always unlocked in the configuration
While that would help, this bug still exists where vehicles that aren't supposed to have locks spawned locked because a different resource is doing so bypassing qbx_vehiclekeys. I think the best thing to do is to update qbx_garages to check if qbx_vehiclekeys is running and if so, to call it to lock rather than native.
Summary
Bikes cannot be unlocked when they are taken out of a garage.
Reproduction
NOTE: In qbx_garages, the config option
doorsLocked
must be set to true.Expected behavior
The vehicle should be unlocked upon taken out, while other vehicles, like cars, for example, should be locked, considering
doorsLocked
is true in qbx_garage's config.Actual behavior
The motorcycle/bicycle is locked. The owner can't get in the vehicle, and it can't be unlocked due to qbx_vehiclekeys preventing bikes to lock/unlock.
Additional context
I have tried to open a pull request for qbx_garages that adds a config option for vehicle classes that won't be locked upon taken out, but I have been informed that this is not a needed feature. I will link this PR down below.
Qbox-project/qbx_garages#121
Current Version
v1.0.0, latest commit: 91778f2
Custom Resources
None that interfere with this.
The text was updated successfully, but these errors were encountered: