mirror of
https://github.com/AiTechEye/portalgun.git
synced 2024-08-20 05:34:05 +02:00
Add files via upload
This commit is contained in:
parent
bb0bf70268
commit
4310bfed5b
9
init.lua
9
init.lua
@ -1,4 +1,6 @@
|
|||||||
disable_portal_stuff=false
|
disable_portal_stuff=false
|
||||||
|
proportal_group_only = true
|
||||||
|
|
||||||
|
|
||||||
portalgun={new=0,checkpoints={}}
|
portalgun={new=0,checkpoints={}}
|
||||||
dofile(minetest.get_modpath("portalgun") .. "/gravityuse.lua") -- the gravity part of portalgun
|
dofile(minetest.get_modpath("portalgun") .. "/gravityuse.lua") -- the gravity part of portalgun
|
||||||
@ -576,9 +578,10 @@ function portalgun_onuse(itemstack, user, pointed_thing) -- using the gun
|
|||||||
if minetest.registered_nodes[nname].walkable then
|
if minetest.registered_nodes[nname].walkable then
|
||||||
portalgun_portal[name].lifelime=portalgun_lifelime
|
portalgun_portal[name].lifelime=portalgun_lifelime
|
||||||
|
|
||||||
|
if not proportal_group_only and minetest.get_node_group(nname, "antiportal") > 0 then
|
||||||
|
minetest.sound_play("portalgun_error", {pos=pos,max_hear_distance = 5, gain = 3})
|
||||||
if minetest.get_node_group(nname, "antiportal")>0 then
|
return itemstack
|
||||||
|
elseif proportal_group_only and minetest.get_node_group(nname, "proportal") == 0 then
|
||||||
minetest.sound_play("portalgun_error", {pos=pos,max_hear_distance = 5, gain = 3})
|
minetest.sound_play("portalgun_error", {pos=pos,max_hear_distance = 5, gain = 3})
|
||||||
return itemstack
|
return itemstack
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user