plenty of bf

This commit is contained in:
Olivier Gagnon
2021-11-15 23:49:33 -05:00
parent ded230eaaf
commit ef781a0627
15 changed files with 213 additions and 115 deletions
+1 -1
View File
@@ -86,7 +86,7 @@ export function SellMaterial(mat: Material, amt: string, price: string): void {
if (price === "") price = "0";
if (amt === "") amt = "0";
let cost = price.replace(/\s+/g, "");
cost = cost.replace(/[^-()\d/*+.MP]/g, ""); //Sanitize cost
cost = cost.replace(/[^-()\d/*+.MPe]/g, ""); //Sanitize cost
let temp = cost.replace(/MP/g, mat.bCost + "");
try {
temp = eval(temp);