Archive update v0.54.0

This commit is contained in:
Eliot Partridge
2019-09-21 22:47:03 -05:00
parent 2c4e29eb70
commit 895627a641
18 changed files with 62 additions and 16 deletions
@@ -23,6 +23,7 @@ export class ActionBar {
shortcuts = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '-', '='];
private modalRef?: BsModalRef;
private _editable = false;
private isWaitingForActionsModal = false;
constructor(private game: PonyTownGame, private settings: SettingsService, private modalService: BsModalService) {
}
@Input() get editable() {
@@ -74,19 +75,32 @@ export class ActionBar {
}
}
openActions() {
if (this.isWaitingForActionsModal) {
return;
}
if (this.modalRef) {
this.closeActions();
}
else {
this.isWaitingForActionsModal = true;
this.modalRef = this.modalService.show(this.actionsModal, { ignoreBackdropClick: true });
}
}
closeActions() {
if (this.isWaitingForActionsModal) {
return;
}
if (this.modalRef) {
this.isWaitingForActionsModal = true;
this.modalRef.hide();
this.modalRef = undefined;
}
}
actionsModalNotify() {
this.isWaitingForActionsModal = false;
}
private updateFreeSlots() {
const actions = this.actions;