Merge pull request #1148 from Iking123/PR-Branch
使用game.addCardPack添加卡牌包时,可以使用closeable:true选项,令玩家可以手动编辑牌堆(也即使用game.import导入卡牌包时,卡牌包信息页底下的那个“编辑牌堆”)
This commit is contained in:
commit
d12f2089b2
|
@ -165,6 +165,7 @@ export const cardPackMenu = function (connectMenu) {
|
||||||
var createModeConfig = function (mode, position) {
|
var createModeConfig = function (mode, position) {
|
||||||
var info = lib.cardPack[mode];
|
var info = lib.cardPack[mode];
|
||||||
let cardPack = lib.cardPackInfo[mode];
|
let cardPack = lib.cardPackInfo[mode];
|
||||||
|
if (!lib.cardPile[mode] && cardPack && cardPack.list && Array.isArray(cardPack.list)) lib.cardPile[mode]=cardPack.list;
|
||||||
var page = ui.create.div('');
|
var page = ui.create.div('');
|
||||||
var node = ui.create.div('.menubutton.large', lib.translate[mode + '_card_config'], position, clickMode);
|
var node = ui.create.div('.menubutton.large', lib.translate[mode + '_card_config'], position, clickMode);
|
||||||
if (node.innerHTML.length >= 5) {
|
if (node.innerHTML.length >= 5) {
|
||||||
|
@ -303,7 +304,7 @@ export const cardPackMenu = function (connectMenu) {
|
||||||
game.saveConfig('hiddenCardPack', lib.config.hiddenCardPack);
|
game.saveConfig('hiddenCardPack', lib.config.hiddenCardPack);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (!mode.startsWith('mode_') && lib.cardPile[mode]) {
|
if ((!mode.startsWith('mode_') || (cardPack && cardPack.closeable)) && lib.cardPile[mode]) {
|
||||||
var cardpileNodes = [];
|
var cardpileNodes = [];
|
||||||
var cardpileexpanded = false;
|
var cardpileexpanded = false;
|
||||||
if (!lib.config.bannedpile[mode]) {
|
if (!lib.config.bannedpile[mode]) {
|
||||||
|
@ -650,4 +651,4 @@ export const cardPackMenu = function (connectMenu) {
|
||||||
if (connectMenu) lib.connectCardPack.add(packName);
|
if (connectMenu) lib.connectCardPack.add(packName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue