// Function from file: vending.dm public override void RefreshParts( ) { Obj_Item_Weapon_VendingRefill VR = null; if (this.component_parts != null) { this.product_records = new ByTable(); this.hidden_records = new ByTable(); this.coin_records = new ByTable(); this.build_inventory(this.products, null, null, true); this.build_inventory(this.contraband, true, null, true); this.build_inventory(this.premium, false, true, true); foreach (dynamic _a in Lang13.Enumerate(this.component_parts, typeof(Obj_Item_Weapon_VendingRefill))) { VR = _a; this.refill_inventory(VR, this.product_records, 1); this.refill_inventory(VR, this.coin_records, 3); this.refill_inventory(VR, this.hidden_records, 2); } } return; }
// Function from file: vending.dm public override bool default_deconstruction_crowbar(dynamic C = null, bool?ignore_panel = null) { ByTable product_list = null; int? i = null; Data_VendingProduct machine_content = null; int safety = 0; Obj_Item_Weapon_VendingRefill VR = null; product_list = new ByTable(new object [] { this.product_records, this.hidden_records, this.coin_records }); i = null; i = 1; while ((i ?? 0) <= 3) { foreach (dynamic _b in Lang13.Enumerate(product_list[i], typeof(Data_VendingProduct))) { machine_content = _b; while (machine_content.amount != 0) { safety = 0; foreach (dynamic _a in Lang13.Enumerate(this.component_parts, typeof(Obj_Item_Weapon_VendingRefill))) { VR = _a; safety++; if (Convert.ToDouble(VR.charges[i]) < Convert.ToDouble(VR.init_charges[i])) { VR.charges[i]++; machine_content.amount--; if (!Lang13.Bool(machine_content.amount)) { break; } } else { safety--; } } if (safety <= 0) { break; } } } i++; } base.default_deconstruction_crowbar((object)(C), ignore_panel); return(false); }