DengSir / tdBattlePetScript

Battle pet combat script for wow.
MIT License
127 stars 29 forks source link

Allow the script cleaner to change all longform into shortform #12

Open Questionguy663 opened 4 years ago

Questionguy663 commented 4 years ago

Allow the script cleaner to change all longform into shortform automatically

ability = use endif = ei

and so on to eliminate all long form ways of writing and still keep all "old" scripts compatible with the single simplified uniform way of writing scripts

axc450 commented 4 years ago

This might be able to built into the beautifier

patf0rd commented 4 years ago

I think it would've been better if the original author never added both commands because I don't think it would be a good idea to remove ability now with all the existing scripts using it. But replacing it with use with the beautifier looks like a good idea to train people :-p

And personally I don't like the suggested ei beautifying (didn't even know this is a thing, but looking into snippets.lua I also see self/enemy/ally and never knew of ally ;-) ). if/endif feels better for understandability/readability of scripts :-)

axc450 commented 4 years ago

This wouldnt convert into short form - but rather the preferred form. ability, endif, self are all the preferred form. We can deprecate the other functions by posting a warning message in the chat and eventually removing them from the language.

@patf0rd see the new official API for full documentation