6 Commits 97f2e47288 ... 6ef76b06e0

Autor SHA1 Mensagem Data
  tenplus1 6ef76b06e0 remove unneeded local S 2 anos atrás
  tenplus1 cca7169b9e add missing butter recipe for wooden buckets 2 anos atrás
  tenplus1 eed132225c added support for wooden bucket and milking cow with recipes 2 anos atrás
  tenplus1 d9682b32c3 revert penguin hover 2 anos atrás
  tenplus1 9be290dd85 add penguin hover animation 2 anos atrás
  tenplus1 fe4010f217 add spanish translation (thanks mckaygerhard) 2 anos atrás
4 arquivos alterados com 117 adições e 32 exclusões
  1. 71 30
      cow.lua
  2. 0 2
      init.lua
  3. 46 0
      locale/mobs_animal.es.tr
  4. BIN
      textures/mobs_wooden_bucket_milk.png

+ 71 - 30
cow.lua

@@ -19,7 +19,7 @@ mobs:register_mob("mobs_animal:cow", {
 	mesh = "mobs_cow.b3d",
 	textures = {
 		{"mobs_cow.png"},
-		{"mobs_cow2.png"},
+		{"mobs_cow2.png"}
 	},
 	makes_footstep_sound = true,
 	sounds = {
@@ -32,7 +32,7 @@ mobs:register_mob("mobs_animal:cow", {
 	pushable = true,
 	drops = {
 		{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
-		{name = "mobs:leather", chance = 1, min = 0, max = 2},
+		{name = "mobs:leather", chance = 1, min = 0, max = 2}
 	},
 	water_damage = 0,
 	lava_damage = 5,
@@ -56,7 +56,7 @@ mobs:register_mob("mobs_animal:cow", {
 		die_start = 165,
 		die_end = 185,
 		die_speed = 10,
-		die_loop = false,
+		die_loop = false
 	},
 	follow = {
 		"farming:wheat", "default:grass_1", "farming:barley",
@@ -88,9 +88,11 @@ mobs:register_mob("mobs_animal:cow", {
 
 		local tool = clicker:get_wielded_item()
 		local name = clicker:get_player_name()
+		local item = tool:get_name()
 
 		-- milk cow with empty bucket
-		if tool:get_name() == "bucket:bucket_empty" then
+		if item == "bucket:bucket_empty"
+		or item == "wooden_bucket:bucket_wood_empty" then
 
 			--if self.gotten == true
 			if self.child == true then
@@ -108,12 +110,18 @@ mobs:register_mob("mobs_animal:cow", {
 			tool:take_item()
 			clicker:set_wielded_item(tool)
 
-			if inv:room_for_item("main", {name = "mobs:bucket_milk"}) then
-				clicker:get_inventory():add_item("main", "mobs:bucket_milk")
+			-- which bucket are we using
+			local ret_item = "mobs:bucket_milk"
+			if item == "wooden_bucket:bucket_wood_empty" then
+				ret_item = "mobs:wooden_bucket_milk"
+			end
+
+			if inv:room_for_item("main", {name = ret_item}) then
+				clicker:get_inventory():add_item("main", ret_item)
 			else
 				local pos = self.object:get_pos()
 				pos.y = pos.y + 0.5
-				minetest.add_item(pos, {name = "mobs:bucket_milk"})
+				minetest.add_item(pos, {name = ret_item})
 			end
 
 			self.gotten = true -- milked
@@ -131,7 +139,7 @@ mobs:register_mob("mobs_animal:cow", {
 			self.food = 0
 			self.gotten = false
 		end
-	end,
+	end
 })
 
 
@@ -142,10 +150,10 @@ mobs:spawn({
 	neighbors = {"group:grass"},
 	min_light = 14,
 	interval = 60,
-	chance = 8000, -- 15000
+	chance = 8000,
 	min_height = 5,
 	max_height = 200,
-	day_toggle = true,
+	day_toggle = true
 })
 end
 
@@ -174,18 +182,16 @@ minetest.register_craftitem(":mobs:glass_milk", {
 })
 
 minetest.register_craft({
---	type = "shapeless",
 	output = "mobs:glass_milk 4",
 	recipe = {
 		{"vessels:drinking_glass", "vessels:drinking_glass"},
 		{"vessels:drinking_glass", "vessels:drinking_glass"},
 		{"mobs:bucket_milk", ""}
 	},
-	replacements = { {"mobs:bucket_milk", "bucket:bucket_empty"} }
+	replacements = {{"mobs:bucket_milk", "bucket:bucket_empty"}}
 })
 
 minetest.register_craft({
---	type = "shapeless",
 	output = "mobs:bucket_milk",
 	recipe = {
 		{"group:food_milk_glass", "group:food_milk_glass"},
@@ -206,28 +212,24 @@ minetest.register_craftitem(":mobs:butter", {
 	groups = {food_butter = 1, flammable = 2}
 })
 
+local salt_item = "default:sapling" -- some saplings are high in sodium
+
 if minetest.get_modpath("farming") and farming and farming.mod then
+	salt_item = "farming:salt"
+end
+
 minetest.register_craft({
-	type = "shapeless",
-	output = "mobs:butter",
-	recipe = {"mobs:bucket_milk", "farming:salt"},
-	replacements = {{ "mobs:bucket_milk", "bucket:bucket_empty"}}
-})
-else -- some saplings are high in sodium so makes a good replacement item
-minetest.register_craft({
-	type = "shapeless",
 	output = "mobs:butter",
-	recipe = {"mobs:bucket_milk", "default:sapling"},
-	replacements = {{ "mobs:bucket_milk", "bucket:bucket_empty"}}
+	recipe = {{"mobs:bucket_milk", salt_item}},
+	replacements = {{"mobs:bucket_milk", "bucket:bucket_empty"}}
 })
-end
 
 -- cheese wedge
 minetest.register_craftitem(":mobs:cheese", {
 	description = S("Cheese"),
 	inventory_image = "mobs_cheese.png",
 	on_use = minetest.item_eat(4),
-	groups = {food_cheese = 1, flammable = 2},
+	groups = {food_cheese = 1, flammable = 2}
 })
 
 minetest.register_craft({
@@ -235,7 +237,7 @@ minetest.register_craft({
 	output = "mobs:cheese",
 	recipe = "mobs:bucket_milk",
 	cooktime = 5,
-	replacements = {{ "mobs:bucket_milk", "bucket:bucket_empty"}}
+	replacements = {{"mobs:bucket_milk", "bucket:bucket_empty"}}
 })
 
 -- cheese block
@@ -252,13 +254,52 @@ minetest.register_craft({
 	recipe = {
 		{"group:food_cheese", "group:food_cheese", "group:food_cheese"},
 		{"group:food_cheese", "group:food_cheese", "group:food_cheese"},
-		{"group:food_cheese", "group:food_cheese", "group:food_cheese"},
+		{"group:food_cheese", "group:food_cheese", "group:food_cheese"}
 	}
 })
 
 minetest.register_craft({
 	output = "mobs:cheese 9",
-	recipe = {
-		{"mobs:cheeseblock"},
-	}
+	recipe = {{"mobs:cheeseblock"}}
 })
+
+
+-- check for wooden bucket mod and add compatibility
+if minetest.get_modpath("wooden_bucket") then
+
+	minetest.register_craftitem(":mobs:wooden_bucket_milk", {
+		description = S("Wooden Bucket of Milk"),
+		inventory_image = "mobs_wooden_bucket_milk.png",
+		stack_max = 1,
+		on_use = minetest.item_eat(8, "wooden_bucket:bucket_wood_empty"),
+		groups = {food_milk = 1, flammable = 3, drink = 1}
+	})
+
+	minetest.register_craft({
+		output = "mobs:glass_milk 4",
+		recipe = {
+			{"vessels:drinking_glass", "vessels:drinking_glass"},
+			{"vessels:drinking_glass", "vessels:drinking_glass"},
+			{"mobs:wooden_bucket_milk", ""}
+		},
+		replacements = {{"mobs:wooden_bucket_milk", "wooden_bucket:bucket_wood_empty"}}
+	})
+
+	minetest.register_craft({
+		output = "mobs:wooden_bucket_milk",
+		recipe = {
+			{"group:food_milk_glass", "group:food_milk_glass"},
+			{"group:food_milk_glass", "group:food_milk_glass"},
+			{"wooden_bucket:bucket_wood_empty", ""}
+		},
+		replacements = {
+			{"group:food_milk_glass", "vessels:drinking_glass 4"}
+		}
+	})
+
+	minetest.register_craft({
+		output = "mobs:butter",
+		recipe = {{"mobs:wooden_bucket_milk", salt_item}},
+		replacements = {{"mobs:wooden_bucket_milk", "wooden_bucket:bucket_wood_empty"}}
+	})
+end

+ 0 - 2
init.lua

@@ -1,7 +1,5 @@
 local path = minetest.get_modpath(minetest.get_current_modname()) .. "/"
 
-local S
-
 -- Check for translation method
 local S
 if minetest.get_translator ~= nil then

+ 46 - 0
locale/mobs_animal.es.tr

@@ -0,0 +1,46 @@
+# textdomain: mobs_animal
+Bee=Abeja
+Honey=Miel
+Beehive=Colmena
+Honey Block=Bloque de Mel
+Bunny=Conejo
+Raw Rabbit=Carne de Conejo
+Cooked Rabbit=Conejo Asado
+Rabbit Hide=Conejo oculto
+Chicken=Gallina
+Chicken Egg=Huevo de Gallina
+Fried Egg=Huevo Frito
+Raw Chicken=Gallina cruda
+Cooked Chicken=Gallina Asada
+Feather=Pluma
+Cow already milked!=Vaca ordeñada
+Cow=Vaca
+Bucket of Milk=Balde de leche
+Cheese=Queso
+Cheese Block=Bloque de queso
+[MOD] Mobs Redo 'Animals' loaded=[MOD] Mobs redo Animals cargado
+Kitten=Gato
+Penguin=Pinguino
+Rat=Raton
+Cooked Rat=Raton Asado
+Black=Negro
+Blue=Azul
+Brown=Marrom
+Cyan=Cian
+Dark Green=Verde Oscuro
+Dark Grey=Gris Oscuro
+Green=Verde
+Grey=Gris
+Magenta=Magenta
+Orange=Naranja
+Pink=Rosa
+Red=Rojo
+Violet=Violeta
+White=Blanco
+Yellow=Amarillo
+@1 Sheep=Oveja @1 
+Raw Mutton=Carnero crudo
+Cooked Mutton=Carnero Assado
+Warthog=Javali
+Raw Porkchop=Costilla de Jabali crudo
+Cooked Porkchop=Costilla de Javali Assada

BIN
textures/mobs_wooden_bucket_milk.png