2024-10-13 22:01:53 +00:00
|
|
|
-- Helper functions
|
|
|
|
local set_colour = function(colour, text)
|
|
|
|
return minetest.colorize(colour, text)
|
|
|
|
end
|
|
|
|
|
|
|
|
local credits = {
|
|
|
|
"=== WorldEditAdditions ===", "",
|
|
|
|
"Made by",
|
|
|
|
" - "..set_colour("#ff00d7", "Starbeamrainbowlabs").." (https://github.com/sbrl)",
|
|
|
|
" - "..set_colour("#ffd700", "VorTechnix").." (https://github.com/VorTechnix)",
|
|
|
|
"","With thanks to our discord members and everyone who has reported issues or contributed!",
|
|
|
|
}
|
|
|
|
|
2024-10-13 21:23:34 +00:00
|
|
|
local Notify = worldeditadditions_core.notify
|
2024-10-16 00:32:14 +00:00
|
|
|
worldeditadditions.normalize_test("credits", {
|
2024-10-13 22:01:53 +00:00
|
|
|
params = "N\\A",
|
|
|
|
description = "Sends WEA credits to player in info notification format.",
|
2024-10-13 21:23:34 +00:00
|
|
|
func = function(name, params_table)
|
2024-10-13 22:01:53 +00:00
|
|
|
local function send_credits(i)
|
|
|
|
Notify.info(name, credits[i])
|
|
|
|
if #credits > i then
|
|
|
|
minetest.after(1, send_credits, i+1)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
send_credits(1)
|
2024-10-17 18:12:53 +00:00
|
|
|
return true, "Thank you!"
|
2024-10-13 21:23:34 +00:00
|
|
|
end
|
|
|
|
})
|