mirror of
https://codeberg.org/usrib/emeraldbank.git
synced 2024-12-23 06:32:25 +01:00
craft shops and old shops settings
This commit is contained in:
parent
3aecf0aeb8
commit
decf90ac92
@ -25,6 +25,8 @@ local S = core.get_translator(core.get_current_modname())
|
||||
|
||||
local settings = minetest.settings
|
||||
|
||||
local shopcraft = core.settings:get_bool("emeraldbank.shop_craft") or true
|
||||
|
||||
local display_node = (settings:get("fancy_vend.display_node") or "mcl_core:glass")
|
||||
local max_logs = (tonumber(settings:get("fancy_vend.log_max")) or 40)
|
||||
local autorotate_speed = (tonumber(settings:get("fancy_vend.autorotate_speed")) or 1)
|
||||
@ -1483,14 +1485,16 @@ minetest.register_node(":fancy_vend:player_depo", player_depo)
|
||||
minetest.register_node(":fancy_vend:admin_vendor", admin_vendor)
|
||||
minetest.register_node(":fancy_vend:admin_depo", admin_depo)
|
||||
|
||||
minetest.register_craft({
|
||||
output = "fancy_vend:player_vendor",
|
||||
recipe = {
|
||||
{ "mcl_core:gold_ingot",display_node, "mcl_core:gold_ingot"},
|
||||
{ "mcl_core:diamond", "mesecons:redstone", "mcl_core:diamond"},
|
||||
{ "mcl_core:gold_ingot","mcl_chests:chest","mcl_core:gold_ingot"},
|
||||
}
|
||||
})
|
||||
if shopcraft then
|
||||
minetest.register_craft({
|
||||
output = "fancy_vend:player_vendor",
|
||||
recipe = {
|
||||
{ "mcl_core:gold_ingot", display_node, "mcl_core:gold_ingot"},
|
||||
{ "mcl_core:diamond", "mesecons:redstone", "mcl_core:diamond"},
|
||||
{ "mcl_core:gold_ingot","mcl_chests:chest","mcl_core:gold_ingot"},
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
-- Hopper support
|
||||
if minetest.get_modpath("hopper") then
|
||||
|
@ -7,6 +7,9 @@ emeraldbank.bank_craft (bank craft) bool true
|
||||
# If true shop can be crafted
|
||||
emeraldbank.shop_craft (shop craft) bool true
|
||||
|
||||
# If true old shop can be crafted
|
||||
emeraldbank.old_shop_craft (old shop craft) bool false
|
||||
|
||||
# If true, bank will give emeralds to players for gamed time
|
||||
emeraldbank.income_enabled (Is income enabled?) bool true
|
||||
|
||||
|
4
shop.lua
4
shop.lua
@ -20,7 +20,7 @@
|
||||
|
||||
local S = core.get_translator(core.get_current_modname())
|
||||
|
||||
local shopcraft = core.settings:get_bool("emeraldbank.shop_craft") or true
|
||||
local oldshopcraft = core.settings:get_bool("emeraldbank.old_shop_craft") or false
|
||||
|
||||
-- privilege
|
||||
core.register_privilege("admin_shop", {
|
||||
@ -340,7 +340,7 @@ core.register_on_player_receive_fields(function(sender, formname, fields)
|
||||
end)
|
||||
|
||||
|
||||
if shopcraft then
|
||||
if oldshopcraft then
|
||||
core.register_craft({
|
||||
output = "emeraldbank:shop 3",
|
||||
recipe = {
|
||||
|
Loading…
Reference in New Issue
Block a user