Add feedback indicating an upgrade vs craft

This commit is contained in:
Hugues Ross 2020-06-13 17:14:55 -04:00
parent 40e1f474c1
commit db7f287bfa
1 changed files with 2 additions and 1 deletions

View File

@ -409,6 +409,7 @@ end
-- Returns a formspec string
function fs.craft(x, y, pos, rank, meta, skin)
local cost, is_positive = get_craft_material_cost(meta);
local stack = meta:get_inventory():get_stack("output", 1);
local data = {
x = x,
@ -432,7 +433,7 @@ function fs.craft(x, y, pos, rank, meta, skin)
h = 0.5,
id = "craft",
text = "Craft Map",
text = stack:get_name() == "cartographer:map" and "Upgrade Map" or "Craft Map",
disabled = not (is_positive and can_afford(cost, meta)),
},
fs.cost(1.25, 1.375, cost, skin),