mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-05 07:52:17 +02:00
Splitting up options for when selectCallback is present
This commit is contained in:
parent
b3e6c20a35
commit
e8de3054fe
@ -731,7 +731,7 @@ export default class PartyUiHandler extends MessageUiHandler {
|
|||||||
this.clearOptions();
|
this.clearOptions();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.selectCallback && this.partyUiMode !== PartyUiMode.CHECK) {
|
if (this.selectCallback) {
|
||||||
if (option === PartyOption.TRANSFER) {
|
if (option === PartyOption.TRANSFER) {
|
||||||
if (this.transferCursor !== this.cursor) {
|
if (this.transferCursor !== this.cursor) {
|
||||||
if (this.transferAll) {
|
if (this.transferAll) {
|
||||||
@ -756,8 +756,10 @@ export default class PartyUiHandler extends MessageUiHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.clearTransfer();
|
this.clearTransfer();
|
||||||
|
ui.playSelect();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.partyUiMode === PartyUiMode.SPLICE) {
|
if (this.partyUiMode === PartyUiMode.SPLICE) {
|
||||||
if (option === PartyOption.SPLICE) {
|
if (option === PartyOption.SPLICE) {
|
||||||
(this.selectCallback as PartyModifierSpliceSelectCallback)(this.transferCursor, this.cursor);
|
(this.selectCallback as PartyModifierSpliceSelectCallback)(this.transferCursor, this.cursor);
|
||||||
@ -766,11 +768,15 @@ export default class PartyUiHandler extends MessageUiHandler {
|
|||||||
this.startTransfer();
|
this.startTransfer();
|
||||||
}
|
}
|
||||||
this.clearOptions();
|
this.clearOptions();
|
||||||
|
ui.playSelect();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
const selectCallback = this.selectCallback;
|
|
||||||
this.selectCallback = null;
|
if (this.partyUiMode !== PartyUiMode.CHECK) {
|
||||||
selectCallback(this.cursor, option);
|
const selectCallback = this.selectCallback;
|
||||||
|
this.selectCallback = null;
|
||||||
|
selectCallback(this.cursor, option);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (option >= PartyOption.FORM_CHANGE_ITEM && globalScene.getCurrentPhase() instanceof SelectModifierPhase) {
|
if (option >= PartyOption.FORM_CHANGE_ITEM && globalScene.getCurrentPhase() instanceof SelectModifierPhase) {
|
||||||
if (this.partyUiMode === PartyUiMode.CHECK) {
|
if (this.partyUiMode === PartyUiMode.CHECK) {
|
||||||
|
Loading…
Reference in New Issue
Block a user