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
+29 -29
View File
@@ -8,36 +8,36 @@ import { Model } from '../../services/model';
// import { SWAP_TIMEOUT, SECOND } from '../../../common/constants';
@Component({
selector: 'swap-box',
templateUrl: 'swap-box.pug',
styleUrls: ['swap-box.scss'],
selector: 'swap-box',
templateUrl: 'swap-box.pug',
styleUrls: ['swap-box.scss'],
})
export class SwapBox {
readonly swapIcon = faExchangeAlt;
readonly timerIcon = faClock;
previewInfo: any;
@ViewChild('dropdown', { static: true }) dropdown!: Dropdown;
timeout = false;
constructor(private game: PonyTownGame, private zone: NgZone, private model: Model) {
}
toggleSwapDropdown() {
this.zone.run(() => setTimeout(() => { }, 10));
}
swapPony(pony: PonyObject) {
this.game.send(server => server.actionParam(Action.SwapCharacter, pony.id));
setTimeout(() => {
this.dropdown && this.dropdown.close();
pony.lastUsed = (new Date()).toISOString();
this.model.sortPonies();
});
readonly swapIcon = faExchangeAlt;
readonly timerIcon = faClock;
previewInfo: any;
@ViewChild('dropdown', { static: true }) dropdown!: Dropdown;
timeout = false;
constructor(private game: PonyTownGame, private zone: NgZone, private model: Model) {
}
toggleSwapDropdown() {
this.zone.run(() => setTimeout(() => { }, 10));
}
swapPony(pony: PonyObject) {
this.game.send(server => server.actionParam(Action.SwapCharacter, pony.id));
setTimeout(() => {
this.dropdown && this.dropdown.close();
pony.lastUsed = (new Date()).toISOString();
this.model.sortPonies();
});
// if (!this.timeout) {
// this.timeout = true;
// setTimeout(() => this.timeout = false, SWAP_TIMEOUT + SECOND);
// }
}
preview(pony: PonyObject | undefined) {
const info = pony && pony.ponyInfo;
this.previewInfo = info && toPalette(info, mockPaletteManager);
}
// if (!this.timeout) {
// this.timeout = true;
// setTimeout(() => this.timeout = false, SWAP_TIMEOUT + SECOND);
// }
}
preview(pony: PonyObject | undefined) {
const info = pony && pony.ponyInfo;
this.previewInfo = info && toPalette(info, mockPaletteManager);
}
}