增加chooseButton的默认complexSelect
This commit is contained in:
parent
ed9d00205d
commit
73b8d0e9c6
|
@ -3151,6 +3151,7 @@ export const Content = {
|
||||||
next.set('ai', info.chooseButton.check || function () { return 1; });
|
next.set('ai', info.chooseButton.check || function () { return 1; });
|
||||||
next.set('filterButton', info.chooseButton.filter || function () { return true; });
|
next.set('filterButton', info.chooseButton.filter || function () { return true; });
|
||||||
next.set('selectButton', info.chooseButton.select || 1);
|
next.set('selectButton', info.chooseButton.select || 1);
|
||||||
|
next.set('complexSelect', info.chooseButton.complexSelect !== false);
|
||||||
next.set('filterOk', info.chooseButton.filterOk || (() => true));
|
next.set('filterOk', info.chooseButton.filterOk || (() => true));
|
||||||
if (event.id) next._parent_id = event.id;
|
if (event.id) next._parent_id = event.id;
|
||||||
next.type = 'chooseToUse_button';
|
next.type = 'chooseToUse_button';
|
||||||
|
@ -4546,7 +4547,7 @@ export const Content = {
|
||||||
event.dialog.style.display = '';
|
event.dialog.style.display = '';
|
||||||
event.dialog.open();
|
event.dialog.open();
|
||||||
}
|
}
|
||||||
if (['chooseCharacter', 'chooseButtonOL'].includes(event.getParent().name)) event.complexSelect = true;
|
// if (['chooseCharacter', 'chooseButtonOL'].includes(event.getParent().name)) event.complexSelect = true;
|
||||||
var filterButton = event.filterButton || function () { return true; };
|
var filterButton = event.filterButton || function () { return true; };
|
||||||
var selectButton = get.select(event.selectButton);
|
var selectButton = get.select(event.selectButton);
|
||||||
var buttons = event.dialog.buttons;
|
var buttons = event.dialog.buttons;
|
||||||
|
|
|
@ -4267,7 +4267,8 @@ export class Player extends HTMLDivElement {
|
||||||
var next = game.createEvent('chooseButton');
|
var next = game.createEvent('chooseButton');
|
||||||
for (var i = 0; i < arguments.length; i++) {
|
for (var i = 0; i < arguments.length; i++) {
|
||||||
if (typeof arguments[i] == 'boolean') {
|
if (typeof arguments[i] == 'boolean') {
|
||||||
next.forced = arguments[i];
|
if (!next.forced) next.forced = arguments[i];
|
||||||
|
else next.complexSelect = arguments[i];
|
||||||
}
|
}
|
||||||
else if (get.itemtype(arguments[i]) == 'dialog') {
|
else if (get.itemtype(arguments[i]) == 'dialog') {
|
||||||
next.dialog = arguments[i];
|
next.dialog = arguments[i];
|
||||||
|
@ -4293,6 +4294,7 @@ export class Player extends HTMLDivElement {
|
||||||
if (next.filterButton == undefined) next.filterButton = lib.filter.filterButton;
|
if (next.filterButton == undefined) next.filterButton = lib.filter.filterButton;
|
||||||
if (next.selectButton == undefined) next.selectButton = [1, 1];
|
if (next.selectButton == undefined) next.selectButton = [1, 1];
|
||||||
if (next.ai == undefined) next.ai = function () { return 1; };
|
if (next.ai == undefined) next.ai = function () { return 1; };
|
||||||
|
if (next.complexSelect !== false) next.complexSelect = true;
|
||||||
next.setContent('chooseButton');
|
next.setContent('chooseButton');
|
||||||
next._args = Array.from(arguments);
|
next._args = Array.from(arguments);
|
||||||
next.forceDie = true;
|
next.forceDie = true;
|
||||||
|
|
Loading…
Reference in New Issue