game-antum/mods/admin/server_shop
Jordan Irwin 7491001ad2 Update server_shop mod to v1.1...
Release: https://github.com/AntumMT/mod-server_shop/releases/tag/v1.1
2021-04-29 06:48:30 -07:00
..
models Add server_shop mod @ v1.0... 2021-04-27 15:54:34 -07:00
textures Add server_shop mod @ v1.0... 2021-04-27 15:54:34 -07:00
CHANGES.txt Add server_shop mod @ v1.0... 2021-04-27 15:54:34 -07:00
LICENSE.txt Add server_shop mod @ v1.0... 2021-04-27 15:54:34 -07:00
README.md Add server_shop mod @ v1.0... 2021-04-27 15:54:34 -07:00
TODO.txt Update server_shop mod to v1.1... 2021-04-29 06:48:30 -07:00
init.lua Update server_shop mod to v1.1... 2021-04-29 06:48:30 -07:00
mod.conf Add server_shop mod @ v1.0... 2021-04-27 15:54:34 -07:00
screenshot.png Add server_shop mod @ v1.0... 2021-04-27 15:54:34 -07:00

README.md

Server Shop

Description:

Shops intended to be set up by Minetest server administrators.

No craft recipe is given as this for administrators, currently a machine can only be set up with /giveme server_shop:shop command.

WARNING: this mod is in early development, see TODO list

screenshot

Usage:

Shop lists are registered with the server_shop.register_shop(name, id, def) function. name is a human-readable string that will be displayed as the shop's title. id is a string identifier associated with the shop list. def is the shop list definition. Shop lists are defined in a table of tupes in {itemname, price} format.

Registration example:

server_shop.register_shop("Basic", "basic", {
	{
		{"default:wood", 2},
		{"default:obsidian", 7},
	}
})

Shops can optionally be registered in <world_path>/server_shops.lua file (this will be changed in the future to use configuration instead of Lua code).

Server admins use the chat command /giveme server_shop:shop to receive a shop node. After placing the node, the ID can be set with the "Set ID" button & text input field (only players with the "server" privilege can set ID). Set the ID to the shop ID you want associated with this shop node ("basic" for the example above) & the list will be populated with the registered products & prices.

To make purchases, players deposit minegeld notes into the deposit slot. Select an item to purchase & press the "Buy" button. If there is adequate money deposited, player will receive the item & the price will be deducted from the deposited amount. Press the "Refund" button to retrieve any money not spent.

SECURITY WARNING: As stated, this mod is in early development. Currently, it is possible to interfere in another player's transactions. So this mod is not recommended for use with public servers at this time.

Licensing:

  • Code: MIT
  • Textures: CC0

Dependencies:

Compatible with: