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

Add javadoc to restore events and RestorationAuthoritySystem #17

Merged
merged 4 commits into from Jun 22, 2019

Conversation

e-aakash
Copy link
Member

@e-aakash e-aakash commented Jun 22, 2019

No major code changes

Copy link
Member

@Cervator Cervator left a comment

Choose a reason for hiding this comment

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

Nice and easy to review and approve! Left a few comments anyway but they're more about trivial wording issues than anything blocking a merge.

@@ -23,13 +24,20 @@
public class DoRestoreEvent implements Event {
/** The amount of health points being restored. */
private int amount;
/** The instigator of restoration */
Copy link
Member

Choose a reason for hiding this comment

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

Tiny suggestion: rather than use instigator which is already the variable name use a synonym to increase the odds that a reader will understand (instigator could be a somewhat rare word)

Suggested change
/** The instigator of restoration */
/** The entity that caused the restoration */

* To increase the health of an entity, send DoRestoreEvent
* <p>
* Logic flow for restoration:
* - DoRestoreEvent
Copy link
Member

Choose a reason for hiding this comment

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

This is too big to consider as part of this PR (since the same word is in use many other places) but I wonder if do is a good term in general for the starting phase of an event chain like this one. "Do" to me very much means that the thing is happening right now. Maybe "Perform" would give a better impression that it is more like an action that is being performed, almost like a stage play might be going through several phases to arrive at an action :-)

This could be overly subjective as interpreting these kinds of words may differ subtly between individuals.

@@ -39,4 +47,12 @@ public DoRestoreEvent(int amount) {
public int getAmount() {
return amount;
}

/**
* Method to get the instigator of restoration.
Copy link
Member

Choose a reason for hiding this comment

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

Generally I'd excuse setters & getters from Javadoc unless there is any potential for confusion somehow.

private int amount;

/**
* Constructor for creating the event.
Copy link
Member

Choose a reason for hiding this comment

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

Another edge case: should plain constructors have javadoc? In this case maybe if the wording is a slight bit more meaningful (we already know by the constructors presence that it will create the event, so the text doesn't really add anything). I'm not sure if there's really any other meaning to add in this case.

@Cervator Cervator merged commit 792a509 into Terasology:master Jun 22, 2019
@e-aakash e-aakash deleted the restore branch June 22, 2019 19:52
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.

None yet

2 participants