|
|
|
@ -692,21 +692,21 @@ local function make_purchase(pos, player, lots)
|
|
|
|
|
-- Run mail mod checks
|
|
|
|
|
alert_owner_if_empty(pos)
|
|
|
|
|
|
|
|
|
|
return true, "Trade successful"
|
|
|
|
|
return true, S("Trade successful")
|
|
|
|
|
else
|
|
|
|
|
return false, "Vendor has insufficient space"
|
|
|
|
|
return false, S("Vendor has insufficient space")
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
return false, "Vendor has insufficient resources"
|
|
|
|
|
return false, S("Vendor has insufficient resources")
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
return false, "You have insufficient space"
|
|
|
|
|
return false, S("You have insufficient space")
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
return false, "You have insufficient funds"
|
|
|
|
|
return false, S("You have insufficient funds")
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
return false, "Vendor is inactive"..make_inactive_string(errorcode)
|
|
|
|
|
return false, S("Vendor is inactive")..make_inactive_string(errorcode)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
@ -740,14 +740,14 @@ local function get_vendor_buyer_fs(pos, player, lots)
|
|
|
|
|
|
|
|
|
|
local status_str
|
|
|
|
|
if status then
|
|
|
|
|
status_str = "active"
|
|
|
|
|
status_str = S("active")
|
|
|
|
|
else
|
|
|
|
|
status_str = "inactive"..make_inactive_string(errorcode)
|
|
|
|
|
status_str = S("inactive")..make_inactive_string(errorcode)
|
|
|
|
|
end
|
|
|
|
|
local status_fs =
|
|
|
|
|
"label[4,0.4;Vendor status: "..status_str.."]"..
|
|
|
|
|
"label[4,0.8;Message: "..meta:get_string("message").."]"..
|
|
|
|
|
"label[4,0;Vendor owned by: "..meta:get_string("owner").."]"
|
|
|
|
|
"label[4,0.4;"..S("Vendor status: ")..status_str.."]"..
|
|
|
|
|
"label[4,0.8;"..S("Message: ")..meta:get_string("message").."]"..
|
|
|
|
|
"label[4,0;"..S("Vendor owned by: ")..meta:get_string("owner").."]"
|
|
|
|
|
|
|
|
|
|
local setting_specific = ""
|
|
|
|
|
if not settings.accept_worn_input then
|
|
|
|
@ -1239,8 +1239,8 @@ local vendor_template = {
|
|
|
|
|
drop = drop_vendor,
|
|
|
|
|
on_construct = function(pos)
|
|
|
|
|
local meta = minetest.get_meta(pos)
|
|
|
|
|
meta:set_string("infotext", "Unconfigured Player Vendor")
|
|
|
|
|
meta:set_string("message", "Vendor initialized")
|
|
|
|
|
meta:set_string("infotext", S("Unconfigured Player Vendor"))
|
|
|
|
|
meta:set_string("message", S("Vendor initialized"))
|
|
|
|
|
meta:set_string("owner", "")
|
|
|
|
|
local inv = meta:get_inventory()
|
|
|
|
|
inv:set_size("main", 15*6)
|
|
|
|
|