1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- var t = require;
- var e = module;
- var i = exports;
- Object.defineProperty(i, "__esModule", {value: !0});
- const a = t("App"),
- n = t("LabelTip"),
- r = t("GlobalAttr"),
- l = t("MyBigLong"),
- h = t("CurrencyService"),
- c = t("MapService"),
- d = t("OrderService");
- i.default = class {
- constructor() {
- (this.slot = null),
- (this.order = null),
- (this.foodValue = 0),
- (this.isPerfect = !1),
- (this.cookTime = 0),
- (this.cookMoneyRate = 1);
- }
- init(t) {
- (this.cookTime = Math.ceil(this.order.machine.attr.manufactureTime / t.getCookSpeedRate())),
- (this.cookMoneyRate = t.getCookMoneyRate());
- }
- finishCook(t) {
- (this.isPerfect = t), this.slot.stopCook(), this.calValue(t);
- }
- getCookTime() {
- return this.cookTime;
- }
- finishOrder() {
- const t = r.default.ins,
- e = this.order.customer.posData.tipAndValueUp;
- let i = this.foodValue,
- s = l.default.toString(this.foodValue);
- var o;
- 1 < t.moneyRate && ((i *= t.moneyRate), (s = l.default.toString(i))),
- a.default.NodePoolMsr.flyLabel
- .pop()
- .getComponent(n.default)
- .init(c.default.ins.uiLayer, s, 35)
- .flyUp(e.pos.x, e.pos.y + 100, !0),
- d.default.ins.finshOrder(this.order),
- t.tipChance &&
- t.tipChance > Math.random() &&
- ((o =
- t.generousTipRate && t.generousTipRate > Math.random()
- ? t.define.costume_ability204_value / 100
- : t.tipRate),
- e.addValue(
- Math.floor((this.foodValue * this.order.machine.attr.slotCnt * o) / (this.getCookTime() + 10))
- )),
- h.default.ins.moneyChange(i);
- }
- calValue(t) {
- var e = r.default.ins;
- (this.foodValue = t
- ? (this.order.getFoodValue() * this.cookMoneyRate * e.define.costume_ability403_value) / 100
- : this.order.getFoodValue() * this.cookMoneyRate),
- (this.foodValue = Math.floor(this.foodValue));
- }
- };
|