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

Refactor fish.inc.c to remove ENABLE_VANILLA_LEVEL_SPECIFIC_CHECKS in favor of a param #493

Open
Tubular-Bells opened this issue Sep 22, 2022 · 3 comments
Labels
bug Something isn't working enhancement New feature or request
Milestone

Comments

@Tubular-Bells
Copy link
Contributor

There are currently 5 separate #ifdef ENABLE_VANILLA_LEVEL_SPECIFIC_CHECKS checks in src/game/behaviors/fish.inc.c. This results in a lot of ugly code duplication, and makes the Secret Aquarium fish behavior unusable in hacks without vanilla level checks. This problem is mentioned in the fish.inc.c file already (in the form of TODO comments), but I'm adding it to the issue tracker because there isn't one yet.

@gheskett gheskett added this to the 2.2 milestone Sep 22, 2022
@gheskett gheskett added bug Something isn't working enhancement New feature or request labels Sep 22, 2022
@gheskett gheskett modified the milestones: 3.1, 2.2 Sep 27, 2023
@someone2639
Copy link
Collaborator

Do you (or anyone reading this) have an idea on how this should be tackled? I looked at the file and nothing sprung to mind that could be done cleanly with a param.

@gheskett gheskett modified the milestones: 2.2, 2.3 Mar 2, 2024
@Tubular-Bells
Copy link
Contributor Author

Would it be possible to store the information about which "mode" the fish spawner should be in in the oBehParam? You would obviously want it to default to the non-Secret Aquarium behavior as to not break existing stuff. This should also make it possible to have both kinds of behaviors present in a single level. Using oBehParams like this admittedly feels a little hacky, but it is consistent with the current implementation of things like warp floors.

@Arceveti
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
Status: To Do
Development

No branches or pull requests

4 participants