forked from mtcontrib/3d_armor
		
	Add support for intllib
This commit is contained in:
		@@ -1,3 +1,7 @@
 | 
			
		||||
local S = function(s) return s end
 | 
			
		||||
if minetest.global_exists("intllib") then
 | 
			
		||||
	S = intllib.Getter()
 | 
			
		||||
end
 | 
			
		||||
local use_moreores = minetest.get_modpath("moreores")
 | 
			
		||||
 | 
			
		||||
if minetest.global_exists("armor") and armor.elements then
 | 
			
		||||
@@ -9,7 +13,7 @@ end
 | 
			
		||||
-- Regisiter Shields
 | 
			
		||||
 | 
			
		||||
minetest.register_tool("shields:shield_admin", {
 | 
			
		||||
	description = "Admin Shield",
 | 
			
		||||
	description = S("Admin Shield"),
 | 
			
		||||
	inventory_image = "shields_inv_shield_admin.png",
 | 
			
		||||
	groups = {armor_shield=1000, armor_heal=100, armor_use=0, not_in_creative_inventory=1},
 | 
			
		||||
	wear = 0,
 | 
			
		||||
@@ -17,13 +21,13 @@ minetest.register_tool("shields:shield_admin", {
 | 
			
		||||
 | 
			
		||||
if armor.materials.wood then
 | 
			
		||||
	minetest.register_tool("shields:shield_wood", {
 | 
			
		||||
		description = "Wooden Shield",
 | 
			
		||||
		description = S("Wooden Shield"),
 | 
			
		||||
		inventory_image = "shields_inv_shield_wood.png",
 | 
			
		||||
		groups = {armor_shield=5, armor_heal=0, armor_use=2000},
 | 
			
		||||
		wear = 0,
 | 
			
		||||
	})
 | 
			
		||||
	minetest.register_tool("shields:shield_enhanced_wood", {
 | 
			
		||||
		description = "Enhanced Wood Shield",
 | 
			
		||||
		description = S("Enhanced Wood Shield"),
 | 
			
		||||
		inventory_image = "shields_inv_shield_enhanced_wood.png",
 | 
			
		||||
		groups = {armor_shield=8, armor_heal=0, armor_use=1000},
 | 
			
		||||
		wear = 0,
 | 
			
		||||
@@ -40,13 +44,13 @@ end
 | 
			
		||||
 | 
			
		||||
if armor.materials.cactus then
 | 
			
		||||
	minetest.register_tool("shields:shield_cactus", {
 | 
			
		||||
		description = "Cactus Shield",
 | 
			
		||||
		description = S("Cactus Shield"),
 | 
			
		||||
		inventory_image = "shields_inv_shield_cactus.png",
 | 
			
		||||
		groups = {armor_shield=5, armor_heal=0, armor_use=2000},
 | 
			
		||||
		wear = 0,
 | 
			
		||||
	})
 | 
			
		||||
	minetest.register_tool("shields:shield_enhanced_cactus", {
 | 
			
		||||
		description = "Enhanced Cactus Shield",
 | 
			
		||||
		description = S("Enhanced Cactus Shield"),
 | 
			
		||||
		inventory_image = "shields_inv_shield_enhanced_cactus.png",
 | 
			
		||||
		groups = {armor_shield=8, armor_heal=0, armor_use=1000},
 | 
			
		||||
		wear = 0,
 | 
			
		||||
@@ -63,7 +67,7 @@ end
 | 
			
		||||
 | 
			
		||||
if armor.materials.steel then
 | 
			
		||||
	minetest.register_tool("shields:shield_steel", {
 | 
			
		||||
		description = "Steel Shield",
 | 
			
		||||
		description = S("Steel Shield"),
 | 
			
		||||
		inventory_image = "shields_inv_shield_steel.png",
 | 
			
		||||
		groups = {armor_shield=10, armor_heal=0, armor_use=500},
 | 
			
		||||
		wear = 0,
 | 
			
		||||
@@ -72,7 +76,7 @@ end
 | 
			
		||||
 | 
			
		||||
if armor.materials.bronze then
 | 
			
		||||
	minetest.register_tool("shields:shield_bronze", {
 | 
			
		||||
		description = "Bronze Shield",
 | 
			
		||||
		description = S("Bronze Shield"),
 | 
			
		||||
		inventory_image = "shields_inv_shield_bronze.png",
 | 
			
		||||
		groups = {armor_shield=10, armor_heal=6, armor_use=250},
 | 
			
		||||
		wear = 0,
 | 
			
		||||
@@ -81,7 +85,7 @@ end
 | 
			
		||||
 | 
			
		||||
if armor.materials.diamond then
 | 
			
		||||
	minetest.register_tool("shields:shield_diamond", {
 | 
			
		||||
		description = "Diamond Shield",
 | 
			
		||||
		description = S("Diamond Shield"),
 | 
			
		||||
		inventory_image = "shields_inv_shield_diamond.png",
 | 
			
		||||
		groups = {armor_shield=15, armor_heal=12, armor_use=100},
 | 
			
		||||
		wear = 0,
 | 
			
		||||
@@ -90,7 +94,7 @@ end
 | 
			
		||||
 | 
			
		||||
if armor.materials.gold then
 | 
			
		||||
	minetest.register_tool("shields:shield_gold", {
 | 
			
		||||
		description = "Gold Shield",
 | 
			
		||||
		description = S("Gold Shield"),
 | 
			
		||||
		inventory_image = "shields_inv_shield_gold.png",
 | 
			
		||||
		groups = {armor_shield=10, armor_heal=6, armor_use=250},
 | 
			
		||||
		wear = 0,
 | 
			
		||||
@@ -99,7 +103,7 @@ end
 | 
			
		||||
 | 
			
		||||
if armor.materials.mithril then
 | 
			
		||||
	minetest.register_tool("shields:shield_mithril", {
 | 
			
		||||
		description = "Mithril Shield",
 | 
			
		||||
		description = S("Mithril Shield"),
 | 
			
		||||
		inventory_image = "shields_inv_shield_mithril.png",
 | 
			
		||||
		groups = {armor_shield=15, armor_heal=12, armor_use=50},
 | 
			
		||||
		wear = 0,
 | 
			
		||||
@@ -108,7 +112,7 @@ end
 | 
			
		||||
 | 
			
		||||
if armor.materials.crystal then
 | 
			
		||||
	minetest.register_tool("shields:shield_crystal", {
 | 
			
		||||
		description = "Crystal Shield",
 | 
			
		||||
		description = S("Crystal Shield"),
 | 
			
		||||
		inventory_image = "shields_inv_shield_crystal.png",
 | 
			
		||||
		groups = {armor_shield=15, armor_heal=12, armor_use=50, armor_fire=1},
 | 
			
		||||
		wear = 0,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user