refactor: don't early out client/server

This commit is contained in:
cha0s 2019-06-05 21:19:42 -05:00
parent 46f557626a
commit ae21ba05a6

View File

@ -113,9 +113,7 @@ export class Tool extends decorate(Trait) {
onWielderActiveSlotIndexChanged() {
this.calculateTargets();
if (AVOCADO_SERVER) {
return;
}
if (AVOCADO_CLIENT) {
const wielder = this.entity.wielder;
if (!wielder) {
return;
@ -130,6 +128,7 @@ export class Tool extends decorate(Trait) {
wielder.container.removeChild(this.guidePrimitives);
}
}
}
onWielderDirectionChanged() {
this.calculateTargets();
@ -142,9 +141,7 @@ export class Tool extends decorate(Trait) {
}
renderPrimitives() {
if (AVOCADO_SERVER) {
return;
}
if (AVOCADO_CLIENT) {
this.guidePrimitives.clear();
const wielder = this.entity.wielder;
if (!wielder) {
@ -173,11 +170,10 @@ export class Tool extends decorate(Trait) {
);
}
}
}
repositionPrimitives() {
if (AVOCADO_SERVER) {
return;
}
if (AVOCADO_CLIENT) {
const wielder = this.entity.wielder;
if (!wielder) {
return;
@ -187,6 +183,7 @@ export class Tool extends decorate(Trait) {
}
this.guidePrimitives.position = Vector.scale(wielder.tileOffset, -1);
}
}
listeners() {
return {