server
server copied to clipboard
🔨 Remove semicolons from Lua
- [x] I have paid attention to this example and will edit again if need be to not break the formatting, or I will be ignored
- [x] I have searched existing issues to see if the issue has already been opened, and I have checked the commit log to see if the issue has been resolved since my server was last updated
- [x] I have read and understood the Contributing Guide
Describe the feature
In the contributing guide, we mention that semicolons shouldn't be used in Lua.
https://github.com/LandSandBoat/server/blob/base/CONTRIBUTING.md#no-semicolons
We can add a CI check for this once we rip out any existing ones.
CTRL+SHIFT+F in /scripts/ reports there are currently 526 in 231 files.
Some of the worst offenders are WS and mobskill blocks like this:
local params = {}
params.numHits = 2
params.ftp100 = 1 params.ftp200 = 1.5 params.ftp300 = 2
params.str_wsc = 0.3 params.dex_wsc = 0.0 params.vit_wsc = 0.0 params.agi_wsc = 0.0 params.int_wsc = 0.0 params.mnd_wsc = 0.0 params.chr_wsc = 0.0
params.crit100 = 0.0 params.crit200 = 0.0 params.crit300 = 0.0
params.canCrit = false
params.acc100 = 0.0 params.acc200= 0.0 params.acc300= 0.0
params.atk100 = 1; params.atk200 = 1; params.atk300 = 1
Thought we'd already stripped them out of existing scripts. Guessing we held off due to some needing replaced with a comma (lua lets us separate fields with either in certain cases) and then forgot.