added gallows mod alpha version
parent
a636aca006
commit
4567914250
|
@ -0,0 +1,59 @@
|
|||
minetest.register_node("gallows:rope", {
|
||||
description = "Gallows rope",
|
||||
drawtype = "airlike",
|
||||
paramtype = "light",
|
||||
inventory_image = "gallows_rope.png",
|
||||
wield_image = "gallows_rope.png",
|
||||
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.1, -0.1, -0.1, 0.1, 0.5, 0.1}
|
||||
},
|
||||
|
||||
groups = {cracky=3 },
|
||||
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
local rope = minetest.add_entity(pos, "gallows:rope_entity");
|
||||
rope:setyaw( placer:get_look_yaw() + math.pi/2 );
|
||||
end,
|
||||
|
||||
on_destruct = function(pos)
|
||||
local all_objects = minetest.get_objects_inside_radius(pos, 0.9);
|
||||
for _,obj in ipairs(all_objects) do
|
||||
tmp = obj:get_luaentity();
|
||||
if (tmp.name == "gallows:rope_entity") then
|
||||
obj:remove();
|
||||
end
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
minetest.register_entity("gallows:rope_entity",{
|
||||
hp_max = 1,
|
||||
physical = false,
|
||||
visual = "upright_sprite",
|
||||
collisionbox = {0,0,0,0,0,0},
|
||||
visual_size = {x=1, y=1},
|
||||
textures = {"gallows_rope.png"},
|
||||
spritediv = {x=1, y=1},
|
||||
initial_sprite_basepos = {x=0, y=0},
|
||||
is_visible = true,
|
||||
makes_footstep_sound = false,
|
||||
})
|
||||
|
||||
--[[
|
||||
minetest.register_entity("gallows:hangman_entity",{
|
||||
hp_max = 1,
|
||||
physical = false,
|
||||
visual = "mesh",
|
||||
mesh = "character.x",
|
||||
collisionbox = {0,0,0,0,0,0},
|
||||
visual_size = {x=1, y=1},
|
||||
textures = {"character.png"},
|
||||
spritediv = {x=1, y=1},
|
||||
initial_sprite_basepos = {x=0, y=0},
|
||||
is_visible = true,
|
||||
makes_footstep_sound = false,
|
||||
})
|
||||
]]--
|
Binary file not shown.
After Width: | Height: | Size: 169 B |
Binary file not shown.
After Width: | Height: | Size: 327 B |
Loading…
Reference in New Issue