-
-
Notifications
You must be signed in to change notification settings - Fork 156
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
admin: some tweaks #347
admin: some tweaks #347
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good after a brief review. Nice work.
Did you have to setup vscode-lua in some way to stop warning about mta functions? I remember trying similar tools and it wouldn't stop complaining about mta functions. I have a lot of old code to refactor and this tool would be great. Perhaps you could fork it and add MTA specific features such as spotting deprecated functions etc? I can imagine it would be very popular among scripters. |
On the same topic: Dutch showed me this before: https://github.com/Koihik/LuaFormatter and it looks promising perhaps we could configure a standard formating for mtasa resources. Only issues I had with it was that lambda functions would look weird but i think it's configurable. Shall we open a discussion? Maybe it's unecessary but I think it would be worth it. |
Hi, you're right, we could fork that project and make it ignore MTA functions by default, but in my case, I just created a dummy .lua file in the same workspace and declared all MTA functions inside it, then the extension will detect that the function has been declared, but since we haven't added this dummy file to meta.xml, the server will still work fine. Here is the file I was using: This repo still has a lot of that, it would be great if more people could use this technique to help clean it up :) |
Maybe we could use #250 to discuss this subject |
Tested on a high traffic server for over a month, and confirmed to be stable. |
This PR replaces deprecated functions, removes unused code, fixes calls to non-existing functions, etc...
I found them using this, and maybe in the near future, i can send other PRs doing the same to other resources.