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

Removal of RegenComponent with checks #13

Merged
merged 1 commit into from Jun 17, 2019
Merged

Conversation

e-aakash
Copy link
Member

Closes #11

RegenComponent is removed if only base regeneration is active.

@e-aakash e-aakash marked this pull request as ready for review June 16, 2019 05:54
entity.removeComponent(RegenComponent.class);
if (regen.hasBaseRegenOnly()) {
entity.removeComponent(RegenComponent.class);
}
entity.send(new OnFullyHealedEvent(entity));
Copy link
Member Author

Choose a reason for hiding this comment

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

This will not lead to multiple OnFullyHealedEvent as the entity is removed from the scheduler on reaching full health (Line 126)

@Cervator Cervator merged commit a07741a into Terasology:master Jun 17, 2019
@e-aakash e-aakash deleted the update branch June 18, 2019 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RegenComponent is removed at full health
2 participants