Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: API Rewrite #6

Merged
merged 3 commits into from
Jun 10, 2024
Merged

feat!: API Rewrite #6

merged 3 commits into from
Jun 10, 2024

Conversation

Manason
Copy link
Member

@Manason Manason commented Jun 10, 2024

  • Simplified to minimal options
  • Combined functions that do the same work using different ids into single functions
  • More default values such as generating plate if not passed rather than require it
  • Rely on ox_lib vehicle properties as the source of truth ("mods" column). Ensure newly created vehicles have props and root columns synced which share the same value.
  • Introducing vehicleId into the API as another identifier that can be used
  • Using clearer names, such as 'modelName' instead of 'vehicle' and 'PlayerVehicle' instead of 'VehicleEntity'. Considered shortening the names to leave the PlayerVehicle part implied and just use Get, Delete, & Create, but figure we may add other functions in the API later which also get, delete, or create, leading to confusion.

Marked currently used exports as deprecated. Will delete after qbx_vehicleshop switches off of them.

@Manason Manason requested review from solareon and mafewtm June 10, 2024 09:20
server/main.lua Outdated Show resolved Hide resolved
server/main.lua Show resolved Hide resolved
@Manason Manason requested a review from solareon June 10, 2024 16:39
@solareon solareon linked an issue Jun 10, 2024 that may be closed by this pull request
@Manason Manason merged commit 0a0250b into main Jun 10, 2024
4 checks passed
@Manason Manason deleted the api-rewrite branch June 10, 2024 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inserting a vehicle doesn't check for duplicates
2 participants