Marge ufo to uforun

master
Rui914 2015-10-10 02:34:22 +09:00
parent 94fc886caa
commit 8983a6f8a3
5 changed files with 13 additions and 9 deletions

View File

@ -1,4 +1,8 @@
uforun = {}
dofile(minetest.get_modpath("uforun").."/player.lua")
dofile(minetest.get_modpath("uforun").."/nodes.lua")
dofile(minetest.get_modpath("uforun").."/mapgen.lua")
local modpath = minetest.get_modpath("uforun")
dofile(modpath.."/player.lua")
dofile(modpath.."/nodes.lua")
dofile(modpath.."/mapgen.lua")
dofile(modpath.."/ufo.lua")

View File

Before

Width:  |  Height:  |  Size: 83 B

After

Width:  |  Height:  |  Size: 83 B

View File

Before

Width:  |  Height:  |  Size: 134 B

After

Width:  |  Height:  |  Size: 134 B

View File

Before

Width:  |  Height:  |  Size: 92 B

After

Width:  |  Height:  |  Size: 92 B

View File

@ -10,9 +10,9 @@ local function get_v(v)
return math.sqrt(v.x^2+v.z^2)
end
minetest.register_entity("ufo:ufo", {
minetest.register_entity("uforun:ufo", {
visual = "wielditem",
textures = {"ufo:ufo"},
textures = {"uforun:ufo"},
visual_size = {x=0.667, y=0.667},
collisionbox = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
physical = true,
@ -39,7 +39,7 @@ minetest.register_entity("ufo:ufo", {
self.removed = true
self.object:remove()
if not minetest.setting_getbool("creative_mode") then
puncher:get_inventory():add_item("main", "ufo:ufo")
puncher:get_inventory():add_item("main", "uforun:ufo")
end
end
end,
@ -131,11 +131,11 @@ minetest.register_entity("ufo:ufo", {
end
})
minetest.register_node("ufo:ufo", {
minetest.register_node("uforun:ufo", {
description = "UFO",
drawtype = "nodebox",
paramtype = "light",
tiles = {"ufo_top.png", "ufo_bottom.png", "ufo_side.png"},
tiles = {"uforun_ufo_top.png", "uforun_ufo_bottom.png", "uforun_ufo_side.png"},
node_box = {
type = "fixed",
fixed = {
@ -147,7 +147,7 @@ minetest.register_node("ufo:ufo", {
if pointed_thing.type ~= "node" then
return
end
minetest.add_entity(pointed_thing.above, "ufo:ufo")
minetest.add_entity(pointed_thing.above, "uforun:ufo")
if not minetest.setting_getbool("creative_mode") then
itemstack:take_item()
end