mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2025-01-11 18:40:25 +01:00
Fixed homedecor's update, added inventorycheck
- Added inventorycheck mod - Fixed ereased table in last commit (homedecor's update) - Fixed all the wrong uses of register_node in mods/maptools/default_nodes.lua to avoid 0.4.12-name-check-system from crashing server. The diff have been sent to Calinou.
This commit is contained in:
parent
bcd0118ba9
commit
342f99f23c
@ -1,4 +1,5 @@
|
||||
local tmp = {}
|
||||
local itemframes = {}
|
||||
|
||||
minetest.register_entity("itemframes:item",{
|
||||
hp_max = 1,
|
||||
|
1
mods/inventorycheck/README.md
Normal file
1
mods/inventorycheck/README.md
Normal file
@ -0,0 +1 @@
|
||||
# inventorycheck
|
1
mods/inventorycheck/depends.txt
Normal file
1
mods/inventorycheck/depends.txt
Normal file
@ -0,0 +1 @@
|
||||
default
|
35
mods/inventorycheck/init.lua
Normal file
35
mods/inventorycheck/init.lua
Normal file
@ -0,0 +1,35 @@
|
||||
-- Check Inventory
|
||||
|
||||
minetest.register_privilege("inv", "Can use /inv")
|
||||
|
||||
minetest.register_chatcommand("inv", {
|
||||
params = "<name>",
|
||||
description = "Shows inventory of <name>",
|
||||
func = function(name, param)
|
||||
if not minetest.check_player_privs(name, {inv=true}) then
|
||||
return false, "You don't have permission to check inventories"
|
||||
end
|
||||
local player = minetest.get_player_by_name(param)
|
||||
if player == nil then
|
||||
minetest.chat_send_player(name, param.." is not online right now")
|
||||
return false
|
||||
end
|
||||
local player_inv = player:get_inventory()
|
||||
local invlist = param.."'s inventory: "
|
||||
for i=1,player_inv:get_size("main") do
|
||||
local items = player_inv:get_stack("main", i)
|
||||
items = items:to_string()
|
||||
if items ~= "" then
|
||||
invlist = invlist..items.." | "
|
||||
end
|
||||
end
|
||||
for i=1,player_inv:get_size("craft") do
|
||||
local items = player_inv:get_stack("craft", i)
|
||||
items = items:to_string()
|
||||
if items ~= "" then
|
||||
invlist = invlist..items.." | "
|
||||
end
|
||||
end
|
||||
minetest.chat_send_player(name, invlist)
|
||||
end,
|
||||
})
|
BIN
mods/maptools/.default_nodes.lua.swp
Normal file
BIN
mods/maptools/.default_nodes.lua.swp
Normal file
Binary file not shown.
@ -390,7 +390,7 @@ minetest.register_node("maptools:desert_sand_soil_wet", {
|
||||
|
||||
-- Fence:
|
||||
|
||||
minetest.register_node("default:fence_wood", {
|
||||
minetest.register_node(":default:fence_wood", {
|
||||
description = S("Unbreakable Wooden Fence"),
|
||||
range = 12,
|
||||
stack_max = 10000,
|
||||
@ -401,7 +401,7 @@ minetest.register_node("default:fence_wood", {
|
||||
})
|
||||
|
||||
-- carts:
|
||||
minetest.register_node("carts:rail_copper", {
|
||||
minetest.register_node(":carts:rail_copper", {
|
||||
description = "Unbreakable Copper Rail",
|
||||
drawtype = "raillike",
|
||||
tiles = {"carts_rail_copper.png", "carts_rail_copper_curved.png", "carts_rail_copper_t_junction.png", "carts_rail_copper_crossing.png"},
|
||||
@ -436,7 +436,7 @@ minetest.register_node("carts:rail_copper", {
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("carts:rail_power", {
|
||||
minetest.register_node(":carts:rail_power", {
|
||||
description = "Unbreakable Powered Rail",
|
||||
drawtype = "raillike",
|
||||
tiles = {"carts_rail_pwr.png", "carts_rail_curved_pwr.png", "carts_rail_t_junction_pwr.png", "carts_rail_crossing_pwr.png"},
|
||||
|
Loading…
Reference in New Issue
Block a user