Add feedback indicating an upgrade vs craft
This commit is contained in:
parent
40e1f474c1
commit
db7f287bfa
@ -409,6 +409,7 @@ end
|
|||||||
-- Returns a formspec string
|
-- Returns a formspec string
|
||||||
function fs.craft(x, y, pos, rank, meta, skin)
|
function fs.craft(x, y, pos, rank, meta, skin)
|
||||||
local cost, is_positive = get_craft_material_cost(meta);
|
local cost, is_positive = get_craft_material_cost(meta);
|
||||||
|
local stack = meta:get_inventory():get_stack("output", 1);
|
||||||
|
|
||||||
local data = {
|
local data = {
|
||||||
x = x,
|
x = x,
|
||||||
@ -432,7 +433,7 @@ function fs.craft(x, y, pos, rank, meta, skin)
|
|||||||
h = 0.5,
|
h = 0.5,
|
||||||
|
|
||||||
id = "craft",
|
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)),
|
disabled = not (is_positive and can_afford(cost, meta)),
|
||||||
},
|
},
|
||||||
fs.cost(1.25, 1.375, cost, skin),
|
fs.cost(1.25, 1.375, cost, skin),
|
||||||
|
Loading…
Reference in New Issue
Block a user