Clean up descriptions and messages of commands
parent
8ad75bfa19
commit
d6a4b86571
|
@ -212,7 +212,7 @@ minetest.register_chatcommand("time", {
|
|||
|
||||
minetest.register_chatcommand("calendar", {
|
||||
params = "",
|
||||
description = "get the calendar",
|
||||
description = "Display current date and time",
|
||||
privs = {server=true},
|
||||
func = function(name, param)
|
||||
minetest.chat_send_player(name, "Date: "..seasons.get_day_of_week().." "..seasons.get_day_of_month().." "..seasons.get_month().." "..seasons.get_year())
|
||||
|
@ -228,7 +228,7 @@ minetest.register_chatcommand("calendar", {
|
|||
|
||||
minetest.register_chatcommand("setday", {
|
||||
params = "<day>",
|
||||
description = "set the day",
|
||||
description = "Set the current day",
|
||||
privs = {server=true},
|
||||
func = function(name, param)
|
||||
seasons.set_day(tonumber(param))
|
||||
|
@ -238,7 +238,7 @@ minetest.register_chatcommand("setday", {
|
|||
|
||||
minetest.register_chatcommand("setyear", {
|
||||
params = "<year>",
|
||||
description = "set the year",
|
||||
description = "Set the current year",
|
||||
privs = {server=true},
|
||||
func = function(name, param)
|
||||
seasons.set_year(tonumber(param))
|
||||
|
|
|
@ -3,19 +3,25 @@
|
|||
--
|
||||
|
||||
minetest.register_chatcommand("suicide", {
|
||||
description = "Commit Suicide",
|
||||
description = "Commit suicide",
|
||||
privs = {},
|
||||
func = function(name, param, player)
|
||||
minetest.chat_send_player(name, "Suiciding...")
|
||||
if minetest.settings:get_bool("enable_damage", true) == false then
|
||||
return false, "Can't commit suicide, damage is disabled!"
|
||||
end
|
||||
minetest.get_player_by_name(name):set_hp(0);
|
||||
return true, "You committed suicide."
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_chatcommand("heal", {
|
||||
description = "Completely Heal",
|
||||
description = "Completely heal yourself",
|
||||
privs = {server=true},
|
||||
func = function(name, param, player)
|
||||
minetest.chat_send_player(name, "Healing...")
|
||||
if minetest.settings:get_bool("enable_damage", true) == false then
|
||||
return false, "Can't heal yourself, damage is disabled!"
|
||||
end
|
||||
minetest.get_player_by_name(name):set_hp(20);
|
||||
return true, "You have been healed."
|
||||
end,
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue