Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Foreword
Spellcode is quite advanced and nice to work with. It's also very old, undocumented, non-standardised, and has a lot of confusing var names that I think make it a bit harder for a new guy to know what's going on.
What this does
This adds comments to
spell.dm
explaining what the vars do.This changes the defines in spellcode from
Sp_X
intoSP_X
so that VSCode syntax highlighting works better on them.This changes all instances of
duration
,cooldown_min
,charge_cooldown_max
to use theSECONDS
define for standardisation and to know at a glance what a spell cooldown is without unnecessary mental arithmetic.This renames the var
charge_max
intocharge_cooldown_max
for clarity. When the var is about a charge counter (or anything else than seconds), the defineCHARGES
is used to signify the reader that the spell uses a fixed number of charges.The define is:
So essentially this does nothing.
Why it's good
Keep the codebase a little neater and makes comparing spells a bit easier. There's nothing player-facing in this PR.
How it was tested
I compiled and I checked that I indeed only changed vars and defined for spells. I did not touch the mech spells because I didn't fully understand what they were doing.
Changelog
Not necessary as this is not player-facing.