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

chore: readability and useless code #91

Merged
merged 1 commit into from
Aug 30, 2024
Merged

chore: readability and useless code #91

merged 1 commit into from
Aug 30, 2024

Conversation

mafewtm
Copy link
Member

@mafewtm mafewtm commented Aug 30, 2024

Description

Overall just fixing the god awful readability but more details are below:

  • Add new lines, table separation, indentation, and undo unnecessary one line if statements for readability
  • Use the colon syntax for formatting strings
  • Use if or if not instead of == nil or ~= nil
  • Use cache.resource instead of GetCurrentResourceName()
  • Add name and fix description in manifest
  • Modularize server/finance.lua
  • Fix the requiring of server/finance.lua
  • Remove unnecessary localizations

and probably a few other things too

Checklist

  • I have personally loaded this code into an updated Qbox project and checked all of its functionality.
  • My pull request fits the contribution guidelines & code conventions.

@KostaZx
Copy link

KostaZx commented Aug 30, 2024

good work as always :)

@KostaZx KostaZx merged commit 3b04b3c into main Aug 30, 2024
4 checks passed
Comment on lines -621 to +653
if NetworkDoesEntityExistWithNetworkId(netId) then
return true
end
return NetworkDoesEntityExistWithNetworkId(netId)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've had issues with waitFor and this. I believe it needs to return nil implicitly if the condition hasn't been met. Maybe explicitly would work as well, but the way it was done before will definitely work.

Comment on lines 173 to 175
else
return nil
return
end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

else not needed as default behavior is implied return nil

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.

3 participants