From c9bbb69485c5cdb9f88dece7c953989837660200 Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Thu, 16 Feb 2017 17:39:59 -0500 Subject: Did a refresh of the mods' content, shouldn't be any actual changes --- castle/arrow.lua | 92 -------------------------------------------------------- 1 file changed, 92 deletions(-) delete mode 100644 castle/arrow.lua (limited to 'castle/arrow.lua') diff --git a/castle/arrow.lua b/castle/arrow.lua deleted file mode 100644 index c135f5f..0000000 --- a/castle/arrow.lua +++ /dev/null @@ -1,92 +0,0 @@ -minetest.register_craftitem("castle:arrow", { - description = "Arrow", - inventory_image = "castle_arrow.png", -}) - -minetest.register_node("castle:arrow_box", { - drawtype = "nodebox", - node_box = { - type = "fixed", - fixed = { - -- Shaft - {-6.5/17, -1.5/17, -1.5/17, 6.5/17, 1.5/17, 1.5/17}, - --Spitze - {-4.5/17, 2.5/17, 2.5/17, -3.5/17, -2.5/17, -2.5/17}, - {-8.5/17, 0.5/17, 0.5/17, -6.5/17, -0.5/17, -0.5/17}, - --Federn - {6.5/17, 1.5/17, 1.5/17, 7.5/17, 2.5/17, 2.5/17}, - {7.5/17, -2.5/17, 2.5/17, 6.5/17, -1.5/17, 1.5/17}, - {7.5/17, 2.5/17, -2.5/17, 6.5/17, 1.5/17, -1.5/17}, - {6.5/17, -1.5/17, -1.5/17, 7.5/17, -2.5/17, -2.5/17}, - - {7.5/17, 2.5/17, 2.5/17, 8.5/17, 3.5/17, 3.5/17}, - {8.5/17, -3.5/17, 3.5/17, 7.5/17, -2.5/17, 2.5/17}, - {8.5/17, 3.5/17, -3.5/17, 7.5/17, 2.5/17, -2.5/17}, - {7.5/17, -2.5/17, -2.5/17, 8.5/17, -3.5/17, -3.5/17}, - } - }, - tiles = {"castle_arrow.png", "castle_arrow.png", "castle_arrow_back.png", "castle_arrow_front.png", "castle_arrow_2.png", "castle_arrow.png"}, - groups = {not_in_creative_inventory=1}, -}) - -local castle_ARROW_ENTITY={ - physical = false, - timer=0, - visual = "wielditem", - visual_size = {x=0.1, y=0.1}, - textures = {"castle:arrow_box"}, - lastpos={}, - collisionbox = {0,0,0,0,0,0}, -} - -castle_ARROW_ENTITY.on_step = function(self, dtime) - self.timer=self.timer+dtime - local pos = self.object:getpos() - local node = minetest.get_node(pos) - - if self.timer>0.2 then - local objs = minetest.get_objects_inside_radius({x=pos.x,y=pos.y,z=pos.z}, 2) - for k, obj in pairs(objs) do - if obj:get_luaentity() ~= nil then - if obj:get_luaentity().name ~= "castle:arrow_entity" and obj:get_luaentity().name ~= "__builtin:item" then - local damage = 3 - obj:punch(self.object, 1.0, { - full_punch_interval=1.0, - groupcaps={ - fleshy={times={[1]=1/(damage-2), [2]=1/(damage-1), [3]=1/damage}}, - snappy={times={[1]=1/(damage-2), [2]=1/(damage-1), [3]=1/damage}}, - } - }, nil) - self.object:remove() - end - else - local damage = 3 - obj:punch(self.object, 1.0, { - full_punch_interval=1.0, - groupcaps={ - fleshy={times={[1]=1/(damage-2), [2]=1/(damage-1), [3]=1/damage}}, - snappy={times={[1]=1/(damage-2), [2]=1/(damage-1), [3]=1/damage}}, - } - }, nil) - self.object:remove() - end - end - end - - if self.lastpos.x~=nil then - if node.name ~= "air" then - minetest.add_item(self.lastpos, 'castle:arrow') - self.object:remove() - end - end - self.lastpos={x=pos.x, y=pos.y, z=pos.z} -end - -minetest.register_entity("castle:arrow_entity", castle_ARROW_ENTITY) - -minetest.register_craft({ - output = 'castle:arrow 16', - recipe = { - {'default:stick', 'default:stick', 'default:steel_ingot'}, - } -}) -- cgit v1.2.3