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

refactor: reorganization, code changes, style fixes #404

Merged
merged 30 commits into from
Oct 3, 2023
Merged

refactor: reorganization, code changes, style fixes #404

merged 30 commits into from
Oct 3, 2023

Conversation

mafewtm
Copy link
Contributor

@mafewtm mafewtm commented Sep 30, 2023

Describe Pull request

This is a major edit for qb-smallresources. A lot of reorganization and style changes have been done. Some style changes involve camelCase edits, proper spacing, shortening of variables where applicable, spelling fixes, and edits for the config.lua. Below notes more significant changes to each aspect of the script.

None of these edits should break anything. Most of these edits are optimization and style changes

  • Binoculars: Simplify the handleZoom function.

  • Carwash: Checks if ped is in vehicle so it doesnt show the option all the time.

  • Cruise: Removal of the unnecessary transformToSpeed function, turn the isTurningOrHandBraking function into a variable within the triggerCruiseControl function, and the addition of cruise: remove toggleCruise event during speed update #384.

  • Discord: Remove the unnecessary conf variable.

  • Fireworks: Reposition the fireworkText function and the simplification and removal of redundant code from the CreateThread.

  • HandsUp: Incorporate some unnecessary local variables into the code.

  • Ignore: Removal of mapname.lua and the addition of the code from that file into this file with a check on the mapText, removal of the unnecessary Config.Stun elements, simplification of the dispatch service/wanted level code to fit with my config edits, and the addition of Melee weapons fix #383 to apply a fix for melee weapons for the pistol whipping thread.

  • NoShuff: Minor refactoring of event code.

  • VehiclePush: Incorporate some unnecessary local variables into the code and an edit to the target.

  • Config: Reduction of Config.Binocular options, grouping of DispatchServices and EnableWantedLevel into AIResponse, removal of Stun, removal of Cruise, pushed disableHandsupControls into HandsUp, grouping of ConsumablesEat, ConsumableDrink, ConsumablesAlcohol, and ConsumablesCustom into Consumables, grouping of ConsumablesFireworks and FireworkTime into Fireworks, compaction of Teleports, and the grouping and compaction of DirtLevel, DefaultPrice, and CarWash into CarWash with the incorporation of Add carwash locations to config #373, and group all disabling options into Config.Disable which takes care of Update config.lua #395.

  • Locales: Minor updates to locales and the addition of Use auto switch locale system #386

  • Logs: Update for tagEveryone, update icon, and the addition of Hotfix: Small fix to get default webhook #344

  • Consumables: Fix emoting when eating or drinking.

  • Recoil: Fix recoil, remove unnecessary items such as throwables and melee weapons, and switch over to weapon names for better readability.

  • Adding tint/component/skins/weapons missing #390: Add missing weapons to recoil, weapdraw, and weapdrop.

  • Crouch: Refactor the code and removed the unfinished prone/crawl feature.

Questions (please complete the following information):

  • Have you personally loaded this code into an updated qbcore project and checked all it's functionality?
  • Does your code fit the style guidelines?
  • Does your PR fit the contribution guidelines?

@GhzGarage GhzGarage merged commit bc5ca7f into qbcore-framework:main Oct 3, 2023
1 of 2 checks passed
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.

2 participants