Revert codestyle changes (#40)

* Revert "7f7efbb94bab8574e42d942ad82d414e007b2970"

Code style changes should probably be part of a PR
This commit is contained in:
Eliot Partridge
2019-08-30 10:53:14 -05:00
committed by GitHub
parent eefd9e9a2c
commit caf70a864f
446 changed files with 70667 additions and 70655 deletions
@@ -6,63 +6,63 @@ import { faBan } from '../../../client/icons';
import { getPaletteInfo } from '../../../common/pony';
@Component({
selector: 'notification-item',
templateUrl: 'notification-item.pug',
styleUrls: ['notification-item.scss'],
selector: 'notification-item',
templateUrl: 'notification-item.pug',
styleUrls: ['notification-item.scss'],
})
export class NotificationItem implements OnDestroy {
readonly banIcon = faBan;
@Input() notification!: Notification;
constructor(private game: PonyTownGame) {
}
get isOpen() {
return this.notification.open;
}
set isOpen(value: boolean) {
if (value) {
this.game.notifications.forEach(n => n.open = false);
}
readonly banIcon = faBan;
@Input() notification!: Notification;
constructor(private game: PonyTownGame) {
}
get isOpen() {
return this.notification.open;
}
set isOpen(value: boolean) {
if (value) {
this.game.notifications.forEach(n => n.open = false);
}
this.notification.open = value;
}
get okButton() {
return hasFlag(this.notification.flags, NotificationFlags.Ok);
}
get yesButton() {
return hasFlag(this.notification.flags, NotificationFlags.Yes);
}
get acceptButton() {
return hasFlag(this.notification.flags, NotificationFlags.Accept);
}
get noButton() {
return hasFlag(this.notification.flags, NotificationFlags.No);
}
get rejectButton() {
return hasFlag(this.notification.flags, NotificationFlags.Reject);
}
get ignoreButton() {
return hasFlag(this.notification.flags, NotificationFlags.Ignore);
}
get paletteInfo() {
return getPaletteInfo(this.notification.pony);
}
ngOnDestroy() {
this.isOpen = false;
}
accept() {
this.game.send(server => server.acceptNotification(this.notification.id));
}
reject() {
this.game.send(server => server.rejectNotification(this.notification.id));
}
ignore() {
this.reject();
this.notification.open = value;
}
get okButton() {
return hasFlag(this.notification.flags, NotificationFlags.Ok);
}
get yesButton() {
return hasFlag(this.notification.flags, NotificationFlags.Yes);
}
get acceptButton() {
return hasFlag(this.notification.flags, NotificationFlags.Accept);
}
get noButton() {
return hasFlag(this.notification.flags, NotificationFlags.No);
}
get rejectButton() {
return hasFlag(this.notification.flags, NotificationFlags.Reject);
}
get ignoreButton() {
return hasFlag(this.notification.flags, NotificationFlags.Ignore);
}
get paletteInfo() {
return getPaletteInfo(this.notification.pony);
}
ngOnDestroy() {
this.isOpen = false;
}
accept() {
this.game.send(server => server.acceptNotification(this.notification.id));
}
reject() {
this.game.send(server => server.rejectNotification(this.notification.id));
}
ignore() {
this.reject();
const pony = this.notification.pony;
const pony = this.notification.pony;
if (pony !== this.game.player) {
this.game.send(server => server.playerAction(pony.id, PlayerAction.Ignore, undefined));
pony.playerState = setFlag(pony.playerState, EntityPlayerState.Ignored, true);
}
}
if (pony !== this.game.player) {
this.game.send(server => server.playerAction(pony.id, PlayerAction.Ignore, undefined));
pony.playerState = setFlag(pony.playerState, EntityPlayerState.Ignored, true);
}
}
}