Ajoute infos privilège "megabuilder" dans la commande /area_info
This commit is contained in:
		| @@ -403,7 +403,9 @@ minetest.register_chatcommand("area_info", { | |||||||
| 		elseif has_high_limit then | 		elseif has_high_limit then | ||||||
| 			table.insert(lines, | 			table.insert(lines, | ||||||
| 				"You have extended area protection".. | 				"You have extended area protection".. | ||||||
| 				" limits (\"areas_high_limit\" privilege).") | 					" limits (\"areas_high_limit\" privilege).") | ||||||
|  | 		elseif privs.megabuilder then | ||||||
|  | 			table.insert(lines, "You are a megabuilder (\"megabuilder\" privilege).") | ||||||
| 		end | 		end | ||||||
|  |  | ||||||
| 		-- Area count | 		-- Area count | ||||||
| @@ -415,7 +417,7 @@ minetest.register_chatcommand("area_info", { | |||||||
| 		end | 		end | ||||||
| 		local count_line = ("You have %d area%s"):format( | 		local count_line = ("You have %d area%s"):format( | ||||||
| 			area_num, area_num == 1 and "" or "s") | 			area_num, area_num == 1 and "" or "s") | ||||||
| 		if privs.areas then | 		if privs.areas or privs.megabuilder then | ||||||
| 			count_line = count_line.. | 			count_line = count_line.. | ||||||
| 				" and have no area protection limits." | 				" and have no area protection limits." | ||||||
| 		elseif can_prot then | 		elseif can_prot then | ||||||
| @@ -440,6 +442,8 @@ minetest.register_chatcommand("area_info", { | |||||||
| 					limit, size_limit) | 					limit, size_limit) | ||||||
| 				priv_limit_info("areas_high_limit", | 				priv_limit_info("areas_high_limit", | ||||||
| 					limit_high, size_limit_high) | 					limit_high, size_limit_high) | ||||||
|  | 			elseif privs.megabuilder then | ||||||
|  | 				table.insert(lines, "You can protect areas unlimited in size and number.") | ||||||
| 			elseif has_prot_priv then | 			elseif has_prot_priv then | ||||||
| 				size_info("You can protect areas", max_size) | 				size_info("You can protect areas", max_size) | ||||||
| 			end | 			end | ||||||
| @@ -448,4 +452,3 @@ minetest.register_chatcommand("area_info", { | |||||||
| 		return true, table.concat(lines, "\n") | 		return true, table.concat(lines, "\n") | ||||||
| 	end, | 	end, | ||||||
| }) | }) | ||||||
|  |  | ||||||
|   | |||||||
							
								
								
									
										6
									
								
								init.lua
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								init.lua
									
									
									
									
									
								
							| @@ -25,7 +25,11 @@ minetest.register_privilege("areas", { | |||||||
| 	description = "Can administer areas." | 	description = "Can administer areas." | ||||||
| }) | }) | ||||||
| minetest.register_privilege("areas_high_limit", { | minetest.register_privilege("areas_high_limit", { | ||||||
| 	description = "Can can more, bigger areas." | 	description = "Can do more bigger areas." | ||||||
|  | }) | ||||||
|  | -- Mega_builder privilege -- MFF | ||||||
|  | minetest.register_privilege("megabuilder", { | ||||||
|  | 	description = "Can protect an infinite amount of areas." | ||||||
| }) | }) | ||||||
|  |  | ||||||
| if not minetest.registered_privileges[areas.config.self_protection_privilege] then | if not minetest.registered_privileges[areas.config.self_protection_privilege] then | ||||||
|   | |||||||
| @@ -1,6 +1,3 @@ | |||||||
| -- Mega_builder privilege |  | ||||||
| minetest.register_privilege("megabuilder", "Can protect an infinite amount of areas.") |  | ||||||
|  |  | ||||||
| function areas:player_exists(name) | function areas:player_exists(name) | ||||||
| 	return minetest.get_auth_handler().get_auth(name) ~= nil | 	return minetest.get_auth_handler().get_auth(name) ~= nil | ||||||
| end | end | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user