|
|
@@ -8889,7 +8889,6 @@ this.data.state = s.FactroyState.Empty;
|
|
|
this.data.productID = 0;
|
|
|
this.data.growSpan = 0;
|
|
|
gData.gameData.setFactoryDataMap(this.configID, this.data);
|
|
|
-gData.gameData.nextMake = null;
|
|
|
gData.gameData.setNextProduct(!1);
|
|
|
0 == gData.harvestData.getType ? gData.farmGradeData.addGradeExp(s.ExpAddType.EAT_harvest, this.node) : gData.farmGradeData.addGradeExp(s.ExpAddType.EAT_others, this.node);
|
|
|
return [ 2 ];
|
|
|
@@ -9125,18 +9124,12 @@ gData.gameData.nextMake = this.factoryIcons[a];
|
|
|
gData.gameData.nextType = 3;
|
|
|
return this.factoryIcons[a];
|
|
|
}
|
|
|
-} else {
|
|
|
-var o = gData.gameData.doFarmMapDataCheck(2, {
|
|
|
-state: !1
|
|
|
-});
|
|
|
-if (o) return o;
|
|
|
-for (e = this.factoryIcons.length, a = 0; a < e; a++) if (this.factoryIcons[a].data.state == r.FactroyState.Empty) {
|
|
|
+} else for (e = this.factoryIcons.length, a = 0; a < e; a++) if (this.factoryIcons[a].data.state == r.FactroyState.Empty) {
|
|
|
gData.gameData.nextCanProduct = gData.gameData.getRandomFactoryConfig(this.factoryIcons[a].configID);
|
|
|
gData.gameData.nextMake = this.factoryIcons[a];
|
|
|
gData.gameData.nextType = 3;
|
|
|
return this.factoryIcons[a];
|
|
|
}
|
|
|
-}
|
|
|
return null;
|
|
|
};
|
|
|
t.prototype.btnMake = function() {
|
|
|
@@ -10067,7 +10060,6 @@ this.data.growSpan = 0;
|
|
|
t = this.node.getChildByName("hb");
|
|
|
this.node.removeChild(t);
|
|
|
gData.gameData.setFarmDataMap(this.configID, this.data);
|
|
|
-gData.gameData.nextMake = null;
|
|
|
gData.gameData.setNextProduct(!1);
|
|
|
0 == gData.harvestData.getType ? gData.farmGradeData.addGradeExp(s.ExpAddType.EAT_harvest, this.node) : gData.farmGradeData.addGradeExp(s.ExpAddType.EAT_others, this.node);
|
|
|
return [ 2 ];
|
|
|
@@ -13624,39 +13616,34 @@ break;
|
|
|
}
|
|
|
}
|
|
|
if (!i) {
|
|
|
-if (v = this.doFarmMapDataCheck(0)) e = v; else {
|
|
|
e = r.default.rnd(10001, this.getMaxProduct(u.nzw));
|
|
|
this.nextType = 1;
|
|
|
-}
|
|
|
console.log("订单数据没有匹配成功====1");
|
|
|
}
|
|
|
} else {
|
|
|
n = !0;
|
|
|
-var v;
|
|
|
-if (v = this.doFarmMapDataCheck(0)) e = v; else {
|
|
|
e = r.default.rnd(10001, this.getMaxProduct(u.nzw));
|
|
|
this.nextType = 1;
|
|
|
-}
|
|
|
console.log("订单数据为null");
|
|
|
}
|
|
|
if (n) return this.getProductMap(e);
|
|
|
if (a) {
|
|
|
if (o) {
|
|
|
-var D = !1;
|
|
|
-for (y = 0; y != c.length; ++y) for (var b = gData.factorySystem.factoryIcons, w = b.length, S = 0; S < w; S++) if (this.getTabByConfigID(b[S].configID) == c[y] && b[S].data.state == d.Empty) {
|
|
|
-D = !0;
|
|
|
+var v = !1;
|
|
|
+for (y = 0; y != c.length; ++y) for (var D = gData.factorySystem.factoryIcons, b = D.length, w = 0; w < b; w++) if (this.getTabByConfigID(D[w].configID) == c[y] && D[w].data.state == d.Empty) {
|
|
|
+v = !0;
|
|
|
t.state = 1;
|
|
|
break;
|
|
|
}
|
|
|
-if (!D) for (y = 0; y != s.length; ++y) {
|
|
|
-var k = gData.pastureSystem.pastureIcons;
|
|
|
-for (w = k.length, S = 0; S < w; S++) if (k[S].data.productID == s[y] && k[S].data.state == p.Empty) {
|
|
|
-D = !0;
|
|
|
+if (!v) for (y = 0; y != s.length; ++y) {
|
|
|
+var S = gData.pastureSystem.pastureIcons;
|
|
|
+for (b = S.length, w = 0; w < b; w++) if (S[w].data.productID == s[y] && S[w].data.state == p.Empty) {
|
|
|
+v = !0;
|
|
|
t.state = 2;
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
-if (D) {
|
|
|
+if (v) {
|
|
|
console.log("getRandomPlantConfig====0");
|
|
|
return null;
|
|
|
}
|
|
|
@@ -15719,6 +15706,7 @@ gData.receiptNotice.receip_rmb = a;
|
|
|
mk.ui.openPanel("module/newNotice/newNotice");
|
|
|
this.initOrderUI();
|
|
|
gData.gameData.init_order = !0;
|
|
|
+gData.gameData.checkTaskFinishUnLock();
|
|
|
return [ 2 ];
|
|
|
}
|
|
|
});
|
|
|
@@ -15790,18 +15778,17 @@ return [ 2 ];
|
|
|
});
|
|
|
};
|
|
|
e.prototype.doFlyOrderAni = function(t, e) {
|
|
|
-var a = this;
|
|
|
void 0 === e && (e = null);
|
|
|
-var o = gData.gameData.playerProp.orderData;
|
|
|
-if (o) {
|
|
|
-for (var n = !0, i = o.orderTaskList.length, r = 0; r != i; ++r) {
|
|
|
-var c = o.orderTaskList;
|
|
|
-if (c[r].completeCount < c[r].taskCount) {
|
|
|
-n = !1;
|
|
|
+var a = gData.gameData.playerProp.orderData;
|
|
|
+if (a) {
|
|
|
+for (var o = !0, n = a.orderTaskList.length, i = 0; i != n; ++i) {
|
|
|
+var r = a.orderTaskList;
|
|
|
+if (r[i].completeCount < r[i].taskCount) {
|
|
|
+o = !1;
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
-if (n) {
|
|
|
+if (o) {
|
|
|
this.isGray = !1;
|
|
|
this.node_getOrderReward.setGray(!1, !0);
|
|
|
this.node_getOrderReward.getComponent(cc.Animation).play();
|
|
|
@@ -15810,16 +15797,13 @@ mk.ui.closeAllUI();
|
|
|
"1" == gData.gameData.funOpenData[11] && mk.guide.open(12) || mk.tip.pop("订单已完成,快提现吧!");
|
|
|
}
|
|
|
if (e) {
|
|
|
-var s = this.node_orderHb.parent.convertToWorldSpaceAR(this.node_orderHb.getPosition());
|
|
|
-mk.fly.PlayCoinAnim(1, 5, e, s, function() {
|
|
|
-a.refreshOrderUI(t);
|
|
|
-}, .8);
|
|
|
+var c = this.node_orderHb.parent.convertToWorldSpaceAR(this.node_orderHb.getPosition());
|
|
|
+mk.fly.PlayCoinAnim(1, 5, e, c, function() {}, .8);
|
|
|
} else {
|
|
|
-s = this.node_orderHb.parent.convertToWorldSpaceAR(this.node_orderHb.getPosition());
|
|
|
-mk.fly.PlayCoinAnim(1, 5, this.btn_product, s, function() {
|
|
|
-a.refreshOrderUI(t);
|
|
|
-}, .8);
|
|
|
+c = this.node_orderHb.parent.convertToWorldSpaceAR(this.node_orderHb.getPosition());
|
|
|
+mk.fly.PlayCoinAnim(1, 5, this.btn_product, c, function() {}, .8);
|
|
|
}
|
|
|
+this.refreshOrderUI(t);
|
|
|
}
|
|
|
};
|
|
|
e.prototype.refreshOrderUI = function(t) {
|
|
|
@@ -23910,7 +23894,6 @@ this.clean();
|
|
|
this.data.state = s.PastureState.Empty;
|
|
|
this.data.growSpan = 0;
|
|
|
gData.gameData.setPastureDataMap(this.configID, this.data);
|
|
|
-gData.gameData.nextMake = null;
|
|
|
gData.gameData.setNextProduct(!1);
|
|
|
0 == gData.harvestData.getType ? gData.farmGradeData.addGradeExp(s.ExpAddType.EAT_harvest, this.node) : gData.farmGradeData.addGradeExp(s.ExpAddType.EAT_others, this.node);
|
|
|
return [ 2 ];
|
|
|
@@ -24132,18 +24115,12 @@ gData.gameData.nextMake = this.pastureIcons[a];
|
|
|
gData.gameData.nextType = 2;
|
|
|
return this.pastureIcons[a];
|
|
|
}
|
|
|
-} else {
|
|
|
-var o = gData.gameData.doFarmMapDataCheck(1, {
|
|
|
-state: !1
|
|
|
-});
|
|
|
-if (o) return o;
|
|
|
-for (e = this.pastureIcons.length, a = 0; a < e; a++) if (this.pastureIcons[a].data.state == r.PastureState.Empty) {
|
|
|
+} else for (e = this.pastureIcons.length, a = 0; a < e; a++) if (this.pastureIcons[a].data.state == r.PastureState.Empty) {
|
|
|
gData.gameData.nextCanProduct = gData.gameData.getProductMap(this.pastureIcons[a].data.productID);
|
|
|
gData.gameData.nextMake = this.pastureIcons[a];
|
|
|
gData.gameData.nextType = 2;
|
|
|
return this.pastureIcons[a];
|
|
|
}
|
|
|
-}
|
|
|
return null;
|
|
|
};
|
|
|
t.prototype.btnMake = function() {
|