* Whitespace only * restructure to save indentation * memory clear chatcommand takes no arguments * readme: key-name is not optional also to clarify, use more words * readme: storage is now persistent remove note about memory loss on reboot * readme: slight restructure and choice of words for some humans it is hard to process the word "it" ;) * readme: optical header change and whitespace
22 lines
596 B
Lua
22 lines
596 B
Lua
|
|
minetest.register_chatcommand("digiline_global_memory", {
|
|
params = "<name>",
|
|
description = "shows the current memory value",
|
|
func = function(name, param)
|
|
if param == "" or not param then
|
|
return false, "Please specify the memory name!"
|
|
end
|
|
|
|
return true, dump(digiline_global_memory.get_value(name, param) or "<empty>")
|
|
end
|
|
})
|
|
|
|
minetest.register_chatcommand("digiline_global_memory_clear", {
|
|
params = "",
|
|
description = "clears the global memory of the player",
|
|
func = function(name)
|
|
digiline_global_memory.clear(name)
|
|
return true, "Memory cleared"
|
|
end
|
|
})
|