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

Expanded Wizard and Blob crew credits #18980

Merged

Conversation

alicars
Copy link
Contributor

@alicars alicars commented May 17, 2024

About the PR

Adds more antag data to crew credits! This includes the spells wizards purchased and the upgrades the blob picked! As well as some misc text data from blobs I've seen people wonder over in deadchat before.

wizard creds
blob working

The blob data can get a little busy if they were very hungry and bought a lot of repeated upgrades, but I figured that's probably ok? Spiefs credits can also get pretty bloated if they stole a lot.

Code note: Currently, the frame of the wizard icons are all set to 5 via a new variable, spell_animation_frame. We need this since the wizard spells play a very pretty little animation when you first purcahse them, and we'd like to use the last frame of that animation if possible.
I tried for several hours to try to figure out where or how this animation is handled so I could access the frame by code, but gave up after a lot of dead ends. 🙃 Perhaps in the case the animation changed, even a more advanced setup would break regardless...? I don't really know, maybe someone wiser could set me straight
It /does/ seem like there other instances in the codebase of icon2base64 that use hard set, non-1 values, so maybe its fine? I'm not really sure.

Why's this needed?

I just think it's neat to see what people picked!

Changelog

(u)crunchwarp
(+) Blobs and Wizards now have enhanced crew credits!

[FEATURE] [UI]

@keywordlabeler keywordlabeler bot added A-UI Modifies UI in some way. Automatically applied on a change to tgui/ C-Feature A new feature or enhancements to existing features labels May 17, 2024
@alicars
Copy link
Contributor Author

alicars commented May 17, 2024

Testing note: If you need to test the blob change on your own local, you may encounter a problem where no crew credits are generated at all. From what I can tell, this is because no minds are added to minds in gameticker.dm since the blob before spawning its nucleus isn't a mob (?? I guess ??)
I fixed this by editing the 1800 on line 482 of gameticker.dm to be a lower value, like 60, so I didn't have to wait around for this fallback check to happen. Alternatively, just wait a few minutes after spawning and before ending the round
(This seemed to make it work at least, haha. Shouldn't be a problem on live /I think/ because you should have more than one mind on the server if you have a blob. Though I guess if the blob dies very very quickly...)

@github-actions github-actions bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label May 17, 2024
code/modules/antagonists/wizard/wizard.dm Outdated Show resolved Hide resolved
code/modules/antagonists/blob/blob.dm Outdated Show resolved Hide resolved
Copy link
Contributor

@TobleroneSwordfish TobleroneSwordfish left a comment

Choose a reason for hiding this comment

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

One last nitpick

@@ -130,13 +129,14 @@
get_statistics()
// Add the wizard's chosen spells to the crew credits
var/list/purchases = list()
#define SPELL_ANIMATION_FRAME 5 // This will break if ever the wizard spell animations are changed
Copy link
Contributor

Choose a reason for hiding this comment

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

#defines don't go out of scope by themselves so to make a local define like this you need a matching #undef SPELL_ANIMATION_FRAME after it has finished being used.

@alicars
Copy link
Contributor Author

alicars commented May 24, 2024

gasp, the spell animations did change!! went ahead and modified the logic so the cool new soulguard art ( #19099) displays properly
wizard cred take 4 or 5 or something

This also fixes the annoying issue where Soulguard wasn't properly 'centered' like the other spells (you can see this in my original screenshot). That one didn't seem fixable without a bigger edit of the crew credits code from what i could tell so yipee!

@TobleroneSwordfish
Copy link
Contributor

Oh, perfect!

@TobleroneSwordfish TobleroneSwordfish merged commit f166d29 into goonstation:master May 26, 2024
22 checks passed
github-actions bot pushed a commit that referenced this pull request May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-UI Modifies UI in some way. Automatically applied on a change to tgui/ C-Feature A new feature or enhancements to existing features size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants