-
Notifications
You must be signed in to change notification settings - Fork 194
Add creepers #132
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
base: main
Are you sure you want to change the base?
Add creepers #132
Conversation
Also refactor spawning code to not use if else spam
Useful for potential contributors
|
Ok here is a functional implementation of creepers. I still haven't tested this though. |
Why?? |
|
Done @p2r3 |
|
some things I think are missing: creepers shouldn't take damage from sunlight, they should disappear when they explode, and they should drop gunpowder also, maybe I just have something wrong in my environment, but I had to change line 1379 of procedures.c to be able to compile because fast_rand is used with a parameter while it doesn't take any |
p2r3
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a review of just the code, I haven't tested this in-game. It seems the commenter before me has, so take that feedback into consideration as well.
|
Sorry, this pull request was a bit rushed as I had to hurry doing it. It's still in an acceptable state (if discounting the debug print) but yes it could be polished a bit. I'm not currently available to do development until next friday due to being away from my home, unless I can get this working on my phone. Yes the float conversion is there for a reason. I found distance checking with randomized decay a lot easier with it. I may convert it ints later |
|
Don't pull request sloppy code if you know it's sloppy, I'm not going to accept it. It's a bit disrespectful to the reviewer's time. It's not up to you to determine what's an "acceptable" state, that's what reviewers are for. If changes were requested, then those changes have to be made before it's merged. I'll be blunt, the code quality here is not acceptable when compared to the rest of the codebase. Finding float casting to be "easier" is not an excuse. The whole point of this project is doing things efficiently with the bare-metal hardware in mind. If I did things the easy way, this wouldn't run on a microcontroller. Again, the change was requested, so it has to be made before merging. Not a "maybe". |
- Fix indentation - Remove debug prints - Remove unnecessary comments
|
While kudos for trailblazing, I don't really see how this implementation is substantially better than mine...? Especially since there's literally chunks of code from my own pull request. The only defining point is randomness in explosions, but even that doesn't even work. It would be more productive to discuss changes and opinions of implementing instead of trying to win a race. I only took this issue because there were no more updates after initial review, and it was fair to assume it was dead for good. Okay, actual issues:
There are also some style issues, but I'll leave that to the reviewer. |
Sorry. I didn't mean this to be a hostile action in any way. My point was not to win a race but finish my unfinished PR. And ported the creeper fuze implementation from your PR, if you'd like it to be removed feel free to let me know,
Fixed.
Ahh good catch. I accidentally swapped the preprocessor condition for MOB_GRIEFING so when its enabled no terrain is destroyed and vice versa. Fixed.
It checks if the explosion originates from a mob. And in the case where mob griefing is disabled and the explosion originates from a mob then no terrain is destroyed, otherwise the explosion passes as usual. |
Ah, I see. Sorry for assuming.
Nah, I don't mind :) |
Fixes #69
This adds creepers to the game. They function the same as in game expect they dont have the puff up animation.
Proof:


