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

replaces ". = ..()" parent calls with "return ..()" where applicable without changing surrounding code. Forces some abnormality procs to be called by children #1527

Merged
merged 2 commits into from
Oct 16, 2023

Conversation

Gboster-0
Copy link
Collaborator

@Gboster-0 Gboster-0 commented Oct 14, 2023

About The Pull Request

changes ". = ..()" calls for "return ..()" where it can be changed without affecting surrounding code
forces initialize(), destroy(), life(), WorkComplete() and GiftUser() to be called by an abnormality if they implement custom code
i would have also forced people to call FearEffect() but meat lantern requires to not call parent to be stealthy

Why It's Good For The Game Codebase

juuuuuuuust in case contributors forget to call . = ..() on some procs and have to spend time diagonising the issue, this makes it a lil bit faster to show up

Changelog

🆑
code: some . = ..() calls were replaced with return ..()
code: abnormalities are now required to call certain proc's
/:cl:

@InsightfulParasite InsightfulParasite added Code improvement Code is now easier to copy paste. Tweak A small change/addition to already existing systems. labels Oct 14, 2023
LanceSmites328
LanceSmites328 previously approved these changes Oct 15, 2023
Copy link
Contributor

@LanceSmites328 LanceSmites328 left a comment

Choose a reason for hiding this comment

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

I'll say a lot of the changes from . = ..() to return ..() aren't necessary for functionality, as . is the default return value of the proc (among other things that are out of scope), so doing . = ..() runs the original parent proc and sets the current return value to that. However this is an overall improvement in code legibility.

@Coxswain-Navigator
Copy link
Contributor

I suspect that this could cause some bugs, be careful with merging it.

@EgorDinamit EgorDinamit merged commit 51ee678 into vlggms:master Oct 16, 2023
6 checks passed
@Gboster-0 Gboster-0 deleted the return--() branch October 16, 2023 11:26
vampirebat74 pushed a commit to vampirebat74/lobotomy-corp13 that referenced this pull request May 10, 2024
…without changing surrounding code. Forces some abnormality procs to be called by children (vlggms#1527)

* boop

* boop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code improvement Code is now easier to copy paste. Tweak A small change/addition to already existing systems.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants