Linha 26: |
Linha 26: |
| --Calculate some artisan goods prices from base ingredient price | | --Calculate some artisan goods prices from base ingredient price |
| --These are needed for data-sort-values on pages like Flowers, Fruit, Vegetables | | --These are needed for data-sort-values on pages like Flowers, Fruit, Vegetables |
− | if (item == "wine") then | + | if (string.find(item, "wine") ~= nil) then |
| artisanprice = (baseprice * 3) | | artisanprice = (baseprice * 3) |
− | elseif (item == "juice") then | + | elseif (string.find(item, "juice") ~= nil) then |
| artisanprice = math.floor(baseprice * 2.25) | | artisanprice = math.floor(baseprice * 2.25) |
− | elseif ((item == "jelly") or (item == "pickles")) then | + | elseif ((string.find(item, "jelly")) or (string.find(item, "pickles")) ~= nil) then |
| artisanprice = (50 + (baseprice * 2)) | | artisanprice = (50 + (baseprice * 2)) |
| + | elseif (string.find(item, "dried") ~= nil) then |
| + | artisanprice = math.floor((baseprice * 7.5) + 25) |
| elseif (item == "honey") then | | elseif (item == "honey") then |
| --This is a hack that works only because | | --This is a hack that works only because |