chat_commands.lua 591 B

12345678910111213141516171819
  1. minetest.register_privilege("physio_admin", {description="admin physio_stress options"})
  2. minetest.register_chatcommand("psreset", {
  3. privs = {
  4. physio_admin = true
  5. },
  6. description = "Reset the counter for sunburn/nyctophoby protection",
  7. func = function(name, param)
  8. local ps=physio_stress.player[name]
  9. if ps==nil then return end
  10. ps.sunburn_delay=physio_stress.default_player.sunburn_delay
  11. ps.nyctophoby_delay=physio_stress.default_player.nyctophoby_delay
  12. ps.sunburn_protect=true
  13. ps.nyctophoby_protect=true
  14. minetest.chat_send_player(name, "All Attributs resetted")
  15. end
  16. })