Skip to content
This repository was archived by the owner on Jul 1, 2020. It is now read-only.

fix burst fire weapons having their wear go over max_wear and breaking#7

Open
Elkien3 wants to merge 1 commit intoClobberXD:masterfrom
Elkien3:patch-3
Open

fix burst fire weapons having their wear go over max_wear and breaking#7
Elkien3 wants to merge 1 commit intoClobberXD:masterfrom
Elkien3:patch-3

Conversation

@Elkien3
Copy link
Copy Markdown
Contributor

@Elkien3 Elkien3 commented Mar 16, 2019

I copied the wear code from fire() and edited slightly to be multiplied by burst.

I copied the wear code from fire() and edited slightly to be multiplied by burst.
@ClobberXD
Copy link
Copy Markdown
Owner

All *_fire methods end up calling fire in their own way (or at least that's how I intended them to work), but calculating wear in fire doesn't work for burst_fire, as it can't return the wear-adjusted stack from within minetest.after.

Even if this works, this results in code duplication. Would it be a better idea to move the wear-calculation code up the call stack (maybe in on_lclick?), to ensure that it gets called for all modes incl. burst?

@Elkien3
Copy link
Copy Markdown
Contributor Author

Elkien3 commented Mar 17, 2019

Good idea, I'll see about that.

@ClobberXD ClobberXD added Changes requested ❕ This PR isn't mergeable in its current state, or changes have been requested by the reviewer. and removed Changes requested ❕ This PR isn't mergeable in its current state, or changes have been requested by the reviewer. labels May 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants