broadcast.lua 1.5 KB

1234567891011121314151617181920212223242526272829
  1. local S = minetest.get_translator("server_manager")
  2. local DELAY = 600
  3. local broadcast_index = 1
  4. local messages = {
  5. "[Server] " .. minetest.colorize("#eea160", S("Got some ideas about how to improve the server? Go to the main square, write us a book and put it into the suggestion box!")),
  6. "[Server] " .. minetest.colorize("#eea160", S("Why did we choose Minetest (which is an engine) instead of Minecraft (which is a videogame)? Because it's free software!")),
  7. "[Server] " .. minetest.colorize("#eea160", S("Do you want to develop your own minigame? We made a library to help you out: search for 'arena_lib' on GitLab and... maybe one day we'll also feature it here!")),
  8. "[Server] " .. minetest.colorize("#eea160", S("Do you want to support what we do (server and mods)? Offer us a coffee on liberapay.com/EticaDigitale")),
  9. "[Server] " .. minetest.colorize("#eea160", S("Playing while in a call is way more fun than alone; and we have a Mumble server for that! Join us at 185.242.180.132")),
  10. "[Server] " .. minetest.colorize("#eea160", S("Looking for people to play with or you want to follow the evolution of the server? Take part in our Matrix community: +minetest-aes:matrix.org (you need a client like Element)"))
  11. }
  12. local function main()
  13. broadcast_index = broadcast_index +1
  14. if broadcast_index > #messages then
  15. broadcast_index = 1
  16. end
  17. minetest.chat_send_all(messages[broadcast_index])
  18. minetest.after(DELAY, main)
  19. end
  20. minetest.after(DELAY, main)