Skip to content
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

Part one of the Magic Rework #501

Merged
merged 100 commits into from
Dec 2, 2024

Conversation

Wollywoger
Copy link
Contributor

@Wollywoger Wollywoger commented Jun 11, 2024

Part one: the rework

basically this is a sweeping refactor of the magic system to both heavily favor signals, and to make magic draw from a mob-contained pool, as opposed to the current global system

This is an old branch originally worked on by Niko, who has disengaged with the server.

Since this is out of draft, time to post the fun stuff: new features

  • the entire "uses_mana" system was completely refactored, now you no longer have to do subtypes on subtypes for spells to work, with all still existing subtypes solely existing to cut back on boilerplate code
  • pools are now individualized, with every mob having a mana pool of 200 by default
  • players have a tip in their spells tab to give a general idea how much mana they have
  • several plants now have access to two new chems: quintessence & agnosticine, which affect mana, the aim being to give them a secondary use
  • A new pseudo material is added, volite, currently only accessible from cargo, used to store (and in one special case, generate) mana
  • A new object that lets you see mana pool amounts, the Prototype Mana Lens, can now be printed at any protolathe.
  • A new spell, "Meditate" lets you regen a burst of mana after a decent length do_after, with a 5 minute cooldown
  • Another new utility spell, "Mana Sense" that lets you remotely sense mana on a cooldown
    images:
    image
    Volite Crystals & gemstones
    image
    Mana Lens

@Wollywoger Wollywoger changed the title [DRAFT] [DOES NOT COMPILE] Park one of the Magic Rework [DRAFT] [DOES NOT COMPILE] Part one of the Magic Rework Jun 13, 2024
@Wollywoger
Copy link
Contributor Author

i just found out i've been doing everything wrong for the refactor.
lol, guess i gotta start over

@github-actions github-actions bot added the Merge Conflict Resolve it or perish label Jun 23, 2024
@Wollywoger
Copy link
Contributor Author

ran prelim tests:

Without the PR
on runtimestation init completes in ~19 seconds
Initialized Atoms subsystem within 4.83 seconds!
metastation init completes in ~26 seconds
Initialized Atoms subsystem within 12.64 seconds!

With the PR
runtime station:
init completes in ~16 seconds somehow
Initialized Atoms subsystem within 5.59 seconds!
metastation
complete init in ~27-28 seconds
Initialized Atoms subsystem within 14.98 seconds!

EST gain of 14%-16% seconds on atom init
these are non-conclusive tests as i've only done 2 tests, and still need to rule out deviation fully

Copy link
Owner

@MrMelbert MrMelbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Final review for good

maplestation_modules/code/__DEFINES/magic/magic_defines.dm Outdated Show resolved Hide resolved
maplestation_modules/code/modules/magic/mana/mana.dm Outdated Show resolved Hide resolved
maplestation_modules/code/modules/magic/todo.txt Outdated Show resolved Hide resolved
@Wollywoger Wollywoger requested a review from MrMelbert November 22, 2024 20:53
@MrMelbert MrMelbert merged commit 72eb9b3 into MrMelbert:master Dec 2, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants