aboutsummaryrefslogtreecommitdiff
path: root/po/ro
ModeNameSize
-rw-r--r--minetest.po19082logplain
#n52'>52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191
-- Kebab mod Copyright (C) 2017 Gabriel Pérez-Cerezo
--
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU Affero General Public License as
-- published by the Free Software Foundation, either version 3 of the
-- License, or (at your option) any later version.

-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-- GNU Affero General Public License for more details.

-- You should have received a copy of the GNU Affero General Public License
-- along with this program.  If not, see <https://www.gnu.org/licenses/>.

-- Functions and definitions

kebab = {}

kebab.cut_kebab = function (pos)
	local node = minetest.get_node(pos)
	local ndef = minetest.registered_nodes[node.name]
	if not ndef then return nil end
	if ndef.kebab_next_stage then
		node.name = ndef.kebab_next_stage
		minetest.swap_node(pos, node)
	end
	if ndef.kebab_cut_meat then
		return ndef.kebab_cut_meat
	end
	return nil
end

local function player_cut_kebab(pos, node, player)
   if player:get_wielded_item():get_name():match("sword") and player:get_inventory():room_for_item("main", "kebab:kebab_meat") then
      player:get_inventory():add_item("main", kebab.cut_kebab(pos))
   end

end

function kebab.register_kebab_rotisserie(node_name, description, texture, cut_meat_item)
	minetest.register_node(node_name.."_4", {
		tiles = {
			texture
		},
		description = description,
		drawtype = "nodebox",
		paramtype = "light",
		groups = { kebab_rotisserie = 4 },
		node_box = {
			type = "fixed",
			fixed = {
				{-0.0625, -0.5, -0.0625, 0.0625, 0.5, 0.0625}, -- NodeBox1
				{-0.1875, -0.375, -0.1875, 0.1875, 0.375, 0.1875}, -- NodeBox2
				{-0.3125, -0.0625, -0.3125, 0.3125, 0.375, 0.3125}, -- NodeBox3
				{-0.25, -0.25, -0.25, 0.25, 0.375, 0.25}, -- NodeBox4
			}
		},
		on_punch = player_cut_kebab,
		kebab_cut_meat = cut_meat_item,
		kebab_next_stage = node_name.."_3"
	})
	minetest.register_node(node_name.."_3", {
		tiles = {
			texture
		},
		description = description,
		drawtype = "nodebox",
		paramtype = "light",
		groups = { kebab_rotisserie = 3 },
		node_box = {
			type = "fixed",
			fixed = {
				{-0.0625, -0.5, -0.0625, 0.0625, 0.5, 0.0625}, -- NodeBox1
				{-0.1875, -0.375, -0.1875, 0.1875, 0.375, 0.1875}, -- NodeBox2
	--			{-0.3125, -0.0625, -0.3125, 0.3125, 0.375, 0.3125}, -- NodeBox3
				{-0.25, -0.25, -0.25, 0.25, 0.375, 0.25}, -- NodeBox4
			}
		},
		on_punch = player_cut_kebab,
		kebab_cut_meat = cut_meat_item,
		kebab_next_stage = node_name.."_2"
	})
	minetest.register_node(node_name.."_2", {
		tiles = {
			texture
		},
		description = description,
		drawtype = "nodebox",
		paramtype = "light",
		groups = { kebab_rotisserie = 2 },
		node_box = {
			type = "fixed",
			fixed = {
				{-0.0625, -0.5, -0.0625, 0.0625, 0.5, 0.0625}, -- NodeBox1
				{-0.1875, -0.25, -0.1875, 0.1875, 0.375, 0.1875}, -- NodeBox2
				{-0.125, -0.375, -0.125, 0.125, 0.375, 0.125}, -- NodeBox2
	--			{-0.3125, -0.0625, -0.3125, 0.3125, 0.375, 0.3125}, -- NodeBox3
	--			{-0.25, -0.25, -0.25, 0.25, 0.375, 0.25}, -- NodeBox4
			}
		},
		on_punch = player_cut_kebab,
		kebab_cut_meat = cut_meat_item,
		kebab_next_stage = node_name.."_1"
	})
	minetest.register_node(node_name.."_1", {
		tiles = {
			texture
		},
		description = description,
		drawtype = "nodebox",
		paramtype = "light",
		groups = { kebab_rotisserie = 1 },
		node_box = {
			type = "fixed",
			fixed = {
				{-0.0625, -0.5, -0.0625, 0.0625, 0.5, 0.0625}, -- NodeBox1
				{-0.125, -0.375, -0.125, 0.125, 0.375, 0.125}, -- NodeBox2
	--			{-0.3125, -0.0625, -0.3125, 0.3125, 0.375, 0.3125}, -- NodeBox3
	--			{-0.25, -0.25, -0.25, 0.25, 0.375, 0.25}, -- NodeBox4
			}
		},
		on_punch = player_cut_kebab,
		kebab_cut_meat = cut_meat_item,
		kebab_next_stage = "air"
	})
end

-- Items

-- Regular Kebab meat

kebab.register_kebab_rotisserie("kebab:kebab", "Kebab rotisserie", "kebab_kebab.png", "kebab:kebab_meat")

minetest.register_craftitem("kebab:kebab_meat", {
	description = "Kebab Meat",
	inventory_image = "kebab_meat.png",
})

minetest.register_craftitem("kebab:doner_kebab", {
	description = "Doener Kebab Sandwich",
	inventory_image = "kebab_doener.png",
	on_use = minetest.item_eat(8),
})

minetest.register_craft({
      output = "kebab:doner_kebab",
      type = "shapeless",
      recipe = {"kebab:kebab_meat", "farming:bread",
		"farming:tomato", "farming:cucumber", "group:food_onion", "farming:lettuce"}

})
minetest.register_craft({
      output = "kebab:kebab_4",
      recipe = {{"", "default:stick", ""},
	 {"", "mobs:meat", ""},
	 {"", "default:stick", ""}}

})


-- Chicken Kebab

kebab.register_kebab_rotisserie("kebab:chickenkebab", "Chicken Kebab rotisserie", "kebab_chickenkebab.png", "kebab:chickenkebab_meat")

minetest.register_craftitem("kebab:chickenkebab_meat", {
	description = "Chicken Kebab Meat",
	inventory_image = "kebab_chickenmeat.png",
})

minetest.register_craftitem("kebab:chicken_doner_kebab", {
	description = "Chicken Doener Kebab Sandwich",
	inventory_image = "kebab_doener.png",
	on_use = minetest.item_eat(8),
})

minetest.register_craft({
      output = "kebab:chicken_doner_kebab",
      type = "shapeless",
      recipe = {"kebab:chickenkebab_meat", "farming:bread",
		"farming:tomato", "farming:cucumber", "group:food_onion", "farming:lettuce"}

})
minetest.register_craft({
      output = "kebab:chickenkebab_4",
      recipe = {{"", "default:stick", ""},
	 {"", "mobs:chicken_cooked", ""},
	 {"", "default:stick", ""}}