var t = require; var e = module; var i = exports; Object.defineProperty(i, "__esModule", {value: !0}); const s = t("CostumeAttr"), o = t("CostumeConst"), a = t("CostumeController"); i.default = class { constructor() { (this.attr = null), (this.equipItems = {}), (this.recalMap = []), (this.cfg = null); } init(t, e) { this.cfg = e; const i = a.default.ins; this.equipItems = { [o.CostumeParts.hand]: i.getTempCostume( e.costume_hand, t.costume[o.CostumeParts.hand].grade, t.costume[o.CostumeParts.hand].lv ), [o.CostumeParts.body]: i.getTempCostume( e.costume_body, t.costume[o.CostumeParts.body].grade, t.costume[o.CostumeParts.body].lv ), [o.CostumeParts.head]: i.getTempCostume( e.costume_head, t.costume[o.CostumeParts.head].grade, t.costume[o.CostumeParts.head].lv ) }; } record(t) { this.recalMap.includes(t) || this.recalMap.push(t); } initAttr() { this.attr = new s.default(); for (let t = o.CostumeParts.head; t <= o.CostumeParts.hand; t++) this.attr.addAttrBute("costume" + t, new s.default()); this.calEquipCostumeAttr(); } getGlobalAttr() { var t = [ o.CostumeAbilityType.upgrade_discount, o.CostumeAbilityType.chef_move_speed, o.CostumeAbilityType.waiter_move_speed, o.CostumeAbilityType.chef_production_speed, o.CostumeAbilityType.waiter_production_speed, o.CostumeAbilityType.menu_item_upgrade_discount, o.CostumeAbilityType.additional_cashier_charge, o.CostumeAbilityType.extremely_generous_tip_rate, o.CostumeAbilityType.all_employees_move_speed, o.CostumeAbilityType.all_employees_perfect_dish_rate, o.CostumeAbilityType.all_employees_production_speed ]; const e = {}, i = this.attr.finalAttr; for (const s of t) i[s] && (e[s] = i[s]); return e; } calEquipCostumeAttr() { const e = this.attr; for (let t = o.CostumeParts.head; t <= o.CostumeParts.hand; t++) { const i = this.equipItems[t], s = e.getAttrBute("costume" + t); if (i) { for (const e in i.attr) this.record(parseInt(e)); s.addAttrDict("base", i.attr), s.claFinishAttr(); } else s.reset(); } e.claFinishAttr(); } };