Add more strings to random_messages.messages

Also reduced the interval between messages from 120 seconds to 60 seconds.
This commit is contained in:
Anand S 2018-02-18 19:33:28 +05:30 committed by rubenwardy
parent bb10976243
commit 231b49c146

View file

@ -27,12 +27,12 @@ function table.random( t )
end end
function random_messages.initialize() --Set the interval in minetest.conf. function random_messages.initialize() --Set the interval in minetest.conf.
minetest.setting_set("random_messages_interval",120) minetest.setting_set("random_messages_interval",60)
minetest.setting_save(); minetest.setting_save();
return 120 return 60
end end
function random_messages.set_interval() --Read the interval from minetest.conf(set it if it doesn'st exist) function random_messages.set_interval() --Read the interval from minetest.conf and set it if it doesn't exist
MESSAGE_INTERVAL = tonumber(minetest.setting_get("random_messages_interval")) or random_messages.initialize() MESSAGE_INTERVAL = tonumber(minetest.setting_get("random_messages_interval")) or random_messages.initialize()
end end
@ -58,7 +58,16 @@ function random_messages.read_messages()
"Use team doors (steel) to stop the enemy walking into your base.", "Use team doors (steel) to stop the enemy walking into your base.",
"Sprint by pressing the fast key (E) when you have stamina.", "Sprint by pressing the fast key (E) when you have stamina.",
"Like CTF? Give feedback using /report, and consider donating at rubenwardy.com/donate", "Like CTF? Give feedback using /report, and consider donating at rubenwardy.com/donate",
"Want to contribute? Feel free to visit our GitHub repo at github.com/rubenwardy/capturetheflag",
"Map makers needed! Visit ctf.rubenwardy.com to get involved.", "Map makers needed! Visit ctf.rubenwardy.com to get involved.",
"Using limited resources for building structures that don't strenghthen your base's defences is discouraged."
"Please use /report to notify the moderators of mis-behaving players, or any other issues.",
"Swearing, trolling and being rude will not be tolerated and strict action will be taken against you.",
"Trapping team-mates on purpose is strictly against the rules and you will be banned immediately."
"Always take only what you need from the team-chest.",
"Store all extra weapons in the team-chest - there's no point in hogging everything.",
"Avoid putting wooden tools and other useless items in the team-chest, as they unnecessarily occupy precious space.",
"Non-participation will result in a kick (after warnings), and then a temp-ban if it persists."
} }
end end