mirror of
https://codeberg.org/usrib/emeraldbank.git
synced 2025-01-25 15:31:34 +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 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 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 max_logs = (tonumber(settings:get("fancy_vend.log_max")) or 40)
|
||||||
local autorotate_speed = (tonumber(settings:get("fancy_vend.autorotate_speed")) or 1)
|
local autorotate_speed = (tonumber(settings:get("fancy_vend.autorotate_speed")) or 1)
|
||||||
@ -1483,6 +1485,7 @@ minetest.register_node(":fancy_vend:player_depo", player_depo)
|
|||||||
minetest.register_node(":fancy_vend:admin_vendor", admin_vendor)
|
minetest.register_node(":fancy_vend:admin_vendor", admin_vendor)
|
||||||
minetest.register_node(":fancy_vend:admin_depo", admin_depo)
|
minetest.register_node(":fancy_vend:admin_depo", admin_depo)
|
||||||
|
|
||||||
|
if shopcraft then
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "fancy_vend:player_vendor",
|
output = "fancy_vend:player_vendor",
|
||||||
recipe = {
|
recipe = {
|
||||||
@ -1491,6 +1494,7 @@ minetest.register_craft({
|
|||||||
{ "mcl_core:gold_ingot","mcl_chests:chest","mcl_core:gold_ingot"},
|
{ "mcl_core:gold_ingot","mcl_chests:chest","mcl_core:gold_ingot"},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
end
|
||||||
|
|
||||||
-- Hopper support
|
-- Hopper support
|
||||||
if minetest.get_modpath("hopper") then
|
if minetest.get_modpath("hopper") then
|
||||||
|
@ -7,6 +7,9 @@ emeraldbank.bank_craft (bank craft) bool true
|
|||||||
# If true shop can be crafted
|
# If true shop can be crafted
|
||||||
emeraldbank.shop_craft (shop craft) bool true
|
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
|
# If true, bank will give emeralds to players for gamed time
|
||||||
emeraldbank.income_enabled (Is income enabled?) bool true
|
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 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
|
-- privilege
|
||||||
core.register_privilege("admin_shop", {
|
core.register_privilege("admin_shop", {
|
||||||
@ -340,7 +340,7 @@ core.register_on_player_receive_fields(function(sender, formname, fields)
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
||||||
if shopcraft then
|
if oldshopcraft then
|
||||||
core.register_craft({
|
core.register_craft({
|
||||||
output = "emeraldbank:shop 3",
|
output = "emeraldbank:shop 3",
|
||||||
recipe = {
|
recipe = {
|
||||||
|
Loading…
Reference in New Issue
Block a user