diff --git a/mods/ENTITIES/mcl_boats/README.txt b/mods/ENTITIES/mcl_boats/README.txt deleted file mode 100644 index 0d56aa0e16..0000000000 --- a/mods/ENTITIES/mcl_boats/README.txt +++ /dev/null @@ -1,23 +0,0 @@ -# mcl_boats -This mod adds drivable boats. - -# Credits -## Mesh -Boat mesh (`models/mcl_boats_boat.b3d`) created by 22i. -Source: https://github.com/22i/minecraft-voxel-blender-models - -License of boat model: -GNU GPLv3 - -## Textures -See the main MineClone 2 README.md file to learn more. - -## Code -Code based on Minetest Game, licensed under the MIT License (MIT). - -Authors include: -* PilzAdam (2012-2016) -* Various Minetest / Minetest Game developers and contributors (2012-2016) -* maikerumine (2017) -* Wuzzy (2017) -* Fleckenstein (2020-2021) diff --git a/mods/ENTITIES/mcl_boats/init.lua b/mods/ENTITIES/mcl_boats/init.lua deleted file mode 100644 index a44e7ea871..0000000000 --- a/mods/ENTITIES/mcl_boats/init.lua +++ /dev/null @@ -1,484 +0,0 @@ -local S = minetest.get_translator(minetest.get_current_modname()) - -local boat_visual_size = {x = 1, y = 1, z = 1} -local paddling_speed = 22 -local boat_y_offset = 0.35 -local boat_y_offset_ground = boat_y_offset + 0.6 -local boat_side_offset = 1.001 -local boat_max_hp = 4 - -local function is_group(pos, group) - local nn = minetest.get_node(pos).name - return minetest.get_item_group(nn, group) ~= 0 -end - -local is_water = flowlib.is_water - -local function is_ice(pos) - return is_group(pos, "ice") -end - -local function get_sign(i) - if i == 0 then - return 0 - else - return i / math.abs(i) - end -end - -local function get_velocity(v, yaw, y) - local x = -math.sin(yaw) * v - local z = math.cos(yaw) * v - return {x = x, y = y, z = z} -end - -local function get_v(v) - return math.sqrt(v.x ^ 2 + v.z ^ 2) -end - -local function check_object(obj) - return obj and (obj:is_player() or obj:get_luaentity()) and obj -end - -local function get_visual_size(obj) - return obj:is_player() and {x = 1, y = 1, z = 1} or obj:get_luaentity()._old_visual_size or obj:get_properties().visual_size -end - -local function set_attach(boat) - boat._driver:set_attach(boat.object, "", - {x = 0, y = 0.42, z = -1}, {x = 0, y = 0, z = 0}) -end - -local function set_double_attach(boat) - boat._driver:set_attach(boat.object, "", - {x = 0, y = 0.42, z = 0.8}, {x = 0, y = 0, z = 0}) - boat._passenger:set_attach(boat.object, "", - {x = 0, y = 0.42, z = -2.2}, {x = 0, y = 0, z = 0}) -end - -local function attach_object(self, obj) - if self._driver then - if self._driver:is_player() then - self._passenger = obj - else - self._passenger = self._driver - self._driver = obj - end - set_double_attach(self) - else - self._driver = obj - set_attach(self) - end - - local visual_size = get_visual_size(obj) - local yaw = self.object:get_yaw() - obj:set_properties({visual_size = vector.divide(visual_size, boat_visual_size)}) - - if obj:is_player() then - local name = obj:get_player_name() - mcl_player.player_attached[name] = true - minetest.after(0.2, function(name) - local player = minetest.get_player_by_name(name) - if player then - mcl_player.player_set_animation(player, "sit" , 30) - end - end, name) - obj:set_look_horizontal(yaw) - mcl_title.set(obj, "actionbar", {text=S("Sneak to dismount"), color="white", stay=60}) - else - obj:get_luaentity()._old_visual_size = visual_size - end -end - -local function detach_object(obj, change_pos) - obj:set_detach() - obj:set_properties({visual_size = get_visual_size(obj)}) - if obj:is_player() then - mcl_player.player_attached[obj:get_player_name()] = false - mcl_player.player_set_animation(obj, "stand" , 30) - else - obj:get_luaentity()._old_visual_size = nil - end - if change_pos then - obj:set_pos(vector.add(obj:get_pos(), vector.new(0, 0.2, 0))) - end -end - --- --- Boat entity --- - -local boat = { - physical = true, - pointable = true, - -- Warning: Do not change the position of the collisionbox top surface, - -- lowering it causes the boat to fall through the world if underwater - collisionbox = {-0.5, -0.35, -0.5, 0.5, 0.3, 0.5}, - selectionbox = {-0.7, -0.35, -0.7, 0.7, 0.3, 0.7}, - visual = "mesh", - mesh = "mcl_boats_boat.b3d", - textures = {"mcl_boats_texture_oak_boat.png", "mcl_boats_texture_oak_boat.png", "mcl_boats_texture_oak_boat.png", "mcl_boats_texture_oak_boat.png", "mcl_boats_texture_oak_boat.png"}, - visual_size = boat_visual_size, - hp_max = boat_max_hp, - damage_texture_modifier = "^[colorize:white:0", - - _driver = nil, -- Attached driver (player) or nil if none - _passenger = nil, - _v = 0, -- Speed - _last_v = 0, -- Temporary speed variable - _removed = false, -- If true, boat entity is considered removed (e.g. after punch) and should be ignored - _itemstring = "mcl_boats:boat", -- Itemstring of the boat item (implies boat type) - _animation = 0, -- 0: not animated; 1: paddling forwards; -1: paddling forwards - _regen_timer = 0, - _damage_anim = 0, -} - -minetest.register_on_respawnplayer(detach_object) - -function boat.on_rightclick(self, clicker) - if self._passenger or not clicker or clicker:get_attach() then - return - end - attach_object(self, clicker) -end - - -function boat.on_activate(self, staticdata, dtime_s) - self.object:set_armor_groups({fleshy = 100}) - local data = minetest.deserialize(staticdata) - if type(data) == "table" then - self._v = data.v - self._last_v = self._v - self._itemstring = data.itemstring - - while #data.textures < 5 do - table.insert(data.textures, data.textures[1]) - end - - self.object:set_properties({textures = data.textures}) - end -end - -function boat.get_staticdata(self) - return minetest.serialize({ - v = self._v, - itemstring = self._itemstring, - textures = self.object:get_properties().textures - }) -end - -function boat.on_death(self, killer) - mcl_burning.extinguish(self.object) - - if killer and killer:is_player() and minetest.is_creative_enabled(killer:get_player_name()) then - local inv = killer:get_inventory() - if not inv:contains_item("main", self._itemstring) then - inv:add_item("main", self._itemstring) - end - else - minetest.add_item(self.object:get_pos(), self._itemstring) - end - if self._driver then - detach_object(self._driver) - end - if self._passenger then - detach_object(self._passenger) - end - self._driver = nil - self._passenger = nil -end - -function boat.on_punch(self, puncher, time_from_last_punch, tool_capabilities, dir, damage) - if damage > 0 then - self._regen_timer = 0 - end -end - -function boat.on_step(self, dtime, moveresult) - mcl_burning.tick(self.object, dtime, self) - - self._v = get_v(self.object:get_velocity()) * get_sign(self._v) - local v_factor = 1 - local v_slowdown = 0.02 - local p = self.object:get_pos() - local on_water = true - local on_ice = false - local in_water = is_water({x=p.x, y=p.y-boat_y_offset+1, z=p.z}) - local waterp = {x=p.x, y=p.y-boat_y_offset - 0.1, z=p.z} - if not is_water(waterp) then - on_water = false - if not in_water and is_ice(waterp) then - on_ice = true - else - v_slowdown = 0.04 - v_factor = 0.5 - end - elseif in_water then - on_water = false - in_water = true - v_factor = 0.75 - v_slowdown = 0.05 - end - - local hp = self.object:get_hp() - local regen_timer = self._regen_timer + dtime - if hp >= boat_max_hp then - regen_timer = 0 - elseif regen_timer >= 0.5 then - hp = hp + 1 - self.object:set_hp(hp) - regen_timer = 0 - end - self._regen_timer = regen_timer - - if moveresult and moveresult.collides then - for _, collision in pairs(moveresult.collisions) do - local pos = collision.node_pos - if collision.type == "node" and minetest.get_item_group(minetest.get_node(pos).name, "dig_by_boat") > 0 then - minetest.dig_node(pos) - end - end - end - - local had_passenger = self._passenger - - self._driver = check_object(self._driver) - self._passenger = check_object(self._passenger) - - if self._passenger then - if not self._driver then - self._driver = self._passenger - self._passenger = nil - else - local ctrl = self._passenger:get_player_control() - if ctrl and ctrl.sneak then - detach_object(self._passenger, true) - self._passenger = nil - end - end - end - - if self._driver then - if had_passenger and not self._passenger then - set_attach(self) - end - local ctrl = self._driver:get_player_control() - if ctrl and ctrl.sneak then - detach_object(self._driver, true) - self._driver = nil - return - end - local yaw = self.object:get_yaw() - if ctrl and ctrl.up then - -- Forwards - self._v = self._v + 0.1 * v_factor - - -- Paddling animation - if self._animation ~= 1 then - self.object:set_animation({x=0, y=40}, paddling_speed, 0, true) - self._animation = 1 - end - elseif ctrl and ctrl.down then - -- Backwards - self._v = self._v - 0.1 * v_factor - - -- Paddling animation, reversed - if self._animation ~= -1 then - self.object:set_animation({x=0, y=40}, -paddling_speed, 0, true) - self._animation = -1 - end - else - -- Stop paddling animation if no control pressed - if self._animation ~= 0 then - self.object:set_animation({x=0, y=40}, 0, 0, true) - self._animation = 0 - end - end - if ctrl and ctrl.left then - if self._v < 0 then - self.object:set_yaw(yaw - (1 + dtime) * 0.03 * v_factor) - else - self.object:set_yaw(yaw + (1 + dtime) * 0.03 * v_factor) - end - elseif ctrl and ctrl.right then - if self._v < 0 then - self.object:set_yaw(yaw + (1 + dtime) * 0.03 * v_factor) - else - self.object:set_yaw(yaw - (1 + dtime) * 0.03 * v_factor) - end - end - else - -- Stop paddling without driver - if self._animation ~= 0 then - self.object:set_animation({x=0, y=40}, 0, 0, true) - self._animation = 0 - end - - for _, obj in pairs(minetest.get_objects_inside_radius(self.object:get_pos(), 1.3)) do - local entity = obj:get_luaentity() - if entity and entity.is_mob then - attach_object(self, obj) - break - end - end - end - local s = get_sign(self._v) - if not on_ice and not on_water and not in_water and math.abs(self._v) > 2.0 then - v_slowdown = math.min(math.abs(self._v) - 2.0, v_slowdown * 5) - elseif not on_ice and in_water and math.abs(self._v) > 1.5 then - v_slowdown = math.min(math.abs(self._v) - 1.5, v_slowdown * 5) - end - self._v = self._v - v_slowdown * s - if s ~= get_sign(self._v) then - self._v = 0 - end - - p.y = p.y - boat_y_offset - local new_velo - local new_acce - if not is_water(p) and not on_ice then - -- Not on water or inside water: Free fall - --local nodedef = minetest.registered_nodes[minetest.get_node(p).name] - new_acce = {x = 0, y = -9.8, z = 0} - new_velo = get_velocity(self._v, self.object:get_yaw(), - self.object:get_velocity().y) - else - p.y = p.y + 1 - local is_obsidian_boat = self.object:get_luaentity()._itemstring == "mcl_boats:boat_obsidian" - if is_water(p) or is_obsidian_boat then - -- Inside water: Slowly sink - local y = self.object:get_velocity().y - y = y - 0.01 - if y < -0.2 then - y = -0.2 - end - new_acce = {x = 0, y = 0, z = 0} - new_velo = get_velocity(self._v, self.object:get_yaw(), y) - else - -- On top of water - new_acce = {x = 0, y = 0, z = 0} - if math.abs(self.object:get_velocity().y) < 0 then - new_velo = get_velocity(self._v, self.object:get_yaw(), 0) - else - new_velo = get_velocity(self._v, self.object:get_yaw(), - self.object:get_velocity().y) - end - end - end - - -- Terminal velocity: 8 m/s per axis of travel - local terminal_velocity = on_ice and 57.1 or 8.0 - for _,axis in pairs({"z","y","x"}) do - if math.abs(new_velo[axis]) > terminal_velocity then - new_velo[axis] = terminal_velocity * get_sign(new_velo[axis]) - end - end - - local yaw = self.object:get_yaw() - local anim = (boat_max_hp - hp - regen_timer * 2) / boat_max_hp * math.pi / 4 - - self.object:set_rotation(vector.new(anim, yaw, anim)) - self.object:set_velocity(new_velo) - self.object:set_acceleration(new_acce) -end - --- Register one entity for all boat types -minetest.register_entity("mcl_boats:boat", boat) - -local boat_ids = { "boat", "boat_spruce", "boat_birch", "boat_jungle", "boat_acacia", "boat_dark_oak", "boat_obsidian" } -local names = { S("Oak Boat"), S("Spruce Boat"), S("Birch Boat"), S("Jungle Boat"), S("Acacia Boat"), S("Dark Oak Boat"), S("Obsidian Boat") } -local craftstuffs = {} -if minetest.get_modpath("mcl_core") then - craftstuffs = { "mcl_core:wood", "mcl_core:sprucewood", "mcl_core:birchwood", "mcl_core:junglewood", "mcl_core:acaciawood", "mcl_core:darkwood", "mcl_core:obsidian" } -end -local images = { "oak", "spruce", "birch", "jungle", "acacia", "dark_oak", "obsidian" } - -for b=1, #boat_ids do - local itemstring = "mcl_boats:"..boat_ids[b] - - local longdesc, usagehelp, tt_help, help, helpname - help = false - -- Only create one help entry for all boats - if b == 1 then - help = true - longdesc = S("Boats are used to travel on the surface of water.") - usagehelp = S("Rightclick on a water source to place the boat. Rightclick the boat to enter it. Use [Left] and [Right] to steer, [Forwards] to speed up and [Backwards] to slow down or move backwards. Use [Sneak] to leave the boat, punch the boat to make it drop as an item.") - helpname = S("Boat") - end - tt_help = S("Water vehicle") - - minetest.register_craftitem(itemstring, { - description = names[b], - _tt_help = tt_help, - _doc_items_create_entry = help, - _doc_items_entry_name = helpname, - _doc_items_longdesc = longdesc, - _doc_items_usagehelp = usagehelp, - inventory_image = "mcl_boats_"..images[b].."_boat.png", - liquids_pointable = true, - groups = { boat = 1, transport = 1}, - stack_max = 1, - on_place = function(itemstack, placer, pointed_thing) - if pointed_thing.type ~= "node" then - return itemstack - end - - -- Call on_rightclick if the pointed node defines it - local node = minetest.get_node(pointed_thing.under) - if placer and not placer:get_player_control().sneak then - if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].on_rightclick then - return minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, placer, itemstack) or itemstack - end - end - - local pos = table.copy(pointed_thing.under) - local dir = vector.subtract(pointed_thing.above, pointed_thing.under) - - if math.abs(dir.x) > 0.9 or math.abs(dir.z) > 0.9 then - pos = vector.add(pos, vector.multiply(dir, boat_side_offset)) - elseif is_water(pos) then - pos = vector.add(pos, vector.multiply(dir, boat_y_offset)) - else - pos = vector.add(pos, vector.multiply(dir, boat_y_offset_ground)) - end - local boat = minetest.add_entity(pos, "mcl_boats:boat") - local texture = "mcl_boats_texture_"..images[b].."_boat.png" - boat:get_luaentity()._itemstring = itemstring - boat:set_properties({textures = { texture, texture, texture, texture, texture }}) - boat:set_yaw(placer:get_look_horizontal()) - if not minetest.is_creative_enabled(placer:get_player_name()) then - itemstack:take_item() - end - return itemstack - end, - _on_dispense = function(stack, pos, droppos, dropnode, dropdir) - local below = {x=droppos.x, y=droppos.y-1, z=droppos.z} - local belownode = minetest.get_node(below) - -- Place boat as entity on or in water - if minetest.get_item_group(dropnode.name, "water") ~= 0 or (dropnode.name == "air" and minetest.get_item_group(belownode.name, "water") ~= 0) then - minetest.add_entity(droppos, "mcl_boats:boat") - else - minetest.add_item(droppos, stack) - end - end, - }) - - local c = craftstuffs[b] - minetest.register_craft({ - output = itemstring, - recipe = { - {c, "", c}, - {c, c, c}, - }, - }) -end - -minetest.register_craft({ - type = "fuel", - recipe = "group:boat", - burntime = 20, -}) - -if minetest.get_modpath("doc_identifier") then - doc.sub.identifier.register_object("mcl_boats:boat", "craftitems", "mcl_boats:boat") -end diff --git a/mods/ENTITIES/mcl_boats/locale/mcl_boats.de.tr b/mods/ENTITIES/mcl_boats/locale/mcl_boats.de.tr deleted file mode 100644 index c1864a8711..0000000000 --- a/mods/ENTITIES/mcl_boats/locale/mcl_boats.de.tr +++ /dev/null @@ -1,12 +0,0 @@ -# textdomain: mcl_boats -Acacia Boat=Akazienboot -Birch Boat=Birkenboot -Boat=Boot -Boats are used to travel on the surface of water.=Boote werden benutzt, um sich auf der Wasseroberfläche zu bewegen. -Dark Oak Boat=Schwarzeichenboot -Jungle Boat=Dschungelboot -Oak Boat=Eichenboot -Rightclick on a water source to place the boat. Rightclick the boat to enter it. Use [Left] and [Right] to steer, [Forwards] to speed up and [Backwards] to slow down or move backwards. Use [Sneak] to leave the boat, punch the boat to make it drop as an item.=Rechtsklicken Sie auf eine Wasserquelle, um das Boot zu platzieren. Rechtsklicken Sie auf das Boot, um es zu betreten. Mit [Links] und [Rechts] lenken, mit [Vorwärts] und [Rückwärts] Geschwindigkeit regeln oder rückwärts fahren. Nutzen sie [Schleichen], um das Boot zu verlassen, schlagen Sie das Boot, um es als Gegenstand fallen zu lassen. -Spruce Boat=Fichtenboot -Water vehicle=Wasserfahrzeug -Sneak to dismount=Zum Aussteigen schleichen diff --git a/mods/ENTITIES/mcl_boats/locale/mcl_boats.es.tr b/mods/ENTITIES/mcl_boats/locale/mcl_boats.es.tr deleted file mode 100644 index 644efdb6bf..0000000000 --- a/mods/ENTITIES/mcl_boats/locale/mcl_boats.es.tr +++ /dev/null @@ -1,10 +0,0 @@ -# textdomain: mcl_boats -Acacia Boat=Barca de acacia -Birch Boat=Barca de abedul -Boat=Barca -Boats are used to travel on the surface of water.=Las barcas se utilizan para viajar en la superficie del agua. -Dark Oak Boat=Barca de roble oscuro -Jungle Boat=Barca de la selva -Oak Boat=Barca de roble -Rightclick on a water source to place the boat. Rightclick the boat to enter it. Use [Left] and [Right] to steer, [Forwards] to speed up and [Backwards] to slow down or move backwards. Rightclick the boat again to leave it, punch the boat to make it drop as an item.=Haga clic derecho en una fuente de agua para colocar el barco. Haga clic derecho en el barco para entrar. Utilice [Izquierda] y [Derecha] para dirigir, [Adelante] para acelerar y [Atrás] para reducir la velocidad o retroceder. Haga clic derecho en el barco nuevamente para dejarlo, golpee el barco para que se caiga como un artículo. -Spruce Boat=Barca de abeto diff --git a/mods/ENTITIES/mcl_boats/locale/mcl_boats.fr.tr b/mods/ENTITIES/mcl_boats/locale/mcl_boats.fr.tr deleted file mode 100644 index 785d50146c..0000000000 --- a/mods/ENTITIES/mcl_boats/locale/mcl_boats.fr.tr +++ /dev/null @@ -1,12 +0,0 @@ -# textdomain: mcl_boats -Acacia Boat=Bateau en Acacia -Birch Boat=Bateau en Bouleau -Boat=Bateau -Boats are used to travel on the surface of water.=Les bateaux sont utilisés pour voyager à la surface de l'eau. -Dark Oak Boat=Bateau en Chêne Noir -Jungle Boat=Bateau en Acajou -Oak Boat=Bateau en Chêne -Rightclick on a water source to place the boat. Rightclick the boat to enter it. Use [Left] and [Right] to steer, [Forwards] to speed up and [Backwards] to slow down or move backwards. Use [Sneak] to leave the boat, punch the boat to make it drop as an item.=Faites un clic droit sur une source d'eau pour placer le bateau. Faites un clic droit sur le bateau pour y entrer. Utilisez [Gauche] et [Droite] pour diriger, [Avant] pour accélérer et [Arrière] pour ralentir ou reculer. Utilisez [Sneak] pour le quitter, frappez le bateau pour le faire tomber en tant qu'objet. -Spruce Boat=Bateau en Sapin -Water vehicle=Véhicule aquatique -Sneak to dismount= \ No newline at end of file diff --git a/mods/ENTITIES/mcl_boats/locale/mcl_boats.pl.tr b/mods/ENTITIES/mcl_boats/locale/mcl_boats.pl.tr deleted file mode 100644 index 17b5183bce..0000000000 --- a/mods/ENTITIES/mcl_boats/locale/mcl_boats.pl.tr +++ /dev/null @@ -1,12 +0,0 @@ -# textdomain: mcl_boats -Acacia Boat=Akacjowa łódź -Birch Boat=Brzozowa łódź -Boat=Łódź -Boats are used to travel on the surface of water.=Łodzie są wykorzystywane do podróżowania po powierzchni wody. -Dark Oak Boat=Ciemno-dębowa łódź -Jungle Boat=Tropikalna łódź -Oak Boat=Dębowa łódź -Rightclick on a water source to place the boat. Rightclick the boat to enter it. Use [Left] and [Right] to steer, [Forwards] to speed up and [Backwards] to slow down or move backwards. Use [Sneak] to leave the boat, punch the boat to make it drop as an item.=Kliknij prawym przyciskiem myszy na źródło wody by postawić łódź. Kliknij prawym przyciskiem myszy by w nią wsiąść. Użyj przycisków [Lewy] oraz [Prawy] by sterować, [Naprzód] by przyspieszyć i [W tył] by zwolnić lub się cofać. Kliknij [Skradanie] by z niej wyjść, uderz ją by wziąć ją jako przedmiot. -Spruce Boat=Świerkowa łódź -Water vehicle=Pojazd wodny -Sneak to dismount=Skradaj się by opuścić łódź diff --git a/mods/ENTITIES/mcl_boats/locale/mcl_boats.ru.tr b/mods/ENTITIES/mcl_boats/locale/mcl_boats.ru.tr deleted file mode 100644 index 5bd6e4c4d7..0000000000 --- a/mods/ENTITIES/mcl_boats/locale/mcl_boats.ru.tr +++ /dev/null @@ -1,11 +0,0 @@ -# textdomain: mcl_boats -Acacia Boat=Лодка из акации -Birch Boat=Берёзовая лодка -Boat=Лодка -Boats are used to travel on the surface of water.=С помощью лодки можно путешествовать по водной поверхности. -Dark Oak Boat=Лодка из тёмного дуба -Jungle Boat=Лодка из дерева джунглей -Oak Boat=Дубовая лодка -Rightclick on a water source to place the boat. Rightclick the boat to enter it. Use [Left] and [Right] to steer, [Forwards] to speed up and [Backwards] to slow down or move backwards. Rightclick the boat again to leave it, punch the boat to make it drop as an item.=Правый клик по воде спустит лодку на воду. Правый клик по лодке разместит вас в ней. [Влево] и [Вправо] - рулить, [Вперед] - разгоняться, [Назад] - тормозить или плыть назад. Правый клик по лодке, когда вы в ней, позволит выйти из неё. Удар по лодке превратит её обратно в предмет. -Spruce Boat=Еловая лодка -Water vehicle=Водный транспорт diff --git a/mods/ENTITIES/mcl_boats/locale/mcl_boats.zh_TW.tr b/mods/ENTITIES/mcl_boats/locale/mcl_boats.zh_TW.tr deleted file mode 100644 index c1c404f2ac..0000000000 --- a/mods/ENTITIES/mcl_boats/locale/mcl_boats.zh_TW.tr +++ /dev/null @@ -1,11 +0,0 @@ -# textdomain: mcl_boats -Acacia Boat=相思木船 -Birch Boat=白樺木船 -Boat=船 -Boats are used to travel on the surface of water.=船是用來在水上行走的交通工具。 -Dark Oak Boat=黑橡木船 -Jungle Boat=叢林木船 -Oak Boat=橡木船 -Rightclick on a water source to place the boat. Rightclick the boat to enter it. Use [Left] and [Right] to steer, [Forwards] to speed up and [Backwards] to slow down or move backwards. Rightclick the boat again to leave it, punch the boat to make it drop as an item.=右鍵單擊水源以放置船。右鍵單擊船以搭乘它。使用[左]和[右]進行轉向,[向前]加快速度,[向後]減速或向後移動。再次右鍵單擊船以離開它,打擊船以使其掉落為物品。 -Spruce Boat=杉木船 -Water vehicle=水上交通工具 diff --git a/mods/ENTITIES/mcl_boats/locale/template.txt b/mods/ENTITIES/mcl_boats/locale/template.txt deleted file mode 100644 index ac52bc19ff..0000000000 --- a/mods/ENTITIES/mcl_boats/locale/template.txt +++ /dev/null @@ -1,12 +0,0 @@ -# textdomain: mcl_boats -Acacia Boat= -Birch Boat= -Boat= -Boats are used to travel on the surface of water.= -Dark Oak Boat= -Jungle Boat= -Oak Boat= -Rightclick on a water source to place the boat. Rightclick the boat to enter it. Use [Left] and [Right] to steer, [Forwards] to speed up and [Backwards] to slow down or move backwards. Use [Sneak] to leave the boat, punch the boat to make it drop as an item.= -Spruce Boat= -Water vehicle= -Sneak to dismount= diff --git a/mods/ENTITIES/mcl_boats/mod.conf b/mods/ENTITIES/mcl_boats/mod.conf deleted file mode 100644 index 61463b6ec2..0000000000 --- a/mods/ENTITIES/mcl_boats/mod.conf +++ /dev/null @@ -1,7 +0,0 @@ -name = mcl_boats -author = PilzAdam -description = Adds drivable boats. -depends = mcl_player, flowlib, mcl_title -optional_depends = mcl_core, doc_identifier - - diff --git a/mods/ENTITIES/mcl_boats/models/mcl_boats_boat.b3d b/mods/ENTITIES/mcl_boats/models/mcl_boats_boat.b3d deleted file mode 100644 index 6c9c314693..0000000000 Binary files a/mods/ENTITIES/mcl_boats/models/mcl_boats_boat.b3d and /dev/null differ diff --git a/mods/ENTITIES/mcl_boats/textures/mcl_boats_acacia_boat.png b/mods/ENTITIES/mcl_boats/textures/mcl_boats_acacia_boat.png deleted file mode 100644 index 3ba0091173..0000000000 Binary files a/mods/ENTITIES/mcl_boats/textures/mcl_boats_acacia_boat.png and /dev/null differ diff --git a/mods/ENTITIES/mcl_boats/textures/mcl_boats_birch_boat.png b/mods/ENTITIES/mcl_boats/textures/mcl_boats_birch_boat.png deleted file mode 100644 index ac0f3dc1b5..0000000000 Binary files a/mods/ENTITIES/mcl_boats/textures/mcl_boats_birch_boat.png and /dev/null differ diff --git a/mods/ENTITIES/mcl_boats/textures/mcl_boats_dark_oak_boat.png b/mods/ENTITIES/mcl_boats/textures/mcl_boats_dark_oak_boat.png deleted file mode 100644 index 01ccb4198f..0000000000 Binary files a/mods/ENTITIES/mcl_boats/textures/mcl_boats_dark_oak_boat.png and /dev/null differ diff --git a/mods/ENTITIES/mcl_boats/textures/mcl_boats_jungle_boat.png b/mods/ENTITIES/mcl_boats/textures/mcl_boats_jungle_boat.png deleted file mode 100644 index 4bcdb17515..0000000000 Binary files a/mods/ENTITIES/mcl_boats/textures/mcl_boats_jungle_boat.png and /dev/null differ diff --git a/mods/ENTITIES/mcl_boats/textures/mcl_boats_oak_boat.png b/mods/ENTITIES/mcl_boats/textures/mcl_boats_oak_boat.png deleted file mode 100644 index 371596f63e..0000000000 Binary files a/mods/ENTITIES/mcl_boats/textures/mcl_boats_oak_boat.png and /dev/null differ diff --git a/mods/ENTITIES/mcl_boats/textures/mcl_boats_obsidian_boat.png b/mods/ENTITIES/mcl_boats/textures/mcl_boats_obsidian_boat.png deleted file mode 100644 index 6ae10c0c4b..0000000000 Binary files a/mods/ENTITIES/mcl_boats/textures/mcl_boats_obsidian_boat.png and /dev/null differ diff --git a/mods/ENTITIES/mcl_boats/textures/mcl_boats_spruce_boat.png b/mods/ENTITIES/mcl_boats/textures/mcl_boats_spruce_boat.png deleted file mode 100644 index 5c40fc901b..0000000000 Binary files a/mods/ENTITIES/mcl_boats/textures/mcl_boats_spruce_boat.png and /dev/null differ diff --git a/mods/ENTITIES/mcl_boats/textures/mcl_boats_texture_acacia_boat.png b/mods/ENTITIES/mcl_boats/textures/mcl_boats_texture_acacia_boat.png deleted file mode 100644 index 958f0a8b24..0000000000 Binary files a/mods/ENTITIES/mcl_boats/textures/mcl_boats_texture_acacia_boat.png and /dev/null differ diff --git a/mods/ENTITIES/mcl_boats/textures/mcl_boats_texture_birch_boat.png b/mods/ENTITIES/mcl_boats/textures/mcl_boats_texture_birch_boat.png deleted file mode 100644 index eb0a5bf2cf..0000000000 Binary files a/mods/ENTITIES/mcl_boats/textures/mcl_boats_texture_birch_boat.png and /dev/null differ diff --git a/mods/ENTITIES/mcl_boats/textures/mcl_boats_texture_dark_oak_boat.png b/mods/ENTITIES/mcl_boats/textures/mcl_boats_texture_dark_oak_boat.png deleted file mode 100644 index 5e6f658882..0000000000 Binary files a/mods/ENTITIES/mcl_boats/textures/mcl_boats_texture_dark_oak_boat.png and /dev/null differ diff --git a/mods/ENTITIES/mcl_boats/textures/mcl_boats_texture_jungle_boat.png b/mods/ENTITIES/mcl_boats/textures/mcl_boats_texture_jungle_boat.png deleted file mode 100644 index acae2e5326..0000000000 Binary files a/mods/ENTITIES/mcl_boats/textures/mcl_boats_texture_jungle_boat.png and /dev/null differ diff --git a/mods/ENTITIES/mcl_boats/textures/mcl_boats_texture_oak_boat.png b/mods/ENTITIES/mcl_boats/textures/mcl_boats_texture_oak_boat.png deleted file mode 100644 index d5aff737f3..0000000000 Binary files a/mods/ENTITIES/mcl_boats/textures/mcl_boats_texture_oak_boat.png and /dev/null differ diff --git a/mods/ENTITIES/mcl_boats/textures/mcl_boats_texture_obsidian_boat.png b/mods/ENTITIES/mcl_boats/textures/mcl_boats_texture_obsidian_boat.png deleted file mode 100644 index af3c24b30e..0000000000 Binary files a/mods/ENTITIES/mcl_boats/textures/mcl_boats_texture_obsidian_boat.png and /dev/null differ diff --git a/mods/ENTITIES/mcl_boats/textures/mcl_boats_texture_spruce_boat.png b/mods/ENTITIES/mcl_boats/textures/mcl_boats_texture_spruce_boat.png deleted file mode 100644 index f5d0d07b2a..0000000000 Binary files a/mods/ENTITIES/mcl_boats/textures/mcl_boats_texture_spruce_boat.png and /dev/null differ diff --git a/mods/HUD/hudbars/API.md b/mods/HUD/hudbars/API.md deleted file mode 100644 index ee112ecebc..0000000000 --- a/mods/HUD/hudbars/API.md +++ /dev/null @@ -1,211 +0,0 @@ -API documentation for the HUD bars mod -====================================== - -## Introduction -This API allows you to add, change, hide and unhide custom HUD bars for this mod. - -## Overview -To give you a *very* brief overview over this API, here is the basic workflow on how to add your own custom HUD bar: - -* Create images for your HUD bar -* Call `hb.register_hudbar` to make the definition of the HUD bar known to this mod -* Call `hb.init_hudbar` for each player for which you want to use previously defined HUD bar -* Use `hb.change_hudbar` whenever you need to change the values of a HUD bar of a certain player -* If you need it: Use `hb.hide_hudbar` and `hb.unhide_hudbar` to hide or unhide HUD bars of a certain player - -## The basic rules -In order to use this API, you should be aware of a few basic rules in order to understand it: - -* A HUD bar is an approximate graphical representation of the ratio of a current value and a maximum value, i.e. current health of 15 and maximum health of 20. A full HUD bar represents 100%, an empty HUD bar represents 0%. -* The current value must always be equal to or smaller then the maximum -* Both current value and maximum must not be smaller than 0 -* Both current value and maximum must be real numbers. So no NaN, infinity, etc. -* The HUD bar will be hidden if the maximum equals 0. This is intentional. -* The health and breath HUD bars are hardcoded. - -These are soft rules, the HUD bars mod will not enforce all of these. -But this mod has been programmed under the assumption that these rules are followed, for integrity. - -## Adding a HUD bar -To make a new HUD bar known to this mod, you need … - -* … an image of size 2×16 for the bar -* … an icon of size 16×16 (optional) -* … to register it with `hb.register_hudbar` - -### Bar image -The image for the bar will be repeated horizontally to denote the “value” of the HUD bar. -It **must** be of size 2×16. -If neccessary, the image will be split vertically in half, and only the left half of the image -is displayed. So the final HUD bar will always be displayed on a per-pixel basis. - -The default bar images are single-colored, but you can use other styles as well, for instance, -a vertical gradient. - -### Icon -A 16×16 image shown left of the HUD bar. This is optional. - -### `hb.register_hudbar(identifier, text_color, label, textures, direction, default_start_value, default_start_max, default_start_hidden, format_string, format_string_config)` -This function registers a new custom HUD bar definition to the HUD bars mod, so it can be later used to be displayed, changed, hidden -and unhidden on a per-player basis. -Note this does not yet display the HUD bar. - -The HUD bars will be displayed in a “first come, first serve” order. This API does not allow fow a custom order or a way to set it -manually in a reliable way. However, you can use the setting `hudbars_sorting` for this. See the advanced setting menu in Minetest -for more information. - - -#### Parameters -* `identifier`: A globally unique internal name for the HUD bar, will be used later to refer to it. Please only rely on alphanumeric characters for now. The identifiers “`health`” and “`breath`” are used internally for the built-in health and breath bar, respectively. Please do not use these names. -* `text_color`: A 3-octet number defining the color of the text. The octets denote, in this order red, green and blue and range from `0x00` (complete lack of this component) to `0xFF` (full intensity of this component). Example: `0xFFFFFF` for white. -* `label`: A string which is displayed on the HUD bar itself to describe the HUD bar. Try to keep this string short. -* `textures`: A table with the following fields: - * `bar`: The file name of the bar image (as string). This is only used for the `progress_bar` bar type (see `README.txt`, settings section). - * `icon`: The file name of the icon, as string. For the `progress_bar` type, it is shown as single image left of the bar, for the two statbar bar types, it is used as the statbar icon and will be repeated. This field can be `nil`, in which case no icon will be used, but this is not recommended, because the HUD bar will be invisible if the one of the statbar bar types is used. - * `bgicon`: The file name of the background icon, it is used as the background for the modern statbar mode only. This field can be `nil`, in which case no background icon will be displayed in this mode. -* `direction`: Either left to right(0), or right to left(1). -* `default_start_value`: If this HUD bar is added to a player, and no initial value is specified, this value will be used as initial current value -* `default_max_value`: If this HUD bar is added to a player, and no initial maximum value is specified, this value will be used as initial maximum value -* `default_start_hidden`: The HUD bar will be initially start hidden by default when added to a player. Use `hb.unhide_hudbar` to unhide it. -* `format_string`: Optional; You can specify an alternative format string to use for the final text on the HUD bar. The default format string is “`@1: @2/@3`” (The “@” numbers are placeholders that have a meaning in this order: @1 = Label, @2 = current value, @3 = maximum value). Do *not* use minetest.translator on this string, the string will be translated by `hudbars`, but you still must put this string into the translation catalogue file. -* `format_string_config`: Required if `format_string` is set. This allows to change which parameters to use in the format string. It's a table with these fields: - * `textdomain`: Text domain of the format string, used by `minetest.translate` - * `order`: Table that contains the order of the placeholders. It's also possible to remove placeholders. Default order: `{ "label", "value", "max_value" }` - * `format_value`: Format string to apply when displaying `value`. Syntax is same as in `string.format`. Default: `"%d"` - * `format_max_value`: Same as `format_value` but is applied to `max_value` - -#### Example -Example (mostly) from `hbarmor` mod: - -``` -hb.register_hudbar("armor", 0xFFFFFF, minetest.translator("hbarmor", "Armor"), { icon = "hbarmor_icon.png", bgicon = "hbarmor_bgicon.png", bar = "hbarmor_bar.png" }, 0, 100, hbarmor.autohide, N("@1: @2%"), { order = { "label", "value" }, textdomain = "hbarmor" } ) -``` - -Displays an armor HUD bar with a label of the form „Armor: 53%“. (`N` is a dummy function that returns its argument, used to make the string visible for translator scripts.) - -#### Return value -Always `nil`. - - -## Displaying a HUD bar -After a HUD bar has been registered, they are not yet displayed yet for any player. HUD bars must be -explicitly initialized on a per-player basis. - -You probably want to do this in the `minetest.register_on_joinplayer`. - -### `hb.init_hudbar(player, identifier, start_value, start_max, start_hidden)` -This function initialzes and activates a previously registered HUD bar and assigns it to a -certain client/player. This has only to be done once per player and after that, you can change -the values using `hb.change_hudbar`. - -However, if `start_hidden` was set to `true` for the HUD bar (in `hb.register_hudbar`), the HUD bar -will initially be hidden, but the HUD elements are still sent to the client. Otherwise, -the HUD bar will be initially be shown to the player. - -#### Parameters -* `player`: `ObjectRef` of the player to which the new HUD bar should be displayed to. -* `identifier`: The identifier of the HUD bar type, as specified in `hb.register_hudbar`. -* `start_value`: The initial current value of the HUD bar. This is optional, `default_start_value` of the registration function will be used, if this is `nil`. -* `start_max`: The initial maximum value of the HUD bar. This is optional, `default_start_max` of the registration function will be used, if this is `nil` -* `start_hidden`: Whether the HUD bar is initially hidden. This is optional, `default_start_hidden` of the registration function will be used as default - -#### Return value -`true` on success, `false` otherwise. - - -## Modifying a HUD bar -After a HUD bar has been added, you can change the current and maximum value and other attributes on a per-player basis. -You use the function `hb.change_hudbar` for this. - -### `hb.change_hudbar(player, identifier, new_value, new_max_value, new_icon, new_bgicon, new_bar, new_label, new_text_color)` -Changes the values and the appearance of an initialized HUD bar for a certain player. `new_value` -and `new_max_value` are the most important parameters as they specify the new current and maximum new values, you do not need -to worry too much about the other parameters. - -The following parameters are less important and provided for styling the HUD bar after registration (if -this is desired). The “styling” parameters parallel the parameters of `hb.register_hudbar`. It is -recommended to not change the style of a HUD bar too often as this can be distracting or confusing -for players. - -`new_value`, `new_max_value` `new_icon`, `new_bgicon`, `new_bar`, `new_label` and `new_text_color` can be -`nil`; if one of them is `nil`, that means the value is unchanged. If all those values are `nil`, this -function is a no-op. - -This function tries to minimize the amount of calls to `hud_change` of the Minetest Lua API -(and thus, network traffic), when you only change the value and/or maximum value. In this case, -`hud_change` is only called if it is actually needed, e.g. when the actual length of the bar -or the displayed string changed, so you do not have to worry about it. There is, however, no -such network optimization for the “styling” parameters, so keep this in mind. - -#### Parameters -* `player`: `ObjectRef` of the player to which the HUD bar belongs to -* `identifier`: The identifier of the HUD bar type to change, as specified in `hb.register_hudbar`. -* `new_value`: The new current value of the HUD bar -* `new_max_value`: The new maximum value of the HUD bar -* `new_icon`: File name of the new icon -* `new_bgicon`: File name of the new background icon for the modern-style statbar -* `new_bar`: File name of the new bar segment image -* `new_label`: A new text label of the HUD bar. Note the format string still applies -* `new_text_color`: A 3-octet number defining the new color of the text. - -#### Return value -`true` on success, `false` otherwise. - - -## Hiding and unhiding a HUD bar -You can also hide custom HUD bars, meaning they will not be displayed for a certain player. You can still -use `hb.change_hudbar` on a hidden HUD bar, the new values will be correctly displayed after the HUD bar -has been unhidden. Both functions will only call `hud_change` if there has been an actual change to avoid -unneccessary traffic. - -Note that the hidden state of a HUD bar will *not* be saved by this mod on server shutdown, so you may need -to write your own routines for this or by setting the correct value for `start_hidden` when calling -`hb.init_hudbar`. - -### `hb.hide_hudbar(player, identifier)` -Hides the specified HUD bar from the screen of the specified player. - -#### Parameters -* `player`: `ObjectRef` of the player to which the HUD bar belongs to -* `identifier`: The identifier of the HUD bar type to hide, as specified in `hb.register_hudbar`. - -#### Return value -`true` on success, `false` otherwise. - - -### `hb.unhide_hudbar(player, identifier)` -Makes a previously hidden HUD bar visible again to a player. - -#### Parameters -* `player`: `ObjectRef` of the player to which the HUD bar belongs to -* `identifier`: The identifier of the HUD bar type to unhide, as specified in `hb.register_hudbar`. - -#### Return value -`true` on success, `false` otherwise. - - -## Reading HUD bar information -It is also possible to read information about existing HUD bars. - -### `hb.get_hudbar_state(player, identifier)` -Returns the current state of the active player's HUD bar. - -#### Parameters -* `player`: `ObjectRef` of the player to which the HUD bar belongs to -* `identifier`: The identifier of the HUD bar type to hide, as specified in `hb.register_hudbar`. - -#### Return value -On success, returns a table which holds information on the current state of the HUD bar. Note -the table is a deep copy of the internal HUD bar state, it is *not* a reference; the information -hold by the table is only true for the moment you called this function. The fields of this table are: - -* `value`: Current value of HUD bar. -* `max`: Current maximum value of HUD bar. -* `hidden`: Boolean denoting whether the HUD bar is hidden. -* `barlength`: The length of the HUD bar in pixels. This field is meaningless if the HUD bar is currently hidden. -* `text`: The text shown on the HUD bar. This fiels is meaningless if the HUD bar is currently hidden. - -If the player does not exist, returns `nil` instead. - -### `hb.get_hudbar_identifiers()` -Returns a table of all currently registered HUD bar identifiers. diff --git a/mods/HUD/hudbars/README.md b/mods/HUD/hudbars/README.md deleted file mode 100644 index 8e17edad75..0000000000 --- a/mods/HUD/hudbars/README.md +++ /dev/null @@ -1,62 +0,0 @@ -# HUD bars - -## Description -This mod changes the HUD of Minetest. It replaces the default health and breath -symbols by horizontal colored bars with text showing the number. - -Furthermore, it enables other mods to add their own custom bars to the HUD, -this mod will place them accordingly. - -**Important**: Keep in mind if running a server with this mod, that the custom -position should be displayed correctly on every screen size. - -## Current version -The current version is 2.3.2. -It works for Minetest 5.3.0. - -This software uses [semantic versioning](http://semver.org), as defined by version 2.0.0 of the SemVer -standard. - -## Settings -This mod can be configured quite a bit. You can change HUD bar appearance, offsets, ordering, and more. -Use the advanced settings menu in Minetest for detailed configuration. - -## API -The API is used to add your own custom HUD bars. -Documentation for the API of this mod can be found in `API.md`. - -## Legal -### License of source code -Author: Wuzzy (2015) - -Also: This mod was forked from the “Better HUD” [hud] mod by BlockMen. - -Translations: - -* German: Wuzzy -* Portuguese: BrunoMine -* Turkish: admicos -* Dutch: kingoscargames -* Italian: Hamlet -* Malay: muhdnurhidayat -* Russian: Imk -* Spanish: wuniversales - -This program is free software. It comes without any warranty, to -the extent permitted by applicable law. You can redistribute it -and/or modify it under the terms of the MIT License. - -### Licenses of textures - -* `hudbars_icon_health.png`—celeron55 (CC BY-SA 3.0), modified by BlockMen -* `hudbars_bgicon_health.png`—celeron55 (CC BY-SA 3.0), modified by BlockMen -* `hudbars_icon_breath.png`—kaeza (MIT License), modified by BlockMen, modified again by Wuzzy -* `hudbars_bgicon_breath.png`—based on previous image, edited by Wuzzy (MIT License) -* `hudbars_bar_health.png`—Wuzzy (MIT License) -* `hudbars_bar_breath.png`—Wuzzy (MIT License) -* `hudbars_bar_background.png`—Wuzzy (MIT License) - -### License references - -* [CC-BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/) -* [MIT License](https://opensource.org/licenses/MIT) diff --git a/mods/HUD/hudbars/default_settings.lua b/mods/HUD/hudbars/default_settings.lua deleted file mode 100644 index 865a7cb6ae..0000000000 --- a/mods/HUD/hudbars/default_settings.lua +++ /dev/null @@ -1,54 +0,0 @@ --- (Hardcoded) default settings - -hb.settings.max_bar_length = 160 -hb.settings.statbar_length = 20 - --- Statbar positions -hb.settings.pos_left = {} -hb.settings.pos_right = {} -hb.settings.start_offset_left = {} -hb.settings.start_offset_right= {} -hb.settings.pos_left.x = hb.load_setting("hudbars_pos_left_x", "number", 0.5) -hb.settings.pos_left.y = hb.load_setting("hudbars_pos_left_y", "number", 1) -hb.settings.pos_right.x = hb.load_setting("hudbars_pos_right_x", "number", 0.5) -hb.settings.pos_right.y = hb.load_setting("hudbars_pos_right_y", "number", 1) --- Modified in MCL2! -hb.settings.bar_type = hb.load_setting("hudbars_bar_type", "string", "statbar_modern", {"progress_bar", "statbar_classic", "statbar_modern"}) -if hb.settings.bar_type == "progress_bar" then - hb.settings.start_offset_left.x = hb.load_setting("hudbars_start_offset_left_x", "number", -175) - hb.settings.start_offset_left.y = hb.load_setting("hudbars_start_offset_left_y", "number", -86) - hb.settings.start_offset_right.x = hb.load_setting("hudbars_start_offset_right_x", "number", 15) - hb.settings.start_offset_right.y = hb.load_setting("hudbars_start_offset_right_y", "number", -86) -else - hb.settings.start_offset_left.x = hb.load_setting("hudbars_start_statbar_offset_left_x", "number", -258) - hb.settings.start_offset_left.y = hb.load_setting("hudbars_start_statbar_offset_left_y", "number", -90) - hb.settings.start_offset_right.x = hb.load_setting("hudbars_start_statbar_offset_right_x", "number", 16) - hb.settings.start_offset_right.y = hb.load_setting("hudbars_start_statbar_offset_right_y", "number", -90) -end --- Modified in MCL2! -hb.settings.vmargin = hb.load_setting("hudbars_vmargin", "number", 28) -hb.settings.tick = hb.load_setting("hudbars_tick", "number", 0.1) - --- Experimental setting: Changing this setting is not officially supported, do NOT rely on it! -hb.settings.forceload_default_hudbars = hb.load_setting("hudbars_forceload_default_hudbars", "bool", true) - --- Misc. settings -hb.settings.alignment_pattern = hb.load_setting("hudbars_alignment_pattern", "string", "zigzag", {"zigzag", "stack_up", "stack_down"}) -hb.settings.autohide_breath = hb.load_setting("hudbars_autohide_breath", "bool", true) - -local sorting = minetest.settings:get("hudbars_sorting") -if sorting then - hb.settings.sorting = {} - hb.settings.sorting_reverse = {} - for k,v in string.gmatch(sorting, "(%w+)=(%w+)") do - hb.settings.sorting[k] = tonumber(v) - hb.settings.sorting_reverse[tonumber(v)] = k - end -else - -- Modified in MCL2! - hb.settings.sorting = { ["health"] = 0, ["hunger"] = 1, ["armor"] = 2, ["breath"] = 3, ["exhaustion"] = 4, ["saturation"] = 5 } - hb.settings.sorting_reverse = {} - for k,v in pairs(hb.settings.sorting) do - hb.settings.sorting_reverse[tonumber(v)] = k - end -end diff --git a/mods/HUD/hudbars/init.lua b/mods/HUD/hudbars/init.lua deleted file mode 100644 index 505ff403b8..0000000000 --- a/mods/HUD/hudbars/init.lua +++ /dev/null @@ -1,590 +0,0 @@ -local modname = minetest.get_current_modname() -local modpath = minetest.get_modpath(modname) - -local S = minetest.get_translator(modname) -local N = function(s) return s end - -local math = math -local table = table - -hb = { - hudtables = {}, - -- number of registered HUD bars - hudbars_count = 0, - -- table which records which HUD bar slots have been “registered” so far; used for automatic positioning - registered_slots = {}, - settings = {}, - -- Table which contains all players with active default HUD bars (only for internal use) - players = {}, -} - -function hb.load_setting(sname, stype, defaultval, valid_values) - local sval - if stype == "string" then - sval = minetest.settings:get(sname) - elseif stype == "bool" then - sval = minetest.settings:get_bool(sname) - elseif stype == "number" then - sval = tonumber(minetest.settings:get(sname)) - end - if sval then - if valid_values then - local valid = false - for i = 1, #valid_values do - if sval == valid_values[i] then - valid = true - end - end - if not valid then - minetest.log("error", "[hudbars] Invalid value for "..sname.."! Using default value ("..tostring(defaultval)..").") - return defaultval - else - return sval - end - else - return sval - end - else - return defaultval - end -end - --- Load default settings -dofile(modpath.."/default_settings.lua") - -if minetest.get_modpath("mcl_experience") and not minetest.is_creative_enabled("") then - -- reserve some space for experience bar: - hb.settings.start_offset_left.y = hb.settings.start_offset_left.y - 20 - hb.settings.start_offset_right.y = hb.settings.start_offset_right.y - 20 -end - -local function player_exists(player) - return player ~= nil and player:is_player() -end - -local function make_label(format_string, format_string_config, label, start_value, max_value) - local params = {} - local order = format_string_config.order - for o=1, #order do - if order[o] == "label" then - table.insert(params, label) - elseif order[o] == "value" then - if format_string_config.format_value then - table.insert(params, string.format(format_string_config.format_value, start_value)) - else - table.insert(params, start_value) - end - elseif order[o] == "max_value" then - if format_string_config.format_max_value then - table.insert(params, string.format(format_string_config.format_max_value, max_value)) - else - table.insert(params, max_value) - end - end - end - local ret - if format_string_config.textdomain then - ret = minetest.translate(format_string_config.textdomain, format_string, unpack(params)) - else - ret = S(format_string, unpack(params)) - end - return ret -end - -function hb.value_to_barlength(value, max) - if max == 0 then - return 0 - else - if hb.settings.bar_type == "progress_bar" then - local x - if value < 0 then x=-0.5 else x = 0.5 end - local ret = math.modf((value/max) * hb.settings.max_bar_length + x) - return ret - else - local x - if value < 0 then x=-0.5 else x = 0.5 end - local ret = math.modf((value/max) * hb.settings.statbar_length + x) - return ret - end - end -end - -function hb.get_hudtable(identifier) - return hb.hudtables[identifier] -end - -function hb.get_hudbar_position_index(identifier) - if hb.settings.sorting[identifier] then - return hb.settings.sorting[identifier] - else - local i = 0 - while true do - if hb.registered_slots[i] ~= true and hb.settings.sorting_reverse[i] == nil then - return i - end - i = i + 1 - end - end -end - -function hb.register_hudbar(identifier, text_color, label, textures, direction, default_start_value, default_start_max, default_start_hidden, format_string, format_string_config) - minetest.log("action", "hb.register_hudbar: "..tostring(identifier)) - local hudtable = {} - local pos, offset - local index = math.floor(hb.get_hudbar_position_index(identifier)) - hb.registered_slots[index] = true - if hb.settings.alignment_pattern == "stack_up" then - pos = hb.settings.pos_left - offset = { - x = direction == 0 and hb.settings.start_offset_left.x or -hb.settings.start_offset_right.x, - y = hb.settings.start_offset_left.y - hb.settings.vmargin * index - } - elseif hb.settings.alignment_pattern == "stack_down" then - pos = hb.settings.pos_left - offset = { - x = direction == 0 and hb.settings.start_offset_right.x or -hb.settings.start_offset_left.x, - y = hb.settings.start_offset_left.y + hb.settings.vmargin * index - } - else -- zigzag - if index % 2 == 0 then - pos = hb.settings.pos_left - offset = { - -- -(24+18) = -42. using linear eq, -42 = -258m - 24. - x = direction == 0 and hb.settings.start_offset_left.x or (-42+24)/(-258.0) * hb.settings.start_offset_left.x - 24, - y = hb.settings.start_offset_left.y - hb.settings.vmargin * (index/2) - } - else - pos = hb.settings.pos_right - offset = { - -- 24*10+30 - 24 = 234. using linear eq, 234 = 16m - 24. - x = direction == 0 and hb.settings.start_offset_right.x or (234+24)/(16) * hb.settings.start_offset_right.x - 24, - y = hb.settings.start_offset_right.y - hb.settings.vmargin * ((index-1)/2) - } - end - end - - if format_string == nil then - format_string = N("@1: @2/@3") - end - if format_string_config == nil then - format_string_config = {} - end - if format_string_config.order == nil then - format_string_config.order = { "label", "value", "max_value" } - end - if format_string_config.format_value == nil then - format_string_config.format_value = "%d" - end - if format_string_config.format_max_value == nil then - format_string_config.format_max_value = "%d" - end - - function hudtable.add_all(player, hudtable, start_value, start_max, start_hidden) - if start_value == nil then start_value = hudtable.default_start_value end - if start_max == nil then start_max = hudtable.default_start_max end - if start_hidden == nil then start_hidden = hudtable.default_start_hidden end - local ids = {} - local state = {} - local name = player:get_player_name() - local bgscale, iconscale, text, barnumber, bgiconnumber - - if start_max == 0 or start_hidden then - bgscale = { x=0, y=0 } - else - bgscale = { x=1, y=1 } - end - if start_hidden then - iconscale = { x=0, y=0 } - barnumber = 0 - bgiconnumber = 0 - text = "" - else - iconscale = { x=1, y=1 } - barnumber = hb.value_to_barlength(start_value, start_max) - bgiconnumber = hb.settings.statbar_length - text = make_label(format_string, format_string_config, label, start_value, start_max) - end - - if hb.settings.bar_type == "progress_bar" then - ids.bg = player:hud_add({ - hud_elem_type = "image", - position = pos, - scale = bgscale, - text = "hudbars_bar_background.png", - alignment = {x=1,y=1}, - offset = { x = offset.x - 1, y = offset.y - 1 }, - z_index = 0, - }) - if textures.icon then - ids.icon = player:hud_add({ - hud_elem_type = "image", - position = pos, - scale = iconscale, - text = textures.icon, - alignment = {x=-1,y=1}, - offset = { x = offset.x - 3, y = offset.y }, - z_index = 1, - }) - end - end - - local bar_image, bgicon, bar_size - if hb.settings.bar_type == "progress_bar" then - bar_image = textures.bar - -- NOTE: Intentionally set to nil. For some reason, on some systems, - -- the progress bar is displaced when the bar_size is set explicitly here. - -- On the other hand, setting this to nil is deprecated in MT 5.0.0 due to - -- a debug log warning, but nothing is explained in lua_api.txt. - -- This section is a potential bug magnet, please watch with care! - -- The size of the bar image is expected to be exactly 2×16 pixels. - bar_size = nil - elseif hb.settings.bar_type == "statbar_classic" or hb.settings.bar_type == "statbar_modern" then - bar_image = textures.icon - bgicon = textures.bgicon - bar_size = {x=24, y=24} - end - - local text2 - if hb.settings.bar_type == "statbar_modern" then - text2 = bgicon - end - - ids.bar = player:hud_add({ - hud_elem_type = "statbar", - position = pos, - text = bar_image, - text2 = text2, - number = barnumber, - item = bgiconnumber, - alignment = {x=-1,y=-1}, - offset = offset, - direction = direction, - size = bar_size, - z_index = 1, - }) - if hb.settings.bar_type == "progress_bar" then - ids.text = player:hud_add({ - hud_elem_type = "text", - position = pos, - text = text, - alignment = {x=1,y=1}, - number = text_color, - direction = direction, - offset = { x = offset.x + 2, y = offset.y - 1}, - z_index = 2, - }) - end - -- Do not forget to update hb.get_hudbar_state if you add new fields to the state table - state.hidden = start_hidden - state.value = start_value - state.max = start_max - state.text = text - state.barlength = hb.value_to_barlength(start_value, start_max) - - local main_error_text = - "[hudbars] Bad initial values of HUD bar identifier “"..tostring(identifier).."” for player "..name..". " - - if start_max < start_value then - minetest.log("error", main_error_text.."start_max ("..start_max..") is smaller than start_value ("..start_value..")!") - end - if start_max < 0 then - minetest.log("error", main_error_text.."start_max ("..start_max..") is smaller than 0!") - end - if start_value < 0 then - minetest.log("error", main_error_text.."start_value ("..start_value..") is smaller than 0!") - end - - hb.hudtables[identifier].hudids[name] = ids - hb.hudtables[identifier].hudstate[name] = state - end - - hudtable.identifier = identifier - hudtable.format_string = format_string - hudtable.format_string_config = format_string_config - hudtable.label = label - hudtable.hudids = {} - hudtable.hudstate = {} - hudtable.default_start_hidden = default_start_hidden - hudtable.default_start_value = default_start_value - hudtable.default_start_max = default_start_max - - hb.hudbars_count= hb.hudbars_count + 1 - - hb.hudtables[identifier] = hudtable -end - -function hb.init_hudbar(player, identifier, start_value, start_max, start_hidden) - if not player_exists(player) then return false end - local hudtable = hb.get_hudtable(identifier) - hb.hudtables[identifier].add_all(player, hudtable, start_value, start_max, start_hidden) - return true -end - -function hb.change_hudbar(player, identifier, new_value, new_max_value, new_icon, new_bgicon, new_bar, new_label, new_text_color) - if new_value == nil and new_max_value == nil and new_icon == nil and new_bgicon == nil and new_bar == nil and new_label == nil and new_text_color == nil then - return true - end - if not player_exists(player) then - return false - end - - local name = player:get_player_name() - local hudtable = hb.get_hudtable(identifier) - if not hudtable.hudstate[name] then - return false - end - local value_changed, max_changed = false, false - - if new_value then - if new_value ~= hudtable.hudstate[name].value then - hudtable.hudstate[name].value = new_value - value_changed = true - end - else - new_value = hudtable.hudstate[name].value - end - if new_max_value then - if new_max_value ~= hudtable.hudstate[name].max then - hudtable.hudstate[name].max = new_max_value - max_changed = true - end - else - new_max_value = hudtable.hudstate[name].max - end - - if hb.settings.bar_type == "progress_bar" then - if new_icon and hudtable.hudids[name].icon then - player:hud_change(hudtable.hudids[name].icon, "text", new_icon) - end - if new_bgicon and hudtable.hudids[name].bgicon then - player:hud_change(hudtable.hudids[name].bgicon, "text", new_bgicon) - end - if new_bar then - player:hud_change(hudtable.hudids[name].bar , "text", new_bar) - end - if new_label then - hudtable.label = new_label - local new_text = make_label(hudtable.format_string, hudtable.format_string_config, new_label, hudtable.hudstate[name].value, hudtable.hudstate[name].max) - player:hud_change(hudtable.hudids[name].text, "text", new_text) - end - if new_text_color then - player:hud_change(hudtable.hudids[name].text, "number", new_text_color) - end - - else - if new_icon and hudtable.hudids[name].bar then - player:hud_change(hudtable.hudids[name].bar, "text", new_icon) - end - if new_bgicon and hudtable.hudids[name].bg then - player:hud_change(hudtable.hudids[name].bg, "text", new_bgicon) - end - end - - local main_error_text = - "[hudbars] Bad call to hb.change_hudbar, identifier: “"..tostring(identifier).."”, player name: “"..name.."”. " - if new_max_value < new_value then - minetest.log("error", main_error_text.."new_max_value ("..new_max_value..") is smaller than new_value ("..new_value..")!") - end - if new_max_value < 0 then - minetest.log("error", main_error_text.."new_max_value ("..new_max_value..") is smaller than 0!") - end - if new_value < 0 then - minetest.log("error", main_error_text.."new_value ("..new_value..") is smaller than 0!") - end - - if hudtable.hudstate[name].hidden == false then - if max_changed and hb.settings.bar_type == "progress_bar" then - if hudtable.hudstate[name].max == 0 then - player:hud_change(hudtable.hudids[name].bg, "scale", {x=0,y=0}) - else - player:hud_change(hudtable.hudids[name].bg, "scale", {x=1,y=1}) - end - end - - if value_changed or max_changed then - local new_barlength = hb.value_to_barlength(new_value, new_max_value) - if new_barlength ~= hudtable.hudstate[name].barlength then - player:hud_change(hudtable.hudids[name].bar, "number", hb.value_to_barlength(new_value, new_max_value)) - hudtable.hudstate[name].barlength = new_barlength - end - - if hb.settings.bar_type == "progress_bar" then - local new_text = make_label(hudtable.format_string, hudtable.format_string_config, hudtable.label, new_value, new_max_value) - if new_text ~= hudtable.hudstate[name].text then - player:hud_change(hudtable.hudids[name].text, "text", new_text) - hudtable.hudstate[name].text = new_text - end - end - end - end - return true -end - -function hb.hide_hudbar(player, identifier) - if not player_exists(player) then return false end - local name = player:get_player_name() - local hudtable = hb.get_hudtable(identifier) - if hudtable == nil then return false end - if hudtable.hudstate[name].hidden == true then return true end - if hb.settings.bar_type == "progress_bar" then - if hudtable.hudids[name].icon then - player:hud_change(hudtable.hudids[name].icon, "scale", {x=0,y=0}) - end - player:hud_change(hudtable.hudids[name].bg, "scale", {x=0,y=0}) - player:hud_change(hudtable.hudids[name].text, "text", "") - end - player:hud_change(hudtable.hudids[name].bar, "number", 0) - player:hud_change(hudtable.hudids[name].bar, "item", 0) - hudtable.hudstate[name].hidden = true - return true -end - -function hb.unhide_hudbar(player, identifier) - if not player_exists(player) then return false end - local name = player:get_player_name() - local hudtable = hb.get_hudtable(identifier) - if hudtable == nil then return false end - if hudtable.hudstate[name].hidden == false then return true end - local value = hudtable.hudstate[name].value - local max = hudtable.hudstate[name].max - if hb.settings.bar_type == "progress_bar" then - if hudtable.hudids[name].icon then - player:hud_change(hudtable.hudids[name].icon, "scale", {x=1,y=1}) - end - if hudtable.hudstate[name].max ~= 0 then - player:hud_change(hudtable.hudids[name].bg, "scale", {x=1,y=1}) - end - player:hud_change(hudtable.hudids[name].text, "text", make_label(hudtable.format_string, hudtable.format_string_config, hudtable.label, value, max)) - elseif hb.settings.bar_type == "statbar_modern" then - player:hud_change(hudtable.hudids[name].bar, "scale", {x=1,y=1}) - end - player:hud_change(hudtable.hudids[name].bar, "number", hb.value_to_barlength(value, max)) - player:hud_change(hudtable.hudids[name].bar, "item", hb.value_to_barlength(max, max)) - hudtable.hudstate[name].hidden = false - return true -end - -function hb.get_hudbar_state(player, identifier) - if not player_exists(player) then return nil end - local ref = hb.get_hudtable(identifier).hudstate[player:get_player_name()] - -- Do not forget to update this chunk of code in case the state changes - local copy = { - hidden = ref.hidden, - value = ref.value, - max = ref.max, - text = ref.text, - barlength = ref.barlength, - } - return copy -end - -function hb.get_hudbar_identifiers() - local ids = {} - for id, _ in pairs(hb.hudtables) do - table.insert(ids, id) - end - return ids -end - ---register built-in HUD bars -if minetest.settings:get_bool("enable_damage") or hb.settings.forceload_default_hudbars then - hb.register_hudbar("health", 0xFFFFFF, S("Health"), { bar = "hudbars_bar_health.png", icon = "hudbars_icon_health.png", bgicon = "hudbars_bgicon_health.png" }, 0, 20, 20, false) - hb.register_hudbar("breath", 0xFFFFFF, S("Breath"), { bar = "hudbars_bar_breath.png", icon = "hudbars_icon_breath.png", bgicon = "hudbars_bgicon_breath.png" }, 1, 10, 10, true) -end - -local function hide_builtin(player) - local flags = player:hud_get_flags() - flags.healthbar = false - flags.breathbar = false - player:hud_set_flags(flags) -end - - -local function custom_hud(player) - if minetest.settings:get_bool("enable_damage") or hb.settings.forceload_default_hudbars then - local hide - if minetest.settings:get_bool("enable_damage") then - hide = false - else - hide = true - end - local hp = player:get_hp() - local hp_max = player:get_properties().hp_max - hb.init_hudbar(player, "health", math.min(hp, hp_max), hp_max, hide) - local breath = player:get_breath() - local breath_max = player:get_properties().breath_max - local hide_breath - if breath >= breath_max and hb.settings.autohide_breath == true then hide_breath = true else hide_breath = false end - hb.init_hudbar(player, "breath", math.min(breath, breath_max), breath_max, hide_breath or hide) - end -end - -local function update_health(player) - local hp_max = player:get_properties().hp_max - hb.change_hudbar(player, "health", player:get_hp(), hp_max) -end - --- update built-in HUD bars -local function update_hud(player, has_damage) - if not player_exists(player) then return end - if has_damage then - if hb.settings.forceload_default_hudbars then - hb.unhide_hudbar(player, "health") - end - --air - local breath_max = player:get_properties().breath_max - local breath = player:get_breath() - - if breath >= breath_max and hb.settings.autohide_breath == true then - hb.hide_hudbar(player, "breath") - else - hb.unhide_hudbar(player, "breath") - hb.change_hudbar(player, "breath", math.min(breath, breath_max), breath_max) - end - --health - update_health(player) - elseif hb.settings.forceload_default_hudbars then - hb.hide_hudbar(player, "health") - hb.hide_hudbar(player, "breath") - end -end - -minetest.register_on_player_hpchange(function(player) - if hb.players[player:get_player_name()] then - update_health(player) - end -end) - -minetest.register_on_respawnplayer(function(player) - update_health(player) - hb.hide_hudbar(player, "breath") -end) - -minetest.register_on_joinplayer(function(player) - hide_builtin(player) - custom_hud(player) - hb.players[player:get_player_name()] = player -end) - -minetest.register_on_leaveplayer(function(player) - hb.players[player:get_player_name()] = nil -end) - -local main_timer = 0 -local timer = 0 -minetest.register_globalstep(function(dtime) - main_timer = main_timer + dtime - timer = timer + dtime - if main_timer > hb.settings.tick or timer > 4 then - if main_timer > hb.settings.tick then main_timer = 0 end - -- only proceed if damage is enabled - local has_dmg = minetest.settings:get_bool("enable_damage") - if has_dmg or hb.settings.forceload_default_hudbars then - for _, player in pairs(hb.players) do - -- update all hud elements - update_hud(player, has_dmg) - end - end - end - if timer > 4 then timer = 0 end -end) diff --git a/mods/HUD/hudbars/locale/hudbars.de.tr b/mods/HUD/hudbars/locale/hudbars.de.tr deleted file mode 100644 index 3d1e697cc4..0000000000 --- a/mods/HUD/hudbars/locale/hudbars.de.tr +++ /dev/null @@ -1,4 +0,0 @@ -# textdomain: hudbars -Health=Leben -Breath=Atem -@1: @2/@3=@1: @2/@3 diff --git a/mods/HUD/hudbars/locale/hudbars.es.tr b/mods/HUD/hudbars/locale/hudbars.es.tr deleted file mode 100644 index bbf027953a..0000000000 --- a/mods/HUD/hudbars/locale/hudbars.es.tr +++ /dev/null @@ -1,4 +0,0 @@ -# textdomain: hudbars -Health=Salud -Breath=Aliento -@1: @2/@3=@1: @2/@3 diff --git a/mods/HUD/hudbars/locale/hudbars.fr.tr b/mods/HUD/hudbars/locale/hudbars.fr.tr deleted file mode 100644 index b31b7b0c1e..0000000000 --- a/mods/HUD/hudbars/locale/hudbars.fr.tr +++ /dev/null @@ -1,6 +0,0 @@ -# textdomain: hudbars -Health=Santé -Breath=Breath - -# Default format string for progress bar-style HUD bars, e.g. “Health 5/20” -@1: @2/@3=@1: @2/@3 diff --git a/mods/HUD/hudbars/locale/hudbars.it.tr b/mods/HUD/hudbars/locale/hudbars.it.tr deleted file mode 100644 index 3ada5b6602..0000000000 --- a/mods/HUD/hudbars/locale/hudbars.it.tr +++ /dev/null @@ -1,6 +0,0 @@ -# textdomain: hudbars -Health=Salute -Breath=Ossigeno - -# Default format string for progress bar-style HUD bars, e.g. “Health 5/20” -@1: @2/@3=@1: @2/@3 diff --git a/mods/HUD/hudbars/locale/hudbars.ms.tr b/mods/HUD/hudbars/locale/hudbars.ms.tr deleted file mode 100644 index eb811ab665..0000000000 --- a/mods/HUD/hudbars/locale/hudbars.ms.tr +++ /dev/null @@ -1,4 +0,0 @@ -# textdomain: hudbars -Health=Kesihatan -Breath=Nafas -@1: @2/@3=@1: @2/@3 diff --git a/mods/HUD/hudbars/locale/hudbars.nl.tr b/mods/HUD/hudbars/locale/hudbars.nl.tr deleted file mode 100644 index b9c4a41709..0000000000 --- a/mods/HUD/hudbars/locale/hudbars.nl.tr +++ /dev/null @@ -1,6 +0,0 @@ -# textdomain: hudbars -Health=Gezondheid -Breath=Adem - -# Default format string for progress bar-style HUD bars, e.g. “Health 5/20” -@1: @2/@3=@1: @2/@3 diff --git a/mods/HUD/hudbars/locale/hudbars.pl.tr b/mods/HUD/hudbars/locale/hudbars.pl.tr deleted file mode 100644 index be06b3579a..0000000000 --- a/mods/HUD/hudbars/locale/hudbars.pl.tr +++ /dev/null @@ -1,7 +0,0 @@ -# textdomain: hudbars -Health=Życie -Breath=Tlen - -# Default format string for progress bar-style HUD bars, e.g. “Health 5/20” -@1: @2/@3=@1: @2/@3 - diff --git a/mods/HUD/hudbars/locale/hudbars.pt.tr b/mods/HUD/hudbars/locale/hudbars.pt.tr deleted file mode 100644 index a818f092a1..0000000000 --- a/mods/HUD/hudbars/locale/hudbars.pt.tr +++ /dev/null @@ -1,6 +0,0 @@ -# textdomain: hudbars -Health=Saude -Breath=Folego - -# Formato de string padrão para progresso bar-style de barras do HUD, por exemplo “Saude 5/20” -@1: @2/@3=@1: @2/@3 diff --git a/mods/HUD/hudbars/locale/hudbars.ru.tr b/mods/HUD/hudbars/locale/hudbars.ru.tr deleted file mode 100644 index 2d278e3392..0000000000 --- a/mods/HUD/hudbars/locale/hudbars.ru.tr +++ /dev/null @@ -1,4 +0,0 @@ -# textdomain: hudbars -Health=HP -Breath=дыхание -@1: @2/@3=@1: @2/@3 diff --git a/mods/HUD/hudbars/locale/hudbars.tr.tr b/mods/HUD/hudbars/locale/hudbars.tr.tr deleted file mode 100644 index 6a2ce0b570..0000000000 --- a/mods/HUD/hudbars/locale/hudbars.tr.tr +++ /dev/null @@ -1,4 +0,0 @@ -# textdomain: hudbars -Health=Can -Breath=Nefes -@1: @2/@3=@1: @2/@3 diff --git a/mods/HUD/hudbars/locale/hudbars.zh_TW.tr b/mods/HUD/hudbars/locale/hudbars.zh_TW.tr deleted file mode 100644 index 2163c659eb..0000000000 --- a/mods/HUD/hudbars/locale/hudbars.zh_TW.tr +++ /dev/null @@ -1,6 +0,0 @@ -# textdomain: hudbars -Health=生命 -Breath=氧氣 - -# Default format string for progress bar-style HUD bars, e.g. “Health 5/20” -@1: @2/@3= diff --git a/mods/HUD/hudbars/locale/template.txt b/mods/HUD/hudbars/locale/template.txt deleted file mode 100644 index 37b055913a..0000000000 --- a/mods/HUD/hudbars/locale/template.txt +++ /dev/null @@ -1,6 +0,0 @@ -# textdomain: hudbars -Health= -Breath= - -# Default format string for progress bar-style HUD bars, e.g. “Health 5/20” -@1: @2/@3= diff --git a/mods/HUD/hudbars/mod.conf b/mods/HUD/hudbars/mod.conf deleted file mode 100644 index 9d49f65ec3..0000000000 --- a/mods/HUD/hudbars/mod.conf +++ /dev/null @@ -1,3 +0,0 @@ -name = hudbars -author = Wuzzy -description = Replaces the health and breath symbols in the HUD by “progress bars” and shows exact values. Other mods can add more progress bars for custom player stats. diff --git a/mods/HUD/hudbars/settingtypes.txt b/mods/HUD/hudbars/settingtypes.txt deleted file mode 100644 index 3e4390e201..0000000000 --- a/mods/HUD/hudbars/settingtypes.txt +++ /dev/null @@ -1,119 +0,0 @@ -[Appearance] -# Specifies how the value indicators (i.e. health, breah, etc.) look. There are 3 styles -# available. You can choose between the default progress-bar-like bars and the good -# old statbars like you know from vanilla Minetest. -# These values are possible: -# - progress_bar: A horizontal progress-bar-like bar with a label, showing numerical value -# (current, maximum), and an icon. These bars usually convey the most -# information. This is the default and recommended value. -# - statbar_classic: Classic statbar, like in vanilla Minetest. Made out of up to 20 -# half-symbols. Those bars represent the vague ratio between -# the current value and the maximum value. 1 half-symbol stands for -# approximately 5% of the maximum value. -# - statbar_modern: Like the classic statbar, but also supports background images, this -# kind of statbar may be considered to be more user-friendly than the -# classic statbar. This bar type closely resembles the mod -# “Better HUD” [hud] by BlockMen. -hudbars_bar_type (HUD bars style) enum progress_bar progress_bar,statbar_classic,statbar_modern - - -# If enabled (default), the breath indicators in the HUD will be automatically hidden shortly -# after the breath has been filled up. Otherwise, the breath will always be displayed. -hudbars_autohide_breath (Automatically hide breath indicators) bool true - -# This setting changes the way the HUD bars are ordered on the display. You can choose -# between a zig-zag pattern (default) or a vertically stacked pattern. -# The following values are allowed: -# - zigzag: Starting from the left bottom, the next is right from the first, -# the next is above the first, the next is right of the third, etc. -# - stack_up: The HUD bars are stacked vertically, going upwards. -# - stack_down: The HUD bars are stacked vertically, going downwards. -hudbars_alignment_pattern (HUD bars alignment pattern) enum zigzag zigzag,stack_up,stack_down - -# This setting allows you to specify the order of the HUD bars explicitly. If left empty -# (the default), the health and breath indicators come first, additional indicators -# may appear in any order. This setting is quite technical and normal users probably do not -# need to worry about it. -# -# Syntax: -# The setting has to be specified as a comma-seperated list of key=value pairs, where a key -# refers to the identifier of a HUD bar and the value refers to the slot number of where the -# HUD bar should be placed. The slot number must be an integer greater of equal to 0. Where -# the HUD bars will be displayed exactly depends on the alignment pattern being used. -# All HUD bars to which no order value has been applied will fill in all slots which have -# not been occupied by the HUD bars specified in this setting, the slots will be filled in -# from the lowest slot number. -# Note that the order of those remaining HUD bars is not fixed, it basically just boils -# down on which mod “came” first. Don't worry, the mod will still work perfectly fine, this -# setting is entirely optional. -# The identifier for the health bar is “health” and the identifier for the breath bar is -# “breath”. For other HUD bars, you have to learn it from the mod which is supplying them. -# -# Be careful not to use slot indices twice, or else different HUD bars will be drawn over -# each other! -# -# Example: “breath=0, health=1” -# This makes the breath bar first and the health bar second, which is the opposite order -# of the default one. -hudbars_sorting (HUD bars order) string - -[Positions and offsets] -# Horizontal (x) main position of the HUD bars over the entire screen. -# 0.0 is left-most, 1.0 is right-most. -# For the zig-zag alignment pattern, this is for the left HUD bars. -hudbars_pos_left_x (Left HUD bar screen x position) float 0.5 0.0 1.0 -# Vertical (y) main position of the HUD bars over the entire screen. -# 0.0 is top, 1.0 is bottom. -# For the zig-zag alignment pattern, this is for the left HUD bars. -hudbars_pos_left_y (Left HUD bar screen y position) float 1.0 0.0 1.0 -# Horizontal (x) main position of the right HUD bars over the entire screen. -# 0.0 is left-most, 1.0 is right-most. -# Only used for the zig-zag alignment pattern. -hudbars_pos_right_x (Right HUD bar screen x position) float 0.5 0.0 1.0 -# Vertical main position (y) of the right HUD bars over the entire screen. -# 0.0 is top, 1.0 is bottom. -# Only used for the zig-zag alignment pattern. -hudbars_pos_right_y (Right HUD bar screen y position) float 1.0 0.0 1.0 - -# Precise x offset in pixels from the basic screen x position of the HUD bars. -# For the zig-zag alignment pattern, this is for the left HUD bars. -# This setting is used for the progress bar HUD bar style. -hudbars_start_offset_left_x (Left HUD bar x offset) int -175 -# Precise y offset in pixels from the basic screen y position of the HUD bars. -# For the zig-zag alignment pattern, this is for the left HUD bars. -# This setting is used for the progress bar HUD bar style. -hudbars_start_offset_left_y (Left HUD bar y offset) int -86 -# Precise x offset in pixels from the basic screen x position of the right HUD bars. -# Only used for the zig-zag alignment pattern. -# This setting is used for the progress bar HUD bar style. -hudbars_start_offset_right_x (Right HUD bar x offset) int 15 -# Precise y offset in pixels from the basic screen y position of the right HUD bars. -# Only used for the zig-zag alignment pattern. -# This setting is used for the progress bar HUD bar style. -hudbars_start_offset_right_y (Right HUD bar y offset) int -86 - -# Precise x offset in pixels from the basic screen x position of the HUD statbars. -# For the zig-zag alignment pattern, this is for the left HUD statbars. -# This setting is used for the classic and modern statbar styles. -hudbars_start_statbar_offset_left_x (Left HUD statbar x offset) int -265 -# Precise y offset in pixels from the basic screen y position of the HUD statbars. -# For the zig-zag alignment pattern, this is for the left HUD statbars. -# This setting is used for the classic and modern statbar styles. -hudbars_start_statbar_offset_left_y (Left HUD statbar y offset) int -90 -# Precise x offset in pixels from the basic screen x position of the right HUD statbars. -# Only used for the zig-zag alignment pattern. -# This setting is used for the classic and modern statbar styles. -hudbars_start_statbar_offset_right_x (Right HUD statbar x offset) int 25 -# Precise y offset in pixels from the basic screen y position of the right HUD statbars. -# Only used for the zig-zag alignment pattern. -# This setting is used for the classic and modern statbar styles. -hudbars_start_statbar_offset_right_y (Right HUD statbar y offset) int -90 - -# The vertical distance between two HUD bars, in pixels. -hudbars_vmargin (Vertical distance between HUD bars) int 24 0 - -[Performance] -# The of seconds which need to pass before the server updates the default HUD bars -# (health and breath). Increase this number if you have a slow server or a slow network -# connection and experience performance problems. -hudbars_tick (Default HUD bars update interval) float 0.1 0.0 4.0 diff --git a/mods/HUD/hudbars/textures/hudbars_bar_background.png b/mods/HUD/hudbars/textures/hudbars_bar_background.png deleted file mode 100644 index cbc6c3f519..0000000000 Binary files a/mods/HUD/hudbars/textures/hudbars_bar_background.png and /dev/null differ diff --git a/mods/HUD/hudbars/textures/hudbars_bar_breath.png b/mods/HUD/hudbars/textures/hudbars_bar_breath.png deleted file mode 100644 index 7d19a57524..0000000000 Binary files a/mods/HUD/hudbars/textures/hudbars_bar_breath.png and /dev/null differ diff --git a/mods/HUD/hudbars/textures/hudbars_bar_health.png b/mods/HUD/hudbars/textures/hudbars_bar_health.png deleted file mode 100644 index 9043e1191a..0000000000 Binary files a/mods/HUD/hudbars/textures/hudbars_bar_health.png and /dev/null differ diff --git a/mods/HUD/hudbars/textures/hudbars_bgicon_breath.png b/mods/HUD/hudbars/textures/hudbars_bgicon_breath.png deleted file mode 100644 index 51cb79aa71..0000000000 Binary files a/mods/HUD/hudbars/textures/hudbars_bgicon_breath.png and /dev/null differ diff --git a/mods/HUD/hudbars/textures/hudbars_bgicon_health.png b/mods/HUD/hudbars/textures/hudbars_bgicon_health.png deleted file mode 100644 index aa4a6123ca..0000000000 Binary files a/mods/HUD/hudbars/textures/hudbars_bgicon_health.png and /dev/null differ diff --git a/mods/HUD/hudbars/textures/hudbars_icon_breath.png b/mods/HUD/hudbars/textures/hudbars_icon_breath.png deleted file mode 100644 index f1d714fec8..0000000000 Binary files a/mods/HUD/hudbars/textures/hudbars_icon_breath.png and /dev/null differ diff --git a/mods/HUD/hudbars/textures/hudbars_icon_health.png b/mods/HUD/hudbars/textures/hudbars_icon_health.png deleted file mode 100644 index d0e304100a..0000000000 Binary files a/mods/HUD/hudbars/textures/hudbars_icon_health.png and /dev/null differ diff --git a/mods/HUD/mcl_hbarmor/README.md b/mods/HUD/mcl_hbarmor/README.md deleted file mode 100644 index 0eccd69166..0000000000 --- a/mods/HUD/mcl_hbarmor/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# MineClone 2 HUD bar for `mcl_armor` [`mcl_hbarmor`] - -## Description -This mod adds a simple HUD bar which displays the player's armor points. -The players has 0-20 armor points. - -The armor bar is hidden if the player wears no armor. - -## Licensing -This mod is entirly free softare. - -### Source code -License: MIT License (see below) - -### Textures - -See MineClone 2 license. - -### MIT License -Everything else is under the MIT License: -© Copyright BlockMen (2013-2014) - -This program is free software. It comes without any warranty, to -the extent permitted by applicable law. You can redistribute it -and/or modify it under the terms of the MIT License. -See for more details. diff --git a/mods/HUD/mcl_hbarmor/init.lua b/mods/HUD/mcl_hbarmor/init.lua deleted file mode 100644 index 34ac205ac0..0000000000 --- a/mods/HUD/mcl_hbarmor/init.lua +++ /dev/null @@ -1,132 +0,0 @@ -local S = minetest.get_translator(minetest.get_current_modname()) - -local math = math -local tonumber = tonumber - -local get_connected_players = minetest.get_connected_players - -local mcl_hbarmor = { - -- HUD statbar values - armor = {}, - -- Stores if player's HUD bar has been initialized so far. - player_active = {}, - -- Time difference in seconds between updates to the HUD armor bar. - -- Increase this number for slow servers. - tick = 0.1, - -- If true, the armor bar is hidden when the player does not wear any armor - autohide = true, -} - -local tick_config = minetest.settings:get("mcl_hbarmor_tick") - -if tonumber(tick_config) then - mcl_hbarmor.tick = tonumber(tick_config) -end - - -local function must_hide(playername, arm) - return arm == 0 -end - -local function arm_printable(arm) - return math.ceil(math.floor(arm+0.5)) -end - -local function custom_hud(player) - local name = player:get_player_name() - - if minetest.settings:get_bool("enable_damage") then - local ret = mcl_hbarmor.get_armor(player) - if ret == false then - minetest.log("error", "[mcl_hbarmor] Call to mcl_hbarmor.get_armor in custom_hud returned with false!") - return - end - local arm = tonumber(mcl_hbarmor.armor[name]) - if not arm then - arm = 0 - end - local hide - if mcl_hbarmor.autohide then - hide = must_hide(name, arm) - else - hide = false - end - hb.init_hudbar(player, "armor", arm_printable(arm), nil, hide) - end -end - ---register and define armor HUD bar -hb.register_hudbar("armor", 0xFFFFFF, S("Armor"), { icon = "hbarmor_icon.png", bgicon = "hbarmor_bgicon.png", bar = "hbarmor_bar.png" }, 0, 0, 20, mcl_hbarmor.autohide) - -function mcl_hbarmor.get_armor(player) - local name = player:get_player_name() - local pts = player:get_meta():get_int("mcl_armor:armor_points") - if not pts then - return false - else - mcl_hbarmor.set_armor(name, pts) - end - return true -end - -function mcl_hbarmor.set_armor(player_name, pts) - mcl_hbarmor.armor[player_name] = math.max(0, math.min(20, pts)) -end - --- update hud elemtens if value has changed -local function update_hud(player) - local name = player:get_player_name() - --armor - local arm = tonumber(mcl_hbarmor.armor[name]) - if not arm then - arm = 0 - mcl_hbarmor.armor[name] = 0 - end - if mcl_hbarmor.autohide then - -- hide armor bar completely when there is none - if must_hide(name, arm) then - hb.hide_hudbar(player, "armor") - else - hb.change_hudbar(player, "armor", arm_printable(arm)) - hb.unhide_hudbar(player, "armor") - end - else - hb.change_hudbar(player, "armor", arm_printable(arm)) - end -end - -minetest.register_on_joinplayer(function(player) - local name = player:get_player_name() - custom_hud(player) - mcl_hbarmor.player_active[name] = true -end) - -minetest.register_on_leaveplayer(function(player) - local name = player:get_player_name() - mcl_hbarmor.player_active[name] = false -end) - -local main_timer = 0 -local timer = 0 -minetest.register_globalstep(function(dtime) - --TODO: replace this by playerglobalstep API then implemented - main_timer = main_timer + dtime - timer = timer + dtime - if main_timer > mcl_hbarmor.tick or timer > 4 then - if minetest.settings:get_bool("enable_damage") then - if main_timer > mcl_hbarmor.tick then main_timer = 0 end - for _,player in pairs(get_connected_players()) do - local name = player:get_player_name() - if mcl_hbarmor.player_active[name] == true then - local ret = mcl_hbarmor.get_armor(player) - if ret == false then - minetest.log("error", "[mcl_hbarmor] Call to mcl_hbarmor.get_armor in globalstep returned with false!") - end - -- update all hud elements - update_hud(player) - end - end - end - end - if timer > 4 then timer = 0 end -end) diff --git a/mods/HUD/mcl_hbarmor/locale/hbarmor.de.tr b/mods/HUD/mcl_hbarmor/locale/hbarmor.de.tr deleted file mode 100644 index e7aa7d785c..0000000000 --- a/mods/HUD/mcl_hbarmor/locale/hbarmor.de.tr +++ /dev/null @@ -1,2 +0,0 @@ -# textdomain:hbarmor -Armor=Panzerung diff --git a/mods/HUD/mcl_hbarmor/locale/hbarmor.es.tr b/mods/HUD/mcl_hbarmor/locale/hbarmor.es.tr deleted file mode 100644 index f9529b482a..0000000000 --- a/mods/HUD/mcl_hbarmor/locale/hbarmor.es.tr +++ /dev/null @@ -1,2 +0,0 @@ -# textdomain:hbarmor -Armor=Armadura diff --git a/mods/HUD/mcl_hbarmor/locale/hbarmor.fr.tr b/mods/HUD/mcl_hbarmor/locale/hbarmor.fr.tr deleted file mode 100644 index c5addfa5ab..0000000000 --- a/mods/HUD/mcl_hbarmor/locale/hbarmor.fr.tr +++ /dev/null @@ -1,2 +0,0 @@ -# textdomain:hbarmor -Armor=Armure diff --git a/mods/HUD/mcl_hbarmor/locale/hbarmor.it.tr b/mods/HUD/mcl_hbarmor/locale/hbarmor.it.tr deleted file mode 100644 index f02b5c435a..0000000000 --- a/mods/HUD/mcl_hbarmor/locale/hbarmor.it.tr +++ /dev/null @@ -1,2 +0,0 @@ -# textdomain:hbarmor -Armor=Armatura diff --git a/mods/HUD/mcl_hbarmor/locale/hbarmor.ru.tr b/mods/HUD/mcl_hbarmor/locale/hbarmor.ru.tr deleted file mode 100644 index 0b938a5946..0000000000 --- a/mods/HUD/mcl_hbarmor/locale/hbarmor.ru.tr +++ /dev/null @@ -1,2 +0,0 @@ -# textdomain:hbarmor -Armor=Защита diff --git a/mods/HUD/mcl_hbarmor/locale/mcl_hbarmor.pl.tr b/mods/HUD/mcl_hbarmor/locale/mcl_hbarmor.pl.tr deleted file mode 100644 index ff43d7e81c..0000000000 --- a/mods/HUD/mcl_hbarmor/locale/mcl_hbarmor.pl.tr +++ /dev/null @@ -1,3 +0,0 @@ -# textdomain:hbarmor -Armor=Zbroja - diff --git a/mods/HUD/mcl_hbarmor/locale/mcl_hbarmor.zh_TW.tr b/mods/HUD/mcl_hbarmor/locale/mcl_hbarmor.zh_TW.tr deleted file mode 100644 index a0dc8174e0..0000000000 --- a/mods/HUD/mcl_hbarmor/locale/mcl_hbarmor.zh_TW.tr +++ /dev/null @@ -1,2 +0,0 @@ -# textdomain:hbarmor -Armor=防禦點數 diff --git a/mods/HUD/mcl_hbarmor/locale/template.txt b/mods/HUD/mcl_hbarmor/locale/template.txt deleted file mode 100644 index 80e7a09e8b..0000000000 --- a/mods/HUD/mcl_hbarmor/locale/template.txt +++ /dev/null @@ -1,2 +0,0 @@ -# textdomain:hbarmor -Armor= diff --git a/mods/HUD/mcl_hbarmor/mod.conf b/mods/HUD/mcl_hbarmor/mod.conf deleted file mode 100644 index 2583958754..0000000000 --- a/mods/HUD/mcl_hbarmor/mod.conf +++ /dev/null @@ -1,4 +0,0 @@ -name = mcl_hbarmor -author = BlockMen -description = Adds a HUD bar displaying the current damage of the player's armor. -depends = hudbars, mcl_armor diff --git a/mods/HUD/mcl_hbarmor/settingtypes.txt b/mods/HUD/mcl_hbarmor/settingtypes.txt deleted file mode 100644 index cfd875dfe2..0000000000 --- a/mods/HUD/mcl_hbarmor/settingtypes.txt +++ /dev/null @@ -1,3 +0,0 @@ -#Time difference in seconds between updates to the armor HUD bar. -#Increase this number for slow servers. -hbarmor_tick (Armor HUD bar update frequency) float 0.1 0.0 4.0 diff --git a/mods/HUD/mcl_hbarmor/textures/hbarmor_bar.png b/mods/HUD/mcl_hbarmor/textures/hbarmor_bar.png deleted file mode 100644 index ce0aa78ec1..0000000000 Binary files a/mods/HUD/mcl_hbarmor/textures/hbarmor_bar.png and /dev/null differ diff --git a/mods/HUD/mcl_hbarmor/textures/hbarmor_bgicon.png b/mods/HUD/mcl_hbarmor/textures/hbarmor_bgicon.png deleted file mode 100644 index 86e68e403c..0000000000 Binary files a/mods/HUD/mcl_hbarmor/textures/hbarmor_bgicon.png and /dev/null differ diff --git a/mods/HUD/mcl_hbarmor/textures/hbarmor_icon.png b/mods/HUD/mcl_hbarmor/textures/hbarmor_icon.png deleted file mode 100644 index e0066a387e..0000000000 Binary files a/mods/HUD/mcl_hbarmor/textures/hbarmor_icon.png and /dev/null differ diff --git a/mods/ITEMS/REDSTONE/mcl_dispensers/API.md b/mods/ITEMS/REDSTONE/mcl_dispensers/API.md deleted file mode 100644 index 419c3ac407..0000000000 --- a/mods/ITEMS/REDSTONE/mcl_dispensers/API.md +++ /dev/null @@ -1,27 +0,0 @@ -# API documentation for dispensers - -The dispensers API allows you to add custom code which is called when a -particular item is dispensed. -Just add the `_on_dispense` function to the item definition. -By default, items are just thrown out as item entities. - -## Additional fields for item definitions - -### `_on_dispense(stack, pos, droppos, dropnode, dropdir)` - -This is a function which is called when an item is dispensed by the dispenser. -These are the parameters: - -* stack: Itemstack which is dispense. This is always exactly 1 item -* pos: Position of dispenser -* droppos: Position to which to dispense item -* dropnode: Node of droppos -* dropdir: Drop direction - -By default (return value: `nil`), the itemstack is consumed by the dispenser afterwards. -Optionally, you can explicitly set the return value to a custom leftover itemstack. - -### `_dispense_into_walkable` - -By default, items will only be dispensed into non-walkable nodes. -But if this value is set If `true`, the item can be dispensed into walkable nodes. diff --git a/mods/ITEMS/REDSTONE/mcl_dispensers/init.lua b/mods/ITEMS/REDSTONE/mcl_dispensers/init.lua deleted file mode 100644 index aa20fc8135..0000000000 --- a/mods/ITEMS/REDSTONE/mcl_dispensers/init.lua +++ /dev/null @@ -1,369 +0,0 @@ ---[[ This mod registers 3 nodes: -- One node for the horizontal-facing dispensers (mcl_dispensers:dispenser) -- One node for the upwards-facing dispensers (mcl_dispenser:dispenser_up) -- One node for the downwards-facing dispensers (mcl_dispenser:dispenser_down) - -3 node definitions are needed because of the way the textures are defined. -All node definitions share a lot of code, so this is the reason why there -are so many weird tables below. -]] -local S = minetest.get_translator(minetest.get_current_modname()) - --- For after_place_node -local function setup_dispenser(pos) - -- Set formspec and inventory - local form = "size[9,8.75]".. - "label[0,4.0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]".. - "list[current_player;main;0,4.5;9,3;9]".. - mcl_formspec.get_itemslot_bg(0,4.5,9,3).. - "list[current_player;main;0,7.74;9,1;]".. - mcl_formspec.get_itemslot_bg(0,7.74,9,1).. - "label[3,0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Dispenser"))).."]".. - "list[context;main;3,0.5;3,3;]".. - mcl_formspec.get_itemslot_bg(3,0.5,3,3).. - "listring[context;main]".. - "listring[current_player;main]" - local meta = minetest.get_meta(pos) - meta:set_string("formspec", form) - local inv = meta:get_inventory() - inv:set_size("main", 9) -end - -local function orientate_dispenser(pos, placer) - -- Not placed by player - if not placer then return end - - -- Pitch in degrees - local pitch = placer:get_look_vertical() * (180 / math.pi) - - local node = minetest.get_node(pos) - if pitch > 55 then - minetest.swap_node(pos, {name="mcl_dispensers:dispenser_up", param2 = node.param2}) - elseif pitch < -55 then - minetest.swap_node(pos, {name="mcl_dispensers:dispenser_down", param2 = node.param2}) - end -end - -local on_rotate -if minetest.get_modpath("screwdriver") then - on_rotate = screwdriver.rotate_simple -end - --- Shared core definition table -local dispenserdef = { - is_ground_content = false, - sounds = mcl_sounds.node_sound_stone_defaults(), - allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) - local name = player:get_player_name() - if minetest.is_protected(pos, name) then - minetest.record_protection_violation(pos, name) - return 0 - else - return count - end - end, - allow_metadata_inventory_take = function(pos, listname, index, stack, player) - local name = player:get_player_name() - if minetest.is_protected(pos, name) then - minetest.record_protection_violation(pos, name) - return 0 - else - return stack:get_count() - end - end, - allow_metadata_inventory_put = function(pos, listname, index, stack, player) - local name = player:get_player_name() - if minetest.is_protected(pos, name) then - minetest.record_protection_violation(pos, name) - return 0 - else - return stack:get_count() - end - end, - after_dig_node = function(pos, oldnode, oldmetadata, digger) - local meta = minetest.get_meta(pos) - local meta2 = meta:to_table() - meta:from_table(oldmetadata) - local inv = meta:get_inventory() - for i=1, inv:get_size("main") do - local stack = inv:get_stack("main", i) - if not stack:is_empty() then - local p = {x=pos.x+math.random(0, 10)/10-0.5, y=pos.y, z=pos.z+math.random(0, 10)/10-0.5} - minetest.add_item(p, stack) - end - end - meta:from_table(meta2) - end, - _mcl_blast_resistance = 3.5, - _mcl_hardness = 3.5, - mesecons = { - effector = { - -- Dispense random item when triggered - action_on = function(pos, node) - local meta = minetest.get_meta(pos) - local inv = meta:get_inventory() - local droppos, dropdir - if node.name == "mcl_dispensers:dispenser" then - dropdir = vector.multiply(minetest.facedir_to_dir(node.param2), -1) - droppos = vector.add(pos, dropdir) - elseif node.name == "mcl_dispensers:dispenser_up" then - dropdir = {x=0, y=1, z=0} - droppos = {x=pos.x, y=pos.y+1, z=pos.z} - elseif node.name == "mcl_dispensers:dispenser_down" then - dropdir = {x=0, y=-1, z=0} - droppos = {x=pos.x, y=pos.y-1, z=pos.z} - end - local dropnode = minetest.get_node(droppos) - local dropnodedef = minetest.registered_nodes[dropnode.name] - local stacks = {} - for i=1,inv:get_size("main") do - local stack = inv:get_stack("main", i) - if not stack:is_empty() then - table.insert(stacks, {stack = stack, stackpos = i}) - end - end - if #stacks >= 1 then - local r = math.random(1, #stacks) - local stack = stacks[r].stack - local dropitem = ItemStack(stack) - dropitem:set_count(1) - local stack_id = stacks[r].stackpos - local stackdef = stack:get_definition() - - if not stackdef then - return - end - - local iname = stack:get_name() - local igroups = stackdef.groups - - --[===[ Dispense item ]===] - - -- Hardcoded dispensions -- - - -- Armor, mob heads and pumpkins - if igroups.armor then - local droppos_below = {x = droppos.x, y = droppos.y - 1, z = droppos.z} - - for _, objs in ipairs({minetest.get_objects_inside_radius(droppos, 1), minetest.get_objects_inside_radius(droppos_below, 1)}) do - for _, obj in ipairs(objs) do - stack = mcl_armor.equip(stack, obj) - if stack:is_empty() then - break - end - end - if stack:is_empty() then - break - end - end - - -- Place head or pumpkin as node, if equipping it as armor has failed - if not stack:is_empty() then - if igroups.head or iname == "mcl_farming:pumpkin_face" then - if dropnodedef.buildable_to then - minetest.set_node(droppos, {name = iname, param2 = node.param2}) - stack:take_item() - end - end - end - - inv:set_stack("main", stack_id, stack) - - -- Use shears on sheeps - elseif igroups.shears then - for _, obj in pairs(minetest.get_objects_inside_radius(droppos, 1)) do - local entity = obj:get_luaentity() - if entity and not entity.child and not entity.gotten then - local entname = entity.name - local pos = obj:get_pos() - local used, texture = false - if entname == "mobs_mc:sheep" then - minetest.add_item(pos, entity.drops[2].name .. " " .. math.random(1, 3)) - if not entity.color then - entity.color = "unicolor_white" - end - entity.base_texture = { "blank.png", "mobs_mc_sheep.png" } - texture = entity.base_texture - entity.drops = { - { name = "mcl_mobitems:mutton", chance = 1, min = 1, max = 2 }, - } - used = true - elseif entname == "mobs_mc:snowman" then - texture = { - "mobs_mc_snowman.png", - "blank.png", "blank.png", - "blank.png", "blank.png", - "blank.png", "blank.png", - } - used = true - elseif entname == "mobs_mc:mooshroom" then - local droppos = vector.offset(pos, 0, 1.4, 0) - if entity.base_texture[1] == "mobs_mc_mooshroom_brown.png" then - minetest.add_item(droppos, "mcl_mushrooms:mushroom_brown 5") - else - minetest.add_item(droppos, "mcl_mushrooms:mushroom_red 5") - end - obj = mcl_util.replace_mob(obj, "mobs_mc:cow") - entity = obj:get_luaentity() - used = true - end - if used then - obj:set_properties({ textures = texture }) - entity.gotten = true - minetest.sound_play("mcl_tools_shears_cut", { pos = pos }, true) - stack:add_wear(65535 / stackdef._mcl_diggroups.shearsy.uses) - inv:set_stack("main", stack_id, stack) - break - end - end - end - - -- Spawn Egg - elseif igroups.spawn_egg then - -- Spawn mob - if not dropnodedef.walkable then - --pointed_thing = { above = droppos, under = { x=droppos.x, y=droppos.y-1, z=droppos.z } } - minetest.add_entity(droppos, stack:get_name()) - - stack:take_item() - inv:set_stack("main", stack_id, stack) - end - - -- Generalized dispension - elseif (not dropnodedef.walkable or stackdef._dispense_into_walkable) then - --[[ _on_dispense(stack, pos, droppos, dropnode, dropdir) - * stack: Itemstack which is dispense - * pos: Position of dispenser - * droppos: Position to which to dispense item - * dropnode: Node of droppos - * dropdir: Drop direction - - _dispense_into_walkable: If true, can dispense into walkable nodes - ]] - if stackdef._on_dispense then - -- Item-specific dispension (if defined) - local od_ret = stackdef._on_dispense(dropitem, pos, droppos, dropnode, dropdir) - if od_ret then - local newcount = stack:get_count() - 1 - stack:set_count(newcount) - inv:set_stack("main", stack_id, stack) - if newcount == 0 then - inv:set_stack("main", stack_id, od_ret) - elseif inv:room_for_item("main", od_ret) then - inv:add_item("main", od_ret) - else - minetest.add_item(droppos, dropitem) - end - else - stack:take_item() - inv:set_stack("main", stack_id, stack) - end - else - -- Drop item otherwise - minetest.add_item(droppos, dropitem) - stack:take_item() - inv:set_stack("main", stack_id, stack) - end - end - - - end - end, - rules = mesecon.rules.alldirs, - }, - }, - on_rotate = on_rotate, -} - --- Horizontal dispenser - -local horizontal_def = table.copy(dispenserdef) -horizontal_def.description = S("Dispenser") -horizontal_def._tt_help = S("9 inventory slots").."\n"..S("Launches item when powered by redstone power") -horizontal_def._doc_items_longdesc = S("A dispenser is a block which acts as a redstone component which, when powered with redstone power, dispenses an item. It has a container with 9 inventory slots.") -horizontal_def._doc_items_usagehelp = S("Place the dispenser in one of 6 possible directions. The “hole” is where items will fly out of the dispenser. Use the dispenser to access its inventory. Insert the items you wish to dispense. Supply the dispenser with redstone energy once to dispense a random item.").."\n\n".. - -S("The dispenser will do different things, depending on the dispensed item:").."\n\n".. - -S("• Arrows: Are launched").."\n".. -S("• Eggs and snowballs: Are thrown").."\n".. -S("• Fire charges: Are fired in a straight line").."\n".. -S("• Armor: Will be equipped to players and armor stands").."\n".. -S("• Boats: Are placed on water or are dropped").."\n".. -S("• Minecart: Are placed on rails or are dropped").."\n".. -S("• Bone meal: Is applied on the block it is facing").."\n".. -S("• Empty buckets: Are used to collect a liquid source").."\n".. -S("• Filled buckets: Are used to place a liquid source").."\n".. -S("• Heads, pumpkins: Equipped to players and armor stands, or placed as a block").."\n".. -S("• Shulker boxes: Are placed as a block").."\n".. -S("• TNT: Is placed and ignited").."\n".. -S("• Flint and steel: Is used to ignite a fire in air and to ignite TNT").."\n".. -S("• Spawn eggs: Will summon the mob they contain").."\n".. -S("• Other items: Are simply dropped") - -function horizontal_def.after_place_node(pos, placer, itemstack, pointed_thing) - setup_dispenser(pos) - orientate_dispenser(pos, placer) -end - -horizontal_def.tiles = { - "default_furnace_top.png", "default_furnace_bottom.png", - "default_furnace_side.png", "default_furnace_side.png", - "default_furnace_side.png", "mcl_dispensers_dispenser_front_horizontal.png" -} -horizontal_def.paramtype2 = "facedir" -horizontal_def.groups = {pickaxey=1, container=2, material_stone=1} - -minetest.register_node("mcl_dispensers:dispenser", horizontal_def) - --- Down dispenser -local down_def = table.copy(dispenserdef) -down_def.description = S("Downwards-Facing Dispenser") -down_def.after_place_node = setup_dispenser -down_def.tiles = { - "default_furnace_top.png", "mcl_dispensers_dispenser_front_vertical.png", - "default_furnace_side.png", "default_furnace_side.png", - "default_furnace_side.png", "default_furnace_side.png" -} -down_def.groups = {pickaxey=1, container=2,not_in_creative_inventory=1, material_stone=1} -down_def._doc_items_create_entry = false -down_def.drop = "mcl_dispensers:dispenser" -minetest.register_node("mcl_dispensers:dispenser_down", down_def) - --- Up dispenser --- The up dispenser is almost identical to the down dispenser , it only differs in textures -local up_def = table.copy(down_def) -up_def.description = S("Upwards-Facing Dispenser") -up_def.tiles = { - "mcl_dispensers_dispenser_front_vertical.png", "default_furnace_bottom.png", - "default_furnace_side.png", "default_furnace_side.png", - "default_furnace_side.png", "default_furnace_side.png" -} -minetest.register_node("mcl_dispensers:dispenser_up", up_def) - - -minetest.register_craft({ - output = "mcl_dispensers:dispenser", - recipe = { - {"mcl_core:cobble", "mcl_core:cobble", "mcl_core:cobble",}, - {"mcl_core:cobble", "mcl_bows:bow", "mcl_core:cobble",}, - {"mcl_core:cobble", "mesecons:redstone", "mcl_core:cobble",}, - } -}) - --- Add entry aliases for the Help -if minetest.get_modpath("doc") then - doc.add_entry_alias("nodes", "mcl_dispensers:dispenser", "nodes", "mcl_dispensers:dispenser_down") - doc.add_entry_alias("nodes", "mcl_dispensers:dispenser", "nodes", "mcl_dispensers:dispenser_up") -end - --- Legacy -minetest.register_lbm({ - label = "Update dispenser formspecs (0.60.0)", - name = "mcl_dispensers:update_formspecs_0_60_0", - nodenames = { "mcl_dispensers:dispenser", "mcl_dispensers:dispenser_down", "mcl_dispensers:dispenser_up" }, - action = function(pos, node) - setup_dispenser(pos) - minetest.log("action", "[mcl_dispenser] Node formspec updated at "..minetest.pos_to_string(pos)) - end, -}) diff --git a/mods/ITEMS/REDSTONE/mcl_dispensers/locale/mcl_dispensers.de.tr b/mods/ITEMS/REDSTONE/mcl_dispensers/locale/mcl_dispensers.de.tr deleted file mode 100644 index 129350e598..0000000000 --- a/mods/ITEMS/REDSTONE/mcl_dispensers/locale/mcl_dispensers.de.tr +++ /dev/null @@ -1,25 +0,0 @@ -# textdomain: mcl_dispensers -Dispenser=Werfer -A dispenser is a block which acts as a redstone component which, when powered with redstone power, dispenses an item. It has a container with 9 inventory slots.=Ein Werfer ist ein Block, der als eine Redstonekomponente fungiert, die, wenn sie mit Redstoneenergie versorgt ist, einen Gegenstand auswirft. Er hat einen Behälter mit 9 Inventarplätzen. -Place the dispenser in one of 6 possible directions. The “hole” is where items will fly out of the dispenser. Use the dispenser to access its inventory. Insert the items you wish to dispense. Supply the dispenser with redstone energy once to dispense a random item.=Platzieren Sie den Werfer in einer von 6 möglichen Richtungen. Das „Loch“ ist die Stelle, aus der Dinge aus dem Werfer fliegen. Benutzen Sie den Werfer, um auf das Inventar zuzugreifen. -The dispenser will do different things, depending on the dispensed item:=Der Werfer wird, abhängig vom geworfenem Gegenstand, unterschiedliche Dinge tun: -• Arrows: Are launched=• Pfeile: Werden gefeuert -• Eggs and snowballs: Are thrown=• Eier und Schneebälle: Werden geworfen -• Fire charges: Are fired in a straight line=• Feuerkugeln: Werden schnurgerade abgefeuert -• Armor: Will be equipped to players and armor stands=• Rüstung: Spieler und Rüstungsständer werden ausgerüstet -• Boats: Are placed on water or are dropped=• Boote: Werden auf Wasser platziert oder abgeworfen -• Minecart: Are placed on rails or are dropped=• Loren: Werden auf Schienen platziert oder abgeworfen -• Bone meal: Is applied on the block it is facing=• Knochenmehl: Wird auf den Block, auf den er zeigt, angewandt -• Empty buckets: Are used to collect a liquid source=• Leere Eimer: Sammeln Flüssigkeitsquelle auf -• Filled buckets: Are used to place a liquid source=• Volle Eimer: Platzieren eine Flüssigkeitsquelle -• Heads, pumpkins: Equipped to players and armor stands, or placed as a block=• Köpfe, Kürbisse: Spieler und Rüstungsständer werden ausgerüstet, alternativ werden diese Gegenstände als Block platziert -• Shulker boxes: Are placed as a block=• Schulkerkisten: Werden als Block platziert -• TNT: Is placed and ignited=• TNT: Wird platziert und angezündet -• Flint and steel: Is used to ignite a fire in air and to ignite TNT=• Feuerzeuge: Endzündet ein Feuer in der Luft und zündet TNT an -• Spawn eggs: Will summon the mob they contain=• Spawn-Eier: Beschwören einen Mob -• Other items: Are simply dropped=• Andere Gegenstände: Werden fallen gelassen -Downwards-Facing Dispenser=Nach unten zeigender Werfer -Upwards-Facing Dispenser=Nach oben zeigender Werfer -Inventory=Inventar -9 inventory slots=9 Inventarplätze -Launches item when powered by redstone power=Wirft Gegenstand aus, wenn mit Redstoneenergie versorgt diff --git a/mods/ITEMS/REDSTONE/mcl_dispensers/locale/mcl_dispensers.es.tr b/mods/ITEMS/REDSTONE/mcl_dispensers/locale/mcl_dispensers.es.tr deleted file mode 100644 index cf695307ab..0000000000 --- a/mods/ITEMS/REDSTONE/mcl_dispensers/locale/mcl_dispensers.es.tr +++ /dev/null @@ -1,22 +0,0 @@ -# textdomain: mcl_dispensers -Dispenser=Dispensador -A dispenser is a block which acts as a redstone component which, when powered with redstone power, dispenses an item. It has a container with 9 inventory slots.=Un dispensador es un bloque que actúa como un componente de redstone que, cuando se alimenta con energía de redstone, dispensa un artículo. Tiene un contenedor con 9 ranuras de inventario. -Place the dispenser in one of 6 possible directions. The “hole” is where items will fly out of the dispenser. Use the dispenser to access its inventory. Insert the items you wish to dispense. Supply the dispenser with redstone energy once to dispense a random item.=Coloque el dispensador en una de las 6 direcciones posibles. El "agujero" es donde los artículos saldrán volando del dispensador. Use el dispensador para acceder a su inventario. Inserte los artículos que desea dispensar. Proporcione al dispensador energía de redstone una vez para dispensar un elemento aleatorio: -• Arrows: Are launched=• Flechas: Se lanzan -• Eggs and snowballs: Are thrown=• Huevos y bolas de nieve: Son lanzados -• Fire charges: Are fired in a straight line=• Cargas de fuego: Se disparan en línea recta -• Armor: Will be equipped to players and armor stands=• Armadura: Estará equipada para jugadores y armaduras -• Boats: Are placed on water or are dropped=• Barcas: Se colocan en el agua o se dejan caer -• Minecart: Are placed on rails or are dropped=• Carro de minas: Se colocan sobre rieles o se dejan caer = -• Bone meal: Is applied on the block it is facing=• Harina de hueso: Se aplica en el bloque que está enfrentando -• Empty buckets: Are used to collect a liquid source=• Cubos vacíos: Se utilizan para recolectar una fuente líquida -• Filled buckets: Are used to place a liquid source=• Cubos llenos: Se utilizan para colocar una fuente de líquido -• Heads, pumpkins: Equipped to players and armor stands, or placed as a block=• Cabezas, calabazas: Equipadas para jugadores y armaduras, o colocadas como un bloque -• Shulker boxes: Are placed as a block=• Cajas de Shulker: Se colocan como un bloque -• TNT: Is placed and ignited=• TNT: Se coloca y se enciende -• Flint and steel: Is used to ignite a fire in air and to ignite TNT=• Mechero: Se usa para encender un fuego en el aire y para encender TNT -• Spawn eggs: Will summon the mob they contain=• Huevos de desove: Convocarán al animal que contienen -• Other items: Are simply dropped=• Otros artículos: Simplemente se dejan caer -Downwards-Facing Dispenser=Dispensador orientado hacia abajo -Upwards-Facing Dispenser=Dispensador orientado hacia arriba -Inventory=Inventario diff --git a/mods/ITEMS/REDSTONE/mcl_dispensers/locale/mcl_dispensers.fr.tr b/mods/ITEMS/REDSTONE/mcl_dispensers/locale/mcl_dispensers.fr.tr deleted file mode 100644 index 622d0a70e7..0000000000 --- a/mods/ITEMS/REDSTONE/mcl_dispensers/locale/mcl_dispensers.fr.tr +++ /dev/null @@ -1,25 +0,0 @@ -# textdomain: mcl_dispensers -Dispenser=Dispenser -A dispenser is a block which acts as a redstone component which, when powered with redstone power, dispenses an item. It has a container with 9 inventory slots.=Un distributeur est un bloc qui agit comme un composant redstone qui, lorsqu'il est alimenté avec une puissance redstone, distribue un article. Il a un conteneur avec 9 emplacements d'inventaire. -Place the dispenser in one of 6 possible directions. The “hole” is where items will fly out of the dispenser. Use the dispenser to access its inventory. Insert the items you wish to dispense. Supply the dispenser with redstone energy once to dispense a random item.=Placez le distributeur dans l'une des 6 directions possibles. Le "trou" est l'endroit où les articles sortiront du distributeur. Utilisez le distributeur pour accéder à son inventaire. Insérez les articles que vous souhaitez distribuer. Fournissez au distributeur de l'énergie de redstone une fois pour distribuer un objet aléatoire. -The dispenser will do different things, depending on the dispensed item:=Le distributeur fera différentes choses, selon l'article distribué: -• Arrows: Are launched=• Flèches: Sont lancées -• Eggs and snowballs: Are thrown=• Oeufs et boules de neige: Sont jetés -• Fire charges: Are fired in a straight line=• Feu d'artifice: Sont tirés en ligne droite -• Armor: Will be equipped to players and armor stands=• Armure: Sera équipée pour les joueurs et les porte-armures -• Boats: Are placed on water or are dropped=• Bateaux: Sont placés sur l'eau ou sont lâchés -• Minecart: Are placed on rails or are dropped=• Minecart: Sont placés sur des rails ou sont lâchés -• Bone meal: Is applied on the block it is facing=• Farine d'os: Est appliquée sur le bloc auquel elle fait face -• Empty buckets: Are used to collect a liquid source=• Seaux vides: Sont utilisés pour collecter une source de liquide -• Filled buckets: Are used to place a liquid source=• Seaux remplis: Sont utilisés pour placer une source de liquide -• Heads, pumpkins: Equipped to players and armor stands, or placed as a block=• Têtes, citrouilles: Seront équipées pour les joueurs et les armures, ou placées en bloc -• Shulker boxes: Are placed as a block=• Boîtes de Shulker: Sont placées comme un bloc -• TNT: Is placed and ignited=• TNT: Est placé et allumé -• Flint and steel: Is used to ignite a fire in air and to ignite TNT=• Briquet: Sert à allumer un feu dans l'air et à allumer du TNT -• Spawn eggs: Will summon the mob they contain=• Silex et acier: Sert à allumer un feu dans l'air et à allumer du TNT -• Other items: Are simply dropped=• Autres articles: Sont simplement lâchés -Downwards-Facing Dispenser=Distributeur orienté vers le bas -Upwards-Facing Dispenser=Distributeur orienté vers le haut -Inventory=Inventaire -9 inventory slots=9 emplacements d'inventaire -Launches item when powered by redstone power=Lance un objet lorsqu'il est alimenté par la puissance Redstone diff --git a/mods/ITEMS/REDSTONE/mcl_dispensers/locale/mcl_dispensers.pl.tr b/mods/ITEMS/REDSTONE/mcl_dispensers/locale/mcl_dispensers.pl.tr deleted file mode 100644 index ee2b3cffe0..0000000000 --- a/mods/ITEMS/REDSTONE/mcl_dispensers/locale/mcl_dispensers.pl.tr +++ /dev/null @@ -1,25 +0,0 @@ -# textdomain: mcl_dispensers -Dispenser=Dozownik -A dispenser is a block which acts as a redstone component which, when powered with redstone power, dispenses an item. It has a container with 9 inventory slots.=Dozownik jest mechanizmem czerwienitowym, który po zasileniu wystrzeli lub wyrzuci przedmiot. Jest on pojemnikiem z 9 miejscami. -Place the dispenser in one of 6 possible directions. The “hole” is where items will fly out of the dispenser. Use the dispenser to access its inventory. Insert the items you wish to dispense. Supply the dispenser with redstone energy once to dispense a random item.=Postaw dozownik w jednym z 6 możliwych kierunków. "Dziura" wskazuje z której strony przedmioty będą dozowane. Użyj dozownika, aby zarządzać jego ekwipunkiem. Zasil dozownik czerwienitem aby wyrzucić losowy przedmiot. -The dispenser will do different things, depending on the dispensed item:=Dozownik będzie zachowywał się inaczej w zależności od przedmiotu: -• Arrows: Are launched=• Strzały: są wystrzelone -• Eggs and snowballs: Are thrown=• Jaja i śnieżki: są wyrzucane -• Fire charges: Are fired in a straight line=• Ładunki ogniowe: Są wystrzelone w linii prostej -• Armor: Will be equipped to players and armor stands=• Zbroja: będzie ekwipowana graczom, lub stojakom na zbroję -• Boats: Are placed on water or are dropped=• Łódki: Będą postawione na wodzie, lub wypuszczone -• Minecart: Are placed on rails or are dropped=• Wagoniki: będą postawione na torach, lub upuszczone -• Bone meal: Is applied on the block it is facing=• Mączka kostna: będzie zaaplikowana do bloku -• Empty buckets: Are used to collect a liquid source=• Puste wiadra: będą wykorzystane do zebrania źródła płynu -• Filled buckets: Are used to place a liquid source=• Pełne wiadra: będą wykorzystane do postawienia źródła płynu -• Heads, pumpkins: Equipped to players and armor stands, or placed as a block=• Głowy, dynie: będą ekwipowane graczom i stojakom na zbroję, lub postawione jako bloki -• Shulker boxes: Are placed as a block=Shulkerowe skrzynie: są postawione jako blok -• TNT: Is placed and ignited=• Trotyl: będzie postawiony i zapalony -• Flint and steel: Is used to ignite a fire in air and to ignite TNT=• Krzesiwo: będzie wykorzystane do rozpalenia ognia w powietrzu i zapalenia trotylu -• Spawn eggs: Will summon the mob they contain=• Jaja przywołujące: przywołają moba, którego zawierają -• Other items: Are simply dropped=• Inne przedmioty: zostaną upuszczone -Downwards-Facing Dispenser=Dozownik skierowany w dół -Upwards-Facing Dispenser=Dozownik skierowany w górę -Inventory=Ekwipunek -9 inventory slots=9 miejsc ekwipunku -Launches item when powered by redstone power=Wystrzela przedmiot gdy zasilony czerwienitem diff --git a/mods/ITEMS/REDSTONE/mcl_dispensers/locale/mcl_dispensers.ru.tr b/mods/ITEMS/REDSTONE/mcl_dispensers/locale/mcl_dispensers.ru.tr deleted file mode 100644 index af4d856ec1..0000000000 --- a/mods/ITEMS/REDSTONE/mcl_dispensers/locale/mcl_dispensers.ru.tr +++ /dev/null @@ -1,25 +0,0 @@ -# textdomain: mcl_dispensers -Dispenser=Диспенсер -A dispenser is a block which acts as a redstone component which, when powered with redstone power, dispenses an item. It has a container with 9 inventory slots.=Диспенсер это элемент редстоуна, который при подаче энергии редстоуна выбрасывает предмет. В нём есть контейнер из 9 отсеков инвентаря. -Place the dispenser in one of 6 possible directions. The “hole” is where items will fly out of the dispenser. Use the dispenser to access its inventory. Insert the items you wish to dispense. Supply the dispenser with redstone energy once to dispense a random item.=Направьте диспенсер в одном из 6 возможных направлений. Предметы будут вылетать из отверстия. [Используйте] диспенсер для доступа к его инвентарю. Загрузите туда предметы, которые должны из него выбрасываться. Подайте однократно на диспенсер энергию редстоуна, чтобы выпал случайный предмет. -The dispenser will do different things, depending on the dispensed item:=Диспенсер будет делать разные вещи, в зависимости от выдаваемых предметов: -• Arrows: Are launched=• Стрелы: выстреливают -• Eggs and snowballs: Are thrown=• Яйца и снежки: происходит бросок -• Fire charges: Are fired in a straight line=• Огненные шары: стреляют по прямой линии -• Armor: Will be equipped to players and armor stands=• Защита: экипирует игроков или стенд защиты -• Boats: Are placed on water or are dropped=• Лодки: спускаются на воду -• Minecart: Are placed on rails or are dropped=• Вагонетка: помещается на рельсы -• Bone meal: Is applied on the block it is facing=• Костная мука: применяется к блоку перед диспенсером -• Empty buckets: Are used to collect a liquid source=• Пустые вёдра: используются для набора источника жидкости -• Filled buckets: Are used to place a liquid source=• Полные вёдра: используются для размещения источника жидкости -• Heads, pumpkins: Equipped to players and armor stands, or placed as a block=• Головы, тыквы: экипирует игроков, или стенд защиты, или устанавливаются как блоки -• Shulker boxes: Are placed as a block=• Ящик шалкера: устанавливается как блок -• TNT: Is placed and ignited=• Тротил: устанавливается и поджигается -• Flint and steel: Is used to ignite a fire in air and to ignite TNT=• Огниво: используется для зажигания огня в воздухе и для подрыва тротила -• Spawn eggs: Will summon the mob they contain=• Порождающие яйца: будут вызывать мобов, содержащихся в них -• Other items: Are simply dropped=• Другие предметы: просто выдаются -Downwards-Facing Dispenser=• Диспенсер, направленный вниз -Upwards-Facing Dispenser=• Диспенсер, направленный вверх -Inventory=Инвентарь -9 inventory slots=9 отсеков инвентаря -Launches item when powered by redstone power=Выбрасывает предметы при подаче энергии редстоуна diff --git a/mods/ITEMS/REDSTONE/mcl_dispensers/locale/template.txt b/mods/ITEMS/REDSTONE/mcl_dispensers/locale/template.txt deleted file mode 100644 index 91129aac13..0000000000 --- a/mods/ITEMS/REDSTONE/mcl_dispensers/locale/template.txt +++ /dev/null @@ -1,25 +0,0 @@ -# textdomain: mcl_dispensers -Dispenser= -A dispenser is a block which acts as a redstone component which, when powered with redstone power, dispenses an item. It has a container with 9 inventory slots.= -Place the dispenser in one of 6 possible directions. The “hole” is where items will fly out of the dispenser. Use the dispenser to access its inventory. Insert the items you wish to dispense. Supply the dispenser with redstone energy once to dispense a random item.= -The dispenser will do different things, depending on the dispensed item:= -• Arrows: Are launched= -• Eggs and snowballs: Are thrown= -• Fire charges: Are fired in a straight line= -• Armor: Will be equipped to players and armor stands= -• Boats: Are placed on water or are dropped= -• Minecart: Are placed on rails or are dropped= -• Bone meal: Is applied on the block it is facing= -• Empty buckets: Are used to collect a liquid source= -• Filled buckets: Are used to place a liquid source= -• Heads, pumpkins: Equipped to players and armor stands, or placed as a block= -• Shulker boxes: Are placed as a block= -• TNT: Is placed and ignited= -• Flint and steel: Is used to ignite a fire in air and to ignite TNT= -• Spawn eggs: Will summon the mob they contain= -• Other items: Are simply dropped= -Downwards-Facing Dispenser= -Upwards-Facing Dispenser= -Inventory= -9 inventory slots= -Launches item when powered by redstone power= diff --git a/mods/ITEMS/REDSTONE/mcl_dispensers/mod.conf b/mods/ITEMS/REDSTONE/mcl_dispensers/mod.conf deleted file mode 100644 index 13cdb5f5a5..0000000000 --- a/mods/ITEMS/REDSTONE/mcl_dispensers/mod.conf +++ /dev/null @@ -1,3 +0,0 @@ -name = mcl_dispensers -depends = mcl_init, mcl_formspec, mesecons, mcl_sounds, mcl_tnt, mcl_worlds, mcl_core, mcl_nether, mcl_armor_stand, mcl_armor -optional_depends = doc, screwdriver diff --git a/mods/ITEMS/REDSTONE/mcl_dispensers/textures/mcl_dispensers_dispenser_front_horizontal.png b/mods/ITEMS/REDSTONE/mcl_dispensers/textures/mcl_dispensers_dispenser_front_horizontal.png deleted file mode 100644 index ca08f4f3ca..0000000000 Binary files a/mods/ITEMS/REDSTONE/mcl_dispensers/textures/mcl_dispensers_dispenser_front_horizontal.png and /dev/null differ diff --git a/mods/ITEMS/REDSTONE/mcl_dispensers/textures/mcl_dispensers_dispenser_front_vertical.png b/mods/ITEMS/REDSTONE/mcl_dispensers/textures/mcl_dispensers_dispenser_front_vertical.png deleted file mode 100644 index 2b2328afab..0000000000 Binary files a/mods/ITEMS/REDSTONE/mcl_dispensers/textures/mcl_dispensers_dispenser_front_vertical.png and /dev/null differ diff --git a/mods/ITEMS/REDSTONE/mesecons_pistons/init.lua b/mods/ITEMS/REDSTONE/mesecons_pistons/init.lua deleted file mode 100644 index 93b8df96d2..0000000000 --- a/mods/ITEMS/REDSTONE/mesecons_pistons/init.lua +++ /dev/null @@ -1,904 +0,0 @@ -local S = minetest.get_translator(minetest.get_current_modname()) - -local PISTON_MAXIMUM_PUSH = 12 - ---Get mesecon rules of pistons - ---everything apart from z- (pusher side) -local piston_rules = { - {x=0, y=0, z=1}, - {x=1, y=0, z=0}, - {x=-1, y=0, z=0}, - {x=0, y=1, z=0}, - {x=0, y=-1, z=0}, -} - ---everything apart from y+ (pusher side) -local piston_up_rules = { - {x=0, y=0, z=-1}, - {x=0, y=0, z=1}, - {x=-1, y=0, z=0}, - {x=1, y=0, z=0}, - {x=0, y=-1, z=0}, -} - ---everything apart from y- (pusher side) -local piston_down_rules = { - {x=0, y=0, z=-1}, - {x=0, y=0, z=1}, - {x=-1, y=0, z=0}, - {x=1, y=0, z=0}, - {x=0, y=1, z=0}, -} - -local function piston_get_rules(node) - local rules = piston_rules - for i = 1, node.param2 do - rules = mesecon.rotate_rules_left(rules) - end - return rules -end - -local function piston_facedir_direction(node) - local rules = {{x = 0, y = 0, z = -1}} - for i = 1, node.param2 do - rules = mesecon.rotate_rules_left(rules) - end - return rules[1] -end - -local function piston_get_direction(dir, node) - if type(dir) == "function" then - return dir(node) - else - return dir - end -end - --- Remove pusher of piston. --- To be used when piston was destroyed or dug. -local function piston_remove_pusher(pos, oldnode) - local pistonspec = minetest.registered_nodes[oldnode.name].mesecons_piston - - local dir = piston_get_direction(pistonspec.dir, oldnode) - local pusherpos = vector.add(pos, dir) - local pushername = minetest.get_node(pusherpos).name - - if pushername == pistonspec.pusher then -- make sure there actually is a pusher - minetest.remove_node(pusherpos) - minetest.check_for_falling(pusherpos) - minetest.sound_play("piston_retract", { - pos = pos, - max_hear_distance = 31, - gain = 0.3, - }, true) - end -end - --- Remove base node of piston. --- To be used when pusher was destroyed. -local function piston_remove_base(pos, oldnode) - local basenodename = minetest.registered_nodes[oldnode.name].corresponding_piston - local pistonspec = minetest.registered_nodes[basenodename].mesecons_piston - - local dir = piston_get_direction(pistonspec.dir, oldnode) - local basepos = vector.subtract(pos, dir) - local basename = minetest.get_node(basepos).name - - if basename == pistonspec.onname then -- make sure there actually is a base node - minetest.remove_node(basepos) - minetest.check_for_falling(basepos) - minetest.sound_play("piston_retract", { - pos = pos, - max_hear_distance = 31, - gain = 0.3, - }, true) - end -end - -local function piston_on(pos, node) - local pistonspec = minetest.registered_nodes[node.name].mesecons_piston - - local dir = piston_get_direction(pistonspec.dir, node) - local np = vector.add(pos, dir) - local meta = minetest.get_meta(pos) - local success, stack, oldstack = mesecon.mvps_push(np, dir, PISTON_MAXIMUM_PUSH, meta:get_string("owner"), pos) - if success then - minetest.swap_node(pos, {param2 = node.param2, name = pistonspec.onname}) - minetest.set_node(np, {param2 = node.param2, name = pistonspec.pusher}) - local below = minetest.get_node({x=np.x,y=np.y-1,z=np.z}) - if below.name == "mcl_farming:soil" or below.name == "mcl_farming:soil_wet" then - minetest.set_node({x=np.x,y=np.y-1,z=np.z}, {name = "mcl_core:dirt"}) - end - mesecon.mvps_process_stack(stack) - mesecon.mvps_move_objects(np, dir, oldstack) - minetest.sound_play("piston_extend", { - pos = pos, - max_hear_distance = 31, - gain = 0.3, - }, true) - end -end - -local function piston_off(pos, node) - local pistonspec = minetest.registered_nodes[node.name].mesecons_piston - minetest.swap_node(pos, {param2 = node.param2, name = pistonspec.offname}) - piston_remove_pusher (pos, node) - if not pistonspec.sticky then - return - end - - local dir = piston_get_direction(pistonspec.dir, node) - local pullpos = vector.add(pos, vector.multiply(dir, 2)) - local meta = minetest.get_meta(pos) - local success, stack = mesecon.mvps_pull_single(pullpos, vector.multiply(dir, -1), PISTON_MAXIMUM_PUSH, meta:get_string("owner"), pos) - if success then - mesecon.mvps_process_stack(pos, dir, stack) - end -end - -local function piston_orientate(pos, placer) - mesecon.mvps_set_owner(pos, placer) - - -- not placed by player - if not placer then return end - - -- placer pitch in degrees - local pitch = placer:get_look_vertical() * (180 / math.pi) - - local node = minetest.get_node(pos) - local pistonspec = minetest.registered_nodes[node.name].mesecons_piston - if pitch > 55 then - minetest.add_node(pos, {name=pistonspec.piston_up}) - elseif pitch < -55 then - minetest.add_node(pos, {name=pistonspec.piston_down}) - end -end - - --- Horizontal pistons - -local pt = 4/16 -- pusher thickness - -local piston_pusher_box = { - type = "fixed", - fixed = { - {-2/16, -2/16, -.5 + pt, 2/16, 2/16, .5 + pt}, - {-.5 , -.5 , -.5 , .5 , .5 , -.5 + pt}, - }, -} - -local piston_on_box = { - type = "fixed", - fixed = { - {-.5, -.5, -.5 + pt, .5, .5, .5} - }, -} - - --- Normal (non-sticky) ones: - -local pistonspec_normal = { - offname = "mesecons_pistons:piston_normal_off", - onname = "mesecons_pistons:piston_normal_on", - dir = piston_facedir_direction, - pusher = "mesecons_pistons:piston_pusher_normal", - piston_down = "mesecons_pistons:piston_down_normal_off", - piston_up = "mesecons_pistons:piston_up_normal_off", -} - -local usagehelp_piston = S("This block can have one of 6 possible orientations.") - --- offstate -minetest.register_node("mesecons_pistons:piston_normal_off", { - description = S("Piston"), - _tt_help = S("Pushes block when powered by redstone power"), - _doc_items_longdesc = S("A piston is a redstone component with a pusher which pushes the block or blocks in front of it when it is supplied with redstone power. Not all blocks can be pushed, however."), - _doc_items_usagehelp = usagehelp_piston, - tiles = { - "mesecons_piston_bottom.png^[transformR180", - "mesecons_piston_bottom.png", - "mesecons_piston_bottom.png^[transformR90", - "mesecons_piston_bottom.png^[transformR270", - "mesecons_piston_back.png", - "mesecons_piston_pusher_front.png" - }, - groups = {handy=1, piston=1}, - paramtype = "light", - paramtype2 = "facedir", - is_ground_content = false, - after_place_node = piston_orientate, - mesecons_piston = pistonspec_normal, - sounds = mcl_sounds.node_sound_stone_defaults(), - mesecons = { - effector = { - action_on = piston_on, - rules = piston_get_rules - }, - }, - _mcl_blast_resistance = 0.5, - _mcl_hardness = 0.5, - on_rotate = function(pos, node, user, mode) - if mode == screwdriver.ROTATE_AXIS then - minetest.set_node(pos, {name="mesecons_pistons:piston_up_normal_off"}) - return true - end - end, -}) - --- onstate -minetest.register_node("mesecons_pistons:piston_normal_on", { - drawtype = "nodebox", - tiles = { - "mesecons_piston_bottom.png^[transformR180", - "mesecons_piston_bottom.png", - "mesecons_piston_bottom.png^[transformR90", - "mesecons_piston_bottom.png^[transformR270", - "mesecons_piston_back.png", - "mesecons_piston_on_front.png" - }, - groups = {handy=1, piston=1, not_in_creative_inventory=1}, - paramtype = "light", - paramtype2 = "facedir", - is_ground_content = false, - drop = "mesecons_pistons:piston_normal_off", - after_destruct = piston_remove_pusher, - node_box = piston_on_box, - selection_box = piston_on_box, - mesecons_piston = pistonspec_normal, - sounds = mcl_sounds.node_sound_stone_defaults(), - mesecons = { - effector = { - action_off = piston_off, - rules = piston_get_rules - }, - }, - _mcl_blast_resistance = 0.5, - _mcl_hardness = 0.5, - on_rotate = false, -}) - --- pusher -minetest.register_node("mesecons_pistons:piston_pusher_normal", { - drawtype = "nodebox", - tiles = { - "mesecons_piston_pusher_top.png", - "mesecons_piston_pusher_bottom.png", - "mesecons_piston_pusher_left.png", - "mesecons_piston_pusher_right.png", - "mesecons_piston_pusher_back.png", - "mesecons_piston_pusher_front.png" - }, - paramtype = "light", - paramtype2 = "facedir", - groups = {piston_pusher=1}, - is_ground_content = false, - after_destruct = piston_remove_base, - diggable = false, - drop = "", - corresponding_piston = "mesecons_pistons:piston_normal_on", - selection_box = piston_pusher_box, - node_box = piston_pusher_box, - sounds = mcl_sounds.node_sound_wood_defaults(), - _mcl_blast_resistance = 0.5, - on_rotate = false, -}) - --- Sticky ones - -local pistonspec_sticky = { - offname = "mesecons_pistons:piston_sticky_off", - onname = "mesecons_pistons:piston_sticky_on", - dir = piston_facedir_direction, - pusher = "mesecons_pistons:piston_pusher_sticky", - sticky = true, - piston_down = "mesecons_pistons:piston_down_sticky_off", - piston_up = "mesecons_pistons:piston_up_sticky_off", -} - --- offstate -minetest.register_node("mesecons_pistons:piston_sticky_off", { - description = S("Sticky Piston"), - _tt_help = S("Pushes or pulls block when powered by redstone power"), - _doc_items_longdesc = S("A sticky piston is a redstone component with a sticky pusher which can be extended and retracted. It extends when it is supplied with redstone power. When the pusher extends, it pushes the block or blocks in front of it. When it retracts, it pulls back the single block in front of it. Note that not all blocks can be pushed or pulled."), - _doc_items_usagehelp = usagehelp_piston, - - tiles = { - "mesecons_piston_bottom.png^[transformR180", - "mesecons_piston_bottom.png", - "mesecons_piston_bottom.png^[transformR90", - "mesecons_piston_bottom.png^[transformR270", - "mesecons_piston_back.png", - "mesecons_piston_pusher_front_sticky.png" - }, - groups = {handy=1, piston=2}, - paramtype = "light", - paramtype2 = "facedir", - is_ground_content = false, - after_place_node = piston_orientate, - mesecons_piston = pistonspec_sticky, - sounds = mcl_sounds.node_sound_stone_defaults(), - mesecons = { - effector = { - action_on = piston_on, - rules = piston_get_rules - }, - }, - _mcl_blast_resistance = 0.5, - _mcl_hardness = 0.5, - on_rotate = function(pos, node, user, mode) - if mode == screwdriver.ROTATE_AXIS then - minetest.set_node(pos, {name="mesecons_pistons:piston_up_sticky_off"}) - return true - end - end, -}) - --- onstate -minetest.register_node("mesecons_pistons:piston_sticky_on", { - drawtype = "nodebox", - tiles = { - "mesecons_piston_bottom.png^[transformR180", - "mesecons_piston_bottom.png", - "mesecons_piston_bottom.png^[transformR90", - "mesecons_piston_bottom.png^[transformR270", - "mesecons_piston_back.png", - "mesecons_piston_on_front.png" - }, - groups = {handy=1, piston=2, not_in_creative_inventory=1}, - paramtype = "light", - paramtype2 = "facedir", - is_ground_content = false, - drop = "mesecons_pistons:piston_sticky_off", - after_destruct = piston_remove_pusher, - node_box = piston_on_box, - selection_box = piston_on_box, - mesecons_piston = pistonspec_sticky, - sounds = mcl_sounds.node_sound_stone_defaults(), - mesecons = { - effector = { - action_off = piston_off, - rules = piston_get_rules - }, - }, - _mcl_blast_resistance = 0.5, - _mcl_hardness = 0.5, - on_rotate = false, -}) - --- pusher -minetest.register_node("mesecons_pistons:piston_pusher_sticky", { - drawtype = "nodebox", - tiles = { - "mesecons_piston_pusher_top.png", - "mesecons_piston_pusher_bottom.png", - "mesecons_piston_pusher_left.png", - "mesecons_piston_pusher_right.png", - "mesecons_piston_pusher_back.png", - "mesecons_piston_pusher_front_sticky.png" - }, - paramtype = "light", - paramtype2 = "facedir", - groups = {piston_pusher=2}, - is_ground_content = false, - after_destruct = piston_remove_base, - diggable = false, - drop = "", - corresponding_piston = "mesecons_pistons:piston_sticky_on", - selection_box = piston_pusher_box, - node_box = piston_pusher_box, - sounds = mcl_sounds.node_sound_wood_defaults(), - _mcl_blast_resistance = 0.5, - on_rotate = false, -}) - --- --- --- UP --- --- - -local piston_up_pusher_box = { - type = "fixed", - fixed = { - {-2/16, -.5 - pt, -2/16, 2/16, .5 - pt, 2/16}, - {-.5 , .5 - pt, -.5 , .5 , .5 , .5}, - }, -} - -local piston_up_on_box = { - type = "fixed", - fixed = { - {-.5, -.5, -.5 , .5, .5-pt, .5} - }, -} - --- Normal - -local pistonspec_normal_up = { - offname = "mesecons_pistons:piston_up_normal_off", - onname = "mesecons_pistons:piston_up_normal_on", - dir = {x = 0, y = 1, z = 0}, - pusher = "mesecons_pistons:piston_up_pusher_normal", -} - --- offstate -minetest.register_node("mesecons_pistons:piston_up_normal_off", { - tiles = { - "mesecons_piston_pusher_front.png", - "mesecons_piston_back.png", - "mesecons_piston_bottom.png", - "mesecons_piston_bottom.png", - "mesecons_piston_bottom.png", - "mesecons_piston_bottom.png", - }, - groups = {handy=1, piston=1, not_in_creative_inventory=1}, - paramtype = "light", - paramtype2 = "facedir", - is_ground_content = false, - drop = "mesecons_pistons:piston_normal_off", - mesecons_piston = pistonspec_normal_up, - mesecons = { - effector = { - action_on = piston_on, - rules = piston_up_rules, - }, - }, - sounds = mcl_sounds.node_sound_stone_defaults({ - footstep = mcl_sounds.node_sound_wood_defaults().footstep - }), - _mcl_blast_resistance = 0.5, - _mcl_hardness = 0.5, - on_rotate = function(pos, node, user, mode) - if mode == screwdriver.ROTATE_AXIS then - minetest.set_node(pos, {name="mesecons_pistons:piston_down_normal_off"}) - return true - end - return false - end, -}) - --- onstate -minetest.register_node("mesecons_pistons:piston_up_normal_on", { - drawtype = "nodebox", - tiles = { - "mesecons_piston_on_front.png", - "mesecons_piston_back.png", - "mesecons_piston_bottom.png", - "mesecons_piston_bottom.png", - "mesecons_piston_bottom.png", - "mesecons_piston_bottom.png", - }, - groups = {handy=1, piston_=1, not_in_creative_inventory=1}, - paramtype = "light", - paramtype2 = "facedir", - is_ground_content = false, - drop = "mesecons_pistons:piston_normal_off", - after_destruct = piston_remove_pusher, - node_box = piston_up_on_box, - selection_box = piston_up_on_box, - mesecons_piston = pistonspec_normal_up, - sounds = mcl_sounds.node_sound_stone_defaults(), - mesecons = { - effector = { - action_off = piston_off, - rules = piston_up_rules, - }, - }, - _mcl_blast_resistance = 0.5, - _mcl_hardness = 0.5, - on_rotate = false, -}) - --- pusher -minetest.register_node("mesecons_pistons:piston_up_pusher_normal", { - drawtype = "nodebox", - tiles = { - "mesecons_piston_pusher_front.png", - "mesecons_piston_pusher_back.png", - "mesecons_piston_pusher_left.png^[transformR270", - "mesecons_piston_pusher_right.png^[transformR90", - "mesecons_piston_pusher_bottom.png", - "mesecons_piston_pusher_top.png^[transformR180", - }, - paramtype = "light", - paramtype2 = "facedir", - groups = {piston_pusher=1}, - is_ground_content = false, - after_destruct = piston_remove_base, - diggable = false, - drop = "", - corresponding_piston = "mesecons_pistons:piston_up_normal_on", - selection_box = piston_up_pusher_box, - node_box = piston_up_pusher_box, - sounds = mcl_sounds.node_sound_wood_defaults(), - _mcl_blast_resistance = 0.5, - on_rotate = false, -}) - - - --- Sticky - - -local pistonspec_sticky_up = { - offname = "mesecons_pistons:piston_up_sticky_off", - onname = "mesecons_pistons:piston_up_sticky_on", - dir = {x = 0, y = 1, z = 0}, - pusher = "mesecons_pistons:piston_up_pusher_sticky", - sticky = true, -} - --- offstate -minetest.register_node("mesecons_pistons:piston_up_sticky_off", { - tiles = { - "mesecons_piston_pusher_front_sticky.png", - "mesecons_piston_back.png", - "mesecons_piston_bottom.png", - "mesecons_piston_bottom.png", - "mesecons_piston_bottom.png", - "mesecons_piston_bottom.png", - }, - groups = {handy=1, piston=2, not_in_creative_inventory=1}, - paramtype = "light", - paramtype2 = "facedir", - is_ground_content = false, - drop = "mesecons_pistons:piston_sticky_off", - mesecons_piston = pistonspec_sticky_up, - sounds = mcl_sounds.node_sound_stone_defaults({ - footstep = mcl_sounds.node_sound_wood_defaults().footstep - }), - mesecons = { - effector = { - action_on = piston_on, - rules = piston_up_rules, - }, - }, - _mcl_blast_resistance = 0.5, - _mcl_hardness = 0.5, - on_rotate = function(pos, node, user, mode) - if mode == screwdriver.ROTATE_AXIS then - minetest.set_node(pos, {name="mesecons_pistons:piston_down_sticky_off"}) - return true - end - return false - end, -}) - --- onstate -minetest.register_node("mesecons_pistons:piston_up_sticky_on", { - drawtype = "nodebox", - tiles = { - "mesecons_piston_on_front.png", - "mesecons_piston_back.png", - "mesecons_piston_bottom.png", - "mesecons_piston_bottom.png", - "mesecons_piston_bottom.png", - "mesecons_piston_bottom.png", - }, - groups = {handy=1, piston=2, not_in_creative_inventory=1}, - paramtype = "light", - paramtype2 = "facedir", - is_ground_content = false, - drop = "mesecons_pistons:piston_sticky_off", - after_destruct = piston_remove_pusher, - node_box = piston_up_on_box, - selection_box = piston_up_on_box, - mesecons_piston = pistonspec_sticky_up, - sounds = mcl_sounds.node_sound_stone_defaults(), - mesecons = { - effector = { - action_off = piston_off, - rules = piston_up_rules, - }, - }, - _mcl_blast_resistance = 0.5, - _mcl_hardness = 0.5, - on_rotate = false, -}) - --- pusher -minetest.register_node("mesecons_pistons:piston_up_pusher_sticky", { - drawtype = "nodebox", - tiles = { - "mesecons_piston_pusher_front_sticky.png", - "mesecons_piston_pusher_back.png", - "mesecons_piston_pusher_left.png^[transformR270", - "mesecons_piston_pusher_right.png^[transformR90", - "mesecons_piston_pusher_bottom.png", - "mesecons_piston_pusher_top.png^[transformR180", - }, - paramtype = "light", - paramtype2 = "facedir", - groups = {piston_pusher=2}, - is_ground_content = false, - after_destruct = piston_remove_base, - diggable = false, - drop = "", - corresponding_piston = "mesecons_pistons:piston_up_sticky_on", - selection_box = piston_up_pusher_box, - node_box = piston_up_pusher_box, - sounds = mcl_sounds.node_sound_wood_defaults(), - _mcl_blast_resistance = 0.5, - on_rotate = false, -}) - --- --- --- DOWN --- --- - -local piston_down_pusher_box = { - type = "fixed", - fixed = { - {-2/16, -.5 + pt, -2/16, 2/16, .5 + pt, 2/16}, - {-.5 , -.5 , -.5 , .5 , -.5 + pt, .5}, - }, -} - -local piston_down_on_box = { - type = "fixed", - fixed = { - {-.5, -.5+pt, -.5 , .5, .5, .5} - }, -} - - - --- Normal - -local pistonspec_normal_down = { - offname = "mesecons_pistons:piston_down_normal_off", - onname = "mesecons_pistons:piston_down_normal_on", - dir = {x = 0, y = -1, z = 0}, - pusher = "mesecons_pistons:piston_down_pusher_normal", -} - --- offstate -minetest.register_node("mesecons_pistons:piston_down_normal_off", { - tiles = { - "mesecons_piston_back.png", - "mesecons_piston_pusher_front.png", - "mesecons_piston_bottom.png^[transformR180", - "mesecons_piston_bottom.png^[transformR180", - "mesecons_piston_bottom.png^[transformR180", - "mesecons_piston_bottom.png^[transformR180", - }, - groups = {handy=1, piston=1, not_in_creative_inventory=1}, - paramtype = "light", - paramtype2 = "facedir", - is_ground_content = false, - drop = "mesecons_pistons:piston_normal_off", - mesecons_piston = pistonspec_normal_down, - sounds = mcl_sounds.node_sound_stone_defaults(), - mesecons = { - effector = { - action_on = piston_on, - rules = piston_down_rules, - }, - }, - _mcl_blast_resistance = 0.5, - _mcl_hardness = 0.5, - on_rotate = function(pos, node, user, mode) - if mode == screwdriver.ROTATE_AXIS then - minetest.set_node(pos, {name="mesecons_pistons:piston_normal_off"}) - return true - end - return false - end, -}) - --- onstate -minetest.register_node("mesecons_pistons:piston_down_normal_on", { - drawtype = "nodebox", - tiles = { - "mesecons_piston_back.png", - "mesecons_piston_on_front.png", - "mesecons_piston_bottom.png^[transformR180", - "mesecons_piston_bottom.png^[transformR180", - "mesecons_piston_bottom.png^[transformR180", - "mesecons_piston_bottom.png^[transformR180", - }, - groups = {handy=1, piston=1, not_in_creative_inventory=1}, - paramtype = "light", - paramtype2 = "facedir", - is_ground_content = false, - drop = "mesecons_pistons:piston_normal_off", - after_destruct = piston_remove_pusher, - node_box = piston_down_on_box, - selection_box = piston_down_on_box, - mesecons_piston = pistonspec_normal_down, - sounds = mcl_sounds.node_sound_stone_defaults(), - mesecons = { - effector = { - action_off = piston_off, - rules = piston_down_rules, - }, - }, - _mcl_blast_resistance = 0.5, - _mcl_hardness = 0.5, - on_rotate = false, -}) - --- pusher -minetest.register_node("mesecons_pistons:piston_down_pusher_normal", { - drawtype = "nodebox", - tiles = { - "mesecons_piston_pusher_back.png", - "mesecons_piston_pusher_front.png", - "mesecons_piston_pusher_left.png^[transformR90", - "mesecons_piston_pusher_right.png^[transformR270", - "mesecons_piston_pusher_bottom.png^[transformR180", - "mesecons_piston_pusher_top.png", - }, - paramtype = "light", - paramtype2 = "facedir", - groups = {piston_pusher=1}, - is_ground_content = false, - after_destruct = piston_remove_base, - diggable = false, - drop = "", - corresponding_piston = "mesecons_pistons:piston_down_normal_on", - selection_box = piston_down_pusher_box, - node_box = piston_down_pusher_box, - sounds = mcl_sounds.node_sound_wood_defaults(), - _mcl_blast_resistance = 0.5, - on_rotate = false, -}) - --- Sticky - -local pistonspec_sticky_down = { - onname = "mesecons_pistons:piston_down_sticky_on", - offname = "mesecons_pistons:piston_down_sticky_off", - dir = {x = 0, y = -1, z = 0}, - pusher = "mesecons_pistons:piston_down_pusher_sticky", - sticky = true, -} - --- offstate -minetest.register_node("mesecons_pistons:piston_down_sticky_off", { - tiles = { - "mesecons_piston_back.png", - "mesecons_piston_pusher_front_sticky.png", - "mesecons_piston_bottom.png^[transformR180", - "mesecons_piston_bottom.png^[transformR180", - "mesecons_piston_bottom.png^[transformR180", - "mesecons_piston_bottom.png^[transformR180", - }, - groups = {handy=1, piston=2, not_in_creative_inventory = 1}, - paramtype = "light", - paramtype2 = "facedir", - is_ground_content = false, - drop = "mesecons_pistons:piston_sticky_off", - mesecons_piston = pistonspec_sticky_down, - sounds = mcl_sounds.node_sound_stone_defaults(), - mesecons = { - effector = { - action_on = piston_on, - rules = piston_down_rules, - }, - }, - _mcl_blast_resistance = 0.5, - _mcl_hardness = 0.5, - on_rotate = function(pos, node, user, mode) - if mode == screwdriver.ROTATE_AXIS then - minetest.set_node(pos, {name="mesecons_pistons:piston_sticky_off"}) - return true - end - return false - end, -}) - --- onstate -minetest.register_node("mesecons_pistons:piston_down_sticky_on", { - drawtype = "nodebox", - tiles = { - "mesecons_piston_back.png", - "mesecons_piston_on_front.png", - "mesecons_piston_bottom.png^[transformR180", - "mesecons_piston_bottom.png^[transformR180", - "mesecons_piston_bottom.png^[transformR180", - "mesecons_piston_bottom.png^[transformR180", - }, - groups = {handy=1, piston=1, not_in_creative_inventory=1}, - paramtype = "light", - paramtype2 = "facedir", - is_ground_content = false, - drop = "mesecons_pistons:piston_sticky_off", - after_destruct = piston_remove_pusher, - node_box = piston_down_on_box, - selection_box = piston_down_on_box, - mesecons_piston = pistonspec_sticky_down, - sounds = mcl_sounds.node_sound_stone_defaults(), - mesecons = { - effector = { - action_off = piston_off, - rules = piston_down_rules, - }, - }, - _mcl_blast_resistance = 0.5, - _mcl_hardness = 0.5, - on_rotate = false, -}) - --- pusher -minetest.register_node("mesecons_pistons:piston_down_pusher_sticky", { - drawtype = "nodebox", - tiles = { - "mesecons_piston_pusher_back.png", - "mesecons_piston_pusher_front_sticky.png", - "mesecons_piston_pusher_left.png^[transformR90", - "mesecons_piston_pusher_right.png^[transformR270", - "mesecons_piston_pusher_bottom.png^[transformR180", - "mesecons_piston_pusher_top.png", - }, - paramtype = "light", - paramtype2 = "facedir", - groups = {piston_pusher=2}, - is_ground_content = false, - after_destruct = piston_remove_base, - diggable = false, - drop = "", - corresponding_piston = "mesecons_pistons:piston_down_sticky_on", - selection_box = piston_down_pusher_box, - node_box = piston_down_pusher_box, - sounds = mcl_sounds.node_sound_wood_defaults(), - _mcl_blast_resistance = 0.5, - on_rotate = false, -}) - - -mesecon.register_mvps_stopper("mesecons_pistons:piston_pusher_normal") -mesecon.register_mvps_stopper("mesecons_pistons:piston_pusher_sticky") -mesecon.register_mvps_stopper("mesecons_pistons:piston_up_pusher_normal") -mesecon.register_mvps_stopper("mesecons_pistons:piston_up_pusher_sticky") -mesecon.register_mvps_stopper("mesecons_pistons:piston_down_pusher_normal") -mesecon.register_mvps_stopper("mesecons_pistons:piston_down_pusher_sticky") -mesecon.register_mvps_stopper("mesecons_pistons:piston_normal_on") -mesecon.register_mvps_stopper("mesecons_pistons:piston_sticky_on") -mesecon.register_mvps_stopper("mesecons_pistons:piston_up_normal_on") -mesecon.register_mvps_stopper("mesecons_pistons:piston_up_sticky_on") -mesecon.register_mvps_stopper("mesecons_pistons:piston_down_normal_on") -mesecon.register_mvps_stopper("mesecons_pistons:piston_down_sticky_on") - ---craft recipes -minetest.register_craft({ - output = "mesecons_pistons:piston_normal_off", - recipe = { - {"group:wood", "group:wood", "group:wood"}, - {"mcl_core:cobble", "mcl_core:iron_ingot", "mcl_core:cobble"}, - {"mcl_core:cobble", "mesecons:redstone", "mcl_core:cobble"}, - }, -}) - -minetest.register_craft({ - output = "mesecons_pistons:piston_sticky_off", - recipe = { - {"mcl_mobitems:slimeball"}, - {"mesecons_pistons:piston_normal_off"}, - }, -}) - --- Add entry aliases for the Help -if minetest.get_modpath("doc") then - doc.add_entry_alias("nodes", "mesecons_pistons:piston_normal_off", "nodes", "mesecons_pistons:piston_normal_on") - doc.add_entry_alias("nodes", "mesecons_pistons:piston_normal_off", "nodes", "mesecons_pistons:piston_up_normal_off") - doc.add_entry_alias("nodes", "mesecons_pistons:piston_normal_off", "nodes", "mesecons_pistons:piston_up_normal_on") - doc.add_entry_alias("nodes", "mesecons_pistons:piston_normal_off", "nodes", "mesecons_pistons:piston_down_normal_off") - doc.add_entry_alias("nodes", "mesecons_pistons:piston_normal_off", "nodes", "mesecons_pistons:piston_down_normal_on") - doc.add_entry_alias("nodes", "mesecons_pistons:piston_normal_off", "nodes", "mesecons_pistons:piston_pusher_normal") - doc.add_entry_alias("nodes", "mesecons_pistons:piston_normal_off", "nodes", "mesecons_pistons:piston_up_pusher_normal") - doc.add_entry_alias("nodes", "mesecons_pistons:piston_normal_off", "nodes", "mesecons_pistons:piston_down_pusher_normal") - - doc.add_entry_alias("nodes", "mesecons_pistons:piston_sticky_off", "nodes", "mesecons_pistons:piston_sticky_on") - doc.add_entry_alias("nodes", "mesecons_pistons:piston_sticky_off", "nodes", "mesecons_pistons:piston_up_sticky_off") - doc.add_entry_alias("nodes", "mesecons_pistons:piston_sticky_off", "nodes", "mesecons_pistons:piston_up_sticky_on") - doc.add_entry_alias("nodes", "mesecons_pistons:piston_sticky_off", "nodes", "mesecons_pistons:piston_down_sticky_off") - doc.add_entry_alias("nodes", "mesecons_pistons:piston_sticky_off", "nodes", "mesecons_pistons:piston_down_sticky_on") - doc.add_entry_alias("nodes", "mesecons_pistons:piston_sticky_off", "nodes", "mesecons_pistons:piston_pusher_sticky") - doc.add_entry_alias("nodes", "mesecons_pistons:piston_sticky_off", "nodes", "mesecons_pistons:piston_up_pusher_sticky") - doc.add_entry_alias("nodes", "mesecons_pistons:piston_sticky_off", "nodes", "mesecons_pistons:piston_down_pusher_sticky") -end - diff --git a/mods/ITEMS/REDSTONE/mesecons_pistons/locale/mesecons_pistons.de.tr b/mods/ITEMS/REDSTONE/mesecons_pistons/locale/mesecons_pistons.de.tr deleted file mode 100644 index 9719812bd3..0000000000 --- a/mods/ITEMS/REDSTONE/mesecons_pistons/locale/mesecons_pistons.de.tr +++ /dev/null @@ -1,8 +0,0 @@ -# textdomain: mesecons_pistons -This block can have one of 6 possible orientations.=Dieser Block kann eine von 6 möglichen Richtungen annehmen. -Piston=Kolben -A piston is a redstone component with a pusher which pushes the block or blocks in front of it when it is supplied with redstone power. Not all blocks can be pushed, however.=Ein Kolben ist eine Redstonekomponente mit einem Schieber den Block oder die Blöcke vor ihm schieben wird, wenn er mit Redstoneenergie versorgt wird. Allerdings können nicht alle Blöcke können geschoben werden. -Sticky Piston=Klebriger Kolben -A sticky piston is a redstone component with a sticky pusher which can be extended and retracted. It extends when it is supplied with redstone power. When the pusher extends, it pushes the block or blocks in front of it. When it retracts, it pulls back the single block in front of it. Note that not all blocks can be pushed or pulled.=Ein klebriger Kolben ist eine Redstonekomponente mit einem klebrigen Schieber, der ein- und ausgefahren werden kann. Er fährt aus, wenn er mit Redstoneenergie versorgt wird. Wenn der Schieber ausgefahren wird, schiebt er den Block oder die Blöcke vor ihm. Wird er eingefahren, zieht er den Block vor ihm zu sich. Nicht alle Blöcke können geschoben oder gezogen werden. -Pushes block when powered by redstone power=Schiebt Block, wenn mit Redstoneenergie versorgt -Pushes or pulls block when powered by redstone power=Schiebt oder zieht Block, wenn mit Redstoneenergie versorgt diff --git a/mods/ITEMS/REDSTONE/mesecons_pistons/locale/mesecons_pistons.es.tr b/mods/ITEMS/REDSTONE/mesecons_pistons/locale/mesecons_pistons.es.tr deleted file mode 100644 index 113472ac2a..0000000000 --- a/mods/ITEMS/REDSTONE/mesecons_pistons/locale/mesecons_pistons.es.tr +++ /dev/null @@ -1,6 +0,0 @@ -# textdomain: mesecons_pistons -This block can have one of 6 possible orientations.=Este bloque puede tener una de las 6 orientaciones posibles. -Piston=Pistón -A piston is a redstone component with a pusher which pushes the block or blocks in front of it when it is supplied with redstone power. Not all blocks can be pushed, however.=Un pistón es un componente de redstone con un empujador que empuja el bloque o bloques frente a él cuando se le suministra energía de redstone. Sin embargo, no todos los bloques se pueden empujar. -Sticky Piston=Pistón pegajoso -A sticky piston is a redstone component with a sticky pusher which can be extended and retracted. It extends when it is supplied with redstone power. When the pusher extends, it pushes the block or blocks in front of it. When it retracts, it pulls back the single block in front of it. Note that not all blocks can be pushed or pulled.=Un pistón pegajoso es un componente de redstone con un empujador pegajoso que se puede extender y retraer. Se extiende cuando se le suministra energía de redstone. Cuando el empujador se extiende, empuja el bloque o bloques frente a él. Cuando se retrae, tira hacia atrás el bloque único que está frente a él. Tenga en cuenta que no todos los bloques se pueden empujar o tirar. diff --git a/mods/ITEMS/REDSTONE/mesecons_pistons/locale/mesecons_pistons.fr.tr b/mods/ITEMS/REDSTONE/mesecons_pistons/locale/mesecons_pistons.fr.tr deleted file mode 100644 index 9046e2d6bc..0000000000 --- a/mods/ITEMS/REDSTONE/mesecons_pistons/locale/mesecons_pistons.fr.tr +++ /dev/null @@ -1,8 +0,0 @@ -# textdomain: mesecons_pistons -This block can have one of 6 possible orientations.=Ce bloc peut avoir l'une des 6 orientations possibles. -Piston=Piston -A piston is a redstone component with a pusher which pushes the block or blocks in front of it when it is supplied with redstone power. Not all blocks can be pushed, however.=Un piston est un composant de redstone avec un poussoir qui pousse le ou les blocs devant lui lorsqu'il est alimenté en redstone. Cependant, tous les blocs ne peuvent pas être poussés. -Sticky Piston=Piston collant -A sticky piston is a redstone component with a sticky pusher which can be extended and retracted. It extends when it is supplied with redstone power. When the pusher extends, it pushes the block or blocks in front of it. When it retracts, it pulls back the single block in front of it. Note that not all blocks can be pushed or pulled.=Un piston collant est un composant de redstone avec un poussoir collant qui peut être étendu et rétracté. Il se prolonge lorsqu'il est alimenté en redstone. Lorsque le poussoir s'étend, il pousse le ou les blocs devant lui. Quand il se rétracte, il recule le bloc unique devant lui. Notez que tous les blocs ne peuvent pas être poussés ou tirés. -Pushes block when powered by redstone power=Pousse le bloc lorsqu'il est alimenté par la puissance Redstone -Pushes or pulls block when powered by redstone power=Pousse ou tire le bloc lorsqu'il est alimenté par une puissance redstone diff --git a/mods/ITEMS/REDSTONE/mesecons_pistons/locale/mesecons_pistons.pl.tr b/mods/ITEMS/REDSTONE/mesecons_pistons/locale/mesecons_pistons.pl.tr deleted file mode 100644 index 8f7f45191a..0000000000 --- a/mods/ITEMS/REDSTONE/mesecons_pistons/locale/mesecons_pistons.pl.tr +++ /dev/null @@ -1,9 +0,0 @@ -# textdomain: mesecons_pistons -This block can have one of 6 possible orientations.=Ten blok może mieć 6 możliwych orientacji. -Piston=Tłok -A piston is a redstone component with a pusher which pushes the block or blocks in front of it when it is supplied with redstone power. Not all blocks can be pushed, however.=Tłoki są mechanizmami czerwienitowymi które popycha blok lub bloki stojące przed nim gdy dostarczy się mu energię czerwienitową, jednak nie wszystkie bloki mogą zostać popchnięte. -Sticky Piston=Lepki tłok -A sticky piston is a redstone component with a sticky pusher which can be extended and retracted. It extends when it is supplied with redstone power. When the pusher extends, it pushes the block or blocks in front of it. When it retracts, it pulls back the single block in front of it. Note that not all blocks can be pushed or pulled.=Lepki tłok jest mechanizmem czerwienitowym z lepkim wysięgnikiem, który można wysuwać i wsuwać. Wysuwa się gdy dostarczana jest energia czerwienitowa. Gdy się wysuwa popycha on blok lub bloki znajdujące się przed nim. Gdy się wsuwa przyciąga on pojedynczy blok przed nim. Nie wszystkie bloki mogą być przesuwane i przyciągane. -Pushes block when powered by redstone power=Popycha blok gdy jest zasilony czerwienitem -Pushes or pulls block when powered by redstone power=Popycha lub przyciąga blok gdy jest zasilany czerwienitem - diff --git a/mods/ITEMS/REDSTONE/mesecons_pistons/locale/mesecons_pistons.ru.tr b/mods/ITEMS/REDSTONE/mesecons_pistons/locale/mesecons_pistons.ru.tr deleted file mode 100644 index d69542e796..0000000000 --- a/mods/ITEMS/REDSTONE/mesecons_pistons/locale/mesecons_pistons.ru.tr +++ /dev/null @@ -1,8 +0,0 @@ -# textdomain: mesecons_pistons -This block can have one of 6 possible orientations.=Этот блок быть ориентирован в одном из 6 возможных направлений. -Piston=Поршень -A piston is a redstone component with a pusher which pushes the block or blocks in front of it when it is supplied with redstone power. Not all blocks can be pushed, however.=Поршень это компонент редстоуна с толкателем, который толкает блок или блоки перед собой при подаче энергии редстоуна. Следует отметить, что не все блоки могут быть сдвинуты. -Sticky Piston=Липкий поршень -A sticky piston is a redstone component with a sticky pusher which can be extended and retracted. It extends when it is supplied with redstone power. When the pusher extends, it pushes the block or blocks in front of it. When it retracts, it pulls back the single block in front of it. Note that not all blocks can be pushed or pulled.=Липкий поршень представляет собой компонент редстоуна с липким толкателем, который можно удлинять и втягивать обратно. Он расширяется, когда на него подается энергия красного камня. Когда толкатель выдвигается, он толкает блок или блоки перед собой. Когда он втягивается, он возвращает обратно один блок перед собой. Следует отметить, что не все блоки могут быть сдвинуты. или втянуты. -Pushes block when powered by redstone power=Толкает блок при подаче энергии редстоуна -Pushes or pulls block when powered by redstone power=Толкает или тянет блок при подаче энергии редстоуна diff --git a/mods/ITEMS/REDSTONE/mesecons_pistons/locale/template.txt b/mods/ITEMS/REDSTONE/mesecons_pistons/locale/template.txt deleted file mode 100644 index 6b54c58470..0000000000 --- a/mods/ITEMS/REDSTONE/mesecons_pistons/locale/template.txt +++ /dev/null @@ -1,8 +0,0 @@ -# textdomain: mesecons_pistons -This block can have one of 6 possible orientations.= -Piston= -A piston is a redstone component with a pusher which pushes the block or blocks in front of it when it is supplied with redstone power. Not all blocks can be pushed, however.= -Sticky Piston= -A sticky piston is a redstone component with a sticky pusher which can be extended and retracted. It extends when it is supplied with redstone power. When the pusher extends, it pushes the block or blocks in front of it. When it retracts, it pulls back the single block in front of it. Note that not all blocks can be pushed or pulled.= -Pushes block when powered by redstone power= -Pushes or pulls block when powered by redstone power= diff --git a/mods/ITEMS/REDSTONE/mesecons_pistons/mod.conf b/mods/ITEMS/REDSTONE/mesecons_pistons/mod.conf deleted file mode 100644 index 5a3f6c80fb..0000000000 --- a/mods/ITEMS/REDSTONE/mesecons_pistons/mod.conf +++ /dev/null @@ -1,3 +0,0 @@ -name = mesecons_pistons -depends = mesecons, mesecons_mvps, mcl_mobitems -optional_depends = doc, screwdriver diff --git a/mods/ITEMS/REDSTONE/mesecons_pistons/sounds/piston_extend.ogg b/mods/ITEMS/REDSTONE/mesecons_pistons/sounds/piston_extend.ogg deleted file mode 100644 index e234ad9449..0000000000 Binary files a/mods/ITEMS/REDSTONE/mesecons_pistons/sounds/piston_extend.ogg and /dev/null differ diff --git a/mods/ITEMS/REDSTONE/mesecons_pistons/sounds/piston_retract.ogg b/mods/ITEMS/REDSTONE/mesecons_pistons/sounds/piston_retract.ogg deleted file mode 100644 index feb9f04440..0000000000 Binary files a/mods/ITEMS/REDSTONE/mesecons_pistons/sounds/piston_retract.ogg and /dev/null differ diff --git a/mods/ITEMS/REDSTONE/mesecons_pistons/textures/mesecons_piston_back.png b/mods/ITEMS/REDSTONE/mesecons_pistons/textures/mesecons_piston_back.png deleted file mode 100644 index 6ea941df5b..0000000000 Binary files a/mods/ITEMS/REDSTONE/mesecons_pistons/textures/mesecons_piston_back.png and /dev/null differ diff --git a/mods/ITEMS/REDSTONE/mesecons_pistons/textures/mesecons_piston_bottom.png b/mods/ITEMS/REDSTONE/mesecons_pistons/textures/mesecons_piston_bottom.png deleted file mode 100644 index b3b44718eb..0000000000 Binary files a/mods/ITEMS/REDSTONE/mesecons_pistons/textures/mesecons_piston_bottom.png and /dev/null differ diff --git a/mods/ITEMS/REDSTONE/mesecons_pistons/textures/mesecons_piston_on_front.png b/mods/ITEMS/REDSTONE/mesecons_pistons/textures/mesecons_piston_on_front.png deleted file mode 100644 index a718134ca5..0000000000 Binary files a/mods/ITEMS/REDSTONE/mesecons_pistons/textures/mesecons_piston_on_front.png and /dev/null differ diff --git a/mods/ITEMS/REDSTONE/mesecons_pistons/textures/mesecons_piston_pusher_back.png b/mods/ITEMS/REDSTONE/mesecons_pistons/textures/mesecons_piston_pusher_back.png deleted file mode 100644 index 79ecafcbc1..0000000000 Binary files a/mods/ITEMS/REDSTONE/mesecons_pistons/textures/mesecons_piston_pusher_back.png and /dev/null differ diff --git a/mods/ITEMS/REDSTONE/mesecons_pistons/textures/mesecons_piston_pusher_bottom.png b/mods/ITEMS/REDSTONE/mesecons_pistons/textures/mesecons_piston_pusher_bottom.png deleted file mode 100644 index 79ecafcbc1..0000000000 Binary files a/mods/ITEMS/REDSTONE/mesecons_pistons/textures/mesecons_piston_pusher_bottom.png and /dev/null differ diff --git a/mods/ITEMS/REDSTONE/mesecons_pistons/textures/mesecons_piston_pusher_front.png b/mods/ITEMS/REDSTONE/mesecons_pistons/textures/mesecons_piston_pusher_front.png deleted file mode 100644 index 79ecafcbc1..0000000000 Binary files a/mods/ITEMS/REDSTONE/mesecons_pistons/textures/mesecons_piston_pusher_front.png and /dev/null differ diff --git a/mods/ITEMS/REDSTONE/mesecons_pistons/textures/mesecons_piston_pusher_front_sticky.png b/mods/ITEMS/REDSTONE/mesecons_pistons/textures/mesecons_piston_pusher_front_sticky.png deleted file mode 100644 index 8f5eaf4575..0000000000 Binary files a/mods/ITEMS/REDSTONE/mesecons_pistons/textures/mesecons_piston_pusher_front_sticky.png and /dev/null differ diff --git a/mods/ITEMS/REDSTONE/mesecons_pistons/textures/mesecons_piston_pusher_left.png b/mods/ITEMS/REDSTONE/mesecons_pistons/textures/mesecons_piston_pusher_left.png deleted file mode 100644 index 79ecafcbc1..0000000000 Binary files a/mods/ITEMS/REDSTONE/mesecons_pistons/textures/mesecons_piston_pusher_left.png and /dev/null differ diff --git a/mods/ITEMS/REDSTONE/mesecons_pistons/textures/mesecons_piston_pusher_right.png b/mods/ITEMS/REDSTONE/mesecons_pistons/textures/mesecons_piston_pusher_right.png deleted file mode 100644 index 79ecafcbc1..0000000000 Binary files a/mods/ITEMS/REDSTONE/mesecons_pistons/textures/mesecons_piston_pusher_right.png and /dev/null differ diff --git a/mods/ITEMS/REDSTONE/mesecons_pistons/textures/mesecons_piston_pusher_top.png b/mods/ITEMS/REDSTONE/mesecons_pistons/textures/mesecons_piston_pusher_top.png deleted file mode 100644 index 79ecafcbc1..0000000000 Binary files a/mods/ITEMS/REDSTONE/mesecons_pistons/textures/mesecons_piston_pusher_top.png and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/API.md b/mods/ITEMS/mcl_armor/API.md deleted file mode 100644 index 06292aab43..0000000000 --- a/mods/ITEMS/mcl_armor/API.md +++ /dev/null @@ -1,288 +0,0 @@ -# mcl_armor - -This mod implements the ability of registering armors. - -## Registering an Armor Set - -The `mcl_armor.register_set()` function aims to simplify the process of registering a full set of armor. - -This function register four pieces of armor (head, torso, leggings, feets) based on a definition table: - -```lua -mcl_armor.register_set({ - --name of the armor material (used for generating itemstrings) - name = "dummy_armor", - - --description of the armor material - --do NOT translate this string, it will be concatenated will each piece of armor's description and result will be automatically fetched from your mod's translation files - description = "Dummy Armor", - - --overide description of each armor piece - --do NOT localize this string - descriptions = { - head = "Cap", --default: "Helmet" - torso = "Tunic", --default: "Chestplate" - legs = "Pants", --default: "Leggings" - feet = "Shoes", --default: "Boots" - }, - - --this is used to calculate each armor piece durability with the minecraft algorithm - --head durability = durability * 0.6857 + 1 - --torso durability = durability * 1.0 + 1 - --legs durability = durability * 0.9375 + 1 - --feet durability = durability * 0.8125 + 1 - durability = 80, - - --this is used then you need to specify the durability of each piece of armor - --this field have the priority over the durability one - --if the durability of some pieces of armor isn't specified in this field, the durability field will be used insteed - durabilities = { - head = 200, - torso = 500, - legs = 400, - feet = 300, - }, - - --this define how good enchants you will get then enchanting one piece of the armor in an enchanting table - --if set to zero or nil, the armor will not be enchantable - enchantability = 15, - - --this define how much each piece of armor protect the player - --these points will be shown in the HUD (chestplate bar above the health bar) - points = { - head = 1, - torso = 3, - legs = 2, - feet = 1, - }, - - --this attribute reduce strong damage even more - --See https://minecraft.fandom.com/wiki/Armor#Armor_toughness for more explanations - --default: 0 - toughness = 2, - - --this field is used to specify some items groups that will be added to each piece of armor - --please note that some groups do NOT need to be added by hand, because they are already handeled by the register function: - --(armor, combat_armor, armor_, combat_armor_, mcl_armor_points, mcl_armor_toughness, mcl_armor_uses, enchantability) - groups = {op_armor = 1}, - - --specify textures that will be overlayed on the entity wearing the armor - --these fields have default values and its recommanded to keep the code clean by just using the default name for your textures - textures = { - head = "dummy_texture.png", --default: "_helmet_.png" - torso = "dummy_texture.png", --default: "_chestplate_.png" - legs = "dummy_texture.png", --default: "_leggings_.png" - feet = "dummy_texture.png", --default: "_boots_.png" - }, - --you can also define these fields as functions, that will be called each time the API function mcl_armor.update(obj) is called (every time you equip/unequip some armor piece, take damage, and more) - --note that the enchanting overlay will not appear unless you implement it in the function - --this allow to make armors where the textures change whitout needing to register many other armors with different textures - textures = { - head = function(obj, itemstack) - if mcl_enchanting.is_enchanted(itemstack) then - return "dummy_texture.png^"..mcl_enchanting.overlay - else - return "dummy_texture.png" - end - end, - }, - - --inventory textures aren't definable using a table similar to textures or previews - --you are forced to use the default texture names which are: - --head: "_inv_helmet_.png - --torso: "_inv_chestplate_.png - --legs: "_inv_leggings_.png - --feet: "_inv_boots_.png - - --this callback table allow you to define functions that will be called each time an entity equip an armor piece or the mcl_armor.on_equip() function is called - --the functions accept two arguments: obj and itemstack - on_equip_callbacks = { - head = function(obj, itemstack) - --do stuff - end, - }, - - --this callback table allow you to define functions that will be called each time an entity unequip an armor piece or the mcl_armor.on_unequip() function is called - --the functions accept two arguments: obj and itemstack - on_unequip_callbacks = { - head = function(obj, itemstack) - --do stuff - end, - }, - - --this callback table allow you to define functions that will be called then an armor piece break - --the functions accept one arguments: obj - --the itemstack isn't sended due to how minetest handle items which have a zero durability - on_break_callbacks = { - head = function(obj) - --do stuff - end, - }, - - --this is used to generate automaticaly armor crafts based on each element type folowing the regular minecraft pattern - --if set to nil no craft will be added - craft_material = "mcl_mobitems:leather", - - --this is used to generate cooking crafts for each piece of armor - --if set to nil no craft will be added - cook_material = "mcl_core:gold_nugget", --cooking any piece of this armor will output a gold nugged - - --this is used for allowing each piece of the armor to be repaired by using an anvil with repair_material as aditionnal material - --it basicaly set the _repair_material item field of each piece of the armor - --if set to nil no repair material will be added - repair_material = "mcl_core:iron_ingot", -}) -``` - -## Creating an Armor Piece - -If you don't want to register a full set of armor, then you will need to manually register your own single item. - -```lua -minetest.register_tool("dummy_mod:random_armor", { - description = S("Random Armor"), - - --these two item fields are used for ingame documentation - --the mcl_armor.longdesc and mcl_armor.usage vars contains the basic usage and purpose of a piece of armor - --these vars may not be enough for that you want to do, so you may add some extra informations like that: - --_doc_items_longdesc = mcl_armor.longdesc.." "..S("Some extra informations.") - _doc_items_longdesc = mcl_armor.longdesc, - _doc_items_usagehelp = mcl_armor.usage, - - --this field is similar to any item definition in minetest - --it just set the image shown then the armor is dropped as an item or inside an inventory - inventory_image = "mcl_armor_inv_elytra.png", - - --this field is used by minetest internally and also by some helper functions - --in order for the tool to be shown is the right creative inventory tab, the right groups should be added - --"mcl_armor_uses" is required to give your armor a durability - --in that case, the armor can be worn by 10 points before breaking - --if you want the armor to be enchantable, you should also add the "enchantability" group, with the highest number the better enchants you can apply - groups = {armor = 1, non_combat_armor = 1, armor_torso = 1, non_combat_torso = 1, mcl_armor_uses = 10}, - - --this table is used by minetest for seraching item specific sounds - --the _mcl_armor_equip and _mcl_armor_unequip are used by the armor implementation to play sounds on equip and unequip - --note that you don't need to provide any file extention - sounds = { - _mcl_armor_equip = "mcl_armor_equip_leather", - _mcl_armor_unequip = "mcl_armor_unequip_leather", - }, - - --these fields should be initialised like that in most cases - --mcl_armor.equip_on_use is a function that try to equip the piece of armor you have in hand inside the right armor slot if the slot is empty - on_place = mcl_armor.equip_on_use, - on_secondary_use = mcl_armor.equip_on_use, - - --this field define that the tool is ACTUALLY an armor piece and in which armor slot you can put it - --it should be set to "head", "torso", "legs" or "feet" - _mcl_armor_element = "torso", - - - --this field is used to provide the texture that will be overlayed on the object (player or mob) skin - --this field can be a texture name or a function that will be called each time the mcl_armor.update(obj) function is called - --see the mcl_armor.register_set() documentation for more explanations - _mcl_armor_texture = "mcl_armor_elytra.png" - - --callbacks - --see the mcl_armor.register_set() documentation for more explanations - - _on_equip = function(obj, itemstack) - end, - _on_unequip = function(obj, itemstack) - end, - _on_break = function(obj) - end, -}) -``` - -## Interacting with Armor of an Entity - -Mods may want to interact with armor of an entity. - -Most global functions not described here may not be stable or may be for internal use only. - -You can equip a piece of armor on an entity inside a mod by using `mcl_armor.equip()`. - -```lua ---itemstack: an itemstack containing the armor piece to equip ---obj: the entity you want to equip the armor on ---swap: boolean, force equiping the armor piece, even if the entity already have one of the same type -mcl_armor.equip(itemstack, obj, swap) -``` - -You can update the entity apparence by using `mcl_armor.update()`. - -This function put the armor overlay on the object's base texture. -If the object is player it will update his displayed armor points count in HUD. - -This function will work both on players and mobs. - -```lua ---obj: the entity you want the apparence to be updated -mcl_armor.update(obj) -``` - -## Handling Enchantments - -Armors can be enchanted in most cases. - -The enchanting part of MineClone2 is separated from the armor part, but closely linked. - -Existing armor enchantments in Minecraft improve most of the time how the armor protect the entity from damage. - -The `mcl_armor.register_protection_enchantment()` function aims to simplificate the creation of such enchants. - -```lua -mcl_armor.register_protection_enchantment({ - --this field is the id that will be used for registering enchanted book and store the enchant inside armor metadata. - --(his internal name) - id = "magic_protection", - - --visible name of the enchant - --this field is used as the name of registered enchanted book and inside armor tooltip - --translation should be added - name = S("Magic Protection"), - - --this field is used to know that the enchant currently do - --translation should be added - description = S("Reduces magic damage."), - - --how many levels can the enchant have - --ex: 4 => I, II, III, IV - --default: 4 - max_level = 4, - - --which enchants this enchant will not be compatible with - --each of these values is a enchant id - incompatible = {blast_protection = true, fire_protection = true, projectile_protection = true}, - - --how much will the enchant consume from the enchantability group of the armor item - --default: 5 - weight = 5, - - --false => the enchant can be obtained in an enchanting table - --true => the enchant isn't obtainable in the enchanting table - --is true, you will probably need to implement some ways to obtain it - --even it the field is named "treasure", it will be no way to find it - --default: false - treasure = false, - - --how much will damage be reduced - --see Minecraft Wiki for more informations - --https://minecraft.gamepedia.com/Armor#Damage_protection - --https://minecraft.gamepedia.com/Armor#Enchantments - factor = 1, - - --restrict damage to one type - --allow the enchant to only protect of one type of damage - damage_type = "magic", - - --restrict damage to one category - --allow to protect from many type of damage at once - --this is much less specific than damage_type and also much more customisable - --the "is_magic" flag is used in the "magic", "dragon_breath", "wither_skull" and "thorns" damage types - --you can checkout the mcl_damage source code for a list of availlable damage types and associated flags - --but be warned that mods can register additionnal damage types - damage_flag = "is_magic", -}) -``` diff --git a/mods/ITEMS/mcl_armor/README.txt b/mods/ITEMS/mcl_armor/README.txt deleted file mode 100644 index 5e68b57464..0000000000 --- a/mods/ITEMS/mcl_armor/README.txt +++ /dev/null @@ -1,30 +0,0 @@ -[mod] Visible Player Armor [mcl_armor] -====================================== - -Adds craftable armor that is visible to other players. Each armor item worn contributes to -a player's armor group level making them less vulnerable to some forms of damage. - -Armor takes damage when a player is hurt. - -This mod is based on 3D Armor mod by stu. - -Media credits -------------- -* mcl_armor_equip_diamond.ogg -* mcl_armor_unequip_diamond.ogg -Licensed CC0, by Freesound.org user juryduty. -Source: - -* mcl_armor_equip_iron.ogg -* mcl_armor_unequip_iron.ogg -Licensed CC0, by Freesound.org user mtchanary. -Source: - -* mcl_armor_equip_generic.ogg -* mcl_armor_unequip_generic.ogg -Licensed (CC BY-SA 3.0) by Mito551 - -All other sounds licensed CC0 by OpenGameArt.org user artisticdude. -Source: - -Other media files: See MineClone 2 license. diff --git a/mods/ITEMS/mcl_armor/alias.lua b/mods/ITEMS/mcl_armor/alias.lua deleted file mode 100644 index 19c2424d0d..0000000000 --- a/mods/ITEMS/mcl_armor/alias.lua +++ /dev/null @@ -1,23 +0,0 @@ -minetest.register_alias("3d_armor:helmet_leather", "mcl_armor:helmet_leather") -minetest.register_alias("3d_armor:helmet_iron", "mcl_armor:helmet_iron") -minetest.register_alias("3d_armor:helmet_chain", "mcl_armor:helmet_chain") -minetest.register_alias("3d_armor:helmet_gold", "mcl_armor:helmet_gold") -minetest.register_alias("3d_armor:helmet_diamond", "mcl_armor:helmet_diamond") - -minetest.register_alias("3d_armor:chestplate_leather", "mcl_armor:chestplate_leather") -minetest.register_alias("3d_armor:chestplate_iron", "mcl_armor:chestplate_iron") -minetest.register_alias("3d_armor:chestplate_chain", "mcl_armor:chestplate_chain") -minetest.register_alias("3d_armor:chestplate_gold", "mcl_armor:chestplate_gold") -minetest.register_alias("3d_armor:chestplate_diamond", "mcl_armor:chestplate_diamond") - -minetest.register_alias("3d_armor:leggings_leather", "mcl_armor:leggings_leather") -minetest.register_alias("3d_armor:leggings_iron", "mcl_armor:leggings_iron") -minetest.register_alias("3d_armor:leggings_chain", "mcl_armor:leggings_chain") -minetest.register_alias("3d_armor:leggings_gold", "mcl_armor:leggings_gold") -minetest.register_alias("3d_armor:leggings_diamond", "mcl_armor:leggings_diamond") - -minetest.register_alias("3d_armor:boots_leather", "mcl_armor:boots_leather") -minetest.register_alias("3d_armor:boots_iron", "mcl_armor:boots_iron") -minetest.register_alias("3d_armor:boots_chain", "mcl_armor:boots_chain") -minetest.register_alias("3d_armor:boots_gold", "mcl_armor:boots_gold") -minetest.register_alias("3d_armor:boots_diamond", "mcl_armor:boots_diamond") diff --git a/mods/ITEMS/mcl_armor/api.lua b/mods/ITEMS/mcl_armor/api.lua deleted file mode 100644 index 6ec1b377b6..0000000000 --- a/mods/ITEMS/mcl_armor/api.lua +++ /dev/null @@ -1,253 +0,0 @@ -function mcl_armor.play_equip_sound(stack, obj, pos, unequip) - local def = stack:get_definition() - local estr = "equip" - if unequip then - estr = "unequip" - end - local snd = def.sounds and def.sounds["_mcl_armor_" .. estr] - if not snd then - -- Fallback sound - snd = { name = "mcl_armor_" .. estr .. "_generic" } - end - if snd then - local dist = 8 - if pos then - dist = 16 - end - minetest.sound_play(snd, {object = obj, pos = pos, gain = 0.5, max_hear_distance = dist}, true) - end -end - -function mcl_armor.on_equip(itemstack, obj) - local def = itemstack:get_definition() - mcl_armor.play_equip_sound(itemstack, obj) - if def._on_equip then - def._on_equip(obj, itemstack) - end - mcl_armor.update(obj) -end - -function mcl_armor.on_unequip(itemstack, obj) - local def = itemstack:get_definition() - mcl_armor.play_equip_sound(itemstack, obj, nil, true) - if def._on_unequip then - def._on_unequip(obj, itemstack) - end - mcl_armor.update(obj) -end - -function mcl_armor.equip(itemstack, obj, swap) - local def = itemstack:get_definition() - - if not def then - return itemstack - end - - local inv = mcl_util.get_inventory(obj, true) - - if not inv or inv:get_size("armor") == 0 then - return itemstack - end - - local element = mcl_armor.elements[def._mcl_armor_element or ""] - - if element then - local old_stack = inv:get_stack("armor", element.index) - - if swap or old_stack:is_empty() then - local new_stack - - if swap then - new_stack = itemstack - itemstack = old_stack - else - new_stack = itemstack:take_item() - end - - inv:set_stack("armor", element.index, new_stack) - mcl_armor.on_equip(new_stack, obj) - end - end - - return itemstack -end - -function mcl_armor.equip_on_use(itemstack, player, pointed_thing) - if not player or not player:is_player() then - return itemstack - end - - local new_stack = mcl_util.call_on_rightclick(itemstack, player, pointed_thing) - if new_stack then - return new_stack - end - - return mcl_armor.equip(itemstack, player) -end - -function mcl_armor.register_set(def) - local modname = minetest.get_current_modname() - local S = minetest.get_translator(modname) - local descriptions = def.descriptions or {} - local groups = def.groups or {} - local on_equip_callbacks = def.on_equip_callbacks or {} - local on_unequip_callbacks = def.on_unequip_callbacks or {} - local on_break_callbacks = def.on_break_callbacks or {} - local textures = def.textures or {} - local durabilities = def.durabilities or {} - local element_groups = def.element_groups or {} - - for name, element in pairs(mcl_armor.elements) do - local itemname = element.name .. "_" .. def.name - local itemstring = modname .. ":" .. itemname - - local groups = table.copy(groups) - groups["armor_" .. name] = 1 - groups["combat_armor_" .. name] = 1 - groups.armor = 1 - groups.combat_armor = 1 - groups.mcl_armor_points = def.points[name] - groups.mcl_armor_toughness = def.toughness - groups.mcl_armor_uses = (durabilities[name] or math.floor(def.durability * element.durability)) + 1 - groups.enchantability = def.enchantability - - for k, v in pairs(element_groups) do - groups[k] = v - end - - minetest.register_tool(itemstring, { - description = S(def.description .. " " .. (descriptions[name] or element.description)), - _doc_items_longdesc = mcl_armor.longdesc, - _doc_items_usagehelp = mcl_armor.usage, - inventory_image = modname .. "_inv_" .. itemname .. ".png", - _repair_material = def.repair_material or def.craft_material, - groups = groups, - sounds = { - _mcl_armor_equip = def.sound_equip or modname .. "_equip_" .. def.name, - _mcl_armor_unequip = def.sound_unequip or modname .. "_unequip_" .. def.name, - }, - on_place = mcl_armor.equip_on_use, - on_secondary_use = mcl_armor.equip_on_use, - _on_equip = on_equip_callbacks[name] or def.on_equip, - _on_unequip = on_unequip_callbacks[name] or def.on_unequip, - _on_break = on_break_callbacks[name] or def.on_break, - _mcl_armor_element = name, - _mcl_armor_texture = textures[name] or modname .. "_" .. itemname .. ".png", - }) - - if def.craft_material then - minetest.register_craft({ - output = itemstring, - recipe = element.craft(def.craft_material), - }) - end - - if def.cook_material then - minetest.register_craft({ - type = "cooking", - output = def.cook_material, - recipe = itemstring, - cooktime = 10, - }) - end - end -end - -mcl_armor.protection_enchantments = { - flags = {}, - types = {}, - wildcard = {}, -} - -function mcl_armor.register_protection_enchantment(def) - local prot_def = {id = def.id, factor = def.factor} - if def.damage_flag then - local tbl = mcl_armor.protection_enchantments.flags[def.damage_flag] or {} - table.insert(tbl, prot_def) - mcl_armor.protection_enchantments.flags = tbl - elseif def.damage_type then - local tbl = mcl_armor.protection_enchantments.types[def.damage_type] or {} - table.insert(tbl, prot_def) - mcl_armor.protection_enchantments.types = tbl - else - table.insert(mcl_armor.protection_enchantments.wildcard, prot_def) - end - mcl_enchanting.enchantments[def.id] = { - name = def.name, - max_level = def.max_level or 4, - primary = def.primary or {combat_armor = true}, - secondary = {}, - disallow = {}, - incompatible = def.incompatible or {}, - weight = def.weight or 5, - description = def.description, - curse = false, - on_enchant = function() end, - requires_tool = false, - treasure = def.treasure or false, - power_range_table = def.power_range_table, - inv_combat_tab = true, - inv_tool_tab = false, - } -end - -function mcl_armor.update(obj) - local info = {points = 0, view_range_factors = {}} - - local inv = mcl_util.get_inventory(obj) - - if inv then - for i = 2, 5 do - local itemstack = inv:get_stack("armor", i) - - local itemname = itemstack:get_name() - if minetest.registered_aliases[itemname] then - itemname = minetest.registered_aliases[itemname] - end - - if not itemstack:is_empty() then - local def = itemstack:get_definition() - - local texture = def._mcl_armor_texture - - if texture then - if type(texture) == "function" then - texture = texture(obj, itemstack) - end - if texture then - info.texture = "(" .. texture .. ")" .. (info.texture and "^" .. info.texture or "") - end - end - - info.points = info.points + minetest.get_item_group(itemname, "mcl_armor_points") - - local mob_range_mob = def._mcl_armor_mob_range_mob - - if mob_range_mob then - local factor = info.view_range_factors[mob_range_mob] - - if factor then - if factor > 0 then - info.view_range_factors[mob_range_mob] = factor * def._mcl_armor_mob_range_factor - end - else - info.view_range_factors[mob_range_mob] = def._mcl_armor_mob_range_factor - end - end - end - end - end - - info.texture = info.texture or "blank.png" - - if obj:is_player() then - mcl_armor.update_player(obj, info) - else - local luaentity = obj:get_luaentity() - - if luaentity.update_armor then - luaentity:update_armor(info) - end - end -end - diff --git a/mods/ITEMS/mcl_armor/damage.lua b/mods/ITEMS/mcl_armor/damage.lua deleted file mode 100644 index ed616397db..0000000000 --- a/mods/ITEMS/mcl_armor/damage.lua +++ /dev/null @@ -1,102 +0,0 @@ -local function use_durability(obj, inv, index, stack, uses) - local def = stack:get_definition() - mcl_util.use_item_durability(stack, uses) - if stack:is_empty() and def and def._on_break then - stack = def._on_break(obj) or stack - end - inv:set_stack("armor", index, stack) -end - -mcl_damage.register_modifier(function(obj, damage, reason) - local flags = reason.flags - - if flags.bypasses_armor and flags.bypasses_magic then - return damage - end - - local uses = math.max(1, math.floor(damage / 4)) - - local points = 0 - local toughness = 0 - local enchantment_protection_factor = 0 - - local thorns_damage_regular = 0 - local thorns_damage_irregular = 0 - local thorns_pieces = {} - - local inv = mcl_util.get_inventory(obj) - - if inv then - for name, element in pairs(mcl_armor.elements) do - local itemstack = inv:get_stack("armor", element.index) - if not itemstack:is_empty() then - local itemname = itemstack:get_name() - local enchantments = mcl_enchanting.get_enchantments(itemstack) - - if not flags.bypasses_armor then - points = points + minetest.get_item_group(itemname, "mcl_armor_points") - toughness = toughness + minetest.get_item_group(itemname, "mcl_armor_toughness") - - use_durability(obj, inv, element.index, itemstack, uses) - end - - if not flags.bypasses_magic then - local function add_enchantments(tbl) - if tbl then - for _, enchantment in pairs(tbl) do - local level = enchantments[enchantment.id] - - if level and level > 0 then - enchantment_protection_factor = enchantment_protection_factor + level * enchantment.factor - end - end - end - end - - add_enchantments(mcl_armor.protection_enchantments.wildcard) - add_enchantments(mcl_armor.protection_enchantments.types[reason.type]) - - for flag, value in pairs(flags) do - if value then - add_enchantments(mcl_armor.protection_enchantments.flags[flag]) - end - end - end - - if reason.source and enchantments.thorns and enchantments.thorns > 0 then - local do_irregular_damage = enchantments.thorns > 10 - - if do_irregular_damage or thorns_damage_regular < 4 and math.random() < enchantments.thorns * 0.15 then - if do_irregular_damage then - thorns_damage_irregular = thorns_damage_irregular + enchantments.thorns - 10 - else - thorns_damage_regular = math.min(4, thorns_damage_regular + math.random(4)) - end - end - - table.insert(thorns_pieces, {index = element.index, itemstack = itemstack}) - end - end - end - end - - -- https://minecraft.gamepedia.com/Armor#Damage_protection - damage = damage * (1 - math.min(20, math.max((points / 5), points - damage / (2 + (toughness / 4)))) / 25) - - -- https://minecraft.gamepedia.com/Armor#Enchantments - damage = damage * (1 - math.min(20, enchantment_protection_factor) / 25) - - local thorns_damage = thorns_damage_regular + thorns_damage_irregular - - if thorns_damage > 0 and reason.type ~= "thorns" and reason.source ~= obj then - mcl_util.deal_damage(reason.source, thorns_damage, {type = "thorns", direct = obj}) - - local thorns_item = thorns_pieces[math.random(#thorns_pieces)] - - use_durability(obj, inv, thorns_item.index, thorns_item.itemstack, 2) - end - - mcl_armor.update(obj) - - return math.floor(damage + 0.5) -end, 0) diff --git a/mods/ITEMS/mcl_armor/init.lua b/mods/ITEMS/mcl_armor/init.lua deleted file mode 100644 index 799bf2e9cc..0000000000 --- a/mods/ITEMS/mcl_armor/init.lua +++ /dev/null @@ -1,68 +0,0 @@ -local S = minetest.get_translator(minetest.get_current_modname()) - -mcl_armor = { - longdesc = S("This is a piece of equippable armor which reduces the amount of damage you receive."), - usage = S("To equip it, put it on the corresponding armor slot in your inventory menu."), - elements = { - head = { - name = "helmet", - description = "Helmet", - durability = 0.6857, - index = 2, - craft = function(m) - return { - { m, m, m}, - { m, "", m}, - {"", "", ""}, - } - end, - }, - torso = { - name = "chestplate", - description = "Chestplate", - durability = 1.0, - index = 3, - craft = function(m) - return { - { m, "", m}, - { m, m, m}, - { m, m, m}, - } - end, - }, - legs = { - name = "leggings", - description = "Leggings", - durability = 0.9375, - index = 4, - craft = function(m) - return { - { m, m, m}, - { m, "", m}, - { m, "", m}, - } - end, - }, - feet = { - name = "boots", - description = "Boots", - durability = 0.8125, - index = 5, - craft = function(m) - return { - { m, "", m}, - { m, "", m}, - } - end, - } - }, - player_view_range_factors = {}, -} - -local modpath = minetest.get_modpath("mcl_armor") - -dofile(modpath .. "/api.lua") -dofile(modpath .. "/player.lua") -dofile(modpath .. "/damage.lua") -dofile(modpath .. "/register.lua") -dofile(modpath .. "/alias.lua") diff --git a/mods/ITEMS/mcl_armor/locale/mcl_armor.de.tr b/mods/ITEMS/mcl_armor/locale/mcl_armor.de.tr deleted file mode 100644 index 09da3a9cc7..0000000000 --- a/mods/ITEMS/mcl_armor/locale/mcl_armor.de.tr +++ /dev/null @@ -1,23 +0,0 @@ -# textdomain: mcl_armor -This is a piece of equippable armor which reduces the amount of damage you receive.=Dies ist ein Teil einer tragbaren Rüstung, die die Menge an Schaden, den Sie erleiden, reduziert. -To equip it, put it on the corresponding armor slot in your inventory menu.=Um es zu tragen, legen Sie es in den passenden Rüstungsplatz in ihrem Inventarmenü. -Leather Cap=Lederkappe -Iron Helmet=Eisenhelm -Golden Helmet=Goldhelm -Diamond Helmet=Diamanthelm -Chain Helmet=Kettenhelm -Leather Tunic=Ledertunika -Iron Chestplate=Eisenbrustpanzer -Golden Chestplate=Goldbrustpanzer -Diamond Chestplate=Diamantbrustpanzer -Chain Chestplate=Kettenbrustpanzer -Leather Pants=Lederhose -Iron Leggings=Eisenbeinlinge -Golden Leggings=Goldbeinlinge -Diamond Leggings=Diamantbeinlinge -Chain Leggings=Kettenbeinlinge -Leather Boots=Lederstiefel -Iron Boots=Eisenstiefel -Golden Boots=Goldstiefel -Diamond Boots=Diamantstiefel -Chain Boots=Kettenstiefel diff --git a/mods/ITEMS/mcl_armor/locale/mcl_armor.es.tr b/mods/ITEMS/mcl_armor/locale/mcl_armor.es.tr deleted file mode 100644 index e770dff0cb..0000000000 --- a/mods/ITEMS/mcl_armor/locale/mcl_armor.es.tr +++ /dev/null @@ -1,23 +0,0 @@ -# textdomain: mcl_armor -This is a piece of equippable armor which reduces the amount of damage you receive.=Dies ist ein Teil einer tragbaren Rüstung, die die Menge an Schaden, den Sie erleiden, reduziert. -To equip it, put it on the corresponding armor slot in your inventory menu.=Um es zu tragen, legen Sie es in den passenden Rüstungsplatz in ihrem Inventarmenü. -Leather Cap=Sombrero de cuero -Iron Helmet=Casco de hierro -Golden Helmet=Casco de oro -Diamond Helmet=Casco de diamante -Chain Helmet=Casco de cota de mallas -Leather Tunic=Túnica de cuero -Iron Chestplate=Peto de hierro -Golden Chestplate=Peto de oro -Diamond Chestplate=Peto de diamante -Chain Chestplate=Peto de cota de mallas -Leather Pants=Pantalones de cuero -Iron Leggings=Grebas de hierro -Golden Leggings=Grebas de oro -Diamond Leggings=Grebas de diamante -Chain Leggings=Grebas de cota de mallas -Leather Boots=Botas de cuero -Iron Boots=Botas de hierro -Golden Boots=Botas de oro -Diamond Boots=Botas de diamante -Chain Boots=Botas de cota de mallas diff --git a/mods/ITEMS/mcl_armor/locale/mcl_armor.fr.tr b/mods/ITEMS/mcl_armor/locale/mcl_armor.fr.tr deleted file mode 100644 index 6f55a73fe8..0000000000 --- a/mods/ITEMS/mcl_armor/locale/mcl_armor.fr.tr +++ /dev/null @@ -1,23 +0,0 @@ -# textdomain: mcl_armor -This is a piece of equippable armor which reduces the amount of damage you receive.=Il s'agit d'un morceau d'armure équipable qui réduit la quantité de dégâts que vous recevez. -To equip it, put it on the corresponding armor slot in your inventory menu.=Pour l'équiper, placez-le sur l'emplacement d'armure correspondant dans votre menu d'inventaire. -Leather Cap=Casquette en Cuir -Iron Helmet=Casque de Fer -Golden Helmet=Casque d'Or -Diamond Helmet=Casque de Diamant -Chain Helmet=Casque de Mailles -Leather Tunic=Tunique en Cuir -Iron Chestplate=Plastron de Fer -Golden Chestplate=Plastron d'Or -Diamond Chestplate=Plastron de Diamant -Chain Chestplate=Cotte de Mailles -Leather Pants=Pantalon de Cuir -Iron Leggings=Jambières de Fer -Golden Leggings=Jambières d'Or -Diamond Leggings=Jambières de Diamant -Chain Leggings=Jambières de Mailles -Leather Boots=Bottes de Cuir -Iron Boots=Bottes de Fer -Golden Boots=Bottes d'Or -Diamond Boots=Bottes de Diamant -Chain Boots=Bottes de Mailles diff --git a/mods/ITEMS/mcl_armor/locale/mcl_armor.pl.tr b/mods/ITEMS/mcl_armor/locale/mcl_armor.pl.tr deleted file mode 100644 index 32236113e3..0000000000 --- a/mods/ITEMS/mcl_armor/locale/mcl_armor.pl.tr +++ /dev/null @@ -1,23 +0,0 @@ -# textdomain: mcl_armor -This is a piece of equippable armor which reduces the amount of damage you receive.=Jest to część możliwej do założenia zbroi, która zmniejsza otrzymywane obrażenia. -To equip it, put it on the corresponding armor slot in your inventory menu.=Aby ją założyć, upuść ją na odpowiadającym miejscu na zbroję na ekranie ekwipunku. -Leather Cap=Skórzana czapka -Iron Helmet=Żelazny hełm -Golden Helmet=Złoty hełm -Diamond Helmet=Diamentowy hełm -Chain Helmet=Kolczy hełm -Leather Tunic=Skórzana tunika -Iron Chestplate=Żelazny napierśnik -Golden Chestplate=Złoty napierśnik -Diamond Chestplate=Diamentowy napierśnik -Chain Chestplate=Kolczy napierśnik -Leather Pants=Skórzane spodnie -Iron Leggings=Żelazne nogawice -Golden Leggings=Złote nogawice -Diamond Leggings=Diamentowe nogawice -Chain Leggings=Kolcze nogawice -Leather Boots=Skórzane buty -Iron Boots=Żelazne buty -Golden Boots=Złote buty -Diamond Boots=Diamentowe buty -Chain Boots=Kolcze buty diff --git a/mods/ITEMS/mcl_armor/locale/mcl_armor.ru.tr b/mods/ITEMS/mcl_armor/locale/mcl_armor.ru.tr deleted file mode 100644 index 77ed83d103..0000000000 --- a/mods/ITEMS/mcl_armor/locale/mcl_armor.ru.tr +++ /dev/null @@ -1,23 +0,0 @@ -# textdomain: mcl_armor -This is a piece of equippable armor which reduces the amount of damage you receive.=Это часть экипирующей брони, уменьшающая получаемый вами урон. -To equip it, put it on the corresponding armor slot in your inventory menu.=Чтобы надеть, поместите её в соответствующий отсек брони в меню вашего инвентаря. -Leather Cap=Кожаная фуражка -Iron Helmet=Железный шлем -Golden Helmet=Золотой шлем -Diamond Helmet=Алмазный шлем -Chain Helmet=Кольчужный капюшон -Leather Tunic=Кожаная туника -Iron Chestplate=Железные латы -Golden Chestplate=Золотые латы -Diamond Chestplate=Алмазные латы -Chain Chestplate=Кольчуга -Leather Pants=Кожаные штаны -Iron Leggings=Железные штаны -Golden Leggings=Золотые штаны -Diamond Leggings=Алмазные штаны -Chain Leggings=Кольчужные штаны -Leather Boots=Кожаные ботинки -Iron Boots=Железные ботинки -Golden Boots=Золотые ботинки -Diamond Boots=Алмазные ботинки -Chain Boots=Кольчужные ботинки diff --git a/mods/ITEMS/mcl_armor/locale/mcl_armor.zh_TW.tr b/mods/ITEMS/mcl_armor/locale/mcl_armor.zh_TW.tr deleted file mode 100644 index 1dca107573..0000000000 --- a/mods/ITEMS/mcl_armor/locale/mcl_armor.zh_TW.tr +++ /dev/null @@ -1,23 +0,0 @@ -# textdomain: mcl_armor -This is a piece of equippable armor which reduces the amount of damage you receive.=這是一件可裝備的盔甲,可以減少你受到的傷害。 -To equip it, put it on the corresponding armor slot in your inventory menu.=要裝備它,就把它放在你的物品欄中相應的盔甲插槽上。 -Leather Cap=皮革帽子 -Iron Helmet=鐵製頭盔 -Golden Helmet=黃金頭盔 -Diamond Helmet=鑽石頭盔 -Chain Helmet=鎖鏈頭盔 -Leather Tunic=皮革上衣 -Iron Chestplate=鐵製胸甲 -Golden Chestplate=黃金胸甲 -Diamond Chestplate=鑽石胸甲 -Chain Chestplate=鎖鏈胸甲 -Leather Pants=皮革褲子 -Iron Leggings=鐵製護腿 -Golden Leggings=黃金護腿 -Diamond Leggings=鑽石護腿 -Chain Leggings=鎖鏈護腿 -Leather Boots=皮革靴子 -Iron Boots=鐵製靴子 -Golden Boots=黃金靴子 -Diamond Boots=鑽石靴子 -Chain Boots=鎖鏈靴子 diff --git a/mods/ITEMS/mcl_armor/locale/template.txt b/mods/ITEMS/mcl_armor/locale/template.txt deleted file mode 100644 index 8a95fca02d..0000000000 --- a/mods/ITEMS/mcl_armor/locale/template.txt +++ /dev/null @@ -1,23 +0,0 @@ -# textdomain: mcl_armor -This is a piece of equippable armor which reduces the amount of damage you receive.= -To equip it, put it on the corresponding armor slot in your inventory menu.= -Leather Cap= -Iron Helmet= -Golden Helmet= -Diamond Helmet= -Chain Helmet= -Leather Tunic= -Iron Chestplate= -Golden Chestplate= -Diamond Chestplate= -Chain Chestplate= -Leather Pants= -Iron Leggings= -Golden Leggings= -Diamond Leggings= -Chain Leggings= -Leather Boots= -Iron Boots= -Golden Boots= -Diamond Boots= -Chain Boots= diff --git a/mods/ITEMS/mcl_armor/mod.conf b/mods/ITEMS/mcl_armor/mod.conf deleted file mode 100644 index fad2e494c5..0000000000 --- a/mods/ITEMS/mcl_armor/mod.conf +++ /dev/null @@ -1,5 +0,0 @@ -name = mcl_armor -author = stu -description = Adds craftable armor that is visible to other players. -depends = mcl_core, mcl_player, mcl_enchanting, mcl_damage -optional_depends = mcl_fire, ethereal, bakedclay diff --git a/mods/ITEMS/mcl_armor/models/mcl_armor_character.b3d b/mods/ITEMS/mcl_armor/models/mcl_armor_character.b3d deleted file mode 100644 index b3a943f467..0000000000 Binary files a/mods/ITEMS/mcl_armor/models/mcl_armor_character.b3d and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/models/mcl_armor_character.blend b/mods/ITEMS/mcl_armor/models/mcl_armor_character.blend deleted file mode 100644 index a613eef893..0000000000 Binary files a/mods/ITEMS/mcl_armor/models/mcl_armor_character.blend and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/models/mcl_armor_character_female.b3d b/mods/ITEMS/mcl_armor/models/mcl_armor_character_female.b3d deleted file mode 100644 index 4e17ee3410..0000000000 Binary files a/mods/ITEMS/mcl_armor/models/mcl_armor_character_female.b3d and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/models/mcl_armor_character_female.blend b/mods/ITEMS/mcl_armor/models/mcl_armor_character_female.blend deleted file mode 100644 index b0494efbff..0000000000 Binary files a/mods/ITEMS/mcl_armor/models/mcl_armor_character_female.blend and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/player.lua b/mods/ITEMS/mcl_armor/player.lua deleted file mode 100644 index 99e23efdde..0000000000 --- a/mods/ITEMS/mcl_armor/player.lua +++ /dev/null @@ -1,173 +0,0 @@ -mcl_player.player_register_model("mcl_armor_character.b3d", { - animation_speed = 30, - textures = { - "character.png", - "blank.png", - "blank.png", - }, - animations = { - stand = {x=0, y=79}, - lay = {x=162, y=166}, - walk = {x=168, y=187}, - mine = {x=189, y=198}, - walk_mine = {x=200, y=219}, - sit = {x=81, y=160}, - sneak_stand = {x=222, y=302}, - sneak_mine = {x=346, y=365}, - sneak_walk = {x=304, y=323}, - sneak_walk_mine = {x=325, y=344}, - swim_walk = {x=368, y=387}, - swim_walk_mine = {x=389, y=408}, - swim_stand = {x=434, y=434}, - swim_mine = {x=411, y=430}, - run_walk = {x=440, y=459}, - run_walk_mine = {x=461, y=480}, - sit_mount = {x=484, y=484}, - die = {x=498, y=498}, - fly = {x=502, y=581}, - bow_walk = {x=650, y=670}, - bow_sneak = {x=675, y=695}, - }, -}) - -mcl_player.player_register_model("mcl_armor_character_female.b3d", { - animation_speed = 30, - textures = { - "character.png", - "blank.png", - "blank.png", - }, - animations = { - stand = {x=0, y=79}, - lay = {x=162, y=166}, - walk = {x=168, y=187}, - mine = {x=189, y=198}, - walk_mine = {x=200, y=219}, - sit = {x=81, y=160}, - sneak_stand = {x=222, y=302}, - sneak_mine = {x=346, y=365}, - sneak_walk = {x=304, y=323}, - sneak_walk_mine = {x=325, y=344}, - swim_walk = {x=368, y=387}, - swim_walk_mine = {x=389, y=408}, - swim_stand = {x=434, y=434}, - swim_mine = {x=411, y=430}, - run_walk = {x=440, y=459}, - run_walk_mine = {x=461, y=480}, - sit_mount = {x=484, y=484}, - die = {x=498, y=498}, - fly = {x=502, y=581}, - bow_walk = {x=650, y=670}, - bow_sneak = {x=675, y=695}, - }, -}) - -function mcl_armor.update_player(player, info) - mcl_player.player_set_armor(player, info.texture) - - local meta = player:get_meta() - meta:set_int("mcl_armor:armor_points", info.points) - - mcl_armor.player_view_range_factors[player] = info.view_range_factors -end - -local function is_armor_action(inventory_info) - return inventory_info.from_list == "armor" or inventory_info.to_list == "armor" or inventory_info.listname == "armor" -end - -local function limit_put(player, inventory, index, stack, count) - local def = stack:get_definition() - - if not def then - return 0 - end - - local element = def._mcl_armor_element - - if not element then - return 0 - end - - local element_index = mcl_armor.elements[element].index - - if index ~= 1 and index ~= element_index then - return 0 - end - - local old_stack = inventory:get_stack("armor", element_index) - - if old_stack:is_empty() or index ~= 1 and old_stack:get_name() ~= stack:get_name() and count <= 1 then - return count - else - return 0 - end -end - -local function limit_take(player, inventory, index, stack, count) - if mcl_enchanting.has_enchantment(stack, "curse_of_binding") and not minetest.is_creative_enabled(player:get_player_name()) then - return 0 - end - - return count -end - -minetest.register_allow_player_inventory_action(function(player, action, inventory, inventory_info) - if not is_armor_action(inventory_info) then - return - end - - if action == "put" then - return limit_put(player, inventory, inventory_info.index, inventory_info.stack, inventory_info.stack:get_count()) - elseif action == "take" then - return limit_take(player, inventory, inventory_info.index, inventory_info.stack, inventory_info.stack:get_count()) - else - if inventory_info.from_list ~= "armor" then - return limit_put(player, inventory, inventory_info.to_index, inventory:get_stack(inventory_info.from_list, inventory_info.from_index), inventory_info.count) - elseif inventory_info.to_list ~= "armor" then - return limit_take(player, inventory, inventory_info.from_index, inventory:get_stack(inventory_info.from_list, inventory_info.from_index), inventory_info.count) - else - return 0 - end - end -end) - -local function on_put(player, inventory, index, stack) - if index == 1 then - mcl_armor.equip(stack, player) - inventory:set_stack("armor", 1, nil) - else - mcl_armor.on_equip(stack, player) - end -end - -minetest.register_on_player_inventory_action(function(player, action, inventory, inventory_info) - if is_armor_action(inventory_info) then - if action == "put" then - on_put(player, inventory, inventory_info.index, inventory_info.stack) - elseif action == "take" then - mcl_armor.on_unequip(inventory_info.stack, player) - else - local stack = inventory:get_stack(inventory_info.to_list, inventory_info.to_index) - if inventory_info.to_list == "armor" then - on_put(player, inventory, inventory_info.to_index, stack) - elseif inventory_info.from_list == "armor" then - mcl_armor.on_unequip(stack, player) - end - end - end -end) - -minetest.register_on_joinplayer(function(player) - mcl_player.player_set_model(player, "mcl_armor_character.b3d") - player:get_inventory():set_size("armor", 5) - - minetest.after(1, function() - if player:is_player() then - mcl_armor.update(player) - end - end) -end) - -minetest.register_on_leaveplayer(function(player) - mcl_armor.player_view_range_factors[player] = nil -end) diff --git a/mods/ITEMS/mcl_armor/register.lua b/mods/ITEMS/mcl_armor/register.lua deleted file mode 100644 index 1f9ce7b022..0000000000 --- a/mods/ITEMS/mcl_armor/register.lua +++ /dev/null @@ -1,205 +0,0 @@ -local S = minetest.get_translator(minetest.get_current_modname()) - -mcl_armor.register_set({ - name = "leather", - description = "Leather", - descriptions = { - head = "Cap", - torso = "Tunic", - legs = "Pants", - }, - durability = 80, - enchantability = 15, - points = { - head = 1, - torso = 3, - legs = 2, - feet = 1, - }, - craft_material = "mcl_mobitems:leather", -}) - -mcl_armor.register_set({ - name = "gold", - description = "Golden", - durability = 112, - enchantability = 25, - points = { - head = 2, - torso = 5, - legs = 3, - feet = 1, - }, - craft_material = "mcl_core:gold_ingot", - cook_material = "mcl_core:gold_nugget", - sound_equip = "mcl_armor_equip_iron", - sound_unequip = "mcl_armor_unequip_iron", -}) - -mcl_armor.register_set({ - name = "chain", - description = "Chain", - durability = 240, - enchantability = 12, - points = { - head = 2, - torso = 5, - legs = 4, - feet = 1, - }, - repair_material = "mcl_core:iron_ingot", - cook_material = "mcl_core:iron_nugget", -}) - -mcl_armor.register_set({ - name = "iron", - description = "Iron", - durability = 240, - enchantability = 9, - points = { - head = 2, - torso = 6, - legs = 5, - feet = 2, - }, - craft_material = "mcl_core:iron_ingot", - cook_material = "mcl_core:iron_nugget", -}) - -mcl_armor.register_set({ - name = "diamond", - description = "Diamond", - durability = 528, - enchantability = 10, - points = { - head = 3, - torso = 8, - legs = 6, - feet = 3, - }, - toughness = 2, - craft_material = "mcl_core:diamond", -}) - -mcl_armor.register_protection_enchantment({ - id = "projectile_protection", - name = S("Projectile Protection"), - description = S("Reduces projectile damage."), - power_range_table = {{1, 16}, {11, 26}, {21, 36}, {31, 46}, {41, 56}}, - incompatible = {blast_protection = true, fire_protection = true, protection = true}, - factor = 2, - damage_flag = "is_projectile", -}) - -mcl_armor.register_protection_enchantment({ - id = "blast_protection", - name = S("Blast Protection"), - description = S("Reduces explosion damage and knockback."), - power_range_table = {{5, 13}, {13, 21}, {21, 29}, {29, 37}}, - weight = 2, - incompatible = {fire_protection = true, protection = true, projectile_protection = true}, - factor = 2, - damage_flag = "is_explosion", -}) - -mcl_armor.register_protection_enchantment({ - id = "fire_protection", - name = S("Fire Protection"), - description = S("Reduces fire damage."), - power_range_table = {{5, 13}, {13, 21}, {21, 29}, {29, 37}}, - incompatible = {blast_protection = true, protection = true, projectile_protection = true}, - factor = 2, - damage_flag = "is_fire", -}) - -mcl_armor.register_protection_enchantment({ - id = "protection", - name = S("Protection"), - description = S("Reduces most types of damage by 4% for each level."), - power_range_table = {{1, 12}, {12, 23}, {23, 34}, {34, 45}}, - incompatible = {blast_protection = true, fire_protection = true, projectile_protection = true}, - factor = 1, -}) - -mcl_armor.register_protection_enchantment({ - id = "feather_falling", - name = S("Feather Falling"), - description = S("Reduces fall damage."), - power_range_table = {{5, 11}, {11, 17}, {17, 23}, {23, 29}}, - factor = 3, - primary = {combat_armor_feet = true}, - damage_type = "fall", -}) - --- requires engine change ---[[mcl_enchanting.enchantments.aqua_affinity = { - name = S("Aqua Affinity"), - max_level = 1, - primary = {armor_head = true}, - secondary = {}, - disallow = {non_combat_armor = true}, - incompatible = {}, - weight = 2, - description = S("Increases underwater mining speed."), - curse = false, - on_enchant = function() end, - requires_tool = false, - treasure = false, - power_range_table = {{1, 41}}, - inv_combat_tab = true, - inv_tool_tab = false, -}]]-- - -mcl_enchanting.enchantments.curse_of_binding = { - name = S("Curse of Binding"), - max_level = 1, - primary = {}, - secondary = {armor_head = true, armor_torso = true, armor_legs = true, armor_feet = true}, - disallow = {}, - incompatible = {}, - weight = 1, - description = S("Item cannot be removed from armor slots except due to death, breaking or in Creative Mode."), - curse = true, - on_enchant = function() end, - requires_tool = false, - treasure = true, - power_range_table = {{25, 50}}, - inv_combat_tab = true, - inv_tool_tab = false, -} - -mcl_enchanting.enchantments.thorns = { - name = S("Thorns"), - max_level = 3, - primary = {combat_armor_chestplate = true}, - secondary = {combat_armor = true}, - disallow = {}, - incompatible = {}, - weight = 1, - description = S("Reflects some of the damage taken when hit, at the cost of reducing durability with each proc."), - curse = false, - on_enchant = function() end, - requires_tool = false, - treasure = false, - power_range_table = {{10, 61}, {30, 71}, {50, 81}}, - inv_combat_tab = true, - inv_tool_tab = false, -} - --- Elytra - -minetest.register_tool("mcl_armor:elytra", { - description = S("Elytra"), - _doc_items_longdesc = mcl_armor.longdesc, - _doc_items_usagehelp = mcl_armor.usage, - inventory_image = "mcl_armor_inv_elytra.png", - groups = {armor = 1, non_combat_armor = 1, armor_torso = 1, non_combat_torso = 1, mcl_armor_uses = 10}, - sounds = { - _mcl_armor_equip = "mcl_armor_equip_leather", - _mcl_armor_unequip = "mcl_armor_unequip_leather", - }, - on_place = mcl_armor.equip_on_use, - on_secondary_use = mcl_armor.equip_on_use, - _mcl_armor_element = "torso", - _mcl_armor_texture = "mcl_armor_elytra.png" -}) diff --git a/mods/ITEMS/mcl_armor/sounds/mcl_armor_equip_chainmail.ogg b/mods/ITEMS/mcl_armor/sounds/mcl_armor_equip_chainmail.ogg deleted file mode 100644 index 3e98e0e05c..0000000000 Binary files a/mods/ITEMS/mcl_armor/sounds/mcl_armor_equip_chainmail.ogg and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/sounds/mcl_armor_equip_diamond.ogg b/mods/ITEMS/mcl_armor/sounds/mcl_armor_equip_diamond.ogg deleted file mode 100644 index 9fd655ab76..0000000000 Binary files a/mods/ITEMS/mcl_armor/sounds/mcl_armor_equip_diamond.ogg and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/sounds/mcl_armor_equip_generic.ogg b/mods/ITEMS/mcl_armor/sounds/mcl_armor_equip_generic.ogg deleted file mode 100644 index 1d3b3de2c7..0000000000 Binary files a/mods/ITEMS/mcl_armor/sounds/mcl_armor_equip_generic.ogg and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/sounds/mcl_armor_equip_iron.ogg b/mods/ITEMS/mcl_armor/sounds/mcl_armor_equip_iron.ogg deleted file mode 100644 index 7001c4460f..0000000000 Binary files a/mods/ITEMS/mcl_armor/sounds/mcl_armor_equip_iron.ogg and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/sounds/mcl_armor_equip_leather.ogg b/mods/ITEMS/mcl_armor/sounds/mcl_armor_equip_leather.ogg deleted file mode 100644 index 378ec3165a..0000000000 Binary files a/mods/ITEMS/mcl_armor/sounds/mcl_armor_equip_leather.ogg and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/sounds/mcl_armor_unequip_chainmail.ogg b/mods/ITEMS/mcl_armor/sounds/mcl_armor_unequip_chainmail.ogg deleted file mode 100644 index 01692b5d2f..0000000000 Binary files a/mods/ITEMS/mcl_armor/sounds/mcl_armor_unequip_chainmail.ogg and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/sounds/mcl_armor_unequip_diamond.ogg b/mods/ITEMS/mcl_armor/sounds/mcl_armor_unequip_diamond.ogg deleted file mode 100644 index bdfdf80370..0000000000 Binary files a/mods/ITEMS/mcl_armor/sounds/mcl_armor_unequip_diamond.ogg and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/sounds/mcl_armor_unequip_generic.ogg b/mods/ITEMS/mcl_armor/sounds/mcl_armor_unequip_generic.ogg deleted file mode 100644 index c04975d42e..0000000000 Binary files a/mods/ITEMS/mcl_armor/sounds/mcl_armor_unequip_generic.ogg and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/sounds/mcl_armor_unequip_iron.ogg b/mods/ITEMS/mcl_armor/sounds/mcl_armor_unequip_iron.ogg deleted file mode 100644 index 969ac030ff..0000000000 Binary files a/mods/ITEMS/mcl_armor/sounds/mcl_armor_unequip_iron.ogg and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/sounds/mcl_armor_unequip_leather.ogg b/mods/ITEMS/mcl_armor/sounds/mcl_armor_unequip_leather.ogg deleted file mode 100644 index e634b89dfa..0000000000 Binary files a/mods/ITEMS/mcl_armor/sounds/mcl_armor_unequip_leather.ogg and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_boots_chain.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_boots_chain.png deleted file mode 100644 index e1fa159a29..0000000000 Binary files a/mods/ITEMS/mcl_armor/textures/mcl_armor_boots_chain.png and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_boots_diamond.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_boots_diamond.png deleted file mode 100644 index f323a86635..0000000000 Binary files a/mods/ITEMS/mcl_armor/textures/mcl_armor_boots_diamond.png and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_boots_gold.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_boots_gold.png deleted file mode 100644 index 7616d5d096..0000000000 Binary files a/mods/ITEMS/mcl_armor/textures/mcl_armor_boots_gold.png and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_boots_iron.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_boots_iron.png deleted file mode 100644 index a8d890b764..0000000000 Binary files a/mods/ITEMS/mcl_armor/textures/mcl_armor_boots_iron.png and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_boots_leather.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_boots_leather.png deleted file mode 100644 index c0122a1002..0000000000 Binary files a/mods/ITEMS/mcl_armor/textures/mcl_armor_boots_leather.png and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_chestplate_chain.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_chestplate_chain.png deleted file mode 100644 index b1b7795eb1..0000000000 Binary files a/mods/ITEMS/mcl_armor/textures/mcl_armor_chestplate_chain.png and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_chestplate_diamond.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_chestplate_diamond.png deleted file mode 100644 index 3679ae6a06..0000000000 Binary files a/mods/ITEMS/mcl_armor/textures/mcl_armor_chestplate_diamond.png and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_chestplate_gold.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_chestplate_gold.png deleted file mode 100644 index 640f30e497..0000000000 Binary files a/mods/ITEMS/mcl_armor/textures/mcl_armor_chestplate_gold.png and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_chestplate_iron.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_chestplate_iron.png deleted file mode 100644 index b27e585283..0000000000 Binary files a/mods/ITEMS/mcl_armor/textures/mcl_armor_chestplate_iron.png and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_chestplate_leather.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_chestplate_leather.png deleted file mode 100644 index eaa53582fd..0000000000 Binary files a/mods/ITEMS/mcl_armor/textures/mcl_armor_chestplate_leather.png and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_elytra.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_elytra.png deleted file mode 100644 index b51f2a564c..0000000000 Binary files a/mods/ITEMS/mcl_armor/textures/mcl_armor_elytra.png and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_helmet_chain.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_helmet_chain.png deleted file mode 100644 index 89919d5e3e..0000000000 Binary files a/mods/ITEMS/mcl_armor/textures/mcl_armor_helmet_chain.png and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_helmet_diamond.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_helmet_diamond.png deleted file mode 100644 index 3cd9867e05..0000000000 Binary files a/mods/ITEMS/mcl_armor/textures/mcl_armor_helmet_diamond.png and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_helmet_gold.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_helmet_gold.png deleted file mode 100644 index 4c9d9fd243..0000000000 Binary files a/mods/ITEMS/mcl_armor/textures/mcl_armor_helmet_gold.png and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_helmet_iron.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_helmet_iron.png deleted file mode 100644 index 721bd7ca39..0000000000 Binary files a/mods/ITEMS/mcl_armor/textures/mcl_armor_helmet_iron.png and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_helmet_leather.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_helmet_leather.png deleted file mode 100644 index a84a3f5c23..0000000000 Binary files a/mods/ITEMS/mcl_armor/textures/mcl_armor_helmet_leather.png and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_boots_chain.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_boots_chain.png deleted file mode 100644 index 66f9bdce57..0000000000 Binary files a/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_boots_chain.png and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_boots_diamond.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_boots_diamond.png deleted file mode 100644 index c0500d1a21..0000000000 Binary files a/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_boots_diamond.png and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_boots_gold.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_boots_gold.png deleted file mode 100644 index ef1f9fa87c..0000000000 Binary files a/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_boots_gold.png and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_boots_iron.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_boots_iron.png deleted file mode 100644 index 0d669cdbb9..0000000000 Binary files a/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_boots_iron.png and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_boots_leather.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_boots_leather.png deleted file mode 100644 index e618111b09..0000000000 Binary files a/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_boots_leather.png and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_chestplate_chain.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_chestplate_chain.png deleted file mode 100644 index 9ab14863f7..0000000000 Binary files a/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_chestplate_chain.png and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_chestplate_diamond.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_chestplate_diamond.png deleted file mode 100644 index 4768b6ea84..0000000000 Binary files a/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_chestplate_diamond.png and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_chestplate_gold.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_chestplate_gold.png deleted file mode 100644 index ef661fea32..0000000000 Binary files a/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_chestplate_gold.png and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_chestplate_iron.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_chestplate_iron.png deleted file mode 100644 index 28e7059dcb..0000000000 Binary files a/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_chestplate_iron.png and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_chestplate_leather.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_chestplate_leather.png deleted file mode 100644 index c7c81d2c16..0000000000 Binary files a/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_chestplate_leather.png and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_elytra.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_elytra.png deleted file mode 100644 index f5d5cfda6c..0000000000 Binary files a/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_elytra.png and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_helmet_chain.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_helmet_chain.png deleted file mode 100644 index f72a88da24..0000000000 Binary files a/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_helmet_chain.png and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_helmet_diamond.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_helmet_diamond.png deleted file mode 100644 index 162f02ec36..0000000000 Binary files a/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_helmet_diamond.png and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_helmet_gold.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_helmet_gold.png deleted file mode 100644 index 06265de42a..0000000000 Binary files a/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_helmet_gold.png and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_helmet_iron.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_helmet_iron.png deleted file mode 100644 index f7a3be4f3f..0000000000 Binary files a/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_helmet_iron.png and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_helmet_leather.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_helmet_leather.png deleted file mode 100644 index 5abf858d9c..0000000000 Binary files a/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_helmet_leather.png and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_leggings_chain.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_leggings_chain.png deleted file mode 100644 index c2641991ee..0000000000 Binary files a/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_leggings_chain.png and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_leggings_diamond.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_leggings_diamond.png deleted file mode 100644 index b5964fe0e9..0000000000 Binary files a/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_leggings_diamond.png and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_leggings_gold.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_leggings_gold.png deleted file mode 100644 index 268187218a..0000000000 Binary files a/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_leggings_gold.png and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_leggings_iron.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_leggings_iron.png deleted file mode 100644 index 033fee80e4..0000000000 Binary files a/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_leggings_iron.png and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_leggings_leather.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_leggings_leather.png deleted file mode 100644 index 41d49c3730..0000000000 Binary files a/mods/ITEMS/mcl_armor/textures/mcl_armor_inv_leggings_leather.png and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_leggings_chain.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_leggings_chain.png deleted file mode 100644 index 709a090d77..0000000000 Binary files a/mods/ITEMS/mcl_armor/textures/mcl_armor_leggings_chain.png and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_leggings_diamond.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_leggings_diamond.png deleted file mode 100644 index 1f08937738..0000000000 Binary files a/mods/ITEMS/mcl_armor/textures/mcl_armor_leggings_diamond.png and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_leggings_gold.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_leggings_gold.png deleted file mode 100644 index b5db71139f..0000000000 Binary files a/mods/ITEMS/mcl_armor/textures/mcl_armor_leggings_gold.png and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_leggings_iron.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_leggings_iron.png deleted file mode 100644 index 6add41cc42..0000000000 Binary files a/mods/ITEMS/mcl_armor/textures/mcl_armor_leggings_iron.png and /dev/null differ diff --git a/mods/ITEMS/mcl_armor/textures/mcl_armor_leggings_leather.png b/mods/ITEMS/mcl_armor/textures/mcl_armor_leggings_leather.png deleted file mode 100644 index deededca4d..0000000000 Binary files a/mods/ITEMS/mcl_armor/textures/mcl_armor_leggings_leather.png and /dev/null differ diff --git a/mods/ITEMS/mcl_fishing/init.lua b/mods/ITEMS/mcl_fishing/init.lua deleted file mode 100644 index 1d8f24fb32..0000000000 --- a/mods/ITEMS/mcl_fishing/init.lua +++ /dev/null @@ -1,513 +0,0 @@ ---Fishing Rod, Bobber, and Flying Bobber mechanics and Bobber artwork by Rootyjr. - -local S = minetest.get_translator(minetest.get_current_modname()) - -local bobber_ENTITY={ - physical = false, - timer=0, - textures = {"mcl_fishing_bobber.png"}, - visual_size = {x=0.5, y=0.5}, - collisionbox = {0.45,0.45,0.45,0.45,0.45,0.45}, - pointable = false, - static_save = false, - - _lastpos={}, - _dive = false, - _waittime = nil, - _time = 0, - player=nil, - _oldy = nil, - objtype="fishing", -} - -local fish = function(itemstack, player, pointed_thing) - if pointed_thing and pointed_thing.type == "node" then - -- Call on_rightclick if the pointed node defines it - local node = minetest.get_node(pointed_thing.under) - if player and not player:get_player_control().sneak then - if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].on_rightclick then - return minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, player, itemstack) or itemstack - end - end - end - - local pos = player:get_pos() - - local objs = minetest.get_objects_inside_radius(pos, 125) - local num = 0 - local ent = nil - local noent = true - - local durability = 65 - local unbreaking = mcl_enchanting.get_enchantment(itemstack, "unbreaking") - if unbreaking > 0 then - durability = durability * (unbreaking + 1) - end - - --Check for bobber if so handle. - for n = 1, #objs do - ent = objs[n]:get_luaentity() - if ent then - if ent.player and ent.objtype=="fishing" then - if (player:get_player_name() == ent.player) then - noent = false - if ent._dive == true then - local itemname - local items - local itemcount = 1 - local pr = PseudoRandom(os.time() * math.random(1, 100)) - local r = pr:next(1, 100) - local fish_values = {85, 84.8, 84.7, 84.5} - local junk_values = {10, 8.1, 6.1, 4.2} - local luck_of_the_sea = math.min(mcl_enchanting.get_enchantment(itemstack, "luck_of_the_sea"), 3) - local index = luck_of_the_sea + 1 - local fish_value = fish_values[index] - local junk_value = junk_values[index] + fish_value - if r <= fish_value then - -- Fish - items = mcl_loot.get_loot({ - items = { - { itemstring = "mcl_fishing:fish_raw", weight = 60 }, - { itemstring = "mcl_fishing:salmon_raw", weight = 25 }, - { itemstring = "mcl_fishing:clownfish_raw", weight = 2 }, - { itemstring = "mcl_fishing:pufferfish_raw", weight = 13 }, - }, - stacks_min = 1, - stacks_max = 1, - }, pr) - elseif r <= junk_value then - -- Junk - items = mcl_loot.get_loot({ - items = { - { itemstring = "mcl_core:bowl", weight = 10 }, - { itemstring = "mcl_fishing:fishing_rod", weight = 2, wear_min = 6554, wear_max = 65535 }, -- 10%-100% damage - { itemstring = "mcl_mobitems:leather", weight = 10 }, - { itemstring = "mcl_armor:boots_leather", weight = 10, wear_min = 6554, wear_max = 65535 }, -- 10%-100% damage - { itemstring = "mcl_mobitems:rotten_flesh", weight = 10 }, - { itemstring = "mcl_core:stick", weight = 5 }, - { itemstring = "mcl_mobitems:string", weight = 5 }, - { itemstring = "mcl_potions:water", weight = 10 }, - { itemstring = "mcl_mobitems:bone", weight = 10 }, - { itemstring = "mcl_dye:black", weight = 1, amount_min = 10, amount_max = 10 }, - { itemstring = "mcl_mobitems:string", weight = 10 }, -- TODO: Tripwire Hook - }, - stacks_min = 1, - stacks_max = 1, - }, pr) - else - -- Treasure - items = mcl_loot.get_loot({ - items = { - { itemstring = "mcl_bows:bow", wear_min = 49144, wear_max = 65535, func = function(stack, pr) - mcl_enchanting.enchant_randomly(stack, 30, true, false, false, pr) - end }, -- 75%-100% damage - { itemstring = "mcl_books:book", func = function(stack, pr) - mcl_enchanting.enchant_randomly(stack, 30, true, true, false, pr) - end }, - { itemstring = "mcl_fishing:fishing_rod", wear_min = 49144, wear_max = 65535, func = function(stack, pr) - mcl_enchanting.enchant_randomly(stack, 30, true, false, false, pr) - end }, -- 75%-100% damage - { itemstring = "mcl_mobs:nametag", }, - { itemstring = "mcl_mobitems:saddle", }, - { itemstring = "mcl_flowers:waterlily", }, - }, - stacks_min = 1, - stacks_max = 1, - }, pr) - end - local item - if #items >= 1 then - item = ItemStack(items[1]) - else - item = ItemStack() - end - local inv = player:get_inventory() - if inv:room_for_item("main", item) then - inv:add_item("main", item) - else - minetest.add_item(pos, item) - end - if mcl_experience.throw_xp then - mcl_experience.throw_xp(pos, math.random(1,6)) - end - - if not minetest.is_creative_enabled(player:get_player_name()) then - local idef = itemstack:get_definition() - itemstack:add_wear(65535/durability) -- 65 uses - if itemstack:get_count() == 0 and idef.sound and idef.sound.breaks then - minetest.sound_play(idef.sound.breaks, {pos=player:get_pos(), gain=0.5}, true) - end - end - end - --Check if object is on land. - local epos = ent.object:get_pos() - epos.y = math.floor(epos.y) - local node = minetest.get_node(epos) - local def = minetest.registered_nodes[node.name] - if def.walkable then - if not minetest.is_creative_enabled(player:get_player_name()) then - local idef = itemstack:get_definition() - itemstack:add_wear((65535/durability)*2) -- if so and not creative then wear double like in MC. - if itemstack:get_count() == 0 and idef.sound and idef.sound.breaks then - minetest.sound_play(idef.sound.breaks, {pos=player:get_pos(), gain=0.5}, true) - end - end - end - --Destroy bobber. - ent.object:remove() - return itemstack - end - end - end - end - --Check for flying bobber. - for n = 1, #objs do - ent = objs[n]:get_luaentity() - if ent then - if ent._thrower and ent.objtype=="fishing" then - if player:get_player_name() == ent._thrower then - noent = false - break - end - end - end - end - --If no bobber or flying_bobber exists then throw bobber. - if noent == true then - local playerpos = player:get_pos() - local dir = player:get_look_dir() - mcl_throwing.throw("mcl_fishing:flying_bobber", {x=playerpos.x, y=playerpos.y+1.5, z=playerpos.z}, dir, 15, player:get_player_name()) - end -end - --- Movement function of bobber -local bobber_on_step = function(self, dtime) - self.timer=self.timer+dtime - local epos = self.object:get_pos() - epos.y = math.floor(epos.y) - local node = minetest.get_node(epos) - local def = minetest.registered_nodes[node.name] - - --If we have no player, remove self. - if self.player == nil or self.player == "" then - self.object:remove() - return - end - local player = minetest.get_player_by_name(self.player) - if not player then - self.object:remove() - return - end - local wield = player:get_wielded_item() - --Check if player is nearby - if self.player and player then - --Destroy bobber if item not wielded. - if ((not wield) or (minetest.get_item_group(wield:get_name(), "fishing_rod") <= 0)) then - self.object:remove() - return - end - - --Destroy bobber if player is too far away. - local objpos = self.object:get_pos() - local playerpos = player:get_pos() - if (((playerpos.y - objpos.y) >= 33) or ((playerpos.y - objpos.y) <= -33)) then - self.object:remove() - return - elseif (((playerpos.x - objpos.x) >= 33) or ((playerpos.x - objpos.x) <= -33)) then - self.object:remove() - return - elseif (((playerpos.z - objpos.z) >= 33) or ((playerpos.z - objpos.z) <= -33)) then - self.object:remove() - return - elseif ((((playerpos.z + playerpos.x) - (objpos.z + objpos.x)) >= 33) or ((playerpos.z + playerpos.x) - (objpos.z + objpos.x)) <= -33) then - self.object:remove() - return - elseif ((((playerpos.y + playerpos.x) - (objpos.y + objpos.x)) >= 33) or ((playerpos.y + playerpos.x) - (objpos.y + objpos.x)) <= -33) then - self.object:remove() - return - elseif ((((playerpos.z + playerpos.y) - (objpos.z + objpos.y)) >= 33) or ((playerpos.z + playerpos.y) - (objpos.z + objpos.y)) <= -33) then - self.object:remove() - return - end - - end - -- If in water, then bob. - if def.liquidtype == "source" and minetest.get_item_group(def.name, "water") ~= 0 then - if self._oldy == nil then - self.object:set_pos({x=self.object:get_pos().x,y=math.floor(self.object:get_pos().y)+.5,z=self.object:get_pos().z}) - self._oldy = self.object:get_pos().y - end - -- reset to original position after dive. - if self.object:get_pos().y > self._oldy then - self.object:set_pos({x=self.object:get_pos().x,y=self._oldy,z=self.object:get_pos().z}) - self.object:set_velocity({x=0,y=0,z=0}) - self.object:set_acceleration({x=0,y=0,z=0}) - end - if self._dive then - for i=1,2 do - -- Spray bubbles when there's a fish. - minetest.add_particle({ - pos = {x=epos["x"]+math.random(-1,1)*math.random()/2,y=epos["y"]+0.1,z=epos["z"]+math.random(-1,1)*math.random()/2}, - velocity = {x=0, y=4, z=0}, - acceleration = {x=0, y=-5, z=0}, - expirationtime = math.random() * 0.5, - size = math.random(), - collisiondetection = true, - vertical = false, - texture = "mcl_particles_bubble.png", - }) - end - if self._time < self._waittime then - self._time = self._time + dtime - else - self._waittime = 0 - self._time = 0 - self._dive = false - end - else if not self._waittime or self._waittime <= 0 then - -- wait for random number of ticks. - local lure_enchantment = wield and mcl_enchanting.get_enchantment(wield, "lure") or 0 - local reduced = lure_enchantment * 5 - self._waittime = math.random(math.max(0, 5 - reduced), 30 - reduced) - else - if self._time < self._waittime then - self._time = self._time + dtime - else - -- wait time is over time to dive. - self._dive = true - self.object:set_velocity({x=0,y=-2,z=0}) - self.object:set_acceleration({x=0,y=5,z=0}) - self._waittime = 0.8 - self._time = 0 - end - end - end -end - - -- TODO: Destroy when hitting a solid node - --if self._lastpos.x~=nil then - -- if (def and def.walkable) or not def then - --self.object:remove() - -- return - -- end - --end - --self._lastpos={x=pos.x, y=pos.y, z=pos.z} -- Set lastpos-->Node will be added at last pos outside the node -end - -bobber_ENTITY.on_step = bobber_on_step - -minetest.register_entity("mcl_fishing:bobber_entity", bobber_ENTITY) - -local flying_bobber_ENTITY={ - physical = false, - timer=0, - textures = {"mcl_fishing_bobber.png"}, --FIXME: Replace with correct texture. - visual_size = {x=0.5, y=0.5}, - collisionbox = {0,0,0,0,0,0}, - pointable = false, - - get_staticdata = mcl_throwing.get_staticdata, - on_activate = mcl_throwing.on_activate, - - _lastpos={}, - _thrower = nil, - objtype="fishing", -} - --- Movement function of flying bobber -local function flying_bobber_on_step(self, dtime) - self.timer=self.timer+dtime - local pos = self.object:get_pos() - local node = minetest.get_node(pos) - local def = minetest.registered_nodes[node.name] - --local player = minetest.get_player_by_name(self._thrower) - - -- Destroy when hitting a solid node - if self._lastpos.x~=nil then - if (def and (def.walkable or def.liquidtype == "flowing" or def.liquidtype == "source")) or not def then - local ent = minetest.add_entity(self._lastpos, "mcl_fishing:bobber_entity"):get_luaentity() - ent.player = self._thrower - ent.child = true - self.object:remove() - return - end - end - self._lastpos={x=pos.x, y=pos.y, z=pos.z} -- Set lastpos-->Node will be added at last pos outside the node -end - -flying_bobber_ENTITY.on_step = flying_bobber_on_step - -minetest.register_entity("mcl_fishing:flying_bobber_entity", flying_bobber_ENTITY) - -mcl_throwing.register_throwable_object("mcl_fishing:flying_bobber", "mcl_fishing:flying_bobber_entity", 5) - --- If player leaves area, remove bobber. -minetest.register_on_leaveplayer(function(player) - local objs = minetest.get_objects_inside_radius(player:get_pos(), 250) - local ent = nil - local noent = true - for n = 1, #objs do - ent = objs[n]:get_luaentity() - if ent then - if ent.player and ent.objtype=="fishing" then - ent.object:remove() - elseif ent._thrower and ent.objtype=="fishing" then - ent.object:remove() - end - end - end -end) - --- If player dies, remove bobber. -minetest.register_on_dieplayer(function(player) - local objs = minetest.get_objects_inside_radius(player:get_pos(), 250) - local num = 0 - local ent = nil - local noent = true - - for n = 1, #objs do - ent = objs[n]:get_luaentity() - if ent then - if ent.player and ent.objtype=="fishing" then - ent.object:remove() - elseif ent._thrower and ent.objtype=="fishing" then - ent.object:remove() - end - end - end -end) - --- Fishing Rod -minetest.register_tool("mcl_fishing:fishing_rod", { - description = S("Fishing Rod"), - _tt_help = S("Catches fish in water"), - _doc_items_longdesc = S("Fishing rods can be used to catch fish."), - _doc_items_usagehelp = S("Rightclick to launch the bobber. When it sinks right-click again to reel in an item. Who knows what you're going to catch?"), - groups = { tool=1, fishing_rod=1, enchantability=1 }, - inventory_image = "mcl_fishing_fishing_rod.png", - wield_image = "mcl_fishing_fishing_rod.png^[transformR270", - wield_scale = { x = 1.5, y = 1.5, z = 1 }, - stack_max = 1, - on_place = fish, - on_secondary_use = fish, - sound = { breaks = "default_tool_breaks" }, - _mcl_uses = 65, - _mcl_toollike_wield = true, -}) - -minetest.register_craft({ - output = "mcl_fishing:fishing_rod", - recipe = { - {"","","mcl_core:stick"}, - {"","mcl_core:stick","mcl_mobitems:string"}, - {"mcl_core:stick","","mcl_mobitems:string"}, - } -}) -minetest.register_craft({ - output = "mcl_fishing:fishing_rod", - recipe = { - {"mcl_core:stick", "", ""}, - {"mcl_mobitems:string", "mcl_core:stick", ""}, - {"mcl_mobitems:string","","mcl_core:stick"}, - } -}) -minetest.register_craft({ - type = "fuel", - recipe = "group:fishing_rod", - burntime = 15, -}) - - --- Fish -minetest.register_craftitem("mcl_fishing:fish_raw", { - description = S("Raw Fish"), - _doc_items_longdesc = S("Raw fish is obtained by fishing and is a food item which can be eaten safely. Cooking it improves its nutritional value."), - inventory_image = "mcl_fishing_fish_raw.png", - on_place = minetest.item_eat(2), - on_secondary_use = minetest.item_eat(2), - stack_max = 64, - groups = { food=2, eatable = 2, smoker_cookable = 1 }, - _mcl_saturation = 0.4, -}) - -minetest.register_craftitem("mcl_fishing:fish_cooked", { - description = S("Cooked Fish"), - _doc_items_longdesc = S("Mmh, fish! This is a healthy food item."), - inventory_image = "mcl_fishing_fish_cooked.png", - on_place = minetest.item_eat(5), - on_secondary_use = minetest.item_eat(5), - stack_max = 64, - groups = { food=2, eatable=5 }, - _mcl_saturation = 6, -}) - -minetest.register_craft({ - type = "cooking", - output = "mcl_fishing:fish_cooked", - recipe = "mcl_fishing:fish_raw", - cooktime = 10, -}) - --- Salmon -minetest.register_craftitem("mcl_fishing:salmon_raw", { - description = S("Raw Salmon"), - _doc_items_longdesc = S("Raw salmon is obtained by fishing and is a food item which can be eaten safely. Cooking it improves its nutritional value."), - inventory_image = "mcl_fishing_salmon_raw.png", - on_place = minetest.item_eat(2), - on_secondary_use = minetest.item_eat(2), - stack_max = 64, - groups = { food=2, eatable = 2, smoker_cookable = 1 }, - _mcl_saturation = 0.4, -}) - -minetest.register_craftitem("mcl_fishing:salmon_cooked", { - description = S("Cooked Salmon"), - _doc_items_longdesc = S("This is a healthy food item which can be eaten."), - inventory_image = "mcl_fishing_salmon_cooked.png", - on_place = minetest.item_eat(6), - on_secondary_use = minetest.item_eat(6), - stack_max = 64, - groups = { food=2, eatable=6 }, - _mcl_saturation = 9.6, -}) - -minetest.register_craft({ - type = "cooking", - output = "mcl_fishing:salmon_cooked", - recipe = "mcl_fishing:salmon_raw", - cooktime = 10, -}) - --- Clownfish -minetest.register_craftitem("mcl_fishing:clownfish_raw", { - description = S("Clownfish"), - _doc_items_longdesc = S("Clownfish may be obtained by fishing (and luck) and is a food item which can be eaten safely."), - inventory_image = "mcl_fishing_clownfish_raw.png", - on_place = minetest.item_eat(1), - on_secondary_use = minetest.item_eat(1), - stack_max = 64, - groups = { food=2, eatable = 1 }, - _mcl_saturation = 0.2, -}) - - -minetest.register_craftitem("mcl_fishing:pufferfish_raw", { - description = S("Pufferfish"), - _tt_help = minetest.colorize(mcl_colors.YELLOW, S("Very poisonous")), - _doc_items_longdesc = S("Pufferfish are a common species of fish and can be obtained by fishing. They can technically be eaten, but they are very bad for humans. Eating a pufferfish only restores 1 hunger point and will poison you very badly (which drains your health non-fatally) and causes serious food poisoning (which increases your hunger)."), - inventory_image = "mcl_fishing_pufferfish_raw.png", - on_place = minetest.item_eat(1), - on_secondary_use = minetest.item_eat(1), - stack_max = 64, - groups = { food=2, eatable=1, brewitem = 1 }, - -- _mcl_saturation = 0.2, -}) - - -minetest.register_on_item_eat(function (hp_change, replace_with_item, itemstack, user, pointed_thing) - - if itemstack:get_name() == "mcl_fishing:pufferfish_raw" then - mcl_potions.poison_func(user, 1/3, 60) - end - -end ) diff --git a/mods/ITEMS/mcl_fishing/locale/mcl_fishing.de.tr b/mods/ITEMS/mcl_fishing/locale/mcl_fishing.de.tr deleted file mode 100644 index b80c186c1b..0000000000 --- a/mods/ITEMS/mcl_fishing/locale/mcl_fishing.de.tr +++ /dev/null @@ -1,18 +0,0 @@ -# textdomain: mcl_fishing -Fishing Rod=Angel -Fishing rods can be used to catch fish.=Mit Angeln fängt man Fische. -Rightclick to launch the bobber. When it sinks right-click again to reel in an item. Who knows what you're going to catch?=Rechtsklicken, um den Schwimmer auszuwerfen. Wenn er sinkt, erneut rechtsklicken, um etwas zu fangen. Wer weiß, was Sie fangen werden? -Raw Fish=Roher Fisch -Raw fish is obtained by fishing and is a food item which can be eaten safely. Cooking it improves its nutritional value.=Rohen Fisch kann man mit Angeln fangen. Er ist ein Lebensmittel, den man sicher verzehren kann. Er kann gekocht werden, um seinen Nährwert zu erhöhen. -Cooked Fish=Gekochter Fisch -Mmh, fish! This is a healthy food item.=Mhh, Fisch! Ein gesundes Lebensmittel. -Raw Salmon=Roher Lachs -Raw salmon is obtained by fishing and is a food item which can be eaten safely. Cooking it improves its nutritional value.=Rohen Lachs erhält man beim Angeln. Er ist ein Lebensmittel, das sicher verzehrt werden kann. -Cooked Salmon=Gekochter Lachs -This is a healthy food item which can be eaten.=Ein gesundes essbares Lebensmittel. -Clownfish=Clownfisch -Clownfish may be obtained by fishing (and luck) and is a food item which can be eaten safely.=Einen Clownfisch kann man beim Angeln mit etwas Glück fangen. Er ist ein Lebensmittel, das sicher verzehrt werden kann. -Pufferfish=Kugelfisch -Pufferfish are a common species of fish and can be obtained by fishing. They can technically be eaten, but they are very bad for humans. Eating a pufferfish only restores 1 hunger point and will poison you very badly (which drains your health non-fatally) and causes serious food poisoning (which increases your hunger).=Kugelfische sind eine verbreitete Fischart, die geangelt werden kann. Sie können theoretisch gegessen werden, aber sie sind sehr schlecht für Menschen. Es gibt nur 1 Hungerpunkt und es wird Sie schwer vergiften (was Ihre Gesundheit verringert, aber nicht bis zum Tod) und Ihr Hungerpegel wird aufgrund der schweren Lebensmittelvergiftung stark ansteigen. -Catches fish in water=Fängt Fische im Wasser -Very poisonous=Sehr giftig diff --git a/mods/ITEMS/mcl_fishing/locale/mcl_fishing.es.tr b/mods/ITEMS/mcl_fishing/locale/mcl_fishing.es.tr deleted file mode 100644 index 27972dcefc..0000000000 --- a/mods/ITEMS/mcl_fishing/locale/mcl_fishing.es.tr +++ /dev/null @@ -1,16 +0,0 @@ -# textdomain: mcl_fishing -Fishing Rod=Caña de pescar -Fishing rods can be used to catch fish.=Las cañas de pescar se pueden utilizar para pescar. -Rightclick to launch the bobber. When it sinks right-click again to reel in an item. Who knows what you're going to catch?=Haga clic derecho para iniciar el bobber. Cuando se hunda, haga clic derecho nuevamente para enrollar un elemento. ¿Quién sabe lo que vas a atrapar? -Raw Fish=Bacalao crudo -Raw fish is obtained by fishing and is a food item which can be eaten safely. Cooking it improves its nutritional value.=El bacalao crudo se obtiene pescando y es un alimento que se puede comer de forma segura. Cocinarlo mejora su valor nutricional. -Cooked Fish=Bacalao cocinado -Mmh, fish! This is a healthy food item.=Mmh, ¡pez! Este es un alimento saludable. -Raw Salmon=Salmón crudo -Raw salmon is obtained by fishing and is a food item which can be eaten safely. Cooking it improves its nutritional value.=El salmón crudo se obtiene pescando y es un alimento que se puede comer de manera segura. Cocinarlo mejora su valor nutricional. -Cooked Salmon=Salmón cocinado -This is a healthy food item which can be eaten.=Este es un alimento saludable que se puede comer. -Clownfish=Pez tropical -Clownfish may be obtained by fishing (and luck) and is a food item which can be eaten safely.=El pez tropical se puede obtener pescando (y por suerte) y es un alimento que se puede comer de forma segura. -Pufferfish=Pez globo -Pufferfish are a common species of fish and can be obtained by fishing. They can technically be eaten, but they are very bad for humans. Eating a pufferfish only restores 1 hunger point and will poison you very badly (which drains your health non-fatally) and causes serious food poisoning (which increases your hunger).=El pez globo es una especie común de pescado y se puede obtener mediante la pesca. Técnicamente se pueden comer, pero son muy malos para los humanos. Comer un pez globo solo restaura 1 punto de hambre y te envenena mucho (lo que drena tu salud de manera no fatal) y causa una intoxicación alimentaria grave (lo que aumenta tu hambre). diff --git a/mods/ITEMS/mcl_fishing/locale/mcl_fishing.fr.tr b/mods/ITEMS/mcl_fishing/locale/mcl_fishing.fr.tr deleted file mode 100644 index 2bac42bbd4..0000000000 --- a/mods/ITEMS/mcl_fishing/locale/mcl_fishing.fr.tr +++ /dev/null @@ -1,18 +0,0 @@ -# textdomain: mcl_fishing -Fishing Rod=Canne à pêche -Fishing rods can be used to catch fish.=Les cannes à pêche peuvent être utilisées pour attraper du poisson. -Rightclick to launch the bobber. When it sinks right-click again to reel in an item. Who knows what you're going to catch?=Clic droit pour lancer le bouchon. Lorsqu'il s'enfonce, cliquez de nouveau avec le bouton droit pour rembobiner. Qui sait ce que tu vas attraper? -Raw Fish=Poisson Cru -Raw fish is obtained by fishing and is a food item which can be eaten safely. Cooking it improves its nutritional value.=Le poisson cru est obtenu par la pêche et est un aliment qui peut être mangé en toute sécurité. La cuisson améliore sa valeur nutritive. -Cooked Fish=Poisson cuit -Mmh, fish! This is a healthy food item.=Mmh, poisson! Il s'agit d'un aliment sain. -Raw Salmon=Saumon cru -Raw salmon is obtained by fishing and is a food item which can be eaten safely. Cooking it improves its nutritional value.=Le saumon cru est obtenu par la pêche et est un aliment qui peut être consommé en toute sécurité. La cuisson améliore sa valeur nutritive. -Cooked Salmon=Saumon cuit -This is a healthy food item which can be eaten.=Il s'agit d'un aliment sain qui peut être consommé. -Clownfish=Poisson-Clown -Clownfish may be obtained by fishing (and luck) and is a food item which can be eaten safely.=Le poisson-clown peut être obtenu par la pêche (et la chance) et est un aliment qui peut être mangé en toute sécurité. -Pufferfish=Poisson-Globe -Pufferfish are a common species of fish and can be obtained by fishing. They can technically be eaten, but they are very bad for humans. Eating a pufferfish only restores 1 hunger point and will poison you very badly (which drains your health non-fatally) and causes serious food poisoning (which increases your hunger).=Le poisson-globe est une espèce de poisson commune et peut être obtenu par la pêche. Ils peuvent techniquement être mangés, mais ils sont très mauvais pour les humains. Manger un poisson-globe ne restaure que 1 point de faim et vous empoisonnera fortement (ce qui draine votre santé de manière non fatale) et provoque une grave intoxication alimentaire (qui augmente votre faim). -Catches fish in water=Attrape les poissons dans l'eau -Very poisonous=Très toxique diff --git a/mods/ITEMS/mcl_fishing/locale/mcl_fishing.pl.tr b/mods/ITEMS/mcl_fishing/locale/mcl_fishing.pl.tr deleted file mode 100644 index cc35096cd2..0000000000 --- a/mods/ITEMS/mcl_fishing/locale/mcl_fishing.pl.tr +++ /dev/null @@ -1,18 +0,0 @@ -# textdomain: mcl_fishing -Fishing Rod=Wędka -Fishing rods can be used to catch fish.=Wędki są wykorzystywane do łowienia ryb. -Rightclick to launch the bobber. When it sinks right-click again to reel in an item. Who knows what you're going to catch?=Kliknij prawym przyciskiem aby wyrzucić spławik. Gdy zejdzie pod wodę, kliknij prawym aby go wciągnąć razem z przedmiotem. Kto wie co uda ci się złapać? -Raw Fish=Surowa ryba -Raw fish is obtained by fishing and is a food item which can be eaten safely. Cooking it improves its nutritional value.=Surowa ryba jest możliwa do zdobycia poprzez łowienie i można go bezpiecznie zjeść. Upieczenie jej znacząco zwiększa wartości odżywcze. -Cooked Fish=Upieczona ryba -Mmh, fish! This is a healthy food item.=Mm, ryba! Jest to zdrowy i pożywny posiłek. -Raw Salmon=Surowy łosoś -Raw salmon is obtained by fishing and is a food item which can be eaten safely. Cooking it improves its nutritional value.=Surowy łosoś można zdobyć poprzez łowienie i można go bezpiecznie zjeść. Upieczenie jej znacząco zwiększa wartości odżywcze. -Cooked Salmon=Upieczony łosoś -This is a healthy food item which can be eaten.=Jest to zdrowy i pożywny posiłek. -Clownfish=Błazenek -Clownfish may be obtained by fishing (and luck) and is a food item which can be eaten safely.=Błazenek -Pufferfish=Rozdymka -Pufferfish are a common species of fish and can be obtained by fishing. They can technically be eaten, but they are very bad for humans. Eating a pufferfish only restores 1 hunger point and will poison you very badly (which drains your health non-fatally) and causes serious food poisoning (which increases your hunger).=Rozdymki są powszechnym gatunkiem ryby, który można zdobyć poprzez łowienie. Technicznie rzecz biorąc można je zjeść, jednak są bardzo niezdrowe dla ludzi. Zjedzenie rozdymki przywraca tylko 1 punkt głodu, ale powoduje zatrucie (co zabiera twoje zdrowie, ale nie zabija) oraz zatrucie pokarmowe (co zwiększa twój głód). -Catches fish in water=Łowi ryby z wody -Very poisonous=Bardzo trujące diff --git a/mods/ITEMS/mcl_fishing/locale/mcl_fishing.ru.tr b/mods/ITEMS/mcl_fishing/locale/mcl_fishing.ru.tr deleted file mode 100644 index 9ed0e4f8d3..0000000000 --- a/mods/ITEMS/mcl_fishing/locale/mcl_fishing.ru.tr +++ /dev/null @@ -1,18 +0,0 @@ -# textdomain: mcl_fishing -Fishing Rod=Удочка -Fishing rods can be used to catch fish.=Удочка используется при ловле рыбы. -Rightclick to launch the bobber. When it sinks right-click again to reel in an item. Who knows what you're going to catch?=Кликните правой для запуска поплавка. Когда он потонет, кликните снова, чтобы вытащить ваш улов. Кстати, что вы собираетесь поймать? -Raw Fish=Сырая рыба -Raw fish is obtained by fishing and is a food item which can be eaten safely. Cooking it improves its nutritional value.=Сырая рыба добывается при помощи удочки и это продукт, который можно безопасно есть. При приготовлении её питательная ценность растёт. -Cooked Fish=Приготовленная рыба -Mmh, fish! This is a healthy food item.=Ммм, рыба! Это продуктовый предмет здорового питания. -Raw Salmon=Сырой лосось -Raw salmon is obtained by fishing and is a food item which can be eaten safely. Cooking it improves its nutritional value.=Сырой лосось добывается при помощи удочки и это продукт, который можно безопасно есть. При приготовлении его питательная ценность растёт. -Cooked Salmon=Приготовленный лосось -This is a healthy food item which can be eaten.=Это продуктовый предмет здорового питания. -Clownfish=Тропическая рыба -Clownfish may be obtained by fishing (and luck) and is a food item which can be eaten safely.=Тропическая рыба добывается при помощи удочки (и удачи) и это продукт, который можно безопасно есть. -Pufferfish=Иглобрюх -Pufferfish are a common species of fish and can be obtained by fishing. They can technically be eaten, but they are very bad for humans. Eating a pufferfish only restores 1 hunger point and will poison you very badly (which drains your health non-fatally) and causes serious food poisoning (which increases your hunger).=Иглобрюхи - распространенный вид рыбы и могут быть пойманы на удочку. Технически их можно есть, но они очень вредны для людей. Употребление иглобрюха в пищу восстанавливает всего 1 очко голода, но отравит вас очень тяжело (несмертельно уменьшит ваше здоровье), вы получите серьёзное пищевое отравление (которое увеличивает голод). -Catches fish in water=Ловит рыбу в воде -Very poisonous=Очень ядовит diff --git a/mods/ITEMS/mcl_fishing/locale/mcl_fishing.zh_TW.tr b/mods/ITEMS/mcl_fishing/locale/mcl_fishing.zh_TW.tr deleted file mode 100644 index a0710f3abe..0000000000 --- a/mods/ITEMS/mcl_fishing/locale/mcl_fishing.zh_TW.tr +++ /dev/null @@ -1,18 +0,0 @@ -# textdomain: mcl_fishing -Fishing Rod=釣竿 -Fishing rods can be used to catch fish.=釣竿是用來取得魚的工具。 -Rightclick to launch the bobber. When it sinks right-click again to reel in an item. Who knows what you're going to catch?=右鍵單擊以啟動浮標。當它下沉時,再次點擊右鍵來釣起一個物品。誰知道你會抓到什麼? -Raw Fish=生鱈魚 -Raw fish is obtained by fishing and is a food item which can be eaten safely. Cooking it improves its nutritional value.=生鱈魚是通過捕魚獲得的,是一種可以安全食用的食品。烹飪可以提高其營養價值。 -Cooked Fish=熟鱈魚 -Mmh, fish! This is a healthy food item.=嗯,魚! 這是一種健康的食品。 -Raw Salmon=生鮭魚 -Raw salmon is obtained by fishing and is a food item which can be eaten safely. Cooking it improves its nutritional value.=生鮭魚是通過捕魚獲得的,是一種可以安全食用的食品。烹飪可以提高其營養價值。 -Cooked Salmon=熟鮭魚 -This is a healthy food item which can be eaten.=這是一種健康的可食用食品。 -Clownfish=熱帶魚 -Clownfish may be obtained by fishing (and luck) and is a food item which can be eaten safely.=熱帶魚可以通過釣魚(和運氣)獲得,是一種可以安全食用的食物。 -Pufferfish=河豚 -Pufferfish are a common species of fish and can be obtained by fishing. They can technically be eaten, but they are very bad for humans. Eating a pufferfish only restores 1 hunger point and will poison you very badly (which drains your health non-fatally) and causes serious food poisoning (which increases your hunger).=河豚是一種常見的魚種,可以通過釣魚獲得。嚴格來說,它們可以被吃掉,但對人類非常不利。吃了河豚只能恢復1點飢餓感,而且會讓你中毒非常嚴重(非致命性地消耗你的健康),並導致嚴重的食物中毒(會增加你的飢餓感)。 -Catches fish in water=在水中取得魚 -Very poisonous=有劇毒 diff --git a/mods/ITEMS/mcl_fishing/locale/template.txt b/mods/ITEMS/mcl_fishing/locale/template.txt deleted file mode 100644 index a1544666b3..0000000000 --- a/mods/ITEMS/mcl_fishing/locale/template.txt +++ /dev/null @@ -1,18 +0,0 @@ -# textdomain: mcl_fishing -Fishing Rod= -Fishing rods can be used to catch fish.= -Rightclick to launch the bobber. When it sinks right-click again to reel in an item. Who knows what you're going to catch?= -Raw Fish= -Raw fish is obtained by fishing and is a food item which can be eaten safely. Cooking it improves its nutritional value.= -Cooked Fish= -Mmh, fish! This is a healthy food item.= -Raw Salmon= -Raw salmon is obtained by fishing and is a food item which can be eaten safely. Cooking it improves its nutritional value.= -Cooked Salmon= -This is a healthy food item which can be eaten.= -Clownfish= -Clownfish may be obtained by fishing (and luck) and is a food item which can be eaten safely.= -Pufferfish= -Pufferfish are a common species of fish and can be obtained by fishing. They can technically be eaten, but they are very bad for humans. Eating a pufferfish only restores 1 hunger point and will poison you very badly (which drains your health non-fatally) and causes serious food poisoning (which increases your hunger).= -Catches fish in water= -Very poisonous= diff --git a/mods/ITEMS/mcl_fishing/mod.conf b/mods/ITEMS/mcl_fishing/mod.conf deleted file mode 100644 index c4e5f5f2e7..0000000000 --- a/mods/ITEMS/mcl_fishing/mod.conf +++ /dev/null @@ -1,3 +0,0 @@ -name = mcl_fishing -description = Adds fish and fishing poles to go fishing. -depends = mcl_core, mcl_sounds, mcl_loot, mcl_mobs, mcl_enchanting, mcl_throwing, mcl_colors diff --git a/mods/ITEMS/mcl_fishing/textures/mcl_fishing_bobber.png b/mods/ITEMS/mcl_fishing/textures/mcl_fishing_bobber.png deleted file mode 100644 index 0c93fd4f90..0000000000 Binary files a/mods/ITEMS/mcl_fishing/textures/mcl_fishing_bobber.png and /dev/null differ diff --git a/mods/ITEMS/mcl_fishing/textures/mcl_fishing_clownfish_raw.png b/mods/ITEMS/mcl_fishing/textures/mcl_fishing_clownfish_raw.png deleted file mode 100644 index 5681bd6e87..0000000000 Binary files a/mods/ITEMS/mcl_fishing/textures/mcl_fishing_clownfish_raw.png and /dev/null differ diff --git a/mods/ITEMS/mcl_fishing/textures/mcl_fishing_fish_cooked.png b/mods/ITEMS/mcl_fishing/textures/mcl_fishing_fish_cooked.png deleted file mode 100644 index 8bede675b8..0000000000 Binary files a/mods/ITEMS/mcl_fishing/textures/mcl_fishing_fish_cooked.png and /dev/null differ diff --git a/mods/ITEMS/mcl_fishing/textures/mcl_fishing_fish_raw.png b/mods/ITEMS/mcl_fishing/textures/mcl_fishing_fish_raw.png deleted file mode 100644 index eeac24b776..0000000000 Binary files a/mods/ITEMS/mcl_fishing/textures/mcl_fishing_fish_raw.png and /dev/null differ diff --git a/mods/ITEMS/mcl_fishing/textures/mcl_fishing_fishing_rod.png b/mods/ITEMS/mcl_fishing/textures/mcl_fishing_fishing_rod.png deleted file mode 100644 index 2fbcc73445..0000000000 Binary files a/mods/ITEMS/mcl_fishing/textures/mcl_fishing_fishing_rod.png and /dev/null differ diff --git a/mods/ITEMS/mcl_fishing/textures/mcl_fishing_pufferfish_raw.png b/mods/ITEMS/mcl_fishing/textures/mcl_fishing_pufferfish_raw.png deleted file mode 100644 index 1d6b7aa7ae..0000000000 Binary files a/mods/ITEMS/mcl_fishing/textures/mcl_fishing_pufferfish_raw.png and /dev/null differ diff --git a/mods/ITEMS/mcl_fishing/textures/mcl_fishing_salmon_cooked.png b/mods/ITEMS/mcl_fishing/textures/mcl_fishing_salmon_cooked.png deleted file mode 100644 index 08d64a2595..0000000000 Binary files a/mods/ITEMS/mcl_fishing/textures/mcl_fishing_salmon_cooked.png and /dev/null differ diff --git a/mods/ITEMS/mcl_fishing/textures/mcl_fishing_salmon_raw.png b/mods/ITEMS/mcl_fishing/textures/mcl_fishing_salmon_raw.png deleted file mode 100644 index 4c9cb771cf..0000000000 Binary files a/mods/ITEMS/mcl_fishing/textures/mcl_fishing_salmon_raw.png and /dev/null differ diff --git a/mods/ITEMS/mcl_heads/init.lua b/mods/ITEMS/mcl_heads/init.lua deleted file mode 100644 index c140793934..0000000000 --- a/mods/ITEMS/mcl_heads/init.lua +++ /dev/null @@ -1,166 +0,0 @@ -local S = minetest.get_translator(minetest.get_current_modname()) - -local mod_doc = minetest.get_modpath("doc") -local mod_screwdriver = minetest.get_modpath("screwdriver") - -local equip_armor -if minetest.get_modpath("mcl_armor") then - equip_armor = mcl_armor.equip_on_use -end - --- Heads system - -local function addhead(name, texture, desc, longdesc, rangemob, rangefactor) - local on_rotate_floor, on_rotate_wall - if mod_screwdriver then - on_rotate_floor = function(pos, node, user, mode, new_param2) - if mode == screwdriver.ROTATE_AXIS then - node.name = node.name .. "_wall" - node.param2 = minetest.dir_to_wallmounted(minetest.facedir_to_dir(node.param2)) - minetest.set_node(pos, node) - return true - end - end - on_rotate_wall = function(pos, node, user, mode, new_param2) - if mode == screwdriver.ROTATE_AXIS then - node.name = string.sub(node.name, 1, string.len(node.name)-5) - node.param2 = minetest.dir_to_facedir(minetest.wallmounted_to_dir(node.param2)) - minetest.set_node(pos, node) - return true - end - end - end - - minetest.register_node("mcl_heads:"..name, { - description = desc, - _doc_items_longdesc = longdesc, - drawtype = "nodebox", - is_ground_content = false, - node_box = { - type = "fixed", - fixed = { - { -0.25, -0.5, -0.25, 0.25, 0.0, 0.25, }, - }, - }, - groups = {handy = 1, armor = 1, armor_head = 1, non_combat_armor = 1, non_combat_armor_head = 1, head = 1, deco_block = 1, dig_by_piston = 1}, - -- The head textures are based off the textures of an actual mob. - tiles = { - -- Note: bottom texture is overlaid over top texture to get rid of possible transparency. - -- This is required for skeleton skull and wither skeleton skull. - "[combine:16x16:-4,4="..texture, -- top - "([combine:16x16:-4,4="..texture..")^([combine:16x16:-12,4="..texture..")", -- bottom - "[combine:16x16:-12,0="..texture, -- left - "[combine:16x16:4,0="..texture, -- right - "[combine:16x16:-20,0="..texture, -- back - "[combine:16x16:-4,0="..texture, -- front - }, - use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "opaque" or false, - paramtype = "light", - stack_max = 64, - paramtype2 = "facedir", - sunlight_propagates = true, - walkable = true, - selection_box = { - type = "fixed", - fixed = { -0.25, -0.5, -0.25, 0.25, 0.0, 0.25, }, - }, - sounds = mcl_sounds.node_sound_defaults({ - footstep = {name="default_hard_footstep", gain=0.3} - }), - on_place = function(itemstack, placer, pointed_thing) - if pointed_thing.type ~= "node" then - -- no interaction possible with entities, for now. - return itemstack - end - - local under = pointed_thing.under - local node = minetest.get_node(under) - local def = minetest.registered_nodes[node.name] - if not def then return itemstack end - - -- Call on_rightclick if the pointed node defines it - if placer and not placer:get_player_control().sneak then - if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].on_rightclick then - return minetest.registered_nodes[node.name].on_rightclick(under, node, placer, itemstack) or itemstack - end - end - - local above = pointed_thing.above - local diff = {x = under.x - above.x, y = under.y - above.y, z = under.z - above.z} - local wdir = minetest.dir_to_wallmounted(diff) - - local itemstring = itemstack:get_name() - local fakestack = ItemStack(itemstack) - --local idef = fakestack:get_definition() - local retval - if wdir == 0 or wdir == 1 then - return minetest.item_place(itemstack, placer, pointed_thing) - else - retval = fakestack:set_name("mcl_heads:"..name.."_wall") - end - if not retval then - return itemstack - end - itemstack = minetest.item_place(fakestack, placer, pointed_thing, wdir) - itemstack:set_name(itemstring) - return itemstack - end, - on_secondary_use = equip_armor, - - on_rotate = on_rotate_floor, - - _mcl_armor_mob_range_mob = rangemob, - _mcl_armor_mob_range_factor = rangefactor, - _mcl_armor_element = "head", - _mcl_armor_texture = "mcl_heads_" .. name .. ".png", - _mcl_blast_resistance = 1, - _mcl_hardness = 1, - }) - - minetest.register_node("mcl_heads:"..name.."_wall", { - _doc_items_create_entry = false, - drawtype = "nodebox", - is_ground_content = false, - node_box = { - type = "wallmounted", - wall_bottom = { -0.25, -0.5, -0.25, 0.25, 0.0, 0.25, }, - wall_top = { -0.25, 0.0, -0.25, 0.25, 0.5, 0.25, }, - wall_side = { -0.5, -0.25, -0.25, 0.0, 0.25, 0.25, }, - }, - groups = {handy=1, head=1, deco_block=1, dig_by_piston=1, not_in_creative_inventory=1}, - -- The head textures are based off the textures of an actual mob. - tiles = { - { name = "[combine:16x16:-4,-4="..texture, align_style = "world" }, -- front - { name = "[combine:16x16:-20,-4="..texture, align_style = "world" }, -- back - { name = "[combine:16x16:-8,-4="..texture, align_style = "world" }, -- left - { name = "[combine:16x16:0,-4="..texture, align_style = "world" }, -- right - { name = "([combine:16x16:-4,0="..texture..")^[transformR180", align_style = "node" }, -- top - { name = "([combine:16x16:-4,8="..texture..")^([combine:16x16:-12,8="..texture..")", align_style = "node" }, -- bottom - }, - use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "opaque" or false, - paramtype = "light", - stack_max = 64, - paramtype2 = "wallmounted", - sunlight_propagates = true, - walkable = true, - sounds = mcl_sounds.node_sound_defaults({ - footstep = {name="default_hard_footstep", gain=0.3} - }), - drop = "mcl_heads:"..name, - on_rotate = on_rotate_wall, - _mcl_blast_resistance = 1, - _mcl_hardness = 1, - }) - - if mod_doc then - doc.add_entry_alias("nodes", "mcl_heads:" .. name, "nodes", "mcl_heads:" .. name .. "_wall") - end -end - --- Add heads -addhead("zombie", "mcl_heads_zombie_node.png", S("Zombie Head"), S("A zombie head is a small decorative block which resembles the head of a zombie. It can also be worn as a helmet, which reduces the detection range of zombies by 50%."), "mobs_mc:zombie", 0.5) -addhead("creeper", "mcl_heads_creeper_node.png", S("Creeper Head"), S("A creeper head is a small decorative block which resembles the head of a creeper. It can also be worn as a helmet, which reduces the detection range of creepers by 50%."), "mobs_mc:creeper", 0.5) --- Original Minecraft name: “Head” -addhead("steve", "mcl_heads_steve_node.png", S("Human Head"), S("A human head is a small decorative block which resembles the head of a human (i.e. a player character). It can also be worn as a helmet for fun, but does not offer any protection.")) -addhead("skeleton", "mcl_heads_skeleton_node.png", S("Skeleton Skull"), S("A skeleton skull is a small decorative block which resembles the skull of a skeleton. It can also be worn as a helmet, which reduces the detection range of skeletons by 50%."), "mobs_mc:skeleton", 0.5) -addhead("wither_skeleton", "mcl_heads_wither_skeleton_node.png", S("Wither Skeleton Skull"), S("A wither skeleton skull is a small decorative block which resembles the skull of a wither skeleton. It can also be worn as a helmet for fun, but does not offer any protection.")) diff --git a/mods/ITEMS/mcl_heads/locale/mcl_heads.de.tr b/mods/ITEMS/mcl_heads/locale/mcl_heads.de.tr deleted file mode 100644 index 75e92aef9b..0000000000 --- a/mods/ITEMS/mcl_heads/locale/mcl_heads.de.tr +++ /dev/null @@ -1,11 +0,0 @@ -# textdomain: mcl_heads -Zombie Head=Zombiekopf -A zombie head is a small decorative block which resembles the head of a zombie. It can also be worn as a helmet, which reduces the detection range of zombies by 50%.=Ein Zombiekopf ist ein kleiner dekorativer Block, der so wie ein Kopf eines Zombies aussieht. Er kann auch als Helm getragen werden, was den Erkennungsradius von Zombies um 50% verringert. -Creeper Head=Creeper-Kopf -A creeper head is a small decorative block which resembles the head of a creeper. It can also be worn as a helmet, which reduces the detection range of creepers by 50%.=Ein Creeperkopf ist ein kleiner dekorativer Block, der so wie ein Kopf eines Creepers aussieht. Er kann auch als Helm getragen werden, was den Erkennungsradius von Creepern um 50% verringert. -Human Head=Menschenkopf -A human head is a small decorative block which resembles the head of a human (i.e. a player character). It can also be worn as a helmet for fun, but does not offer any protection.=Ein Menschenkopf ist ein kleiner dekorativer Block, der so wie der Kopf eines Menschen (das heißt, einer Spielerfigur) aussieht. Er kann auch als Helm zum Spaß getragen werden, aber er bietet keinerlei Schutz. -Skeleton Skull=Skelettschädel -A skeleton skull is a small decorative block which resembles the skull of a skeleton. It can also be worn as a helmet, which reduces the detection range of skeletons by 50%.=Ein Skelettschädel ist ein kleiner dekorativer Block, der so wie ein Schädel eines Skeletts aussieht. Er kann auch als Helm getragen werden, was den Erkennungsradius von Skeletten um 50% verringert. -Wither Skeleton Skull=Witherskelettschädel -A wither skeleton skull is a small decorative block which resembles the skull of a wither skeleton. It can also be worn as a helmet for fun, but does not offer any protection.=Ein Witherskelettschädel ist ein kleiner dekorativer Block, der so wie ein Schädel eines Witherskeletts aussieht. Er kann auch als Helm zum Spaß getragen werden, aber er bietet keinerlei Schutz. diff --git a/mods/ITEMS/mcl_heads/locale/mcl_heads.es.tr b/mods/ITEMS/mcl_heads/locale/mcl_heads.es.tr deleted file mode 100644 index 308dd8b287..0000000000 --- a/mods/ITEMS/mcl_heads/locale/mcl_heads.es.tr +++ /dev/null @@ -1,11 +0,0 @@ -# textdomain: mcl_heads -Zombie Head=Cabeza de zombie -A zombie head is a small decorative block which resembles the head of a zombie. It can also be worn as a helmet for fun, but does not offer any protection.=Una cabeza de zombie es un pequeño bloque decorativo que se asemeja a la cabeza de un zombie. También se puede usar como casco por diversión, pero no ofrece ninguna protección. -Creeper Head=Cabeza de creeper -A creeper head is a small decorative block which resembles the head of a creeper. It can also be worn as a helmet for fun, but does not offer any protection.=Una cabeza de creeper es un pequeño bloque decorativo que se asemeja a la cabeza de un creeper. También se puede usar como casco por diversión, pero no ofrece ninguna protección. -Human Head=Cabeza humana -A human head is a small decorative block which resembles the head of a human (i.e. a player character). It can also be worn as a helmet for fun, but does not offer any protection.=Una cabeza humana es un pequeño bloque decorativo que se asemeja a la cabeza de un humano (es decir, un personaje jugador). También se puede usar como casco por diversión, pero no ofrece ninguna protección. -Skeleton Skull=Calavera de esqueleto -A skeleton skull is a small decorative block which resembles the skull of a skeleton. It can also be worn as a helmet for fun, but does not offer any protection.=Una cabeza de esqueleto es un pequeño bloque decorativo que se asemeja al cráneo de un esqueleto. También se puede usar como casco por diversión, pero no ofrece ninguna protección. -Wither Skeleton Skull=Calavera de esqueleto Wither -A wither skeleton skull is a small decorative block which resembles the skull of a wither skeleton. It can also be worn as a helmet for fun, but does not offer any protection.=Una cabeza de esqueleto marchito es un pequeño bloque decorativo que se asemeja al cráneo de un esqueleto marchito. También se puede usar como casco por diversión, pero no ofrece ninguna protección. diff --git a/mods/ITEMS/mcl_heads/locale/mcl_heads.fr.tr b/mods/ITEMS/mcl_heads/locale/mcl_heads.fr.tr deleted file mode 100644 index 56436f5191..0000000000 --- a/mods/ITEMS/mcl_heads/locale/mcl_heads.fr.tr +++ /dev/null @@ -1,11 +0,0 @@ -# textdomain: mcl_heads -Zombie Head=Tête de Zombie -A zombie head is a small decorative block which resembles the head of a zombie. It can also be worn as a helmet, which reduces the detection range of zombies by 50%.=Une tête de zombie est un petit bloc décoratif qui ressemble à la tête d'un zombie. Il peut également être porté comme un casque, ce qui réduit la plage de détection des zombies de 50%. -Creeper Head=Tête de Creeper -A creeper head is a small decorative block which resembles the head of a creeper. It can also be worn as a helmet, which reduces the detection range of creepers by 50%.=Une tête de creepers est un petit bloc décoratif qui ressemble à la tête d'un creeper. Il peut également être porté comme un casque, ce qui réduit la plage de détection des creepers de 50%. -Human Head=Tête de Joueur -A human head is a small decorative block which resembles the head of a human (i.e. a player character). It can also be worn as a helmet for fun, but does not offer any protection.=Une tête de joueur est un petit bloc décoratif qui ressemble à la tête d'un humain (c'est-à-dire un personnage de joueur). Il peut également être porté comme un casque pour le plaisir, mais n'offre aucune protection. -Skeleton Skull=Crâne de Squelette -A skeleton skull is a small decorative block which resembles the skull of a skeleton. It can also be worn as a helmet, which reduces the detection range of skeletons by 50%.=Un crâne squelette est un petit bloc décoratif qui ressemble au crâne d'un squelette. Il peut également être porté comme un casque, ce qui réduit la plage de détection des squelettes de 50%. -Wither Skeleton Skull=Crâne de Squelette Wither -A wither skeleton skull is a small decorative block which resembles the skull of a wither skeleton. It can also be worn as a helmet for fun, but does not offer any protection.=Un crâne squelette wither est un petit bloc décoratif qui ressemble au crâne d'un squelette wither. Il peut également être porté comme un casque pour le plaisir, mais n'offre aucune protection. diff --git a/mods/ITEMS/mcl_heads/locale/mcl_heads.pl.tr b/mods/ITEMS/mcl_heads/locale/mcl_heads.pl.tr deleted file mode 100644 index 4ed4bbbeeb..0000000000 --- a/mods/ITEMS/mcl_heads/locale/mcl_heads.pl.tr +++ /dev/null @@ -1,11 +0,0 @@ -# textdomain: mcl_heads -Zombie Head=Głowa zombie -A zombie head is a small decorative block which resembles the head of a zombie. It can also be worn as a helmet, which reduces the detection range of zombies by 50%.=Głowa zombie jest małym blokiem dekoracyjnym i przypomina głowę zombie. Może być noszona jako hełm co zmniejsza obszar wykrycia przez zombie o 50%. -Creeper Head=Głowa creepera -A creeper head is a small decorative block which resembles the head of a creeper. It can also be worn as a helmet, which reduces the detection range of creepers by 50%.=Głowa creepera jest małym blokiem dekoracyjnym i przypomina głowę creepera. Może być noszona jako hełm co zmniejsza obszar wykrycia przez creepera o 50%. -Human Head=Głowa człowieka -A human head is a small decorative block which resembles the head of a human (i.e. a player character). It can also be worn as a helmet for fun, but does not offer any protection.=Głowa człowieka jest małym blokiem dekoracyjnym i przypomina głowę człowieka. Może być noszona jako hełm dla zabawy, ale nie zapewnia żadnej dodatkowej ochrony. -Skeleton Skull=Głowa szkieleta -A skeleton skull is a small decorative block which resembles the skull of a skeleton. It can also be worn as a helmet, which reduces the detection range of skeletons by 50%.=Głowa szkieleta jest małym blokiem dekoracyjnym i przypomina głowę szkieleta. Może być noszona jako hełm co zmniejsza obszar wykrycia przez szkielety o 50%. -Wither Skeleton Skull=Głowa witherowego szkieleta -A wither skeleton skull is a small decorative block which resembles the skull of a wither skeleton. It can also be worn as a helmet for fun, but does not offer any protection.=Głowa witherowego szkieleta jest małym blokiem dekoracyjnym i przypomina głowę witherowego szkieleta. Może być noszona jako hełm dla zabawy, ale nie zapewnia żadnej dodatkowej ochrony. diff --git a/mods/ITEMS/mcl_heads/locale/mcl_heads.ru.tr b/mods/ITEMS/mcl_heads/locale/mcl_heads.ru.tr deleted file mode 100644 index 28f2de4ffc..0000000000 --- a/mods/ITEMS/mcl_heads/locale/mcl_heads.ru.tr +++ /dev/null @@ -1,11 +0,0 @@ -# textdomain: mcl_heads -Zombie Head=Голова зомби -A zombie head is a small decorative block which resembles the head of a zombie. It can also be worn as a helmet, which reduces the detection range of zombies by 50%.=Голова зомби это небольшой декоративный блок, немного похожий на голову зомби. Его можно носить в качестве шлема, что уменьшит радиус обнаружения вас зомби на 50%. -Creeper Head=Голова крипера -A creeper head is a small decorative block which resembles the head of a creeper. It can also be worn as a helmet, which reduces the detection range of creepers by 50%.=Голова крипера это небольшой декоративный блок, немного похожий на голову крипера. Его можно носить в качестве шлема, что уменьшит радиус обнаружения вас крипером на 50%. -Human Head=Голова человека -A human head is a small decorative block which resembles the head of a human (i.e. a player character). It can also be worn as a helmet for fun, but does not offer any protection.=Голова человека это небольшой декоративный блок, немного похожий на голову человека (например, игрового персонажа). Его можно носить в качестве шлема просто для смеха, он не даёт никакой защиты. -Skeleton Skull=Череп скелета -A skeleton skull is a small decorative block which resembles the skull of a skeleton. It can also be worn as a helmet, which reduces the detection range of skeletons by 50%.=Череп скелета это небольшой декоративный блок, немного похожий на череп скелета. Его можно носить в качестве шлема, что уменьшит радиус обнаружения вас скелетом на 50%. -Wither Skeleton Skull=Череп скелета-иссушителя -A wither skeleton skull is a small decorative block which resembles the skull of a wither skeleton. It can also be worn as a helmet for fun, but does not offer any protection.=Череп скелета-иссушителя это небольшой декоративный блок, немного похожий на череп скелета-иссушителя. Его можно носить в качестве шлема просто для смеха, он не даёт никакой защиты. diff --git a/mods/ITEMS/mcl_heads/locale/mcl_heads.zh_TW.tr b/mods/ITEMS/mcl_heads/locale/mcl_heads.zh_TW.tr deleted file mode 100644 index 3164d3831c..0000000000 --- a/mods/ITEMS/mcl_heads/locale/mcl_heads.zh_TW.tr +++ /dev/null @@ -1,11 +0,0 @@ -# textdomain: mcl_heads -Zombie Head=殭屍頭 -A zombie head is a small decorative block which resembles the head of a zombie. It can also be worn as a helmet, which reduces the detection range of zombies by 50%.=殭屍頭是一個小的裝飾方塊,類似於殭屍的頭。它也可以作為頭盔佩戴,可以使殭屍的探測範圍減少50%。 -Creeper Head=苦力怕頭 -A creeper head is a small decorative block which resembles the head of a creeper. It can also be worn as a helmet, which reduces the detection range of creepers by 50%.=苦力怕頭是一個小的裝飾方塊,類似於苦力怕的頭。它也可以作為頭盔佩戴,可以使苦力怕的探測範圍減少50%。 -Human Head=玩家頭 -A human head is a small decorative block which resembles the head of a human (i.e. a player character). It can also be worn as a helmet for fun, but does not offer any protection.=玩家頭是一個小的裝飾塊,類似於玩家的頭部。它也可以作為頭盔戴著玩,但不提供任何保護。 -Skeleton Skull=骷髏頭 -A skeleton skull is a small decorative block which resembles the skull of a skeleton. It can also be worn as a helmet, which reduces the detection range of skeletons by 50%.=骷髏頭是一個小的裝飾方塊,類似於骷髏的頭。它也可以作為頭盔佩戴,可以使骷髏的探測範圍減少50%。 -Wither Skeleton Skull=凋零骷髏頭 -A wither skeleton skull is a small decorative block which resembles the skull of a wither skeleton. It can also be worn as a helmet for fun, but does not offer any protection.=凋零骷髏頭是一個小的裝飾塊,類似於凋零骷髏的頭部。它也可以作為頭盔戴著玩,但不提供任何保護。 diff --git a/mods/ITEMS/mcl_heads/locale/template.txt b/mods/ITEMS/mcl_heads/locale/template.txt deleted file mode 100644 index 59321099aa..0000000000 --- a/mods/ITEMS/mcl_heads/locale/template.txt +++ /dev/null @@ -1,11 +0,0 @@ -# textdomain: mcl_heads -Zombie Head= -A zombie head is a small decorative block which resembles the head of a zombie. It can also be worn as a helmet, which reduces the detection range of zombies by 50%.= -Creeper Head= -A creeper head is a small decorative block which resembles the head of a creeper. It can also be worn as a helmet, which reduces the detection range of creepers by 50%.= -Human Head= -A human head is a small decorative block which resembles the head of a human (i.e. a player character). It can also be worn as a helmet for fun, but does not offer any protection.= -Skeleton Skull= -A skeleton skull is a small decorative block which resembles the skull of a skeleton. It can also be worn as a helmet, which reduces the detection range of skeletons by 50%.= -Wither Skeleton Skull= -A wither skeleton skull is a small decorative block which resembles the skull of a wither skeleton. It can also be worn as a helmet for fun, but does not offer any protection.= diff --git a/mods/ITEMS/mcl_heads/mod.conf b/mods/ITEMS/mcl_heads/mod.conf deleted file mode 100644 index e2fe34f638..0000000000 --- a/mods/ITEMS/mcl_heads/mod.conf +++ /dev/null @@ -1,4 +0,0 @@ -name = mcl_heads -description = Small decorative head blocks. -depends = mcl_sounds -optional_depends = mcl_armor, screwdriver, doc diff --git a/mods/ITEMS/mcl_heads/textures/mcl_heads_creeper.png b/mods/ITEMS/mcl_heads/textures/mcl_heads_creeper.png deleted file mode 100644 index d277746f1e..0000000000 Binary files a/mods/ITEMS/mcl_heads/textures/mcl_heads_creeper.png and /dev/null differ diff --git a/mods/ITEMS/mcl_heads/textures/mcl_heads_creeper_node.png b/mods/ITEMS/mcl_heads/textures/mcl_heads_creeper_node.png deleted file mode 100644 index 99b432ac67..0000000000 Binary files a/mods/ITEMS/mcl_heads/textures/mcl_heads_creeper_node.png and /dev/null differ diff --git a/mods/ITEMS/mcl_heads/textures/mcl_heads_skeleton.png b/mods/ITEMS/mcl_heads/textures/mcl_heads_skeleton.png deleted file mode 100644 index 65c3c04aaf..0000000000 Binary files a/mods/ITEMS/mcl_heads/textures/mcl_heads_skeleton.png and /dev/null differ diff --git a/mods/ITEMS/mcl_heads/textures/mcl_heads_skeleton_node.png b/mods/ITEMS/mcl_heads/textures/mcl_heads_skeleton_node.png deleted file mode 100644 index 0af86cd6a5..0000000000 Binary files a/mods/ITEMS/mcl_heads/textures/mcl_heads_skeleton_node.png and /dev/null differ diff --git a/mods/ITEMS/mcl_heads/textures/mcl_heads_steve.png b/mods/ITEMS/mcl_heads/textures/mcl_heads_steve.png deleted file mode 100644 index 361795a52b..0000000000 Binary files a/mods/ITEMS/mcl_heads/textures/mcl_heads_steve.png and /dev/null differ diff --git a/mods/ITEMS/mcl_heads/textures/mcl_heads_steve_node.png b/mods/ITEMS/mcl_heads/textures/mcl_heads_steve_node.png deleted file mode 100644 index 43c1beb5ac..0000000000 Binary files a/mods/ITEMS/mcl_heads/textures/mcl_heads_steve_node.png and /dev/null differ diff --git a/mods/ITEMS/mcl_heads/textures/mcl_heads_wither_skeleton.png b/mods/ITEMS/mcl_heads/textures/mcl_heads_wither_skeleton.png deleted file mode 100644 index 2e02a81a66..0000000000 Binary files a/mods/ITEMS/mcl_heads/textures/mcl_heads_wither_skeleton.png and /dev/null differ diff --git a/mods/ITEMS/mcl_heads/textures/mcl_heads_wither_skeleton_node.png b/mods/ITEMS/mcl_heads/textures/mcl_heads_wither_skeleton_node.png deleted file mode 100644 index 671f405479..0000000000 Binary files a/mods/ITEMS/mcl_heads/textures/mcl_heads_wither_skeleton_node.png and /dev/null differ diff --git a/mods/ITEMS/mcl_heads/textures/mcl_heads_zombie.png b/mods/ITEMS/mcl_heads/textures/mcl_heads_zombie.png deleted file mode 100644 index 251f95fec0..0000000000 Binary files a/mods/ITEMS/mcl_heads/textures/mcl_heads_zombie.png and /dev/null differ diff --git a/mods/ITEMS/mcl_heads/textures/mcl_heads_zombie_node.png b/mods/ITEMS/mcl_heads/textures/mcl_heads_zombie_node.png deleted file mode 100644 index ef85701e8f..0000000000 Binary files a/mods/ITEMS/mcl_heads/textures/mcl_heads_zombie_node.png and /dev/null differ diff --git a/mods/ITEMS/mcl_mobitems/init.lua b/mods/ITEMS/mcl_mobitems/init.lua deleted file mode 100644 index 6b3c9bec40..0000000000 --- a/mods/ITEMS/mcl_mobitems/init.lua +++ /dev/null @@ -1,489 +0,0 @@ -local S = minetest.get_translator(minetest.get_current_modname()) - -minetest.register_craftitem("mcl_mobitems:rotten_flesh", { - description = S("Rotten Flesh"), - _tt_help = minetest.colorize(mcl_colors.YELLOW, S("80% chance of food poisoning")), - _doc_items_longdesc = S("Yuck! This piece of flesh clearly has seen better days. If you're really desperate, you can eat it to restore a few hunger points, but there's a 80% chance it causes food poisoning, which increases your hunger for a while."), - inventory_image = "mcl_mobitems_rotten_flesh.png", - wield_image = "mcl_mobitems_rotten_flesh.png", - on_place = minetest.item_eat(4), - on_secondary_use = minetest.item_eat(4), - groups = { food = 2, eatable = 4 }, - _mcl_saturation = 0.8, - stack_max = 64, -}) - -minetest.register_craftitem("mcl_mobitems:mutton", { - description = S("Raw Mutton"), - _doc_items_longdesc = S("Raw mutton is the flesh from a sheep and can be eaten safely. Cooking it will greatly increase its nutritional value."), - inventory_image = "mcl_mobitems_mutton_raw.png", - wield_image = "mcl_mobitems_mutton_raw.png", - on_place = minetest.item_eat(2), - on_secondary_use = minetest.item_eat(2), - groups = { food = 2, eatable = 2, smoker_cookable = 1 }, - _mcl_saturation = 1.2, - stack_max = 64, -}) - -minetest.register_craftitem("mcl_mobitems:cooked_mutton", { - description = S("Cooked Mutton"), - _doc_items_longdesc = S("Cooked mutton is the cooked flesh from a sheep and is used as food."), - inventory_image = "mcl_mobitems_mutton_cooked.png", - wield_image = "mcl_mobitems_mutton_cooked.png", - on_place = minetest.item_eat(6), - on_secondary_use = minetest.item_eat(6), - groups = { food = 2, eatable = 6 }, - _mcl_saturation = 9.6, - stack_max = 64, -}) - -minetest.register_craftitem("mcl_mobitems:beef", { - description = S("Raw Beef"), - _doc_items_longdesc = S("Raw beef is the flesh from cows and can be eaten safely. Cooking it will greatly increase its nutritional value."), - inventory_image = "mcl_mobitems_beef_raw.png", - wield_image = "mcl_mobitems_beef_raw.png", - on_place = minetest.item_eat(3), - on_secondary_use = minetest.item_eat(3), - groups = { food = 2, eatable = 3, smoker_cookable = 1 }, - _mcl_saturation = 1.8, - stack_max = 64, -}) - -minetest.register_craftitem("mcl_mobitems:cooked_beef", { - description = S("Steak"), - _doc_items_longdesc = S("Steak is cooked beef from cows and can be eaten."), - inventory_image = "mcl_mobitems_beef_cooked.png", - wield_image = "mcl_mobitems_beef_cooked.png", - on_place = minetest.item_eat(8), - on_secondary_use = minetest.item_eat(8), - groups = { food = 2, eatable = 8 }, - _mcl_saturation = 12.8, - stack_max = 64, -}) - -minetest.register_craftitem("mcl_mobitems:chicken", { - description = S("Raw Chicken"), - _tt_help = minetest.colorize(mcl_colors.YELLOW, S("30% chance of food poisoning")), - _doc_items_longdesc = S("Raw chicken is a food item which is not safe to consume. You can eat it to restore a few hunger points, but there's a 30% chance to suffer from food poisoning, which increases your hunger rate for a while. Cooking raw chicken will make it safe to eat and increases its nutritional value."), - inventory_image = "mcl_mobitems_chicken_raw.png", - wield_image = "mcl_mobitems_chicken_raw.png", - on_place = minetest.item_eat(2), - on_secondary_use = minetest.item_eat(2), - groups = { food = 2, eatable = 2, smoker_cookable = 1 }, - _mcl_saturation = 1.2, - stack_max = 64, -}) - -minetest.register_craftitem("mcl_mobitems:cooked_chicken", { - description = S("Cooked Chicken"), - _doc_items_longdesc = S("A cooked chicken is a healthy food item which can be eaten."), - inventory_image = "mcl_mobitems_chicken_cooked.png", - wield_image = "mcl_mobitems_chicken_cooked.png", - on_place = minetest.item_eat(6), - on_secondary_use = minetest.item_eat(6), - groups = { food = 2, eatable = 6 }, - _mcl_saturation = 7.2, - stack_max = 64, -}) - -minetest.register_craftitem("mcl_mobitems:porkchop", { - description = S("Raw Porkchop"), - _doc_items_longdesc = S("A raw porkchop is the flesh from a pig and can be eaten safely. Cooking it will greatly increase its nutritional value."), - inventory_image = "mcl_mobitems_porkchop_raw.png", - wield_image = "mcl_mobitems_porkchop_raw.png", - on_place = minetest.item_eat(3), - on_secondary_use = minetest.item_eat(3), - groups = { food = 2, eatable = 3, smoker_cookable = 1 }, - _mcl_saturation = 1.8, - stack_max = 64, -}) - -minetest.register_craftitem("mcl_mobitems:cooked_porkchop", { - description = S("Cooked Porkchop"), - _doc_items_longdesc = S("Cooked porkchop is the cooked flesh of a pig and is used as food."), - inventory_image = "mcl_mobitems_porkchop_cooked.png", - wield_image = "mcl_mobitems_porkchop_cooked.png", - on_place = minetest.item_eat(8), - on_secondary_use = minetest.item_eat(8), - groups = { food = 2, eatable = 8 }, - _mcl_saturation = 12.8, - stack_max = 64, -}) - -minetest.register_craftitem("mcl_mobitems:rabbit", { - description = S("Raw Rabbit"), - _doc_items_longdesc = S("Raw rabbit is a food item from a dead rabbit. It can be eaten safely. Cooking it will increase its nutritional value."), - inventory_image = "mcl_mobitems_rabbit_raw.png", - wield_image = "mcl_mobitems_rabbit_raw.png", - on_place = minetest.item_eat(3), - on_secondary_use = minetest.item_eat(3), - groups = { food = 2, eatable = 3, smoker_cookable = 1 }, - _mcl_saturation = 1.8, - stack_max = 64, -}) - -minetest.register_craftitem("mcl_mobitems:cooked_rabbit", { - description = S("Cooked Rabbit"), - _doc_items_longdesc = S("This is a food item which can be eaten."), - inventory_image = "mcl_mobitems_rabbit_cooked.png", - wield_image = "mcl_mobitems_rabbit_cooked.png", - on_place = minetest.item_eat(5), - on_secondary_use = minetest.item_eat(5), - groups = { food = 2, eatable = 5 }, - _mcl_saturation = 6.0, - stack_max = 64, -}) - --- Reset food poisoning and status effects -local function drink_milk(itemstack, player, pointed_thing) - local bucket = minetest.do_item_eat(0, "mcl_buckets:bucket_empty", itemstack, player, pointed_thing) - -- Check if we were allowed to drink this (eat delay check) - if mcl_hunger.active and (bucket:get_name() ~= "mcl_mobitems:milk_bucket" or minetest.is_creative_enabled(player:get_player_name())) then - mcl_hunger.stop_poison(player) - end - mcl_potions._reset_player_effects(player) - return bucket -end - -minetest.register_craftitem("mcl_mobitems:milk_bucket", { - description = S("Milk"), - _tt_help = minetest.colorize(mcl_colors.GREEN, S("Removes all status effects")), - _doc_items_longdesc = S("Milk is very refreshing and can be obtained by using a bucket on a cow. Drinking it will remove all status effects, but restores no hunger points."), - _doc_items_usagehelp = S("Use the placement key to drink the milk."), - inventory_image = "mcl_mobitems_bucket_milk.png", - wield_image = "mcl_mobitems_bucket_milk.png", - on_place = drink_milk, - on_secondary_use = drink_milk, - stack_max = 1, - groups = { food = 3, can_eat_when_full = 1 }, -}) - -minetest.register_craftitem("mcl_mobitems:spider_eye", { - description = S("Spider Eye"), - _tt_help = minetest.colorize(mcl_colors.YELLOW, S("Poisonous")), - _doc_items_longdesc = S("Spider eyes are used mainly in crafting. If you're really desperate, you can eat a spider eye, but it will poison you briefly."), - inventory_image = "mcl_mobitems_spider_eye.png", - wield_image = "mcl_mobitems_spider_eye.png", - on_place = minetest.item_eat(2), - on_secondary_use = minetest.item_eat(2), - groups = { food = 2, eatable = 2, brewitem = 1 }, - _mcl_saturation = 3.2, - stack_max = 64, -}) - -minetest.register_craftitem("mcl_mobitems:bone", { - description = S("Bone"), - _doc_items_longdesc = S("Bones can be used to tame wolves so they will protect you. They are also useful as a crafting ingredient."), - _doc_items_usagehelp = S("Wield the bone near wolves to attract them. Use the “Place” key on the wolf to give it a bone and tame it. You can then give commands to the tamed wolf by using the “Place” key on it."), - inventory_image = "mcl_mobitems_bone.png", - stack_max = 64, - groups = { craftitem=1 }, - _mcl_toollike_wield = true, -}) - -minetest.register_craftitem("mcl_mobitems:string",{ - description = S("String"), - _doc_items_longdesc = S("Strings are used in crafting."), - inventory_image = "mcl_mobitems_string.png", - stack_max = 64, - groups = { craftitem = 1 }, -}) - -minetest.register_craftitem("mcl_mobitems:blaze_rod", { - description = S("Blaze Rod"), - _doc_items_longdesc = S("This is a crafting component dropped from dead blazes."), - wield_image = "mcl_mobitems_blaze_rod.png", - inventory_image = "mcl_mobitems_blaze_rod.png", - groups = { craftitem = 1 }, - stack_max = 64, -}) - -minetest.register_craftitem("mcl_mobitems:blaze_powder", { - description = S("Blaze Powder"), - _doc_items_longdesc = S("This item is mainly used for crafting."), - wield_image = "mcl_mobitems_blaze_powder.png", - inventory_image = "mcl_mobitems_blaze_powder.png", - groups = { craftitem = 1, brewitem = 1 }, - stack_max = 64, -}) - -minetest.register_craftitem("mcl_mobitems:magma_cream", { - description = S("Magma Cream"), - _doc_items_longdesc = S("Magma cream is a crafting component."), - wield_image = "mcl_mobitems_magma_cream.png", - inventory_image = "mcl_mobitems_magma_cream.png", - groups = { craftitem = 1, brewitem = 1 }, - stack_max = 64, -}) - -minetest.register_craftitem("mcl_mobitems:ghast_tear", { - description = S("Ghast Tear"), - _doc_items_longdesc = S("Place this item in an item frame as decoration."), - wield_image = "mcl_mobitems_ghast_tear.png", - inventory_image = "mcl_mobitems_ghast_tear.png", - groups = { brewitem = 1 }, - stack_max = 64, -}) - -minetest.register_craftitem("mcl_mobitems:nether_star", { - description = S("Nether Star"), - _doc_items_longdesc = S("A nether star is dropped when the Wither dies. Place it in an item frame to show the world how hardcore you are! Or just as decoration."), - wield_image = "mcl_mobitems_nether_star.png", - inventory_image = "mcl_mobitems_nether_star.png", - -- TODO: Reveal item when it's useful - groups = { craftitem = 1, not_in_creative_inventory = 1 }, - stack_max = 64, -}) - -minetest.register_craftitem("mcl_mobitems:leather", { - description = S("Leather"), - _doc_items_longdesc = S("Leather is a versatile crafting component."), - wield_image = "mcl_mobitems_leather.png", - inventory_image = "mcl_mobitems_leather.png", - groups = { craftitem = 1 }, - stack_max = 64, -}) - -minetest.register_craftitem("mcl_mobitems:feather", { - description = S("Feather"), - _doc_items_longdesc = S("Feathers are used in crafting and are dropped from chickens."), - wield_image = "mcl_mobitems_feather.png", - inventory_image = "mcl_mobitems_feather.png", - groups = { craftitem = 1 }, - stack_max = 64, -}) - -minetest.register_craftitem("mcl_mobitems:rabbit_hide", { - description = S("Rabbit Hide"), - _doc_items_longdesc = S("Rabbit hide is used to create leather."), - wield_image = "mcl_mobitems_rabbit_hide.png", - inventory_image = "mcl_mobitems_rabbit_hide.png", - groups = { craftitem = 1 }, - stack_max = 64, -}) - -minetest.register_craftitem("mcl_mobitems:rabbit_foot", { - description = S("Rabbit's Foot"), - _doc_items_longdesc = S("Must be your lucky day! Place this item in an item frame for decoration."), - wield_image = "mcl_mobitems_rabbit_foot.png", - inventory_image = "mcl_mobitems_rabbit_foot.png", - groups = { brewitem = 1 }, - stack_max = 64, -}) - -minetest.register_craftitem("mcl_mobitems:saddle", { - description = S("Saddle"), - _tt_help = S("Can be placed on animals to ride them"), - _doc_items_longdesc = S("Saddles can be put on some animals in order to mount them."), - _doc_items_usagehelp = S("Use the placement key with the saddle in your hand to try to put on the saddle. Saddles fit on horses, mules, donkeys and pigs. Horses, mules and donkeys need to be tamed first, otherwise they'll reject the saddle. Saddled animals can be mounted by using the placement key on them again."), - wield_image = "mcl_mobitems_saddle.png", - inventory_image = "mcl_mobitems_saddle.png", - groups = { transport = 1 }, - stack_max = 1, -}) - -minetest.register_craftitem("mcl_mobitems:rabbit_stew", { - description = S("Rabbit Stew"), - _doc_items_longdesc = S("Rabbit stew is a very nutricious food item."), - wield_image = "mcl_mobitems_rabbit_stew.png", - inventory_image = "mcl_mobitems_rabbit_stew.png", - stack_max = 1, - on_place = minetest.item_eat(10, "mcl_core:bowl"), - on_secondary_use = minetest.item_eat(10, "mcl_core:bowl"), - groups = { food = 3, eatable = 10 }, - _mcl_saturation = 12.0, -}) - -minetest.register_craftitem("mcl_mobitems:shulker_shell", { - description = S("Shulker Shell"), - _doc_items_longdesc = S("Shulker shells are used in crafting. They are dropped from dead shulkers."), - inventory_image = "mcl_mobitems_shulker_shell.png", - groups = { craftitem = 1 }, -}) - -minetest.register_craftitem("mcl_mobitems:slimeball", { - description = S("Slimeball"), - _doc_items_longdesc = S("Slimeballs are used in crafting. They are dropped from slimes."), - inventory_image = "mcl_mobitems_slimeball.png", - groups = { craftitem = 1 }, -}) - -minetest.register_craftitem("mcl_mobitems:gunpowder", { - description = S("Gunpowder"), - _doc_items_longdesc = doc.sub.items.temp.craftitem, - inventory_image = "default_gunpowder.png", - stack_max = 64, - groups = { craftitem=1, brewitem = 1 }, -}) - -minetest.register_tool("mcl_mobitems:carrot_on_a_stick", { - description = S("Carrot on a Stick"), - _tt_help = S("Lets you ride a saddled pig"), - _doc_items_longdesc = S("A carrot on a stick can be used on saddled pigs to ride them."), - _doc_items_usagehelp = S("Place it on a saddled pig to mount it. You can now ride the pig like a horse. Pigs will also walk towards you when you just wield the carrot on a stick."), - wield_image = "mcl_mobitems_carrot_on_a_stick.png", - inventory_image = "mcl_mobitems_carrot_on_a_stick.png", - groups = { transport = 1 }, - _mcl_toollike_wield = true, -}) - -local horse_armor_use = S("Place it on a horse to put on the horse armor. Donkeys and mules can't wear horse armor.") - -minetest.register_craftitem("mcl_mobitems:iron_horse_armor", { - description = S("Iron Horse Armor"), - _doc_items_longdesc = S("Iron horse armor can be worn by horses to increase their protection from harm a bit."), - _doc_items_usagehelp = horse_armor_use, - inventory_image = "mcl_mobitems_iron_horse_armor.png", - _horse_overlay_image = "mcl_mobitems_horse_armor_iron.png", - sounds = { - _mcl_armor_equip = "mcl_armor_equip_iron", - }, - stack_max = 1, - groups = { horse_armor = 85 }, -}) - -minetest.register_craftitem("mcl_mobitems:gold_horse_armor", { - description = S("Golden Horse Armor"), - _doc_items_longdesc = S("Golden horse armor can be worn by horses to increase their protection from harm."), - _doc_items_usagehelp = horse_armor_use, - inventory_image = "mcl_mobitems_gold_horse_armor.png", - _horse_overlay_image = "mcl_mobitems_horse_armor_gold.png", - sounds = { - _mcl_armor_equip = "mcl_armor_equip_iron", - }, - stack_max = 1, - groups = { horse_armor = 60 }, -}) - -minetest.register_craftitem("mcl_mobitems:diamond_horse_armor", { - description = S("Diamond Horse Armor"), - _doc_items_longdesc = S("Diamond horse armor can be worn by horses to greatly increase their protection from harm."), - _doc_items_usagehelp = horse_armor_use, - inventory_image = "mcl_mobitems_diamond_horse_armor.png", - _horse_overlay_image = "mcl_mobitems_horse_armor_diamond.png", - sounds = { - _mcl_armor_equip = "mcl_armor_equip_diamond", - }, - stack_max = 1, - groups = { horse_armor = 45 }, -}) - -minetest.register_alias("mobs_mc:iron_horse_armor", "mcl_mobitems:iron_horse_armor") -minetest.register_alias("mobs_mc:gold_horse_armor", "mcl_mobitems:gold_horse_armor") -minetest.register_alias("mobs_mc:diamond_horse_armor", "mcl_mobitems:diamond_horse_armor") - ------------ --- Crafting ------------ - -minetest.register_craft({ - output = "mcl_mobitems:leather", - recipe = { - { "mcl_mobitems:rabbit_hide", "mcl_mobitems:rabbit_hide" }, - { "mcl_mobitems:rabbit_hide", "mcl_mobitems:rabbit_hide" }, - } -}) - -minetest.register_craft({ - output = "mcl_mobitems:blaze_powder 2", - recipe = {{"mcl_mobitems:blaze_rod"}}, -}) - -minetest.register_craft({ - output = "mcl_mobitems:rabbit_stew", - recipe = { - { "", "mcl_mobitems:cooked_rabbit", "", }, - { "group:mushroom", "mcl_farming:potato_item_baked", "mcl_farming:carrot_item", }, - { "", "mcl_core:bowl", "", }, - }, -}) - -minetest.register_craft({ - output = "mcl_mobitems:rabbit_stew", - recipe = { - { "", "mcl_mobitems:cooked_rabbit", "", }, - { "mcl_farming:carrot_item", "mcl_farming:potato_item_baked", "group:mushroom", }, - { "", "mcl_core:bowl", "", }, - }, -}) - -minetest.register_craft({ - output = "mcl_mobitems:carrot_on_a_stick", - recipe = { - { "mcl_fishing:fishing_rod", "", }, - { "", "mcl_farming:carrot_item" }, - }, -}) - -minetest.register_craft({ - output = "mcl_mobitems:carrot_on_a_stick", - recipe = { - { "", "mcl_fishing:fishing_rod", }, - { "mcl_farming:carrot_item", "" }, - }, -}) - -minetest.register_craft({ - type = "shapeless", - output = "mcl_mobitems:magma_cream", - recipe = {"mcl_mobitems:blaze_powder", "mcl_mobitems:slimeball"}, -}) - -minetest.register_craft({ - type = "cooking", - output = "mcl_mobitems:cooked_mutton", - recipe = "mcl_mobitems:mutton", - cooktime = 10, -}) - -minetest.register_craft({ - type = "cooking", - output = "mcl_mobitems:cooked_rabbit", - recipe = "mcl_mobitems:rabbit", - cooktime = 10, -}) - -minetest.register_craft({ - type = "cooking", - output = "mcl_mobitems:cooked_chicken", - recipe = "mcl_mobitems:chicken", - cooktime = 10, -}) - -minetest.register_craft({ - type = "cooking", - output = "mcl_mobitems:cooked_beef", - recipe = "mcl_mobitems:beef", - cooktime = 10, -}) - -minetest.register_craft({ - type = "cooking", - output = "mcl_mobitems:cooked_porkchop", - recipe = "mcl_mobitems:porkchop", - cooktime = 10, -}) - -minetest.register_craft({ - type = "fuel", - recipe = "mcl_mobitems:blaze_rod", - burntime = 120, -}) - -minetest.register_craft({ - output = "mcl_mobitems:slimeball 9", - recipe = {{"mcl_core:slimeblock"}}, -}) - -minetest.register_craft({ - output = "mcl_core:slimeblock", - recipe = {{"mcl_mobitems:slimeball","mcl_mobitems:slimeball","mcl_mobitems:slimeball",}, - {"mcl_mobitems:slimeball","mcl_mobitems:slimeball","mcl_mobitems:slimeball",}, - {"mcl_mobitems:slimeball","mcl_mobitems:slimeball","mcl_mobitems:slimeball",}}, -}) - -minetest.register_on_item_eat(function (hp_change, replace_with_item, itemstack, user, pointed_thing) -- poisoning with spider eye - if itemstack:get_name() == "mcl_mobitems:spider_eye" then - mcl_potions.poison_func(user, 1, 4) - end -end) diff --git a/mods/ITEMS/mcl_mobitems/locale/mcl_mobitems.de.tr b/mods/ITEMS/mcl_mobitems/locale/mcl_mobitems.de.tr deleted file mode 100644 index f9a0aaf507..0000000000 --- a/mods/ITEMS/mcl_mobitems/locale/mcl_mobitems.de.tr +++ /dev/null @@ -1,102 +0,0 @@ -# textdomain: mcl_mobitems -Rotten Flesh=Gammelfleisch -80% chance of food poisoning=80% Wahrscheinlichkeit von Lebensmittelvergiftung - -Yuck! This piece of flesh clearly has seen better days. If you're really desperate, you can eat it to restore a few hunger points, but there's a 80% chance it causes food poisoning, which increases your hunger for a while.=Igitt! Dieses Stück Fleisch hat wohl bessere Tage gesehen. Wenn Sie es essen, werden Sie sofort vergiftet und erleiden einen Schaden von 4 Trefferpunkten. Aber gezähmte Wölfe können es problemlos fressen. - -Raw Mutton=Rohes Hammelfleisch - -Raw mutton is the flesh from a sheep and can be eaten safely. Cooking it will greatly increase its nutritional value.=Rohes Hammelfleisch ist das Fleisch eines Schafes und ein Lebensmittel, welches bedenkenlos verzehrt werden kann. Es kann gebraten werden, um seinen Nährwert deutlich zu erhöhen. - -Cooked Mutton=Gebratenes Hammelfleisch -Cooked mutton is the cooked flesh from a sheep and is used as food.=Gebratenes Hammelfleisch ist das gebratene Fleisch eines Schafs und dient als Lebensmittel. -Raw Beef=Rohes Rindfleisch - -Raw beef is the flesh from cows and can be eaten safely. Cooking it will greatly increase its nutritional value.=Rohes Rindfleisch ist das Fleisch von Kühen und kann problemlos gegessen werden. Es kann gegart werden, um den Nährwert deutlich zu erhöhen. - -Steak=Steak -Steak is cooked beef from cows and can be eaten.=Steak ist gebratenes Rindfleisch und kann gegessen werden. -Raw Chicken=Rohes Hühnchen -30% chance of food poisoning=30% Wahrscheinlichkeit von Lebensmittelvergiftung - -Raw chicken is a food item which is not safe to consume. You can eat it to restore a few hunger points, but there's a 30% chance to suffer from food poisoning, which increases your hunger rate for a while. Cooking raw chicken will make it safe to eat and increases its nutritional value.=Rohes Hühnchen ist ein Lebensmittel, das nicht sicher für den Verzehr ist. Sie können es essen, um ein paar Hungerpunkte zu erhalten, aber mit einer Wahrscheinlichkeit von 30% erleiden Sie eine Lebensmittelvergiftung, die Ihre Hungerrate für eine Weile erhöht. Braten Sie ein rohes Hühnchen, um es sicher zuzubereiten und den Nährwert zu erhöhen. - -Cooked Chicken=Gebratenes Hühnchen -A cooked chicken is a healthy food item which can be eaten.=Ein gebratenes Hühnchen ist ein gesundes essbares Lebensmittel. -Raw Porkchop=Rohes Schweinefleisch - -A raw porkchop is the flesh from a pig and can be eaten safely. Cooking it will greatly increase its nutritional value.=Ein rohes Stück Schweinefleisch kann bedenkenlos gegessen werden. Man kann es braten, um seinen Nährwert stark zu erhöhen. - -Cooked Porkchop=Gebratenes Schweinefleisch -Cooked porkchop is the cooked flesh of a pig and is used as food.=Ein gebratenes Stück Schweinefleisch ist ein gutes Lebensmittel. -Raw Rabbit=Rohes Kaninchen - -Raw rabbit is a food item from a dead rabbit. It can be eaten safely. Cooking it will increase its nutritional value.=Rohes Kaninchenfleisch ist ein Lebensmittel, welches bedenkenlos verzehrt werden kann. Es kann gebraten werden, um seinen Nährwert zu erhöhen. - -Cooked Rabbit=Gebratenes Kaninchen -This is a food item which can be eaten.=Dies ist ein essbares Lebensmittel. -Milk=Milch -Removes all status effects=Entfernt alle Statuseffekte - -Milk is very refreshing and can be obtained by using a bucket on a cow. Drinking it will remove all status effects, but restores no hunger points.=Milch ist sehr erfrischend. Milch erhält man, indem man einen Eimer an einer Kuh benutzt. Wenn die Milch getrunken wird, werden alle Statuseffekte entfernt, aber es werden keine Hungerpunkte wiederhergestellt. - -Use the placement key to drink the milk.=Platzierungstaste benutzen, um Milch zu trinken. -Spider Eye=Spinnenauge -Poisonous=Giftig - -Spider eyes are used mainly in crafting. If you're really desperate, you can eat a spider eye, but it will poison you briefly.=Spinnenaugen werden hauptsächlich in der Fertigung benutzt. Wenn Sie wirklich verzweifelt sind, können sie es essen, aber das wird Sie kurz vergiften. - -Bone=Knochen - -Bones can be used to tame wolves so they will protect you. They are also useful as a crafting ingredient.=Knochen können benutzt werden, um Wölfe zu zähmen, damit sie einen beschützen. Sie außerdem nützlich in der Fertigung. - -Wield the bone near wolves to attract them. Use the “Place” key on the wolf to give it a bone and tame it. You can then give commands to the tamed wolf by using the “Place” key on it.=Halten Sie den Knochen in der Nähe von Wölfen, um sie anzulocken. Benutzen Sie die „Platzieren“-Taste auf dem Wolf, um ihm den Knochen zu geben und ihn zu zähmen. Sie können dem gezähmten Wolf Befehle erteilen, indem Sie die „Platzieren“-Taste auf ihm benutzen. - -String=Faden -Strings are used in crafting.=Fäden sind nützlich in der Fertigung. -Blaze Rod=Lohenrute -This is a crafting component dropped from dead blazes.=Dies ist eine Fertigungskomponente, die von toten Lohen abgeworfen wird. -Blaze Powder=Lohenstaub -This item is mainly used for crafting.=Dieser Gegenstand wird hauptsächlich in der Fertigung benutzt. -Magma Cream=Magmacreme -Magma cream is a crafting component.=Magmacreme ist eine Fertigungskomponente. -Ghast Tear=Ghast-Träne -Place this item in an item frame as decoration.=Platzieren Sie diesen Gegenstand in einem Rahmen als Deko. -Nether Star=Nether-Stern - -A nether star is dropped when the Wither dies. Place it in an item frame to show the world how hardcore you are! Or just as decoration.=Ein Netherstern wird abgeworfen, wenn der Wither stirbt. Platzieren Sie ihn in einen Rahmen, um der Welt zu zeigen, wie großartig Sie sind! - -Leather=Leder -Leather is a versatile crafting component.=Leder ist eine vielseitige Fertigungskomponente. -Feather=Feder -Feathers are used in crafting and are dropped from chickens.=Federn werden in der Fertigung benutzt und werden von Hühnern abgeworfen. -Rabbit Hide=Kaninchenfell -Rabbit hide is used to create leather.=Kaninchenfell wird zur Herstellung von Leder benutzt. -Rabbit's Foot=Hasenpfote -Must be your lucky day! Place this item in an item frame for decoration.=Muss wohl Ihr Glückstag sein! Platzieren Sie diesen Gegenstand in einen Rahmen zur Dekoration. -Saddle=Sattel -Can be placed on animals to ride them=Kann auf Tieren platziert werden, um sie zu reiten -Saddles can be put on some animals in order to mount them.=Sattel können auf einigen Tieren platziert werden, um sich aufzusatteln. - -Use the placement key with the saddle in your hand to try to put on the saddle. Saddles fit on horses, mules, donkeys and pigs. Horses, mules and donkeys need to be tamed first, otherwise they'll reject the saddle. Saddled animals can be mounted by using the placement key on them again.=Platzierungstaste benutzen, während man den Sattel in der Hand hält, um zu versuchen, den Sattel anzulegen. Sattel passen auf Pferde, Maultiere, Esel und Schweine. Pferde, Maultiere und Esel müssen zuerst gezähmt werden, sonst werden sie den Sattel abweisen. Mit der Platzierungstaste kann man aufsatteln. - -Rabbit Stew=Kaninchenragout -Rabbit stew is a very nutricious food item.=Kaninchenragout ist ein sehr nahrhaftes Lebensmittel. -Shulker Shell=Schulkerschale -Shulker shells are used in crafting. They are dropped from dead shulkers.=Schulkerschalen werden für die Fertigung verwendet. Sie werden von toten Schulkern fallen gelassen. -Slimeball=Schleimkugel -Slimeballs are used in crafting. They are dropped from slimes.=Schleimkugeln werden in der Fertigung verwendet. Sie werden von Schleimen fallen gelassen. -Gunpowder=Schießpulver -Carrot on a Stick=Karottenrute -Lets you ride a saddled pig=Um auf gesattelten Schweinen zu reiten -A carrot on a stick can be used on saddled pigs to ride them.=Eine Karottenrute kann auf gesattelten Schweinen angewendet werden, um sie zu reiten. - -Place it on a saddled pig to mount it. You can now ride the pig like a horse. Pigs will also walk towards you when you just wield the carrot on a stick.=Platzieren Sie sie auf einem Schwein mit Sattel, um sich aufzusatteln. Sie können nun das Schwein wie ein Pferd reiten. Schweine werden auch auf Sie zugehen, wenn Sie einfach nur die Karottenrute halten. - -Iron Horse Armor=Eisenpferderüstung -Iron horse armor can be worn by horses to increase their protection from harm a bit.=Eine Eisenpferderüstung kann von Pferden getragen werden, um ihren Schutz vor Schaden etwas zu erhöhen. -Golden Horse Armor=Goldpferderüstung -Golden horse armor can be worn by horses to increase their protection from harm.=Eine Goldpferderüstung kann von Pferden getragen werden, um ihren Schutz vor Schaden zu erhöhen. -Diamond Horse Armor=Diamantpferderüstung -Diamond horse armor can be worn by horses to greatly increase their protection from harm.=Eine Diamantpferderüstung kann von Pferden getragen werden, um ihren Schutz vor Schaden beträchtlich zu erhöhen. -Place it on a horse to put on the horse armor. Donkeys and mules can't wear horse armor.=Platzieren Sie es auf einem Pferd, um die Pferderüstung aufzusetzen. Esel und Maultiere können keine Pferderüstung tragen. diff --git a/mods/ITEMS/mcl_mobitems/locale/mcl_mobitems.es.tr b/mods/ITEMS/mcl_mobitems/locale/mcl_mobitems.es.tr deleted file mode 100644 index 9b149788ad..0000000000 --- a/mods/ITEMS/mcl_mobitems/locale/mcl_mobitems.es.tr +++ /dev/null @@ -1,107 +0,0 @@ -# textdomain: mcl_mobitems -Rotten Flesh=Carne podrida -80% chance of food poisoning= - -Yuck! This piece of flesh clearly has seen better days. If you're really desperate, you can eat it to restore a few hunger points, but there's a 80% chance it causes food poisoning, which increases your hunger for a while.=¡Qué asco! Este pedazo de carne claramente ha tenido días mejores. Si está realmente estas desesperado, puedes comerlo para restablecer algunos puntos de hambre, pero hay un 80% de posibilidades de que cause intoxicación alimentaria, lo que aumenta su hambre por un tiempo. - -Raw Mutton=Cordero crudo - -Raw mutton is the flesh from a sheep and can be eaten safely. Cooking it will greatly increase its nutritional value.=El cordero crudo es la carne de una oveja y se puede comer de manera segura. Cocinarlo aumentará en gran medida su valor nutricional. - -Cooked Mutton=Cordero cocinado -Cooked mutton is the cooked flesh from a sheep and is used as food.=El cordero cocinado es la carne cocinada de oveja y se usa como alimento. -Raw Beef=Filete crudo - -Raw beef is the flesh from cows and can be eaten safely. Cooking it will greatly increase its nutritional value.=La carne cruda es la carne de las vacas y se puede comer de manera segura. Cocinarlo aumentará en gran medida su valor nutricional. - -Steak=Filete cocinado -Steak is cooked beef from cows and can be eaten.=El filete cocinado se cocina con filetes crudos de vaca y se puede comer. -Raw Chicken=Pollo crudo -30% chance of food poisoning= - -Raw chicken is a food item which is not safe to consume. You can eat it to restore a few hunger points, but there's a 30% chance to suffer from food poisoning, which increases your hunger rate for a while. Cooking raw chicken will make it safe to eat and increases its nutritional value.=El pollo crudo es un alimento que no es seguro consumir. Puedes comerlo para restaurar algunos puntos de hambre, pero hay un 30% de posibilidades de sufrir intoxicación alimentaria, lo que aumenta su tasa de hambre por un tiempo. Cocinar pollo crudo hará que sea seguro comerlo y aumentará su valor nutricional. - -Cooked Chicken=Pollo cocinado -A cooked chicken is a healthy food item which can be eaten.=Un pollo cocinado es un alimento saludable que se puede comer. -Raw Porkchop=Chuleta de cerdo cruda - -A raw porkchop is the flesh from a pig and can be eaten safely. Cooking it will greatly increase its nutritional value.=Una chuleta de cerdo cruda es la carne de un cerdo y se puede comer de manera segura. Cocinarlo aumentará en gran medida su valor nutricional. - -Cooked Porkchop=Chuleta de cerdo cocinada -Cooked porkchop is the cooked flesh of a pig and is used as food.=La chuleta de cerdo cocinada es la carne cocida de un cerdo y se usa como alimento. -Raw Rabbit=Conejo crudo - -Raw rabbit is a food item from a dead rabbit. It can be eaten safely. Cooking it will increase its nutritional value.=El conejo crudo es un alimento de un conejo muerto. Se puede comer de forma segura. Cocinar aumentará su valor nutricional. - -Cooked Rabbit=Conejo cocinado -This is a food item which can be eaten.=Este es un alimento que se puede comer. -Milk=Leche -Removes all status effects= - -Milk is very refreshing and can be obtained by using a bucket on a cow. Drinking it will remove all status effects, but restores no hunger points.= - -Use the placement key to drink the milk.= -Spider Eye=Ojo de araña -Poisonous= - -Spider eyes are used mainly in crafting. If you're really desperate, you can eat a spider eye, but it will poison you briefly.=Los ojos de araña se utilizan principalmente en la elaboración. Si estás realmente desesperado, puedes comerte un ojo de araña, pero te envenenará brevemente. - -Bone=Hueso - -Bones can be used to tame wolves so they will protect you. They are also useful as a crafting ingredient.=Los huesos se pueden usar para domar a los lobos para que te protejan. También son útiles como ingrediente de elaboración. - -Wield the bone near wolves to attract them. Use the “Place” key on the wolf to give it a bone and tame it. You can then give commands to the tamed wolf by using the “Place” key on it.=Empuña el hueso cerca de los lobos para atraerlos. Usa la tecla "Colocar" en el lobo para darle un hueso y domesticarlo. Luego puede dar órdenes al lobo domesticado utilizando la tecla "Colocar". - -String=Cuerda -Strings are used in crafting.=Las cuerdas se usan en la elaboración. -Blaze Rod=Vara de blaze -This is a crafting component dropped from dead blazes.=Este es un componente de artesanía caído de llamas muertas. -Blaze Powder=Polvo de blaze -This item is mainly used for crafting.=Este artículo se usa principalmente para la elaboración. -Magma Cream=Crema de magma -Magma cream is a crafting component.=La crema de magma es un componente de elaboración. -Ghast Tear=Lágrima espectral -Place this item in an item frame as decoration.=Coloque este artículo en un marco de artículo como decoración. -Nether Star=Estrella del Nether - -A nether star is dropped when the Wither dies. Place it in an item frame to show the world how hardcore you are! Or just as decoration.=Se cae una estrella cuando muere un Wither. ¡Colócalo en el marco de un objeto para mostrarle al mundo lo duro que eres! O simplemente como decoración. - -Leather=Cuero -Leather is a versatile crafting component.=El cuero es un componente de elaboración versátil. -Feather=Pluma -Feathers are used in crafting and are dropped from chickens.=Las plumas se usan en la elaboración y se sueltan de los pollos. -Rabbit Hide=Piel de conejo -Rabbit hide is used to create leather.=La piel de conejo se usa para crear cuero. -Rabbit's Foot=Pata de conejo -Must be your lucky day! Place this item in an item frame for decoration.=¡Debe ser tu día de suerte! Coloque este artículo en un marco de artículos para la decoración. -Saddle=Montura -Can be placed on animals to ride them= -Saddles can be put on some animals in order to mount them.=Se pueden poner monturas en algunos animales para montarlos. - -Use the placement key with the saddle in your hand to try to put on the saddle. Saddles fit on horses, mules, donkeys and pigs. Horses, mules and donkeys need to be tamed first, otherwise they'll reject the saddle. Saddled animals can be mounted by using the placement key on them again.= - -Rabbit Stew=Estofado de conejo -Rabbit stew is a very nutricious food item.=El estofado de conejo es un alimento muy nutritivo. -Shulker Shell=Caparazón de shulker -Shulker shells are used in crafting. They are dropped from dead shulkers.=Los caparazones de shulker se usan en la fabricación. Son obtenidos de shulkers muertos. -Slimeball=Bola de slime -Slimeballs are used in crafting. They are dropped from slimes.=Las bolas de slime se usan en la elaboración. Se obtienen de slimes. -Gunpowder=Pólvora -Carrot on a Stick=Caña con zanahoria -Lets you ride a saddled pig= -A carrot on a stick can be used on saddled pigs to ride them.=La caña con zanahoria se puede usar en cerdos ensillados para montarlos. - -Place it on a saddled pig to mount it. You can now ride the pig like a horse. Pigs will also walk towards you when you just wield the carrot on a stick.=Colóquelo sobre un cerdo ensillado para montarlo. Ahora puedes montar el cerdo como un caballo. Los cerdos también caminarán hacia ti cuando solo manejes la zanahoria en un palo. - -Iron Horse Armor=Armadura de hierro para caballo -Iron horse armor can be worn by horses to increase their protection from harm a bit.=Los caballos pueden usar armadura de caballo de hierro para aumentar un poco su protección contra el daño. -Golden Horse Armor=Armadura de oro para caballo -Golden horse armor can be worn by horses to increase their protection from harm.=Los caballos pueden usar armadura de caballo de oro para aumentar su protección contra el daño. -Diamond Horse Armor=Armadura de diamante para caballo -Diamond horse armor can be worn by horses to greatly increase their protection from harm.=Los caballos pueden usar armadura de caballo de diamante para aumentar en gran medida su protección contra el daño. -Place it on a horse to put on the horse armor. Donkeys and mules can't wear horse armor.=Colóquelo en un caballo para ponerle la armadura de caballo. Los burros y las mulas no pueden usar armadura de caballo. - -##### not used anymore ##### - - -Milk is very refreshing and can be obtained by using a bucket on a cow. Drinking it will cure all forms of poisoning, but restores no hunger points.=La leche es muy refrescante y se puede obtener usando un cubo en una vaca. Beberlo curará todas las formas de envenenamiento, pero no restaura los puntos de hambre. diff --git a/mods/ITEMS/mcl_mobitems/locale/mcl_mobitems.fr.tr b/mods/ITEMS/mcl_mobitems/locale/mcl_mobitems.fr.tr deleted file mode 100644 index 8353054abf..0000000000 --- a/mods/ITEMS/mcl_mobitems/locale/mcl_mobitems.fr.tr +++ /dev/null @@ -1,102 +0,0 @@ -# textdomain: mcl_mobitems -Rotten Flesh=Chair Putréfiée -80% chance of food poisoning=80% de chances d'intoxication alimentaire - -Yuck! This piece of flesh clearly has seen better days. If you're really desperate, you can eat it to restore a few hunger points, but there's a 80% chance it causes food poisoning, which increases your hunger for a while.=Beurk! Ce morceau de chair a clairement connu des jours meilleurs. Si vous êtes vraiment désespéré, vous pouvez le manger pour restaurer quelques points de faim, mais il y a 80% de chances qu'il provoque une intoxication alimentaire, ce qui augmente votre faim pendant un certain temps. - -Raw Mutton=Mouton Cru - -Raw mutton is the flesh from a sheep and can be eaten safely. Cooking it will greatly increase its nutritional value.=Le mouton cru est la chair d'un mouton et peut être mangé en toute sécurité. La cuisson augmentera considérablement sa valeur nutritive. - -Cooked Mutton=Mouton Cuit -Cooked mutton is the cooked flesh from a sheep and is used as food.=Le mouton cuit est la chair cuite d'un mouton et est utilisé comme nourriture. -Raw Beef=Boeuf Cru - -Raw beef is the flesh from cows and can be eaten safely. Cooking it will greatly increase its nutritional value.=Le boeuf cru est la chair des vaches et peut être mangé en toute sécurité. La cuisson augmentera considérablement sa valeur nutritive. - -Steak=Steak -Steak is cooked beef from cows and can be eaten.=Le steak est du boeuf cuit et peut être mangé. -Raw Chicken=Poulet Cru -30% chance of food poisoning=30% de chances d'intoxication alimentaire - -Raw chicken is a food item which is not safe to consume. You can eat it to restore a few hunger points, but there's a 30% chance to suffer from food poisoning, which increases your hunger rate for a while. Cooking raw chicken will make it safe to eat and increases its nutritional value.=Le poulet cru est un aliment qui n'est pas sûr à consommer. Vous pouvez le manger pour restaurer quelques points de faim, mais il y a 30% de chances de souffrir d'intoxication alimentaire, ce qui augmente votre taux de faim pendant un certain temps. La cuisson du poulet cru le rendra sûr à manger et augmentera sa valeur nutritive. - -Cooked Chicken=Poulet Cuit -A cooked chicken is a healthy food item which can be eaten.=Un poulet cuit est un aliment sain qui peut être mangé. -Raw Porkchop=Porc Cru - -A raw porkchop is the flesh from a pig and can be eaten safely. Cooking it will greatly increase its nutritional value.=Un porc cru est la chair d'un porc et peut être mangée en toute sécurité. La cuisson augmentera considérablement sa valeur nutritive. - -Cooked Porkchop=Porc Cuit -Cooked porkchop is the cooked flesh of a pig and is used as food.=Le porc cuit est la chair cuite d'un porc et est utilisé comme aliment. -Raw Rabbit=Lapin Cru - -Raw rabbit is a food item from a dead rabbit. It can be eaten safely. Cooking it will increase its nutritional value.=Le lapin cru est un aliment provenant d'un lapin mort. Il peut être mangé en toute sécurité. La cuisson augmentera sa valeur nutritive. - -Cooked Rabbit=Lapin Cuit -This is a food item which can be eaten.=Il s'agit d'un aliment qui peut être mangé. -Milk=Lait -Removes all status effects=Supprime tous les effets de statut! - -Milk is very refreshing and can be obtained by using a bucket on a cow. Drinking it will remove all status effects, but restores no hunger points.=Le lait est très rafraîchissant et peut être obtenu en utilisant un seau sur une vache. Le boire supprimera tous les effets de statut, mais ne restaure aucun point de faim. - -Use the placement key to drink the milk.=Utilisez la touche de placement pour boire le lait. -Spider Eye=Oeil d'Araignée -Poisonous=Toxique - -Spider eyes are used mainly in crafting. If you're really desperate, you can eat a spider eye, but it will poison you briefly.=Les yeux d'araignée sont utilisés principalement dans l'artisanat. Si vous êtes vraiment désespéré, vous pouvez manger un œil d'araignée, mais cela vous empoisonnera brièvement. - -Bone=Os - -Bones can be used to tame wolves so they will protect you. They are also useful as a crafting ingredient.=Les os peuvent être utilisés pour apprivoiser les loups afin de vous protéger. Ils sont également utiles comme ingrédient d'artisanat. - -Wield the bone near wolves to attract them. Use the “Place” key on the wolf to give it a bone and tame it. You can then give commands to the tamed wolf by using the “Place” key on it.=Maniez l'os près des loups pour les attirer. Utilisez la touche «Placer» sur le loup pour lui donner un os et l'apprivoiser. Vous pouvez ensuite donner des commandes au loup apprivoisé en utilisant la touche "Placer" sur celui-ci. - -String=Ficelle -Strings are used in crafting.=Les ficelles sont utilisées dans l'artisanat. -Blaze Rod=Bâton de Blaze -This is a crafting component dropped from dead blazes.=Il s'agit d'un composant d'artisanat tombé des Blazes morts. -Blaze Powder=Poudre de Blaze -This item is mainly used for crafting.=Cet objet est principalement utilisé pour l'artisanat. -Magma Cream=Crème de Magma -Magma cream is a crafting component.=La crème de magma est un composant artisanal. -Ghast Tear=Larme de Ghast -Place this item in an item frame as decoration.=Placez cet article dans un cadre d'article comme décoration. -Nether Star=Étoile du Nether - -A nether star is dropped when the Wither dies. Place it in an item frame to show the world how hardcore you are! Or just as decoration.=Une étoile du Nether est lâchée lorsque le Wither meurt. Placez-le dans un cadre d'objet pour montrer au monde à quel point vous êtes génial! Ou tout simplement comme décoration. - -Leather=Cuir -Leather is a versatile crafting component.=Le cuir est un élément d'artisanat polyvalent. -Feather=Plume -Feathers are used in crafting and are dropped from chickens.=Les plumes sont utilisées dans l'artisanat et tombent des poulets. -Rabbit Hide=Peau de Lapin -Rabbit hide is used to create leather.=La peau de lapin est utilisée pour créer du cuir. -Rabbit's Foot=Patte de Lapin -Must be your lucky day! Place this item in an item frame for decoration.=Ce doit être votre jour de chance! Placez cet article dans un cadre d'article pour la décoration. -Saddle=Selle -Can be placed on animals to ride them=Peut être placé sur les animaux pour les monter -Saddles can be put on some animals in order to mount them.=Des selles peuvent être posées sur certains animaux afin de les monter. - -Use the placement key with the saddle in your hand to try to put on the saddle. Saddles fit on horses, mules, donkeys and pigs. Horses, mules and donkeys need to be tamed first, otherwise they'll reject the saddle. Saddled animals can be mounted by using the placement key on them again.=Utilisez la touche de placement avec la selle à la main pour essayer de mettre la selle. Les selles conviennent aux chevaux, mulets, ânes et cochons. Les chevaux, les mulets et les ânes doivent d'abord être apprivoisés, sinon ils rejetteront la selle. Les animaux sellés peuvent être montés en utilisant à nouveau la touche de placement. - -Rabbit Stew=Ragout de Lapin -Rabbit stew is a very nutricious food item.=Le ragoût de lapin est un aliment très nutritif. -Shulker Shell=Carapace de Shulker -Shulker shells are used in crafting. They are dropped from dead shulkers.=Les carapaces Shulker sont utilisés dans l'artisanat. Ils sont lâchés de shulkers morts. -Slimeball=Boule de Slime -Slimeballs are used in crafting. They are dropped from slimes.=Les boules de slime sont utilisées dans l'artisanat. Ils sont lâchés par les Slimes. -Gunpowder=Poudre à canon -Carrot on a Stick=Carotte sur un Batôn -Lets you ride a saddled pig=Vous permet de monter un cochon sellé -A carrot on a stick can be used on saddled pigs to ride them.=Une carotte sur un bâton peut être utilisée sur les porcs sellés pour les monter. - -Place it on a saddled pig to mount it. You can now ride the pig like a horse. Pigs will also walk towards you when you just wield the carrot on a stick.=Placez-le sur un cochon sellé pour le monter. Vous pouvez maintenant monter le cochon comme un cheval. Les porcs marcheront également vers vous lorsque vous brandirez la carotte sur un bâton. - -Iron Horse Armor=Armure de cheval en fer -Iron horse armor can be worn by horses to increase their protection from harm a bit.=L'armure de cheval en fer peut être portée par les chevaux pour augmenter un peu leur protection contre les dommages. -Golden Horse Armor=Armure de cheval en or -Golden horse armor can be worn by horses to increase their protection from harm.=Une armure de cheval en or peut être portée par les chevaux pour augmenter leur protection contre les dommages. -Diamond Horse Armor=Armure de cheval en diamant -Diamond horse armor can be worn by horses to greatly increase their protection from harm.=Une armure de cheval en diament peut être portée par les chevaux pour augmenter fortement leur protection contre les dommages. -Place it on a horse to put on the horse armor. Donkeys and mules can't wear horse armor.=Placez-la sur un cheval pour mettre l'armure de cheval. Les ânes et les mules ne peuvent pas porter d'armure de cheval. diff --git a/mods/ITEMS/mcl_mobitems/locale/mcl_mobitems.pl.tr b/mods/ITEMS/mcl_mobitems/locale/mcl_mobitems.pl.tr deleted file mode 100644 index dd78a692f4..0000000000 --- a/mods/ITEMS/mcl_mobitems/locale/mcl_mobitems.pl.tr +++ /dev/null @@ -1,96 +0,0 @@ -# textdomain: mcl_mobitems -Rotten Flesh=Zgniłe mięso -80% chance of food poisoning=80% szans na zatrucie pokarmowe - -Yuck! This piece of flesh clearly has seen better days. If you're really desperate, you can eat it to restore a few hunger points, but there's a 80% chance it causes food poisoning, which increases your hunger for a while.=Fuj! Ten kawał mięsa zdecydowanie widział lepsze dni. Jeśli jesteś bardzo zdesperowana, możesz je zjeść by odzyskać kilka punktów głodu, ale jest 80 % szans, że spowoduje to zatrucie pokarmowe, które zwiększa chwilowo twój głód. - -Raw Mutton=Surowa baranina - -Raw mutton is the flesh from a sheep and can be eaten safely. Cooking it will greatly increase its nutritional value.=Surowa baranina to mięso z owcy, które może być bezpiecznie zjedzone. Upieczenie go znacząco zwiększy jego wartości odżywcze. - -Cooked Mutton=Pieczona baranina -Cooked mutton is the cooked flesh from a sheep and is used as food.=Upieczona baranina jest upieczonym mięsem z owcy i używana jako jedzenie. -Raw Beef=Surowa wołowina - -Raw beef is the flesh from cows and can be eaten safely. Cooking it will greatly increase its nutritional value.=Surowa wołowina jest mięsem z krowy i może być bezpiecznie zjedzone. Upieczenie go znacząco zwiększy jego wartości odżywcze. - - -Steak=Befsztyk -Steak is cooked beef from cows and can be eaten.=Befsztyk jest upieczoną wołowiną z krowy i może być zjedzony. -Raw Chicken=Surowy drób -30% chance of food poisoning=30% szans na zatrucie pokarmowe - -Raw chicken is a food item which is not safe to consume. You can eat it to restore a few hunger points, but there's a 30% chance to suffer from food poisoning, which increases your hunger rate for a while. Cooking raw chicken will make it safe to eat and increases its nutritional value.=Surowy drób nie jest bezpieczny do jedzenia. Można go zjeść, co przywróci kilka punktów głodu, jednak jest 30% szans, że spowoduje to zatrucie pokarmowe, które chwilowo zwiększa głód. Upieczenie surowego drobiu sprawi, że będzie on bezpieczny do jedzenia i zwiększy jego wartości odżywcze. - -Cooked Chicken=Pieczony kurczak -A cooked chicken is a healthy food item which can be eaten.=Pieczony kurczak jest zdrowym jedzeniem, które można bezpiecznie zjeść. -Raw Porkchop=Surowy schab - -A raw porkchop is the flesh from a pig and can be eaten safely. Cooking it will greatly increase its nutritional value.=Surowy schab jest mięsem ze świni i może zostać bezpiecznie zjedzony. Upieczenie go znacząco zwiększy jego wartości odżywcze. - -Cooked Porkchop=Pieczony schab -Cooked porkchop is the cooked flesh of a pig and is used as food.=Pieczony schab to upieczone mięso świni i jest używane jako jedzenie. -Raw Rabbit=Surowy mięso królicze - -Raw rabbit is a food item from a dead rabbit. It can be eaten safely. Cooking it will increase its nutritional value.=Surowy mięso królicze jest mięsem z martwego królika. Może zostać bezpiecznie zjedzone. Upieczenie go znacząco zwiększy jego wartości odżywcze. - -Cooked Rabbit=Pieczony królik -This is a food item which can be eaten.=Ten przedmiot można bezpiecznie zjeść. -Milk=Mleko -Removes all status effects=Usuwa wszystkie statusy efektów. - -Milk is very refreshing and can be obtained by using a bucket on a cow. Drinking it will remove all status effects, but restores no hunger points.=Mleko jest bardzo odświeżające i może zostać uzyskane przez użycie wiadra na krowie. Wypicie go usunie wszystkie statusy efektów, ale nie przywróci punktów głodu. - -Use the placement key to drink the milk.=Kliknij przycisk umieszczania aby wypić mleko. -Spider Eye=Oko pająka -Poisonous=Trujące - -Spider eyes are used mainly in crafting. If you're really desperate, you can eat a spider eye, but it will poison you briefly.=Oczy pająka są użyteczne przy wytwarzaniu. Jeśli jesteś zdesperowana możesz je zjeść, ale otruje cię ono chwilowo. - -Bone=Kość - -Bones can be used to tame wolves so they will protect you. They are also useful as a crafting ingredient.=Kości mogą być użyte do oswajania wilków, aby cię broniły. Są również użyteczne jako materiały do wytwarzania. - -Wield the bone near wolves to attract them. Use the “Place” key on the wolf to give it a bone and tame it. You can then give commands to the tamed wolf by using the “Place” key on it.=Trzymaj kość w pobliżu wilków aby je zwabić. Użyj przycisku "Umieść" na wilku aby dać mu kość i go oswoić. Możesz wtedy wydawać polecenia oswojonemu wilkowi klikając przycisk "Umieść" na nim. - -String=Nić -Strings are used in crafting.=Nić jest użyteczna w wytwarzaniu. -Blaze Rod=Płomienna różdżka -This is a crafting component dropped from dead blazes.=Jest to materiał do wytwarzania wypadający z martwych płomyków. -Blaze Powder=Płomienny proszek -This item is mainly used for crafting.=Ten przedmiot jest użyteczny w wytwarzaniu. -Magma Cream=Magmowy krem -Magma cream is a crafting component.=Magmowy krem to materiał do wytwarzania. -Ghast Tear=Łza Ghasta -Place this item in an item frame as decoration.=Umieść ten item w ramce jako dekorację. -Nether Star=Gwiazda Netheru - -A nether star is dropped when the Wither dies. Place it in an item frame to show the world how hardcore you are! Or just as decoration.=Gwiazda Netheru wypada gdy Wither umiera. Umieść ją w ramce by pokazać światu jak bardzo hardkorowa jesteś. - -Leather=Skóra -Leather is a versatile crafting component.=Skóra jest wszechstronnym materiałem do wytwarzania. -Feather=Pióro -Feathers are used in crafting and are dropped from chickens.=Pióra są używane w wytwarzaniu i wypadają z kurczaków. -Rabbit Hide=Królicza skóra -Rabbit hide is used to create leather.=Królicza skóra jest wykorzystywana do tworzenia skóry. -Rabbit's Foot=Królicza łapka -Must be your lucky day! Place this item in an item frame for decoration.=To musi być twój szczęśliwy dzień! Umieść ten przedmiot w ramce jako dekorację. -Saddle=Siodło -Can be placed on animals to ride them=Może być umieszczone na zwierzętach aby na nich jeździć. -Saddles can be put on some animals in order to mount them.=Siodła mogą być umieszczone na zwierzętach aby ich dosiąść. - -Use the placement key with the saddle in your hand to try to put on the saddle. Saddles fit on horses, mules, donkeys and pigs. Horses, mules and donkeys need to be tamed first, otherwise they'll reject the saddle. Saddled animals can be mounted by using the placement key on them again.=Użyj przycisku umieszczania z siodłem w ręku, aby założyć siodło. Siodła pasują na konie, muły, osły i świnie. Konie, muły i osły muszą być najpierw oswojone, w przeciwnym razie nie dadzą się osiodłać. Osiodłane zwierzęta można dosiąść klikając je prawym przyciskiem myszy. - -Rabbit Stew=Potrawka z królika -Rabbit stew is a very nutricious food item.=Potrawka z królika jest bardzo odżywczym posiłkiem. -Shulker Shell=Skorupa shulkera -Shulker shells are used in crafting. They are dropped from dead shulkers.=Skorupy shulkera są użyteczne w wytwarzaniu. Wypadają z martwych shulkerów. -Slimeball=Kula szlamu -Slimeballs are used in crafting. They are dropped from slimes.=Kule szlamu są użyteczne w wytwarzaniu. Wypadają z szlamów. -Gunpowder=Proch -Carrot on a Stick=Marchewka na patyku -Lets you ride a saddled pig=Pozwala prowadzić osiodłaną świnię -A carrot on a stick can be used on saddled pigs to ride them.=Marchewka na patyku może być użyta na osiodłanej świni by ją prowadzić. - -Place it on a saddled pig to mount it. You can now ride the pig like a horse. Pigs will also walk towards you when you just wield the carrot on a stick.=Użyj jej na osiodłanej skrzyni aby ją założyć. Możesz teraz jeździć na świni jak na koniu. Świnie będą także do ciebie podchodzić jeśli po prostu trzymasz marchewkę na patyku. - diff --git a/mods/ITEMS/mcl_mobitems/locale/mcl_mobitems.ru.tr b/mods/ITEMS/mcl_mobitems/locale/mcl_mobitems.ru.tr deleted file mode 100644 index 64f73618c9..0000000000 --- a/mods/ITEMS/mcl_mobitems/locale/mcl_mobitems.ru.tr +++ /dev/null @@ -1,102 +0,0 @@ -# textdomain: mcl_mobitems -Rotten Flesh=Гнилое мясо -80% chance of food poisoning=Вероятность отравления 80% - -Yuck! This piece of flesh clearly has seen better days. If you're really desperate, you can eat it to restore a few hunger points, but there's a 80% chance it causes food poisoning, which increases your hunger for a while.=БУЭ! Этот кусок гнили явно знавал лучшие времена. Если вы отчаялись, то можете съесть его, восстановив несколько очков голода, но с вероятностью 80% вы получите пищевое отравление, которое усилит ваш голод на некоторое время. - -Raw Mutton=Сырая баранина - -Raw mutton is the flesh from a sheep and can be eaten safely. Cooking it will greatly increase its nutritional value.=Сырая баранина это мясо овцы, его можно безопасно есть. Приготовление значительно увеличивает его питательную ценность. - -Cooked Mutton=Жареная баранина -Cooked mutton is the cooked flesh from a sheep and is used as food.=Жареная баранина это запечённое мясо овцы, употребляемое в пищу. -Raw Beef=Сырая говядина - -Raw beef is the flesh from cows and can be eaten safely. Cooking it will greatly increase its nutritional value.=Сырая говядина это мясо коровы, его можно безопасно есть. Приготовление значительно увеличивает его питательную ценность. - -Steak=Стейк -Steak is cooked beef from cows and can be eaten.=Стейк это приготовленное мясо коровы, его можно есть. -Raw Chicken=Сырая курица -30% chance of food poisoning=Вероятность отравления 30% - -Raw chicken is a food item which is not safe to consume. You can eat it to restore a few hunger points, but there's a 30% chance to suffer from food poisoning, which increases your hunger rate for a while. Cooking raw chicken will make it safe to eat and increases its nutritional value.=Сырая курица это продуктовый предмет, небезопасный для употребления. Вы можете его съесть для восстановления нескольких очков голода, но с вероятностью 30% вы пострадаете от пищевого отравление, которое усилит ваш голод на некоторое время. Приготовление сырой курицы сделает её безопасной для еды, значительно увеличив питательную ценность. - -Cooked Chicken=Жареный цыплёнок -A cooked chicken is a healthy food item which can be eaten.=Жареный цыплёнок это здоровый питательный продукт, его можно есть. -Raw Porkchop=Сырая свинина - -A raw porkchop is the flesh from a pig and can be eaten safely. Cooking it will greatly increase its nutritional value.=Сырая свинина это мясо свиньи, его можно безопасно есть. Приготовление значительно увеличивает его питательную ценность. - -Cooked Porkchop=Свиная отбивная -Cooked porkchop is the cooked flesh of a pig and is used as food.=Свиная отбивная это приготовленное мясо свиньи, его можно есть. -Raw Rabbit=Сырая крольчатина - -Raw rabbit is a food item from a dead rabbit. It can be eaten safely. Cooking it will increase its nutritional value.=Сырая крольчатина это мясо кролика, его можно безопасно есть. Приготовление значительно увеличивает его питательную ценность. - -Cooked Rabbit=Приготовленный кролик -This is a food item which can be eaten.=Это пищевой продукт, его можно есть. -Milk=Молоко -Removes all status effects=Убирает все эффекты состояния - -Milk is very refreshing and can be obtained by using a bucket on a cow. Drinking it will remove all status effects, but restores no hunger points.=Молоко отлично освежает, его можно получить, применив ведро к корове. Выпив молока, вы избавитесь от всех эффектов состояния, но не восстановите очков голода. - -Use the placement key to drink the milk.=Используйте клавишу размещения, чтобы выпить молоко. -Spider Eye=Паучий глаз -Poisonous=Ядовито - -Spider eyes are used mainly in crafting. If you're really desperate, you can eat a spider eye, but it will poison you briefly.=Паучьи глаза в основном используются для крафтинга. Если вы отчаялись, то можете съесть их, но они вас на некоторое время отравят. - -Bone=Кость - -Bones can be used to tame wolves so they will protect you. They are also useful as a crafting ingredient.=Кости можно использовать для приручения волков, чтобы они защищали вас. - -Wield the bone near wolves to attract them. Use the “Place” key on the wolf to give it a bone and tame it. You can then give commands to the tamed wolf by using the “Place” key on it.=Положите кость рядом с волками, чтобы привлечь их. Используйте клавишу “Разместить” на волке, чтобы дать ему кость и приручить его. Вы можете командовать приручёнными волками с помощью клавиши “Разместить”. - -String=Нити -Strings are used in crafting.=Нити используются для крафтинга -Blaze Rod=Огненный стержень -This is a crafting component dropped from dead blazes.=Это крафтинговый ингредиент, отбрасываемый ифритом -Blaze Powder=Огненный порошок -This item is mainly used for crafting.=Этот предмет в основном используется для крафтинга. -Magma Cream=Лавовый крем -Magma cream is a crafting component.=Лавовый крем это крафтинговый компонент. -Ghast Tear=Слеза гаста -Place this item in an item frame as decoration.=Поместите это в рамку как украшение. -Nether Star=Звезда Ада - -A nether star is dropped when the Wither dies. Place it in an item frame to show the world how hardcore you are! Or just as decoration.=Звезда Ада выбрасывается при смерти иссушителя. Поместите её в рамку, чтобы показать миру ваше величие! Либо просто как украшение. - -Leather=Кожа -Leather is a versatile crafting component.=Кожа это универсальный крафт-компонент. -Feather=Перо -Feathers are used in crafting and are dropped from chickens.=Перо используется для крафтинга и выпадает из кур. -Rabbit Hide=Кроличья шкурка -Rabbit hide is used to create leather.=Кроличья шкурка используется для создания кожи. -Rabbit's Foot=Кроличья лапка -Must be your lucky day! Place this item in an item frame for decoration.=У вас счастливый день! Поместите этот предмет в рамку как украшение. -Saddle=Седло -Can be placed on animals to ride them=Можно устанавливать на животных, чтобы ездить на них -Saddles can be put on some animals in order to mount them.=Седло можно поставить на некоторых животных, чтобы закрепляться на них. - -Use the placement key with the saddle in your hand to try to put on the saddle. Saddles fit on horses, mules, donkeys and pigs. Horses, mules and donkeys need to be tamed first, otherwise they'll reject the saddle. Saddled animals can be mounted by using the placement key on them again.=Используйте клавишу размещения, держа седло в руке, чтобы попытаться надеть его. Сёдла подходят для лошадей, мулов, осликов и свиней. Лошади, мулы и ослики должны быть предварительно приручены, иначе они откажутся от седла. На осёдланных животных можно сесть, снова нажав на них клавишу размещения. - -Rabbit Stew=Рагу из кролика -Rabbit stew is a very nutricious food item.=Рагу из кролика это очень питательный продукт. -Shulker Shell=Панцирь шалкера -Shulker shells are used in crafting. They are dropped from dead shulkers.=Панцирь шалкера используется для крафтинга. Он выпадает из мёртвого шалкера. -Slimeball=Слизь -Slimeballs are used in crafting. They are dropped from slimes.=Слизь используется для крафтинга. Она выпадает из слизняков. -Gunpowder=Порох -Carrot on a Stick=Удочка с морковью -Lets you ride a saddled pig=Позволяет вам ездить на осёдланной свинье -A carrot on a stick can be used on saddled pigs to ride them.=Удочку с морковью можно использовать, чтобы оседлать свинью и поехать на ней. - -Place it on a saddled pig to mount it. You can now ride the pig like a horse. Pigs will also walk towards you when you just wield the carrot on a stick.=Поместите это на осёдланную свинью, чтобы закрепиться на ней. Теперь вы можете ехать на ней, как на лошади. Свиньи также идут вперёд, когда вы просто держите удочку с морковью. - -Iron Horse Armor=Железные доспехи лошади -Iron horse armor can be worn by horses to increase their protection from harm a bit.=Железные доспехи лошади, надетые на лошадь, немного защищают её от вреда. -Golden Horse Armor=Золотые доспехи лошади -Golden horse armor can be worn by horses to increase their protection from harm.=Золотые доспехи лошади, надетые на лошадь, защищают её от вреда. -Diamond Horse Armor=Алмазные доспехи лошади -Diamond horse armor can be worn by horses to greatly increase their protection from harm.=Алмазные доспехи лошади, надетые на лошадь, отлично защищают её от вреда. -Place it on a horse to put on the horse armor. Donkeys and mules can't wear horse armor.=Поместите это на лошадь, чтобы одеть лошадь в доспехи. Ослики и мулы не могут носить лошадиные доспехи. diff --git a/mods/ITEMS/mcl_mobitems/locale/template.txt b/mods/ITEMS/mcl_mobitems/locale/template.txt deleted file mode 100644 index a3066dd1be..0000000000 --- a/mods/ITEMS/mcl_mobitems/locale/template.txt +++ /dev/null @@ -1,102 +0,0 @@ -# textdomain: mcl_mobitems -Rotten Flesh= -80% chance of food poisoning= - -Yuck! This piece of flesh clearly has seen better days. If you're really desperate, you can eat it to restore a few hunger points, but there's a 80% chance it causes food poisoning, which increases your hunger for a while.= - -Raw Mutton= - -Raw mutton is the flesh from a sheep and can be eaten safely. Cooking it will greatly increase its nutritional value.= - -Cooked Mutton= -Cooked mutton is the cooked flesh from a sheep and is used as food.= -Raw Beef= - -Raw beef is the flesh from cows and can be eaten safely. Cooking it will greatly increase its nutritional value.= - -Steak= -Steak is cooked beef from cows and can be eaten.= -Raw Chicken= -30% chance of food poisoning= - -Raw chicken is a food item which is not safe to consume. You can eat it to restore a few hunger points, but there's a 30% chance to suffer from food poisoning, which increases your hunger rate for a while. Cooking raw chicken will make it safe to eat and increases its nutritional value.= - -Cooked Chicken= -A cooked chicken is a healthy food item which can be eaten.= -Raw Porkchop= - -A raw porkchop is the flesh from a pig and can be eaten safely. Cooking it will greatly increase its nutritional value.= - -Cooked Porkchop= -Cooked porkchop is the cooked flesh of a pig and is used as food.= -Raw Rabbit= - -Raw rabbit is a food item from a dead rabbit. It can be eaten safely. Cooking it will increase its nutritional value.= - -Cooked Rabbit= -This is a food item which can be eaten.= -Milk= -Removes all status effects= - -Milk is very refreshing and can be obtained by using a bucket on a cow. Drinking it will remove all status effects, but restores no hunger points.= - -Use the placement key to drink the milk.= -Spider Eye= -Poisonous= - -Spider eyes are used mainly in crafting. If you're really desperate, you can eat a spider eye, but it will poison you briefly.= - -Bone= - -Bones can be used to tame wolves so they will protect you. They are also useful as a crafting ingredient.= - -Wield the bone near wolves to attract them. Use the “Place” key on the wolf to give it a bone and tame it. You can then give commands to the tamed wolf by using the “Place” key on it.= - -String= -Strings are used in crafting.= -Blaze Rod= -This is a crafting component dropped from dead blazes.= -Blaze Powder= -This item is mainly used for crafting.= -Magma Cream= -Magma cream is a crafting component.= -Ghast Tear= -Place this item in an item frame as decoration.= -Nether Star= - -A nether star is dropped when the Wither dies. Place it in an item frame to show the world how hardcore you are! Or just as decoration.= - -Leather= -Leather is a versatile crafting component.= -Feather= -Feathers are used in crafting and are dropped from chickens.= -Rabbit Hide= -Rabbit hide is used to create leather.= -Rabbit's Foot= -Must be your lucky day! Place this item in an item frame for decoration.= -Saddle= -Can be placed on animals to ride them= -Saddles can be put on some animals in order to mount them.= - -Use the placement key with the saddle in your hand to try to put on the saddle. Saddles fit on horses, mules, donkeys and pigs. Horses, mules and donkeys need to be tamed first, otherwise they'll reject the saddle. Saddled animals can be mounted by using the placement key on them again.= - -Rabbit Stew= -Rabbit stew is a very nutricious food item.= -Shulker Shell= -Shulker shells are used in crafting. They are dropped from dead shulkers.= -Slimeball= -Slimeballs are used in crafting. They are dropped from slimes.= -Gunpowder= -Carrot on a Stick= -Lets you ride a saddled pig= -A carrot on a stick can be used on saddled pigs to ride them.= - -Place it on a saddled pig to mount it. You can now ride the pig like a horse. Pigs will also walk towards you when you just wield the carrot on a stick.= - -Iron Horse Armor= -Iron horse armor can be worn by horses to increase their protection from harm a bit.= -Golden Horse Armor= -Golden horse armor can be worn by horses to increase their protection from harm.= -Diamond Horse Armor= -Diamond horse armor can be worn by horses to greatly increase their protection from harm.= -Place it on a horse to put on the horse armor. Donkeys and mules can't wear horse armor.= diff --git a/mods/ITEMS/mcl_mobitems/mod.conf b/mods/ITEMS/mcl_mobitems/mod.conf deleted file mode 100644 index e9604036e6..0000000000 --- a/mods/ITEMS/mcl_mobitems/mod.conf +++ /dev/null @@ -1,2 +0,0 @@ -name = mcl_mobitems -depends = mcl_core, mcl_hunger, mcl_colors diff --git a/mods/ITEMS/mcl_mobitems/textures/default_gunpowder.png b/mods/ITEMS/mcl_mobitems/textures/default_gunpowder.png deleted file mode 100644 index e12feafa1b..0000000000 Binary files a/mods/ITEMS/mcl_mobitems/textures/default_gunpowder.png and /dev/null differ diff --git a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_beef_cooked.png b/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_beef_cooked.png deleted file mode 100644 index f41a20ae6d..0000000000 Binary files a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_beef_cooked.png and /dev/null differ diff --git a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_beef_raw.png b/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_beef_raw.png deleted file mode 100644 index 5c9586cacd..0000000000 Binary files a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_beef_raw.png and /dev/null differ diff --git a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_blaze_powder.png b/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_blaze_powder.png deleted file mode 100644 index a54ad65d65..0000000000 Binary files a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_blaze_powder.png and /dev/null differ diff --git a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_blaze_rod.png b/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_blaze_rod.png deleted file mode 100644 index bfca7c0f28..0000000000 Binary files a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_blaze_rod.png and /dev/null differ diff --git a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_bone.png b/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_bone.png deleted file mode 100644 index 4c687e59f2..0000000000 Binary files a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_bone.png and /dev/null differ diff --git a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_bucket_milk.png b/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_bucket_milk.png deleted file mode 100644 index 2ba089a54b..0000000000 Binary files a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_bucket_milk.png and /dev/null differ diff --git a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_carrot_on_a_stick.png b/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_carrot_on_a_stick.png deleted file mode 100644 index ff85a30df9..0000000000 Binary files a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_carrot_on_a_stick.png and /dev/null differ diff --git a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_chicken_cooked.png b/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_chicken_cooked.png deleted file mode 100644 index 78295c075f..0000000000 Binary files a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_chicken_cooked.png and /dev/null differ diff --git a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_chicken_raw.png b/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_chicken_raw.png deleted file mode 100644 index 05c7246c98..0000000000 Binary files a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_chicken_raw.png and /dev/null differ diff --git a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_diamond_horse_armor.png b/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_diamond_horse_armor.png deleted file mode 100644 index 121be08de6..0000000000 Binary files a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_diamond_horse_armor.png and /dev/null differ diff --git a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_feather.png b/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_feather.png deleted file mode 100644 index a3d0a3da51..0000000000 Binary files a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_feather.png and /dev/null differ diff --git a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_ghast_tear.png b/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_ghast_tear.png deleted file mode 100644 index ec84983ef8..0000000000 Binary files a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_ghast_tear.png and /dev/null differ diff --git a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_gold_horse_armor.png b/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_gold_horse_armor.png deleted file mode 100644 index f6b4fdfb93..0000000000 Binary files a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_gold_horse_armor.png and /dev/null differ diff --git a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_horse_armor_diamond.png b/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_horse_armor_diamond.png deleted file mode 100644 index 577eff10b7..0000000000 Binary files a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_horse_armor_diamond.png and /dev/null differ diff --git a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_horse_armor_gold.png b/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_horse_armor_gold.png deleted file mode 100644 index b8ebbfe850..0000000000 Binary files a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_horse_armor_gold.png and /dev/null differ diff --git a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_horse_armor_iron.png b/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_horse_armor_iron.png deleted file mode 100644 index 217b6c5310..0000000000 Binary files a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_horse_armor_iron.png and /dev/null differ diff --git a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_iron_horse_armor.png b/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_iron_horse_armor.png deleted file mode 100644 index 4f078a92bd..0000000000 Binary files a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_iron_horse_armor.png and /dev/null differ diff --git a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_leather.png b/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_leather.png deleted file mode 100644 index 4da2a1c825..0000000000 Binary files a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_leather.png and /dev/null differ diff --git a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_magma_cream.png b/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_magma_cream.png deleted file mode 100644 index 5d31dde074..0000000000 Binary files a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_magma_cream.png and /dev/null differ diff --git a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_mutton_cooked.png b/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_mutton_cooked.png deleted file mode 100644 index 49b5f0ee6a..0000000000 Binary files a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_mutton_cooked.png and /dev/null differ diff --git a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_mutton_raw.png b/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_mutton_raw.png deleted file mode 100644 index 28781262a9..0000000000 Binary files a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_mutton_raw.png and /dev/null differ diff --git a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_nether_star.png b/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_nether_star.png deleted file mode 100644 index 27d2359062..0000000000 Binary files a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_nether_star.png and /dev/null differ diff --git a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_porkchop_cooked.png b/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_porkchop_cooked.png deleted file mode 100644 index 15683db202..0000000000 Binary files a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_porkchop_cooked.png and /dev/null differ diff --git a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_porkchop_raw.png b/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_porkchop_raw.png deleted file mode 100644 index 018702ae7f..0000000000 Binary files a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_porkchop_raw.png and /dev/null differ diff --git a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_rabbit_cooked.png b/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_rabbit_cooked.png deleted file mode 100644 index 54f5758dec..0000000000 Binary files a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_rabbit_cooked.png and /dev/null differ diff --git a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_rabbit_foot.png b/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_rabbit_foot.png deleted file mode 100644 index 293fc466b6..0000000000 Binary files a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_rabbit_foot.png and /dev/null differ diff --git a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_rabbit_hide.png b/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_rabbit_hide.png deleted file mode 100644 index 39e1f22150..0000000000 Binary files a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_rabbit_hide.png and /dev/null differ diff --git a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_rabbit_raw.png b/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_rabbit_raw.png deleted file mode 100644 index c281dc4925..0000000000 Binary files a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_rabbit_raw.png and /dev/null differ diff --git a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_rabbit_stew.png b/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_rabbit_stew.png deleted file mode 100644 index ee1a6a2194..0000000000 Binary files a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_rabbit_stew.png and /dev/null differ diff --git a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_rotten_flesh.png b/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_rotten_flesh.png deleted file mode 100644 index 58ad1a5cd9..0000000000 Binary files a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_rotten_flesh.png and /dev/null differ diff --git a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_saddle.png b/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_saddle.png deleted file mode 100644 index 60f6c959e5..0000000000 Binary files a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_saddle.png and /dev/null differ diff --git a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_shulker_shell.png b/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_shulker_shell.png deleted file mode 100644 index ccaa7a0827..0000000000 Binary files a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_shulker_shell.png and /dev/null differ diff --git a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_slimeball.png b/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_slimeball.png deleted file mode 100644 index e984e9b97a..0000000000 Binary files a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_slimeball.png and /dev/null differ diff --git a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_spider_eye.png b/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_spider_eye.png deleted file mode 100644 index 08c0241add..0000000000 Binary files a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_spider_eye.png and /dev/null differ diff --git a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_string.png b/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_string.png deleted file mode 100644 index 214e1d75d6..0000000000 Binary files a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_string.png and /dev/null differ diff --git a/mods/ITEMS/mcl_mobspawners/README.md b/mods/ITEMS/mcl_mobspawners/README.md deleted file mode 100644 index 26ac39386e..0000000000 --- a/mods/ITEMS/mcl_mobspawners/README.md +++ /dev/null @@ -1,17 +0,0 @@ -This mod adds a mob spawner for MineClone 2. -Monsters will appear around the mob spawner in semi-regular intervals. - -This mod is originally based on the mob spawner from Mobs Redo by TenPlus1 -but has been modified quite a lot to fit the needs of MineClone 2. - -Players can get a mob spawner by `giveme` and is initially empty after -placing. - -## Programmer notes -To set the mob spawned by a mob spawner, first place the mob spawner -(e.g. with `minetest.set_node`), then use the function -`mcl_mobspawners.setup_spawner` to set its attributes. See the comment -in `init.lua` for more info. - -## License (code and texture) -MIT License diff --git a/mods/ITEMS/mcl_mobspawners/init.lua b/mods/ITEMS/mcl_mobspawners/init.lua deleted file mode 100644 index b3cd8a67f0..0000000000 --- a/mods/ITEMS/mcl_mobspawners/init.lua +++ /dev/null @@ -1,389 +0,0 @@ -local S = minetest.get_translator(minetest.get_current_modname()) - -local math = math -local table = table - -mcl_mobspawners = {} - -local default_mob = "mobs_mc:pig" - --- Mob spawner ---local spawner_default = default_mob.." 0 15 4 15" - -local function get_mob_textures(mob) - local list = minetest.registered_entities[mob].texture_list - if type(list[1]) == "table" then - return list[1] - else - return list - end -end - -local function find_doll(pos) - for _,obj in pairs(minetest.get_objects_inside_radius(pos, 0.5)) do - if not obj:is_player() then - if obj and obj:get_luaentity().name == "mcl_mobspawners:doll" then - return obj - end - end - end - return nil -end - -local function spawn_doll(pos) - return minetest.add_entity({x=pos.x, y=pos.y-0.3, z=pos.z}, "mcl_mobspawners:doll") -end - --- Manually set the doll sizes for large mobs --- TODO: Relocate this code to mobs_mc -local doll_size_overrides = { - ["mobs_mc:guardian"] = { x = 0.6, y = 0.6 }, - ["mobs_mc:guardian_elder"] = { x = 0.72, y = 0.72 }, - ["mobs_mc:enderman"] = { x = 0.8, y = 0.8 }, - ["mobs_mc:iron_golem"] = { x = 0.9, y = 0.9 }, - ["mobs_mc:ghast"] = { x = 1.05, y = 1.05 }, - ["mobs_mc:wither"] = { x = 1.2, y = 1.2 }, - ["mobs_mc:enderdragon"] = { x = 0.16, y = 0.16 }, - ["mobs_mc:witch"] = { x = 0.95, y = 0.95 }, -} -local spawn_count_overrides = { - ["mobs_mc:enderdragon"] = 1, - ["mobs_mc:wither"] = 1, - ["mobs_mc:ghast"] = 1, - ["mobs_mc:guardian_elder"] = 1, - ["mobs_mc:guardian"] = 2, - ["mobs_mc:iron_golem"] = 2, -} - -local function set_doll_properties(doll, mob) - local mobinfo = minetest.registered_entities[mob] - if not mobinfo then return end - local xs, ys - if doll_size_overrides[mob] then - xs = doll_size_overrides[mob].x - ys = doll_size_overrides[mob].y - else - xs = mobinfo.visual_size.x * 0.33333 - ys = mobinfo.visual_size.y * 0.33333 - end - local prop = { - mesh = mobinfo.mesh, - textures = get_mob_textures(mob), - visual_size = { - x = xs, - y = ys, - } - } - doll:set_properties(prop) - doll:get_luaentity()._mob = mob -end - -local function respawn_doll(pos) - local meta = minetest.get_meta(pos) - local mob = meta:get_string("Mob") - local doll - if mob and mob ~= "" then - doll = find_doll(pos) - if not doll then - doll = spawn_doll(pos) - set_doll_properties(doll, mob) - end - end - return doll -end - ---[[ Public function: Setup the spawner at pos. -This function blindly assumes there's actually a spawner at pos. -If not, then the results are undefined. -All the arguments are optional! - -* Mob: ID of mob to spawn (default: mobs_mc:pig) -* MinLight: Minimum light to spawn (default: 0) -* MaxLight: Maximum light to spawn (default: 15) -* MaxMobsInArea: How many mobs are allowed in the area around the spawner (default: 4) -* PlayerDistance: Spawn mobs only if a player is within this distance; 0 to disable (default: 15) -* YOffset: Y offset to spawn mobs; 0 to disable (default: 0) -]] - -function mcl_mobspawners.setup_spawner(pos, Mob, MinLight, MaxLight, MaxMobsInArea, PlayerDistance, YOffset) - -- Activate mob spawner and disable editing functionality - if Mob == nil then Mob = default_mob end - if MinLight == nil then MinLight = 0 end - if MaxLight == nil then MaxLight = 15 end - if MaxMobsInArea == nil then MaxMobsInArea = 4 end - if PlayerDistance == nil then PlayerDistance = 15 end - if YOffset == nil then YOffset = 0 end - local meta = minetest.get_meta(pos) - meta:set_string("Mob", Mob) - meta:set_int("MinLight", MinLight) - meta:set_int("MaxLight", MaxLight) - meta:set_int("MaxMobsInArea", MaxMobsInArea) - meta:set_int("PlayerDistance", PlayerDistance) - meta:set_int("YOffset", YOffset) - - -- Create doll or replace existing doll - local doll = find_doll(pos) - if not doll then - doll = spawn_doll(pos) - end - set_doll_properties(doll, Mob) - - - -- Start spawning very soon - local t = minetest.get_node_timer(pos) - t:start(2) -end - --- Spawn mobs around pos --- NOTE: The node is timer-based, rather than ABM-based. -local function spawn_mobs(pos, elapsed) - - -- get meta - local meta = minetest.get_meta(pos) - - -- get settings - local mob = meta:get_string("Mob") - local mlig = meta:get_int("MinLight") - local xlig = meta:get_int("MaxLight") - local num = meta:get_int("MaxMobsInArea") - local pla = meta:get_int("PlayerDistance") - local yof = meta:get_int("YOffset") - - -- if amount is 0 then do nothing - if num == 0 then - return - end - - -- are we spawning a registered mob? - if not mcl_mobs.spawning_mobs[mob] then - minetest.log("error", "[mcl_mobspawners] Mob Spawner: Mob doesn't exist: "..mob) - return - end - - -- check objects inside 8×8 area around spawner - local objs = minetest.get_objects_inside_radius(pos, 8) - local count = 0 - local ent - - - local timer = minetest.get_node_timer(pos) - - -- spawn mob if player detected and in range - if pla > 0 then - - local in_range = 0 - local objs = minetest.get_objects_inside_radius(pos, pla) - - for _,oir in pairs(objs) do - - if oir:is_player() then - - in_range = 1 - - break - end - end - - -- player not found - if in_range == 0 then - -- Try again quickly - timer:start(2) - return - end - end - - --[[ HACK! - The doll may not stay spawned if the mob spawner is placed far away from - players, so we will check for its existance periodically when a player is nearby. - This would happen almost always when the mob spawner is placed by the mapgen. - This is probably caused by a Minetest bug: - https://github.com/minetest/minetest/issues/4759 - FIXME: Fix this horrible hack. - ]] - local doll = find_doll(pos) - if not doll then - doll = spawn_doll(pos) - set_doll_properties(doll, mob) - end - - -- count mob objects of same type in area - for k, obj in ipairs(objs) do - - ent = obj:get_luaentity() - - if ent and ent.name and ent.name == mob then - count = count + 1 - end - end - - -- Are there too many of same type? then fail - if count >= num then - timer:start(math.random(5, 20)) - return - end - - -- find air blocks within 8×3×8 nodes of spawner - local air = minetest.find_nodes_in_area( - {x = pos.x - 4, y = pos.y - 1 + yof, z = pos.z - 4}, - {x = pos.x + 4, y = pos.y + 1 + yof, z = pos.z + 4}, - {"air"}) - - -- spawn up to 4 mobs in random air blocks - if air then - local max = 4 - if spawn_count_overrides[mob] then - max = spawn_count_overrides[mob] - end - for a=1, max do - if #air <= 0 then - -- We're out of space! Stop spawning - break - end - local air_index = math.random(#air) - local pos2 = air[air_index] - local lig = minetest.get_node_light(pos2) or 0 - - pos2.y = pos2.y + 0.5 - - -- only if light levels are within range - if lig >= mlig and lig <= xlig then - minetest.add_entity(pos2, mob) - end - table.remove(air, air_index) - end - end - - -- Spawn attempt done. Next spawn attempt much later - timer:start(math.random(10, 39.95)) - -end - --- The mob spawner node. --- PLACEMENT INSTRUCTIONS: --- If this node is placed by a player, minetest.item_place, etc. default settings are applied --- automatially. --- IF this node is placed by ANY other method (e.g. minetest.set_node, LuaVoxelManip), you --- MUST call mcl_mobspawners.setup_spawner right after the spawner has been placed. -minetest.register_node("mcl_mobspawners:spawner", { - tiles = {"mob_spawner.png"}, - drawtype = "glasslike", - paramtype = "light", - walkable = true, - description = S("Mob Spawner"), - _tt_help = S("Makes mobs appear"), - _doc_items_longdesc = S("A mob spawner regularily causes mobs to appear around it while a player is nearby. Some mob spawners are disabled while in light."), - _doc_items_usagehelp = S("If you have a spawn egg, you can use it to change the mob to spawn. Just place the item on the mob spawner. Player-set mob spawners always spawn mobs regardless of the light level."), - groups = {pickaxey=1, material_stone=1, deco_block=1}, - is_ground_content = false, - drop = "", - - -- If placed by player, setup spawner with default settings - on_place = function(itemstack, placer, pointed_thing) - if pointed_thing.type ~= "node" then - return itemstack - end - - -- Use pointed node's on_rightclick function first, if present - local node = minetest.get_node(pointed_thing.under) - if placer and not placer:get_player_control().sneak then - if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].on_rightclick then - return minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, placer, itemstack) or itemstack - end - end - - local name = placer:get_player_name() - local privs = minetest.get_player_privs(name) - if not privs.maphack then - minetest.chat_send_player(name, "Placement denied. You need the “maphack” privilege to place mob spawners.") - return itemstack - end - local node_under = minetest.get_node(pointed_thing.under) - local new_itemstack, success = minetest.item_place(itemstack, placer, pointed_thing) - if success then - local placepos - if minetest.registered_nodes[node_under.name].buildable_to then - placepos = pointed_thing.under - else - placepos = pointed_thing.above - end - mcl_mobspawners.setup_spawner(placepos) - end - return new_itemstack - end, - - on_destruct = function(pos) - -- Remove doll (if any) - local obj = find_doll(pos) - if obj then - obj:remove() - end - mcl_experience.throw_xp(pos, math.random(15, 43)) - end, - - on_punch = function(pos) - respawn_doll(pos) - end, - - on_timer = spawn_mobs, - - sounds = mcl_sounds.node_sound_metal_defaults(), - - _mcl_blast_resistance = 5, - _mcl_hardness = 5, -}) - --- Mob spawner doll (rotating icon inside cage) - -local doll_def = { - hp_max = 1, - physical = false, - pointable = false, - visual = "mesh", - makes_footstep_sound = false, - timer = 0, - automatic_rotate = math.pi * 2.9, - - _mob = default_mob, -- name of the mob this doll represents -} - -doll_def.get_staticdata = function(self) - return self._mob -end - -doll_def.on_activate = function(self, staticdata, dtime_s) - local mob = staticdata - if mob == "" or mob == nil then - mob = default_mob - end - set_doll_properties(self.object, mob) - self.object:set_velocity({x=0, y=0, z=0}) - self.object:set_acceleration({x=0, y=0, z=0}) - self.object:set_armor_groups({immortal=1}) - -end - -doll_def.on_step = function(self, dtime) - -- Check if spawner is still present. If not, delete the entity - self.timer = self.timer + dtime - local n = minetest.get_node_or_nil(self.object:get_pos()) - if self.timer > 1 then - if n and n.name and n.name ~= "mcl_mobspawners:spawner" then - self.object:remove() - end - end -end - -doll_def.on_punch = function(self, hitter) end - -minetest.register_entity("mcl_mobspawners:doll", doll_def) - --- FIXME: Doll can get destroyed by /clearobjects -minetest.register_lbm({ - label = "Respawn mob spawner dolls", - name = "mcl_mobspawners:respawn_entities", - nodenames = { "mcl_mobspawners:spawner" }, - run_at_every_load = true, - action = function(pos, node) - respawn_doll(pos) - end, -}) diff --git a/mods/ITEMS/mcl_mobspawners/locale/mcl_mobspawners.de.tr b/mods/ITEMS/mcl_mobspawners/locale/mcl_mobspawners.de.tr deleted file mode 100644 index 315b432c26..0000000000 --- a/mods/ITEMS/mcl_mobspawners/locale/mcl_mobspawners.de.tr +++ /dev/null @@ -1,5 +0,0 @@ -# textdomain: mcl_mobspawners -Mob Spawner=Mobspawner -A mob spawner regularily causes mobs to appear around it while a player is nearby. Some mob spawners are disabled while in light.=Ein Mobspawner lässt regelmäßig Mobs um ihn herum auftauchen, wenn sich ein Spieler in der Nähe befindet. Einige Mobspawner werden inaktiv, wenn sie sich im Licht befinden. -If you have a spawn egg, you can use it to change the mob to spawn. Just place the item on the mob spawner. Player-set mob spawners always spawn mobs regardless of the light level.=Wenn Sie ein Spawn-Ei haben, können Sie es benutzen, um den Mobtyp, der erzeugt wird, zu ändern. Platzieren Sie den Gegenstand einfach auf dem Mobspawner. Von Spielern manipulierte Mobspawner erzeugen immer Mobs, unabhängig von der Helligkeit. -Makes mobs appear=Lässt Mobs auftauchen diff --git a/mods/ITEMS/mcl_mobspawners/locale/mcl_mobspawners.es.tr b/mods/ITEMS/mcl_mobspawners/locale/mcl_mobspawners.es.tr deleted file mode 100644 index 2b6ff97767..0000000000 --- a/mods/ITEMS/mcl_mobspawners/locale/mcl_mobspawners.es.tr +++ /dev/null @@ -1,4 +0,0 @@ -# textdomain: mcl_mobspawners -Mob Spawner=Generador de criaturas -A mob spawner regularily causes mobs to appear around it while a player is nearby. Some mob spawners are disabled while in light.=Un generador de criaturas regularmente hace que aparezcan mobs a su alrededor mientras un jugador está cerca. Algunos reproductores de las criaturas están deshabilitados mientras están a la luz. -If you have a spawn egg, you can use it to change the mob to spawn. Just place the item on the mob spawner. Player-set mob spawners always spawn mobs regardless of the light level.=Si tienes un huevo de desove, puedes usarlo para cambiar las criaturas a desovar. Simplemente coloque el artículo en el generador de criaturas. Los generadores de criaturas establecidos por el jugador siempre generan monstruos independientemente del nivel de luz. diff --git a/mods/ITEMS/mcl_mobspawners/locale/mcl_mobspawners.fr.tr b/mods/ITEMS/mcl_mobspawners/locale/mcl_mobspawners.fr.tr deleted file mode 100644 index f008ad836f..0000000000 --- a/mods/ITEMS/mcl_mobspawners/locale/mcl_mobspawners.fr.tr +++ /dev/null @@ -1,5 +0,0 @@ -# textdomain: mcl_mobspawners -Mob Spawner=Générateur de Mob -A mob spawner regularily causes mobs to appear around it while a player is nearby. Some mob spawners are disabled while in light.=Un générateur de mob fait régulièrement apparaître des mobs autour de lui tandis qu'un joueur est à proximité. Certains générateurs de mob sont désactivés lorsqu'ils sont en lumière. -If you have a spawn egg, you can use it to change the mob to spawn. Just place the item on the mob spawner. Player-set mob spawners always spawn mobs regardless of the light level.=Si vous avez un oeuf d'apparition, vous pouvez l'utiliser pour changer le mob qui apparait. Placez simplement l'objet sur le générateur de mob. Les générateurs de mobs créés par les joueurs engendrent toujours des mobs quel que soit le niveau de lumière. -Makes mobs appear=Fait apparaître les mobs diff --git a/mods/ITEMS/mcl_mobspawners/locale/mcl_mobspawners.pl.tr b/mods/ITEMS/mcl_mobspawners/locale/mcl_mobspawners.pl.tr deleted file mode 100644 index 5b4a8d896e..0000000000 --- a/mods/ITEMS/mcl_mobspawners/locale/mcl_mobspawners.pl.tr +++ /dev/null @@ -1,5 +0,0 @@ -# textdomain: mcl_mobspawners -Mob Spawner=Spawner mobów -A mob spawner regularily causes mobs to appear around it while a player is nearby. Some mob spawners are disabled while in light.=Spawner mobów sprawia, że wokół niego regularnie pojawiają się moby, gdy w pobliżu jest gracz. Niektóre spawnery są wyłączone w świetle. -If you have a spawn egg, you can use it to change the mob to spawn. Just place the item on the mob spawner. Player-set mob spawners always spawn mobs regardless of the light level.=Jeśli masz jajo spawnowania, możesz go użyć by zmienić moba, który będzie przywoływany. Aby to zrobić umieść przedmiot na spawnerze. -Makes mobs appear=Tworzy moby diff --git a/mods/ITEMS/mcl_mobspawners/locale/mcl_mobspawners.ru.tr b/mods/ITEMS/mcl_mobspawners/locale/mcl_mobspawners.ru.tr deleted file mode 100644 index c018167c04..0000000000 --- a/mods/ITEMS/mcl_mobspawners/locale/mcl_mobspawners.ru.tr +++ /dev/null @@ -1,5 +0,0 @@ -# textdomain: mcl_mobspawners -Mob Spawner=Спаунер (порождатель) мобов -A mob spawner regularily causes mobs to appear around it while a player is nearby. Some mob spawners are disabled while in light.=Спаунер постоянно вызывает появление мобов вокруг себя, пока поблизости находится игрок. Некоторые спаунеры отключаются под действием света. -If you have a spawn egg, you can use it to change the mob to spawn. Just place the item on the mob spawner. Player-set mob spawners always spawn mobs regardless of the light level.=Если у вас есть порождающее яйцо, вы можете использовать его, чтобы выбрать моба, который будет появляться. Просто поместите этот предмет на спаунер. Настроенные игроками спаунеры работают всегда, независимо от уровня освещения. -Makes mobs appear=Создаёт мобов diff --git a/mods/ITEMS/mcl_mobspawners/locale/mcl_mobspawners.zh_TW.tr b/mods/ITEMS/mcl_mobspawners/locale/mcl_mobspawners.zh_TW.tr deleted file mode 100644 index 09cdf6458a..0000000000 --- a/mods/ITEMS/mcl_mobspawners/locale/mcl_mobspawners.zh_TW.tr +++ /dev/null @@ -1,5 +0,0 @@ -# textdomain: mcl_mobspawners -Mob Spawner=生怪磚 -A mob spawner regularily causes mobs to appear around it while a player is nearby. Some mob spawners are disabled while in light.= -If you have a spawn egg, you can use it to change the mob to spawn. Just place the item on the mob spawner. Player-set mob spawners always spawn mobs regardless of the light level.=當玩家在附近時,生怪磚會定期導致生物出現在其周圍。有些生怪磚在光照下會被禁用。 -Makes mobs appear=生成生物 diff --git a/mods/ITEMS/mcl_mobspawners/locale/template.txt b/mods/ITEMS/mcl_mobspawners/locale/template.txt deleted file mode 100644 index 82357e5f05..0000000000 --- a/mods/ITEMS/mcl_mobspawners/locale/template.txt +++ /dev/null @@ -1,5 +0,0 @@ -# textdomain: mcl_mobspawners -Mob Spawner= -A mob spawner regularily causes mobs to appear around it while a player is nearby. Some mob spawners are disabled while in light.= -If you have a spawn egg, you can use it to change the mob to spawn. Just place the item on the mob spawner. Player-set mob spawners always spawn mobs regardless of the light level.= -Makes mobs appear= diff --git a/mods/ITEMS/mcl_mobspawners/mod.conf b/mods/ITEMS/mcl_mobspawners/mod.conf deleted file mode 100644 index 1759e3408c..0000000000 --- a/mods/ITEMS/mcl_mobspawners/mod.conf +++ /dev/null @@ -1,2 +0,0 @@ -name = mcl_mobspawners -depends = mcl_sounds, mcl_mobs diff --git a/mods/ITEMS/mcl_mobspawners/textures/mob_spawner.png b/mods/ITEMS/mcl_mobspawners/textures/mob_spawner.png deleted file mode 100644 index 8464193c19..0000000000 Binary files a/mods/ITEMS/mcl_mobspawners/textures/mob_spawner.png and /dev/null differ diff --git a/mods/ITEMS/mcl_throwing/API.md b/mods/ITEMS/mcl_throwing/API.md deleted file mode 100644 index 41a47223ac..0000000000 --- a/mods/ITEMS/mcl_throwing/API.md +++ /dev/null @@ -1,41 +0,0 @@ -# mcl_throwing - -## mcl_throwing.throw(throw_item, pos, dir, velocity, thrower) -Throw a throwable item. - -* throw_item: itemstring of the throwable item -* pos: initial position of the entity -* dir: direction where the throwable item will be thrown -* velocity: (optional) will overide the default velocity value (can be nil) -* thrower: (optional) player/entity who throw the object (can be nil) - -## mcl_throwing.register_throwable_object(name, entity, velocity) -Register a throwable item. - -* name: itemname of the throwable object -* entity: entity thrown -* velocity: initial velocity of the entity - -## mcl_throwing.dispense_function(stack, dispenserpos, droppos, dropnode, dropdir) -Throw throwable item from dispencer. - -Shouldn't be called directly. - -Must be used in item definition: - -`_on_dispense = mcl_throwing.dispense_function,` - -## mcl_throwing.get_player_throw_function(entity_name, velocity) - -Return a function who handle item throwing (to be used in item definition) - -Handle creative mode, and throw params. - -* entity_name: the name of the entity to throw -* velocity: (optional) velocity overide (can be nil) - -## mcl_throwing.get_staticdata(self) -Must be used in entity def if you want the entity to be saved after unloading mapblock. - -## mcl_throwing.on_activate(self, staticdata, dtime_s) -Must be used in entity def if you want the entity to be saved after unloading mapblock. diff --git a/mods/ITEMS/mcl_throwing/README.md b/mods/ITEMS/mcl_throwing/README.md deleted file mode 100644 index a1ad06a8e8..0000000000 --- a/mods/ITEMS/mcl_throwing/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# `mcl_throwing` - -It's a MineClone 2 mod containing throwable items like snowballs. - -## License of code - -- MIT License - -## License of media - -- `mcl_throwing_snowball_impact_soft.ogg`: - - License: CC BY 3.0 - - Author: YleArkisto (freesound.org) - - Source: - - Original title: `sfx_snowball_hit-03.wav` (file was edited) -- `mcl_throwing_snowball_impact_hard.ogg`: - - License: CC0 - - Author: Julien Matthey (freesound.org) - - Source: - - Original title: `JM_IMPACT_01c - Snow on cement.wav` (file was edited) -- `mcl_throwing_egg_impact.ogg`: - - License: CC0 - - Author: dav0r (freesound.org) - - Source: - - Original title: `d0_step_on_egg_04` (file was edited) -- `mcl_throwing_throw.ogg`: - - License: CC0 - - Author: kretopi (freesound.org) - - Source: - - Original title: `Arrow002.wav` (file was edited) - -- Everything else: See MineClone 2 license infos diff --git a/mods/ITEMS/mcl_throwing/init.lua b/mods/ITEMS/mcl_throwing/init.lua deleted file mode 100644 index c468946dd2..0000000000 --- a/mods/ITEMS/mcl_throwing/init.lua +++ /dev/null @@ -1,80 +0,0 @@ -mcl_throwing = {} - -local modpath = minetest.get_modpath(minetest.get_current_modname()) - --- --- Snowballs and other throwable items --- - -local GRAVITY = tonumber(minetest.settings:get("movement_gravity")) - -local entity_mapping = {} -local velocities = {} - -function mcl_throwing.register_throwable_object(name, entity, velocity) - entity_mapping[name] = entity - velocities[name] = velocity -end - -function mcl_throwing.throw(throw_item, pos, dir, velocity, thrower) - if velocity == nil then - velocity = velocities[throw_item] - end - if velocity == nil then - velocity = 22 - end - minetest.sound_play("mcl_throwing_throw", {pos=pos, gain=0.4, max_hear_distance=16}, true) - - local itemstring = ItemStack(throw_item):get_name() - local obj = minetest.add_entity(pos, entity_mapping[itemstring]) - obj:set_velocity({x=dir.x*velocity, y=dir.y*velocity, z=dir.z*velocity}) - obj:set_acceleration({x=dir.x*-3, y=-GRAVITY, z=dir.z*-3}) - if thrower then - obj:get_luaentity()._thrower = thrower - end - return obj -end - --- Throw item -function mcl_throwing.get_player_throw_function(entity_name, velocity) - local function func(item, player, pointed_thing) - local playerpos = player:get_pos() - local dir = player:get_look_dir() - mcl_throwing.throw(item, {x=playerpos.x, y=playerpos.y+1.5, z=playerpos.z}, dir, velocity, player:get_player_name()) - if not minetest.is_creative_enabled(player:get_player_name()) then - item:take_item() - end - return item - end - return func -end - -function mcl_throwing.dispense_function(stack, dispenserpos, droppos, dropnode, dropdir) - -- Launch throwable item - local shootpos = vector.add(dispenserpos, vector.multiply(dropdir, 0.51)) - mcl_throwing.throw(stack:get_name(), shootpos, dropdir) -end - --- Staticdata handling because objects may want to be reloaded -function mcl_throwing.get_staticdata(self) - local thrower - -- Only save thrower if it's a player name - if type(self._thrower) == "string" then - thrower = self._thrower - end - local data = { - _lastpos = self._lastpos, - _thrower = thrower, - } - return minetest.serialize(data) -end - -function mcl_throwing.on_activate(self, staticdata, dtime_s) - local data = minetest.deserialize(staticdata) - if data then - self._lastpos = data._lastpos - self._thrower = data._thrower - end -end - -dofile(modpath.."/register.lua") \ No newline at end of file diff --git a/mods/ITEMS/mcl_throwing/locale/mcl_throwing.de.tr b/mods/ITEMS/mcl_throwing/locale/mcl_throwing.de.tr deleted file mode 100644 index f896c2ed38..0000000000 --- a/mods/ITEMS/mcl_throwing/locale/mcl_throwing.de.tr +++ /dev/null @@ -1,12 +0,0 @@ -# textdomain: mcl_throwing -@1 used the ender pearl too often.=@1 benutzte die Enderperle zu oft. -Use the punch key to throw.=Benutzen Sie die Schlagtaste zum Werfen. -Snowball=Schneeball -Snowballs can be thrown or launched from a dispenser for fun. Hitting something with a snowball does nothing.=Schneebälle können geworfen werden oder zum Spaß aus einem Werfer abgefeuert werden. Bei einem Treffer mit einem Schneeball passiert nichts. -Egg=Ei -Eggs can be thrown or launched from a dispenser and breaks on impact. There is a small chance that 1 or even 4 chicks will pop out of the egg.=Eier können geworfen werden oder aus einem Werfer abgefeuert werden. Sie zerbrechen beim Einschlag. Mit etwas Glück werden aus dem Ei eines oder sogar 4 Küken hinausfallen. -Ender Pearl=Enderperle -An ender pearl is an item which can be used for teleportation at the cost of health. It can be thrown and teleport the thrower to its impact location when it hits a solid block or a plant. Each teleportation hurts the user by 5 hit points.=Eine Enderperle ist ein Gegenstand, der zur Teleportation benutzt werden kann auf Kosten der Gesundheit. Sie kann geworfen werden und teleportiert den Werfer zur Einschlagsstelle, wenn sie einen Block oder eine Pflanze trifft. Jede Teleportation verletzt den Werfer um 5 Trefferpunkte. -Throwable=Wurfgeschoss -Chance to hatch chicks when broken=Chance, dass beim Aufprall Küken schlüpfen -Teleports you on impact for cost of 5 HP=Teleportiert Sie beim Aufprall, kostet 5 TP diff --git a/mods/ITEMS/mcl_throwing/locale/mcl_throwing.es.tr b/mods/ITEMS/mcl_throwing/locale/mcl_throwing.es.tr deleted file mode 100644 index 35d0bbd616..0000000000 --- a/mods/ITEMS/mcl_throwing/locale/mcl_throwing.es.tr +++ /dev/null @@ -1,9 +0,0 @@ -# textdomain: mcl_throwing -@1 used the ender pearl too often.=@1 usó la perla de ender con demasiada frecuencia. -Use the punch key to throw.=Usa la tecla de golpe para lanzar. -Snowball=Bola de nieve -Snowballs can be thrown or launched from a dispenser for fun. Hitting something with a snowball does nothing.=Las bolas de nieve se pueden lanzar o lanzar desde un dispensador por diversión. Golpear algo con una bola de nieve no hace nada. -Egg=Huevo -Eggs can be thrown or launched from a dispenser and breaks on impact. There is a small chance that 1 or even 4 chicks will pop out of the egg.=Los huevos pueden ser arrojados o lanzados desde un dispensador y se rompen al impactar. Hay una pequeña posibilidad de que 1 o incluso 4 pollitos salgan del huevo. -Ender Pearl=Perla de ender -An ender pearl is an item which can be used for teleportation at the cost of health. It can be thrown and teleport the thrower to its impact location when it hits a solid block or a plant. Each teleportation hurts the user by 5 hit points.=Una perla ender es un artículo que se puede usar para teletransportarse a costa de la salud. Se puede lanzar y teletransportar al lanzador a su ubicación de impacto cuando golpea un bloque sólido o una planta. Cada teletransportación perjudica al usuario por 5 puntos de daño. diff --git a/mods/ITEMS/mcl_throwing/locale/mcl_throwing.fr.tr b/mods/ITEMS/mcl_throwing/locale/mcl_throwing.fr.tr deleted file mode 100644 index bd78c031e3..0000000000 --- a/mods/ITEMS/mcl_throwing/locale/mcl_throwing.fr.tr +++ /dev/null @@ -1,12 +0,0 @@ -# textdomain: mcl_throwing -@1 used the ender pearl too often.=@1 a utilisé la perle ender trop souvent. -Use the punch key to throw.=Utilisez la touche frapper pour lancer. -Snowball=Boule de Neige -Snowballs can be thrown or launched from a dispenser for fun. Hitting something with a snowball does nothing.=Les boules de neige peuvent être lancées ou lancées à partir d'un distributeur pour le plaisir. Toucher quelque chose avec une boule de neige ne fait rien. -Egg=Oeuf -Eggs can be thrown or launched from a dispenser and breaks on impact. There is a small chance that 1 or even 4 chicks will pop out of the egg.=Les œufs peuvent être jetés ou lancés à partir d'un distributeur et se cassent à l'impact. Il y a une petite chance que 1 ou même 4 poussins sortent de l'oeuf. -Ender Pearl=Ender Perle -An ender pearl is an item which can be used for teleportation at the cost of health. It can be thrown and teleport the thrower to its impact location when it hits a solid block or a plant. Each teleportation hurts the user by 5 hit points.=Une Perle d'Ender est un objet qui peut être utilisé pour la téléportation au détriment de la santé. Il peut être lancé et téléporter le lanceur vers son emplacement d'impact lorsqu'il frappe un bloc solide ou une plante. Chaque téléportation blesse l'utilisateur de 5 points de vie. -Throwable=Jetable -Chance to hatch chicks when broken=Possibilité d'éclosion de poussins lorsqu'ils sont brisés -Teleports you on impact for cost of 5 HP=Vous téléporte sur l'impact pour un coût de 5 PV diff --git a/mods/ITEMS/mcl_throwing/locale/mcl_throwing.pl.tr b/mods/ITEMS/mcl_throwing/locale/mcl_throwing.pl.tr deleted file mode 100644 index e27970424d..0000000000 --- a/mods/ITEMS/mcl_throwing/locale/mcl_throwing.pl.tr +++ /dev/null @@ -1,12 +0,0 @@ -# textdomain: mcl_throwing -@1 used the ender pearl too often.=@1 zbyt często używała perły kresu. -Use the punch key to throw.=Użyj przycisku ataku by rzucić. -Snowball=Śnieżka -Snowballs can be thrown or launched from a dispenser for fun. Hitting something with a snowball does nothing.=Śnieżki mogą być rzucone lub wystrzelone z dozownika dla zabawy. Uderzenie czegoś śnieżką niczego nie daje. -Egg=Jajo -Eggs can be thrown or launched from a dispenser and breaks on impact. There is a small chance that 1 or even 4 chicks will pop out of the egg.=Jaja mogą być rzucone lub wystrzelone z dozownika i rozbiją się przy uderzeniu. Jest mała szansa, że 1 lub nawet 4 kurczęta wyskoczą z jaja. -Ender Pearl=Perła kresu -An ender pearl is an item which can be used for teleportation at the cost of health. It can be thrown and teleport the thrower to its impact location when it hits a solid block or a plant. Each teleportation hurts the user by 5 hit points.=Perła kresu jest przedmiotem, który można wykorzystać do teleportacji kosztem zdrowia. Może być rzucona, a rzucający zostanie przeteleportowany w miejsce gdzie uderzyła ona stały blok lub roślinę. -Throwable=Można rzucać -Chance to hatch chicks when broken=Szansa na wyklucie kurcząt po rozbiciu -Teleports you on impact for cost of 5 HP=Teleportuje przy uderzeniu za 5 HP diff --git a/mods/ITEMS/mcl_throwing/locale/mcl_throwing.ru.tr b/mods/ITEMS/mcl_throwing/locale/mcl_throwing.ru.tr deleted file mode 100644 index 7670f729cf..0000000000 --- a/mods/ITEMS/mcl_throwing/locale/mcl_throwing.ru.tr +++ /dev/null @@ -1,12 +0,0 @@ -# textdomain: mcl_throwing -@1 used the ender pearl too often.=@1 использовал(а) жемчужину Предела слишком часто. -Use the punch key to throw.=Используй клавишу удара для броска. -Snowball=Снежок -Snowballs can be thrown or launched from a dispenser for fun. Hitting something with a snowball does nothing.=Снежки можно бросать или запускать из диспенсера для веселья. Попадание снежком в кого-либо ни к чему не приводит. -Egg=Яйцо -Eggs can be thrown or launched from a dispenser and breaks on impact. There is a small chance that 1 or even 4 chicks will pop out of the egg.=Яйца можно бросать или запускать из диспенсера, они ломаются при ударе. Есть небольшой шанс вылупления 1 или даже 4 цыплят из яйца. -Ender Pearl=Жемчужина Предела -An ender pearl is an item which can be used for teleportation at the cost of health. It can be thrown and teleport the thrower to its impact location when it hits a solid block or a plant. Each teleportation hurts the user by 5 hit points.=Жемчужина Предела это предмет, который можно использовать для телепортации за счёт единиц вашего здоровья. Его можно бросить, и это телепортирует бросившего в место удара, когда он попадает в сплошной блок или растение. Каждая телепортация ранит пользователя на 5 очков здоровья (HP). -Throwable=Можно бросать -Chance to hatch chicks when broken=Шанс вылупления цыплят при разбитии -Teleports you on impact for cost of 5 HP=Телепортирует вас при ударе за счёт 5 HP diff --git a/mods/ITEMS/mcl_throwing/locale/mcl_throwing.zh_TW.tr b/mods/ITEMS/mcl_throwing/locale/mcl_throwing.zh_TW.tr deleted file mode 100644 index 3ee2209258..0000000000 --- a/mods/ITEMS/mcl_throwing/locale/mcl_throwing.zh_TW.tr +++ /dev/null @@ -1,12 +0,0 @@ -# textdomain: mcl_throwing -@1 used the ender pearl too often.=@1 扔得太多終界珍珠了。 -Use the punch key to throw.=按下擊打鍵扔出 -Snowball=雪球 -Snowballs can be thrown or launched from a dispenser for fun. Hitting something with a snowball does nothing.=雪球可以被扔出或從發射器中發射出去取樂。用雪球打東西沒有任何作用。 -Egg=蛋 -Eggs can be thrown or launched from a dispenser and breaks on impact. There is a small chance that 1 or even 4 chicks will pop out of the egg.=雞蛋可以被拋出或從發射器中發射出去,並在撞擊中破碎。有機會,1至4個小雞會從蛋裡跳出來。 -Ender Pearl=終界珍珠 -An ender pearl is an item which can be used for teleportation at the cost of health. It can be thrown and teleport the thrower to its impact location when it hits a solid block or a plant. Each teleportation hurts the user by 5 hit points.=末影珍珠是一種可以在損失生命值的情況下用於傳送的物品。可以將其扔出並將撞到實心塊或植物時將其傳送到其撞擊位置。每次傳送都會傷害使用者5點生命值。 -Throwable=可扔出 -Chance to hatch chicks when broken=破碎時有可能孵化小雞 -Teleports you on impact for cost of 5 HP=損失5點生命值以傳送 diff --git a/mods/ITEMS/mcl_throwing/locale/template.txt b/mods/ITEMS/mcl_throwing/locale/template.txt deleted file mode 100644 index 9bb4a58176..0000000000 --- a/mods/ITEMS/mcl_throwing/locale/template.txt +++ /dev/null @@ -1,12 +0,0 @@ -# textdomain: mcl_throwing -@1 used the ender pearl too often.= -Use the punch key to throw.= -Snowball= -Snowballs can be thrown or launched from a dispenser for fun. Hitting something with a snowball does nothing.= -Egg= -Eggs can be thrown or launched from a dispenser and breaks on impact. There is a small chance that 1 or even 4 chicks will pop out of the egg.= -Ender Pearl= -An ender pearl is an item which can be used for teleportation at the cost of health. It can be thrown and teleport the thrower to its impact location when it hits a solid block or a plant. Each teleportation hurts the user by 5 hit points.= -Throwable= -Chance to hatch chicks when broken= -Teleports you on impact for cost of 5 HP= diff --git a/mods/ITEMS/mcl_throwing/mod.conf b/mods/ITEMS/mcl_throwing/mod.conf deleted file mode 100644 index 18248e76f7..0000000000 --- a/mods/ITEMS/mcl_throwing/mod.conf +++ /dev/null @@ -1,3 +0,0 @@ -name = mcl_throwing -depends = mcl_colors -optional_depends = mcl_core, mcl_mobitems, doc, mcl_target diff --git a/mods/ITEMS/mcl_throwing/register.lua b/mods/ITEMS/mcl_throwing/register.lua deleted file mode 100644 index 413bc9d5fc..0000000000 --- a/mods/ITEMS/mcl_throwing/register.lua +++ /dev/null @@ -1,348 +0,0 @@ -local S = minetest.get_translator(minetest.get_current_modname()) - -local math = math -local vector = vector - -local mod_target = minetest.get_modpath("mcl_target") - --- The snowball entity -local snowball_ENTITY={ - physical = false, - timer=0, - textures = {"mcl_throwing_snowball.png"}, - visual_size = {x=0.5, y=0.5}, - collisionbox = {0,0,0,0,0,0}, - pointable = false, - - get_staticdata = mcl_throwing.get_staticdata, - on_activate = mcl_throwing.on_activate, - _thrower = nil, - - _lastpos={}, -} - -local egg_ENTITY={ - physical = false, - timer=0, - textures = {"mcl_throwing_egg.png"}, - visual_size = {x=0.45, y=0.45}, - collisionbox = {0,0,0,0,0,0}, - pointable = false, - - get_staticdata = mcl_throwing.get_staticdata, - on_activate = mcl_throwing.on_activate, - _thrower = nil, - - _lastpos={}, -} - --- Ender pearl entity -local pearl_ENTITY={ - physical = false, - timer=0, - textures = {"mcl_throwing_ender_pearl.png"}, - visual_size = {x=0.9, y=0.9}, - collisionbox = {0,0,0,0,0,0}, - pointable = false, - - get_staticdata = mcl_throwing.get_staticdata, - on_activate = mcl_throwing.on_activate, - - _lastpos={}, - _thrower = nil, -- Player ObjectRef of the player who threw the ender pearl -} - -local function check_object_hit(self, pos, dmg) - for _,object in pairs(minetest.get_objects_inside_radius(pos, 1.5)) do - - local entity = object:get_luaentity() - - if entity - and entity.name ~= self.object:get_luaentity().name then - - if object:is_player() and self._thrower ~= object:get_player_name() then - -- TODO: Deal knockback - self.object:remove() - return true - elseif (entity.is_mob == true or entity._hittable_by_projectile) and (self._thrower ~= object) then - -- FIXME: Knockback is broken - object:punch(self.object, 1.0, { - full_punch_interval = 1.0, - damage_groups = dmg, - }, nil) - return true - end - end - end - return false -end - -local function snowball_particles(pos, vel) - local vel = vector.normalize(vector.multiply(vel, -1)) - minetest.add_particlespawner({ - amount = 20, - time = 0.001, - minpos = pos, - maxpos = pos, - minvel = vector.add({x=-2, y=3, z=-2}, vel), - maxvel = vector.add({x=2, y=5, z=2}, vel), - minacc = {x=0, y=-9.81, z=0}, - maxacc = {x=0, y=-9.81, z=0}, - minexptime = 1, - maxexptime = 3, - minsize = 0.7, - maxsize = 0.7, - collisiondetection = true, - collision_removal = true, - object_collision = false, - texture = "weather_pack_snow_snowflake"..math.random(1,2)..".png", - }) -end - --- Snowball on_step()--> called when snowball is moving. -local function snowball_on_step(self, dtime) - self.timer = self.timer + dtime - local pos = self.object:get_pos() - local vel = self.object:get_velocity() - local node = minetest.get_node(pos) - local def = minetest.registered_nodes[node.name] - - -- Destroy when hitting a solid node - if self._lastpos.x~=nil then - if (def and def.walkable) or not def then - minetest.sound_play("mcl_throwing_snowball_impact_hard", { pos = pos, max_hear_distance=16, gain=0.7 }, true) - snowball_particles(self._lastpos, vel) - self.object:remove() - if mod_target and node.name == "mcl_target:target_off" then - mcl_target.hit(vector.round(pos), 0.4) --4 redstone ticks - end - return - end - end - if check_object_hit(self, pos, {snowball_vulnerable = 3}) then - minetest.sound_play("mcl_throwing_snowball_impact_soft", { pos = pos, max_hear_distance=16, gain=0.7 }, true) - snowball_particles(pos, vel) - self.object:remove() - return - end - self._lastpos={x=pos.x, y=pos.y, z=pos.z} -- Set _lastpos-->Node will be added at last pos outside the node -end - --- Movement function of egg -local function egg_on_step(self, dtime) - self.timer = self.timer + dtime - local pos = self.object:get_pos() - local node = minetest.get_node(pos) - local def = minetest.registered_nodes[node.name] - - -- Destroy when hitting a solid node with chance to spawn chicks - if self._lastpos.x then - if (def and def.walkable) or not def then - -- 1/8 chance to spawn a chick - -- FIXME: Chicks have a quite good chance to spawn in walls - local r = math.random(1,8) - - -- Turn given object into a child - local function make_child(object) - local ent = object:get_luaentity() - object:set_properties({ - visual_size = { x = ent.base_size.x/2, y = ent.base_size.y/2 }, - collisionbox = { - ent.base_colbox[1]/2, - ent.base_colbox[2]/2, - ent.base_colbox[3]/2, - ent.base_colbox[4]/2, - ent.base_colbox[5]/2, - ent.base_colbox[6]/2, - } - }) - ent.child = true - end - if r == 1 then - make_child(minetest.add_entity(self._lastpos, "mobs_mc:chicken")) - - -- BONUS ROUND: 1/32 chance to spawn 3 additional chicks - local r = math.random(1,32) - if r == 1 then - local offsets = { - { x=0.7, y=0, z=0 }, - { x=-0.7, y=0, z=-0.7 }, - { x=-0.7, y=0, z=0.7 }, - } - for o=1, 3 do - local pos = vector.add(self._lastpos, offsets[o]) - make_child(minetest.add_entity(pos, "mobs_mc:chicken")) - end - end - end - minetest.sound_play("mcl_throwing_egg_impact", { pos = self.object:get_pos(), max_hear_distance=10, gain=0.5 }, true) - self.object:remove() - if mod_target and node.name == "mcl_target:target_off" then - mcl_target.hit(vector.round(pos), 0.4) --4 redstone ticks - end - return - end - end - - -- Destroy when hitting a mob or player (no chick spawning) - if check_object_hit(self, pos) then - minetest.sound_play("mcl_throwing_egg_impact", { pos = self.object:get_pos(), max_hear_distance=10, gain=0.5 }, true) - self.object:remove() - return - end - - self._lastpos={x=pos.x, y=pos.y, z=pos.z} -- Set lastpos-->Node will be added at last pos outside the node -end - --- Movement function of ender pearl -local function pearl_on_step(self, dtime) - self.timer = self.timer + dtime - local pos = self.object:get_pos() - pos.y = math.floor(pos.y) - local node = minetest.get_node(pos) - local nn = node.name - local def = minetest.registered_nodes[node.name] - - -- Destroy when hitting a solid node - if self._lastpos.x~=nil then - local walkable = (def and def.walkable) - - -- No teleport for hitting ignore for now. Otherwise the player could get stuck. - -- FIXME: This also means the player loses an ender pearl for throwing into unloaded areas - if node.name == "ignore" then - self.object:remove() - -- Activate when hitting a solid node or a plant - elseif walkable or nn == "mcl_core:vine" or nn == "mcl_core:deadbush" or minetest.get_item_group(nn, "flower") ~= 0 or minetest.get_item_group(nn, "sapling") ~= 0 or minetest.get_item_group(nn, "plant") ~= 0 or minetest.get_item_group(nn, "mushroom") ~= 0 or not def then - local player = self._thrower and minetest.get_player_by_name(self._thrower) - if player then - -- Teleport and hurt player - - -- First determine good teleport position - local dir = {x=0, y=0, z=0} - - local v = self.object:get_velocity() - if walkable then - local vc = table.copy(v) -- vector for calculating - -- Node is walkable, we have to find a place somewhere outside of that node - vc = vector.normalize(vc) - - -- Zero-out the two axes with a lower absolute value than - -- the axis with the strongest force - local lv, ld - lv, ld = math.abs(vc.y), "y" - if math.abs(vc.x) > lv then - lv, ld = math.abs(vc.x), "x" - end - if math.abs(vc.z) > lv then - ld = "z" --math.abs(vc.z) - end - if ld ~= "x" then vc.x = 0 end - if ld ~= "y" then vc.y = 0 end - if ld ~= "z" then vc.z = 0 end - - -- Final tweaks to the teleporting pos, based on direction - -- Impact from the side - dir.x = vc.x * -1 - dir.z = vc.z * -1 - - -- Special case: top or bottom of node - if vc.y > 0 then - -- We need more space when impact is from below - dir.y = -2.3 - elseif vc.y < 0 then - -- Standing on top - dir.y = 0.5 - end - end - -- If node was not walkable, no modification to pos is made. - - -- Final teleportation position - local telepos = vector.add(pos, dir) - local telenode = minetest.get_node(telepos) - - --[[ It may be possible that telepos is walkable due to the algorithm. - Especially when the ender pearl is faster horizontally than vertical. - This applies final fixing, just to be sure we're not in a walkable node ]] - if not minetest.registered_nodes[telenode.name] or minetest.registered_nodes[telenode.name].walkable then - if v.y < 0 then - telepos.y = telepos.y + 0.5 - else - telepos.y = telepos.y - 2.3 - end - end - - local oldpos = player:get_pos() - -- Teleport and hurt player - player:set_pos(telepos) - player:set_hp(player:get_hp() - 5, { type = "fall", from = "mod" }) - - -- 5% chance to spawn endermite at the player's origin - local r = math.random(1,20) - if r == 1 then - minetest.add_entity(oldpos, "mobs_mc:endermite") - end - - end - self.object:remove() - if mod_target and node.name == "mcl_target:target_off" then - mcl_target.hit(vector.round(pos), 0.4) --4 redstone ticks - end - return - end - end - self._lastpos={x=pos.x, y=pos.y, z=pos.z} -- Set lastpos-->Node will be added at last pos outside the node -end - -snowball_ENTITY.on_step = snowball_on_step -egg_ENTITY.on_step = egg_on_step -pearl_ENTITY.on_step = pearl_on_step - -minetest.register_entity("mcl_throwing:snowball_entity", snowball_ENTITY) -minetest.register_entity("mcl_throwing:egg_entity", egg_ENTITY) -minetest.register_entity("mcl_throwing:ender_pearl_entity", pearl_ENTITY) - - -local how_to_throw = S("Use the punch key to throw.") - --- Snowball -minetest.register_craftitem("mcl_throwing:snowball", { - description = S("Snowball"), - _tt_help = S("Throwable"), - _doc_items_longdesc = S("Snowballs can be thrown or launched from a dispenser for fun. Hitting something with a snowball does nothing."), - _doc_items_usagehelp = how_to_throw, - inventory_image = "mcl_throwing_snowball.png", - stack_max = 16, - groups = { weapon_ranged = 1 }, - on_use = mcl_throwing.get_player_throw_function("mcl_throwing:snowball_entity"), - _on_dispense = mcl_throwing.dispense_function, -}) - --- Egg -minetest.register_craftitem("mcl_throwing:egg", { - description = S("Egg"), - _tt_help = S("Throwable").."\n"..S("Chance to hatch chicks when broken"), - _doc_items_longdesc = S("Eggs can be thrown or launched from a dispenser and breaks on impact. There is a small chance that 1 or even 4 chicks will pop out of the egg."), - _doc_items_usagehelp = how_to_throw, - inventory_image = "mcl_throwing_egg.png", - stack_max = 16, - on_use = mcl_throwing.get_player_throw_function("mcl_throwing:egg_entity"), - _on_dispense = mcl_throwing.dispense_function, - groups = { craftitem = 1 }, -}) - --- Ender Pearl -minetest.register_craftitem("mcl_throwing:ender_pearl", { - description = S("Ender Pearl"), - _tt_help = S("Throwable").."\n"..minetest.colorize(mcl_colors.YELLOW, S("Teleports you on impact for cost of 5 HP")), - _doc_items_longdesc = S("An ender pearl is an item which can be used for teleportation at the cost of health. It can be thrown and teleport the thrower to its impact location when it hits a solid block or a plant. Each teleportation hurts the user by 5 hit points."), - _doc_items_usagehelp = how_to_throw, - wield_image = "mcl_throwing_ender_pearl.png", - inventory_image = "mcl_throwing_ender_pearl.png", - stack_max = 16, - on_use = mcl_throwing.get_player_throw_function("mcl_throwing:ender_pearl_entity"), - groups = { transport = 1 }, -}) - -mcl_throwing.register_throwable_object("mcl_throwing:snowball", "mcl_throwing:snowball_entity", 22) -mcl_throwing.register_throwable_object("mcl_throwing:egg", "mcl_throwing:egg_entity", 22) -mcl_throwing.register_throwable_object("mcl_throwing:ender_pearl", "mcl_throwing:ender_pearl_entity", 22) diff --git a/mods/ITEMS/mcl_throwing/sounds/mcl_throwing_egg_impact.ogg b/mods/ITEMS/mcl_throwing/sounds/mcl_throwing_egg_impact.ogg deleted file mode 100644 index c4adf57a49..0000000000 Binary files a/mods/ITEMS/mcl_throwing/sounds/mcl_throwing_egg_impact.ogg and /dev/null differ diff --git a/mods/ITEMS/mcl_throwing/sounds/mcl_throwing_snowball_impact_hard.ogg b/mods/ITEMS/mcl_throwing/sounds/mcl_throwing_snowball_impact_hard.ogg deleted file mode 100644 index a3e0a00ab3..0000000000 Binary files a/mods/ITEMS/mcl_throwing/sounds/mcl_throwing_snowball_impact_hard.ogg and /dev/null differ diff --git a/mods/ITEMS/mcl_throwing/sounds/mcl_throwing_snowball_impact_soft.ogg b/mods/ITEMS/mcl_throwing/sounds/mcl_throwing_snowball_impact_soft.ogg deleted file mode 100644 index 260cdb91a1..0000000000 Binary files a/mods/ITEMS/mcl_throwing/sounds/mcl_throwing_snowball_impact_soft.ogg and /dev/null differ diff --git a/mods/ITEMS/mcl_throwing/sounds/mcl_throwing_throw.ogg b/mods/ITEMS/mcl_throwing/sounds/mcl_throwing_throw.ogg deleted file mode 100644 index acd9c04506..0000000000 Binary files a/mods/ITEMS/mcl_throwing/sounds/mcl_throwing_throw.ogg and /dev/null differ diff --git a/mods/ITEMS/mcl_throwing/textures/mcl_throwing_egg.png b/mods/ITEMS/mcl_throwing/textures/mcl_throwing_egg.png deleted file mode 100644 index bc2e9fe35b..0000000000 Binary files a/mods/ITEMS/mcl_throwing/textures/mcl_throwing_egg.png and /dev/null differ diff --git a/mods/ITEMS/mcl_throwing/textures/mcl_throwing_ender_pearl.png b/mods/ITEMS/mcl_throwing/textures/mcl_throwing_ender_pearl.png deleted file mode 100644 index 61e1786d2b..0000000000 Binary files a/mods/ITEMS/mcl_throwing/textures/mcl_throwing_ender_pearl.png and /dev/null differ diff --git a/mods/ITEMS/mcl_throwing/textures/mcl_throwing_snowball.png b/mods/ITEMS/mcl_throwing/textures/mcl_throwing_snowball.png deleted file mode 100644 index 5fcc76f2fc..0000000000 Binary files a/mods/ITEMS/mcl_throwing/textures/mcl_throwing_snowball.png and /dev/null differ diff --git a/mods/ITEMS/mcl_tnt/README.txt b/mods/ITEMS/mcl_tnt/README.txt deleted file mode 100644 index 5b1c107980..0000000000 --- a/mods/ITEMS/mcl_tnt/README.txt +++ /dev/null @@ -1,19 +0,0 @@ -=== TNT mod for Minetest === -by PilzAdam. HEAVILY modified for MineClone 2. - -Introduction: -This mod adds TNT. TNT is a tool to help the player in mining. - -How to use the mod: -There are different ways to blow up TNT: -1. Hit it with flint and steel. -2. Activate it with redstone circuits -Be aware of the damage radius! - -License of mod code and media: -MIT License - -Sound credits: - -* tnt_explode.ogg: Jose Ortiz 'MindChamber' (CC0) -* tnt_ignite.ogg: Own derivate work of sound by Ned Bouhalassa (CC0) created in 2005, source: diff --git a/mods/ITEMS/mcl_tnt/init.lua b/mods/ITEMS/mcl_tnt/init.lua deleted file mode 100644 index bf7b523853..0000000000 --- a/mods/ITEMS/mcl_tnt/init.lua +++ /dev/null @@ -1,202 +0,0 @@ -local S = minetest.get_translator(minetest.get_current_modname()) -local tnt_griefing = minetest.settings:get_bool("mcl_tnt_griefing", true) - -local function spawn_tnt(pos, entname) - minetest.sound_play("tnt_ignite", {pos = pos,gain = 1.0,max_hear_distance = 15,}, true) - local tnt = minetest.add_entity(pos, entname) - tnt:set_armor_groups({immortal=1}) - return tnt -end - -tnt = {} - -function tnt.ignite(pos) - minetest.remove_node(pos) - local e = spawn_tnt(pos, "mcl_tnt:tnt") - minetest.check_for_falling(pos) - return e -end - --- Add smoke particle of entity at pos. --- Intended to be called every step -function tnt.smoke_step(pos) - minetest.add_particle({ - pos = {x=pos.x,y=pos.y+0.5,z=pos.z}, - velocity = vector.new(math.random() * 0.2 - 0.1, 1.0 + math.random(), math.random() * 0.2 - 0.1), - acceleration = vector.new(0, -0.1, 0), - expirationtime = 0.15 + math.random() * 0.25, - size = 1.0 + math.random(), - collisiondetection = false, - texture = "mcl_particles_smoke.png" - }) -end - -tnt.BOOMTIMER = 4 -tnt.BLINKTIMER = 0.25 - -local TNT_RANGE = 3 - -local sounds -if minetest.get_modpath("mcl_sounds") then - sounds = mcl_sounds.node_sound_wood_defaults() -end -local tnt_mesecons -if minetest.get_modpath("mesecons") then - tnt_mesecons = {effector = { - action_on = tnt.ignite, - rules = mesecon.rules.alldirs, - }} -end - -local longdesc -if tnt_griefing then - longdesc = S("An explosive device. When it explodes, it will hurt living beings and destroy blocks around it. TNT has an explosion radius of @1. With a small chance, blocks may drop as an item (as if being mined) rather than being destroyed. TNT can be ignited by tools, explosions, fire, lava and redstone signals.", TNT_RANGE) -else - longdesc = S("An explosive device. When it explodes, it will hurt living beings. TNT has an explosion radius of @1. TNT can be ignited by tools, explosions, fire, lava and redstone signals.", TNT_RANGE) -end - -minetest.register_node("mcl_tnt:tnt", { - tiles = {"default_tnt_top.png", "default_tnt_bottom.png", - "default_tnt_side.png", "default_tnt_side.png", - "default_tnt_side.png", "default_tnt_side.png"}, - is_ground_content = false, - stack_max = 64, - description = S("TNT"), - paramtype = "light", - sunlight_propagates = true, - _tt_help = S("Ignited by tools, explosions, fire, lava, redstone power").."\n"..S("Explosion radius: @1", tostring(TNT_RANGE)), - _doc_items_longdesc = longdesc, - _doc_items_usagehelp = S("Place the TNT and ignite it with one of the methods above. Quickly get in safe distance. The TNT will start to be affected by gravity and explodes in 4 seconds."), - groups = { dig_immediate = 3, tnt = 1, enderman_takable=1, flammable=-1 }, - mesecons = tnt_mesecons, - on_blast = function(pos) - local e = tnt.ignite(pos) - e:get_luaentity().timer = tnt.BOOMTIMER - (0.5 + math.random()) - end, - _on_ignite = function(player, pointed_thing) - tnt.ignite(pointed_thing.under) - return true - end, - _on_burn = function(pos) - tnt.ignite(pos) - return true - end, - _on_dispense = function(stack, pos, droppos, dropnode, dropdir) - -- Place and ignite TNT - if minetest.registered_nodes[dropnode.name].buildable_to then - minetest.set_node(droppos, {name = stack:get_name()}) - tnt.ignite(droppos) - end - end, - sounds = sounds, -}) - -local TNT = { - -- Static definition - physical = true, -- Collides with things - --weight = -100, - collisionbox = {-0.5,-0.5,-0.5, 0.5,0.5,0.5}, - visual = "cube", - textures = {"default_tnt_top.png", "default_tnt_bottom.png", - "default_tnt_side.png", "default_tnt_side.png", - "default_tnt_side.png", "default_tnt_side.png"}, - -- Initial value for our timer - timer = 0, - blinktimer = 0, - tnt_knockback = true, - blinkstatus = true,} - -function TNT:on_activate(staticdata) - local phi = math.random(0, 65535) / 65535 * 2*math.pi - local hdir_x = math.cos(phi) * 0.02 - local hdir_z = math.sin(phi) * 0.02 - self.object:set_velocity({x=hdir_x, y=2, z=hdir_z}) - self.object:set_acceleration({x=0, y=-10, z=0}) - self.object:set_texture_mod("^mcl_tnt_blink.png") -end - ---[[local function add_effects(pos, radius, drops) - minetest.add_particlespawner({ - amount = 64, - time = 0.5, - minpos = vector.subtract(pos, radius / 2), - maxpos = vector.add(pos, radius / 2), - minvel = {x = -10, y = -10, z = -10}, - maxvel = {x = 10, y = 10, z = 10}, - minacc = vector.new(), - maxacc = vector.new(), - minexptime = 1, - maxexptime = 2.5, - minsize = radius * 1, - maxsize = radius * 3, - texture = "mcl_particles_smoke.png", - }) - - -- we just dropped some items. Look at the items entities and pick - -- one of them to use as texture - local texture = "mcl_particles_smoke.png" --fallback texture - local most = 0 - for name, stack in pairs(drops) do - local count = stack:get_count() - if count > most then - most = count - local def = minetest.registered_nodes[name] - if def and def.tiles and def.tiles[1] then - texture = def.tiles[1] - end - end - end - - minetest.add_particlespawner({ - amount = 32, - time = 0.1, - minpos = vector.subtract(pos, radius / 2), - maxpos = vector.add(pos, radius / 2), - minvel = {x = -3, y = 0, z = -3}, - maxvel = {x = 3, y = 5, z = 3}, - minacc = {x = 0, y = -10, z = 0}, - minexptime = 0.8, - maxexptime = 2.0, - minsize = radius * 0.66, - maxsize = radius * 2, - texture = texture, - collisiondetection = true, - }) -end]] - -function TNT:on_step(dtime) - local pos = self.object:get_pos() - tnt.smoke_step(pos) - self.timer = self.timer + dtime - self.blinktimer = self.blinktimer + dtime - if self.blinktimer > tnt.BLINKTIMER then - self.blinktimer = self.blinktimer - tnt.BLINKTIMER - if self.blinkstatus then - self.object:set_texture_mod("") - else - self.object:set_texture_mod("^mcl_tnt_blink.png") - end - self.blinkstatus = not self.blinkstatus - end - if self.timer > tnt.BOOMTIMER then - mcl_explosions.explode(self.object:get_pos(), 4, {}, self.object) - self.object:remove() - end -end - -minetest.register_entity("mcl_tnt:tnt", TNT) - -if minetest.get_modpath("mcl_mobitems") then - minetest.register_craft({ - output = "mcl_tnt:tnt", - recipe = { - {"mcl_mobitems:gunpowder", "group:sand", "mcl_mobitems:gunpowder"}, - {"group:sand", "mcl_mobitems:gunpowder", "group:sand"}, - {"mcl_mobitems:gunpowder", "group:sand", "mcl_mobitems:gunpowder"} - } - }) -end - -if minetest.get_modpath("doc_identifier") then - doc.sub.identifier.register_object("mcl_tnt:tnt", "nodes", "mcl_tnt:tnt") -end diff --git a/mods/ITEMS/mcl_tnt/locale/mcl_tnt.de.tr b/mods/ITEMS/mcl_tnt/locale/mcl_tnt.de.tr deleted file mode 100644 index 71c99cded1..0000000000 --- a/mods/ITEMS/mcl_tnt/locale/mcl_tnt.de.tr +++ /dev/null @@ -1,8 +0,0 @@ -# textdomain: mcl_tnt -@1 was caught in an explosion.=@1 wurde Opfer einer Explosion. -TNT=TNT -An explosive device. When it explodes, it will hurt living beings and destroy blocks around it. TNT has an explosion radius of @1. With a small chance, blocks may drop as an item (as if being mined) rather than being destroyed. TNT can be ignited by tools, explosions, fire, lava and redstone signals.=Ein Sprengstoff. Wenn er explodiert, wird er Lebewesen verletzen und Blöcke in der Nähe zerstören. TNT hat einen Explosionsradius von @1. Mit einer geringen Wahrscheinlichkeit werden Blöcke als Gegenstand abfallen (als ob sie abgebaut worden wären), anstatt völlig zerstört zu werden. TNT kann mit Werkzeugen, Explosionen, Feuer, Lava und Redstone-Signalen angezündet werden. -An explosive device. When it explodes, it will hurt living beings. TNT has an explosion radius of @1. TNT can be ignited by tools, explosions, fire, lava and redstone signals.=Ein Sprengstoff. Wenn er explodiert, wird er Lebewesen verletzen. TNT hat einen Explosionsradius von @1. TNT kann mit Werkzeugen, Explosionen, Feuer, Lava und Redstone-Signalen angezündet werden. -Place the TNT and ignite it with one of the methods above. Quickly get in safe distance. The TNT will start to be affected by gravity and explodes in 4 seconds.=Platizeren sie das TNT und zünden Sie es mit einer der obigen Methoden an. Begeben Sie sich rasch in eine sichere Entfernung. Das TNT wird anfangen, von der Schwerkraft beeinflusst zu sein und explodiert in 4 Sekunden. -Ignited by tools, explosions, fire, lava, redstone power=Anzündbar von Werkzeugen, Explosionen, Feuer, Redstoneeergie -Explosion radius: @1=Explosionsradius: @1 diff --git a/mods/ITEMS/mcl_tnt/locale/mcl_tnt.es.tr b/mods/ITEMS/mcl_tnt/locale/mcl_tnt.es.tr deleted file mode 100644 index 81d30dcd7c..0000000000 --- a/mods/ITEMS/mcl_tnt/locale/mcl_tnt.es.tr +++ /dev/null @@ -1,5 +0,0 @@ -# textdomain: mcl_tnt -@1 was caught in an explosion.=@1 wurde Opfer einer Explosion. -TNT=Dinamita -An explosive device. When it explodes, it will hurt living beings and destroy blocks around it. TNT has an explosion radius of @1. With a small chance, blocks may drop as an item (as if being mined) rather than being destroyed. TNT can be ignited by tools, explosions, fire, lava and redstone signals.=Un artefacto explosivo. Cuando explota, dañará a los seres vivos y destruirá los bloques a su alrededor. La dinamita tiene un radio de explosión de @1. Con una pequeña posibilidad, los bloques pueden caer como un elemento (como si se extrajera) en lugar de ser destruidos. La dinamita puede encenderse con herramientas, explosiones, fuego, lava y señales de redstone. -Place the TNT and ignite it with one of the methods above. Quickly get in safe distance. The TNT will start to be affected by gravity and explodes in 4 seconds.=Coloque el dinamita y enciéndalo con uno de los métodos anteriores. Aléjese rápidamente a una distancia segura. La dinamita comenzará a verse afectada por la gravedad y explotará en 4 segundos. diff --git a/mods/ITEMS/mcl_tnt/locale/mcl_tnt.fr.tr b/mods/ITEMS/mcl_tnt/locale/mcl_tnt.fr.tr deleted file mode 100644 index b5cba53bf6..0000000000 --- a/mods/ITEMS/mcl_tnt/locale/mcl_tnt.fr.tr +++ /dev/null @@ -1,8 +0,0 @@ -# textdomain: mcl_tnt -@1 was caught in an explosion.=@1 a été pris dans une explosion. -TNT=TNT -An explosive device. When it explodes, it will hurt living beings and destroy blocks around it. TNT has an explosion radius of @1. With a small chance, blocks may drop as an item (as if being mined) rather than being destroyed. TNT can be ignited by tools, explosions, fire, lava and redstone signals.=Un engin explosif. Quand il explose, il blessera les êtres vivants et détruira les blocs autour de lui. La TNT a un rayon d'explosion de @1. Avec une petite chance, les blocs peuvent tomber comme un objet (comme s'ils étaient minés) plutôt que d'être détruits. La TNT peut être enflammée par des outils, des explosions, des feux d'incendie, de la lave et de la redstone. -An explosive device. When it explodes, it will hurt living beings. TNT has an explosion radius of @1. TNT can be ignited by tools, explosions, fire, lava and redstone signals.=Un engin explosif. Quand elle explose, elle blessera les êtres vivants. La TNT a un rayon d'explosion de @1. La TNT peut être enflammée par des outils, des explosions, des feux d'incendie, de la lave et de la redstone. -Place the TNT and ignite it with one of the methods above. Quickly get in safe distance. The TNT will start to be affected by gravity and explodes in 4 seconds.=Placez la TNT et allumez-la avec l'une des méthodes ci-dessus. Déplacez-vous rapidement à une distance de sécurité. La TNT commencera à être affecté par la gravité et explose en 4 secondes. -Ignited by tools, explosions, fire, lava, redstone power=Enflammé par les outils, les explosions, le feu, la lave, la redstone -Explosion radius: @1=Rayon d'explosion: @1 diff --git a/mods/ITEMS/mcl_tnt/locale/mcl_tnt.pl.tr b/mods/ITEMS/mcl_tnt/locale/mcl_tnt.pl.tr deleted file mode 100644 index 39e5206848..0000000000 --- a/mods/ITEMS/mcl_tnt/locale/mcl_tnt.pl.tr +++ /dev/null @@ -1,8 +0,0 @@ -# textdomain: mcl_tnt -@1 was caught in an explosion.=@1 została wysadzona. -TNT=Trotyl -An explosive device. When it explodes, it will hurt living beings and destroy blocks around it. TNT has an explosion radius of @1. With a small chance, blocks may drop as an item (as if being mined) rather than being destroyed. TNT can be ignited by tools, explosions, fire, lava and redstone signals.=Wybuchowy materiał. Gdy wybucha rani żywe istoty w pobliżu i niszczy pobliskie bloki. Trotyl ma promień wybuchu równy @1. Trotyl może być zapalony narzędziami, eksplozjami, ogniem, lawą i energią z czerwienitu. -An explosive device. When it explodes, it will hurt living beings. TNT has an explosion radius of @1. TNT can be ignited by tools, explosions, fire, lava and redstone signals.=Materiał wybuchowy Gdy wybucha rani żywe istoty. Trotyl ma promień wybuchu równy @1. Trotyl może być zapalony narzędziami, eksplozjami, ogniem, lawą i energią z czerwienitu. -Place the TNT and ignite it with one of the methods above. Quickly get in safe distance. The TNT will start to be affected by gravity and explodes in 4 seconds.=Postaw trotyl i zapal go za pomocą metod opisanych powyżej. Szybko oddal się na bezpieczny dystans. Na trotyl zacznie działać grawitacja, a po 4 sekundach wybuchnie. -Ignited by tools, explosions, fire, lava, redstone power=Zapalany przez narzędzia, eksplozję, ogień lawę, energię z czerwienitu -Explosion radius: @1=Promień wybuchu: @1 diff --git a/mods/ITEMS/mcl_tnt/locale/mcl_tnt.ru.tr b/mods/ITEMS/mcl_tnt/locale/mcl_tnt.ru.tr deleted file mode 100644 index 9724c75526..0000000000 --- a/mods/ITEMS/mcl_tnt/locale/mcl_tnt.ru.tr +++ /dev/null @@ -1,8 +0,0 @@ -# textdomain: mcl_tnt -@1 was caught in an explosion.=@1 попал в радиус действия взрыва. -TNT=Тротил -An explosive device. When it explodes, it will hurt living beings and destroy blocks around it. TNT has an explosion radius of @1. With a small chance, blocks may drop as an item (as if being mined) rather than being destroyed. TNT can be ignited by tools, explosions, fire, lava and redstone signals.=Взрывное устройство. Когда оно взрывается, то причиняет вред живым существам и разрушает блоки вокруг себя. Тротил имеет радиус взрыва @1. С небольшой вероятностью блоки могут выпадать в качестве предметов (как при добыче), а не уничтожаться. Тротил может быть подорван инструментами, взрывами, огнём, лавой и сигналами редстоуна. -An explosive device. When it explodes, it will hurt living beings. TNT has an explosion radius of @1. TNT can be ignited by tools, explosions, fire, lava and redstone signals.=Взрывное устройство. Когда оно взрывается, то причиняет вред живым существам и разрушает блоки вокруг себя. Тротил имеет радиус взрыва @1. Тротил может быть подорван инструментами, взрывами, огнём, лавой и сигналами редстоуна. -Place the TNT and ignite it with one of the methods above. Quickly get in safe distance. The TNT will start to be affected by gravity and explodes in 4 seconds.=Разместите тротил, зажгите его одним из методов, описанных выше. Отбегите на безопасное расстояние. Тротил начнет подвергаться воздействию силы тяжести и взорвётся через 4 секунды. -Ignited by tools, explosions, fire, lava, redstone power=Зажигается инструментами, взрывами, огнём, лавой, энергией редстоуна -Explosion radius: @1=Радиус взрыва: @1 diff --git a/mods/ITEMS/mcl_tnt/locale/mcl_tnt.zh_TW.tr b/mods/ITEMS/mcl_tnt/locale/mcl_tnt.zh_TW.tr deleted file mode 100644 index aaa4c1e524..0000000000 --- a/mods/ITEMS/mcl_tnt/locale/mcl_tnt.zh_TW.tr +++ /dev/null @@ -1,8 +0,0 @@ -# textdomain: mcl_tnt -@1 was caught in an explosion.=@1被炸飛了。 -TNT= -An explosive device. When it explodes, it will hurt living beings and destroy blocks around it. TNT has an explosion radius of @1. With a small chance, blocks may drop as an item (as if being mined) rather than being destroyed. TNT can be ignited by tools, explosions, fire, lava and redstone signals.=一個爆炸性裝置。當它爆炸時,會傷害生物,並摧毀周圍的方塊。TNT的爆炸半徑為@1。有很小的機率,方塊可能會作為物品掉落(就像被開採一樣)而不是被摧毀。TNT可以被工具、爆炸、火、熔岩和紅石信號點燃。 -An explosive device. When it explodes, it will hurt living beings. TNT has an explosion radius of @1. TNT can be ignited by tools, explosions, fire, lava and redstone signals.=一個爆炸性裝置。當它爆炸時,會傷害生物,並摧毀周圍的方塊。TNT的爆炸半徑為@1。TNT可以被工具、爆炸、火、熔岩和紅石信號點燃。 -Place the TNT and ignite it with one of the methods above. Quickly get in safe distance. The TNT will start to be affected by gravity and explodes in 4 seconds.=放置TNT,並用上述方法之一點燃它。迅速和TNT保持安全距離。TNT將開始受到重力的影響,並在4秒內爆炸。 -Ignited by tools, explosions, fire, lava, redstone power=被工具、爆炸、火、熔岩和紅石信號點燃。 -Explosion radius: @1=爆炸半徑:@1 diff --git a/mods/ITEMS/mcl_tnt/locale/template.txt b/mods/ITEMS/mcl_tnt/locale/template.txt deleted file mode 100644 index 0361b76bca..0000000000 --- a/mods/ITEMS/mcl_tnt/locale/template.txt +++ /dev/null @@ -1,8 +0,0 @@ -# textdomain: mcl_tnt -@1 was caught in an explosion.= -TNT= -An explosive device. When it explodes, it will hurt living beings and destroy blocks around it. TNT has an explosion radius of @1. With a small chance, blocks may drop as an item (as if being mined) rather than being destroyed. TNT can be ignited by tools, explosions, fire, lava and redstone signals.= -An explosive device. When it explodes, it will hurt living beings. TNT has an explosion radius of @1. TNT can be ignited by tools, explosions, fire, lava and redstone signals.= -Place the TNT and ignite it with one of the methods above. Quickly get in safe distance. The TNT will start to be affected by gravity and explodes in 4 seconds.= -Ignited by tools, explosions, fire, lava, redstone power= -Explosion radius: @1= diff --git a/mods/ITEMS/mcl_tnt/mod.conf b/mods/ITEMS/mcl_tnt/mod.conf deleted file mode 100644 index 2e90ddb80b..0000000000 --- a/mods/ITEMS/mcl_tnt/mod.conf +++ /dev/null @@ -1,3 +0,0 @@ -name = mcl_tnt -depends = mcl_explosions, mcl_particles -optional_depends = mcl_sounds, mcl_mobitems, doc_identifier, mesecons diff --git a/mods/ITEMS/mcl_tnt/sounds/tnt_explode.ogg b/mods/ITEMS/mcl_tnt/sounds/tnt_explode.ogg deleted file mode 100644 index 1691a41bc0..0000000000 Binary files a/mods/ITEMS/mcl_tnt/sounds/tnt_explode.ogg and /dev/null differ diff --git a/mods/ITEMS/mcl_tnt/sounds/tnt_ignite.ogg b/mods/ITEMS/mcl_tnt/sounds/tnt_ignite.ogg deleted file mode 100644 index aa232f0dec..0000000000 Binary files a/mods/ITEMS/mcl_tnt/sounds/tnt_ignite.ogg and /dev/null differ diff --git a/mods/ITEMS/mcl_tnt/textures/default_tnt_bottom.png b/mods/ITEMS/mcl_tnt/textures/default_tnt_bottom.png deleted file mode 100644 index 61b911be9f..0000000000 Binary files a/mods/ITEMS/mcl_tnt/textures/default_tnt_bottom.png and /dev/null differ diff --git a/mods/ITEMS/mcl_tnt/textures/default_tnt_side.png b/mods/ITEMS/mcl_tnt/textures/default_tnt_side.png deleted file mode 100644 index 8eda266e61..0000000000 Binary files a/mods/ITEMS/mcl_tnt/textures/default_tnt_side.png and /dev/null differ diff --git a/mods/ITEMS/mcl_tnt/textures/default_tnt_top.png b/mods/ITEMS/mcl_tnt/textures/default_tnt_top.png deleted file mode 100644 index b8f8d39a63..0000000000 Binary files a/mods/ITEMS/mcl_tnt/textures/default_tnt_top.png and /dev/null differ diff --git a/mods/ITEMS/mcl_tnt/textures/mcl_tnt_blink.png b/mods/ITEMS/mcl_tnt/textures/mcl_tnt_blink.png deleted file mode 100644 index b6739757d9..0000000000 Binary files a/mods/ITEMS/mcl_tnt/textures/mcl_tnt_blink.png and /dev/null differ diff --git a/mods/PLAYER/mcl_death_drop/API.md b/mods/PLAYER/mcl_death_drop/API.md deleted file mode 100644 index 3fc5163e54..0000000000 --- a/mods/PLAYER/mcl_death_drop/API.md +++ /dev/null @@ -1,14 +0,0 @@ -# mcl_death_drop -Drop registered inventories on player death. - -## mcl_death_drop.register_dropped_list(inv, listname, drop) -* inv: can be: - * "PLAYER": will be interpreted like player inventory (to avoid multiple calling to get_inventory()) - * function(player): must return inventory -* listname: string -* drop: bool - * true: the list will be dropped - * false: the list will only be cleared - -## mcl_death_drop.registered_dropped_lists -Table containing dropped list inventory, name and drop state. \ No newline at end of file diff --git a/mods/PLAYER/mcl_death_drop/init.lua b/mods/PLAYER/mcl_death_drop/init.lua deleted file mode 100644 index 5ea548ecc7..0000000000 --- a/mods/PLAYER/mcl_death_drop/init.lua +++ /dev/null @@ -1,57 +0,0 @@ -local random = math.random - -local ipairs = ipairs - -mcl_death_drop = {} - -mcl_death_drop.registered_dropped_lists = {} - -function mcl_death_drop.register_dropped_list(inv, listname, drop) - table.insert(mcl_death_drop.registered_dropped_lists, {inv = inv, listname = listname, drop = drop}) -end - -mcl_death_drop.register_dropped_list("PLAYER", "main", true) -mcl_death_drop.register_dropped_list("PLAYER", "craft", true) -mcl_death_drop.register_dropped_list("PLAYER", "armor", true) -mcl_death_drop.register_dropped_list("PLAYER", "offhand", true) - -minetest.register_on_dieplayer(function(player) - local keep = minetest.settings:get_bool("mcl_keepInventory", false) - if keep == false then - -- Drop inventory, crafting grid and armor - local playerinv = player:get_inventory() - local pos = player:get_pos() - -- No item drop if in deep void - local _, void_deadly = mcl_worlds.is_in_void(pos) - - for l=1,#mcl_death_drop.registered_dropped_lists do - local inv = mcl_death_drop.registered_dropped_lists[l].inv - if inv == "PLAYER" then - inv = playerinv - elseif type(inv) == "function" then - inv = inv(player) - end - local listname = mcl_death_drop.registered_dropped_lists[l].listname - local drop = mcl_death_drop.registered_dropped_lists[l].drop - if inv then - for i, stack in ipairs(inv:get_list(listname)) do - local x = random(0, 9)/3 - local z = random(0, 9)/3 - pos.x = pos.x + x - pos.z = pos.z + z - if not void_deadly and drop and not mcl_enchanting.has_enchantment(stack, "curse_of_vanishing") then - local def = minetest.registered_items[stack:get_name()] - if def and def.on_drop then - stack = def.on_drop(stack, player, pos) - end - minetest.add_item(pos, stack) - end - pos.x = pos.x - x - pos.z = pos.z - z - end - inv:set_list(listname, {}) - end - end - mcl_armor.update(player) - end -end) diff --git a/mods/PLAYER/mcl_death_drop/mod.conf b/mods/PLAYER/mcl_death_drop/mod.conf deleted file mode 100644 index 09a8c61faa..0000000000 --- a/mods/PLAYER/mcl_death_drop/mod.conf +++ /dev/null @@ -1,4 +0,0 @@ -name = mcl_death_drop -author = Wuzzy -description = Makes all items in inventory drop after player death. -depends = mcl_armor, mcl_enchanting diff --git a/mods/PLAYER/mcl_hunger/API.md b/mods/PLAYER/mcl_hunger/API.md deleted file mode 100644 index 57d158c48c..0000000000 --- a/mods/PLAYER/mcl_hunger/API.md +++ /dev/null @@ -1,57 +0,0 @@ -# API information (WIP) -This API information is not complete yet. -The mod API is still pretty much unofficial; this mod is mostly seen -as standalone for now. - -This may change in the future development of MineClone 2. Hopefully. - -## Mod state -The hunger mechanic is disabled when damage is disabled -(setting `enable_damage=false`). -You can check the hunger state with `mcl_hunger.active`. If it's true, -then hunger is active. - -If the hunger is disabled, most of the functions are no-ops or return -default values. - -## Player values -### Hunger level -The hunger level of the player is a whole number between 0 and 20 inclusive. -0 is starving and 20 is full. The hunger level is represented in -the HUD by a statbar with 20 half-icons. - -### Saturation -To be written ... - -### Exhaustion -To be written ... - -## Functions -This API documentation is not complete yet, more documentation will -come. - -### `mcl_hunger.get_hunger(player)` -Returns the current hunger level of `player` (ObjectRef). - -### `mcl_hunger.set_hunger(player, hunger)` -Sets the hunger level of `player` (ObjectRef) to `hunger` immediately. -`hunger` ***must*** be between 0 and 20 inclusive. - -### `mcl_hunger.exhaust(player, exhaust)` -Increase exhaustion of player by `exhaust`. - -### `mcl_hunger.stop_poison(player)` -Immediately stops food poisoning for player. - -### More functions ... -There are more functions (of less importance) available, see `api.lua`. - -## Groups -Items in group `food=3` will make a drinking sound and no particles. -Items in group `food` with any other rating will make an eating sound and particles, -based on the inventory image or wield image (whatever is available first). - -## Suppressing food particles -Normally, all food items considered food (not drinks) make food particles. -You can suppress the food particles by adding the field -`_food_particles=false` to the item definition. diff --git a/mods/PLAYER/mcl_hunger/README.md b/mods/PLAYER/mcl_hunger/README.md deleted file mode 100644 index 47a7fce8c9..0000000000 --- a/mods/PLAYER/mcl_hunger/README.md +++ /dev/null @@ -1,54 +0,0 @@ -# Hunger for MineClone 2 [`mcl_hunger`] - -* Forked from `hbhunger`, version: 0.5.2 - -## Using the mod - -This mod adds a mechanic for hunger. -This mod depends on the HUD bars mod [`hudbars`], version 1.4.1 or any later version -starting with “1.”. - -## About hunger -This mod adds a hunger mechanic to the game. Players get a new attribute called “satiation”: - -* A new player starts with 20 satiation points out of 20 -* Actions like digging, placing and walking cause exhaustion, which lower the satiation -* Every 800 seconds you lose 1 satiation point without doing anything -* At 1 or 0 satiation you will suffer damage and die in case you don't eat something -* If your satiation is 16 or higher, you will slowly regenerate health points -* Eating food will increase your satiation (Duh!) - -## Statbar mode -If you use the statbar mode of the HUD Bars mod, these things are important to know: -As with all mods using HUD Bars, the bread statbar symbols represent the rough percentage -out of 30 satiation points, in steps of 5%, so the symbols give you an estimate of your -satiation. This is different from the hunger mod by BlockMen. - -You gain health at 5.5 symbols or more, as 5.5 symbols correspond to 16 satiation points. -You *may* lose health at exactly 0.5 symbols, as 0.5 symbols correspond to 1-2 satiation points. - -### Examples - -* Eating an apple (from Minetest Game) increases your satiation by 2; -* eating a bread (from Minetest Game) increases your satiation by 4. - -## Licensing -This mod is free software. - -### Source code - -* License: [LGPL v2.1](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html) -* Author: by Wuzzy (2015-2016) -* Forked from `hbhunger` for MineClone 2. `hbhunger` in turn was forked from the “Better HUD - (and hunger)” mod by BlockMen (2013-2015), most code comes from this mod. - -### Textures and sounds - -* `hbhunger_icon.png`—PilzAdam ([WTFPL](http://www.wtfpl.net/txt/copying/)), modified by BlockMen -* `hbhunger_bgicon.png`—PilzAdam (WTFPL), modified by BlockMen -* `hbhunger_bar.png—Wuzzy` (WTFPL) -* `hbhunger_icon_health_poison.png`—celeron55 ([CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/)), modified by BlockMen, modified again by Wuzzy -* `mcl_hunger_bite.1.ogg`, `mcl_hungr_bite.2.ogg`: WTFPL -* `survival_thirst_drink.ogg`: WTFPL -* Everything else: WTFPL, by BlockMen and Wuzzy - diff --git a/mods/PLAYER/mcl_hunger/api.lua b/mods/PLAYER/mcl_hunger/api.lua deleted file mode 100644 index 20937023a9..0000000000 --- a/mods/PLAYER/mcl_hunger/api.lua +++ /dev/null @@ -1,160 +0,0 @@ -mcl_hunger.registered_foods = {} - -function mcl_hunger.init_player(player) - local meta = player:get_meta() - if meta:get_string("mcl_hunger:hunger") == "" then - meta:set_string("mcl_hunger:hunger", tostring(20)) - end - if meta:get_string("mcl_hunger:saturation") == "" then - meta:set_string("mcl_hunger:saturation", tostring(mcl_hunger.SATURATION_INIT)) - end - if meta:get_string("mcl_hunger:exhaustion") == "" then - meta:set_string("mcl_hunger:exhaustion", tostring(0)) - end -end - -if mcl_hunger.active then - function mcl_hunger.get_hunger(player) - local hunger = tonumber(player:get_meta():get_string("mcl_hunger:hunger")) or 20 - return hunger - end - - function mcl_hunger.get_saturation(player) - local saturation = tonumber(player:get_meta():get_string("mcl_hunger:saturation")) or mcl_hunger.SATURATION_INIT - return saturation - end - - function mcl_hunger.get_exhaustion(player) - local exhaustion = tonumber(player:get_meta():get_string("mcl_hunger:exhaustion")) or 0 - return exhaustion - end - - function mcl_hunger.set_hunger(player, hunger, update_hudbars) - hunger = math.min(20, math.max(0, hunger)) - player:get_meta():set_string("mcl_hunger:hunger", tostring(hunger)) - if update_hudbars ~= false then - hb.change_hudbar(player, "hunger", hunger) - mcl_hunger.update_saturation_hud(player, nil, hunger) - end - return true - end - - function mcl_hunger.set_saturation(player, saturation, update_hudbar) - saturation = math.min(mcl_hunger.get_hunger(player), math.max(0, saturation)) - player:get_meta():set_string("mcl_hunger:saturation", tostring(saturation)) - if update_hudbar ~= false then - mcl_hunger.update_saturation_hud(player, saturation) - end - return true - end - - function mcl_hunger.set_exhaustion(player, exhaustion, update_hudbar) - exhaustion = math.min(mcl_hunger.EXHAUST_LVL, math.max(0.0, exhaustion)) - player:get_meta():set_string("mcl_hunger:exhaustion", tostring(exhaustion)) - if update_hudbar ~= false then - mcl_hunger.update_exhaustion_hud(player, exhaustion) - end - return true - end - - function mcl_hunger.exhaust(playername, increase) - local player = minetest.get_player_by_name(playername) - if not player then return false end - mcl_hunger.set_exhaustion(player, mcl_hunger.get_exhaustion(player) + increase) - if mcl_hunger.get_exhaustion(player) >= mcl_hunger.EXHAUST_LVL then - mcl_hunger.set_exhaustion(player, 0.0) - local h = nil - local satuchanged = false - local s = mcl_hunger.get_saturation(player) - if s > 0 then - mcl_hunger.set_saturation(player, math.max(s - 1.0, 0)) - satuchanged = true - elseif s <= 0.0001 then - h = mcl_hunger.get_hunger(player) - h = math.max(h-1, 0) - mcl_hunger.set_hunger(player, h) - satuchanged = true - end - if satuchanged then - if h then h = h end - mcl_hunger.update_saturation_hud(player, mcl_hunger.get_saturation(player), h) - end - end - mcl_hunger.update_exhaustion_hud(player, mcl_hunger.get_exhaustion(player)) - return true - end - - function mcl_hunger.saturate(playername, increase, update_hudbar) - local player = minetest.get_player_by_name(playername) - local ok = mcl_hunger.set_saturation(player, - math.min(mcl_hunger.get_saturation(player) + increase, mcl_hunger.get_hunger(player))) - if update_hudbar ~= false then - mcl_hunger.update_saturation_hud(player, mcl_hunger.get_saturation(player), mcl_hunger.get_hunger(player)) - end - return ok - end - - function mcl_hunger.register_food(name, hunger_change, replace_with_item, poisontime, poison, exhaust, poisonchance, sound) - if not mcl_hunger.active then - return - end - local food = mcl_hunger.registered_foods - food[name] = {} - food[name].saturation = hunger_change -- hunger points added - food[name].replace = replace_with_item -- what item is given back after eating - food[name].poisontime = poisontime -- time it is poisoning. If this is set, this item is considered poisonous, - -- otherwise the following poison/exhaust fields are ignored - food[name].poison = poison -- poison damage per tick for poisonous food - food[name].exhaust = exhaust -- exhaustion per tick for poisonous food - food[name].poisonchance = poisonchance -- chance percentage that this item poisons the player (default: 100%) - food[name].sound = sound -- special sound that is played when eating - end - - function mcl_hunger.stop_poison(player) - if not mcl_hunger.active then - return - end - mcl_hunger.poison_hunger[player:get_player_name()] = 0 - mcl_hunger.reset_bars_poison_hunger(player) - end - -else - -- When hunger is disabled, the functions are basically no-ops - - function mcl_hunger.get_hunger() - return 20 - end - - function mcl_hunger.get_saturation() - return mcl_hunger.SATURATION_INIT - end - - function mcl_hunger.get_exhaustion() - return 0 - end - - function mcl_hunger.set_hunger() - return false - end - - function mcl_hunger.set_saturation() - return false - end - - function mcl_hunger.set_exhaustion() - return false - end - - function mcl_hunger.exhaust() - return false - end - - function mcl_hunger.saturate() - return false - end - - function mcl_hunger.register_food() end - - function mcl_hunger.stop_poison() end - -end diff --git a/mods/PLAYER/mcl_hunger/changelog.txt b/mods/PLAYER/mcl_hunger/changelog.txt deleted file mode 100644 index a56dbcb891..0000000000 --- a/mods/PLAYER/mcl_hunger/changelog.txt +++ /dev/null @@ -1,51 +0,0 @@ -0.1.0 ------ -Initial release - -0.2.0 ------ -- Change “saturation” to “satiation” -- Rename global table to “hbhunger” to avoid collisions -- General cleanup - -0.3.0 ------ -- Play simple eating sound when something is eaten - -0.3.1 ------ -- Add Ethereal orange -- Fix exhaus variable - -0.3.2 ------ -- Fix another crash - -0.4.0 ------ -- Generic eating functionality, items using the minetest.item_eat are automatically supported -- Change health bar and icon when poisoned -- Special support for red and brown mushroom from Minetest Game [flowers] -- Special support for [pizza] -- Special support for beans from Farming Redo [farming] -- Fix crash when poisoned player leaves server -- Changed license to LGPL v2.1 - -0.4.1 ------ -- Add foods from Not So Simple Mobs [nssm] - -0.5.0 ------ -- Fix custom sound not working -- Add Portuguese translation - -0.5.1 ------ -- Fix incompability problem with pipeworks mod - -0.5.2 ------ -- Fix mod not working with both intllib and mod security enabled -- Add missing screenshot -- Rewrite README and use Markdown format diff --git a/mods/PLAYER/mcl_hunger/hunger.lua b/mods/PLAYER/mcl_hunger/hunger.lua deleted file mode 100644 index d9a6fd5fe6..0000000000 --- a/mods/PLAYER/mcl_hunger/hunger.lua +++ /dev/null @@ -1,240 +0,0 @@ ---local S = minetest.get_translator(minetest.get_current_modname()) - --- wrapper for minetest.item_eat (this way we make sure other mods can't break this one) -function minetest.do_item_eat(hp_change, replace_with_item, itemstack, user, pointed_thing) - if not user or user:is_player() == false then - return itemstack - end - - -- Call on_rightclick if the pointed node defines it - if pointed_thing.type == "node" then - local node = minetest.get_node(pointed_thing.under) - if user and not user:get_player_control().sneak then - if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].on_rightclick then - return minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, user, itemstack) or itemstack - end - end - end - -- Also don't eat when pointing object (it could be an animal) - if pointed_thing.type == "object" then - return itemstack - end - - local old_itemstack = itemstack - - local name = user:get_player_name() - - local creative = minetest.is_creative_enabled(name) - - -- Special foodstuffs like the cake may disable the eating delay - local no_eat_delay = creative or (minetest.get_item_group(itemstack:get_name(), "no_eat_delay") == 1) - - -- Allow eating only after a delay of 2 seconds. This prevents eating as an excessive speed. - -- FIXME: time() is not a precise timer, so the actual delay may be +- 1 second, depending on which fraction - -- of the second the player made the first eat. - -- FIXME: In singleplayer, there's a cheat to circumvent this, simply by pausing the game between eats. - -- This is because os.time() obviously does not care about the pause. A fix needs a different timer mechanism. - if no_eat_delay or (mcl_hunger.last_eat[name] < 0) or (os.difftime(os.time(), mcl_hunger.last_eat[name]) >= 2) then - local can_eat_when_full = creative or (mcl_hunger.active == false) - or minetest.get_item_group(itemstack:get_name(), "can_eat_when_full") == 1 - -- Don't allow eating when player has full hunger bar (some exceptional items apply) - if can_eat_when_full or (mcl_hunger.get_hunger(user) < 20) then - itemstack = mcl_hunger.eat(hp_change, replace_with_item, itemstack, user, pointed_thing) - for _, callback in pairs(minetest.registered_on_item_eats) do - local result = callback(hp_change, replace_with_item, itemstack, user, pointed_thing, old_itemstack) - if result then - return result - end - end - mcl_hunger.last_eat[name] = os.time() - end - end - - return itemstack -end - -function mcl_hunger.eat(hp_change, replace_with_item, itemstack, user, pointed_thing) - local item = itemstack:get_name() - local def = mcl_hunger.registered_foods[item] - if not def then - def = {} - if type(hp_change) ~= "number" then - hp_change = 1 - minetest.log("error", "Wrong on_use() definition for item '" .. item .. "'") - end - def.saturation = hp_change - def.replace = replace_with_item - end - local func = mcl_hunger.item_eat(def.saturation, def.replace, def.poisontime, - def.poison, def.exhaust, def.poisonchance, def.sound) - return func(itemstack, user, pointed_thing) -end - --- Reset HUD bars after food poisoning - -function mcl_hunger.reset_bars_poison_hunger(player) - hb.change_hudbar(player, "hunger", nil, nil, "hbhunger_icon.png", nil, "hbhunger_bar.png") - if mcl_hunger.debug then - hb.change_hudbar(player, "exhaustion", nil, nil, nil, nil, "mcl_hunger_bar_exhaustion.png") - end -end - --- Poison player -local function poisonp(tick, time, time_left, damage, exhaustion, name) - if not mcl_hunger.active then - return - end - local player = minetest.get_player_by_name(name) - -- First check if player is still there - if not player then - return - end - -- Abort if food poisonings have been stopped - if mcl_hunger.poison_hunger[name] == 0 then - return - end - time_left = time_left + tick - if time_left < time then - minetest.after(tick, poisonp, tick, time, time_left, damage, exhaustion, name) - else - if exhaustion > 0 then - mcl_hunger.poison_hunger [name] = mcl_hunger.poison_hunger[name] - 1 - end - if mcl_hunger.poison_hunger[name] <= 0 then - mcl_hunger.reset_bars_poison_hunger(player) - end - end - - -- Deal damage and exhaust player - -- TODO: Introduce fatal poison at higher difficulties - if player:get_hp()-damage > 0 then - mcl_util.deal_damage(player, damage, {type = "hunger"}) - end - - mcl_hunger.exhaust(name, exhaustion) - -end - -local poisonrandomizer = PseudoRandom(os.time()) - -function mcl_hunger.item_eat(hunger_change, replace_with_item, poisontime, poison, exhaust, poisonchance, sound) - return function(itemstack, user, pointed_thing) - local itemname = itemstack:get_name() - local creative = minetest.is_creative_enabled(user:get_player_name()) - if itemstack:peek_item() and user then - if not creative then - itemstack:take_item() - end - local name = user:get_player_name() - --local hp = user:get_hp() - - local pos = user:get_pos() - -- player height - pos.y = pos.y + 1.5 - local foodtype = minetest.get_item_group(itemname, "food") - if foodtype == 3 then - -- Item is a drink, only play drinking sound (no particle) - minetest.sound_play("survival_thirst_drink", { - max_hear_distance = 12, - gain = 1.0, - pitch = 1 + math.random(-10, 10)*0.005, - object = user, - }, true) - else - -- Assume the item is a food - -- Add eat particle effect and sound - local def = minetest.registered_items[itemname] - local texture = def.inventory_image - if not texture or texture == "" then - texture = def.wield_image - end - -- Special item definition field: _food_particles - -- If false, force item to not spawn any food partiles when eaten - if def._food_particles ~= false and texture and texture ~= "" then - local v = user:get_velocity() or user:get_player_velocity() - for i = 0, math.min(math.max(8, hunger_change*2), 25) do - minetest.add_particle({ - pos = { x = pos.x, y = pos.y, z = pos.z }, - velocity = vector.add(v, { x = math.random(-1, 1), y = math.random(1, 2), z = math.random(-1, 1) }), - acceleration = { x = 0, y = math.random(-9, -5), z = 0 }, - expirationtime = 1, - size = math.random(1, 2), - collisiondetection = true, - vertical = false, - texture = "[combine:3x3:" .. -i .. "," .. -i .. "=" .. texture, - }) - end - end - minetest.sound_play("mcl_hunger_bite", { - max_hear_distance = 12, - gain = 1.0, - pitch = 1 + math.random(-10, 10)*0.005, - object = user, - }, true) - end - - if mcl_hunger.active and hunger_change then - -- Add saturation (must be defined in item table) - local _mcl_saturation = minetest.registered_items[itemname]._mcl_saturation - local saturation - if not _mcl_saturation then - saturation = 0 - else - saturation = minetest.registered_items[itemname]._mcl_saturation - end - mcl_hunger.saturate(name, saturation, false) - - -- Add food points - local h = mcl_hunger.get_hunger(user) - if h < 20 and hunger_change then - h = h + hunger_change - if h > 20 then h = 20 end - mcl_hunger.set_hunger(user, h, false) - end - - hb.change_hudbar(user, "hunger", h) - mcl_hunger.update_saturation_hud(user, mcl_hunger.get_saturation(user), h) - end - -- Poison - if mcl_hunger.active and poisontime then - local do_poison = false - if poisonchance then - if poisonrandomizer:next(0,100) < poisonchance then - do_poison = true - end - else - do_poison = true - end - if do_poison then - -- Set food poison bars - if exhaust and exhaust > 0 then - hb.change_hudbar(user, "hunger", nil, nil, "mcl_hunger_icon_foodpoison.png", nil, "mcl_hunger_bar_foodpoison.png") - if mcl_hunger.debug then - hb.change_hudbar(user, "exhaustion", nil, nil, nil, nil, "mcl_hunger_bar_foodpoison.png") - end - mcl_hunger.poison_hunger[name] = mcl_hunger.poison_hunger[name] + 1 - end - poisonp(1, poisontime, 0, poison, exhaust, user:get_player_name()) - end - end - - if not creative then - itemstack:add_item(replace_with_item) - end - end - return itemstack - end -end - -if mcl_hunger.active then - -- player-action based hunger changes - minetest.register_on_dignode(function(pos, oldnode, player) - -- is_fake_player comes from the pipeworks, we are not interested in those - if not player or not player:is_player() or player.is_fake_player == true then - return - end - local name = player:get_player_name() - -- dig event - mcl_hunger.exhaust(name, mcl_hunger.EXHAUST_DIG) - end) -end diff --git a/mods/PLAYER/mcl_hunger/init.lua b/mods/PLAYER/mcl_hunger/init.lua deleted file mode 100644 index 21c1e08607..0000000000 --- a/mods/PLAYER/mcl_hunger/init.lua +++ /dev/null @@ -1,188 +0,0 @@ -local modname = minetest.get_current_modname() -local modpath = minetest.get_modpath(modname) - -local S = minetest.get_translator(modname) - -mcl_hunger = {} - ---[[ This variable tells you if the hunger gameplay mechanic is active. -The state of the hunger mechanic will be determined at game start. -Hunger is enabled when damage is enabled. -If the damage setting is changed within the game, this does NOT -update the hunger mechanic, so the game must be restarted for this -to take effect. ]] -if minetest.settings:get_bool("enable_damage") == true then - mcl_hunger.active = true -else - mcl_hunger.active = false -end - -mcl_hunger.HUD_TICK = 0.1 - --- Exhaustion increase -mcl_hunger.EXHAUST_DIG = 5 -- after digging node -mcl_hunger.EXHAUST_JUMP = 50 -- jump -mcl_hunger.EXHAUST_SPRINT_JUMP = 200 -- jump while sprinting -mcl_hunger.EXHAUST_ATTACK = 100 -- hit an enemy -mcl_hunger.EXHAUST_SWIM = 10 -- player movement in water -mcl_hunger.EXHAUST_SPRINT = 100 -- sprint (per node) -mcl_hunger.EXHAUST_DAMAGE = 100 -- taking damage (protected by armor) -mcl_hunger.EXHAUST_REGEN = 6000 -- Regenerate 1 HP -mcl_hunger.EXHAUST_LVL = 4000 -- at what exhaustion player saturation gets lowered - -mcl_hunger.SATURATION_INIT = 5 -- Initial saturation for new/respawning players - --- Debug Mode. If enabled, saturation and exhaustion are shown as well. --- NOTE: Only updated when settings are loaded. -mcl_hunger.debug = false - --- Cooldown timers for each player, to force a short delay between consuming 2 food items -mcl_hunger.last_eat = {} - -dofile(modpath.."/api.lua") -dofile(modpath.."/hunger.lua") -dofile(modpath.."/register_foods.lua") - ---[[ IF HUNGER IS ENABLED ]] -if mcl_hunger.active == true then - --- Read debug mode setting --- The setting should only be read at the beginning, this mod is not --- prepared to change this setting later. -mcl_hunger.debug = minetest.settings:get_bool("mcl_hunger_debug") -if mcl_hunger.debug == nil then - mcl_hunger.debug = false -end - ---[[ Data value format notes: - Hunger values is identical to Minecraft's and ranges from 0 to 20. - Exhaustion and saturation values are stored as integers, unlike in Minecraft. - Exhaustion is Minecraft exhaustion times 1000 and ranges from 0 to 4000. - Saturation is Minecraft saturation and ranges from 0 to 20. - - Food saturation is stored in the custom item definition field _mcl_saturation. - This field uses the original Minecraft value. -]] - --- Count number of poisonings a player has at once -mcl_hunger.poison_hunger = {} -- food poisoning, increasing hunger - --- HUD -local function init_hud(player) - hb.init_hudbar(player, "hunger", mcl_hunger.get_hunger(player)) - if mcl_hunger.debug then - hb.init_hudbar(player, "saturation", mcl_hunger.get_saturation(player), mcl_hunger.get_hunger(player)) - hb.init_hudbar(player, "exhaustion", mcl_hunger.get_exhaustion(player)) - end -end - --- HUD updating functions for Debug Mode. No-op if not in Debug Mode -function mcl_hunger.update_saturation_hud(player, saturation, hunger) - if mcl_hunger.debug then - hb.change_hudbar(player, "saturation", saturation, hunger) - end -end -function mcl_hunger.update_exhaustion_hud(player, exhaustion) - if mcl_hunger.debug then - hb.change_hudbar(player, "exhaustion", exhaustion) - end -end - --- register saturation hudbar -hb.register_hudbar("hunger", 0xFFFFFF, S("Food"), { icon = "hbhunger_icon.png", bgicon = "hbhunger_bgicon.png", bar = "hbhunger_bar.png" }, 1, 20, 20, false) -if mcl_hunger.debug then - hb.register_hudbar("saturation", 0xFFFFFF, S("Saturation"), { icon = "mcl_hunger_icon_saturation.png", bgicon = "mcl_hunger_bgicon_saturation.png", bar = "mcl_hunger_bar_saturation.png" }, 1, mcl_hunger.SATURATION_INIT, 200, false) - hb.register_hudbar("exhaustion", 0xFFFFFF, S("Exhaust."), { icon = "mcl_hunger_icon_exhaustion.png", bgicon = "mcl_hunger_bgicon_exhaustion.png", bar = "mcl_hunger_bar_exhaustion.png" }, 1, 0, mcl_hunger.EXHAUST_LVL, false) -end - -minetest.register_on_joinplayer(function(player) - local name = player:get_player_name() - mcl_hunger.init_player(player) - init_hud(player) - mcl_hunger.poison_hunger[name] = 0 - mcl_hunger.last_eat[name] = -1 -end) - -minetest.register_on_respawnplayer(function(player) - -- reset hunger, related values and poison - local name = player:get_player_name() - - mcl_hunger.stop_poison(player) - mcl_hunger.last_eat[name] = -1 - - local h, s, e = 20, mcl_hunger.SATURATION_INIT, 0 - mcl_hunger.set_hunger(player, h, false) - mcl_hunger.set_saturation(player, s, false) - mcl_hunger.set_exhaustion(player, e, false) - hb.change_hudbar(player, "hunger", h) - mcl_hunger.update_saturation_hud(player, s, h) - mcl_hunger.update_exhaustion_hud(player, e) -end) - --- PvP combat exhaustion -minetest.register_on_punchplayer(function(victim, puncher, time_from_last_punch, tool_capabilities, dir, damage) - if puncher:is_player() then - mcl_hunger.exhaust(puncher:get_player_name(), mcl_hunger.EXHAUST_ATTACK) - end -end) - --- Exhaust on taking damage -minetest.register_on_player_hpchange(function(player, hp_change) - if hp_change < 0 then - local name = player:get_player_name() - mcl_hunger.exhaust(name, mcl_hunger.EXHAUST_DAMAGE) - end -end) - -local food_tick_timers = {} -- one food_tick_timer per player, keys are the player-objects -minetest.register_globalstep(function(dtime) - for _,player in pairs(minetest.get_connected_players()) do - - local food_tick_timer = food_tick_timers[player] and food_tick_timers[player] + dtime or 0 - local player_name = player:get_player_name() - local food_level = mcl_hunger.get_hunger(player) - local food_saturation_level = mcl_hunger.get_saturation(player) - local player_health = player:get_hp() - - if food_tick_timer > 4.0 then - food_tick_timer = 0 - - if food_level >= 18 then -- slow regenration - if player_health > 0 and player_health < 20 then - player:set_hp(player_health+1) - mcl_hunger.exhaust(player_name, mcl_hunger.EXHAUST_REGEN) - mcl_hunger.update_exhaustion_hud(player, mcl_hunger.get_exhaustion(player)) - end - - elseif food_level == 0 then -- starvation - -- the amount of health at which a player will stop to get - -- harmed by starvation (10 for Easy, 1 for Normal, 0 for Hard) - local maximum_starvation = 1 - -- TODO: implement Minecraft-like difficulty modes and the update maximumStarvation here - if player_health > maximum_starvation then - mcl_util.deal_damage(player, 1, {type = "starve"}) - end - end - - elseif food_tick_timer > 0.5 and food_level == 20 and food_saturation_level >= 6 then -- fast regeneration - if player_health > 0 and player_health < 20 then - food_tick_timer = 0 - player:set_hp(player_health+1) - mcl_hunger.exhaust(player_name, mcl_hunger.EXHAUST_REGEN) - mcl_hunger.update_exhaustion_hud(player, mcl_hunger.get_exhaustion(player)) - end - end - - food_tick_timers[player] = food_tick_timer -- update food_tick_timer table - end -end) - ---[[ IF HUNGER IS NOT ENABLED ]] -else - -minetest.register_on_joinplayer(function(player) - mcl_hunger.init_player(player) - mcl_hunger.last_eat[player:get_player_name()] = -1 -end) - -end diff --git a/mods/PLAYER/mcl_hunger/locale/mcl_hunger.de.tr b/mods/PLAYER/mcl_hunger/locale/mcl_hunger.de.tr deleted file mode 100644 index 8cf1094608..0000000000 --- a/mods/PLAYER/mcl_hunger/locale/mcl_hunger.de.tr +++ /dev/null @@ -1,8 +0,0 @@ -# textdomain: mcl_hunger -@1 succumbed to the poison.=@1 erlag dem Gift. -Food=Nahrung -Saturation=Sättigung -%s: %.1f/%d=%s: %.1f -Exhaust.=Erschöpf. -%s: %d/%d=%s: %d/%d -@1 starved to death.=@1 verhungerte. diff --git a/mods/PLAYER/mcl_hunger/locale/mcl_hunger.es.tr b/mods/PLAYER/mcl_hunger/locale/mcl_hunger.es.tr deleted file mode 100644 index 15396a6d30..0000000000 --- a/mods/PLAYER/mcl_hunger/locale/mcl_hunger.es.tr +++ /dev/null @@ -1,8 +0,0 @@ -# textdomain: mcl_hunger -@1 succumbed to the poison.=@1 sucumbió al veneno. -Food=Comida -Saturation=Saturación -%s: %.1f/%d=%s: %.1f -Exhaust.=Cansado. -%s: %d/%d=%s: %d/%d -@1 starved to death.=@1 ha muerto de hambre. diff --git a/mods/PLAYER/mcl_hunger/locale/mcl_hunger.fr.tr b/mods/PLAYER/mcl_hunger/locale/mcl_hunger.fr.tr deleted file mode 100644 index 811868b3ac..0000000000 --- a/mods/PLAYER/mcl_hunger/locale/mcl_hunger.fr.tr +++ /dev/null @@ -1,8 +0,0 @@ -# textdomain: mcl_hunger -@1 succumbed to the poison.=@1 a succombé au poison. -Food=Nourriture -Saturation=Saturation -%s: %.1f/%d=%s: %.1f/%d -Exhaust.=Échappement. -%s: %d/%d=%s: %d/%d -@1 starved to death.=@1 est mort de faim. diff --git a/mods/PLAYER/mcl_hunger/locale/mcl_hunger.pl.tr b/mods/PLAYER/mcl_hunger/locale/mcl_hunger.pl.tr deleted file mode 100644 index be20c6d856..0000000000 --- a/mods/PLAYER/mcl_hunger/locale/mcl_hunger.pl.tr +++ /dev/null @@ -1,9 +0,0 @@ -# textdomain: mcl_hunger -@1 succumbed to the poison.=@1 uległa truciźnie. -Food=Jedzenie -Saturation=Nasycenie -%s: %.1f/%d=%s: %.1f/%d -Exhaust.=Wyczerpanie. -%s: %d/%d=%s: %d/%d -@1 starved to death.=@1 umarła z wygłodzenia. - diff --git a/mods/PLAYER/mcl_hunger/locale/mcl_hunger.ru.tr b/mods/PLAYER/mcl_hunger/locale/mcl_hunger.ru.tr deleted file mode 100644 index a91a4db759..0000000000 --- a/mods/PLAYER/mcl_hunger/locale/mcl_hunger.ru.tr +++ /dev/null @@ -1,8 +0,0 @@ -# textdomain: mcl_hunger -@1 succumbed to the poison.=@1 умер(ла) от яда. -Food=Продукт -Saturation=Насыщение -%s: %.1f/%d=%s: %.1f/%d -Exhaust.=Истощ. -%s: %d/%d=%s: %d/%d -@1 starved to death.=@1 умер(ла) от голода. diff --git a/mods/PLAYER/mcl_hunger/locale/mcl_hunger.zh_TW.tr b/mods/PLAYER/mcl_hunger/locale/mcl_hunger.zh_TW.tr deleted file mode 100644 index 18d265ef42..0000000000 --- a/mods/PLAYER/mcl_hunger/locale/mcl_hunger.zh_TW.tr +++ /dev/null @@ -1,8 +0,0 @@ -# textdomain: mcl_hunger -@1 succumbed to the poison.= -Food=食物 -Saturation=飽食度 -%s: %.1f/%d= -Exhaust.=飢餓值 -%s: %d/%d= -@1 starved to death.=@1 餓死了。 diff --git a/mods/PLAYER/mcl_hunger/locale/template.txt b/mods/PLAYER/mcl_hunger/locale/template.txt deleted file mode 100644 index d745ab08a5..0000000000 --- a/mods/PLAYER/mcl_hunger/locale/template.txt +++ /dev/null @@ -1,8 +0,0 @@ -# textdomain: mcl_hunger -@1 succumbed to the poison.= -Food= -Saturation= -%s: %.1f/%d= -Exhaust.= -%s: %d/%d= -@1 starved to death.= diff --git a/mods/PLAYER/mcl_hunger/mod.conf b/mods/PLAYER/mcl_hunger/mod.conf deleted file mode 100644 index 99ab71ff33..0000000000 --- a/mods/PLAYER/mcl_hunger/mod.conf +++ /dev/null @@ -1,4 +0,0 @@ -name = mcl_hunger -author = BlockMen -description = Adds a simple hunger meachanic with satiation, food poisoning and different healing. -depends = hudbars diff --git a/mods/PLAYER/mcl_hunger/register_foods.lua b/mods/PLAYER/mcl_hunger/register_foods.lua deleted file mode 100644 index a68dde1c18..0000000000 --- a/mods/PLAYER/mcl_hunger/register_foods.lua +++ /dev/null @@ -1,7 +0,0 @@ --- Apply food poisoning effect as long there are no real status effect. --- TODO: Remove this when food poisoning a status effect in mcl_potions. --- Normal poison damage is set to 0 because it's handled elsewhere. - -mcl_hunger.register_food("mcl_mobitems:rotten_flesh", 4, "", 30, 0, 100, 80) -mcl_hunger.register_food("mcl_mobitems:chicken", 2, "", 30, 0, 100, 30) -mcl_hunger.register_food("mcl_fishing:pufferfish_raw", 1, "", 15, 0, 300) diff --git a/mods/PLAYER/mcl_hunger/sounds/mcl_hunger_bite.1.ogg b/mods/PLAYER/mcl_hunger/sounds/mcl_hunger_bite.1.ogg deleted file mode 100644 index 065ba06c1e..0000000000 Binary files a/mods/PLAYER/mcl_hunger/sounds/mcl_hunger_bite.1.ogg and /dev/null differ diff --git a/mods/PLAYER/mcl_hunger/sounds/mcl_hunger_bite.2.ogg b/mods/PLAYER/mcl_hunger/sounds/mcl_hunger_bite.2.ogg deleted file mode 100644 index 51a3a90e9a..0000000000 Binary files a/mods/PLAYER/mcl_hunger/sounds/mcl_hunger_bite.2.ogg and /dev/null differ diff --git a/mods/PLAYER/mcl_hunger/sounds/survival_thirst_drink.ogg b/mods/PLAYER/mcl_hunger/sounds/survival_thirst_drink.ogg deleted file mode 100644 index 7c3df3ca1d..0000000000 Binary files a/mods/PLAYER/mcl_hunger/sounds/survival_thirst_drink.ogg and /dev/null differ diff --git a/mods/PLAYER/mcl_hunger/textures/hbhunger_bar.png b/mods/PLAYER/mcl_hunger/textures/hbhunger_bar.png deleted file mode 100644 index 57e94a1839..0000000000 Binary files a/mods/PLAYER/mcl_hunger/textures/hbhunger_bar.png and /dev/null differ diff --git a/mods/PLAYER/mcl_hunger/textures/hbhunger_bar_health_poison.png b/mods/PLAYER/mcl_hunger/textures/hbhunger_bar_health_poison.png deleted file mode 100644 index 6373f4ea5a..0000000000 Binary files a/mods/PLAYER/mcl_hunger/textures/hbhunger_bar_health_poison.png and /dev/null differ diff --git a/mods/PLAYER/mcl_hunger/textures/hbhunger_bgicon.png b/mods/PLAYER/mcl_hunger/textures/hbhunger_bgicon.png deleted file mode 100644 index d21b168478..0000000000 Binary files a/mods/PLAYER/mcl_hunger/textures/hbhunger_bgicon.png and /dev/null differ diff --git a/mods/PLAYER/mcl_hunger/textures/hbhunger_icon.png b/mods/PLAYER/mcl_hunger/textures/hbhunger_icon.png deleted file mode 100644 index 3830fdfc3c..0000000000 Binary files a/mods/PLAYER/mcl_hunger/textures/hbhunger_icon.png and /dev/null differ diff --git a/mods/PLAYER/mcl_hunger/textures/hbhunger_icon_health_poison.png b/mods/PLAYER/mcl_hunger/textures/hbhunger_icon_health_poison.png deleted file mode 100644 index 89776483bd..0000000000 Binary files a/mods/PLAYER/mcl_hunger/textures/hbhunger_icon_health_poison.png and /dev/null differ diff --git a/mods/PLAYER/mcl_hunger/textures/mcl_hunger_bar_exhaustion.png b/mods/PLAYER/mcl_hunger/textures/mcl_hunger_bar_exhaustion.png deleted file mode 100644 index 04284e01ad..0000000000 Binary files a/mods/PLAYER/mcl_hunger/textures/mcl_hunger_bar_exhaustion.png and /dev/null differ diff --git a/mods/PLAYER/mcl_hunger/textures/mcl_hunger_bar_foodpoison.png b/mods/PLAYER/mcl_hunger/textures/mcl_hunger_bar_foodpoison.png deleted file mode 100644 index 02580e1492..0000000000 Binary files a/mods/PLAYER/mcl_hunger/textures/mcl_hunger_bar_foodpoison.png and /dev/null differ diff --git a/mods/PLAYER/mcl_hunger/textures/mcl_hunger_bar_saturation.png b/mods/PLAYER/mcl_hunger/textures/mcl_hunger_bar_saturation.png deleted file mode 100644 index ae6d8639ed..0000000000 Binary files a/mods/PLAYER/mcl_hunger/textures/mcl_hunger_bar_saturation.png and /dev/null differ diff --git a/mods/PLAYER/mcl_hunger/textures/mcl_hunger_bgicon_exhaustion.png b/mods/PLAYER/mcl_hunger/textures/mcl_hunger_bgicon_exhaustion.png deleted file mode 100644 index deb0d49efb..0000000000 Binary files a/mods/PLAYER/mcl_hunger/textures/mcl_hunger_bgicon_exhaustion.png and /dev/null differ diff --git a/mods/PLAYER/mcl_hunger/textures/mcl_hunger_bgicon_saturation.png b/mods/PLAYER/mcl_hunger/textures/mcl_hunger_bgicon_saturation.png deleted file mode 100644 index b5bd3a3229..0000000000 Binary files a/mods/PLAYER/mcl_hunger/textures/mcl_hunger_bgicon_saturation.png and /dev/null differ diff --git a/mods/PLAYER/mcl_hunger/textures/mcl_hunger_icon_exhaustion.png b/mods/PLAYER/mcl_hunger/textures/mcl_hunger_icon_exhaustion.png deleted file mode 100644 index 1f89f90ee9..0000000000 Binary files a/mods/PLAYER/mcl_hunger/textures/mcl_hunger_icon_exhaustion.png and /dev/null differ diff --git a/mods/PLAYER/mcl_hunger/textures/mcl_hunger_icon_foodpoison.png b/mods/PLAYER/mcl_hunger/textures/mcl_hunger_icon_foodpoison.png deleted file mode 100644 index 130601c8ef..0000000000 Binary files a/mods/PLAYER/mcl_hunger/textures/mcl_hunger_icon_foodpoison.png and /dev/null differ diff --git a/mods/PLAYER/mcl_hunger/textures/mcl_hunger_icon_saturation.png b/mods/PLAYER/mcl_hunger/textures/mcl_hunger_icon_saturation.png deleted file mode 100644 index 2885573c02..0000000000 Binary files a/mods/PLAYER/mcl_hunger/textures/mcl_hunger_icon_saturation.png and /dev/null differ diff --git a/mods/PLAYER/mcl_player/README.txt b/mods/PLAYER/mcl_player/README.txt deleted file mode 100644 index 637a256843..0000000000 --- a/mods/PLAYER/mcl_player/README.txt +++ /dev/null @@ -1,24 +0,0 @@ -MineClone 2 mod: mcl_player -========================== -Adds the 3D player model, taken from Minetest Game 0.4.16. - -Programmers: See `game_api.txt` for the API definition. - -Authors of source code ----------------------- -Originally by celeron55, Perttu Ahola (LGPL 2.1) -Various Minetest developers and contributors (LGPL 2.1) - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 2.1 of the License, or -(at your option) any later version. - -http://www.gnu.org/licenses/lgpl-2.1.html - -Authors of media files ------------------------ -MirceaKitsune (CC BY-SA 3.0): - character.b3d - -Textures: See main MineClone 2 README.md file. diff --git a/mods/PLAYER/mcl_player/game_api.txt b/mods/PLAYER/mcl_player/game_api.txt deleted file mode 100644 index 51c0820864..0000000000 --- a/mods/PLAYER/mcl_player/game_api.txt +++ /dev/null @@ -1,56 +0,0 @@ -Player API ----------- -This is the same as the player API from Minetest Game 0.4.16. -But `default` has been renamed to `mcl_player`. - -The player API can register player models and update the player's appearence. - -`mcl_player.player_register_model(name, def)` - - * Register a new model to be used by players. - * name: model filename such as "character.x", "foo.b3d", etc. - * def: See [#Model definition] - -`mcl_player.registered_player_models[name]` - - * Get a model's definition - * see [#Model definition] - -`mcl_player.player_set_model(player, model_name)` - - * Change a player's model - * `player`: PlayerRef - * `model_name`: model registered with player_register_model() - -`mcl_player.player_set_animation(player, anim_name [, speed])` - - * Applies an animation to a player - * anim_name: name of the animation. - * speed: frames per second. If nil, default from the model is used - -`mcl_player.player_set_textures(player, textures)` - - * Sets player textures - * `player`: PlayerRef - * `textures`: array of textures, If `textures` is nil, the default textures from the model def are used - -mcl_player.player_get_animation(player) - - * Returns a table containing fields `model`, `textures` and `animation`. - * Any of the fields of the returned table may be nil. - * player: PlayerRef - -### Model Definition - - { - animation_speed = 30, -- Default animation speed, in FPS. - textures = {"character.png", }, -- Default array of textures. - visual_size = {x = 1, y = 1}, -- Used to scale the model. - animations = { - -- = {x = , y = }, - foo = {x = 0, y = 19}, - bar = {x = 20, y = 39}, - -- ... - }, - } - diff --git a/mods/PLAYER/mcl_player/init.lua b/mods/PLAYER/mcl_player/init.lua deleted file mode 100644 index 4824bc9e30..0000000000 --- a/mods/PLAYER/mcl_player/init.lua +++ /dev/null @@ -1,235 +0,0 @@ --- Minetest 0.4 mod: player --- See README.txt for licensing and other information. -mcl_player = {} - --- Player animation blending --- Note: This is currently broken due to a bug in Irrlicht, leave at 0 -local animation_blend = 0 - -local function get_mouse_button(player) - local controls = player:get_player_control() - local get_wielded_item_name = player:get_wielded_item():get_name() - if controls.RMB and not string.find(get_wielded_item_name, "mcl_bows:bow") and not string.find(get_wielded_item_name, "mcl_bows:crossbow") and - not mcl_shields.wielding_shield(player, 1) and not mcl_shields.wielding_shield(player, 2) or controls.LMB then - return true - else - return false - end -end - -mcl_player.registered_player_models = { } - --- Local for speed. -local models = mcl_player.registered_player_models - -function mcl_player.player_register_model(name, def) - models[name] = def -end - --- Default player appearance -mcl_player.player_register_model("character.b3d", { - animation_speed = 30, - textures = {"character.png", }, - animations = { - -- Standard animations. - stand = {x= 0, y= 79}, - lay = {x=162, y=166}, - walk = {x=168, y=187}, - mine = {x=189, y=198}, - walk_mine = {x=200, y=219}, - sit = {x= 81, y=160}, - sneak_stand = {x=222, y=302}, - sneak_mine = {x=346, y=366}, - sneak_walk = {x=304, y=323}, - sneak_walk_mine = {x=325, y=344}, - run_walk = {x=440, y=460}, - run_walk_mine = {x=461, y=481}, - sit_mount = {x=484, y=484}, - }, -}) - --- Player stats and animations -local player_model = {} -local player_textures = {} -local player_anim = {} -local player_sneak = {} -mcl_player.player_attached = {} - -function mcl_player.player_get_animation(player) - local name = player:get_player_name() - return { - model = player_model[name], - textures = player_textures[name], - animation = player_anim[name], - } -end - --- Called when a player's appearance needs to be updated -function mcl_player.player_set_model(player, model_name) - local name = player:get_player_name() - local model = models[model_name] - if model then - if player_model[name] == model_name then - return - end - player:set_properties({ - mesh = model_name, - textures = player_textures[name] or model.textures, - visual = "mesh", - visual_size = model.visual_size or {x=1, y=1}, - damage_texture_modifier = "^[colorize:red:130", - }) - mcl_player.player_set_animation(player, "stand") - else - player:set_properties({ - textures = { "player.png", "player_back.png", }, - visual = "upright_sprite", - }) - end - player_model[name] = model_name -end - -local function set_texture(player, index, texture) - local textures = player_textures[player:get_player_name()] - textures[index] = texture - player:set_properties({textures = textures}) -end - -function mcl_player.player_set_skin(player, texture) - set_texture(player, 1, texture) -end - -function mcl_player.player_set_armor(player, texture) - set_texture(player, 2, texture) -end - -function mcl_player.player_set_wielditem(player, texture) - set_texture(player, 3, texture) -end - -function mcl_player.get_player_formspec_model(player, x, y, w, h, fsname) - local name = player:get_player_name() - local model = player_model[name] - local anim = models[model].animations[player_anim[name]] - return "model["..x..","..y..";"..w..","..h..";"..fsname..";"..model..";"..table.concat(player_textures[name], ",")..";0,".. 180 ..";false;false;"..anim.x..","..anim.y.."]" -end - -function mcl_player.player_set_animation(player, anim_name, speed) - local name = player:get_player_name() - if player_anim[name] == anim_name then - return - end - local model = player_model[name] and models[player_model[name]] - if not (model and model.animations[anim_name]) then - return - end - local anim = model.animations[anim_name] - player_anim[name] = anim_name - player:set_animation(anim, speed or model.animation_speed, animation_blend) -end - --- Update appearance when the player joins -minetest.register_on_joinplayer(function(player) - local name = player:get_player_name() - mcl_player.player_attached[name] = false - mcl_player.player_set_model(player, "character.b3d") - player_textures[name] = {"blank.png", "blank.png", "blank.png"} - --player:set_local_animation({x=0, y=79}, {x=168, y=187}, {x=189, y=198}, {x=200, y=219}, 30) - player:set_fov(86.1) -- see >>> -end) - -minetest.register_on_leaveplayer(function(player) - local name = player:get_player_name() - player_model[name] = nil - player_anim[name] = nil - player_textures[name] = nil -end) - --- Localize for better performance. -local player_set_animation = mcl_player.player_set_animation -local player_attached = mcl_player.player_attached - --- Check each player and apply animations -minetest.register_globalstep(function(dtime) - for _, player in pairs(minetest.get_connected_players()) do - local name = player:get_player_name() - local model_name = player_model[name] - local model = model_name and models[model_name] - if model and not player_attached[name] then - local controls = player:get_player_control() - local walking = false - local animation_speed_mod = model.animation_speed or 30 - - -- Determine if the player is walking - if controls.up or controls.down or controls.left or controls.right then - walking = true - end - - -- Determine if the player is sneaking, and reduce animation speed if so - if controls.sneak then - animation_speed_mod = animation_speed_mod / 2 - end - - if mcl_shields.is_blocking(player) then - animation_speed_mod = animation_speed_mod / 2 - end - - -- ask if player is swiming - local head_in_water = minetest.get_item_group(mcl_playerinfo[name].node_head, "water") ~= 0 - -- ask if player is sprinting - local is_sprinting = mcl_sprint.is_sprinting(name) - - local velocity = player:get_velocity() or player:get_player_velocity() - - -- Apply animations based on what the player is doing - if player:get_hp() == 0 then - player_set_animation(player, "die") - elseif walking and velocity.x > 0.35 - or walking and velocity.x < -0.35 - or walking and velocity.z > 0.35 - or walking and velocity.z < -0.35 then - local wielded_itemname = player:get_wielded_item():get_name() - local no_arm_moving = string.find(wielded_itemname, "mcl_bows:bow") or mcl_shields.wielding_shield(player, 1) or mcl_shields.wielding_shield(player, 2) - if player_sneak[name] ~= controls.sneak then - player_anim[name] = nil - player_sneak[name] = controls.sneak - end - if get_mouse_button(player) == true and not controls.sneak and head_in_water and is_sprinting == true then - player_set_animation(player, "swim_walk_mine", animation_speed_mod) - elseif not controls.sneak and head_in_water and is_sprinting == true then - player_set_animation(player, "swim_walk", animation_speed_mod) - elseif no_arm_moving and controls.RMB and controls.sneak or string.find(wielded_itemname, "mcl_bows:crossbow_") and controls.sneak then - player_set_animation(player, "bow_sneak", animation_speed_mod) - elseif no_arm_moving and controls.RMB or string.find(wielded_itemname, "mcl_bows:crossbow_") then - player_set_animation(player, "bow_walk", animation_speed_mod) - elseif is_sprinting == true and get_mouse_button(player) == true and not controls.sneak and not head_in_water then - player_set_animation(player, "run_walk_mine", animation_speed_mod) - elseif get_mouse_button(player) == true and not controls.sneak then - player_set_animation(player, "walk_mine", animation_speed_mod) - elseif get_mouse_button(player) == true and controls.sneak and is_sprinting ~= true then - player_set_animation(player, "sneak_walk_mine", animation_speed_mod) - elseif is_sprinting == true and not controls.sneak and not head_in_water then - player_set_animation(player, "run_walk", animation_speed_mod) - elseif controls.sneak and not get_mouse_button(player) == true then - player_set_animation(player, "sneak_walk", animation_speed_mod) - else - player_set_animation(player, "walk", animation_speed_mod) - end - elseif get_mouse_button(player) == true and not controls.sneak and head_in_water and is_sprinting == true then - player_set_animation(player, "swim_mine") - elseif not get_mouse_button(player) == true and not controls.sneak and head_in_water and is_sprinting == true then - player_set_animation(player, "swim_stand") - elseif get_mouse_button(player) == true and not controls.sneak then - player_set_animation(player, "mine") - elseif get_mouse_button(player) == true and controls.sneak then - player_set_animation(player, "sneak_mine") - elseif not controls.sneak and head_in_water and is_sprinting == true then - player_set_animation(player, "swim_stand", animation_speed_mod) - elseif not controls.sneak then - player_set_animation(player, "stand", animation_speed_mod) - else - player_set_animation(player, "sneak_stand", animation_speed_mod) - end - end - end -end) diff --git a/mods/PLAYER/mcl_player/mod.conf b/mods/PLAYER/mcl_player/mod.conf deleted file mode 100644 index 7cc5d14faa..0000000000 --- a/mods/PLAYER/mcl_player/mod.conf +++ /dev/null @@ -1,4 +0,0 @@ -name = mcl_player -author = celeron55 -description = Adds the 3D player model, taken from Minetest Game 0.4.16. -depends = mcl_shields \ No newline at end of file diff --git a/mods/PLAYER/mcl_player/models/character.b3d b/mods/PLAYER/mcl_player/models/character.b3d deleted file mode 100644 index f5482f4c74..0000000000 Binary files a/mods/PLAYER/mcl_player/models/character.b3d and /dev/null differ diff --git a/mods/PLAYER/mcl_player/models/character.blend b/mods/PLAYER/mcl_player/models/character.blend deleted file mode 100644 index f77f49f40b..0000000000 Binary files a/mods/PLAYER/mcl_player/models/character.blend and /dev/null differ diff --git a/mods/PLAYER/mcl_player/models/character.png b/mods/PLAYER/mcl_player/models/character.png deleted file mode 100644 index 16382f189b..0000000000 Binary files a/mods/PLAYER/mcl_player/models/character.png and /dev/null differ diff --git a/mods/PLAYER/mcl_player/textures/player.png b/mods/PLAYER/mcl_player/textures/player.png deleted file mode 100644 index a3e18be269..0000000000 Binary files a/mods/PLAYER/mcl_player/textures/player.png and /dev/null differ diff --git a/mods/PLAYER/mcl_player/textures/player_back.png b/mods/PLAYER/mcl_player/textures/player_back.png deleted file mode 100644 index 4bd5366fa9..0000000000 Binary files a/mods/PLAYER/mcl_player/textures/player_back.png and /dev/null differ diff --git a/mods/PLAYER/mcl_playerplus/README.md b/mods/PLAYER/mcl_playerplus/README.md deleted file mode 100644 index e51d086fb6..0000000000 --- a/mods/PLAYER/mcl_playerplus/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# PlayerPlus mod for MineClone 2 - -## Features - -- Hurt players touching cacti (0.5 hearts / 0.5s) -- Suffocation: Hurt players who have their head inside a solid block (0.5 hearts / 0.5s) -- Exhaustion for swimming and jumping -- Particle effects - -Suffocation *not* dealt to player with the `noclip` privilege. - -## Notes -This mod is based on PlayerPlus [`playerplus`] by TenPlus1. It is now -very different than the original, no compability is intended. -See also `mcl_playerinfo` for the player node info. - -## API - -Setting the group `disable_suffocation=1` disables suffocation for nodes which -would otherwise deal suffocation damage. - -## License -MIT License - diff --git a/mods/PLAYER/mcl_playerplus/init.lua b/mods/PLAYER/mcl_playerplus/init.lua deleted file mode 100644 index 924b60c97d..0000000000 --- a/mods/PLAYER/mcl_playerplus/init.lua +++ /dev/null @@ -1,693 +0,0 @@ -mcl_playerplus = { - elytra = {}, -} - -local player_velocity_old = {x=0, y=0, z=0} -local get_connected_players = minetest.get_connected_players -local dir_to_yaw = minetest.dir_to_yaw -local get_item_group = minetest.get_item_group -local check_player_privs = minetest.check_player_privs -local find_node_near = minetest.find_node_near -local get_name_from_content_id = minetest.get_name_from_content_id -local get_voxel_manip = minetest.get_voxel_manip -local add_particle = minetest.add_particle -local add_particlespawner = minetest.add_particlespawner - -local is_sprinting = mcl_sprint.is_sprinting -local exhaust = mcl_hunger.exhaust -local playerphysics = playerphysics - -local vector = vector -local math = math --- Internal player state -local mcl_playerplus_internal = {} - -local time = 0 -local look_pitch = 0 - -local function player_collision(player) - - local pos = player:get_pos() - --local vel = player:get_velocity() - local x = 0 - local z = 0 - local width = .75 - - for _,object in pairs(minetest.get_objects_inside_radius(pos, width)) do - - local ent = object:get_luaentity() - if (object:is_player() or (ent and ent.is_mob and object ~= player)) then - - local pos2 = object:get_pos() - local vec = {x = pos.x - pos2.x, z = pos.z - pos2.z} - local force = (width + 0.5) - vector.distance( - {x = pos.x, y = 0, z = pos.z}, - {x = pos2.x, y = 0, z = pos2.z}) - - x = x + (vec.x * force) - z = z + (vec.z * force) - end - end - return {x,z} -end - -local function walking_player(player, control) - if control.up or control.down or control.left or control.right then - return true - else - return false - end -end - - --- converts yaw to degrees -local function degrees(rad) - return rad * 180.0 / math.pi -end - -local function dir_to_pitch(dir) - --local dir2 = vector.normalize(dir) - local xz = math.abs(dir.x) + math.abs(dir.z) - return -math.atan2(-dir.y, xz) -end - -local player_vel_yaws = {} - -function limit_vel_yaw(player_vel_yaw, yaw) - if player_vel_yaw < 0 then - player_vel_yaw = player_vel_yaw + 360 - end - - if yaw < 0 then - yaw = yaw + 360 - end - - if math.abs(player_vel_yaw - yaw) > 40 then - local player_vel_yaw_nm, yaw_nm = player_vel_yaw, yaw - if player_vel_yaw > yaw then - player_vel_yaw_nm = player_vel_yaw - 360 - else - yaw_nm = yaw - 360 - end - if math.abs(player_vel_yaw_nm - yaw_nm) > 40 then - local diff = math.abs(player_vel_yaw - yaw) - if diff > 180 and diff < 185 or diff < 180 and diff > 175 then - player_vel_yaw = yaw - elseif diff < 180 then - if player_vel_yaw < yaw then - player_vel_yaw = yaw - 40 - else - player_vel_yaw = yaw + 40 - end - else - if player_vel_yaw < yaw then - player_vel_yaw = yaw + 40 - else - player_vel_yaw = yaw - 40 - end - end - end - end - - if player_vel_yaw < 0 then - player_vel_yaw = player_vel_yaw + 360 - elseif player_vel_yaw > 360 then - player_vel_yaw = player_vel_yaw - 360 - end - - return player_vel_yaw -end - -local node_stand, node_stand_below, node_head, node_feet - --- This following part is 2 wrapper functions for player:set_bones --- and player:set_properties preventing them from being resent on --- every globalstep when they have not changed. - -local function roundN(n, d) - if type(n) ~= "number" then return n end - local m = 10^d - return math.floor(n * m + 0.5) / m -end - -local function close_enough(a,b) - local rt=true - if type(a) == "table" and type(b) == "table" then - for k,v in pairs(a) do - if roundN(v,2) ~= roundN(b[k],2) then - rt=false - break - end - end - else - rt = roundN(a,2) == roundN(b,2) - end - return rt -end - - - -local function props_changed(props,oldprops) - local changed=false - local p={} - for k,v in pairs(props) do - if not close_enough(v,oldprops[k]) then - p[k]=v - changed=true - end - end - return changed,p -end - ---tests for roundN -local test_round1=15 -local test_round2=15.00199999999 -local test_round3=15.00111111 -local test_round4=15.00999999 - -assert(roundN(test_round1,2)==roundN(test_round1,2)) -assert(roundN(test_round1,2)==roundN(test_round2,2)) -assert(roundN(test_round1,2)==roundN(test_round3,2)) -assert(roundN(test_round1,2)~=roundN(test_round4,2)) - --- tests for close_enough -local test_cb = {-0.35,0,-0.35,0.35,0.8,0.35} --collisionboxes -local test_cb_close = {-0.351213,0,-0.35,0.35,0.8,0.351212} -local test_cb_diff = {-0.35,0,-1.35,0.35,0.8,0.35} - -local test_eh = 1.65 --eye height -local test_eh_close = 1.65123123 -local test_eh_diff = 1.35 - -local test_nt = { r = 225, b = 225, a = 225, g = 225 } --nametag -local test_nt_diff = { r = 225, b = 225, a = 0, g = 225 } - -assert(close_enough(test_cb,test_cb_close)) -assert(not close_enough(test_cb,test_cb_diff)) -assert(close_enough(test_eh,test_eh_close)) -assert(not close_enough(test_eh,test_eh_diff)) -assert(not close_enough(test_nt,test_nt_diff)) --no floats involved here - ---tests for properties_changed -local test_properties_set1={collisionbox = {-0.35,0,-0.35,0.35,0.8,0.35}, eye_height = 0.65, nametag_color = { r = 225, b = 225, a = 225, g = 225 }} -local test_properties_set2={collisionbox = {-0.35,0,-0.35,0.35,0.8,0.35}, eye_height = 1.35, nametag_color = { r = 225, b = 225, a = 225, g = 225 }} - -local test_p1,_=props_changed(test_properties_set1,test_properties_set1) -local test_p2,_=props_changed(test_properties_set1,test_properties_set2) - -assert(not test_p1) -assert(test_p2) - -local function set_properties_conditional(player,props) - local changed,p=props_changed(props,player:get_properties()) - if changed then - player:set_properties(p) - end -end - -local function set_bone_position_conditional(player,b,p,r) --bone,position,rotation - local oldp,oldr=player:get_bone_position(b) - if vector.equals(vector.round(oldp),vector.round(p)) and vector.equals(vector.round(oldr),vector.round(r)) then - return - end - player:set_bone_position(b,p,r) -end - - - -minetest.register_globalstep(function(dtime) - - time = time + dtime - - for _,player in pairs(get_connected_players()) do - - --[[ - - _ _ _ - __ _ _ __ (_)_ __ ___ __ _| |_(_) ___ _ __ ___ - / _` | '_ \| | '_ ` _ \ / _` | __| |/ _ \| '_ \/ __| - | (_| | | | | | | | | | | (_| | |_| | (_) | | | \__ \ - \__,_|_| |_|_|_| |_| |_|\__,_|\__|_|\___/|_| |_|___/ - - ]]-- - - local control = player:get_player_control() - local name = player:get_player_name() - --local meta = player:get_meta() - local parent = player:get_attach() - local wielded = player:get_wielded_item() - local player_velocity = player:get_velocity() or player:get_player_velocity() - local wielded_def = wielded:get_definition() - - local c_x, c_y = unpack(player_collision(player)) - - if player_velocity.x + player_velocity.y < .5 and c_x + c_y > 0 then - player:add_velocity({x = c_x, y = 0, z = c_y}) - player_velocity = player:get_velocity() or player:get_player_velocity() - end - - -- control head bone - local pitch = - degrees(player:get_look_vertical()) - local yaw = degrees(player:get_look_horizontal()) - - local player_vel_yaw = degrees(dir_to_yaw(player_velocity)) - if player_vel_yaw == 0 then - player_vel_yaw = player_vel_yaws[name] or yaw - end - player_vel_yaw = limit_vel_yaw(player_vel_yaw, yaw) - player_vel_yaws[name] = player_vel_yaw - - local fly_pos = player:get_pos() - local fly_node = minetest.get_node({x = fly_pos.x, y = fly_pos.y - 0.5, z = fly_pos.z}).name - local elytra = mcl_playerplus.elytra[player] - - elytra.active = player:get_inventory():get_stack("armor", 3):get_name() == "mcl_armor:elytra" - and not player:get_attach() - and (elytra.active or control.jump and player_velocity.y < -6) - and (fly_node == "air" or fly_node == "ignore") - - if elytra.active then - mcl_player.player_set_animation(player, "fly") - if player_velocity.y < -1.5 then - player:add_velocity({x=0, y=0.17, z=0}) - end - if math.abs(player_velocity.x) + math.abs(player_velocity.z) < 20 then - local dir = minetest.yaw_to_dir(player:get_look_horizontal()) - if degrees(player:get_look_vertical()) * -.01 < .1 then - look_pitch = degrees(player:get_look_vertical()) * -.01 - else - look_pitch = .1 - end - player:add_velocity({x=dir.x, y=look_pitch, z=dir.z}) - end - playerphysics.add_physics_factor(player, "gravity", "mcl_playerplus:elytra", 0.1) - - if elytra.rocketing > 0 then - elytra.rocketing = elytra.rocketing - dtime - if vector.length(player_velocity) < 40 then - player:add_velocity(vector.multiply(player:get_look_dir(), 4)) - add_particle({ - pos = fly_pos, - velocity = {x = 0, y = 0, z = 0}, - acceleration = {x = 0, y = 0, z = 0}, - expirationtime = math.random(0.3, 0.5), - size = math.random(1, 2), - collisiondetection = false, - vertical = false, - texture = "mcl_particles_bonemeal.png^[colorize:#bc7a57:127", - glow = 5, - }) - end - end - else - elytra.rocketing = 0 - playerphysics.remove_physics_factor(player, "gravity", "mcl_playerplus:elytra") - end - - if wielded_def and wielded_def._mcl_toollike_wield then - set_bone_position_conditional(player,"Wield_Item", vector.new(0,3.9,1.3), vector.new(90,0,0)) - elseif string.find(wielded:get_name(), "mcl_bows:bow") then - set_bone_position_conditional(player,"Wield_Item", vector.new(.5,4.5,-1.6), vector.new(90,0,20)) - elseif string.find(wielded:get_name(), "mcl_bows:crossbow_loaded") then - set_bone_position_conditional(player,"Wield_Item", vector.new(-1.5,5.7,1.8), vector.new(64,90,0)) - elseif string.find(wielded:get_name(), "mcl_bows:crossbow") then - set_bone_position_conditional(player,"Wield_Item", vector.new(-1.5,5.7,1.8), vector.new(90,90,0)) - else - set_bone_position_conditional(player,"Wield_Item", vector.new(-1.5,4.9,1.8), vector.new(135,0,90)) - end - - player_velocity_old = player:get_velocity() or player:get_player_velocity() - - - -- controls right and left arms pitch when shooting a bow or blocking - if mcl_shields.is_blocking(player) == 2 then - set_bone_position_conditional(player, "Arm_Right_Pitch_Control", vector.new(-3, 5.785, 0), vector.new(20, -20, 0)) - elseif mcl_shields.is_blocking(player) == 1 then - set_bone_position_conditional(player, "Arm_Left_Pitch_Control", vector.new(3, 5.785, 0), vector.new(20, 20, 0)) - elseif string.find(wielded:get_name(), "mcl_bows:bow") and control.RMB then - set_bone_position_conditional(player,"Arm_Right_Pitch_Control", vector.new(-3,5.785,0), vector.new(pitch+90,-30,pitch * -1 * .35)) - set_bone_position_conditional(player,"Arm_Left_Pitch_Control", vector.new(3.5,5.785,0), vector.new(pitch+90,43,pitch * .35)) - -- controls right and left arms pitch when holing a loaded crossbow - elseif string.find(wielded:get_name(), "mcl_bows:crossbow_loaded") then - set_bone_position_conditional(player,"Arm_Right_Pitch_Control", vector.new(-3,5.785,0), vector.new(pitch+90,-30,pitch * -1 * .35)) - set_bone_position_conditional(player,"Arm_Left_Pitch_Control", vector.new(3.5,5.785,0), vector.new(pitch+90,43,pitch * .35)) - -- controls right and left arms pitch when loading a crossbow - elseif string.find(wielded:get_name(), "mcl_bows:crossbow_") then - set_bone_position_conditional(player,"Arm_Right_Pitch_Control", vector.new(-3,5.785,0), vector.new(45,-20,25)) - set_bone_position_conditional(player,"Arm_Left_Pitch_Control", vector.new(3,5.785,0), vector.new(55,20,-45)) - -- when punching - elseif control.LMB and not parent then - set_bone_position_conditional(player,"Arm_Right_Pitch_Control", vector.new(-3,5.785,0), vector.new(pitch,0,0)) - set_bone_position_conditional(player,"Arm_Left_Pitch_Control", vector.new(3,5.785,0), vector.new(0,0,0)) - -- when holding an item. - elseif wielded:get_name() ~= "" then - set_bone_position_conditional(player,"Arm_Right_Pitch_Control", vector.new(-3,5.785,0), vector.new(20,0,0)) - set_bone_position_conditional(player,"Arm_Left_Pitch_Control", vector.new(3,5.785,0), vector.new(0,0,0)) - -- resets arms pitch - else - set_bone_position_conditional(player,"Arm_Left_Pitch_Control", vector.new(3,5.785,0), vector.new(0,0,0)) - set_bone_position_conditional(player,"Arm_Right_Pitch_Control", vector.new(-3,5.785,0), vector.new(0,0,0)) - end - - if elytra.active then - -- set head pitch and yaw when flying - set_bone_position_conditional(player,"Head_Control", vector.new(0,6.3,0), vector.new(pitch-degrees(dir_to_pitch(player_velocity)),player_vel_yaw - yaw,0)) - -- sets eye height, and nametag color accordingly - set_properties_conditional(player,{collisionbox = {-0.35,0,-0.35,0.35,0.8,0.35}, eye_height = 0.5, nametag_color = { r = 225, b = 225, a = 225, g = 225 }}) - -- control body bone when flying - set_bone_position_conditional(player,"Body_Control", vector.new(0,6.3,0), vector.new(degrees(dir_to_pitch(player_velocity)) - 90,-player_vel_yaw + yaw + 180,0)) - elseif parent then - local parent_yaw = degrees(parent:get_yaw()) - set_properties_conditional(player,{collisionbox = {-0.312,0,-0.312,0.312,1.8,0.312}, eye_height = 1.5, nametag_color = { r = 225, b = 225, a = 225, g = 225 }}) - set_bone_position_conditional(player,"Head_Control", vector.new(0,6.3,0), vector.new(pitch, -limit_vel_yaw(yaw, parent_yaw) + parent_yaw, 0)) - set_bone_position_conditional(player,"Body_Control", vector.new(0,6.3,0), vector.new(0,0,0)) - elseif control.sneak then - -- controls head pitch when sneaking - set_bone_position_conditional(player,"Head_Control", vector.new(0,6.3,0), vector.new(pitch, player_vel_yaw - yaw, player_vel_yaw - yaw)) - -- sets eye height, and nametag color accordingly - set_properties_conditional(player,{collisionbox = {-0.312,0,-0.312,0.312,1.8,0.312}, eye_height = 1.35, nametag_color = { r = 225, b = 225, a = 0, g = 225 }}) - -- sneaking body conrols - set_bone_position_conditional(player,"Body_Control", vector.new(0,6.3,0), vector.new(0, -player_vel_yaw + yaw, 0)) - elseif get_item_group(mcl_playerinfo[name].node_head, "water") ~= 0 and is_sprinting(name) == true then - -- set head pitch and yaw when swimming - set_bone_position_conditional(player,"Head_Control", vector.new(0,6.3,0), vector.new(pitch-degrees(dir_to_pitch(player_velocity)),player_vel_yaw - yaw,0)) - -- sets eye height, and nametag color accordingly - set_properties_conditional(player,{collisionbox = {-0.312,0,-0.312,0.312,0.8,0.312}, eye_height = 0.5, nametag_color = { r = 225, b = 225, a = 225, g = 225 }}) - -- control body bone when swimming - set_bone_position_conditional(player,"Body_Control", vector.new(0,6.3,0), vector.new(degrees(dir_to_pitch(player_velocity)) - 90,-player_vel_yaw + yaw + 180,0)) - else - -- sets eye height, and nametag color accordingly - set_properties_conditional(player,{collisionbox = {-0.312,0,-0.312,0.312,1.8,0.312}, eye_height = 1.5, nametag_color = { r = 225, b = 225, a = 225, g = 225 }}) - - set_bone_position_conditional(player,"Head_Control", vector.new(0,6.3,0), vector.new(pitch, player_vel_yaw - yaw, 0)) - set_bone_position_conditional(player,"Body_Control", vector.new(0,6.3,0), vector.new(0, -player_vel_yaw + yaw, 0)) - end - - -- Update jump status immediately since we need this info in real time. - -- WARNING: This section is HACKY as hell since it is all just based on heuristics. - - if mcl_playerplus_internal[name].jump_cooldown > 0 then - mcl_playerplus_internal[name].jump_cooldown = mcl_playerplus_internal[name].jump_cooldown - dtime - end - - if control.jump and mcl_playerplus_internal[name].jump_cooldown <= 0 then - - --pos = player:get_pos() - - node_stand = mcl_playerinfo[name].node_stand - node_stand_below = mcl_playerinfo[name].node_stand_below - node_head = mcl_playerinfo[name].node_head - node_feet = mcl_playerinfo[name].node_feet - if not node_stand or not node_stand_below or not node_head or not node_feet then - return - end - if not minetest.registered_nodes[node_stand] or not minetest.registered_nodes[node_stand_below] or not minetest.registered_nodes[node_head] or not minetest.registered_nodes[node_feet] then - return - end - - -- Cause buggy exhaustion for jumping - - --[[ Checklist we check to know the player *actually* jumped: - * Not on or in liquid - * Not on or at climbable - * On walkable - * Not on disable_jump - FIXME: This code is pretty hacky and it is possible to miss some jumps or detect false - jumps because of delays, rounding errors, etc. - What this code *really* needs is some kind of jumping “callback” which this engine lacks - as of 0.4.15. - ]] - - if get_item_group(node_feet, "liquid") == 0 and - get_item_group(node_stand, "liquid") == 0 and - not minetest.registered_nodes[node_feet].climbable and - not minetest.registered_nodes[node_stand].climbable and - (minetest.registered_nodes[node_stand].walkable or minetest.registered_nodes[node_stand_below].walkable) - and get_item_group(node_stand, "disable_jump") == 0 - and get_item_group(node_stand_below, "disable_jump") == 0 then - -- Cause exhaustion for jumping - if is_sprinting(name) then - exhaust(name, mcl_hunger.EXHAUST_SPRINT_JUMP) - else - exhaust(name, mcl_hunger.EXHAUST_JUMP) - end - - -- Reset cooldown timer - mcl_playerplus_internal[name].jump_cooldown = 0.45 - end - end - end - - -- Run the rest of the code every 0.5 seconds - if time < 0.5 then - return - end - - -- reset time for next check - -- FIXME: Make sure a regular check interval applies - time = 0 - - -- check players - for _,player in pairs(get_connected_players()) do - -- who am I? - local name = player:get_player_name() - - -- where am I? - local pos = player:get_pos() - - -- what is around me? - local node_stand = mcl_playerinfo[name].node_stand - local node_stand_below = mcl_playerinfo[name].node_stand_below - local node_head = mcl_playerinfo[name].node_head - local node_feet = mcl_playerinfo[name].node_feet - if not node_stand or not node_stand_below or not node_head or not node_feet then - return - end - - -- Standing on soul sand? If so, walk slower (unless player wears Soul Speed boots) - if node_stand == "mcl_nether:soul_sand" then - -- TODO: Tweak walk speed - -- TODO: Also slow down mobs - -- Slow down even more when soul sand is above certain block - local boots = player:get_inventory():get_stack("armor", 5) - local soul_speed = mcl_enchanting.get_enchantment(boots, "soul_speed") - if soul_speed > 0 then - playerphysics.add_physics_factor(player, "speed", "mcl_playerplus:surface", soul_speed * 0.105 + 1.3) - else - if node_stand_below == "mcl_core:ice" or node_stand_below == "mcl_core:packed_ice" or node_stand_below == "mcl_core:slimeblock" or node_stand_below == "mcl_core:water_source" then - playerphysics.add_physics_factor(player, "speed", "mcl_playerplus:surface", 0.1) - else - playerphysics.add_physics_factor(player, "speed", "mcl_playerplus:surface", 0.4) - end - end - elseif get_item_group(node_feet, "liquid") ~= 0 and mcl_enchanting.get_enchantment(player:get_inventory():get_stack("armor", 5), "depth_strider") then - local boots = player:get_inventory():get_stack("armor", 5) - local depth_strider = mcl_enchanting.get_enchantment(boots, "depth_strider") - - if depth_strider > 0 then - playerphysics.add_physics_factor(player, "speed", "mcl_playerplus:surface", (depth_strider / 3) + 0.75) - end - else - playerphysics.remove_physics_factor(player, "speed", "mcl_playerplus:surface") - end - - -- Is player suffocating inside node? (Only for solid full opaque cube type nodes - -- without group disable_suffocation=1) - local ndef = minetest.registered_nodes[node_head] - - if (ndef.walkable == nil or ndef.walkable == true) - and (ndef.collision_box == nil or ndef.collision_box.type == "regular") - and (ndef.node_box == nil or ndef.node_box.type == "regular") - and (ndef.groups.disable_suffocation ~= 1) - and (ndef.groups.opaque == 1) - and (node_head ~= "ignore") - -- Check privilege, too - and (not check_player_privs(name, {noclip = true})) then - if player:get_hp() > 0 then - mcl_util.deal_damage(player, 1, {type = "in_wall"}) - end - end - - -- Am I near a cactus? - local near = find_node_near(pos, 1, "mcl_core:cactus") - if not near then - near = find_node_near({x=pos.x, y=pos.y-1, z=pos.z}, 1, "mcl_core:cactus") - end - if near then - -- Am I touching the cactus? If so, it hurts - local dist = vector.distance(pos, near) - local dist_feet = vector.distance({x=pos.x, y=pos.y-1, z=pos.z}, near) - if dist < 1.1 or dist_feet < 1.1 then - if player:get_hp() > 0 then - mcl_util.deal_damage(player, 1, {type = "cactus"}) - end - end - end - - --[[ Swimming: Cause exhaustion. - NOTE: As of 0.4.15, it only counts as swimming when you are with the feet inside the liquid! - Head alone does not count. We respect that for now. ]] - if not player:get_attach() and (get_item_group(node_feet, "liquid") ~= 0 or - get_item_group(node_stand, "liquid") ~= 0) then - local lastPos = mcl_playerplus_internal[name].lastPos - if lastPos then - local dist = vector.distance(lastPos, pos) - mcl_playerplus_internal[name].swimDistance = mcl_playerplus_internal[name].swimDistance + dist - if mcl_playerplus_internal[name].swimDistance >= 1 then - local superficial = math.floor(mcl_playerplus_internal[name].swimDistance) - exhaust(name, mcl_hunger.EXHAUST_SWIM * superficial) - mcl_playerplus_internal[name].swimDistance = mcl_playerplus_internal[name].swimDistance - superficial - end - end - - end - - -- Underwater: Spawn bubble particles - if get_item_group(node_head, "water") ~= 0 then - add_particlespawner({ - amount = 10, - time = 0.15, - minpos = { x = -0.25, y = 0.3, z = -0.25 }, - maxpos = { x = 0.25, y = 0.7, z = 0.75 }, - attached = player, - minvel = {x = -0.2, y = 0, z = -0.2}, - maxvel = {x = 0.5, y = 0, z = 0.5}, - minacc = {x = -0.4, y = 4, z = -0.4}, - maxacc = {x = 0.5, y = 1, z = 0.5}, - minexptime = 0.3, - maxexptime = 0.8, - minsize = 0.7, - maxsize = 2.4, - texture = "mcl_particles_bubble.png" - }) - end - - -- Show positions of barriers when player is wielding a barrier - local wi = player:get_wielded_item():get_name() - if wi == "mcl_core:barrier" or wi == "mcl_core:realm_barrier" then - local pos = vector.round(player:get_pos()) - local r = 8 - local vm = get_voxel_manip() - local emin, emax = vm:read_from_map({x=pos.x-r, y=pos.y-r, z=pos.z-r}, {x=pos.x+r, y=pos.y+r, z=pos.z+r}) - local area = VoxelArea:new{ - MinEdge = emin, - MaxEdge = emax, - } - local data = vm:get_data() - for x=pos.x-r, pos.x+r do - for y=pos.y-r, pos.y+r do - for z=pos.z-r, pos.z+r do - local vi = area:indexp({x=x, y=y, z=z}) - local nodename = get_name_from_content_id(data[vi]) - local tex - if nodename == "mcl_core:barrier" then - tex = "mcl_core_barrier.png" - elseif nodename == "mcl_core:realm_barrier" then - tex = "mcl_core_barrier.png^[colorize:#FF00FF:127^[transformFX" - end - if tex then - add_particle({ - pos = {x=x, y=y, z=z}, - expirationtime = 1, - size = 8, - texture = tex, - glow = 14, - playername = name - }) - end - end - end - end - end - - -- Update internal values - mcl_playerplus_internal[name].lastPos = pos - - end - -end) - --- set to blank on join (for 3rd party mods) -minetest.register_on_joinplayer(function(player) - local name = player:get_player_name() - - mcl_playerplus_internal[name] = { - lastPos = nil, - swimDistance = 0, - jump_cooldown = -1, -- Cooldown timer for jumping, we need this to prevent the jump exhaustion to increase rapidly - } - mcl_playerplus.elytra[player] = {active = false, rocketing = 0} -end) - --- clear when player leaves -minetest.register_on_leaveplayer(function(player) - local name = player:get_player_name() - - mcl_playerplus_internal[name] = nil - mcl_playerplus.elytra[player] = nil -end) - --- Don't change HP if the player falls in the water or through End Portal: -mcl_damage.register_modifier(function(obj, damage, reason) - if reason.type == "fall" then - local pos = obj:get_pos() - local node = minetest.get_node(pos) - local velocity = obj:get_velocity() or obj:get_player_velocity() or {x=0,y=-10,z=0} - local v_axis_max = math.max(math.abs(velocity.x), math.abs(velocity.y), math.abs(velocity.z)) - local step = {x = velocity.x / v_axis_max, y = velocity.y / v_axis_max, z = velocity.z / v_axis_max} - for i = 1, math.ceil(v_axis_max/5)+1 do -- trace at least 1/5 of the way per second - if not node or node.name == "ignore" then - minetest.get_voxel_manip():read_from_map(pos, pos) - node = minetest.get_node(pos) - end - if node then - local def = minetest.registered_nodes[node.name] - if not def or def.walkable then - return - end - if minetest.get_item_group(node.name, "water") ~= 0 then - return 0 - end - if node.name == "mcl_portals:portal_end" then - if mcl_portals and mcl_portals.end_teleport then - mcl_portals.end_teleport(obj) - end - return 0 - end - if node.name == "mcl_core:cobweb" then - return 0 - end - if node.name == "mcl_core:vine" then - return 0 - end - end - pos = vector.add(pos, step) - node = minetest.get_node(pos) - end - end -end, -200) - -minetest.register_on_respawnplayer(function(player) - local pos = player:get_pos() - minetest.add_particlespawner({ - amount = 50, - time = 0.001, - minpos = vector.add(pos, 0), - maxpos = vector.add(pos, 0), - minvel = vector.new(-5,-5,-5), - maxvel = vector.new(5,5,5), - minexptime = 1.1, - maxexptime = 1.5, - minsize = 1, - maxsize = 2, - collisiondetection = false, - vertical = false, - texture = "mcl_particles_mob_death.png^[colorize:#000000:255", - }) - - minetest.sound_play("mcl_mobs_mob_poof", { - pos = pos, - gain = 1.0, - max_hear_distance = 8, - }, true) -end) diff --git a/mods/PLAYER/mcl_playerplus/license.txt b/mods/PLAYER/mcl_playerplus/license.txt deleted file mode 100644 index fec6f6aa51..0000000000 --- a/mods/PLAYER/mcl_playerplus/license.txt +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 TenPlus1 - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/mods/PLAYER/mcl_playerplus/locale/mcl_playerplus.pl.tr b/mods/PLAYER/mcl_playerplus/locale/mcl_playerplus.pl.tr deleted file mode 100644 index 67a82d95da..0000000000 --- a/mods/PLAYER/mcl_playerplus/locale/mcl_playerplus.pl.tr +++ /dev/null @@ -1,3 +0,0 @@ -# textdomain: mcl_playerplus -@1 suffocated to death.=@1 udusiła się na śmierć. -@1 was prickled to death by a cactus.=@1 została zakłuta na śmierć przez kaktusa. diff --git a/mods/PLAYER/mcl_playerplus/locale/mcl_playerplus.zh_TW.tr b/mods/PLAYER/mcl_playerplus/locale/mcl_playerplus.zh_TW.tr deleted file mode 100644 index eb9e6b1dba..0000000000 --- a/mods/PLAYER/mcl_playerplus/locale/mcl_playerplus.zh_TW.tr +++ /dev/null @@ -1,3 +0,0 @@ -# textdomain: mcl_playerplus -@1 suffocated to death.=@1 在牆壁裡窒息。 -@1 was prickled to death by a cactus.=@1 被仙人掌刺死了。 diff --git a/mods/PLAYER/mcl_playerplus/mod.conf b/mods/PLAYER/mcl_playerplus/mod.conf deleted file mode 100644 index 953ea9403a..0000000000 --- a/mods/PLAYER/mcl_playerplus/mod.conf +++ /dev/null @@ -1,5 +0,0 @@ -name = mcl_playerplus -author = TenPlus1 -description = Adds some simple player-related gameplay effects: Hurt by touching a cactus, suffocation and more. -depends = mcl_init, mcl_core, mcl_particles, mcl_hunger, playerphysics, mcl_playerinfo, mcl_weather, mcl_spawn, mcl_enchanting, mcl_damage, mcl_sprint, mcl_util, mcl_shields - diff --git a/mods/PLAYER/mcl_playerplus/textures/mcl_playerplus_end_sky.png b/mods/PLAYER/mcl_playerplus/textures/mcl_playerplus_end_sky.png deleted file mode 100644 index e9671f3dc2..0000000000 Binary files a/mods/PLAYER/mcl_playerplus/textures/mcl_playerplus_end_sky.png and /dev/null differ diff --git a/mods/PLAYER/mcl_skins/.gitignore b/mods/PLAYER/mcl_skins/.gitignore deleted file mode 100644 index 6edbd28344..0000000000 --- a/mods/PLAYER/mcl_skins/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -!textures/mcl_skins_character_1.png -textures/mcl_skins_character_* -!meta/mcl_skins_character_1.txt -meta/mcl_skins_character_* \ No newline at end of file diff --git a/mods/PLAYER/mcl_skins/LICENSE.txt b/mods/PLAYER/mcl_skins/LICENSE.txt deleted file mode 100644 index fec6f6aa51..0000000000 --- a/mods/PLAYER/mcl_skins/LICENSE.txt +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 TenPlus1 - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/mods/PLAYER/mcl_skins/README.md b/mods/PLAYER/mcl_skins/README.md deleted file mode 100644 index bbe5309abd..0000000000 --- a/mods/PLAYER/mcl_skins/README.md +++ /dev/null @@ -1,13 +0,0 @@ -= Skins for MineClone 2 = - -Simple mod to allow players to select a skin. -Use the chat command /setskin to change skin. - -Forked from Simple Skins by TenPlus1. -https://forum.minetest.net/viewtopic.php?id=9100 - -== License == -Code under MIT license -Origial authors: -- TenPlus1 -- Zeg9 diff --git a/mods/PLAYER/mcl_skins/init.lua b/mods/PLAYER/mcl_skins/init.lua deleted file mode 100644 index 485e342b1a..0000000000 --- a/mods/PLAYER/mcl_skins/init.lua +++ /dev/null @@ -1,280 +0,0 @@ --- Skins for MineClone 2 - -local modname = minetest.get_current_modname() - -mcl_skins = { - skins = {}, list = {}, meta = {}, - modpath = minetest.get_modpath(modname), - skin_count = 0, -- counter of _custom_ skins (all skins except character.png) -} - -local S = minetest.get_translator(modname) -local has_mcl_inventory = minetest.get_modpath("mcl_inventory") - --- load skin list and metadata -local id, f, data, skin = 0 - -while true do - - if id == 0 then - skin = "character" - else - skin = "mcl_skins_character_" .. id - - -- Does skin file exist? - f = io.open(mcl_skins.modpath .. "/textures/" .. skin .. ".png") - - -- escape loop if not found - if not f then - break - end - f:close() - end - - mcl_skins.list[id] = skin - - local metafile - - -- does metadata exist for that skin file ? - if id == 0 then - metafile = "mcl_skins_character.txt" - else - metafile = "mcl_skins_character_"..id..".txt" - end - f = io.open(mcl_skins.modpath .. "/meta/" .. metafile) - - data = nil - if f then - data = minetest.deserialize("return {" .. f:read("*all") .. "}") - f:close() - end - - -- add metadata to list - mcl_skins.meta[skin] = { - name = data and data.name or "", - author = data and data.author or "", - gender = data and data.gender or "", - } - - if id > 0 then - mcl_skins.skin_count = mcl_skins.skin_count + 1 - end - id = id + 1 -end - -function mcl_skins.cycle_skin(player) - local skin_id = tonumber(player:get_meta():get_string("mcl_skins:skin_id")) - if not skin_id then - skin_id = 0 - end - skin_id = skin_id + 1 - if skin_id > mcl_skins.skin_count then - skin_id = 0 - end - mcl_skins.set_player_skin(player, skin_id) -end - -function mcl_skins.set_player_skin(player, skin_id) - if not player then - return false - end - local playername = player:get_player_name() - local skin - if skin_id == nil or type(skin_id) ~= "number" or skin_id < 0 or skin_id > mcl_skins.skin_count then - return false - elseif skin_id == 0 then - skin = "character" - mcl_player.player_set_model(player, "mcl_armor_character.b3d") - else - skin = "mcl_skins_character_" .. tostring(skin_id) - local meta = mcl_skins.meta[skin] - if meta.gender == "female" then - mcl_player.player_set_model(player, "mcl_armor_character_female.b3d") - else - mcl_player.player_set_model(player, "mcl_armor_character.b3d") - end - end - --local skin_file = skin .. ".png" - mcl_skins.skins[playername] = skin - player:get_meta():set_string("mcl_skins:skin_id", tostring(skin_id)) - mcl_skins.update_player_skin(player) - if has_mcl_inventory then - mcl_inventory.update_inventory_formspec(player) - end - for i=1, #mcl_skins.registered_on_set_skins do - mcl_skins.registered_on_set_skins[i](player, skin) - end - minetest.log("action", "[mcl_skins] Player skin for "..playername.." set to skin #"..skin_id) - return true -end - -function mcl_skins.update_player_skin(player) - if not player then - return - end - local playername = player:get_player_name() - mcl_player.player_set_skin(player, mcl_skins.skins[playername] .. ".png") -end - --- load player skin on join -minetest.register_on_joinplayer(function(player) - local name = player:get_player_name() - local skin_id = player:get_meta():get_string("mcl_skins:skin_id") - local set_skin - -- do we already have a skin in player attributes? - if skin_id and skin_id ~= "" then - set_skin = tonumber(skin_id) - -- otherwise use random skin if not set - end - if not set_skin then - set_skin = math.random(0, mcl_skins.skin_count) - end - local ok = mcl_skins.set_player_skin(player, set_skin) - if not ok then - set_skin = math.random(0, mcl_skins.skin_count) - minetest.log("warning", "[mcl_skins] Player skin for "..name.." not found, falling back to skin #"..set_skin) - mcl_skins.set_player_skin(player, set_skin) - end -end) - -mcl_skins.registered_on_set_skins = {} - -function mcl_skins.register_on_set_skin(func) - table.insert(mcl_skins.registered_on_set_skins, func) -end - --- command to set player skin (usually for custom skins) -minetest.register_chatcommand("setskin", { - params = S("[] []"), - description = S("Select player skin of yourself or another player"), - privs = {}, - func = function(name, param) - - if param == "" and name ~= "" then - mcl_skins.show_formspec(name) - return true - end - local playername, skin_id = string.match(param, "([^ ]+) (%d+)") - if not playername or not skin_id then - skin_id = string.match(param, "(%d+)") - if not skin_id then - return false, S("Insufficient or wrong parameters") - end - playername = name - end - skin_id = tonumber(skin_id) - - local player = minetest.get_player_by_name(playername) - - if not player then - return false, S("Player @1 not online!", playername) - end - if name ~= playername then - local privs = minetest.get_player_privs(name) - if not privs.server then - return false, S("You need the “server” privilege to change the skin of other players!") - end - end - - local ok = mcl_skins.set_player_skin(player, skin_id) - if not ok then - return false, S("Invalid skin number! Valid numbers: 0 to @1", mcl_skins.skin_count) - end - local skinfile = "#"..skin_id - - local meta = mcl_skins.meta[mcl_skins.skins[playername]] - local your_msg - if not meta.name or meta.name == "" then - your_msg = S("Your skin has been set to: @1", skinfile) - else - your_msg = S("Your skin has been set to: @1 (@2)", meta.name, skinfile) - end - if name == playername then - return true, your_msg - else - minetest.chat_send_player(playername, your_msg) - return true, S("Skin of @1 set to: @2 (@3)", playername, meta.name, skinfile) - end - - end, -}) - -minetest.register_on_player_receive_fields(function(player, formname, fields) - if fields.__mcl_skins then - if mcl_skins.skin_count <= 6 then - -- Change skin immediately if there are not many skins - mcl_skins.cycle_skin(player) - if player:get_attach() then - mcl_player.player_set_animation(player, "sit") - end - else - -- Show skin selection formspec otherwise - mcl_skins.show_formspec(player:get_player_name()) - end - end -end) - -function mcl_skins.show_formspec(playername) - local formspec = "size[7,8.5]" - - formspec = formspec .. "label[2,2;" .. minetest.formspec_escape(minetest.colorize("#383838", S("Select player skin:"))) .. "]" - .. "textlist[0,2.5;6.8,6;skins_set;" - - local meta - local selected = 1 - - for i = 0, mcl_skins.skin_count do - - local label = S("@1 (@2)", mcl_skins.meta[mcl_skins.list[i]].name, "#"..i) - - formspec = formspec .. minetest.formspec_escape(label) - - if mcl_skins.skins[playername] == mcl_skins.list[i] then - selected = i + 1 - meta = mcl_skins.meta[mcl_skins.list[i]] - end - - if i < #mcl_skins.list then - formspec = formspec .."," - end - end - - formspec = formspec .. ";" .. selected .. ";false]" - - local player = minetest.get_player_by_name(playername) - if player then - --maybe the function could accept both player object and player name? - formspec = formspec .. mcl_player.get_player_formspec_model(player, 0, 0, 1.35, 2.7, "mcl_skins:skin_select") - end - - if meta then - if meta.name and meta.name ~= "" then - formspec = formspec .. "label[2,0.5;" .. minetest.formspec_escape(minetest.colorize("#383838", S("Name: @1", meta.name))) .. "]" - end - end - - minetest.show_formspec(playername, "mcl_skins:skin_select", formspec) -end - -minetest.register_on_player_receive_fields(function(player, formname, fields) - - if formname == "mcl_skins:skin_select" then - - local name = player:get_player_name() - - local event = minetest.explode_textlist_event(fields["skins_set"]) - - if event.type == "CHG" or event.type == "DCL" then - - local skin_id = math.min(event.index - 1, mcl_skins.skin_count) - if not mcl_skins.list[skin_id] then - return -- Do not update wrong skin number - end - - mcl_skins.set_player_skin(player, skin_id) - mcl_skins.show_formspec(name) - end - end -end) - -minetest.log("action", "[mcl_skins] Mod initialized with "..mcl_skins.skin_count.." custom skin(s)") diff --git a/mods/PLAYER/mcl_skins/locale/mcl_skins.de.tr b/mods/PLAYER/mcl_skins/locale/mcl_skins.de.tr deleted file mode 100644 index 8f9b488db7..0000000000 --- a/mods/PLAYER/mcl_skins/locale/mcl_skins.de.tr +++ /dev/null @@ -1,13 +0,0 @@ -# textdomain: mcl_skins -[] []=[] [] -Select player skin of yourself or another player=Spieleraussehen von Ihnen oder einem anderen Spieler auswählen -Insufficient or wrong parameters=Unzureichende oder falsche Parameter -Player @1 not online!=Spieler @1 ist nicht online! -You need the “server” privilege to change the skin of other players!=Sie brauchen das „server“-Privileg, um das Aussehen anderer Spieler zu ändern! -Invalid skin number! Valid numbers: 0 to @1=Ungültige Aussehens-Nummer! Gültige Nummern: 0 bis @1 -Your skin has been set to: @1=Ihr Aussehen wurde geändert auf: @1 -Your skin has been set to: @1 (@2)=Ihr Aussehen wurde geändert auf: @1 (@2) -Skin of @1 set to: @2 (@3)=Aussehen von @1 gesetzt auf: @2 (@3) -Select player skin:=Spieleraussehen wählen: -@1 (@2)=@1 (@2) -Name: @1=Name: @1 diff --git a/mods/PLAYER/mcl_skins/locale/mcl_skins.es.tr b/mods/PLAYER/mcl_skins/locale/mcl_skins.es.tr deleted file mode 100644 index dcd5c84384..0000000000 --- a/mods/PLAYER/mcl_skins/locale/mcl_skins.es.tr +++ /dev/null @@ -1,13 +0,0 @@ -# textdomain: mcl_skins -[] []=[] [] -Select player skin of yourself or another player=Selecciona el skin tuyo o de otro jugador -Insufficient or wrong parameters=Parámetros insuficientes o incorrectos -Player @1 not online!=¡El jugador @1 no está en línea! -You need the “server” privilege to change the skin of other players!=¡Necesitas el privilegio de "servidor" para cambiar el aspecto de otros jugadores! -Invalid skin number! Valid numbers: 0 to @1=¡Número de piel no válido! Números válidos: 0 a @1 -Your skin has been set to: @1=Su skin se ha configurado a: @1 -Your skin has been set to: @1 (@2)=Su skin se ha configurado a: @1 (@2) -Skin of @1 set to: @2 (@3)=El skin de @1 se ha configurado a: @2 (@3) -Select player skin:=Selecciona el skin del jugador: -@1 (@2)=@1 (@2) -Name: @1=Nombre: @1 diff --git a/mods/PLAYER/mcl_skins/locale/mcl_skins.fr.tr b/mods/PLAYER/mcl_skins/locale/mcl_skins.fr.tr deleted file mode 100644 index 146c6be5f8..0000000000 --- a/mods/PLAYER/mcl_skins/locale/mcl_skins.fr.tr +++ /dev/null @@ -1,14 +0,0 @@ -# textdomain: mcl_skins -[] []=[] [] -Select player skin of yourself or another player=Sélectionner une apparence pour vous même ou un autre joueur -Insufficient or wrong parameters=Paramètres insuffisants ou incorrects -Player @1 not online!=Le joueur @1 n'est pas en ligne! -You need the “server” privilege to change the skin of other players!=Vous avez besoin du privilège “server” pour changer l'apparence des autres joueurs! -Invalid skin number! Valid numbers: 0 to @1=Numéro d'apparence incorrect! Numéros valides : 0 à @1 -Your skin has been set to: @1=Votre apparence a été définie à: @1 -Your skin has been set to: @1 (@2)=Votre apparence a été définie à: @1 (@2) -Skin of @1 set to: @2 (@3)=Apparence of @1 set to: @2 (@3)= -Select player skin:=Sélectionner l'apparence du joueur : -@1 (@2)=@1 (@2) -Name: @1=Nom : @ - diff --git a/mods/PLAYER/mcl_skins/locale/mcl_skins.ms.tr b/mods/PLAYER/mcl_skins/locale/mcl_skins.ms.tr deleted file mode 100644 index 58946f6051..0000000000 --- a/mods/PLAYER/mcl_skins/locale/mcl_skins.ms.tr +++ /dev/null @@ -1,16 +0,0 @@ -# textdomain: mcl_skins -# UNFINISHED translation! -# TODO: Remove the # sign from the translations below and add the missing translations. - -[] []= -Select player skin of yourself or another player= -Insufficient or wrong parameters= -Player @1 not online!= -You need the “server” privilege to change the skin of other players!= -Invalid skin number! Valid numbers: 0 to @1= -Your skin has been set to: @1= -Your skin has been set to: @1 (@2)= -Skin of @1 set to: @2 (@3)= -Select player skin:=Pilih Kulit Pemain: -@1 (@2)= -Name: @1=Nama: @1 diff --git a/mods/PLAYER/mcl_skins/locale/mcl_skins.pl.tr b/mods/PLAYER/mcl_skins/locale/mcl_skins.pl.tr deleted file mode 100644 index 9b07cea2ca..0000000000 --- a/mods/PLAYER/mcl_skins/locale/mcl_skins.pl.tr +++ /dev/null @@ -1,13 +0,0 @@ -# textdomain: mcl_skins -[] []=[] [] -Select player skin of yourself or another player=Wybierz skin gracza dla siebie lub innego gracza -Insufficient or wrong parameters=Niewystarczające lub złe parametry -Player @1 not online!=Gracz @1 nie jest online! -You need the “server” privilege to change the skin of other players!=Potrzebujesz uprawnienia "serwer", aby zmieniać skiny innych graczy! -Invalid skin number! Valid numbers: 0 to @1=Niepoprawny numer skina! Poprawne numery: od 0 do @1 -Your skin has been set to: @1=Twój skin został ustawiony na: @1 -Your skin has been set to: @1 (@2)=Twój skin został ustawiony na: @1 (@2) -Skin of @1 set to: @2 (@3)=Skin gracza @1 ustawiony na @2 (@3) -Select player skin:=Wybierz skin gracza: -@1 (@2)=@1 (@2) -Name: @1=Nazwa: @1 diff --git a/mods/PLAYER/mcl_skins/locale/mcl_skins.ru.tr b/mods/PLAYER/mcl_skins/locale/mcl_skins.ru.tr deleted file mode 100644 index 64eab0e3f2..0000000000 --- a/mods/PLAYER/mcl_skins/locale/mcl_skins.ru.tr +++ /dev/null @@ -1,13 +0,0 @@ -# textdomain: mcl_skins -[] []=[<игрок>] [<номер скина>] -Select player skin of yourself or another player=Выберите скин для себя или для другого игрока -Insufficient or wrong parameters=Недопустимые или неправильные параметры -Player @1 not online!=Игрок @1 не в сети! -You need the “server” privilege to change the skin of other players!=Для смены скинов другим игрокам у вас должна быть привилегия “server”! -Invalid skin number! Valid numbers: 0 to @1=Недопустимый номер скина! Правильные номера: от 0 до @1 -Your skin has been set to: @1=Ваш скин выбран: @1 -Your skin has been set to: @1 (@2)=Ваш скин установлен: @1 (@2) -Skin of @1 set to: @2 (@3)=Скин игрока @1 установлен: @2 (@3) -Select player skin:=Выбор скина игрока: -@1 (@2)=@1 (@2) -Name: @1=Имя: @1 diff --git a/mods/PLAYER/mcl_skins/locale/mcl_skins.zh_TW.tr b/mods/PLAYER/mcl_skins/locale/mcl_skins.zh_TW.tr deleted file mode 100644 index 1347800ee6..0000000000 --- a/mods/PLAYER/mcl_skins/locale/mcl_skins.zh_TW.tr +++ /dev/null @@ -1,13 +0,0 @@ -# textdomain: mcl_skins -[] []=[<玩家名字>] [<皮膚篇號>] -Select player skin of yourself or another player=替自己或其他玩家選擇皮膚 -Insufficient or wrong parameters=無效或錯誤參數 -Player @1 not online!=玩家 @1 不在線! -You need the “server” privilege to change the skin of other players!=你需要「server」權限來替換其他玩家的皮膚! -Invalid skin number! Valid numbers: 0 to @1=無效皮膚篇號!有效篇號:0至@1 -Your skin has been set to: @1=你的皮膚已換成:@1 -Your skin has been set to: @1 (@2)=你的皮膚已換成:@1(@2) -Skin of @1 set to: @2 (@3)=@1的皮膚已換成:@1 -Select player skin:=選擇玩家皮膚: -@1 (@2)=@1(@2) -Name: @1=名稱:@1 diff --git a/mods/PLAYER/mcl_skins/locale/template.txt b/mods/PLAYER/mcl_skins/locale/template.txt deleted file mode 100644 index c683fa4e4b..0000000000 --- a/mods/PLAYER/mcl_skins/locale/template.txt +++ /dev/null @@ -1,13 +0,0 @@ -# textdomain: mcl_skins -[] []= -Select player skin of yourself or another player= -Insufficient or wrong parameters= -Player @1 not online!= -You need the “server” privilege to change the skin of other players!= -Invalid skin number! Valid numbers: 0 to @1= -Your skin has been set to: @1= -Your skin has been set to: @1 (@2)= -Skin of @1 set to: @2 (@3)= -Select player skin:= -@1 (@2)= -Name: @1= diff --git a/mods/PLAYER/mcl_skins/meta/mcl_skins_character.txt b/mods/PLAYER/mcl_skins/meta/mcl_skins_character.txt deleted file mode 100644 index c31bd71688..0000000000 --- a/mods/PLAYER/mcl_skins/meta/mcl_skins_character.txt +++ /dev/null @@ -1,3 +0,0 @@ -name = "Steve", -author = "%TEXTURE_PACK_AUTHOR%", -gender = "male", diff --git a/mods/PLAYER/mcl_skins/meta/mcl_skins_character_1.txt b/mods/PLAYER/mcl_skins/meta/mcl_skins_character_1.txt deleted file mode 100644 index e6c90dc0fc..0000000000 --- a/mods/PLAYER/mcl_skins/meta/mcl_skins_character_1.txt +++ /dev/null @@ -1,3 +0,0 @@ -name = "Alex", -author = "%TEXTURE_PACK_AUTHOR%", -gender = "female", diff --git a/mods/PLAYER/mcl_skins/mod.conf b/mods/PLAYER/mcl_skins/mod.conf deleted file mode 100644 index 657d3cc0ea..0000000000 --- a/mods/PLAYER/mcl_skins/mod.conf +++ /dev/null @@ -1,5 +0,0 @@ -name = mcl_skins -author = TenPlus1 -description = Mod that allows players to set their individual skins. -depends = mcl_player -optional_depends = mcl_inventory, intllib diff --git a/mods/PLAYER/mcl_skins/textures/mcl_skins_button.png b/mods/PLAYER/mcl_skins/textures/mcl_skins_button.png deleted file mode 100644 index 49acf85503..0000000000 Binary files a/mods/PLAYER/mcl_skins/textures/mcl_skins_button.png and /dev/null differ diff --git a/mods/PLAYER/mcl_skins/textures/mcl_skins_character_1.png b/mods/PLAYER/mcl_skins/textures/mcl_skins_character_1.png deleted file mode 100644 index 71f02471dc..0000000000 Binary files a/mods/PLAYER/mcl_skins/textures/mcl_skins_character_1.png and /dev/null differ diff --git a/mods/PLAYER/mcl_sprint/COPYING b/mods/PLAYER/mcl_sprint/COPYING deleted file mode 100644 index 0e259d42c9..0000000000 --- a/mods/PLAYER/mcl_sprint/COPYING +++ /dev/null @@ -1,121 +0,0 @@ -Creative Commons Legal Code - -CC0 1.0 Universal - - CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE - LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN - ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS - INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES - REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS - PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM - THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED - HEREUNDER. - -Statement of Purpose - -The laws of most jurisdictions throughout the world automatically confer -exclusive Copyright and Related Rights (defined below) upon the creator -and subsequent owner(s) (each and all, an "owner") of an original work of -authorship and/or a database (each, a "Work"). - -Certain owners wish to permanently relinquish those rights to a Work for -the purpose of contributing to a commons of creative, cultural and -scientific works ("Commons") that the public can reliably and without fear -of later claims of infringement build upon, modify, incorporate in other -works, reuse and redistribute as freely as possible in any form whatsoever -and for any purposes, including without limitation commercial purposes. -These owners may contribute to the Commons to promote the ideal of a free -culture and the further production of creative, cultural and scientific -works, or to gain reputation or greater distribution for their Work in -part through the use and efforts of others. - -For these and/or other purposes and motivations, and without any -expectation of additional consideration or compensation, the person -associating CC0 with a Work (the "Affirmer"), to the extent that he or she -is an owner of Copyright and Related Rights in the Work, voluntarily -elects to apply CC0 to the Work and publicly distribute the Work under its -terms, with knowledge of his or her Copyright and Related Rights in the -Work and the meaning and intended legal effect of CC0 on those rights. - -1. Copyright and Related Rights. A Work made available under CC0 may be -protected by copyright and related or neighboring rights ("Copyright and -Related Rights"). Copyright and Related Rights include, but are not -limited to, the following: - - i. the right to reproduce, adapt, distribute, perform, display, - communicate, and translate a Work; - ii. moral rights retained by the original author(s) and/or performer(s); -iii. publicity and privacy rights pertaining to a person's image or - likeness depicted in a Work; - iv. rights protecting against unfair competition in regards to a Work, - subject to the limitations in paragraph 4(a), below; - v. rights protecting the extraction, dissemination, use and reuse of data - in a Work; - vi. database rights (such as those arising under Directive 96/9/EC of the - European Parliament and of the Council of 11 March 1996 on the legal - protection of databases, and under any national implementation - thereof, including any amended or successor version of such - directive); and -vii. other similar, equivalent or corresponding rights throughout the - world based on applicable law or treaty, and any national - implementations thereof. - -2. Waiver. To the greatest extent permitted by, but not in contravention -of, applicable law, Affirmer hereby overtly, fully, permanently, -irrevocably and unconditionally waives, abandons, and surrenders all of -Affirmer's Copyright and Related Rights and associated claims and causes -of action, whether now known or unknown (including existing as well as -future claims and causes of action), in the Work (i) in all territories -worldwide, (ii) for the maximum duration provided by applicable law or -treaty (including future time extensions), (iii) in any current or future -medium and for any number of copies, and (iv) for any purpose whatsoever, -including without limitation commercial, advertising or promotional -purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each -member of the public at large and to the detriment of Affirmer's heirs and -successors, fully intending that such Waiver shall not be subject to -revocation, rescission, cancellation, termination, or any other legal or -equitable action to disrupt the quiet enjoyment of the Work by the public -as contemplated by Affirmer's express Statement of Purpose. - -3. Public License Fallback. Should any part of the Waiver for any reason -be judged legally invalid or ineffective under applicable law, then the -Waiver shall be preserved to the maximum extent permitted taking into -account Affirmer's express Statement of Purpose. In addition, to the -extent the Waiver is so judged Affirmer hereby grants to each affected -person a royalty-free, non transferable, non sublicensable, non exclusive, -irrevocable and unconditional license to exercise Affirmer's Copyright and -Related Rights in the Work (i) in all territories worldwide, (ii) for the -maximum duration provided by applicable law or treaty (including future -time extensions), (iii) in any current or future medium and for any number -of copies, and (iv) for any purpose whatsoever, including without -limitation commercial, advertising or promotional purposes (the -"License"). The License shall be deemed effective as of the date CC0 was -applied by Affirmer to the Work. Should any part of the License for any -reason be judged legally invalid or ineffective under applicable law, such -partial invalidity or ineffectiveness shall not invalidate the remainder -of the License, and in such case Affirmer hereby affirms that he or she -will not (i) exercise any of his or her remaining Copyright and Related -Rights in the Work or (ii) assert any associated claims and causes of -action with respect to the Work, in either case contrary to Affirmer's -express Statement of Purpose. - -4. Limitations and Disclaimers. - - a. No trademark or patent rights held by Affirmer are waived, abandoned, - surrendered, licensed or otherwise affected by this document. - b. Affirmer offers the Work as-is and makes no representations or - warranties of any kind concerning the Work, express, implied, - statutory or otherwise, including without limitation warranties of - title, merchantability, fitness for a particular purpose, non - infringement, or the absence of latent or other defects, accuracy, or - the present or absence of errors, whether or not discoverable, all to - the greatest extent permissible under applicable law. - c. Affirmer disclaims responsibility for clearing rights of other persons - that may apply to the Work or any use thereof, including without - limitation any person's Copyright and Related Rights in the Work. - Further, Affirmer disclaims responsibility for obtaining any necessary - consents, permissions or other rights required for any use of the - Work. - d. Affirmer understands and acknowledges that Creative Commons is not a - party to this document and has no duty or obligation with respect to - this CC0 or use of the Work. diff --git a/mods/PLAYER/mcl_sprint/README.md b/mods/PLAYER/mcl_sprint/README.md deleted file mode 100644 index f9f45d442e..0000000000 --- a/mods/PLAYER/mcl_sprint/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# Sprint Mod for MineClone 2 -Forked from [sprint] by GunshipPenguin - -## Description -Allows the player to sprint by pressing the “Use” key (default: E). -By default, sprinting will make the player travel 80% faster and -allow him/her to jump 10% higher. - -Licence: CC0 (see COPYING file) - -## Mod developer settings (`init.lua`) -### `mcl_sprint.SPEED` -How fast the player will move when sprinting as opposed to normal -movement speed. 1.0 represents normal speed so 1.5 would mean that a -sprinting player would travel 50% faster than a walking player and -2.4 would mean that a sprinting player would travel 140% faster than -a walking player. diff --git a/mods/PLAYER/mcl_sprint/init.lua b/mods/PLAYER/mcl_sprint/init.lua deleted file mode 100644 index 4c0d609c96..0000000000 --- a/mods/PLAYER/mcl_sprint/init.lua +++ /dev/null @@ -1,228 +0,0 @@ ---[[ -Sprint mod for Minetest by GunshipPenguin - -To the extent possible under law, the author(s) -have dedicated all copyright and related and neighboring rights -to this software to the public domain worldwide. This software is -distributed without any warranty. -]] - -local math = math -local vector = vector - -local pairs = pairs - -local get_node = minetest.get_node -local get_gametime = minetest.get_gametime -local add_particlespawner = minetest.add_particlespawner -local get_player_by_name = minetest.get_player_by_name - -local registered_nodes = minetest.registered_nodes - -local get_hunger = mcl_hunger.get_hunger -local exhaust = mcl_hunger.exhaust - - ---Configuration variables, these are all explained in README.md -mcl_sprint = {} - -mcl_sprint.SPEED = 1.3 - -local players = {} - --- Returns true if the player with the given name is sprinting, false if not. --- Returns nil if player does not exist. -function mcl_sprint.is_sprinting(playername) - if players[playername] then - return players[playername].sprinting - else - return nil - end -end - -minetest.register_on_joinplayer(function(player) - local playerName = player:get_player_name() - - players[playerName] = { - sprinting = false, - timeOut = 0, - shouldSprint = false, - clientSprint = false, - lastPos = player:get_pos(), - sprintDistance = 0, - fov = 1.0, - channel = minetest.mod_channel_join("mcl_sprint:" .. playerName), - } -end) -minetest.register_on_leaveplayer(function(player) - local playerName = player:get_player_name() - players[playerName] = nil -end) - -local function cancelClientSprinting(name) - players[name].channel:send_all("") - players[name].clientSprint = false -end - -local function setSprinting(playerName, sprinting) --Sets the state of a player (0=stopped/moving, 1=sprinting) - local player = minetest.get_player_by_name(playerName) - local controls = player:get_player_control() - if players[playerName] then - players[playerName].sprinting = sprinting - local fov_old = players[playerName].fov - local fov_new = fov_old - local fade_time = .15 - if sprinting == true - or controls.RMB - and string.find(player:get_wielded_item():get_name(), "mcl_bows:bow") - and player:get_wielded_item():get_name() ~= "mcl_bows:bow" then - if sprinting == true then - fov_new = math.min(players[playerName].fov + 0.05, 1.2) - else - fov_new = .7 - players[playerName].fade_time = .3 - end - if sprinting == true then - playerphysics.add_physics_factor(player, "speed", "mcl_sprint:sprint", mcl_sprint.SPEED) - end - elseif sprinting == false - and player:get_wielded_item():get_name() ~= "mcl_bows:bow_0" - and player:get_wielded_item():get_name() ~= "mcl_bows:bow_1" - and player:get_wielded_item():get_name() ~= "mcl_bows:bow_2" then - fov_new = math.max(players[playerName].fov - 0.05, 1.0) - if sprinting == false then - playerphysics.remove_physics_factor(player, "speed", "mcl_sprint:sprint") - end - end - if fov_new ~= fov_old then - players[playerName].fov = fov_new - player:set_fov(fov_new, true, fade_time) - end - return true - end - return false -end - --- Given the param2 and paramtype2 of a node, returns the tile that is facing upwards -local function get_top_node_tile(param2, paramtype2) - if paramtype2 == "colorwallmounted" then - paramtype2 = "wallmounted" - param2 = param2 % 8 - elseif paramtype2 == "colorfacedir" then - paramtype2 = "facedir" - param2 = param2 % 32 - end - if paramtype2 == "wallmounted" then - if param2 == 0 then - return 2 - elseif param2 == 1 then - return 1 - else - return 5 - end - elseif paramtype2 == "facedir" then - if param2 >= 0 and param2 <= 3 then - return 1 - elseif param2 == 4 or param2 == 10 or param2 == 13 or param2 == 19 then - return 6 - elseif param2 == 5 or param2 == 11 or param2 == 14 or param2 == 16 then - return 3 - elseif param2 == 6 or param2 == 8 or param2 == 15 or param2 == 17 then - return 5 - elseif param2 == 7 or param2 == 9 or param2 == 12 or param2 == 18 then - return 4 - elseif param2 >= 20 and param2 <= 23 then - return 2 - else - return 1 - end - else - return 1 - end -end - -minetest.register_on_modchannel_message(function(channel_name, sender, message) - if channel_name == "mcl_sprint:" .. sender then - players[sender].clientSprint = minetest.is_yes(message) - end -end) - -minetest.register_on_respawnplayer(function(player) - cancelClientSprinting(player:get_player_name()) -end) - -minetest.register_globalstep(function(dtime) - --Get the gametime - local gameTime = get_gametime() - - --Loop through all connected players - for playerName, playerInfo in pairs(players) do - local player = get_player_by_name(playerName) - if player then - local ctrl = player:get_player_control() - --Check if the player should be sprinting - if players[playerName]["clientSprint"] or ctrl.aux1 and ctrl.up and not ctrl.sneak then - players[playerName]["shouldSprint"] = true - else - players[playerName]["shouldSprint"] = false - end - - local playerPos = player:get_pos() - --If the player is sprinting, create particles behind and cause exhaustion - if playerInfo["sprinting"] == true and not player:get_attach() and gameTime % 0.1 == 0 then - -- Exhaust player for sprinting - local lastPos = players[playerName].lastPos - local dist = vector.distance({x=lastPos.x, y=0, z=lastPos.z}, {x=playerPos.x, y=0, z=playerPos.z}) - players[playerName].sprintDistance = players[playerName].sprintDistance + dist - if players[playerName].sprintDistance >= 1 then - local superficial = math.floor(players[playerName].sprintDistance) - exhaust(playerName, mcl_hunger.EXHAUST_SPRINT * superficial) - players[playerName].sprintDistance = players[playerName].sprintDistance - superficial - end - - -- Sprint node particles - local playerNode = get_node({x=playerPos["x"], y=playerPos["y"]-1, z=playerPos["z"]}) - local def = registered_nodes[playerNode.name] - if def and def.walkable then - add_particlespawner({ - amount = math.random(1, 2), - time = 1, - minpos = {x=-0.5, y=0.1, z=-0.5}, - maxpos = {x=0.5, y=0.1, z=0.5}, - minvel = {x=0, y=5, z=0}, - maxvel = {x=0, y=5, z=0}, - minacc = {x=0, y=-13, z=0}, - maxacc = {x=0, y=-13, z=0}, - minexptime = 0.1, - maxexptime = 1, - minsize = 0.5, - maxsize = 1.5, - collisiondetection = true, - attached = player, - vertical = false, - node = playerNode, - node_tile = get_top_node_tile(playerNode.param2, def.paramtype2), - }) - end - end - - --Adjust player states - players[playerName].lastPos = playerPos - if players[playerName]["shouldSprint"] == true then --Stopped - local sprinting - -- Prevent sprinting if hungry or sleeping - if (mcl_hunger.active and get_hunger(player) <= 6) - or (player:get_meta():get_string("mcl_beds:sleeping") == "true") then - sprinting = false - cancelClientSprinting(playerName) - else - sprinting = true - end - setSprinting(playerName, sprinting) - elseif players[playerName]["shouldSprint"] == false then - setSprinting(playerName, false) - end - - end - end -end) diff --git a/mods/PLAYER/mcl_sprint/mod.conf b/mods/PLAYER/mcl_sprint/mod.conf deleted file mode 100644 index 0d20f80a36..0000000000 --- a/mods/PLAYER/mcl_sprint/mod.conf +++ /dev/null @@ -1,4 +0,0 @@ -name = mcl_sprint -author = GunshipPenguin -description = Allows the player to sprint by pressing the “Use” key (default: E). -depends = mcl_playerinfo, playerphysics, mcl_hunger diff --git a/mods/PLAYER/mcl_wieldview/LICENSE.txt b/mods/PLAYER/mcl_wieldview/LICENSE.txt deleted file mode 100644 index e1552c0668..0000000000 --- a/mods/PLAYER/mcl_wieldview/LICENSE.txt +++ /dev/null @@ -1,18 +0,0 @@ -[mod] visible wielded items [wieldview] -======================================= - -Copyright (C) 2012-2019 stujones11, Stuart Jones - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License along -with this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. diff --git a/mods/PLAYER/mcl_wieldview/README.txt b/mods/PLAYER/mcl_wieldview/README.txt deleted file mode 100644 index 183e8c6d5e..0000000000 --- a/mods/PLAYER/mcl_wieldview/README.txt +++ /dev/null @@ -1,21 +0,0 @@ -[mod] visible wielded items [wieldview] -======================================= - -Makes hand wielded items visible to other players. - -default settings: [minetest.conf] - -# Set number of seconds between visible wielded item updates. -wieldview_update_time = 2 - -# Show nodes as tiles, disabled by default -wieldview_node_tiles = false - - -Info for modders -################ - -Wield image transformation: To apply a simple transformation to the item in -hand, add the group “wieldview_transform” to the item definition. The group -rating equals one of the numbers used for the [transform texture modifier -of the Lua API. diff --git a/mods/PLAYER/mcl_wieldview/init.lua b/mods/PLAYER/mcl_wieldview/init.lua deleted file mode 100644 index ff70445e3f..0000000000 --- a/mods/PLAYER/mcl_wieldview/init.lua +++ /dev/null @@ -1,126 +0,0 @@ -local get_connected_players = minetest.get_connected_players -local get_item_group = minetest.get_item_group - -mcl_wieldview = { - players = {} -} - -function mcl_wieldview.get_item_texture(itemname) - if itemname == "" or minetest.get_item_group(itemname, "no_wieldview") ~= 0 then - return - end - - local def = minetest.registered_items[itemname] - if not def then - return - end - - local inv_image = def.inventory_image - if inv_image == "" then - return - end - - local texture = inv_image - - local transform = get_item_group(itemname, "wieldview_transform") - if transform then - -- This actually works with groups ratings because transform1, transform2, etc. - -- have meaning and transform0 is used for identidy, so it can be ignored - texture = texture .. "^[transform" .. transform - end - - return texture -end - -function mcl_wieldview.update_wielded_item(player) - if not player then - return - end - local itemstack = player:get_wielded_item() - local itemname = itemstack:get_name() - - local def = mcl_wieldview.players[player] - - if def.item == itemname then - return - end - - def.item = itemname - def.texture = mcl_wieldview.get_item_texture(itemname) or "blank.png" - - mcl_player.player_set_wielditem(player, def.texture) -end - -minetest.register_on_joinplayer(function(player) - mcl_wieldview.players[player] = {item = "", texture = "blank.png"} - - minetest.after(0, function() - if not player:is_player() then - return - end - - mcl_wieldview.update_wielded_item(player) - - local itementity = minetest.add_entity(player:get_pos(), "mcl_wieldview:wieldnode") - itementity:set_attach(player, "Hand_Right", vector.new(0, 1, 0), vector.new(90, 0, 45)) - itementity:get_luaentity().wielder = player - end) -end) - -minetest.register_on_leaveplayer(function(player) - mcl_wieldview.players[player] = nil -end) - -minetest.register_globalstep(function() - local players = get_connected_players() - for i = 1, #players do - mcl_wieldview.update_wielded_item(players[i]) - end -end) - -minetest.register_entity("mcl_wieldview:wieldnode", { - initial_properties = { - hp_max = 1, - visual = "wielditem", - physical = false, - textures = {""}, - automatic_rotate = 1.5, - is_visible = true, - pointable = false, - collide_with_objects = false, - static_save = false, - collisionbox = {-0.21, -0.21, -0.21, 0.21, 0.21, 0.21}, - selectionbox = {-0.21, -0.21, -0.21, 0.21, 0.21, 0.21}, - visual_size = {x = 0.21, y = 0.21}, - }, - - itemstring = "", - - on_step = function(self) - if self.wielder:is_player() then - local def = mcl_wieldview.players[self.wielder] - local itemstring = def.item - - if self.itemstring ~= itemstring then - local itemdef = minetest.registered_items[itemstring] - self.object:set_properties({glow = itemdef and itemdef.light_source or 0}) - - -- wield item as cubic - if def.texture == "blank.png" then - self.object:set_properties({textures = {itemstring}}) - -- wield item as flat - else - self.object:set_properties({textures = {""}}) - end - - if minetest.get_item_group(itemstring, "no_wieldview") ~= 0 then - self.object:set_properties({textures = {""}}) - end - - self.itemstring = itemstring - end - else - self.object:remove() - end - end, -}) diff --git a/mods/PLAYER/mcl_wieldview/mod.conf b/mods/PLAYER/mcl_wieldview/mod.conf deleted file mode 100644 index 4b30978768..0000000000 --- a/mods/PLAYER/mcl_wieldview/mod.conf +++ /dev/null @@ -1,4 +0,0 @@ -name = mcl_wieldview -author = stujones11 -description = Makes hand wielded items visible to other players. -depends = mcl_player