-
Notifications
You must be signed in to change notification settings - Fork 13
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
feature(ecs-gestalt): Migrate Components to gestalt's Components #82
Conversation
@Replicate | ||
public FactionList faction = PlanetFactionList.EARTH; | ||
|
||
@Override | ||
public void copy(FactionComponent other) { | ||
this.faction = other.faction; |
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.
FactionList
is just an interface 🤔 not sure how to do a deep copy of instances of that in the end ... not even sure what the design decision here was...
public RandomDamageComponent() { | ||
|
||
} |
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.
No need to add the default constructor here if there are no other constructors.
public RandomDamageComponent() { | |
} |
src/main/java/org/terasology/combatSystem/physics/components/GravityComponent.java
Show resolved
Hide resolved
public class ActivateOnPlaceComponent implements Component<ActivateOnPlaceComponent> { | ||
|
||
@Override | ||
public void copy(ActivateOnPlaceComponent other) { | ||
|
||
} |
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 should just extend EmptyComponent
.
|
||
public class PrimaryAttackComponent implements Component<PrimaryAttackComponent> { |
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.
Should extend EmptyComponent
|
||
public class SecondaryAttackComponent implements Component{ | ||
public class SecondaryAttackComponent implements Component<SecondaryAttackComponent> { |
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.
Should extend EmptyComponent
.
|
||
@Override | ||
public void copy(AddSwitchDoorsComponent other) { | ||
this.doorsToSpawn = Lists.newArrayList(other.doorsToSpawn); |
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.
For a deep copy we should create copies of DoorsToSpawn
(or investigate whether we can make it immutable instead).
This change is only local to this module in an Omega workspace.
ref: MovingBlocks/Terasology#4753