Splitting up options for when selectCallback is present

This commit is contained in:
Wlowscha 2025-05-13 22:21:31 +02:00
parent b3e6c20a35
commit e8de3054fe
No known key found for this signature in database
GPG Key ID: 3C8F1AD330565D04

View File

@ -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;
} }
if (this.partyUiMode !== PartyUiMode.CHECK) {
const selectCallback = this.selectCallback; const selectCallback = this.selectCallback;
this.selectCallback = null; this.selectCallback = null;
selectCallback(this.cursor, option); 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) {