Update server_shop mod to Git commit e62f33e...

https://github.com/AntumMT/mod-server_shop/tree/e62f33e
This commit is contained in:
Jordan Irwin 2021-05-12 22:23:17 -07:00
parent e661298ada
commit 6f24b159ef
7 changed files with 42 additions and 4 deletions

View File

@ -41,7 +41,7 @@ The game includes the mods from the default [minetest_game](https://github.com/m
* commerce/
* [atm][] ([GPL][lic.gpl3.0]) -- version: [1.0.4][ver.atm] *2021-04-21* ([patched][patch.atm])
* [currency][] ([LGPL][lic.lgpl3.0] / [CC BY-SA][lic.ccbysa4.0]) -- version: [2021-01-30][ver.currency]
* [server_shop][] ([MIT][lic.server_shop]) -- version: [993332e Git][ver.server_shop] *2021-05-12*
* [server_shop][] ([MIT][lic.server_shop]) -- version: [e62f33e Git][ver.server_shop] *2021-05-12*
* crafting/
* [craftguide][] ([MIT][lic.craftguide]) -- version: [f379998 Git][ver.craftguide] *2021-02-08* ([patched][patch.craftguide])
* [enchanting][] ([GPL / WTFPL / CC BY-SA-NA][lic.enchanting]) -- version: [13ea31c Git][ver.enchanting] *2016-12-16* ([patched][patch.enchanting])
@ -564,7 +564,7 @@ The game includes the mods from the default [minetest_game](https://github.com/m
[ver.pvp_areas]: https://github.com/everamzah/pvp_areas/tree/6e4d66d
[ver.quartz]: https://github.com/minetest-mods/quartz/tree/72ec06f
[ver.rainbow_ore]: https://github.com/FsxShader2012/rainbow_ore/tree/6e77693
[ver.server_shop]: https://github.com/AntumMT/mod-server_shop/tree/993332e
[ver.server_shop]: https://github.com/AntumMT/mod-server_shop/tree/e62f33e
[ver.sfinv_buttons]: http://repo.or.cz/minetest_sfinv_buttons.git/tree/ebb1f7c
[ver.shark]: https://github.com/AntumMT/mod-shark/tree/ef2507b
[ver.sheep]: https://github.com/AntumMT/mod-cmer/tree/7c91aaf

View File

@ -52,7 +52,7 @@ Example:
]
```
Currencies can be registered with `server_shop.register_currency`:
Currencies can be registered with `server_shop.register_currency` (***Note:** Only currency values of 1, 5, 10, 50, & 100 are currently supported*):
```lua
server_shop.register_currency("currency:minegeld", 1)
server_shop.register_currency("currency:minegeld_5", 5)

View File

@ -51,6 +51,22 @@ function ss.register_currency(item, value)
ss.log("action", item .. " registered as currency with value of " .. tostring(value))
end
if ss.use_currency_defaults then
local mg_notes = {
{"currency:minegeld", 1},
{"currency:minegeld_5", 5},
{"currency:minegeld_10", 10},
{"currency:minegeld_50", 50},
{"currency:minegeld_100", 100},
}
for _, c in ipairs(mg_notes) do
ss.register_currency(c[1], c[2])
end
ss.currency_suffix = "MG"
end
--- Registers a shop list to be accessed via a shop node.
--
-- TODO:

View File

@ -19,6 +19,7 @@ function ss.log(lvl, msg)
end
local scripts = {
"settings",
"api",
"deposit",
"formspec",

View File

@ -0,0 +1,12 @@
--- Settings for server_shop.
--
-- @module settings.lua
--- If currency mod is installed, automatically set up values for minegeld notes.
--
-- @setting server_shop.use_currency_defaults
-- @settype bool
-- @default true
server_shop.use_currency_defaults = core.settings:get_bool("server_shop.use_currency_defaults", true)

View File

@ -0,0 +1,3 @@
# If currency mod is installed, automatically set up values for minegeld notes.
server_shop.use_currency_defaults (Use currency mod defaults) bool true

View File

@ -562,6 +562,12 @@ pvp_areas.safemode (PvP Control areas are safe zones) bool false
pvp_areas.label (Show PvP area labels) string Defined area.
[*server_shop]
# If currency mod is installed, automatically set up values for minegeld notes.
server_shop.use_currency_defaults (Use currency mod defaults) bool true
[*slingshot]
# Require rubber band as additional ingredient in slingshot craft recipes.