mirror of
https://github.com/AiTechEye/portalgun.git
synced 2024-11-25 17:03:50 +01: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
|
||||
proportal_group_only = true
|
||||
|
||||
|
||||
portalgun={new=0,checkpoints={}}
|
||||
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
|
||||
portalgun_portal[name].lifelime=portalgun_lifelime
|
||||
|
||||
|
||||
|
||||
if minetest.get_node_group(nname, "antiportal")>0 then
|
||||
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})
|
||||
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})
|
||||
return itemstack
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user