Add files via upload
parent
d5528f138b
commit
211b114a2e
|
@ -21,7 +21,7 @@ vexcazer_copy.form=function(input,d)
|
|||
"button_exit[2,0;1.5,1;load;Save]" ..
|
||||
"button_exit[4,0;1.5,1;export;Export]"
|
||||
end
|
||||
minetest.after((0.1), function(gui)
|
||||
minetest.after(0.1, function(gui)
|
||||
return minetest.show_formspec(vexcazer_copy.user.user_name, "vexcazer_copy_gui",gui)
|
||||
end, gui)
|
||||
end
|
||||
|
@ -73,7 +73,7 @@ vexcazer_copy.nvpa=function(a,p,def)
|
|||
local meta=minetest.get_meta({x=p.x,y=p.y,z=p.z})
|
||||
if meta and meta:get_string("infotext")~="" then return "air" end
|
||||
if a:find("door",1) or a:find("beds",1) or a=="ignore" then return "air" end
|
||||
if def==true and minetest.registered_nodes[a].drop=="" then return "air" end
|
||||
if def==true and minetest.registered_nodes[a] and minetest.registered_nodes[a].drop=="" then return "air" end
|
||||
return a
|
||||
end
|
||||
|
||||
|
@ -147,6 +147,12 @@ vexcazer_copy.copying=function(to_do,pos,input,stack_count,nodes2place,stack_cou
|
|||
num3=num3+1
|
||||
if num3>nodes2place[num2].num then num3=1 num2=num2+1 end
|
||||
local fn=minetest.registered_nodes[minetest.get_node(pos3).name]
|
||||
|
||||
if not fn then
|
||||
vexcazer.unknown_remove(pos3)
|
||||
return false
|
||||
end
|
||||
|
||||
if (fn.walkable==true and tnode~="air") or (tnode~="air" and fn.walkable==false and (minetest.get_node_group(fn.name, "unbreakable")==nil or minetest.get_node_group(fn.name, "unbreakable")>0)) then
|
||||
minetest.chat_send_player(input.user_name, "<vexcazer> You have to clear the area before you can place here (".. stack_count .."x".. stack_count .. "x" .. stack_count .. ") Found: " .. fn.name)
|
||||
return false
|
||||
|
|
|
@ -30,7 +30,7 @@ local vex_gravity=function(itemstack, user, pointed_thing,input)
|
|||
elseif target:get_luaentity() and target:get_luaentity().block
|
||||
and ob:get_luaentity().user:get_player_name()==player_name then
|
||||
local pos=ob:get_pos()
|
||||
if minetest.registered_nodes[minetest.get_node(pos).name].walkable==false
|
||||
if vexcazer.def(pos,"walkable")==false
|
||||
and minetest.is_protected(pos,player_name)==false then
|
||||
if minetest.registered_nodes[target:get_luaentity().drop] then
|
||||
minetest.set_node(pos,{name=target:get_luaentity().drop})
|
||||
|
@ -78,7 +78,7 @@ end
|
|||
|
||||
|
||||
vexcazer_gravity_power={}
|
||||
vexcazer_gravity_item_time=tonumber(minetest.settings:get("item_entity_ttl"))
|
||||
vexcazer_gravity_item_time=tonumber(minetest.setting_get("item_entity_ttl"))
|
||||
if not vexcazer_gravity_item_time then
|
||||
vexcazer_gravity_item_time=880
|
||||
else
|
||||
|
@ -181,7 +181,7 @@ on_step= function(self, dtime)
|
|||
if self.timer2>self.time2 then self.target:set_detach() end
|
||||
end
|
||||
|
||||
if minetest.registered_nodes[minetest.get_node(npos).name].walkable then
|
||||
if vexcazer.def(npos,"walkable") then
|
||||
self.object:set_velocity({x=0,y=0,z=0})
|
||||
return self
|
||||
end
|
||||
|
@ -443,4 +443,3 @@ vexcazer.registry_mode({
|
|||
on_place=vex_gravity,
|
||||
on_use=vex_gravity,
|
||||
})
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ local massive=function(itemstack, user, pointed_thing,input)
|
|||
local stack_count=user:get_inventory():get_stack("main", input.index-1):get_count()
|
||||
local stack_count_left=user:get_inventory():get_stack("main", input.index+1):get_count()
|
||||
|
||||
if minetest.registered_nodes[minetest.get_node(pointed_thing.under).name].walkable==false and minetest.get_node(pointed_thing.under).name~="air" then
|
||||
if vexcazer.def(pointed_thing.under,"walkable")==false and minetest.get_node(pointed_thing.under).name~="air" then
|
||||
pos=pointed_thing.under
|
||||
end
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
local radio=function(itemstack, user, pointed_thing,input,selective)
|
||||
if pointed_thing.type~="node" then return itemstack end
|
||||
--local pos=pointed_thing.above
|
||||
local pos=pointed_thing.under
|
||||
local dig=input.on_place
|
||||
local plus=1
|
||||
|
@ -10,18 +9,10 @@ local radio=function(itemstack, user, pointed_thing,input,selective)
|
|||
local stack_count=user:get_inventory():get_stack("main", input.index-1):get_count()
|
||||
local stack_count_left=user:get_inventory():get_stack("main", input.index+1):get_count()
|
||||
|
||||
|
||||
|
||||
--if minetest.registered_nodes[minetest.get_node(pointed_thing.under).name].walkable==false and minetest.get_node(pointed_thing.under).name~="air" then
|
||||
-- pos=pointed_thing.under
|
||||
--end
|
||||
|
||||
|
||||
if selective then
|
||||
selective=minetest.get_node(pos).name
|
||||
end
|
||||
|
||||
|
||||
local y=1
|
||||
local dir = minetest.dir_to_facedir(user:get_look_dir())
|
||||
local nolazer=false
|
||||
|
@ -33,10 +24,6 @@ local radio=function(itemstack, user, pointed_thing,input,selective)
|
|||
|
||||
if stack_count>input.max_amount*2 then
|
||||
stack_count=input.max_amount*2
|
||||
|
||||
--minetest.sound_play("vexcazer_error", {pos = user:get_pos(), gain = 1.0, max_hear_distance = 10,})
|
||||
--minetest.chat_send_player(input.user_name, "<vexcazer> Maximum count: " .. input.max_amount)
|
||||
--return false
|
||||
end
|
||||
|
||||
local allblocks=(stack_count*stack_count)*stack_count_left
|
||||
|
|
|
@ -14,14 +14,13 @@ minetest.register_chatcommand("dropme", {
|
|||
if tp.target:is_player() and tp.target:get_player_name()==name then
|
||||
minetest.chat_send_player(tp.user, "<vexcazer> Your teleport target is droped")
|
||||
vexcazer.teleport[tp.user]=nil
|
||||
minetest.chat_send_player(name, "<vexcazer> You is now droped")
|
||||
minetest.chat_send_player(name, "<vexcazer> You are now droped")
|
||||
return true
|
||||
end
|
||||
end
|
||||
minetest.chat_send_player(name, "This command is only used when someone keep teleporting you")
|
||||
end})
|
||||
|
||||
|
||||
minetest.register_on_leaveplayer(function(player)
|
||||
local name=player:get_player_name()
|
||||
if vexcazer.teleport[name]~=nil then vexcazer.teleport[name]=nil end
|
||||
|
@ -39,18 +38,24 @@ local teleport=function(itemstack, user, pointed_thing,input,object)
|
|||
end
|
||||
local tp2node1=minetest.registered_nodes[minetest.get_node({ x=pos.x, y=pos.y+1, z=pos.z}).name]
|
||||
local tp2node2=minetest.registered_nodes[minetest.get_node({ x=pos.x, y=pos.y+2, z=pos.z}).name]
|
||||
|
||||
if not (tp2node1 and tp2node2) then
|
||||
vexcazer.unknown_remove(pos)
|
||||
return
|
||||
end
|
||||
|
||||
if (tp2node1.walkable==false and tp2node2.walkable==false) then
|
||||
if input.default and user:get_pos().y<=pos.y then
|
||||
local walkable=0
|
||||
local tp2node1=minetest.registered_nodes[minetest.get_node({ x=pos.x, y=pos.y, z=pos.z}).name].walkable==false
|
||||
local tp2node2=minetest.registered_nodes[minetest.get_node({ x=pos.x+1, y=pos.y, z=pos.z}).name].walkable==false
|
||||
local tp2node3=minetest.registered_nodes[minetest.get_node({ x=pos.x-1, y=pos.y, z=pos.z}).name].walkable==false
|
||||
local tp2node4=minetest.registered_nodes[minetest.get_node({ x=pos.x+1, y=pos.y, z=pos.z+1}).name].walkable==false
|
||||
local tp2node5=minetest.registered_nodes[minetest.get_node({ x=pos.x-1, y=pos.y, z=pos.z-1}).name].walkable==false
|
||||
local tp2node6=minetest.registered_nodes[minetest.get_node({ x=pos.x, y=pos.y, z=pos.z+1}).name].walkable==false
|
||||
local tp2node7=minetest.registered_nodes[minetest.get_node({ x=pos.x, y=pos.y, z=pos.z-1}).name].walkable==false
|
||||
local tp2node8=minetest.registered_nodes[minetest.get_node({ x=pos.x+1, y=pos.y, z=pos.z-1}).name].walkable==false
|
||||
local tp2node9=minetest.registered_nodes[minetest.get_node({ x=pos.x-1, y=pos.y, z=pos.z+1} ).name].walkable==false
|
||||
local tp2node1=vexcazer.def({ x=pos.x, y=pos.y, z=pos.z},"walkable")==false
|
||||
local tp2node2=vexcazer.def({ x=pos.x+1, y=pos.y, z=pos.z},"walkable")==false
|
||||
local tp2node3=vexcazer.def({ x=pos.x-1, y=pos.y, z=pos.z},"walkable")==false
|
||||
local tp2node4=vexcazer.def({ x=pos.x+1, y=pos.y, z=pos.z+1},"walkable")==false
|
||||
local tp2node5=vexcazer.def({ x=pos.x-1, y=pos.y, z=pos.z-1},"walkable")==false
|
||||
local tp2node6=vexcazer.def({ x=pos.x, y=pos.y, z=pos.z+1},"walkable")==false
|
||||
local tp2node7=vexcazer.def({ x=pos.x, y=pos.y, z=pos.z-1},"walkable")==false
|
||||
local tp2node8=vexcazer.def({ x=pos.x+1, y=pos.y, z=pos.z-1},"walkable")==false
|
||||
local tp2node9=vexcazer.def({ x=pos.x-1, y=pos.y, z=pos.z+1} ,"walkable")==false
|
||||
if tp2node1 then walkable=1 end
|
||||
if tp2node2 then walkable=1 end
|
||||
if tp2node3 then walkable=1 end
|
||||
|
|
Loading…
Reference in New Issue