Skip to content

Conversation

ShiftyRail
Copy link
Collaborator

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 into SP_X so that VSCode syntax highlighting works better on them.
This changes all instances of duration, cooldown_min, charge_cooldown_max to use the SECONDS define for standardisation and to know at a glance what a spell cooldown is without unnecessary mental arithmetic.
This renames the var charge_max into charge_cooldown_max for clarity. When the var is about a charge counter (or anything else than seconds), the define CHARGES is used to signify the reader that the spell uses a fixed number of charges.

The define is:

#define CHARGES *1

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.

@ShiftyRail ShiftyRail added File Cleanup Cleans up oldcoder messes. Thanks old coders The world may never know why. labels Apr 26, 2025
@ShiftyRail
Copy link
Collaborator Author

I had forgotten a file.

@west3436 west3436 merged commit b67f77b into vgstation-coders:Bleeding-Edge May 6, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
File Cleanup Cleans up oldcoder messes. Thanks old coders The world may never know why.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants