clear console

This commit is contained in:
luying
2022-02-17 16:20:27 +08:00
parent 17b437a618
commit 41e0f3a457

View File

@@ -133,20 +133,16 @@ export class CheckMeterial {
let dicStone = gameData.stone.get(id);
if(!dicStone || dicStone.composeMaterial.length <= 0) return false; // 1阶石头不能再从下合成返回不行
let materials = dicStone.composeMaterial.map(cur => ({...cur, count: cur.count * count }));
console.log('#######materials', materials)
let isEnough = await this.decrease(materials);
console.log('#####isEnough', isEnough, this.notEnoughItems)
if(!isEnough) {
let notEnoughItems = this.getNotEnoughItems();
let newMaterials = this.getMaterialEnough(materials, notEnoughItems);
console.log('#######newMaterials', newMaterials, this.notEnoughItems)
let isEnough = await this.decrease(newMaterials); // 消耗掉除了不足的部分以外的其他部分
if(!isEnough) return false;
let isAllOK = true; // 如果有石头不足向下补充isAllOK标识不足的都能补充上
for(let [id, count] of notEnoughItems) {
let isEnough = await this.composeStone(id, count);
console.log('####')
if(!isEnough) {
isAllOK = false; break;
}