Compare commits

..

21 Commits

Author SHA1 Message Date
b9048f34b0 deprecation 2022-08-18 17:04:29 +02:00
257c1e0be8 fix deprecation 2022-08-18 17:00:24 +02:00
db20ba0317 fix portalgun being in item list 2022-08-18 16:45:08 +02:00
bb2f30a721 _ 2022-08-14 20:18:23 +02:00
d89538d0a2 im dumb 2022-08-14 16:05:38 +02:00
910d9e0979 _ 2022-08-14 16:00:16 +02:00
e6726191a4 _ 2022-08-14 14:36:22 +02:00
f5718d37eb _ 2022-08-13 11:37:08 +02:00
2485a5f04e _ 2022-08-13 10:54:24 +02:00
0cfd94d7d0 _ 2022-08-13 10:01:20 +02:00
ff70d2e461 _ 2022-08-13 09:57:23 +02:00
c0ccf3afca _ 2022-08-13 09:14:23 +02:00
e96fddfc2d edit alpha 2022-08-13 09:04:04 +02:00
f37dfa90df _ 2022-08-13 08:33:59 +02:00
ddf946f58a do some stuff 2022-07-15 20:47:50 +02:00
1e6271579d _ 2022-07-12 12:39:06 +02:00
3ebdae5ea1 split it into separate files 2022-07-12 10:20:50 +02:00
f580dcd720 _ 2022-07-11 13:06:47 +02:00
bad55d19a0 test 2022-07-11 10:30:14 +02:00
dec116cc5e test 2022-07-11 10:30:06 +02:00
15640770f3 my first changes 2022-07-11 08:32:12 +02:00
75 changed files with 5592 additions and 4421 deletions

View File

@@ -1,4 +1,8 @@
# portalgun # portalgun
original repo:https://github.com/AiTechEye/portalgun
Licenses: code: LGPL-2.1, media: CC BY-SA-4.0
For changes check git or compare to original repo
Remixed by: BRNSystems
https://forum.minetest.net/viewtopic.php?f=11&t=12772 https://forum.minetest.net/viewtopic.php?f=11&t=12772

285
craft.lua
View File

@@ -1,285 +0,0 @@
minetest.register_craft({
output = "portalgun:gun1_placed",
recipe = {{"portalgun:gun1"}}})
minetest.register_craft({
output = "portalgun:gun2_placed",
recipe = {{"portalgun:gun2"}}})
minetest.register_craft({
output = "portalgun:gun_placed",
recipe = {{"portalgun:gun"}}})
minetest.register_craft({
output = "portalgun:turretgun",
recipe = {
{"", "portalgun:secam_off", ""},
{"", "default:mese_crystal",""},
{"default:steel_ingot", "dye:white", "default:steel_ingot"},
}
})
minetest.register_craft({
output = "portalgun:cplps1",
recipe = {{"default:mese_crystal_fragment","dye:grey","dye:grey"},
{"portalgun:apb","dye:grey","dye:grey"},
{"default:mese_crystal_fragment","dye:grey","dye:grey"},
}
})
minetest.register_craft({
output = "portalgun:sign_numa1 3",
recipe = {{"dye:black","dye:black","dye:white"},
{"portalgun:testblock","dye:black","dye:white"},
{"dye:white","dye:black","dye:white"},
}
})
minetest.register_craft({
output = "portalgun:sign_x 2",
recipe = {{"dye:blue","portalgun:testblock","dye:blue"},
{"default:glass","dye:blue","default:glass"},
{"dye:blue","default:mese_crystal_fragment","dye:blue"},
}
})
minetest.register_craft({
output = "portalgun:warntape 3",
recipe = {{"dye:black","dye:yellow","dye:black"},
{"default:stick","default:stick","default:stick"},
}
})
minetest.register_craft({
output = "portalgun:door_1",
recipe = {{"","portalgun:testblock","portalgun:testblock"},
{"","portalgun:testblock","portalgun:testblock"},
{"default:mese_crystal_fragment","portalgun:testblock","portalgun:testblock"},
}
})
minetest.register_craft({
output = "portalgun:toxwater_1 9",
recipe = {{"default:dirt","default:dirt","default:dirt"},
{"default:dirt","bucket:bucket_lava","default:dirt"},
{"default:dirt","default:dirt","default:dirt"},
}
})
minetest.register_craft({
output = "portalgun:portaltarget_1",
recipe = {{"","portalgun:testblock",""},
{"default:mese_crystal_fragment","dye:blue","default:mese_crystal_fragment"},
}
})
minetest.register_craft({
output = "portalgun:portaltarget_2",
recipe = {{"","portalgun:testblock",""},
{"default:mese_crystal_fragment","dye:orange","default:mese_crystal_fragment"},
}
})
minetest.register_craft({
output = "portalgun:sign2",
recipe = {{"","portalgun:testblock",""},
{"dye:white","dye:black","dye:orange"},
}
})
minetest.register_craft({
output = "portalgun:sign1",
recipe = {{"","portalgun:testblock",""},
{"dye:white","dye:black","dye:blue"},
}
})
minetest.register_craft({
output = "portalgun:planthole",
recipe = {
{"portalgun:testblock", "portalgun:testblock", "portalgun:testblock"},
{"portalgun:testblock", "portalgun:plantform1_1", "portalgun:testblock"},
{"portalgun:testblock", "portalgun:testblock", "portalgun:testblock"}
}
})
minetest.register_craft({
output = "portalgun:delayer",
recipe = {
{"dye:yellow", "default:mese_crystal", "dye:yellow"},
{"default:stone", "portalgun:testblock", "default:stone"},
{"dye:yellow", "default:steel_ingot", "dye:yellow"},
}
})
minetest.register_craft({
output = "portalgun:testblocks 2",
recipe = {
{"portalgun:testblock", "default:mese_crystal"},
}
})
minetest.register_craft({
output = "portalgun:hard_glass",
recipe = {
{"default:glass", "default:glass"},
{"default:glass", "default:glass"},
}
})
minetest.register_craft({
output = "portalgun:apg",
recipe = {
{"default:glass", "dye:white"},
}
})
minetest.register_craft({
output = "portalgun:powerballspawner2",
recipe = {
{"portalgun:powerballspawner", "default:mese_crystal"},
}
})
minetest.register_craft({
output = "portalgun:objdestroyer_1",
recipe = {
{"default:obsidian_glass", "default:obsidian_glass", "portalgun:dmgblock_1"},
{"default:obsidian_glass", "default:obsidian_glass", ""},
}
})
minetest.register_craft({
output = "portalgun:dmgblock_1",
recipe = {
{"default:obsidian_glass", "default:obsidian_glass", "default:mese_crystal"},
{"default:obsidian_glass", "default:obsidian_glass", ""},
}
})
minetest.register_craft({
output = "portalgun:button",
recipe = {
{"", "dye:red", ""},
{"", "portalgun:testblock", ""},
{"", "portalgun:testblock", ""},
}
})
minetest.register_craft({
output = "portalgun:cake",
recipe = {
{"dye:red", "portalgun:testblock", "dye:red"},
{"default:dirt", "default:torch", "default:dirt"},
{"dye:red", "default:dirt", "dye:red"},
}
})
minetest.register_craft({
output = "portalgun:powerdoor1_1",
recipe = {
{"default:obsidian_glass", "default:mese_crystal", "default:obsidian_glass"},
{"default:obsidian_glass", "default:obsidian", "default:obsidian_glass"},
{"default:obsidian_glass", "default:mese_crystal", "default:obsidian_glass"},
}
})
minetest.register_craft({
output = "portalgun:autocheckpoint",
recipe = {
{"default:mese_crystal", "default:mese_crystal","default:mese_crystal"},
}
})
minetest.register_craft({
output = "portalgun:testblock 3",
recipe = {
{"default:steel_ingot", "default:steel_ingot"},
{"default:steel_ingot", "dye:white"},
}
})
minetest.register_craft({
output = "portalgun:apb",
recipe = {
{"default:stonebrick", "dye:white"},
}
})
minetest.register_craft({
output = "portalgun:secam_off",
recipe = {
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
{"dye:black", "default:glass", "dye:black"},
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
}
})
minetest.register_craft({
output = "portalgun:powerballspawner",
recipe = {
{"default:steel_ingot", "", "default:steel_ingot"},
{"dye:yellow", "default:mese_crystal", "dye:yellow"},
{"default:steel_ingot", "", "default:steel_ingot"},
}
})
minetest.register_craft({
output = "portalgun:powerballtarget",
recipe = {
{"portalgun:powerballspawner"},
}
})
minetest.register_craft({output = "portalgun:wscspawner2",
recipe = {{"portalgun:wscspawner1"}}})
minetest.register_craft({output = "portalgun:wscspawner3",
recipe = {{"portalgun:wscspawner2"}}})
minetest.register_craft({output = "portalgun:wscspawner4",
recipe = {{"portalgun:wscspawner3"}}})
minetest.register_craft({output = "portalgun:wscspawner1",
recipe = {{"portalgun:wscspawner4"}}})
minetest.register_craft({
output = "portalgun:wscspawner1",
recipe = {
{"", "default:steel_ingot", ""},
{"default:steel_ingot", "default:mese_crystal", "default:steel_ingot"},
{"", "default:steel_ingot", ""},}})
minetest.register_craft({output = "portalgun:wscspawner2_2",
recipe = {{"portalgun:wscspawner2_1"}}})
minetest.register_craft({output = "portalgun:wscspawner2_3",
recipe = {{"portalgun:wscspawner2_2"}}})
minetest.register_craft({output = "portalgun:wscspawner2_4",
recipe = {{"portalgun:wscspawner2_3"}}})
minetest.register_craft({output = "portalgun:wscspawner2_1",
recipe = {{"portalgun:wscspawner2_4"}}})
minetest.register_craft({
output = "portalgun:wscspawner2_1",
recipe = {
{"", "default:steel_ingot", "default:steel_ingot"},
{"default:steel_ingot", "default:mese_crystal", "default:steel_ingot"},
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},}})
minetest.register_craft({
output = "portalgun:plantform1_1",
recipe = {
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
{"default:steel_ingot", "default:mese_crystal", "default:steel_ingot"},
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},}})
minetest.register_craft({output = "portalgun:plantform1_2",
recipe = {{"portalgun:plantform1_1"}}})
minetest.register_craft({output = "portalgun:plantform1_3",
recipe = {{"portalgun:plantform1_2"}}})
minetest.register_craft({output = "portalgun:plantform1_4",
recipe = {{"portalgun:plantform1_3"}}})
minetest.register_craft({output = "portalgun:plantform_nu1",
recipe = {{"portalgun:plantform1_4"}}})
minetest.register_craft({output = "portalgun:plantform1_1",
recipe = {{"portalgun:plantform_nu1"}}})
minetest.register_craft({
output = "portalgun:gun",
recipe = {
{"", "default:diamond", ""},
{"default:diamond", "default:mese", "default:mese"},
{"", "default:steel_ingot", "default:steel_ingot"},
},
})

Binary file not shown.

Before

Width:  |  Height:  |  Size: 273 KiB

View File

@@ -1,160 +0,0 @@
portalgun_power={}
portalgun_power_tmp_power=0
function portalgun_gravity(itemstack, user, pointed_thing)
local ob=pointed_thing.ref
local at = ob:get_attach()
if at and at:get_luaentity() and at:get_luaentity().portalgun_power then
ob:set_detach()
local target = at:get_luaentity().target
if target and target:get_luaentity() and (target:get_luaentity().itemstring or target:get_luaentity().wsc) then
target:set_velocity({x=0, y=-1, z=0})
target:set_acceleration({x=0, y=-8, z=0})
end
return itemstack
end
if not ob:get_attach() and (ob:is_player() or (ob:get_luaentity() and ob:get_luaentity().powerball~=1)) then
portalgun_power.user=user
portalgun_power.target=ob
if ob:is_player() then portalgun_power.player=1 end
local m=minetest.add_entity(ob:get_pos(), "portalgun:power")
ob:set_attach(m, "", {x=0,y=0,z=0}, {x=0,y=0,z=0})
return itemstack
end
return itemstack
end
minetest.register_entity("portalgun:power",{
hp_max = 100,
physical = false,
weight = 0,
collisionbox = {-0.2,-0.2,-0.2, 0.2,0.2,0.2},
visual = "sprite",
visual_size = {x=1, y=1},
textures = {"portalgun_gravity.png"},
spritediv = {x=1, y=1},
is_visible = true,
makes_footstep_sound = false,
automatic_rotate = false,
timer=0,
time=0.1,
portalgun_power=1,
portalgun=1,
lifelime=100,
on_activate=function(self, staticdata)
if portalgun_power.user then
self.user=portalgun_power.user
self.target=portalgun_power.target
self.player=portalgun_power.player
portalgun_power={}
else
self.object:remove()
end
end,
on_punch=function(self, puncher, time_from_last_punch, tool_capabilities, dir)
if self.target and self.target:get_attach() then
self.target:set_detach()
self.target:set_hp(0)
self.target:punch(self.object, {full_punch_interval=1.0,damage_groups={fleshy=4}}, "default:bronze_pick", nil)
end
end,
on_step= function(self, dtime)
self.timer=self.timer+dtime
if self.timer<self.time then return self end
self.timer=0
if self.target==nil or (not self.target:get_attach()) then
self.object:set_hp(0)
self.object:punch(self.object, {full_punch_interval=1.0,damage_groups={fleshy=4}}, "default:bronze_pick", nil)
if self.sound then minetest.sound_stop(self.sound) end
end
if self.player then
self.lifelime=self.lifelime-1
if self.lifelime<0 then
self.target:set_detach()
return self
end
end
local pos = self.user:get_pos()
if pos==nil then return self end
pos.y=pos.y+1.6
local dir = self.user:get_look_dir()
local npos={x=pos.x+(dir.x*2), y=pos.y+(dir.y*2), z=pos.z+(dir.z*2)}
if minetest.registered_nodes[minetest.get_node(npos).name].walkable then
return self
end
self.object:move_to(npos)
return self
end,
})
minetest.register_entity("portalgun:power2",{
hp_max = 100,
physical = true,
weight = 10,
collisionbox = {-0.35,0,-0.35, 0.35,1,0.35},
visual = "sprite",
visual_size = {x=1, y=1},
textures = {"portalgun_gravity.png"},
spritediv = {x=1, y=1},
is_visible = true,
makes_footstep_sound = false,
automatic_rotate = false,
timer=0,
time=0.025,
portalgun_power=1,
portalgun=1,
lifelime=1000,
v=0.3,
ltime=0,
on_activate=function(self, staticdata)
if portalgun_power.user then
self.user=portalgun_power.user
self.target=portalgun_power.target
self.ltime=portalgun_power_tmp_power
portalgun_power={}
else
self.object:remove()
end
end,
on_step= function(self, dtime)
local pos=self.object:get_pos()
local v=self.object:get_velocity()
local v2={x=v.x-self.v,y=(v.y-self.v)*0.99,z=v.z-self.v}
if v2.x<0.5 and v2.x>-0.5 then v2.x=0 end
if v2.y<0.5 and v2.y>-0.5 then v2.y=0 end
if v2.z<0.5 and v2.z>-0.5 then v2.z=0 end
self.object:set_velocity(v2)
self.ltime=self.ltime-self.v
if self.ltime<self.v or (v2.x+v2.y+v2.z==0) then
self.lifelime=-1
end
local nexpos={x=pos.x+(v.x*0.05),y=pos.y+(v.y*0.05)+1,z=pos.z+(v.z*0.05)}
if minetest.registered_nodes[minetest.get_node(nexpos).name].walkable then
self.lifelime=-1
end
self.lifelime=self.lifelime-1
if self.lifelime<0 then
self.target:set_detach()
end
if self.target==nil or (not self.target:get_attach()) then
self.object:set_hp(0)
self.object:punch(self.object, {full_punch_interval=1.0,damage_groups={fleshy=4}}, "default:bronze_pick", nil)
return self
end
return self
end,
})

751
init.lua
View File

@@ -1,713 +1,38 @@
disable_portal_stuff=false --do scripts in folder scripts
proportal_group_only = false
--portalgun
dofile(minetest.get_modpath("portalgun") .. "/scripts/portalgun.lua")
portalgun={new=0,checkpoints={}} dofile(minetest.get_modpath("portalgun") .. "/scripts/gravityuse.lua")
dofile(minetest.get_modpath("portalgun") .. "/gravityuse.lua") -- the gravity part of portalgun
dofile(minetest.get_modpath("portalgun") .. "/craft.lua") --powerball
dofile(minetest.get_modpath("portalgun") .. "/stuff.lua") -- security cam dofile(minetest.get_modpath("portalgun") .. "/scripts/powerball.lua")
if disable_portal_stuff==false and minetest.get_modpath("mesecons")~=nil then dofile(minetest.get_modpath("portalgun") .. "/scripts/powerballspawner.lua")
dofile(minetest.get_modpath("portalgun") .. "/weightedstoragecube.lua") -- weighted storage cube dofile(minetest.get_modpath("portalgun") .. "/scripts/powerballtarget.lua")
dofile(minetest.get_modpath("portalgun") .. "/powerball.lua") -- the poweball
dofile(minetest.get_modpath("portalgun") .. "/other.lua")
end --cubes
dofile(minetest.get_modpath("portalgun") .. "/scripts/weightedstoragecube.lua")
portalgun_portal={} dofile(minetest.get_modpath("portalgun") .. "/scripts/cubespawners.lua")
portalgun_portal_tmp_user_abort=0 dofile(minetest.get_modpath("portalgun") .. "/scripts/pressureplatforms.lua")
portalgun_portal_tmp_user="" dofile(minetest.get_modpath("portalgun") .. "/scripts/fizzlers.lua")
local portalgun_timer=1.2 dofile(minetest.get_modpath("portalgun") .. "/scripts/checkpoint.lua")
local portalgun_time=0
portalgun_lifelime=1200 --deletes portals that not used after a while --misc
portalgun_max_rage=100 dofile(minetest.get_modpath("portalgun") .. "/scripts/buildingblocks.lua")
portalgun_max_use_per_secund_time=4 --destroys the portal if excessive used dofile(minetest.get_modpath("portalgun") .. "/scripts/warntape.lua")
portalgun_max_use_per_secund=25 --4 & 25 is default = teleported (teleported 25 times in 4 sec) dofile(minetest.get_modpath("portalgun") .. "/scripts/cake.lua")
dofile(minetest.get_modpath("portalgun") .. "/scripts/editingtools.lua")
function portalgun_param2(pos,param2,r) dofile(minetest.get_modpath("portalgun") .. "/scripts/portaltarget.lua")
local pos2={x=pos.x,y=pos.y,z=pos.z} dofile(minetest.get_modpath("portalgun") .. "/scripts/signs.lua")
if r then
if param2==0 then --hazardous
pos2.x=pos2.x-1 dofile(minetest.get_modpath("portalgun") .. "/scripts/toxicwater.lua")
elseif param2==1 then pos2.z=pos2.z+1 dofile(minetest.get_modpath("portalgun") .. "/scripts/turrets.lua")
elseif param2==2 then pos2.x=pos2.x+1 dofile(minetest.get_modpath("portalgun") .. "/scripts/camera.lua")
elseif param2==3 then pos2.z=pos2.z-1 dofile(minetest.get_modpath("portalgun") .. "/scripts/damageblock.lua")
end dofile(minetest.get_modpath("portalgun") .. "/scripts/objectdestroyer.lua")
else
if param2==0 then --logic
pos2.x=pos2.x+1 dofile(minetest.get_modpath("portalgun") .. "/scripts/delayer.lua")
elseif param2==1 then pos2.z=pos2.z-1 dofile(minetest.get_modpath("portalgun") .. "/scripts/button.lua")
elseif param2==2 then pos2.x=pos2.x-1 dofile(minetest.get_modpath("portalgun") .. "/scripts/doors.lua")
elseif param2==3 then pos2.z=pos2.z+1
end
end
return pos2
end
local function portalgun_getLength(a)-- get length of an array / table
local count = 0
for _ in pairs(a) do count = count + 1 end
return count
end
function portal_delete(name,n) -- using set_hp & :punch instand of :remove ... no risk for crash if something attach it
if portalgun_portal[name]==nil then return end
if (n==1 or n==0) and portalgun_portal[name].portal1~=nil then
if n==0 then
local pos=portalgun_portal[name].portal1:get_pos()
if pos~=nil then minetest.sound_play("portalgun_closeportals", {pos=pos,max_hear_distance = 20, gain = 1}) end
end
portalgun_portal[name].portal1_active=false
portalgun_portal[name].portal1:set_hp(0)
portalgun_portal[name].portal1:punch(portalgun_portal[name].portal1, {full_punch_interval=1.0,damage_groups={fleshy=9000}}, "default:bronze_pick", nil)
end
if (n==2 or n==0) and portalgun_portal[name].portal2~=nil then
if n==0 then
local pos=portalgun_portal[name].portal2:get_pos()
if pos~=nil then minetest.sound_play("portalgun_closeportals", {pos=pos,max_hear_distance = 20, gain = 1}) end
end
portalgun_portal[name].portal2_active=false
portalgun_portal[name].portal2:set_hp(0)
portalgun_portal[name].portal2:punch(portalgun_portal[name].portal2, {full_punch_interval=1.0,damage_groups={fleshy=9000}}, "default:bronze_pick", nil)
end
if n==0 then portalgun_portal[name]=nil end
end
minetest.register_on_leaveplayer(function(player)-- deletes user the profile (saveing memory)
local name=player:get_player_name()
portal_delete(name,0)
portalgun_portal[name]=nil
end)
minetest.register_on_dieplayer(function(player)
local name=player:get_player_name()
portal_delete(name,0)
portalgun_portal[name]=nil
end)
portalgun_on_step=function(self, dtime)
local name=self.user
if portalgun_portal[self.user]==nil then
self.object:remove()
return self
end
if (self.project==1 and self.use~=portalgun_portal[self.user].portal1_use)
or (self.project==2 and self.use~=portalgun_portal[self.user].portal2_use) then
self.object:remove()
return self
end
if portalgun_portal[name].lifelime<0 then
portal_delete(name,0)
return self
end
if portalgun_portal[name].portal1_active and portalgun_portal[name].portal2_active then -- makes lifetime equal when both is acive, or it will be half
portalgun_portal[name].lifelime=portalgun_portal[name].lifelime-0.5
else
portalgun_portal[name].lifelime=portalgun_portal[name].lifelime-1
return self -- abort when only 1 is active (saves cpu)
end
if portalgun_portal[name].timer>0 then -- makes teleported stuff wont move back at same time (bug fix)
portalgun_portal[name].timer=portalgun_portal[name].timer-dtime
return self
end
if self.portal_max_use>0 then -- makes teleported stuff wont move back at same time (bug fix)
self.portal_max_use_time=self.portal_max_use_time+dtime
if self.portal_max_use>=portalgun_max_use_per_secund then
portal_delete(name,self.project)
return self
elseif self.portal_max_use_time>=portalgun_max_use_per_secund_time then
self.portal_max_use_time=0
self.portal_max_use=0
end
end
local pos1=0
local pos2=0
local d1=0
local d2=0
if self.project==1 then
pos1=portalgun_portal[name].portal1_pos
pos2=portalgun_portal[name].portal2_pos
d1=portalgun_portal[name].portal1_dir
d2=portalgun_portal[name].portal2_dir
else
pos1=portalgun_portal[name].portal2_pos
pos2=portalgun_portal[name].portal1_pos
d1=portalgun_portal[name].portal2_dir
d2=portalgun_portal[name].portal1_dir
end
-- portalgun_front_of_field should fix teleport through walls, but is not working in all directions
-- waiting with this issue
if pos2~=0 and pos1~=0 then
for ii, ob in pairs(minetest.get_objects_inside_radius(pos1, self.area)) do
if pos2~=0 then --and portalgun_front_of_field(self.object,ob)
if (ob:is_player() ) or (ob:get_luaentity() and ob:get_luaentity().portalgun~=1 and ob:get_luaentity().name:find(":text",4)==nil) then
if ob:get_attach() then
ob:set_detach()
ob:set_acceleration({x=0, y=-10, z=0})
end
--set velocity then teleport
local p=pos2
local x=0
local y=0
local z=0
local dis=2
if p==nil or p.x==nil then
return self
end
if ob:is_player() then
local v=ob:get_player_velocity()
local player_name=ob:get_player_name()
portalgun_power.user=player_name
portalgun_power.target=ob
local vv={x=v.x,y=v.y,z=v.z}
-- get the highest velocity
dis=2
if vv.x+vv.y+vv.z<=0.3 then
if self.small==true then
vv.x=1.4
else
vv.x=2
end
end
if vv.x+vv.y+vv.z==0 then vv.x=2 end
if vv.x<0 then vv.x=vv.x*-1 end
if vv.y<0 then vv.y=vv.y*-1 end
if vv.z<0 then vv.z=vv.z*-1 end
if vv.x>vv.z then vv.a=vv.x else vv.a=vv.z end
if vv.a<vv.y then vv.a=vv.y end
portalgun_power_tmp_power=vv.a
local m=minetest.add_entity(ob:get_pos(), "portalgun:power2")
ob:set_attach(m, "", {x=0,y=0,z=0}, {x=0,y=0,z=0})
m:set_velocity(v)
m:set_acceleration({x=0,y=-10,z=0})
ob=m
end
if ob:is_player()==false then
local v=ob:get_velocity()
if v.x<0 then v.x=v.x*-1 end
if v.y<0 then v.y=v.y*-1 end
if v.z<0 then v.z=v.z*-1 end
local vv=0 -- get the highest velocity
if v.x>v.z then vv=v.x else vv=v.z end
if vv<v.y then vv=v.y end
v.x=0
v.y=0
v.z=0
if d2=="x+" then v.x=vv end
if d2=="x-" then v.x=vv*-1 end
if d2=="y+" then v.y=vv end
if d2=="y-" then v.y=vv*-1 end
if d2=="z+" then v.z=vv end
if d2=="z-" then v.z=vv*-1 end
ob:set_velocity({x=v.x, y=v.y, z=v.z})
end
if d2=="x+" then x=2
elseif d2=="x-" then x=-dis
elseif d2=="y+" then y=dis
elseif d2=="y-" then y=-dis
elseif d2=="z+" then z=dis
elseif d2=="z-" then z=-dis
end
local obpos={x=p.x+x,y=p.y+y,z=p.z+z}
portalgun_portal[name].timer=0.2
self.portal_max_use=self.portal_max_use+1
ob:set_pos(obpos,false)
portalgun_portal[name].lifelime=portalgun_lifelime
minetest.sound_play("portalgun_teleport", {pos=portalgun_portal[name].portal1_pos,max_hear_distance = 10, gain = 30})
minetest.sound_play("portalgun_teleport", {pos=portalgun_portal[name].portal2_pos,max_hear_distance = 10, gain = 30})
end --end of set velocity part then teleport
end
end
end
end
minetest.register_entity("portalgun:portal",{ -- the portals
hp_max=10000,
visual = "mesh",
mesh = "portalgun_portal_xp.obj",
physical = false,
textures ={"portalgun_blue.png"},
visual_size = {x=1, y=1},
spritediv = {x=7, y=0},
collisionbox = {0,0,0,0,0,0},
timer=0,
user="",
project=1,
portalgun=1,
portal_max_use=0,
portal_max_use_time=0,
area=2,
small=false,
get_staticdata = function(self)
return minetest.serialize({
user= self.user,
project=self.project,
use=self.use
})
end,
on_activate= function(self, staticdata)
local data=minetest.deserialize(staticdata)
if data and type(data) == "table" then
self.user = data.user
self.project = data.project
self.use=data.use
if portalgun_portal[self.user]==nil then
self.object:remove()
return self
end
if (self.project==1 and self.use~=portalgun_portal[self.user].portal1_use)
or (self.project==2 and self.use~=portalgun_portal[self.user].portal2_use) then
self.object:remove()
return self
end
elseif portalgun_portal_tmp_user~="" then
self.user=portalgun_portal_tmp_user
portalgun_portal_tmp_user=""
self.project=portalgun_portal[self.user].project
if self.project==1 then-- if inactivated then activated and another portal is created: remove
self.use=portalgun_portal[self.user].portal1_use
else
self.use=portalgun_portal[self.user].portal2_use
end
else
self.object:remove()
return self
end
if portalgun_portal[self.user]==nil then
self.object:remove()
return self
end
local d=""
if self.project==1 then
d=portalgun_portal[self.user].portal1_dir
self.object:set_properties({textures = {"portalgun_blue.png"}})
else
d=portalgun_portal[self.user].portal2_dir
self.object:set_properties({textures = {"portalgun_orange.png"}})
end
if d=="x+" then self.object:set_yaw(math.pi * 0)
elseif d=="x-" then self.object:set_yaw(math.pi * 1)
elseif d=="y+" then self.object:set_properties({mesh = "portalgun_portal_yp.obj",}) -- becaouse there is no "setpitch"
elseif d=="y-" then self.object:set_properties({mesh = "portalgun_portal_ym.obj",}) -- becaouse there is no "setpitch"
elseif d=="z+" then self.object:set_yaw(math.pi * 0.5)
elseif d=="z-" then self.object:set_yaw(math.pi * 1.5)
end
if d=="y+" then
local pos1={}
if self.project==1 then
pos1=portalgun_portal[self.user].portal1_pos
else
pos1=portalgun_portal[self.user].portal2_pos
end
if portalgun_portal[self.user].y>8 then
pos1.y=pos1.y+1
end
if portalgun_portal[self.user].y>12 then
pos1.y=pos1.y+1
end
if self.project==1 then
portalgun_portal[self.user].portal1_pos=pos1
else
portalgun_portal[self.user].portal2_pos=pos1
end
elseif string.find(d,"y",1)==nil and (portalgun_portal[self.user].x+portalgun_portal[self.user].z<2.5) then
self.area=1.2
self.small=true
self.object:set_properties({visual_size = {x=0.7, y=0.7},})
end
end,
on_step=portalgun_on_step,
})
minetest.register_node("portalgun:gun1", {
description = "Portalgun (blue)",
range = 5,
tiles={"portalgun_gun1.png"},
selection_box = {
type = "fixed",
fixed = {
{-0.3, -0.5, -0.3, 0.3, -0.1,0.3},
}
},
drawtype="mesh",
mesh="portalgun_gun_wearing.obj",
groups = {not_in_creative_inventory=1},
sunlight_propagates = true,
paramtype="light",
paramtype2="facedir",
on_place=function(itemstack, user, pointed_thing)
portalgun_mode(itemstack, user, pointed_thing)
return itemstack
end,
on_use = function(itemstack, user, pointed_thing)
portalgun_onuse(itemstack, user, pointed_thing)
return itemstack
end
})
minetest.register_node("portalgun:gun2", {
description = "Portalgun (orange)",
range = 5,
tiles={"portalgun_gun2.png"},
selection_box = {
type = "fixed",
fixed = {
{-0.3, -0.5, -0.3, 0.3, -0.1,0.3},
}
},
drawtype="mesh",
mesh="portalgun_gun_wearing.obj",
groups = {not_in_creative_inventory=1},
sunlight_propagates = true,
paramtype="light",
paramtype2="facedir",
on_place=function(itemstack, user, pointed_thing)
portalgun_mode(itemstack, user, pointed_thing)
return itemstack
end,
on_use = function(itemstack, user, pointed_thing)
portalgun_onuse(itemstack, user, pointed_thing)
return itemstack
end
})
minetest.register_node("portalgun:gun", {
description = "Portalgun",
range = 5,
tiles={"portalgun_gun0.png"},
selection_box = {
type = "fixed",
fixed = {
{-0.3, -0.5, -0.3, 0.3, -0.1,0.3},
}
},
drawtype="mesh",
mesh="portalgun_gun_wearing.obj",
sunlight_propagates = true,
paramtype="light",
paramtype2="facedir",
on_place=function(itemstack, user, pointed_thing)
portalgun_mode(itemstack, user, pointed_thing)
return itemstack
end,
on_use = function(itemstack, user, pointed_thing)
portalgun_onuse(itemstack, user, pointed_thing)
return itemstack
end
})
minetest.register_node("portalgun:gun1_placed", {
description = "Portalgun (blue)",
range = 5,
tiles={"portalgun_gun1.png"},
selection_box = {
type = "fixed",
fixed = {
{-0.3, -0.5, -0.3, 0.3, -0.1,0.3},
}
},
drawtype="mesh",
mesh="portalgun_gun.obj",
sunlight_propagates = true,
paramtype="light",
paramtype2="facedir",
visual_scale=0.4,
groups = {not_in_creative_inventory=1,dig_immediate = 3},
on_use = function(itemstack, user, pointed_thing)
portalgun_onuse(itemstack, user, pointed_thing)
return itemstack
end
})
minetest.register_node("portalgun:gun2_placed", {
description = "Portalgun (orange)",
range = 5,
tiles={"portalgun_gun2.png"},
selection_box = {
type = "fixed",
fixed = {
{-0.3, -0.5, -0.3, 0.3, -0.1,0.3},
}
},
drawtype="mesh",
mesh="portalgun_gun.obj",
sunlight_propagates = true,
paramtype="light",
paramtype2="facedir",
visual_scale=0.4,
groups = {not_in_creative_inventory=1,dig_immediate = 3},
on_use = function(itemstack, user, pointed_thing)
portalgun_onuse(itemstack, user, pointed_thing)
return itemstack
end
})
minetest.register_node("portalgun:gun_placed", {
description = "Portalgun",
range = 5,
tiles={"portalgun_gun0.png"},
selection_box = {
type = "fixed",
fixed = {
{-0.3, -0.5, -0.3, 0.3, -0.1,0.3},
}
},
drawtype="mesh",
mesh="portalgun_gun.obj",
sunlight_propagates = true,
paramtype="light",
paramtype2="facedir",
visual_scale=0.4,
groups = {not_in_creative_inventory=1,dig_immediate = 3},
on_use = function(itemstack, user, pointed_thing)
portalgun_onuse(itemstack, user, pointed_thing)
return itemstack
end
})
function portalgun_mode(itemstack, user, pointed_thing) -- change modes
local item=itemstack:to_table()
local meta=minetest.deserialize(item["metadata"])
local mode=0
if meta==nil then
meta={}
mode=1
minetest.chat_send_player(user:get_player_name(), "<Portalgun> PLACE to change portal mode (or LEFT+RIGHTCLICK to use the other)")
minetest.chat_send_player(user:get_player_name(), "<Portalgun> LEFTCLICK on an object to carry it, CLICK AGAIN to release")
minetest.chat_send_player(user:get_player_name(), "<Portalgun> SHIFT+LEFTCLICK to close both portals (or wait 40sec until it removes it self)")
end
if meta.mode==nil then meta.mode=2 end
mode=(meta.mode)
if mode==1 then
mode=2
else
mode=1
end
meta.mode=mode
item.name="portalgun:gun"..mode
item.metadata=minetest.serialize(meta)
itemstack:replace(item)
minetest.sound_play("portalgun_mode", {pos=user:get_pos(),max_hear_distance = 5, gain = 1})
end
local function rnd(r)
return math.floor(r+ 0.5)
end
function portalgun_onuse(itemstack, user, pointed_thing) -- using the gun
if pointed_thing.type=="object" then
portalgun_gravity(itemstack, user, pointed_thing)
return itemstack
end
local pos = user:get_pos()
local dir = user:get_look_dir()
local key = user:get_player_control()
local name=user:get_player_name()
local exist=0
local item=itemstack:to_table()
local mode=minetest.deserialize(item["metadata"])
if mode==nil then
portalgun_mode(itemstack, user, pointed_thing)
return itemstack
else
mode=mode.mode
end
local ob={}
ob.project=1
ob.lifelime=portalgun_lifelime
ob.portal1=0
ob.portal2=0
ob.portal1_dir=0
ob.portal2_dir=0
ob.portal2_pos=0
ob.portal1_pos=0
ob.user = user:get_player_name()
if portalgun_portal[name]==nil then -- new portal profile
portalgun_portal[name]={lifelime=portalgun_lifelime,project=1,timer=0,portal1_active=false,portal2_active=false,portal1_use=0,portal2_use=0}
end
if key.RMB and mode==2 then -- hold rmbutton to use the other one (like diplazer)
mode=1
elseif key.RMB and mode==1 then
mode=2
end
if key.sneak then
portal_delete(name,0)
return itemstack
end
pos.y=pos.y+1.5
-- the project
for i=1, portalgun_max_rage,0.5 do
local nname=minetest.get_node({x=pos.x+(dir.x*i), y=pos.y+(dir.y*i), z=pos.z+(dir.z*i)}).name
if minetest.registered_nodes[nname].walkable then
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})
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
if minetest.registered_nodes[minetest.get_node({x=rnd(pos.x+(dir.x*i)), y=rnd(pos.y+(dir.y*i)+1), z=rnd(pos.z+(dir.z*i))}).name].walkable==false and rnd(user:get_pos().y)>rnd(pos.y+(dir.y*i)) then
portalgun_setportal(pos,name,dir,i,mode,"y+")
return itemstack
elseif minetest.registered_nodes[minetest.get_node({x=rnd(pos.x+(dir.x*i)), y=rnd(pos.y+(dir.y*i)-1), z=rnd(pos.z+(dir.z*i))}).name].walkable==false and rnd(user:get_pos().y)<rnd(pos.y+(dir.y*i)) then
portalgun_setportal(pos,name,dir,i,mode,"y-")
return itemstack
elseif minetest.registered_nodes[minetest.get_node({x=rnd(pos.x+(dir.x*i)-1), y=rnd(pos.y+(dir.y*i)), z=rnd(pos.z+(dir.z*i))}).name].walkable==false and rnd(user:get_pos().x)<rnd(pos.x+(dir.x*i)) then
portalgun_setportal(pos,name,dir,i,mode,"x-")
return itemstack
elseif minetest.registered_nodes[minetest.get_node({x=rnd(pos.x+(dir.x*i))+1, y=rnd(pos.y+(dir.y*i)), z=rnd(pos.z+(dir.z*i))}).name].walkable==false and rnd(user:get_pos().x)>rnd(pos.x+(dir.x*i)) then
portalgun_setportal(pos,name,dir,i,mode,"x+")
return itemstack
elseif minetest.registered_nodes[minetest.get_node({x=rnd(pos.x+(dir.x*i)), y=rnd(pos.y+(dir.y*i)), z=rnd(pos.z+(dir.z*i)-1)}).name].walkable==false and rnd(user:get_pos().z)<rnd(pos.z+(dir.z*i)) then
portalgun_setportal(pos,name,dir,i,mode,"z-")
return itemstack
elseif minetest.registered_nodes[minetest.get_node({x=rnd(pos.x+(dir.x*i)), y=rnd(pos.y+(dir.y*i)), z=rnd(pos.z+(dir.z*i)+1)}).name].walkable==false and rnd(user:get_pos().z)>rnd(pos.z+(dir.z*i)) then
portalgun_setportal(pos,name,dir,i,mode,"z+")
return itemstack
end
minetest.sound_play("portalgun_error", {pos=pos,max_hear_distance = 20, gain = 3})
return itemstack
end
end
return itemstack
end
function portalgun_setportal(pos,name,dir,i,mode,portal_dir)
local lpos={x=pos.x+(dir.x*(i-1)), y=pos.y+(dir.y*(i-1)), z=pos.z+(dir.z*(i-1))} -- last pos
local cpos={x=pos.x+(dir.x*i), y=pos.y+(dir.y*i), z=pos.z+(dir.z*i)} -- corrent poss
if portal_dir=="y+" then
cpos.y=(math.floor(cpos.y+ 0.5))+0.524
elseif portal_dir=="y-" then
cpos.y=(math.floor(cpos.y+ 0.5))-0.524
elseif portal_dir=="z+" then
cpos.z=(math.floor(cpos.z+ 0.5))+0.524
elseif portal_dir=="z-" then
cpos.z=(math.floor(cpos.z+ 0.5))-0.524
elseif portal_dir=="x+" then
cpos.x=(math.floor(cpos.x+ 0.5))+0.524
elseif portal_dir=="x-" then
cpos.x=(math.floor(cpos.x+ 0.5))-0.524
end
if portal_dir=="x+" or portal_dir=="x-" then -- auto correct (place in center)
cpos.y=(math.floor(cpos.y+ 0.5))
cpos.z=(math.floor(cpos.z+ 0.5))
elseif portal_dir=="y+" or portal_dir=="y-" then
cpos.x=(math.floor(cpos.x+ 0.5))
cpos.z=(math.floor(cpos.z+ 0.5))
elseif portal_dir=="z+" or portal_dir=="z-" then
cpos.x=(math.floor(cpos.x+ 0.5))
cpos.y=(math.floor(cpos.y+ 0.5))
end
if minetest.registered_nodes[minetest.get_node(cpos).name].walkable then
minetest.sound_play("portalgun_error", {pos=pos,max_hear_distance = 5, gain = 3})
return false
end
if string.find(portal_dir,"x",1) or string.find(portal_dir,"z",1) then-- auto correct (move from bottom / top)
local testpos1={x=cpos.x,y=cpos.y-1,z=cpos.z}
local testpos2={x=cpos.x,y=cpos.y+1,z=cpos.z}
if minetest.registered_nodes[minetest.get_node(testpos1).name].walkable
and minetest.registered_nodes[minetest.get_node(testpos2).name].walkable==false then
cpos.y=cpos.y+0.5
elseif minetest.registered_nodes[minetest.get_node(testpos2).name].walkable
and minetest.registered_nodes[minetest.get_node(testpos1).name].walkable==false then
cpos.y=cpos.y-0.5
end
end
portalgun_portal_tmp_user=name
portalgun_portal[name].x=pos.x-lpos.x
portalgun_portal[name].y=pos.y-lpos.y
portalgun_portal[name].z=pos.z-lpos.z
portalgun_portal[name].project=mode
if portalgun_portal[name].x<0 then
portalgun_portal[name].x=portalgun_portal[name].x*-1
end
if portalgun_portal[name].z<0 then
portalgun_portal[name].z=portalgun_portal[name].z*-1
end
if mode==1 then
portal_delete(name,1)
portalgun_portal[name].portal1_use=portalgun_portal[name].portal1_use+1
portalgun_portal[name].portal1_dir=portal_dir
portalgun_portal[name].portal1_pos=cpos
portalgun_portal[name].portal1=minetest.add_entity(cpos, "portalgun:portal")
portalgun_portal[name].portal1_active=true
minetest.sound_play("portalgun_portalblue", {pos=cpos, max_hear_distance = 20, gain = 1})
else
portal_delete(name,2)
portalgun_portal[name].portal2_use=portalgun_portal[name].portal2_use+1
portalgun_portal[name].portal2_dir=portal_dir
portalgun_portal[name].portal2_pos=cpos
portalgun_portal[name].portal2=minetest.add_entity(cpos, "portalgun:portal")
portalgun_portal[name].portal2_active=true
minetest.sound_play("portalgun_portalorange", {pos=cpos,max_hear_distance = 20, gain = 1})
end
end
portalgun_front_of_field=function(ob,ob2)
local pos2=ob2:get_pos()
return vector.distance(ob:get_pos(),pos2)>vector.distance(portalgun_pointat(ob),pos2)
end
portalgun_pointat=function(ob)
local pos=ob:get_pos()
local yaw=ob:get_yaw()
if yaw ~= yaw or type(yaw)~="number" then
yaw=0
end
local z =math.sin(yaw) * -0.1
local x =math.cos(yaw) * 0.1
return {x=pos.x+x,y=pos.y,z=pos.z+z}
end

View File

@@ -1,4 +1,3 @@
name = portalgun name = portalgun
description = Portals and stuff description = Portals and stuff
depends = default depends = mesecons
optional_depends = mesecons

BIN
models/bullet.blend Normal file

Binary file not shown.

BIN
models/bullet.blend1 Normal file

Binary file not shown.

628
models/bullet.obj Normal file
View File

@@ -0,0 +1,628 @@
# Blender v3.1.2 OBJ File: 'bullet.blend'
# www.blender.org
mtllib bullet.mtl
o Cylinder
v -0.000000 -0.285469 -0.048214
v 0.009406 -0.285469 -0.047288
v 0.018451 -0.285469 -0.044544
v 0.026786 -0.285469 -0.040089
v 0.034093 -0.285469 -0.034093
v 0.040089 -0.285469 -0.026786
v 0.044544 -0.285469 -0.018451
v 0.047288 -0.285469 -0.009406
v 0.048214 -0.285469 0.000000
v 0.047288 -0.285469 0.009406
v 0.044544 -0.285469 0.018451
v 0.040089 -0.285469 0.026786
v 0.034093 -0.285469 0.034093
v 0.026786 -0.285469 0.040089
v 0.018451 -0.285469 0.044544
v 0.009406 -0.285469 0.047288
v -0.000000 -0.285469 0.048214
v -0.009406 -0.285469 0.047288
v -0.018451 -0.285469 0.044544
v -0.026786 -0.285469 0.040089
v -0.034093 -0.285469 0.034093
v -0.040089 -0.285469 0.026786
v -0.044544 -0.285469 0.018451
v -0.047288 -0.285469 0.009406
v -0.048214 -0.285469 -0.000000
v -0.047288 -0.285469 -0.009406
v -0.044544 -0.285469 -0.018451
v -0.040089 -0.285469 -0.026786
v -0.034093 -0.285469 -0.034093
v -0.026786 -0.285469 -0.040089
v -0.018451 -0.285469 -0.044544
v -0.009406 -0.285469 -0.047288
v 0.000000 0.202230 0.000000
v -0.000000 0.083239 -0.048214
v 0.009406 0.083239 -0.047288
v 0.018451 0.083239 -0.044544
v 0.026786 0.083239 -0.040089
v 0.034093 0.083239 -0.034093
v 0.040089 0.083239 -0.026786
v 0.044544 0.083239 -0.018451
v 0.047288 0.083239 -0.009406
v 0.048214 0.083239 0.000000
v 0.047288 0.083239 0.009406
v 0.044544 0.083239 0.018451
v 0.040089 0.083239 0.026786
v 0.034093 0.083239 0.034093
v 0.026786 0.083239 0.040089
v 0.018451 0.083239 0.044544
v 0.009406 0.083239 0.047288
v -0.000000 0.083239 0.048214
v -0.009406 0.083239 0.047288
v -0.018451 0.083239 0.044544
v -0.026786 0.083239 0.040089
v -0.034093 0.083239 0.034093
v -0.040089 0.083239 0.026786
v -0.044544 0.083239 0.018451
v -0.047288 0.083239 0.009406
v -0.048214 0.083239 -0.000000
v -0.047288 0.083239 -0.009406
v -0.044544 0.083239 -0.018451
v -0.040089 0.083239 -0.026786
v -0.034093 0.083239 -0.034093
v -0.026786 0.083239 -0.040089
v -0.018451 0.083239 -0.044544
v -0.009406 0.083239 -0.047288
v -0.000000 -0.285469 -0.048214
v 0.009406 -0.285469 -0.047288
v 0.018451 -0.285469 -0.044544
v 0.026786 -0.285469 -0.040089
v 0.034093 -0.285469 -0.034093
v 0.040089 -0.285469 -0.026786
v 0.044544 -0.285469 -0.018451
v 0.047288 -0.285469 -0.009406
v 0.048214 -0.285469 0.000000
v 0.047288 -0.285469 0.009406
v 0.044544 -0.285469 0.018451
v 0.040089 -0.285469 0.026786
v 0.034093 -0.285469 0.034093
v 0.026786 -0.285469 0.040089
v 0.018451 -0.285469 0.044544
v 0.009406 -0.285469 0.047288
v -0.000000 -0.285469 0.048214
v -0.009406 -0.285469 0.047288
v -0.018451 -0.285469 0.044544
v -0.026786 -0.285469 0.040089
v -0.034093 -0.285469 0.034093
v -0.040089 -0.285469 0.026786
v -0.044544 -0.285469 0.018451
v -0.047288 -0.285469 0.009406
v -0.048214 -0.285469 -0.000000
v -0.047288 -0.285469 -0.009406
v -0.044544 -0.285469 -0.018451
v -0.040089 -0.285469 -0.026786
v -0.034093 -0.285469 -0.034093
v -0.026786 -0.285469 -0.040089
v -0.018451 -0.285469 -0.044544
v -0.009406 -0.285469 -0.047288
v 0.000000 0.202230 0.000000
v -0.000000 0.083239 -0.048214
v 0.009406 0.083239 -0.047288
v 0.018451 0.083239 -0.044544
v 0.026786 0.083239 -0.040089
v 0.034093 0.083239 -0.034093
v 0.040089 0.083239 -0.026786
v 0.044544 0.083239 -0.018451
v 0.047288 0.083239 -0.009406
v 0.048214 0.083239 0.000000
v 0.047288 0.083239 0.009406
v 0.044544 0.083239 0.018451
v 0.040089 0.083239 0.026786
v 0.034093 0.083239 0.034093
v 0.026786 0.083239 0.040089
v 0.018451 0.083239 0.044544
v 0.009406 0.083239 0.047288
v -0.000000 0.083239 0.048214
v -0.009406 0.083239 0.047288
v -0.018451 0.083239 0.044544
v -0.026786 0.083239 0.040089
v -0.034093 0.083239 0.034093
v -0.040089 0.083239 0.026786
v -0.044544 0.083239 0.018451
v -0.047288 0.083239 0.009406
v -0.048214 0.083239 -0.000000
v -0.047288 0.083239 -0.009406
v -0.044544 0.083239 -0.018451
v -0.040089 0.083239 -0.026786
v -0.034093 0.083239 -0.034093
v -0.026786 0.083239 -0.040089
v -0.018451 0.083239 -0.044544
v -0.009406 0.083239 -0.047288
vt 0.750000 0.490000
vt 0.796822 0.485388
vt 0.841844 0.471731
vt 0.883337 0.449553
vt 0.919706 0.419706
vt 0.949553 0.383337
vt 0.971731 0.341844
vt 0.985388 0.296822
vt 0.990000 0.250000
vt 0.985388 0.203178
vt 0.971731 0.158156
vt 0.949553 0.116663
vt 0.919706 0.080294
vt 0.883337 0.050447
vt 0.841844 0.028269
vt 0.796822 0.014612
vt 0.750000 0.010000
vt 0.703178 0.014612
vt 0.658156 0.028269
vt 0.616663 0.050447
vt 0.580294 0.080294
vt 0.550447 0.116663
vt 0.528269 0.158156
vt 0.514612 0.203178
vt 0.510000 0.250000
vt 0.514612 0.296822
vt 0.528269 0.341844
vt 0.550447 0.383337
vt 0.580294 0.419706
vt 0.616663 0.449553
vt 0.658156 0.471731
vt 0.703178 0.485388
vt 0.031250 0.500000
vt 0.031250 0.892746
vt 0.000000 0.892746
vt 0.000000 0.500000
vt 0.062500 0.500000
vt 0.062500 0.892746
vt 0.093750 0.500000
vt 0.093750 0.892746
vt 0.125000 0.500000
vt 0.125000 0.892746
vt 0.156250 0.500000
vt 0.156250 0.892746
vt 0.187500 0.500000
vt 0.187500 0.892746
vt 0.218750 0.500000
vt 0.218750 0.892746
vt 0.250000 0.500000
vt 0.250000 0.892746
vt 0.281250 0.500000
vt 0.281250 0.892746
vt 0.312500 0.500000
vt 0.312500 0.892746
vt 0.343750 0.500000
vt 0.343750 0.892746
vt 0.375000 0.500000
vt 0.375000 0.892746
vt 0.406250 0.500000
vt 0.406250 0.892746
vt 0.437500 0.500000
vt 0.437500 0.892746
vt 0.468750 0.500000
vt 0.468750 0.892746
vt 0.500000 0.500000
vt 0.500000 0.892746
vt 0.531250 0.500000
vt 0.531250 0.892746
vt 0.562500 0.500000
vt 0.562500 0.892746
vt 0.593750 0.500000
vt 0.593750 0.892746
vt 0.625000 0.500000
vt 0.625000 0.892746
vt 0.656250 0.500000
vt 0.656250 0.892746
vt 0.687500 0.500000
vt 0.687500 0.892746
vt 0.718750 0.500000
vt 0.718750 0.892746
vt 0.750000 0.500000
vt 0.750000 0.892746
vt 0.781250 0.500000
vt 0.781250 0.892746
vt 0.812500 0.500000
vt 0.812500 0.892746
vt 0.843750 0.500000
vt 0.843750 0.892746
vt 0.875000 0.500000
vt 0.875000 0.892746
vt 0.906250 0.500000
vt 0.906250 0.892746
vt 0.937500 0.500000
vt 0.937500 0.892746
vt 0.968750 0.500000
vt 0.968750 0.892746
vt 1.000000 0.500000
vt 1.000000 0.892746
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.750000 0.490000
vt 0.703178 0.485388
vt 0.658156 0.471731
vt 0.616663 0.449553
vt 0.580294 0.419706
vt 0.550447 0.383337
vt 0.528269 0.341844
vt 0.514612 0.296822
vt 0.510000 0.250000
vt 0.514612 0.203178
vt 0.528269 0.158156
vt 0.550447 0.116663
vt 0.580294 0.080294
vt 0.616663 0.050447
vt 0.658156 0.028269
vt 0.703178 0.014612
vt 0.750000 0.010000
vt 0.796822 0.014612
vt 0.841844 0.028269
vt 0.883337 0.050447
vt 0.919706 0.080294
vt 0.949553 0.116663
vt 0.971731 0.158156
vt 0.985388 0.203178
vt 0.990000 0.250000
vt 0.985388 0.296822
vt 0.971731 0.341844
vt 0.949553 0.383337
vt 0.919706 0.419706
vt 0.883337 0.449553
vt 0.841844 0.471731
vt 0.796822 0.485388
vt 0.031250 0.500000
vt 0.000000 0.500000
vt 0.000000 0.892746
vt 0.031250 0.892746
vt 0.062500 0.500000
vt 0.062500 0.892746
vt 0.093750 0.500000
vt 0.093750 0.892746
vt 0.125000 0.500000
vt 0.125000 0.892746
vt 0.156250 0.500000
vt 0.156250 0.892746
vt 0.187500 0.500000
vt 0.187500 0.892746
vt 0.218750 0.500000
vt 0.218750 0.892746
vt 0.250000 0.500000
vt 0.250000 0.892746
vt 0.281250 0.500000
vt 0.281250 0.892746
vt 0.312500 0.500000
vt 0.312500 0.892746
vt 0.343750 0.500000
vt 0.343750 0.892746
vt 0.375000 0.500000
vt 0.375000 0.892746
vt 0.406250 0.500000
vt 0.406250 0.892746
vt 0.437500 0.500000
vt 0.437500 0.892746
vt 0.468750 0.500000
vt 0.468750 0.892746
vt 0.500000 0.500000
vt 0.500000 0.892746
vt 0.531250 0.500000
vt 0.531250 0.892746
vt 0.562500 0.500000
vt 0.562500 0.892746
vt 0.593750 0.500000
vt 0.593750 0.892746
vt 0.625000 0.500000
vt 0.625000 0.892746
vt 0.656250 0.500000
vt 0.656250 0.892746
vt 0.687500 0.500000
vt 0.687500 0.892746
vt 0.718750 0.500000
vt 0.718750 0.892746
vt 0.750000 0.500000
vt 0.750000 0.892746
vt 0.781250 0.500000
vt 0.781250 0.892746
vt 0.812500 0.500000
vt 0.812500 0.892746
vt 0.843750 0.500000
vt 0.843750 0.892746
vt 0.875000 0.500000
vt 0.875000 0.892746
vt 0.906250 0.500000
vt 0.906250 0.892746
vt 0.937500 0.500000
vt 0.937500 0.892746
vt 0.968750 0.500000
vt 0.968750 0.892746
vt 1.000000 0.500000
vt 1.000000 0.892746
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vn 0.0000 -1.0000 -0.0000
vn -0.0980 0.0000 -0.9952
vn -0.2903 0.0000 -0.9569
vn -0.4714 0.0000 -0.8819
vn -0.6344 0.0000 -0.7730
vn -0.7730 0.0000 -0.6344
vn -0.8819 0.0000 -0.4714
vn -0.9569 0.0000 -0.2903
vn -0.9952 0.0000 -0.0980
vn -0.9952 0.0000 0.0980
vn -0.9569 0.0000 0.2903
vn -0.8819 0.0000 0.4714
vn -0.7730 0.0000 0.6344
vn -0.6344 0.0000 0.7730
vn -0.4714 0.0000 0.8819
vn -0.2903 0.0000 0.9569
vn -0.0980 0.0000 0.9952
vn 0.0980 0.0000 0.9952
vn 0.2903 0.0000 0.9569
vn 0.4714 0.0000 0.8819
vn 0.6344 0.0000 0.7730
vn 0.7730 0.0000 0.6344
vn 0.8819 0.0000 0.4714
vn 0.9569 0.0000 0.2903
vn 0.9952 0.0000 0.0980
vn 0.9952 0.0000 -0.0980
vn 0.9569 0.0000 -0.2903
vn 0.8819 0.0000 -0.4714
vn 0.7730 0.0000 -0.6344
vn 0.6344 0.0000 -0.7730
vn 0.4714 0.0000 -0.8819
vn 0.2903 0.0000 -0.9569
vn 0.0980 0.0000 -0.9952
vn -0.0909 0.3740 -0.9230
vn -0.2692 0.3740 -0.8875
vn -0.4372 0.3740 -0.8179
vn -0.5884 0.3740 -0.7169
vn -0.7169 0.3740 -0.5884
vn -0.8179 0.3740 -0.4372
vn -0.8875 0.3740 -0.2692
vn -0.9230 0.3740 -0.0909
vn -0.9230 0.3740 0.0909
vn -0.8875 0.3740 0.2692
vn -0.8179 0.3740 0.4372
vn -0.7169 0.3740 0.5884
vn -0.5884 0.3740 0.7169
vn -0.4372 0.3740 0.8179
vn -0.2692 0.3740 0.8875
vn -0.0909 0.3740 0.9230
vn 0.0909 0.3740 0.9230
vn 0.2692 0.3740 0.8875
vn 0.4372 0.3740 0.8179
vn 0.5884 0.3740 0.7169
vn 0.7169 0.3740 0.5884
vn 0.8179 0.3740 0.4372
vn 0.8875 0.3740 0.2692
vn 0.9230 0.3740 0.0909
vn 0.9230 0.3740 -0.0909
vn 0.8875 0.3740 -0.2692
vn 0.8179 0.3740 -0.4372
vn 0.7169 0.3740 -0.5884
vn 0.5884 0.3740 -0.7169
vn 0.4372 0.3740 -0.8179
vn 0.2692 0.3740 -0.8875
vn 0.0909 0.3740 -0.9230
vn 0.0000 1.0000 -0.0000
vn 0.0909 -0.3740 0.9230
vn 0.2692 -0.3740 0.8875
vn 0.4372 -0.3740 0.8179
vn 0.5884 -0.3740 0.7169
vn 0.7169 -0.3740 0.5884
vn 0.8179 -0.3740 0.4372
vn 0.8875 -0.3740 0.2692
vn 0.9230 -0.3740 0.0909
vn 0.9230 -0.3740 -0.0909
vn 0.8875 -0.3740 -0.2692
vn 0.8179 -0.3740 -0.4372
vn 0.7169 -0.3740 -0.5884
vn 0.5884 -0.3740 -0.7169
vn 0.4372 -0.3740 -0.8179
vn 0.2692 -0.3740 -0.8875
vn 0.0909 -0.3740 -0.9230
vn -0.0909 -0.3740 -0.9230
vn -0.2692 -0.3740 -0.8875
vn -0.4372 -0.3740 -0.8179
vn -0.5884 -0.3740 -0.7169
vn -0.7169 -0.3740 -0.5884
vn -0.8179 -0.3740 -0.4372
vn -0.8875 -0.3740 -0.2692
vn -0.9230 -0.3740 -0.0909
vn -0.9230 -0.3740 0.0909
vn -0.8875 -0.3740 0.2692
vn -0.8179 -0.3740 0.4372
vn -0.7169 -0.3740 0.5884
vn -0.5884 -0.3740 0.7169
vn -0.4372 -0.3740 0.8179
vn -0.2692 -0.3740 0.8875
vn -0.0909 -0.3740 0.9230
usemtl None
s off
f 1/1/1 2/2/1 3/3/1 4/4/1 5/5/1 6/6/1 7/7/1 8/8/1 9/9/1 10/10/1 11/11/1 12/12/1 13/13/1 14/14/1 15/15/1 16/16/1 17/17/1 18/18/1 19/19/1 20/20/1 21/21/1 22/22/1 23/23/1 24/24/1 25/25/1 26/26/1 27/27/1 28/28/1 29/29/1 30/30/1 31/31/1 32/32/1
f 32/33/2 65/34/2 34/35/2 1/36/2
f 31/37/3 64/38/3 65/34/3 32/33/3
f 30/39/4 63/40/4 64/38/4 31/37/4
f 29/41/5 62/42/5 63/40/5 30/39/5
f 28/43/6 61/44/6 62/42/6 29/41/6
f 27/45/7 60/46/7 61/44/7 28/43/7
f 26/47/8 59/48/8 60/46/8 27/45/8
f 25/49/9 58/50/9 59/48/9 26/47/9
f 24/51/10 57/52/10 58/50/10 25/49/10
f 23/53/11 56/54/11 57/52/11 24/51/11
f 22/55/12 55/56/12 56/54/12 23/53/12
f 21/57/13 54/58/13 55/56/13 22/55/13
f 20/59/14 53/60/14 54/58/14 21/57/14
f 19/61/15 52/62/15 53/60/15 20/59/15
f 18/63/16 51/64/16 52/62/16 19/61/16
f 17/65/17 50/66/17 51/64/17 18/63/17
f 16/67/18 49/68/18 50/66/18 17/65/18
f 15/69/19 48/70/19 49/68/19 16/67/19
f 14/71/20 47/72/20 48/70/20 15/69/20
f 13/73/21 46/74/21 47/72/21 14/71/21
f 12/75/22 45/76/22 46/74/22 13/73/22
f 11/77/23 44/78/23 45/76/23 12/75/23
f 10/79/24 43/80/24 44/78/24 11/77/24
f 9/81/25 42/82/25 43/80/25 10/79/25
f 8/83/26 41/84/26 42/82/26 9/81/26
f 7/85/27 40/86/27 41/84/27 8/83/27
f 6/87/28 39/88/28 40/86/28 7/85/28
f 5/89/29 38/90/29 39/88/29 6/87/29
f 4/91/30 37/92/30 38/90/30 5/89/30
f 3/93/31 36/94/31 37/92/31 4/91/31
f 2/95/32 35/96/32 36/94/32 3/93/32
f 1/97/33 34/98/33 35/96/33 2/95/33
f 65/34/34 33/99/34 34/35/34
f 65/34/35 64/38/35 33/99/35
f 64/38/36 63/40/36 33/99/36
f 63/40/37 62/42/37 33/99/37
f 62/42/38 61/44/38 33/99/38
f 61/44/39 60/46/39 33/99/39
f 60/46/40 59/48/40 33/99/40
f 59/48/41 58/50/41 33/99/41
f 58/50/42 57/52/42 33/99/42
f 57/52/43 56/54/43 33/99/43
f 56/54/44 55/56/44 33/99/44
f 55/56/45 54/58/45 33/99/45
f 54/58/46 53/60/46 33/99/46
f 53/60/47 52/62/47 33/99/47
f 52/62/48 51/64/48 33/99/48
f 51/64/49 50/66/49 33/99/49
f 50/66/50 49/68/50 33/99/50
f 49/68/51 48/70/51 33/99/51
f 48/70/52 47/72/52 33/99/52
f 47/72/53 46/74/53 33/99/53
f 46/74/54 45/76/54 33/99/54
f 45/76/55 44/78/55 33/99/55
f 44/78/56 43/80/56 33/99/56
f 43/80/57 42/82/57 33/99/57
f 42/82/58 41/84/58 33/99/58
f 41/84/59 40/86/59 33/99/59
f 40/86/60 39/88/60 33/99/60
f 39/88/61 38/90/61 33/99/61
f 38/90/62 37/92/62 33/99/62
f 37/92/63 36/94/63 33/99/63
f 36/94/64 35/96/64 33/99/64
f 35/96/65 34/98/65 33/99/65
f 64/100/1 65/101/1 34/102/1 35/103/1 36/104/1 37/105/1 38/106/1 39/107/1 40/108/1 41/109/1 42/110/1 43/111/1 44/112/1 45/113/1 46/114/1 47/115/1 48/116/1 49/117/1 50/118/1 51/119/1 52/120/1 53/121/1 54/122/1 55/123/1 56/124/1 57/125/1 58/126/1 59/127/1 60/128/1 61/129/1 62/130/1 63/131/1
f 66/132/66 97/133/66 96/134/66 95/135/66 94/136/66 93/137/66 92/138/66 91/139/66 90/140/66 89/141/66 88/142/66 87/143/66 86/144/66 85/145/66 84/146/66 83/147/66 82/148/66 81/149/66 80/150/66 79/151/66 78/152/66 77/153/66 76/154/66 75/155/66 74/156/66 73/157/66 72/158/66 71/159/66 70/160/66 69/161/66 68/162/66 67/163/66
f 97/164/18 66/165/18 99/166/18 130/167/18
f 96/168/19 97/164/19 130/167/19 129/169/19
f 95/170/20 96/168/20 129/169/20 128/171/20
f 94/172/21 95/170/21 128/171/21 127/173/21
f 93/174/22 94/172/22 127/173/22 126/175/22
f 92/176/23 93/174/23 126/175/23 125/177/23
f 91/178/24 92/176/24 125/177/24 124/179/24
f 90/180/25 91/178/25 124/179/25 123/181/25
f 89/182/26 90/180/26 123/181/26 122/183/26
f 88/184/27 89/182/27 122/183/27 121/185/27
f 87/186/28 88/184/28 121/185/28 120/187/28
f 86/188/29 87/186/29 120/187/29 119/189/29
f 85/190/30 86/188/30 119/189/30 118/191/30
f 84/192/31 85/190/31 118/191/31 117/193/31
f 83/194/32 84/192/32 117/193/32 116/195/32
f 82/196/33 83/194/33 116/195/33 115/197/33
f 81/198/2 82/196/2 115/197/2 114/199/2
f 80/200/3 81/198/3 114/199/3 113/201/3
f 79/202/4 80/200/4 113/201/4 112/203/4
f 78/204/5 79/202/5 112/203/5 111/205/5
f 77/206/6 78/204/6 111/205/6 110/207/6
f 76/208/7 77/206/7 110/207/7 109/209/7
f 75/210/8 76/208/8 109/209/8 108/211/8
f 74/212/9 75/210/9 108/211/9 107/213/9
f 73/214/10 74/212/10 107/213/10 106/215/10
f 72/216/11 73/214/11 106/215/11 105/217/11
f 71/218/12 72/216/12 105/217/12 104/219/12
f 70/220/13 71/218/13 104/219/13 103/221/13
f 69/222/14 70/220/14 103/221/14 102/223/14
f 68/224/15 69/222/15 102/223/15 101/225/15
f 67/226/16 68/224/16 101/225/16 100/227/16
f 66/228/17 67/226/17 100/227/17 99/229/17
f 130/167/67 99/166/67 98/230/67
f 130/167/68 98/230/68 129/169/68
f 129/169/69 98/230/69 128/171/69
f 128/171/70 98/230/70 127/173/70
f 127/173/71 98/230/71 126/175/71
f 126/175/72 98/230/72 125/177/72
f 125/177/73 98/230/73 124/179/73
f 124/179/74 98/230/74 123/181/74
f 123/181/75 98/230/75 122/183/75
f 122/183/76 98/230/76 121/185/76
f 121/185/77 98/230/77 120/187/77
f 120/187/78 98/230/78 119/189/78
f 119/189/79 98/230/79 118/191/79
f 118/191/80 98/230/80 117/193/80
f 117/193/81 98/230/81 116/195/81
f 116/195/82 98/230/82 115/197/82
f 115/197/83 98/230/83 114/199/83
f 114/199/84 98/230/84 113/201/84
f 113/201/85 98/230/85 112/203/85
f 112/203/86 98/230/86 111/205/86
f 111/205/87 98/230/87 110/207/87
f 110/207/88 98/230/88 109/209/88
f 109/209/89 98/230/89 108/211/89
f 108/211/90 98/230/90 107/213/90
f 107/213/91 98/230/91 106/215/91
f 106/215/92 98/230/92 105/217/92
f 105/217/93 98/230/93 104/219/93
f 104/219/94 98/230/94 103/221/94
f 103/221/95 98/230/95 102/223/95
f 102/223/96 98/230/96 101/225/96
f 101/225/97 98/230/97 100/227/97
f 100/227/98 98/230/98 99/229/98
f 129/231/66 128/232/66 127/233/66 126/234/66 125/235/66 124/236/66 123/237/66 122/238/66 121/239/66 120/240/66 119/241/66 118/242/66 117/243/66 116/244/66 115/245/66 114/246/66 113/247/66 112/248/66 111/249/66 110/250/66 109/251/66 108/252/66 107/253/66 106/254/66 105/255/66 104/256/66 103/257/66 102/258/66 101/259/66 100/260/66 99/261/66 130/262/66

BIN
models/prtl_0.blend Normal file

Binary file not shown.

BIN
models/prtl_0.blend1 Normal file

Binary file not shown.

View File

@@ -1,792 +0,0 @@
# Blender v2.79 (sub 0) OBJ File: 'torret2.blend'
# www.blender.org
mtllib torret1.mtl
o Cube.003_Cube.006
v 0.189895 0.163143 -0.372653
v 0.189895 0.201097 -0.378580
v 0.080336 0.159674 -0.394870
v 0.080336 0.197628 -0.400796
v 0.242297 0.123751 -0.624923
v 0.242297 0.161705 -0.630850
v 0.132738 0.120282 -0.647140
v 0.132738 0.158236 -0.653066
v -0.132041 0.120282 -0.647140
v -0.241600 0.161705 -0.630850
v -0.241600 0.123751 -0.624923
v -0.079638 0.197628 -0.400796
v -0.079638 0.159674 -0.394870
v -0.189198 0.201097 -0.378580
v -0.189198 0.163143 -0.372653
v -0.132041 0.158236 -0.653066
v 0.063142 0.001380 0.512074
v 0.063142 0.035815 0.538953
v -0.064046 0.001380 0.512074
v -0.064046 0.035815 0.538953
v 0.063142 0.183763 0.278415
v 0.063142 0.218199 0.305294
v -0.064046 0.183763 0.278415
v -0.064046 0.218199 0.305294
v -0.132739 0.274292 0.122505
v -0.132738 0.815413 0.122505
v -0.194069 0.274292 0.122505
v -0.194069 0.815413 0.122505
v -0.132739 0.274292 -0.191426
v -0.132739 0.815413 -0.191426
v -0.194069 0.274292 -0.191426
v -0.194069 0.815413 -0.191426
v 0.128914 0.144853 0.197599
v 0.128914 0.944853 0.197599
v -0.133743 0.144853 0.197599
v -0.133743 0.944853 0.197599
v 0.128913 0.144853 -0.266520
v 0.128914 0.944853 -0.266520
v -0.133743 0.144853 -0.266520
v -0.133743 0.944853 -0.266520
v 0.189656 0.274292 0.122505
v 0.189656 0.815413 0.122505
v 0.128325 0.274292 0.122505
v 0.128325 0.815413 0.122505
v 0.189656 0.274292 -0.191426
v 0.189656 0.815413 -0.191426
v 0.128325 0.274292 -0.191426
v 0.128325 0.815413 -0.191426
v -0.058777 0.548149 -0.265845
v -0.058777 0.548149 -0.273879
v -0.043146 0.510413 -0.265845
v -0.043146 0.510413 -0.273879
v -0.005410 0.494783 -0.265845
v -0.005410 0.494783 -0.273879
v 0.032325 0.510413 -0.265845
v 0.032325 0.510413 -0.273879
v 0.047956 0.548149 -0.265845
v 0.047956 0.548149 -0.273879
v 0.032325 0.585884 -0.265845
v 0.032325 0.585884 -0.273879
v -0.005410 0.601515 -0.265845
v -0.005410 0.601515 -0.273879
v -0.043146 0.585884 -0.265845
v -0.043146 0.585884 -0.273879
v -0.000109 0.149264 -0.268848
v -0.000109 0.940441 -0.268848
v -0.004799 0.149264 -0.268848
v -0.004799 0.940441 -0.268848
v -0.000109 0.149264 -0.260088
v -0.000109 0.940441 -0.260088
v -0.004799 0.149264 -0.260088
v -0.004799 0.940441 -0.260088
v 0.119911 0.086846 -0.114011
v 0.111512 0.130445 -0.112341
v 0.038877 0.064643 -0.136101
v 0.030478 0.108242 -0.134431
v 0.209056 0.123944 -0.552177
v 0.200657 0.167543 -0.550507
v 0.128022 0.101741 -0.574268
v 0.138016 0.145340 -0.572597
v 0.048662 0.033870 0.495340
v 0.048662 0.022144 0.452483
v -0.053491 0.033870 0.495340
v -0.053491 0.022144 0.452483
v 0.048662 -0.476361 0.634943
v 0.048662 -0.488087 0.592086
v -0.053491 -0.476361 0.634943
v -0.053491 -0.488087 0.592086
v 0.209056 0.123944 -0.552177
v 0.128022 0.101741 -0.574268
v 0.219790 0.123944 -0.595985
v 0.211391 0.167543 -0.594315
v 0.157149 0.101741 -0.618075
v 0.148750 0.145340 -0.616405
v 0.312716 -0.500601 -0.680111
v 0.231681 -0.496988 -0.702201
v 0.323449 -0.500601 -0.723919
v 0.242415 -0.496988 -0.746009
v 0.080352 0.075744 -0.125056
v 0.094276 0.014385 -0.314219
v 0.169496 0.112843 -0.563222
v 0.175310 0.036588 -0.292129
v 0.135751 0.025487 -0.303174
v 0.071953 0.119343 -0.123386
v 0.085877 0.057984 -0.312549
v 0.161097 0.156442 -0.561552
v 0.166911 0.080187 -0.290458
v 0.127351 0.069086 -0.301503
v -0.124589 0.086846 -0.114011
v -0.116189 0.130445 -0.112341
v -0.043554 0.064643 -0.136101
v -0.035155 0.108242 -0.134431
v -0.213733 0.123944 -0.552177
v -0.205334 0.167543 -0.550507
v -0.132699 0.101741 -0.574268
v -0.124300 0.145340 -0.572597
v -0.213733 0.123944 -0.552177
v -0.132699 0.101741 -0.574268
v -0.224467 0.123944 -0.595985
v -0.216068 0.167543 -0.594315
v -0.143433 0.101741 -0.618075
v -0.135034 0.145340 -0.616405
v -0.317393 -0.500601 -0.680111
v -0.236359 -0.496988 -0.702201
v -0.328127 -0.500601 -0.723919
v -0.247093 -0.496988 -0.746009
v -0.085029 0.075744 -0.125056
v -0.098953 0.014385 -0.314219
v -0.174174 0.112843 -0.563222
v -0.179988 0.036588 -0.292129
v -0.140428 0.025487 -0.303174
v -0.076630 0.119343 -0.123386
v -0.090554 0.057984 -0.312549
v -0.165774 0.156442 -0.561552
v -0.171588 0.080187 -0.290458
v -0.132029 0.069086 -0.301504
v 0.048662 0.269229 0.190763
v 0.048662 0.257503 0.147906
v -0.053491 0.269229 0.190763
v -0.053491 0.257503 0.147906
v 0.119911 0.086846 -0.114011
v 0.111512 0.130445 -0.112341
v 0.038877 0.064643 -0.136101
v 0.030478 0.108242 -0.134431
v -0.124589 0.086846 -0.114011
v -0.116189 0.130445 -0.112341
v -0.043554 0.064643 -0.136101
v -0.035155 0.108242 -0.134431
v 0.080352 0.075744 -0.125056
v 0.071953 0.119343 -0.123386
v -0.085029 0.075744 -0.125056
v -0.076630 0.119343 -0.123386
v 0.119911 0.086846 -0.114011
v 0.111512 0.130445 -0.112341
v 0.038877 0.064643 -0.136101
v 0.030478 0.108242 -0.134431
v -0.124589 0.086846 -0.114011
v -0.116189 0.130445 -0.112341
v -0.043554 0.064643 -0.136101
v -0.035155 0.108242 -0.134431
v -0.124589 0.171454 -0.009180
v -0.116189 0.215053 -0.007510
v -0.043554 0.149251 -0.031270
v -0.035155 0.192850 -0.029600
v -0.085029 0.160352 -0.020225
v -0.076630 0.203951 -0.018555
v 0.119911 0.157397 -0.053308
v 0.111512 0.200996 -0.051637
v 0.038877 0.135194 -0.075398
v 0.030478 0.178793 -0.073728
v 0.080352 0.146295 -0.064353
v 0.071953 0.189894 -0.062682
vt 0.489132 0.748949
vt 0.489132 0.718137
vt 0.519717 0.718145
vt 0.519717 0.748957
vt 0.090171 0.693043
vt 0.090171 0.723854
vt 0.061402 0.723899
vt 0.061402 0.693087
vt 0.210985 0.718395
vt 0.210985 0.749207
vt 0.180404 0.749215
vt 0.180404 0.718403
vt 0.246514 0.722337
vt 0.246514 0.753149
vt 0.217065 0.753184
vt 0.217065 0.722372
vt 0.000000 0.693043
vt 0.030701 0.693043
vt 0.030701 0.723855
vt 0.000000 0.723855
vt 0.030701 0.693043
vt 0.061402 0.693043
vt 0.061402 0.723855
vt 0.030701 0.723855
vt 0.113868 0.693092
vt 0.144569 0.693034
vt 0.144569 0.729449
vt 0.113868 0.729507
vt 0.028567 0.723863
vt 0.028567 0.754674
vt 0.000000 0.754666
vt 0.000000 0.723855
vt 0.057131 0.723855
vt 0.057131 0.754666
vt 0.028567 0.754674
vt 0.028567 0.723863
vt 0.144569 0.693102
vt 0.175270 0.693034
vt 0.175270 0.728196
vt 0.144569 0.728264
vt 0.113868 0.693034
vt 0.113868 0.733059
vt 0.090234 0.749387
vt 0.090234 0.709362
vt 0.453595 0.706535
vt 0.429961 0.690207
vt 0.429961 0.730233
vt 0.453595 0.746561
vt 0.491495 0.718137
vt 0.489132 0.694236
vt 0.523439 0.692892
vt 0.525802 0.716793
vt 0.690895 0.620228
vt 0.683350 0.597128
vt 0.683350 0.421757
vt 0.690895 0.444858
vt 0.180404 0.543450
vt 0.182758 0.519548
vt 0.217065 0.520887
vt 0.214711 0.544789
vt 0.797976 0.023111
vt 0.805454 0.000000
vt 0.805454 0.175364
vt 0.797976 0.198475
vt 0.182758 0.717056
vt 0.217065 0.718395
vt 0.525802 0.519284
vt 0.491495 0.520628
vt 0.666799 0.889843
vt 0.653710 0.461156
vt 0.670262 0.460793
vt 0.683350 0.889480
vt 0.573487 0.421757
vt 0.573487 0.850735
vt 0.533024 0.888570
vt 0.533024 0.459592
vt 0.292521 0.928144
vt 0.305565 0.499455
vt 0.322117 0.499817
vt 0.309072 0.928506
vt 0.613599 0.850721
vt 0.613599 0.421757
vt 0.653710 0.459650
vt 0.653710 0.888614
vt 0.305565 0.967176
vt 0.322117 0.967538
vt 0.683350 0.421757
vt 0.666799 0.422120
vt 0.019350 0.693043
vt 0.000000 0.059266
vt 0.070884 0.057711
vt 0.090234 0.691487
vt 0.348156 0.690141
vt 0.348156 0.055936
vt 0.407978 0.000000
vt 0.407978 0.634205
vt 0.090234 0.633779
vt 0.109519 0.000000
vt 0.180404 0.001550
vt 0.161119 0.635328
vt 0.407978 0.634186
vt 0.407978 0.000000
vt 0.467279 0.056021
vt 0.467279 0.690207
vt 0.109519 0.691484
vt 0.180404 0.693034
vt 0.090234 0.000000
vt 0.019350 0.001555
vt 0.927182 0.678965
vt 0.914094 0.250278
vt 0.930645 0.249915
vt 0.943734 0.678602
vt 0.863881 0.210879
vt 0.863881 0.639856
vt 0.823417 0.677691
vt 0.823417 0.248714
vt 0.262925 0.928144
vt 0.275969 0.499455
vt 0.292521 0.499817
vt 0.279476 0.928506
vt 0.573487 0.850721
vt 0.573487 0.421757
vt 0.613599 0.459650
vt 0.613599 0.888614
vt 0.275969 0.967176
vt 0.292521 0.967538
vt 0.943734 0.210879
vt 0.927182 0.211242
vt 0.526837 0.561436
vt 0.525802 0.562405
vt 0.526922 0.532534
vt 0.527957 0.531566
vt 0.529626 0.520252
vt 0.530662 0.519284
vt 0.261228 0.519548
vt 0.262254 0.520518
vt 0.260242 0.532918
vt 0.259216 0.531948
vt 0.259409 0.562836
vt 0.258382 0.561866
vt 0.260242 0.592746
vt 0.259216 0.591777
vt 0.262254 0.605128
vt 0.261228 0.604158
vt 0.737396 0.137634
vt 0.745741 0.166619
vt 0.745741 0.196863
vt 0.737396 0.210649
vt 0.725595 0.199902
vt 0.717250 0.170917
vt 0.717250 0.140673
vt 0.725595 0.126887
vt 0.530662 0.603896
vt 0.529626 0.604865
vt 0.526922 0.592365
vt 0.527957 0.591397
vt 0.401848 0.734172
vt 0.393503 0.763157
vt 0.381702 0.773903
vt 0.373357 0.760116
vt 0.373357 0.729872
vt 0.381702 0.700888
vt 0.393503 0.690141
vt 0.401848 0.703928
vt 0.994427 0.211965
vt 0.996089 0.839044
vt 0.994823 0.839036
vt 0.993161 0.211957
vt 0.998881 0.838070
vt 0.998881 0.210879
vt 1.000000 0.211936
vt 1.000000 0.839128
vt 0.997751 0.210879
vt 0.997355 0.837960
vt 0.996089 0.837970
vt 0.996485 0.210889
vt 0.998881 0.210879
vt 0.998881 0.838089
vt 0.997751 0.839145
vt 0.997751 0.211935
vt 0.993557 0.210879
vt 0.994823 0.210887
vt 0.997751 0.839037
vt 0.996485 0.839048
vt 0.419228 0.746897
vt 0.407978 0.755091
vt 0.407978 0.706561
vt 0.419228 0.698367
vt 0.698133 0.347193
vt 0.699215 0.312870
vt 0.717830 0.331470
vt 0.749646 0.231355
vt 0.749881 0.265758
vt 0.716748 0.365793
vt 0.527891 0.514099
vt 0.526949 0.479752
vt 0.532082 0.484937
vt 0.533024 0.519284
vt 0.494398 0.414124
vt 0.474975 0.432859
vt 0.474033 0.398513
vt 0.493456 0.379778
vt 0.729140 0.108574
vt 0.729140 0.007234
vt 0.740514 0.000000
vt 0.740514 0.101340
vt 0.714070 0.736164
vt 0.691363 0.739897
vt 0.691363 0.728510
vt 0.714070 0.724777
vt 0.889098 0.635769
vt 0.894914 0.632147
vt 0.914094 0.858058
vt 0.908277 0.861681
vt 0.863881 0.436785
vt 0.869749 0.440407
vt 0.889098 0.861661
vt 0.883230 0.858039
vt 0.531090 0.632539
vt 0.525802 0.634527
vt 0.525802 0.606852
vt 0.531090 0.604865
vt 0.908277 0.214502
vt 0.914094 0.210879
vt 0.782198 0.435213
vt 0.789035 0.856782
vt 0.761467 0.857408
vt 0.754630 0.435839
vt 0.823417 0.211502
vt 0.816603 0.633071
vt 0.789035 0.632448
vt 0.795849 0.210879
vt 0.717250 0.014459
vt 0.717250 0.014459
vt 0.740514 0.000000
vt 0.974576 0.259453
vt 0.973975 0.225057
vt 0.992560 0.210879
vt 0.993161 0.245275
vt 0.753548 0.260468
vt 0.754630 0.719567
vt 0.749646 0.724777
vt 0.746721 0.223758
vt 0.742617 0.216089
vt 0.747601 0.210879
vt 0.754630 0.226145
vt 0.992000 0.730186
vt 0.969399 0.723737
vt 0.970561 0.718371
vt 0.993161 0.724820
vt 0.527891 0.000000
vt 0.533024 0.005185
vt 0.345667 0.978998
vt 0.334150 0.971992
vt 0.322117 0.965006
vt 0.323063 0.505903
vt 0.345667 0.499455
vt 0.061471 0.735801
vt 0.084178 0.739534
vt 0.084178 0.750921
vt 0.061471 0.747188
vt 0.061402 0.723899
vt 0.084109 0.727632
vt 0.717250 0.115799
vt 0.756487 0.007782
vt 0.751525 0.109002
vt 0.740514 0.101220
vt 0.745477 0.000000
vt 0.763052 0.015426
vt 0.763052 0.116800
vt 0.714001 0.748065
vt 0.691294 0.751799
vt 0.217065 0.543224
vt 0.229350 0.547359
vt 0.239504 0.600770
vt 0.227219 0.596635
vt 0.273697 0.117994
vt 0.274601 0.083610
vt 0.300568 0.103478
vt 0.341486 0.004919
vt 0.340582 0.039303
vt 0.299664 0.137862
vt 0.256530 0.514540
vt 0.255685 0.480181
vt 0.262080 0.485189
vt 0.262925 0.519548
vt 0.217130 0.415552
vt 0.192246 0.435023
vt 0.191402 0.400664
vt 0.216286 0.381193
vt 0.788994 0.009371
vt 0.788994 0.112674
vt 0.780519 0.121944
vt 0.780519 0.018640
vt 0.244691 0.719359
vt 0.229677 0.694175
vt 0.241808 0.691006
vt 0.256822 0.716189
vt 0.797976 0.103304
vt 0.797976 0.103304
vt 0.780519 0.121944
vt 0.947478 0.258507
vt 0.947551 0.224056
vt 0.969399 0.210879
vt 0.969325 0.245330
vt 0.347253 0.034384
vt 0.348156 0.494536
vt 0.341486 0.499455
vt 0.256822 0.663851
vt 0.256859 0.653076
vt 0.256822 0.642815
vt 0.262650 0.638760
vt 0.262651 0.659797
vt 0.348156 0.000000
vt 0.964146 0.731052
vt 0.943734 0.723818
vt 0.948987 0.718813
vt 0.969399 0.726048
vt 0.256530 0.000000
vt 0.262925 0.005008
vt 0.489132 1.000000
vt 0.478463 0.993392
vt 0.467279 0.986825
vt 0.468717 0.526520
vt 0.489132 0.519284
vt 0.246593 0.523683
vt 0.258382 0.527964
vt 0.241139 0.551640
vt 0.234309 0.519548
vt 0.797976 0.000000
vt 0.772039 0.112663
vt 0.772039 0.009368
vt 0.780519 0.018635
vt 0.780519 0.121930
vt 0.763052 0.103295
vt 0.763052 0.000000
vt 0.232080 0.722337
vt 0.217065 0.697153
vt 0.531090 0.664189
vt 0.525802 0.662201
vt 0.525802 0.634527
vt 0.531090 0.636514
vt 0.823417 0.857402
vt 0.795849 0.856779
vt 0.761467 0.211505
vt 0.789035 0.210879
vt 0.883230 0.210879
vt 0.889098 0.214501
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.251293 0.605051
vt 0.258382 0.638760
vt 0.246593 0.634479
vt 0.234309 0.630343
vt 0.262925 0.062943
vt 0.263829 0.028558
vt 0.181248 0.489979
vt 0.180404 0.455620
vt 0.244691 0.641929
vt 0.256822 0.638760
vt 0.232080 0.644908
vt 0.348156 0.724456
vt 0.350583 0.690141
vt 0.361712 0.697753
vt 0.373357 0.705372
vt 0.370930 0.739687
vt 0.359285 0.732067
vt 0.361712 0.780537
vt 0.350583 0.772925
vt 0.429961 0.738737
vt 0.429961 0.690207
vt 0.691294 0.298430
vt 0.692376 0.264107
vt 0.468221 0.481611
vt 0.467279 0.447264
vt 0.373357 0.788156
vn -0.2010 0.1511 0.9679
vn -0.9796 -0.0310 -0.1986
vn 0.2010 -0.1511 -0.9679
vn 0.9796 0.0310 0.1986
vn -0.0000 -0.9880 0.1543
vn -0.0000 0.9880 -0.1543
vn -0.9796 0.0310 0.1986
vn -0.2010 -0.1511 -0.9679
vn 0.2010 0.1511 0.9679
vn 0.9796 -0.0310 -0.1986
vn 0.0000 -0.6153 0.7883
vn -1.0000 -0.0000 0.0000
vn 0.0000 0.6153 -0.7883
vn 1.0000 0.0000 -0.0000
vn 0.0000 -0.7883 -0.6153
vn 0.0000 0.7883 0.6153
vn 0.0000 0.0000 1.0000
vn 0.0000 -0.0000 -1.0000
vn -0.0000 -1.0000 -0.0000
vn -0.0000 1.0000 0.0000
vn -0.9239 -0.3827 -0.0000
vn -0.3827 -0.9239 0.0000
vn 0.3827 -0.9239 -0.0000
vn 0.9239 -0.3827 -0.0000
vn 0.9239 0.3827 0.0000
vn 0.3827 0.9239 0.0000
vn -0.3827 0.9239 -0.0000
vn -0.9239 0.3827 0.0000
vn 0.0273 0.6520 -0.7577
vn -0.9793 -0.0575 -0.1940
vn 0.9562 0.1752 0.2343
vn 0.9614 0.1771 0.2106
vn 0.3279 -0.9076 -0.2623
vn -0.1732 0.9325 -0.3170
vn 0.0000 -0.9645 0.2639
vn -0.0000 0.2639 0.9645
vn 0.0000 -0.2639 -0.9645
vn 0.0000 0.7053 -0.7089
vn 0.3012 0.0944 -0.9489
vn -0.9088 -0.0550 -0.4135
vn -0.3003 0.9484 -0.1018
vn -0.9097 0.0325 -0.4139
vn -0.0418 -0.9991 -0.0102
vn 0.9652 0.1118 0.2365
vn -0.2303 -0.2363 0.9440
vn 0.2576 0.2358 -0.9370
vn 0.1732 -0.9325 0.3170
vn 0.1661 -0.9343 0.3153
vn 0.3146 -0.9114 -0.2653
vn -0.3279 0.9076 0.2623
vn -0.3872 0.8914 0.2355
vn -0.1661 0.9343 -0.3153
vn 0.0410 0.7775 -0.6275
vn -0.9614 0.1771 0.2106
vn 0.9562 -0.1752 -0.2343
vn 0.9614 -0.1771 -0.2106
vn 0.3279 0.9076 0.2623
vn -0.1732 -0.9325 0.3170
vn -0.0001 -0.7054 0.7089
vn 0.2407 -0.0834 0.9670
vn -0.9647 0.1165 0.2364
vn -0.2490 -0.9668 0.0583
vn -0.9562 0.1752 0.2343
vn -0.0418 0.9991 0.0102
vn 0.9652 -0.1118 -0.2365
vn -0.2303 0.2363 -0.9440
vn 0.2302 -0.2365 0.9440
vn 0.1732 0.9325 -0.3170
vn 0.1661 0.9343 -0.3153
vn 0.3146 0.9114 0.2653
vn -0.3279 -0.9076 -0.2623
vn -0.3146 -0.9114 -0.2653
vn -0.1661 -0.9343 0.3153
vn 0.0000 0.9645 -0.2639
vn 0.0000 -0.7913 -0.6115
vn -0.0000 0.7913 0.6115
vn -0.2407 0.0834 -0.9670
vn -0.9689 0.1926 -0.1555
vn 0.9689 -0.1926 0.1555
vn -0.0430 -0.7775 0.6275
vn -0.0410 -0.7775 0.6275
vn 0.0430 0.7775 -0.6275
vn -0.2407 -0.0834 0.9670
vn -0.0286 -0.6520 0.7577
vn 0.0286 0.6520 -0.7577
vn -0.9554 -0.1926 0.2239
vn 0.9554 0.1926 -0.2239
vn -0.0273 -0.6520 0.7577
usemtl Material.001
s off
f 1/1/1 2/2/1 4/3/1 3/4/1
f 3/5/2 4/6/2 8/7/2 7/8/2
f 7/9/3 8/10/3 6/11/3 5/12/3
f 5/13/4 6/14/4 2/15/4 1/16/4
f 3/17/5 7/18/5 5/19/5 1/20/5
f 8/21/6 4/22/6 2/23/6 6/24/6
f 13/25/7 12/26/7 16/27/7 9/28/7
f 15/29/8 14/30/8 12/31/8 13/32/8
f 9/33/9 16/34/9 10/35/9 11/36/9
f 11/37/10 10/38/10 14/39/10 15/40/10
f 13/41/6 9/42/6 11/43/6 15/44/6
f 16/45/6 10/46/6 14/47/6 12/48/6
f 17/49/11 18/50/11 20/51/11 19/52/11
f 19/53/12 20/54/12 24/55/12 23/56/12
f 23/57/13 24/58/13 22/59/13 21/60/13
f 21/61/14 22/62/14 18/63/14 17/64/14
f 19/65/15 23/57/15 21/60/15 17/66/15
f 24/67/16 20/51/16 18/50/16 22/68/16
f 25/69/17 26/70/17 28/71/17 27/72/17
f 27/73/12 28/74/12 32/75/12 31/76/12
f 31/77/18 32/78/18 30/79/18 29/80/18
f 29/81/14 30/82/14 26/83/14 25/84/14
f 27/85/19 31/77/19 29/80/19 25/86/19
f 32/87/20 28/71/20 26/70/20 30/88/20
f 33/89/17 34/90/17 36/91/17 35/92/17
f 35/93/12 36/94/12 40/95/12 39/96/12
f 39/97/18 40/98/18 38/99/18 37/100/18
f 37/101/14 38/102/14 34/103/14 33/104/14
f 35/105/19 39/97/19 37/100/19 33/106/19
f 40/107/20 36/91/20 34/90/20 38/108/20
f 41/109/17 42/110/17 44/111/17 43/112/17
f 43/113/12 44/114/12 48/115/12 47/116/12
f 47/117/18 48/118/18 46/119/18 45/120/18
f 45/121/14 46/122/14 42/123/14 41/124/14
f 43/125/19 47/117/19 45/120/19 41/126/19
f 48/127/20 44/111/20 42/110/20 46/128/20
f 49/129/21 50/130/21 52/131/21 51/132/21
f 51/132/22 52/131/22 54/133/22 53/134/22
f 53/135/23 54/136/23 56/137/23 55/138/23
f 55/138/24 56/137/24 58/139/24 57/140/24
f 57/140/25 58/139/25 60/141/25 59/142/25
f 59/142/26 60/141/26 62/143/26 61/144/26
f 52/145/18 50/146/18 64/147/18 62/148/18 60/149/18 58/150/18 56/151/18 54/152/18
f 61/153/27 62/154/27 64/155/27 63/156/27
f 63/156/28 64/155/28 50/130/28 49/129/28
f 49/157/17 51/158/17 53/159/17 55/160/17 57/161/17 59/162/17 61/163/17 63/164/17
f 65/165/17 66/166/17 68/167/17 67/168/17
f 67/169/14 68/170/14 72/171/14 71/172/14
f 71/173/18 72/174/18 70/175/18 69/176/18
f 69/177/12 70/178/12 66/179/12 65/180/12
f 67/168/20 71/181/20 69/182/20 65/165/20
f 72/174/19 68/183/19 66/184/19 70/175/19
f 104/185/29 76/186/29 170/187/29 172/188/29
f 75/189/30 76/190/30 105/191/30 80/192/30 79/193/30 100/194/30
f 78/195/31 77/196/31 91/197/31 92/198/31
f 77/196/32 78/195/32 107/199/32 74/200/32 73/201/32 102/202/32
f 103/203/33 101/204/33 77/205/33 102/206/33
f 108/207/34 104/208/34 74/209/34 107/210/34
f 81/211/14 82/212/14 138/213/14 137/214/14
f 83/215/12 84/216/12 88/217/12 87/218/12
f 87/219/35 88/220/35 86/221/35 85/222/35
f 85/223/14 86/224/14 82/212/14 81/211/14
f 83/225/36 87/226/36 85/227/36 81/228/36
f 88/229/37 84/230/37 82/231/37 86/232/37
f 77/205/38 101/204/38 79/233/38 90/234/38 89/235/38
f 93/236/39 94/237/39 92/238/39 91/239/39
f 79/193/40 93/240/40 98/241/40 96/242/40
f 80/192/41 106/243/41 78/244/41 92/245/41 94/246/41
f 79/193/42 80/192/42 94/246/42 93/240/42
f 95/247/43 96/248/43 98/249/43 97/250/43
f 91/197/44 77/196/44 95/251/44 97/252/44
f 77/253/45 101/254/45 79/255/45 96/256/45 95/257/45
f 93/236/46 91/239/46 97/250/46 98/249/46
f 99/258/47 103/259/47 102/260/47 73/261/47
f 75/262/48 100/263/48 103/259/48 99/258/48
f 100/264/49 79/233/49 101/204/49 103/203/49
f 106/265/50 108/266/50 107/267/50 78/268/50
f 80/269/51 105/270/51 108/266/51 106/265/51
f 105/271/52 76/272/52 104/208/52 108/207/52
f 111/273/53 127/274/53 165/275/53 163/276/53
f 111/277/54 112/278/54 133/279/54 116/280/54 115/281/54 128/282/54
f 114/283/55 113/284/55 119/285/55 120/286/55
f 113/284/56 114/283/56 135/287/56 110/288/56 109/289/56 130/290/56
f 131/291/57 129/292/57 113/293/57 130/294/57
f 136/295/58 132/296/58 110/297/58 135/298/58
f 113/293/59 129/292/59 115/299/59 118/300/59 117/301/59
f 121/302/60 122/303/60 120/304/60 119/305/60
f 115/281/61 121/306/61 126/307/61 124/308/61
f 116/309/62 134/310/62 114/311/62 120/312/62 122/313/62
f 115/281/63 116/280/63 122/314/63 121/306/63
f 123/315/64 124/316/64 126/317/64 125/318/64
f 119/285/65 113/284/65 123/319/65 125/320/65
f 113/321/66 129/322/66 115/323/66 124/324/66 123/325/66
f 121/302/67 119/305/67 125/318/67 126/317/67
f 127/274/68 131/326/68 130/327/68 109/328/68
f 111/273/69 128/329/69 131/326/69 127/274/69
f 128/330/70 115/299/70 129/292/70 131/291/70
f 134/331/71 136/332/71 135/333/71 114/334/71
f 116/335/72 133/336/72 136/332/72 134/331/72
f 133/337/73 112/338/73 132/296/73 136/295/73
f 137/339/74 138/340/74 140/341/74 139/342/74
f 82/231/75 84/230/75 140/343/75 138/344/75
f 83/225/76 81/228/76 137/345/76 139/346/76
f 84/216/12 83/215/12 139/347/12 140/348/12
f 112/349/17 111/350/17 147/351/17 148/352/17
f 109/353/17 110/354/17 146/355/17 145/356/17
f 76/357/17 75/358/17 143/359/17 144/360/17
f 73/361/17 74/362/17 142/363/17 141/364/17
f 148/352/17 147/351/17 159/365/17 160/366/17
f 144/360/17 143/359/17 155/367/17 156/368/17
f 145/356/17 146/355/17 158/369/17 157/370/17
f 141/364/17 142/363/17 154/371/17 153/372/17
f 161/373/77 162/374/77 166/375/77 164/376/77 163/276/77 165/275/77
f 112/278/78 111/277/78 163/377/78 164/378/78
f 109/289/79 110/288/79 162/379/79 161/380/79
f 110/297/80 132/296/80 166/381/80 162/382/80
f 132/296/81 112/338/81 164/383/81 166/381/81
f 127/274/82 109/328/82 161/373/82 165/275/82
f 167/384/83 168/385/83 172/386/83 170/387/83 169/388/83 171/389/83
f 99/390/84 73/391/84 167/384/84 171/389/84
f 74/392/85 104/185/85 172/188/85 168/393/85
f 76/190/86 75/189/86 169/394/86 170/395/86
f 73/201/87 74/200/87 168/396/87 167/397/87
f 75/398/88 99/390/88 171/389/88 169/388/88
l 132 152
l 104 150
l 127 151
l 99 149

View File

@@ -1,826 +0,0 @@
# Blender v2.79 (sub 0) OBJ File: 'torret2.blend'
# www.blender.org
mtllib torret2.mtl
o Cube.003_Cube.006
v 0.189895 0.163143 -0.372653
v 0.189895 0.201097 -0.378580
v 0.080336 0.159674 -0.394870
v 0.080336 0.197628 -0.400796
v 0.242297 0.123751 -0.624923
v 0.242297 0.161705 -0.630850
v 0.132738 0.120282 -0.647140
v 0.132738 0.158236 -0.653066
v -0.132041 0.120282 -0.647140
v -0.241600 0.161705 -0.630850
v -0.241600 0.123751 -0.624923
v -0.079638 0.197628 -0.400796
v -0.079638 0.159674 -0.394870
v -0.189198 0.201097 -0.378580
v -0.189198 0.163143 -0.372653
v -0.132041 0.158236 -0.653066
v 0.063142 0.001380 0.512074
v 0.063142 0.035815 0.538953
v -0.064046 0.001380 0.512074
v -0.064046 0.035815 0.538953
v 0.063142 0.183763 0.278415
v 0.063142 0.218199 0.305294
v -0.064046 0.183763 0.278415
v -0.064046 0.218199 0.305294
v -0.286162 0.274292 0.122505
v -0.286162 0.815413 0.122505
v -0.347493 0.274292 0.122505
v -0.347493 0.815413 0.122505
v -0.286162 0.274292 -0.191426
v -0.286162 0.815413 -0.191426
v -0.347493 0.274292 -0.191426
v -0.347493 0.815413 -0.191426
v 0.128914 0.144853 0.197599
v 0.128914 0.944853 0.197599
v -0.133743 0.144853 0.197599
v -0.133743 0.944853 0.197599
v 0.128913 0.144853 -0.266520
v 0.128914 0.944853 -0.266520
v -0.133743 0.144853 -0.266520
v -0.133743 0.944853 -0.266520
v 0.339758 0.274292 0.122505
v 0.339758 0.815413 0.122505
v 0.278427 0.274292 0.122505
v 0.278427 0.815413 0.122505
v 0.339758 0.274292 -0.191426
v 0.339758 0.815413 -0.191426
v 0.278427 0.274292 -0.191426
v 0.278427 0.815413 -0.191426
v 0.282464 0.419685 0.016073
v 0.282464 0.670021 0.016073
v -0.287293 0.419685 0.016073
v -0.287293 0.670021 0.016073
v 0.282464 0.419685 -0.084994
v 0.282464 0.670021 -0.084994
v -0.287293 0.419685 -0.084994
v -0.287293 0.670021 -0.084994
v -0.058777 0.548149 -0.265845
v -0.058777 0.548149 -0.273879
v -0.043146 0.510413 -0.265845
v -0.043146 0.510413 -0.273879
v -0.005410 0.494783 -0.265845
v -0.005410 0.494783 -0.273879
v 0.032325 0.510413 -0.265845
v 0.032325 0.510413 -0.273879
v 0.047956 0.548149 -0.265845
v 0.047956 0.548149 -0.273879
v 0.032325 0.585884 -0.265845
v 0.032325 0.585884 -0.273879
v -0.005410 0.601515 -0.265845
v -0.005410 0.601515 -0.273879
v -0.043146 0.585884 -0.265845
v -0.043146 0.585884 -0.273879
v -0.000109 0.149264 -0.268848
v -0.000109 0.940441 -0.268848
v -0.004799 0.149264 -0.268848
v -0.004799 0.940441 -0.268848
v -0.000109 0.149264 -0.260088
v -0.000109 0.940441 -0.260088
v -0.004799 0.149264 -0.260088
v -0.004799 0.940441 -0.260088
v 0.119911 0.086846 -0.114011
v 0.111512 0.130445 -0.112341
v 0.038877 0.064643 -0.136101
v 0.030478 0.108242 -0.134431
v 0.209056 0.123944 -0.552177
v 0.200657 0.167543 -0.550507
v 0.128022 0.101741 -0.574268
v 0.138016 0.145340 -0.572597
v 0.048662 0.033870 0.495340
v 0.048662 0.022144 0.452483
v -0.053491 0.033870 0.495340
v -0.053491 0.022144 0.452483
v 0.048662 -0.476361 0.634943
v 0.048662 -0.488087 0.592086
v -0.053491 -0.476361 0.634943
v -0.053491 -0.488087 0.592086
v 0.209056 0.123944 -0.552177
v 0.128022 0.101741 -0.574268
v 0.219790 0.123944 -0.595985
v 0.211391 0.167543 -0.594315
v 0.157149 0.101741 -0.618075
v 0.148750 0.145340 -0.616405
v 0.312716 -0.500601 -0.680111
v 0.231681 -0.496988 -0.702201
v 0.323449 -0.500601 -0.723919
v 0.242415 -0.496988 -0.746009
v 0.080352 0.075744 -0.125056
v 0.094276 0.014385 -0.314219
v 0.169496 0.112843 -0.563222
v 0.175310 0.036588 -0.292129
v 0.135751 0.025487 -0.303174
v 0.071953 0.119343 -0.123386
v 0.085877 0.057984 -0.312549
v 0.161097 0.156442 -0.561552
v 0.166911 0.080187 -0.290458
v 0.127351 0.069086 -0.301503
v -0.124589 0.086846 -0.114011
v -0.116189 0.130445 -0.112341
v -0.043554 0.064643 -0.136101
v -0.035155 0.108242 -0.134431
v -0.213733 0.123944 -0.552177
v -0.205334 0.167543 -0.550507
v -0.132699 0.101741 -0.574268
v -0.124300 0.145340 -0.572597
v -0.213733 0.123944 -0.552177
v -0.132699 0.101741 -0.574268
v -0.224467 0.123944 -0.595985
v -0.216068 0.167543 -0.594315
v -0.143433 0.101741 -0.618075
v -0.135034 0.145340 -0.616405
v -0.317393 -0.500601 -0.680111
v -0.236359 -0.496988 -0.702201
v -0.328127 -0.500601 -0.723919
v -0.247093 -0.496988 -0.746009
v -0.085029 0.075744 -0.125056
v -0.098953 0.014385 -0.314219
v -0.174174 0.112843 -0.563222
v -0.179988 0.036588 -0.292129
v -0.140428 0.025487 -0.303174
v -0.076630 0.119343 -0.123386
v -0.090554 0.057984 -0.312549
v -0.165774 0.156442 -0.561552
v -0.171588 0.080187 -0.290458
v -0.132029 0.069086 -0.301504
v 0.048662 0.269229 0.190763
v 0.048662 0.257503 0.147906
v -0.053491 0.269229 0.190763
v -0.053491 0.257503 0.147906
v 0.119911 0.086846 -0.114011
v 0.111512 0.130445 -0.112341
v 0.038877 0.064643 -0.136101
v 0.030478 0.108242 -0.134431
v -0.124589 0.086846 -0.114011
v -0.116189 0.130445 -0.112341
v -0.043554 0.064643 -0.136101
v -0.035155 0.108242 -0.134431
v 0.080352 0.075744 -0.125056
v 0.071953 0.119343 -0.123386
v -0.085029 0.075744 -0.125056
v -0.076630 0.119343 -0.123386
v 0.119911 0.086846 -0.114011
v 0.111512 0.130445 -0.112341
v 0.038877 0.064643 -0.136101
v 0.030478 0.108242 -0.134431
v -0.124589 0.086846 -0.114011
v -0.116189 0.130445 -0.112341
v -0.043554 0.064643 -0.136101
v -0.035155 0.108242 -0.134431
v -0.124589 0.171454 -0.009180
v -0.116189 0.215053 -0.007510
v -0.043554 0.149251 -0.031270
v -0.035155 0.192850 -0.029600
v -0.085029 0.160352 -0.020225
v -0.076630 0.203951 -0.018555
v 0.119911 0.157397 -0.053308
v 0.111512 0.200996 -0.051637
v 0.038877 0.135194 -0.075398
v 0.030478 0.178793 -0.073728
v 0.080352 0.146295 -0.064353
v 0.071953 0.189894 -0.062682
vt 0.489132 0.748949
vt 0.489132 0.718137
vt 0.519717 0.718145
vt 0.519717 0.748957
vt 0.090171 0.693043
vt 0.090171 0.723854
vt 0.061402 0.723899
vt 0.061402 0.693087
vt 0.210985 0.718395
vt 0.210985 0.749207
vt 0.180404 0.749215
vt 0.180404 0.718403
vt 0.246514 0.722337
vt 0.246514 0.753149
vt 0.217065 0.753184
vt 0.217065 0.722372
vt 0.000000 0.693043
vt 0.030701 0.693043
vt 0.030701 0.723855
vt 0.000000 0.723855
vt 0.030701 0.693043
vt 0.061402 0.693043
vt 0.061402 0.723855
vt 0.030701 0.723855
vt 0.113868 0.693092
vt 0.144569 0.693034
vt 0.144569 0.729449
vt 0.113868 0.729507
vt 0.028567 0.723863
vt 0.028567 0.754674
vt 0.000000 0.754666
vt 0.000000 0.723855
vt 0.057131 0.723855
vt 0.057131 0.754666
vt 0.028567 0.754674
vt 0.028567 0.723863
vt 0.144569 0.693102
vt 0.175270 0.693034
vt 0.175270 0.728196
vt 0.144569 0.728264
vt 0.113868 0.693034
vt 0.113868 0.733059
vt 0.090234 0.749387
vt 0.090234 0.709362
vt 0.453595 0.706535
vt 0.429961 0.690207
vt 0.429961 0.730233
vt 0.453595 0.746561
vt 0.491495 0.718137
vt 0.489132 0.694236
vt 0.523439 0.692892
vt 0.525802 0.716793
vt 0.690895 0.620228
vt 0.683350 0.597128
vt 0.683350 0.421757
vt 0.690895 0.444858
vt 0.180404 0.543450
vt 0.182758 0.519548
vt 0.217065 0.520887
vt 0.214711 0.544789
vt 0.797976 0.023111
vt 0.805454 0.000000
vt 0.805454 0.175364
vt 0.797976 0.198475
vt 0.182758 0.717056
vt 0.217065 0.718395
vt 0.525802 0.519284
vt 0.491495 0.520628
vt 0.666799 0.889843
vt 0.653710 0.461156
vt 0.670262 0.460793
vt 0.683350 0.889480
vt 0.573487 0.421757
vt 0.573487 0.850735
vt 0.533024 0.888570
vt 0.533024 0.459592
vt 0.292521 0.928144
vt 0.305565 0.499455
vt 0.322117 0.499817
vt 0.309072 0.928506
vt 0.613599 0.850721
vt 0.613599 0.421757
vt 0.653710 0.459650
vt 0.653710 0.888614
vt 0.305565 0.967176
vt 0.322117 0.967538
vt 0.683350 0.421757
vt 0.666799 0.422120
vt 0.019350 0.693043
vt 0.000000 0.059266
vt 0.070884 0.057711
vt 0.090234 0.691487
vt 0.348156 0.690141
vt 0.348156 0.055936
vt 0.407978 0.000000
vt 0.407978 0.634205
vt 0.090234 0.633779
vt 0.109519 0.000000
vt 0.180404 0.001550
vt 0.161119 0.635328
vt 0.407978 0.634186
vt 0.407978 0.000000
vt 0.467279 0.056021
vt 0.467279 0.690207
vt 0.109519 0.691484
vt 0.180404 0.693034
vt 0.090234 0.000000
vt 0.019350 0.001555
vt 0.927182 0.678965
vt 0.914094 0.250278
vt 0.930645 0.249915
vt 0.943734 0.678602
vt 0.863881 0.210879
vt 0.863881 0.639856
vt 0.823417 0.677691
vt 0.823417 0.248714
vt 0.262925 0.928144
vt 0.275969 0.499455
vt 0.292521 0.499817
vt 0.279476 0.928506
vt 0.573487 0.850721
vt 0.573487 0.421757
vt 0.613599 0.459650
vt 0.613599 0.888614
vt 0.275969 0.967176
vt 0.292521 0.967538
vt 0.943734 0.210879
vt 0.927182 0.211242
vt 0.534758 0.210879
vt 0.533024 0.012472
vt 0.686823 0.012472
vt 0.688558 0.210879
vt 0.704336 0.000000
vt 0.704336 0.198456
vt 0.691310 0.210636
vt 0.691310 0.012181
vt 0.691294 0.223350
vt 0.689565 0.421757
vt 0.535765 0.421757
vt 0.537495 0.223350
vt 0.717250 0.012199
vt 0.717250 0.210649
vt 0.704336 0.198450
vt 0.704336 0.000000
vt 0.686823 0.210879
vt 0.533024 0.210879
vt 0.691310 0.000000
vt 0.537510 0.000000
vt 0.526837 0.561436
vt 0.525802 0.562405
vt 0.526922 0.532534
vt 0.527957 0.531566
vt 0.529626 0.520252
vt 0.530662 0.519284
vt 0.261228 0.519548
vt 0.262254 0.520518
vt 0.260242 0.532918
vt 0.259216 0.531948
vt 0.259409 0.562836
vt 0.258382 0.561866
vt 0.260242 0.592746
vt 0.259216 0.591777
vt 0.262254 0.605128
vt 0.261228 0.604158
vt 0.737396 0.137634
vt 0.745741 0.166619
vt 0.745741 0.196863
vt 0.737396 0.210649
vt 0.725595 0.199902
vt 0.717250 0.170917
vt 0.717250 0.140673
vt 0.725595 0.126887
vt 0.530662 0.603896
vt 0.529626 0.604865
vt 0.526922 0.592365
vt 0.527957 0.591397
vt 0.401848 0.734172
vt 0.393503 0.763157
vt 0.381702 0.773903
vt 0.373357 0.760116
vt 0.373357 0.729872
vt 0.381702 0.700888
vt 0.393503 0.690141
vt 0.401848 0.703928
vt 0.994427 0.211965
vt 0.996089 0.839044
vt 0.994823 0.839036
vt 0.993161 0.211957
vt 0.998881 0.838070
vt 0.998881 0.210879
vt 1.000000 0.211936
vt 1.000000 0.839128
vt 0.997751 0.210879
vt 0.997355 0.837960
vt 0.996089 0.837970
vt 0.996485 0.210889
vt 0.998881 0.210879
vt 0.998881 0.838089
vt 0.997751 0.839145
vt 0.997751 0.211935
vt 0.993557 0.210879
vt 0.994823 0.210887
vt 0.997751 0.839037
vt 0.996485 0.839048
vt 0.419228 0.746897
vt 0.407978 0.755091
vt 0.407978 0.706561
vt 0.419228 0.698367
vt 0.698133 0.347193
vt 0.699215 0.312870
vt 0.717830 0.331470
vt 0.749646 0.231355
vt 0.749881 0.265758
vt 0.716748 0.365793
vt 0.527891 0.514099
vt 0.526949 0.479752
vt 0.532082 0.484937
vt 0.533024 0.519284
vt 0.494398 0.414124
vt 0.474975 0.432859
vt 0.474033 0.398513
vt 0.493456 0.379778
vt 0.729140 0.108574
vt 0.729140 0.007234
vt 0.740514 0.000000
vt 0.740514 0.101340
vt 0.714070 0.736164
vt 0.691363 0.739897
vt 0.691363 0.728510
vt 0.714070 0.724777
vt 0.889098 0.635769
vt 0.894914 0.632147
vt 0.914094 0.858058
vt 0.908277 0.861681
vt 0.863881 0.436785
vt 0.869749 0.440407
vt 0.889098 0.861661
vt 0.883230 0.858039
vt 0.531090 0.632539
vt 0.525802 0.634527
vt 0.525802 0.606852
vt 0.531090 0.604865
vt 0.908277 0.214502
vt 0.914094 0.210879
vt 0.782198 0.435213
vt 0.789035 0.856782
vt 0.761467 0.857408
vt 0.754630 0.435839
vt 0.823417 0.211502
vt 0.816603 0.633071
vt 0.789035 0.632448
vt 0.795849 0.210879
vt 0.717250 0.014459
vt 0.717250 0.014459
vt 0.740514 0.000000
vt 0.974576 0.259453
vt 0.973975 0.225057
vt 0.992560 0.210879
vt 0.993161 0.245275
vt 0.753548 0.260468
vt 0.754630 0.719567
vt 0.749646 0.724777
vt 0.746721 0.223758
vt 0.742617 0.216089
vt 0.747601 0.210879
vt 0.754630 0.226145
vt 0.992000 0.730186
vt 0.969399 0.723737
vt 0.970561 0.718371
vt 0.993161 0.724820
vt 0.527891 0.000000
vt 0.533024 0.005185
vt 0.345667 0.978998
vt 0.334150 0.971992
vt 0.322117 0.965006
vt 0.323063 0.505903
vt 0.345667 0.499455
vt 0.061471 0.735801
vt 0.084178 0.739534
vt 0.084178 0.750921
vt 0.061471 0.747188
vt 0.061402 0.723899
vt 0.084109 0.727632
vt 0.717250 0.115799
vt 0.756487 0.007782
vt 0.751525 0.109002
vt 0.740514 0.101220
vt 0.745477 0.000000
vt 0.763052 0.015426
vt 0.763052 0.116800
vt 0.714001 0.748065
vt 0.691294 0.751799
vt 0.217065 0.543224
vt 0.229350 0.547359
vt 0.239504 0.600770
vt 0.227219 0.596635
vt 0.273697 0.117994
vt 0.274601 0.083610
vt 0.300568 0.103478
vt 0.341486 0.004919
vt 0.340582 0.039303
vt 0.299664 0.137862
vt 0.256530 0.514540
vt 0.255685 0.480181
vt 0.262080 0.485189
vt 0.262925 0.519548
vt 0.217130 0.415552
vt 0.192246 0.435023
vt 0.191402 0.400664
vt 0.216286 0.381193
vt 0.788994 0.009371
vt 0.788994 0.112674
vt 0.780519 0.121944
vt 0.780519 0.018640
vt 0.244691 0.719359
vt 0.229677 0.694175
vt 0.241808 0.691006
vt 0.256822 0.716189
vt 0.797976 0.103304
vt 0.797976 0.103304
vt 0.780519 0.121944
vt 0.947478 0.258507
vt 0.947551 0.224056
vt 0.969399 0.210879
vt 0.969325 0.245330
vt 0.347253 0.034384
vt 0.348156 0.494536
vt 0.341486 0.499455
vt 0.256822 0.663851
vt 0.256859 0.653076
vt 0.256822 0.642815
vt 0.262650 0.638760
vt 0.262651 0.659797
vt 0.348156 0.000000
vt 0.964146 0.731052
vt 0.943734 0.723818
vt 0.948987 0.718813
vt 0.969399 0.726048
vt 0.256530 0.000000
vt 0.262925 0.005008
vt 0.489132 1.000000
vt 0.478463 0.993392
vt 0.467279 0.986825
vt 0.468717 0.526520
vt 0.489132 0.519284
vt 0.246593 0.523683
vt 0.258382 0.527964
vt 0.241139 0.551640
vt 0.234309 0.519548
vt 0.797976 0.000000
vt 0.772039 0.112663
vt 0.772039 0.009368
vt 0.780519 0.018635
vt 0.780519 0.121930
vt 0.763052 0.103295
vt 0.763052 0.000000
vt 0.232080 0.722337
vt 0.217065 0.697153
vt 0.531090 0.664189
vt 0.525802 0.662201
vt 0.525802 0.634527
vt 0.531090 0.636514
vt 0.823417 0.857402
vt 0.795849 0.856779
vt 0.761467 0.211505
vt 0.789035 0.210879
vt 0.883230 0.210879
vt 0.889098 0.214501
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.251293 0.605051
vt 0.258382 0.638760
vt 0.246593 0.634479
vt 0.234309 0.630343
vt 0.262925 0.062943
vt 0.263829 0.028558
vt 0.181248 0.489979
vt 0.180404 0.455620
vt 0.244691 0.641929
vt 0.256822 0.638760
vt 0.232080 0.644908
vt 0.348156 0.724456
vt 0.350583 0.690141
vt 0.361712 0.697753
vt 0.373357 0.705372
vt 0.370930 0.739687
vt 0.359285 0.732067
vt 0.361712 0.780537
vt 0.350583 0.772925
vt 0.429961 0.738737
vt 0.429961 0.690207
vt 0.691294 0.298430
vt 0.692376 0.264107
vt 0.468221 0.481611
vt 0.467279 0.447264
vt 0.373357 0.788156
vn -0.2010 0.1511 0.9679
vn -0.9796 -0.0310 -0.1986
vn 0.2010 -0.1511 -0.9679
vn 0.9796 0.0310 0.1986
vn -0.0000 -0.9880 0.1543
vn -0.0000 0.9880 -0.1543
vn -0.9796 0.0310 0.1986
vn -0.2010 -0.1511 -0.9679
vn 0.2010 0.1511 0.9679
vn 0.9796 -0.0310 -0.1986
vn 0.0000 -0.6153 0.7883
vn -1.0000 -0.0000 0.0000
vn 0.0000 0.6153 -0.7883
vn 1.0000 0.0000 -0.0000
vn 0.0000 -0.7883 -0.6153
vn 0.0000 0.7883 0.6153
vn -0.0000 0.0000 1.0000
vn 0.0000 -0.0000 -1.0000
vn 0.0000 -1.0000 -0.0000
vn -0.0000 1.0000 0.0000
vn -0.9239 -0.3827 -0.0000
vn -0.3827 -0.9239 0.0000
vn 0.3827 -0.9239 -0.0000
vn 0.9239 -0.3827 -0.0000
vn 0.9239 0.3827 0.0000
vn 0.3827 0.9239 0.0000
vn -0.3827 0.9239 -0.0000
vn -0.9239 0.3827 0.0000
vn 0.0273 0.6520 -0.7577
vn -0.9793 -0.0575 -0.1940
vn 0.9562 0.1752 0.2343
vn 0.9614 0.1771 0.2106
vn 0.3279 -0.9076 -0.2623
vn -0.1732 0.9325 -0.3170
vn 0.0000 -0.9645 0.2639
vn -0.0000 0.2639 0.9645
vn 0.0000 -0.2639 -0.9645
vn 0.0000 0.7053 -0.7089
vn 0.3012 0.0944 -0.9489
vn -0.9088 -0.0550 -0.4135
vn -0.3003 0.9484 -0.1018
vn -0.9097 0.0325 -0.4139
vn -0.0418 -0.9991 -0.0102
vn 0.9652 0.1118 0.2365
vn -0.2303 -0.2363 0.9440
vn 0.2576 0.2358 -0.9370
vn 0.1732 -0.9325 0.3170
vn 0.1661 -0.9343 0.3153
vn 0.3146 -0.9114 -0.2653
vn -0.3279 0.9076 0.2623
vn -0.3872 0.8914 0.2355
vn -0.1661 0.9343 -0.3153
vn 0.0410 0.7775 -0.6275
vn -0.9614 0.1771 0.2106
vn 0.9562 -0.1752 -0.2343
vn 0.9614 -0.1771 -0.2106
vn 0.3279 0.9076 0.2623
vn -0.1732 -0.9325 0.3170
vn -0.0001 -0.7054 0.7089
vn 0.2407 -0.0834 0.9670
vn -0.9647 0.1165 0.2364
vn -0.2490 -0.9668 0.0583
vn -0.9562 0.1752 0.2343
vn -0.0418 0.9991 0.0102
vn 0.9652 -0.1118 -0.2365
vn -0.2303 0.2363 -0.9440
vn 0.2302 -0.2365 0.9440
vn 0.1732 0.9325 -0.3170
vn 0.1661 0.9343 -0.3153
vn 0.3146 0.9114 0.2653
vn -0.3279 -0.9076 -0.2623
vn -0.3146 -0.9114 -0.2653
vn -0.1661 -0.9343 0.3153
vn 0.0000 0.9645 -0.2639
vn 0.0000 -0.7913 -0.6115
vn -0.0000 0.7913 0.6115
vn -0.2407 0.0834 -0.9670
vn -0.9689 0.1926 -0.1555
vn 0.9689 -0.1926 0.1555
vn -0.0430 -0.7775 0.6275
vn -0.0410 -0.7775 0.6275
vn 0.0430 0.7775 -0.6275
vn -0.2407 -0.0834 0.9670
vn -0.0286 -0.6520 0.7577
vn 0.0286 0.6520 -0.7577
vn -0.9554 -0.1926 0.2239
vn 0.9554 0.1926 -0.2239
vn -0.0273 -0.6520 0.7577
usemtl Material.001
s off
f 1/1/1 2/2/1 4/3/1 3/4/1
f 3/5/2 4/6/2 8/7/2 7/8/2
f 7/9/3 8/10/3 6/11/3 5/12/3
f 5/13/4 6/14/4 2/15/4 1/16/4
f 3/17/5 7/18/5 5/19/5 1/20/5
f 8/21/6 4/22/6 2/23/6 6/24/6
f 13/25/7 12/26/7 16/27/7 9/28/7
f 15/29/8 14/30/8 12/31/8 13/32/8
f 9/33/9 16/34/9 10/35/9 11/36/9
f 11/37/10 10/38/10 14/39/10 15/40/10
f 13/41/6 9/42/6 11/43/6 15/44/6
f 16/45/6 10/46/6 14/47/6 12/48/6
f 17/49/11 18/50/11 20/51/11 19/52/11
f 19/53/12 20/54/12 24/55/12 23/56/12
f 23/57/13 24/58/13 22/59/13 21/60/13
f 21/61/14 22/62/14 18/63/14 17/64/14
f 19/65/15 23/57/15 21/60/15 17/66/15
f 24/67/16 20/51/16 18/50/16 22/68/16
f 25/69/17 26/70/17 28/71/17 27/72/17
f 27/73/12 28/74/12 32/75/12 31/76/12
f 31/77/18 32/78/18 30/79/18 29/80/18
f 29/81/14 30/82/14 26/83/14 25/84/14
f 27/85/19 31/77/19 29/80/19 25/86/19
f 32/87/20 28/71/20 26/70/20 30/88/20
f 33/89/17 34/90/17 36/91/17 35/92/17
f 35/93/12 36/94/12 40/95/12 39/96/12
f 39/97/18 40/98/18 38/99/18 37/100/18
f 37/101/14 38/102/14 34/103/14 33/104/14
f 35/105/19 39/97/19 37/100/19 33/106/19
f 40/107/20 36/91/20 34/90/20 38/108/20
f 41/109/17 42/110/17 44/111/17 43/112/17
f 43/113/12 44/114/12 48/115/12 47/116/12
f 47/117/18 48/118/18 46/119/18 45/120/18
f 45/121/14 46/122/14 42/123/14 41/124/14
f 43/125/19 47/117/19 45/120/19 41/126/19
f 48/127/20 44/111/20 42/110/20 46/128/20
f 49/129/17 50/130/17 52/131/17 51/132/17
f 51/133/12 52/134/12 56/135/12 55/136/12
f 55/137/18 56/138/18 54/139/18 53/140/18
f 53/141/14 54/142/14 50/143/14 49/144/14
f 51/145/19 55/137/19 53/140/19 49/146/19
f 56/147/20 52/131/20 50/130/20 54/148/20
f 57/149/21 58/150/21 60/151/21 59/152/21
f 59/152/22 60/151/22 62/153/22 61/154/22
f 61/155/23 62/156/23 64/157/23 63/158/23
f 63/158/24 64/157/24 66/159/24 65/160/24
f 65/160/25 66/159/25 68/161/25 67/162/25
f 67/162/26 68/161/26 70/163/26 69/164/26
f 60/165/18 58/166/18 72/167/18 70/168/18 68/169/18 66/170/18 64/171/18 62/172/18
f 69/173/27 70/174/27 72/175/27 71/176/27
f 71/176/28 72/175/28 58/150/28 57/149/28
f 57/177/17 59/178/17 61/179/17 63/180/17 65/181/17 67/182/17 69/183/17 71/184/17
f 73/185/17 74/186/17 76/187/17 75/188/17
f 75/189/14 76/190/14 80/191/14 79/192/14
f 79/193/18 80/194/18 78/195/18 77/196/18
f 77/197/12 78/198/12 74/199/12 73/200/12
f 75/188/20 79/201/20 77/202/20 73/185/20
f 80/194/19 76/203/19 74/204/19 78/195/19
f 112/205/29 84/206/29 178/207/29 180/208/29
f 83/209/30 84/210/30 113/211/30 88/212/30 87/213/30 108/214/30
f 86/215/31 85/216/31 99/217/31 100/218/31
f 85/216/32 86/215/32 115/219/32 82/220/32 81/221/32 110/222/32
f 111/223/33 109/224/33 85/225/33 110/226/33
f 116/227/34 112/228/34 82/229/34 115/230/34
f 89/231/14 90/232/14 146/233/14 145/234/14
f 91/235/12 92/236/12 96/237/12 95/238/12
f 95/239/35 96/240/35 94/241/35 93/242/35
f 93/243/14 94/244/14 90/232/14 89/231/14
f 91/245/36 95/246/36 93/247/36 89/248/36
f 96/249/37 92/250/37 90/251/37 94/252/37
f 85/225/38 109/224/38 87/253/38 98/254/38 97/255/38
f 101/256/39 102/257/39 100/258/39 99/259/39
f 87/213/40 101/260/40 106/261/40 104/262/40
f 88/212/41 114/263/41 86/264/41 100/265/41 102/266/41
f 87/213/42 88/212/42 102/266/42 101/260/42
f 103/267/43 104/268/43 106/269/43 105/270/43
f 99/217/44 85/216/44 103/271/44 105/272/44
f 85/273/45 109/274/45 87/275/45 104/276/45 103/277/45
f 101/256/46 99/259/46 105/270/46 106/269/46
f 107/278/47 111/279/47 110/280/47 81/281/47
f 83/282/48 108/283/48 111/279/48 107/278/48
f 108/284/49 87/253/49 109/224/49 111/223/49
f 114/285/50 116/286/50 115/287/50 86/288/50
f 88/289/51 113/290/51 116/286/51 114/285/51
f 113/291/52 84/292/52 112/228/52 116/227/52
f 119/293/53 135/294/53 173/295/53 171/296/53
f 119/297/54 120/298/54 141/299/54 124/300/54 123/301/54 136/302/54
f 122/303/55 121/304/55 127/305/55 128/306/55
f 121/304/56 122/303/56 143/307/56 118/308/56 117/309/56 138/310/56
f 139/311/57 137/312/57 121/313/57 138/314/57
f 144/315/58 140/316/58 118/317/58 143/318/58
f 121/313/59 137/312/59 123/319/59 126/320/59 125/321/59
f 129/322/60 130/323/60 128/324/60 127/325/60
f 123/301/61 129/326/61 134/327/61 132/328/61
f 124/329/62 142/330/62 122/331/62 128/332/62 130/333/62
f 123/301/63 124/300/63 130/334/63 129/326/63
f 131/335/64 132/336/64 134/337/64 133/338/64
f 127/305/65 121/304/65 131/339/65 133/340/65
f 121/341/66 137/342/66 123/343/66 132/344/66 131/345/66
f 129/322/67 127/325/67 133/338/67 134/337/67
f 135/294/68 139/346/68 138/347/68 117/348/68
f 119/293/69 136/349/69 139/346/69 135/294/69
f 136/350/70 123/319/70 137/312/70 139/311/70
f 142/351/71 144/352/71 143/353/71 122/354/71
f 124/355/72 141/356/72 144/352/72 142/351/72
f 141/357/73 120/358/73 140/316/73 144/315/73
f 145/359/74 146/360/74 148/361/74 147/362/74
f 90/251/75 92/250/75 148/363/75 146/364/75
f 91/245/76 89/248/76 145/365/76 147/366/76
f 92/236/12 91/235/12 147/367/12 148/368/12
f 120/369/17 119/370/17 155/371/17 156/372/17
f 117/373/17 118/374/17 154/375/17 153/376/17
f 84/377/17 83/378/17 151/379/17 152/380/17
f 81/381/17 82/382/17 150/383/17 149/384/17
f 156/372/17 155/371/17 167/385/17 168/386/17
f 152/380/17 151/379/17 163/387/17 164/388/17
f 153/376/17 154/375/17 166/389/17 165/390/17
f 149/384/17 150/383/17 162/391/17 161/392/17
f 169/393/77 170/394/77 174/395/77 172/396/77 171/296/77 173/295/77
f 120/298/78 119/297/78 171/397/78 172/398/78
f 117/309/79 118/308/79 170/399/79 169/400/79
f 118/317/80 140/316/80 174/401/80 170/402/80
f 140/316/81 120/358/81 172/403/81 174/401/81
f 135/294/82 117/348/82 169/393/82 173/295/82
f 175/404/83 176/405/83 180/406/83 178/407/83 177/408/83 179/409/83
f 107/410/84 81/411/84 175/404/84 179/409/84
f 82/412/85 112/205/85 180/208/85 176/413/85
f 84/210/86 83/209/86 177/414/86 178/415/86
f 81/221/87 82/220/87 176/416/87 175/417/87
f 83/418/88 107/410/88 179/409/88 177/408/88
l 140 160
l 112 158
l 135 159
l 107 157

BIN
models/tureta.b3d Normal file

Binary file not shown.

BIN
models/tureta.blend Normal file

Binary file not shown.

BIN
models/tureta.blend1 Normal file

Binary file not shown.

12
models/turret1.mtl Normal file
View File

@@ -0,0 +1,12 @@
# Blender MTL File: 'None'
# Material Count: 1
newmtl Material.001
Ns 250.000000
Ka 1.000000 1.000000 1.000000
Kd 0.800000 0.800000 0.800000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2

808
models/turret1.obj Normal file
View File

@@ -0,0 +1,808 @@
# Blender v3.1.2 OBJ File: ''
# www.blender.org
mtllib turret1.mtl
o Cube.003_Cube.006
v 0.258257 -0.091714 -0.413941
v 0.258257 -0.040096 -0.422001
v 0.109257 -0.044814 -0.452215
v 0.109257 -0.096431 -0.444156
v 0.180524 -0.098387 -0.795302
v 0.180524 -0.150004 -0.787243
v 0.329524 -0.093669 -0.765089
v 0.329524 -0.145287 -0.757028
v -0.108308 -0.096431 -0.444156
v -0.108308 -0.044814 -0.452215
v -0.179576 -0.098387 -0.795302
v -0.179576 -0.150004 -0.787243
v -0.257309 -0.091714 -0.413941
v -0.257309 -0.040096 -0.422001
v -0.328576 -0.093669 -0.765089
v -0.328576 -0.145287 -0.757028
v 0.085873 -0.311711 0.789288
v 0.085873 -0.264880 0.825844
v -0.087103 -0.264880 0.825844
v -0.087103 -0.311711 0.789288
v -0.087103 -0.016837 0.508067
v -0.087103 -0.063670 0.471512
v 0.085873 -0.016837 0.508067
v 0.085873 -0.063670 0.471512
v -0.180525 0.059449 0.259474
v -0.180524 0.795374 0.259474
v -0.263934 0.795374 0.259474
v -0.263934 0.059449 0.259474
v -0.263934 0.795374 -0.167472
v -0.263934 0.059449 -0.167472
v -0.180525 0.795374 -0.167472
v -0.180525 0.059449 -0.167472
v 0.175323 -0.116588 0.361602
v 0.175323 0.971412 0.361602
v -0.181890 0.971412 0.361602
v -0.181890 -0.116588 0.361602
v -0.181890 0.971412 -0.269600
v -0.181890 -0.116588 -0.269600
v 0.175323 0.971412 -0.269600
v 0.175322 -0.116588 -0.269600
v 0.257932 0.059449 0.259474
v 0.257932 0.795374 0.259474
v 0.174522 0.795374 0.259474
v 0.174522 0.059449 0.259474
v 0.174522 0.795374 -0.167472
v 0.174522 0.059449 -0.167472
v 0.257932 0.795374 -0.167472
v 0.257932 0.059449 -0.167472
v -0.079937 0.431895 -0.268682
v -0.079937 0.431895 -0.279608
v -0.058679 0.380574 -0.279608
v -0.058679 0.380574 -0.268682
v -0.007358 0.359317 -0.279608
v -0.007358 0.359317 -0.268682
v 0.043962 0.380574 -0.279608
v 0.043962 0.380574 -0.268682
v 0.065220 0.431895 -0.279608
v 0.065220 0.431895 -0.268682
v 0.043962 0.483214 -0.279608
v 0.043962 0.483214 -0.268682
v -0.007358 0.504472 -0.279608
v -0.007358 0.504472 -0.268682
v -0.058679 0.483214 -0.279608
v -0.058679 0.483214 -0.268682
v -0.000148 -0.110589 -0.272766
v -0.000148 0.965412 -0.272766
v -0.006527 0.965412 -0.272766
v -0.006527 -0.110589 -0.272766
v -0.006527 0.965412 -0.260852
v -0.006527 -0.110589 -0.260852
v -0.000148 0.965412 -0.260852
v -0.000148 -0.110589 -0.260852
v 0.097856 -0.151282 -0.074938
v 0.041450 -0.166379 -0.089959
v 0.041450 -0.070430 -0.007403
v 0.097856 -0.055332 0.007620
v 0.052873 -0.225674 -0.092230
v 0.116793 -0.234730 -0.332199
v 0.187702 -0.115926 -0.685865
v 0.174110 -0.175220 -0.688137
v 0.128215 -0.294024 -0.334470
v 0.272894 -0.085730 -0.655822
v 0.284316 -0.145024 -0.658093
v 0.298914 -0.145024 -0.717672
v 0.287492 -0.085730 -0.715401
v 0.226999 -0.204534 -0.302155
v 0.151656 -0.136183 -0.059916
v 0.163079 -0.195477 -0.062188
v 0.238422 -0.263828 -0.304428
v 0.184621 -0.278926 -0.319449
v 0.230515 -0.160122 -0.673114
v 0.173197 -0.219631 -0.317177
v 0.066180 -0.267525 0.766530
v 0.066180 -0.283472 0.708244
v 0.066180 0.036616 0.294020
v 0.066180 0.052563 0.352305
v -0.072748 -0.267525 0.766530
v -0.072748 -0.283472 0.708244
v -0.072748 -0.977386 0.898104
v -0.072748 -0.961439 0.956390
v 0.066180 -0.977386 0.898104
v 0.066180 -0.961439 0.956390
v 0.174110 -0.175220 -0.688137
v 0.284316 -0.145024 -0.658093
v 0.213723 -0.175220 -0.747715
v 0.202300 -0.115926 -0.745443
v 0.329684 -0.989492 -0.921705
v 0.315086 -0.989492 -0.862126
v 0.219092 -0.100827 -0.670843
v 0.425294 -0.994405 -0.832084
v 0.439891 -0.994405 -0.891662
v 0.109279 -0.210576 -0.077209
v -0.059233 -0.225674 -0.092230
v -0.115639 -0.210576 -0.077209
v -0.115639 -0.095509 0.065361
v -0.059233 -0.110607 0.050340
v -0.047811 -0.166379 -0.089959
v -0.123153 -0.234730 -0.332199
v -0.169048 -0.115926 -0.685865
v -0.180471 -0.175220 -0.688137
v -0.134576 -0.294024 -0.334470
v -0.279254 -0.085730 -0.655822
v -0.290677 -0.145024 -0.658093
v -0.305275 -0.145024 -0.717672
v -0.293853 -0.085730 -0.715401
v -0.233360 -0.204534 -0.302155
v -0.158017 -0.136183 -0.059916
v -0.169441 -0.195477 -0.062188
v -0.244784 -0.263828 -0.304428
v -0.190982 -0.278926 -0.319449
v -0.236877 -0.160122 -0.673114
v -0.179559 -0.219631 -0.317178
v -0.104217 -0.151282 -0.074938
v -0.180471 -0.175220 -0.688137
v -0.290677 -0.145024 -0.658093
v -0.195069 -0.175220 -0.747715
v -0.183646 -0.115926 -0.745443
v -0.336047 -0.989492 -0.921705
v -0.321448 -0.989492 -0.862126
v -0.225453 -0.100827 -0.670843
v -0.431654 -0.994405 -0.832084
v -0.446253 -0.994405 -0.891662
v -0.072748 0.036616 0.294020
v -0.072748 0.052563 0.352305
v -0.059233 -0.225674 -0.092230
v -0.047811 -0.166379 -0.089959
v -0.158017 -0.136183 -0.059916
v -0.169441 -0.195477 -0.062188
v 0.052873 -0.225674 -0.092230
v 0.041450 -0.166379 -0.089959
v 0.151656 -0.136183 -0.059916
v 0.163079 -0.195477 -0.062188
v -0.059233 -0.225674 -0.092230
v -0.047811 -0.166379 -0.089959
v 0.052873 -0.225674 -0.092230
v 0.041450 -0.166379 -0.089959
v -0.158017 -0.136183 -0.059916
v -0.169441 -0.195477 -0.062188
v 0.151656 -0.136183 -0.059916
v 0.163079 -0.195477 -0.062188
v -0.169441 -0.080411 0.080383
v -0.158017 -0.021116 0.082654
v -0.104217 -0.036215 0.067633
v -0.047811 -0.051312 0.052611
v 0.163079 -0.099528 0.020369
v 0.151656 -0.040233 0.022641
v 0.052873 -0.129724 -0.009674
v 0.109279 -0.114627 0.005347
v -0.104217 -0.151282 -0.074938
v 0.097856 -0.151282 -0.074938
v -0.115639 -0.210576 -0.077209
v 0.109279 -0.210576 -0.077209
vt 0.489132 0.748949
vt 0.489132 0.718137
vt 0.519717 0.718145
vt 0.519717 0.748957
vt 0.090171 0.693043
vt 0.090171 0.723854
vt 0.061402 0.723899
vt 0.061402 0.693087
vt 0.210985 0.718395
vt 0.210985 0.749207
vt 0.180404 0.749215
vt 0.180404 0.718403
vt 0.246514 0.722337
vt 0.246514 0.753149
vt 0.217065 0.753184
vt 0.217065 0.722372
vt 0.000000 0.693043
vt 0.030701 0.693043
vt 0.030701 0.723855
vt 0.000000 0.723855
vt 0.030701 0.693043
vt 0.061402 0.693043
vt 0.061402 0.723855
vt 0.030701 0.723855
vt 0.113868 0.693092
vt 0.144569 0.693034
vt 0.144569 0.729449
vt 0.113868 0.729507
vt 0.028567 0.723863
vt 0.028567 0.754674
vt 0.000000 0.754666
vt 0.000000 0.723855
vt 0.057131 0.723855
vt 0.057131 0.754666
vt 0.028567 0.754674
vt 0.028567 0.723863
vt 0.144569 0.693102
vt 0.175270 0.693034
vt 0.175270 0.728196
vt 0.144569 0.728264
vt 0.113868 0.693034
vt 0.113868 0.733059
vt 0.090234 0.749387
vt 0.090234 0.709362
vt 0.453595 0.706535
vt 0.429961 0.690207
vt 0.429961 0.730233
vt 0.453595 0.746561
vt 0.491495 0.718137
vt 0.489132 0.694236
vt 0.523439 0.692892
vt 0.525802 0.716793
vt 0.690895 0.620228
vt 0.683350 0.597128
vt 0.683350 0.421757
vt 0.690895 0.444858
vt 0.180404 0.543450
vt 0.182758 0.519548
vt 0.217065 0.520887
vt 0.214711 0.544789
vt 0.797976 0.023111
vt 0.805454 0.000000
vt 0.805454 0.175364
vt 0.797976 0.198475
vt 0.182758 0.717056
vt 0.217065 0.718395
vt 0.525802 0.519284
vt 0.491495 0.520628
vt 0.666799 0.889843
vt 0.653710 0.461156
vt 0.670262 0.460793
vt 0.683350 0.889480
vt 0.573487 0.421757
vt 0.573487 0.850735
vt 0.533024 0.888570
vt 0.533024 0.459592
vt 0.292521 0.928144
vt 0.305565 0.499455
vt 0.322117 0.499817
vt 0.309072 0.928506
vt 0.613599 0.850721
vt 0.613599 0.421757
vt 0.653710 0.459650
vt 0.653710 0.888614
vt 0.305565 0.967176
vt 0.322117 0.967538
vt 0.683350 0.421757
vt 0.666799 0.422120
vt 0.019350 0.693043
vt 0.000000 0.059266
vt 0.070884 0.057711
vt 0.090234 0.691487
vt 0.348156 0.690141
vt 0.348156 0.055936
vt 0.407978 0.000000
vt 0.407978 0.634205
vt 0.090234 0.633779
vt 0.109519 0.000000
vt 0.180404 0.001550
vt 0.161119 0.635328
vt 0.407978 0.634186
vt 0.407978 0.000000
vt 0.467279 0.056021
vt 0.467279 0.690207
vt 0.109519 0.691484
vt 0.180404 0.693034
vt 0.090234 0.000000
vt 0.019350 0.001555
vt 0.927182 0.678965
vt 0.914094 0.250278
vt 0.930645 0.249915
vt 0.943734 0.678602
vt 0.863881 0.210879
vt 0.863881 0.639856
vt 0.823417 0.677691
vt 0.823417 0.248714
vt 0.262925 0.928144
vt 0.275969 0.499455
vt 0.292521 0.499817
vt 0.279476 0.928506
vt 0.573487 0.850721
vt 0.573487 0.421757
vt 0.613599 0.459650
vt 0.613599 0.888614
vt 0.275969 0.967176
vt 0.292521 0.967538
vt 0.943734 0.210879
vt 0.927182 0.211242
vt 0.526837 0.561436
vt 0.525802 0.562405
vt 0.526922 0.532534
vt 0.527957 0.531566
vt 0.529626 0.520252
vt 0.530662 0.519284
vt 0.261228 0.519548
vt 0.262254 0.520518
vt 0.260242 0.532918
vt 0.259216 0.531948
vt 0.259409 0.562836
vt 0.258382 0.561866
vt 0.260242 0.592746
vt 0.259216 0.591777
vt 0.262254 0.605128
vt 0.261228 0.604158
vt 0.737396 0.137634
vt 0.745741 0.166619
vt 0.745741 0.196863
vt 0.737396 0.210649
vt 0.725595 0.199902
vt 0.717250 0.170917
vt 0.717250 0.140673
vt 0.725595 0.126887
vt 0.530662 0.603896
vt 0.529626 0.604865
vt 0.526922 0.592365
vt 0.527957 0.591397
vt 0.401848 0.734172
vt 0.393503 0.763157
vt 0.381702 0.773903
vt 0.373357 0.760116
vt 0.373357 0.729872
vt 0.381702 0.700888
vt 0.393503 0.690141
vt 0.401848 0.703928
vt 0.994427 0.211965
vt 0.996089 0.839044
vt 0.994823 0.839036
vt 0.993161 0.211957
vt 0.998881 0.838070
vt 0.998881 0.210879
vt 1.000000 0.211936
vt 1.000000 0.839128
vt 0.997751 0.210879
vt 0.997355 0.837960
vt 0.996089 0.837970
vt 0.996485 0.210889
vt 0.998881 0.210879
vt 0.998881 0.838089
vt 0.997751 0.839145
vt 0.997751 0.211935
vt 0.993557 0.210879
vt 0.994823 0.210887
vt 0.997751 0.839037
vt 0.996485 0.839048
vt 0.419228 0.746897
vt 0.407978 0.755091
vt 0.407978 0.706561
vt 0.419228 0.698367
vt 0.698133 0.347193
vt 0.699215 0.312870
vt 0.717830 0.331470
vt 0.749646 0.231355
vt 0.749881 0.265758
vt 0.716748 0.365793
vt 0.527891 0.514099
vt 0.526949 0.479752
vt 0.532082 0.484937
vt 0.533024 0.519284
vt 0.494398 0.414124
vt 0.474975 0.432859
vt 0.474033 0.398513
vt 0.493456 0.379778
vt 0.729140 0.108574
vt 0.729140 0.007234
vt 0.740514 0.000000
vt 0.740514 0.101340
vt 0.714070 0.736164
vt 0.691363 0.739897
vt 0.691363 0.728510
vt 0.714070 0.724777
vt 0.889098 0.635769
vt 0.894914 0.632147
vt 0.914094 0.858058
vt 0.908277 0.861681
vt 0.863881 0.436785
vt 0.869749 0.440407
vt 0.889098 0.861661
vt 0.883230 0.858039
vt 0.531090 0.632539
vt 0.525802 0.634527
vt 0.525802 0.606852
vt 0.531090 0.604865
vt 0.908277 0.214502
vt 0.914094 0.210879
vt 0.782198 0.435213
vt 0.789035 0.856782
vt 0.761467 0.857408
vt 0.754630 0.435839
vt 0.823417 0.211502
vt 0.816603 0.633071
vt 0.789035 0.632448
vt 0.795849 0.210879
vt 0.717250 0.014459
vt 0.717250 0.014459
vt 0.740514 0.000000
vt 0.974576 0.259453
vt 0.973975 0.225057
vt 0.992560 0.210879
vt 0.993161 0.245275
vt 0.753548 0.260468
vt 0.754630 0.719567
vt 0.749646 0.724777
vt 0.746721 0.223758
vt 0.742617 0.216089
vt 0.747601 0.210879
vt 0.754630 0.226145
vt 0.992000 0.730186
vt 0.969399 0.723737
vt 0.970561 0.718371
vt 0.993161 0.724820
vt 0.527891 0.000000
vt 0.533024 0.005185
vt 0.345667 0.978998
vt 0.334150 0.971992
vt 0.322117 0.965006
vt 0.323063 0.505903
vt 0.345667 0.499455
vt 0.061471 0.735801
vt 0.084178 0.739534
vt 0.084178 0.750921
vt 0.061471 0.747188
vt 0.061402 0.723899
vt 0.084109 0.727632
vt 0.717250 0.115799
vt 0.756487 0.007782
vt 0.751525 0.109002
vt 0.740514 0.101220
vt 0.745477 0.000000
vt 0.763052 0.015426
vt 0.763052 0.116800
vt 0.714001 0.748065
vt 0.691294 0.751799
vt 0.217065 0.543224
vt 0.229350 0.547359
vt 0.239504 0.600770
vt 0.227219 0.596635
vt 0.273697 0.117994
vt 0.274601 0.083610
vt 0.300568 0.103478
vt 0.341486 0.004919
vt 0.340582 0.039303
vt 0.299664 0.137862
vt 0.256530 0.514540
vt 0.255685 0.480181
vt 0.262080 0.485189
vt 0.262925 0.519548
vt 0.217130 0.415552
vt 0.192246 0.435023
vt 0.191402 0.400664
vt 0.216286 0.381193
vt 0.788994 0.009371
vt 0.788994 0.112674
vt 0.780519 0.121944
vt 0.780519 0.018640
vt 0.244691 0.719359
vt 0.229677 0.694175
vt 0.241808 0.691006
vt 0.256822 0.716189
vt 0.797976 0.103304
vt 0.797976 0.103304
vt 0.780519 0.121944
vt 0.947478 0.258507
vt 0.947551 0.224056
vt 0.969399 0.210879
vt 0.969325 0.245330
vt 0.347253 0.034384
vt 0.348156 0.494536
vt 0.341486 0.499455
vt 0.256822 0.663851
vt 0.256859 0.653076
vt 0.256822 0.642815
vt 0.262650 0.638760
vt 0.262651 0.659797
vt 0.348156 0.000000
vt 0.964146 0.731052
vt 0.943734 0.723818
vt 0.948987 0.718813
vt 0.969399 0.726048
vt 0.256530 0.000000
vt 0.262925 0.005008
vt 0.489132 1.000000
vt 0.478463 0.993392
vt 0.467279 0.986825
vt 0.468717 0.526520
vt 0.489132 0.519284
vt 0.246593 0.523683
vt 0.258382 0.527964
vt 0.241139 0.551640
vt 0.234309 0.519548
vt 0.797976 0.000000
vt 0.772039 0.112663
vt 0.772039 0.009368
vt 0.780519 0.018635
vt 0.780519 0.121930
vt 0.763052 0.103295
vt 0.763052 0.000000
vt 0.232080 0.722337
vt 0.217065 0.697153
vt 0.531090 0.664189
vt 0.525802 0.662201
vt 0.525802 0.634527
vt 0.531090 0.636514
vt 0.823417 0.857402
vt 0.795849 0.856779
vt 0.761467 0.211505
vt 0.789035 0.210879
vt 0.883230 0.210879
vt 0.889098 0.214501
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.251293 0.605051
vt 0.258382 0.638760
vt 0.246593 0.634479
vt 0.234309 0.630343
vt 0.262925 0.062943
vt 0.263829 0.028558
vt 0.181248 0.489979
vt 0.180404 0.455620
vt 0.244691 0.641929
vt 0.256822 0.638760
vt 0.232080 0.644908
vt 0.348156 0.724456
vt 0.350583 0.690141
vt 0.361712 0.697753
vt 0.373357 0.705372
vt 0.370930 0.739687
vt 0.359285 0.732067
vt 0.361712 0.780537
vt 0.350583 0.772925
vt 0.429961 0.738737
vt 0.429961 0.690207
vt 0.691294 0.298430
vt 0.692376 0.264107
vt 0.468221 0.481611
vt 0.467279 0.447264
vt 0.373357 0.788156
vn -0.2010 0.1511 0.9679
vn -0.9796 -0.0310 -0.1986
vn 0.2010 -0.1511 -0.9679
vn 0.9796 0.0310 0.1986
vn -0.0000 -0.9880 0.1543
vn 0.0000 0.9880 -0.1543
vn -0.9796 0.0310 0.1986
vn -0.2010 -0.1511 -0.9679
vn 0.2010 0.1511 0.9679
vn 0.9796 -0.0310 -0.1986
vn 0.0000 -0.6153 0.7883
vn -1.0000 -0.0000 0.0000
vn 0.0000 0.6153 -0.7883
vn 1.0000 -0.0000 0.0000
vn 0.0000 -0.7883 -0.6153
vn 0.0000 0.7883 0.6153
vn 0.0000 0.0000 1.0000
vn 0.0000 0.0000 -1.0000
vn 0.0000 -1.0000 0.0000
vn 0.0000 1.0000 -0.0000
vn -0.9239 -0.3827 0.0000
vn -0.3827 -0.9239 0.0000
vn 0.3827 -0.9239 0.0000
vn 0.9239 -0.3827 0.0000
vn 0.9239 0.3827 0.0000
vn 0.3827 0.9239 0.0000
vn -0.3827 0.9239 0.0000
vn -0.9239 0.3827 0.0000
vn 0.0284 0.6521 -0.7576
vn 0.0273 0.6520 -0.7577
vn 0.0276 0.6521 -0.7576
vn -0.9793 -0.0575 -0.1940
vn 0.9562 0.1752 0.2343
vn 0.9614 0.1771 0.2106
vn 0.3279 -0.9076 -0.2623
vn -0.1696 0.9334 -0.3161
vn -0.1697 0.9334 -0.3162
vn -0.1732 0.9325 -0.3170
vn 0.0000 -0.9645 0.2639
vn 0.0000 0.2639 0.9645
vn 0.0000 -0.2639 -0.9645
vn 0.0001 0.7053 -0.7089
vn 0.3012 0.0944 -0.9489
vn -0.9088 -0.0550 -0.4135
vn -0.3003 0.9484 -0.1018
vn -0.9097 0.0325 -0.4139
vn -0.0418 -0.9991 -0.0102
vn 0.9652 0.1118 0.2365
vn -0.2303 -0.2363 0.9440
vn 0.2576 0.2358 -0.9370
vn 0.1697 -0.9334 0.3162
vn 0.1696 -0.9334 0.3161
vn 0.1732 -0.9325 0.3170
vn 0.1661 -0.9343 0.3153
vn 0.3146 -0.9114 -0.2653
vn -0.3279 0.9076 0.2623
vn -0.3872 0.8914 0.2355
vn -0.1661 0.9343 -0.3153
vn 0.0410 0.7775 -0.6275
vn 0.0430 0.7775 -0.6274
vn 0.0414 0.7775 -0.6275
vn -0.9614 0.1771 0.2106
vn 0.9562 -0.1752 -0.2343
vn 0.9614 -0.1772 -0.2106
vn 0.3279 0.9076 0.2623
vn -0.1696 -0.9334 0.3161
vn -0.1697 -0.9334 0.3162
vn -0.1732 -0.9325 0.3170
vn 0.0001 -0.7053 0.7089
vn 0.2407 -0.0834 0.9670
vn -0.9647 0.1165 0.2364
vn -0.2490 -0.9667 0.0583
vn -0.9562 0.1752 0.2343
vn -0.0418 0.9991 0.0102
vn 0.9652 -0.1118 -0.2365
vn -0.2303 0.2363 -0.9440
vn 0.2302 -0.2365 0.9440
vn 0.1697 0.9334 -0.3162
vn 0.1696 0.9334 -0.3161
vn 0.1732 0.9325 -0.3170
vn 0.1661 0.9343 -0.3153
vn 0.3146 0.9114 0.2653
vn -0.3279 -0.9076 -0.2623
vn -0.3146 -0.9114 -0.2653
vn -0.1661 -0.9343 0.3153
vn 0.0000 0.9645 -0.2639
vn 0.0000 -0.7913 -0.6115
vn 0.0000 0.7913 0.6115
vn -0.2407 0.0834 -0.9670
vn -0.9689 0.1926 -0.1554
vn 0.9689 -0.1926 0.1555
vn -0.0430 -0.7775 0.6275
vn -0.0426 -0.7775 0.6275
vn -0.0411 -0.7775 0.6275
vn -0.0410 -0.7775 0.6275
vn 0.0430 0.7775 -0.6275
vn -0.2407 -0.0834 0.9670
vn -0.0282 -0.6521 0.7576
vn -0.0286 -0.6520 0.7577
vn -0.0276 -0.6521 0.7576
vn 0.0286 0.6520 -0.7577
vn -0.9554 -0.1926 0.2239
vn 0.9554 0.1926 -0.2239
vn -0.0273 -0.6520 0.7577
usemtl Material.001
s 1
f 1/1/1 2/2/1 3/3/1 4/4/1
f 4/5/2 3/6/2 5/7/2 6/8/2
f 6/9/3 5/10/3 7/11/3 8/12/3
f 8/13/4 7/14/4 2/15/4 1/16/4
f 4/17/5 6/18/5 8/19/5 1/20/5
f 5/21/6 3/22/6 2/23/6 7/24/6
f 9/25/7 10/26/7 11/27/7 12/28/7
f 13/29/8 14/30/8 10/31/8 9/32/8
f 12/33/9 11/34/9 15/35/9 16/36/9
f 16/37/10 15/38/10 14/39/10 13/40/10
f 9/41/6 12/42/6 16/43/6 13/44/6
f 11/45/6 15/46/6 14/47/6 10/48/6
f 17/49/11 18/50/11 19/51/11 20/52/11
f 20/53/12 19/54/12 21/55/12 22/56/12
f 22/57/13 21/58/13 23/59/13 24/60/13
f 24/61/14 23/62/14 18/63/14 17/64/14
f 20/65/15 22/57/15 24/60/15 17/66/15
f 21/67/16 19/51/16 18/50/16 23/68/16
f 25/69/17 26/70/17 27/71/17 28/72/17
f 28/73/12 27/74/12 29/75/12 30/76/12
f 30/77/18 29/78/18 31/79/18 32/80/18
f 32/81/14 31/82/14 26/83/14 25/84/14
f 28/85/19 30/77/19 32/80/19 25/86/19
f 29/87/20 27/71/20 26/70/20 31/88/20
f 33/89/17 34/90/17 35/91/17 36/92/17
f 36/93/12 35/94/12 37/95/12 38/96/12
f 38/97/18 37/98/18 39/99/18 40/100/18
f 40/101/14 39/102/14 34/103/14 33/104/14
f 36/105/19 38/97/19 40/100/19 33/106/19
f 37/107/20 35/91/20 34/90/20 39/108/20
f 41/109/17 42/110/17 43/111/17 44/112/17
f 44/113/12 43/114/12 45/115/12 46/116/12
f 46/117/18 45/118/18 47/119/18 48/120/18
f 48/121/14 47/122/14 42/123/14 41/124/14
f 44/125/19 46/117/19 48/120/19 41/126/19
f 45/127/20 43/111/20 42/110/20 47/128/20
f 49/129/21 50/130/21 51/131/21 52/132/21
f 52/132/22 51/131/22 53/133/22 54/134/22
f 54/135/23 53/136/23 55/137/23 56/138/23
f 56/138/24 55/137/24 57/139/24 58/140/24
f 58/140/25 57/139/25 59/141/25 60/142/25
f 60/142/26 59/141/26 61/143/26 62/144/26
f 51/145/18 50/146/18 63/147/18 61/148/18 59/149/18 57/150/18 55/151/18 53/152/18
f 62/153/27 61/154/27 63/155/27 64/156/27
f 64/156/28 63/155/28 50/130/28 49/129/28
f 49/157/17 52/158/17 54/159/17 56/160/17 58/161/17 60/162/17 62/163/17 64/164/17
f 65/165/17 66/166/17 67/167/17 68/168/17
f 68/169/14 67/170/14 69/171/14 70/172/14
f 70/173/18 69/174/18 71/175/18 72/176/18
f 72/177/12 71/178/12 66/179/12 65/180/12
f 68/168/20 70/181/20 72/182/20 65/165/20
f 69/174/19 67/183/19 66/184/19 71/175/19
f 73/185/29 74/186/30 75/187/30 76/188/31
f 77/189/32 74/190/32 78/191/32 79/192/32 80/193/32 81/194/32
f 82/195/33 83/196/33 84/197/33 85/198/33
f 83/196/34 82/195/34 86/199/34 87/200/34 88/201/34 89/202/34
f 90/203/35 91/204/35 83/205/35 89/206/35
f 92/207/36 73/208/37 87/209/38 86/210/38
f 93/211/14 94/212/14 95/213/14 96/214/14
f 97/215/12 98/216/12 99/217/12 100/218/12
f 100/219/39 99/220/39 101/221/39 102/222/39
f 102/223/14 101/224/14 94/212/14 93/211/14
f 97/225/40 100/226/40 102/227/40 93/228/40
f 99/229/41 98/230/41 94/231/41 101/232/41
f 83/205/42 91/204/42 80/233/42 103/234/42 104/235/42
f 105/236/43 106/237/43 85/238/43 84/239/43
f 80/193/44 105/240/44 107/241/44 108/242/44
f 79/192/45 109/243/45 82/244/45 85/245/45 106/246/45
f 80/193/46 79/192/46 106/246/46 105/240/46
f 110/247/47 108/248/47 107/249/47 111/250/47
f 84/197/48 83/196/48 110/251/48 111/252/48
f 83/253/49 91/254/49 80/255/49 108/256/49 110/257/49
f 105/236/50 84/239/50 111/250/50 107/249/50
f 112/258/51 90/259/52 89/260/53 88/261/53
f 77/262/54 81/263/54 90/259/52 112/258/51
f 81/264/55 80/233/55 91/204/55 90/203/55
f 109/265/56 92/266/56 86/267/56 82/268/56
f 79/269/57 78/270/57 92/266/57 109/265/57
f 78/271/58 74/272/58 73/208/37 92/207/36
f 113/273/59 114/274/60 115/275/61 116/276/59
f 113/277/62 117/278/62 118/279/62 119/280/62 120/281/62 121/282/62
f 122/283/63 123/284/63 124/285/63 125/286/63
f 123/284/64 122/283/64 126/287/64 127/288/64 128/289/64 129/290/64
f 130/291/65 131/292/65 123/293/65 129/294/65
f 132/295/66 133/296/67 127/297/68 126/298/68
f 123/293/69 131/292/69 120/299/69 134/300/69 135/301/69
f 136/302/70 137/303/70 125/304/70 124/305/70
f 120/281/71 136/306/71 138/307/71 139/308/71
f 119/309/72 140/310/72 122/311/72 125/312/72 137/313/72
f 120/281/73 119/280/73 137/314/73 136/306/73
f 141/315/74 139/316/74 138/317/74 142/318/74
f 124/285/75 123/284/75 141/319/75 142/320/75
f 123/321/76 131/322/76 120/323/76 139/324/76 141/325/76
f 136/302/77 124/305/77 142/318/77 138/317/77
f 114/274/78 130/326/79 129/327/80 128/328/80
f 113/273/81 121/329/81 130/326/79 114/274/78
f 121/330/82 120/299/82 131/292/82 130/291/82
f 140/331/83 132/332/83 126/333/83 122/334/83
f 119/335/84 118/336/84 132/332/84 140/331/84
f 118/337/85 117/338/85 133/296/67 132/295/66
f 96/339/86 95/340/86 143/341/86 144/342/86
f 94/231/87 98/230/87 143/343/87 95/344/87
f 97/225/88 93/228/88 96/345/88 144/346/88
f 98/216/12 97/215/12 144/347/12 143/348/12
f 117/349/17 113/350/17 145/351/17 146/352/17
f 128/353/17 127/354/17 147/355/17 148/356/17
f 74/357/17 77/358/17 149/359/17 150/360/17
f 88/361/17 87/362/17 151/363/17 152/364/17
f 146/352/17 145/351/17 153/365/17 154/366/17
f 150/360/17 149/359/17 155/367/17 156/368/17
f 148/356/17 147/355/17 157/369/17 158/370/17
f 152/364/17 151/363/17 159/371/17 160/372/17
f 161/373/89 162/374/89 163/375/89 164/376/89 116/276/89 115/275/89
f 117/278/90 113/277/90 116/377/90 164/378/90
f 128/289/91 127/288/91 162/379/91 161/380/91
f 127/297/92 133/296/93 163/381/94 162/382/92
f 133/296/93 117/338/95 164/383/95 163/381/94
f 114/274/60 128/328/96 161/373/96 115/275/61
f 165/384/97 166/385/97 76/386/97 75/387/97 167/388/97 168/389/97
f 112/390/98 88/391/99 165/384/99 168/389/100
f 87/392/101 73/185/29 76/188/31 166/393/101
f 74/190/102 77/189/102 167/394/102 75/395/102
f 88/201/103 87/200/103 166/396/103 165/397/103
f 77/398/104 112/390/98 168/389/100 167/388/104
l 133 169
l 73 170
l 114 171
l 112 172

12
models/turret2.mtl Normal file
View File

@@ -0,0 +1,12 @@
# Blender MTL File: 'None'
# Material Count: 1
newmtl Material.002
Ns 250.000000
Ka 1.000000 1.000000 1.000000
Kd 0.800000 0.800000 0.800000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2

842
models/turret2.obj Normal file
View File

@@ -0,0 +1,842 @@
# Blender v3.1.2 OBJ File: ''
# www.blender.org
mtllib turret2.mtl
o Cube.003_Cube.001
v 0.258257 0.221875 -0.506808
v 0.258257 0.273492 -0.514869
v 0.109257 0.268774 -0.545083
v 0.109257 0.217157 -0.537023
v 0.180524 0.215201 -0.888170
v 0.180524 0.163584 -0.880110
v 0.329524 0.219919 -0.857956
v 0.329524 0.168301 -0.849895
v -0.108308 0.217157 -0.537023
v -0.108308 0.268774 -0.545083
v -0.179576 0.215201 -0.888170
v -0.179576 0.163584 -0.880110
v -0.257309 0.221875 -0.506808
v -0.257309 0.273492 -0.514869
v -0.328576 0.219919 -0.857956
v -0.328576 0.168301 -0.849895
v 0.085873 0.001877 0.696421
v 0.085873 0.048708 0.732976
v -0.087103 0.048708 0.732976
v -0.087103 0.001877 0.696421
v -0.087103 0.296751 0.415200
v -0.087103 0.249918 0.378644
v 0.085873 0.296751 0.415200
v 0.085873 0.249918 0.378644
v -0.389180 0.373037 0.166607
v -0.389180 1.108962 0.166607
v -0.472591 1.108962 0.166607
v -0.472591 0.373037 0.166607
v -0.472591 1.108962 -0.260339
v -0.472591 0.373037 -0.260339
v -0.389180 1.108962 -0.260339
v -0.389180 0.373037 -0.260339
v 0.175323 0.197000 0.268735
v 0.175323 1.285000 0.268735
v -0.181890 1.285000 0.268735
v -0.181890 0.197000 0.268735
v -0.181890 1.285000 -0.362467
v -0.181890 0.197000 -0.362467
v 0.175323 1.285000 -0.362467
v 0.175322 0.197000 -0.362467
v 0.462071 0.373037 0.166607
v 0.462071 1.108962 0.166607
v 0.378661 1.108962 0.166607
v 0.378661 0.373037 0.166607
v 0.378661 1.108962 -0.260339
v 0.378661 0.373037 -0.260339
v 0.462071 1.108962 -0.260339
v 0.462071 0.373037 -0.260339
v 0.384151 0.570772 0.021859
v 0.384151 0.911229 0.021859
v -0.390719 0.911229 0.021859
v -0.390719 0.570772 0.021859
v -0.390719 0.911229 -0.115592
v -0.390719 0.570772 -0.115592
v 0.384151 0.911229 -0.115592
v 0.384151 0.570772 -0.115592
v -0.079937 0.745483 -0.361549
v -0.079937 0.745483 -0.372475
v -0.058679 0.694162 -0.372475
v -0.058679 0.694162 -0.361549
v -0.007358 0.672905 -0.372475
v -0.007358 0.672905 -0.361549
v 0.043962 0.694162 -0.372475
v 0.043962 0.694162 -0.361549
v 0.065220 0.745483 -0.372475
v 0.065220 0.745483 -0.361549
v 0.043962 0.796802 -0.372475
v 0.043962 0.796802 -0.361549
v -0.007358 0.818060 -0.372475
v -0.007358 0.818060 -0.361549
v -0.058679 0.796802 -0.372475
v -0.058679 0.796802 -0.361549
v -0.000148 0.202999 -0.365633
v -0.000148 1.279000 -0.365633
v -0.006527 1.279000 -0.365633
v -0.006527 0.202999 -0.365633
v -0.006527 1.279000 -0.353720
v -0.006527 0.202999 -0.353720
v -0.000148 1.279000 -0.353720
v -0.000148 0.202999 -0.353720
v 0.097856 0.162306 -0.167805
v 0.041450 0.147209 -0.182826
v 0.041450 0.243158 -0.100270
v 0.097856 0.258256 -0.085248
v 0.052873 0.087914 -0.185097
v 0.116793 0.078858 -0.425067
v 0.187702 0.197662 -0.778732
v 0.174110 0.138368 -0.781005
v 0.128215 0.019564 -0.427338
v 0.272894 0.227859 -0.748690
v 0.284316 0.168564 -0.750961
v 0.298914 0.168564 -0.810540
v 0.287492 0.227859 -0.808268
v 0.226999 0.109054 -0.395023
v 0.151656 0.177405 -0.152784
v 0.163079 0.118111 -0.155055
v 0.238422 0.049760 -0.397295
v 0.184621 0.034662 -0.412317
v 0.230515 0.153467 -0.765982
v 0.173197 0.093957 -0.410044
v 0.066180 0.046063 0.673662
v 0.066180 0.030116 0.615377
v 0.066180 0.350204 0.201152
v 0.066180 0.366151 0.259438
v -0.072748 0.046063 0.673662
v -0.072748 0.030116 0.615377
v -0.072748 -0.663798 0.805237
v -0.072748 -0.647851 0.863523
v 0.066180 -0.663798 0.805237
v 0.066180 -0.647851 0.863523
v 0.174110 0.138368 -0.781005
v 0.284316 0.168564 -0.750961
v 0.213723 0.138368 -0.840582
v 0.202300 0.197662 -0.838311
v 0.329684 -0.675904 -1.014572
v 0.315086 -0.675904 -0.954993
v 0.219092 0.212761 -0.763711
v 0.425294 -0.680817 -0.924951
v 0.439891 -0.680817 -0.984530
v 0.109279 0.103012 -0.170076
v -0.059233 0.087914 -0.185097
v -0.115639 0.103012 -0.170076
v -0.115639 0.218079 -0.027506
v -0.059233 0.202981 -0.042527
v -0.047811 0.147209 -0.182826
v -0.123153 0.078858 -0.425067
v -0.169048 0.197662 -0.778732
v -0.180471 0.138368 -0.781005
v -0.134576 0.019564 -0.427338
v -0.279254 0.227859 -0.748690
v -0.290677 0.168564 -0.750961
v -0.305275 0.168564 -0.810540
v -0.293853 0.227859 -0.808268
v -0.233360 0.109054 -0.395023
v -0.158017 0.177405 -0.152784
v -0.169441 0.118111 -0.155055
v -0.244784 0.049760 -0.397295
v -0.190982 0.034662 -0.412317
v -0.236877 0.153467 -0.765982
v -0.179559 0.093957 -0.410045
v -0.104217 0.162306 -0.167805
v -0.180471 0.138368 -0.781005
v -0.290677 0.168564 -0.750961
v -0.195069 0.138368 -0.840582
v -0.183646 0.197662 -0.838311
v -0.336047 -0.675904 -1.014572
v -0.321448 -0.675904 -0.954993
v -0.225453 0.212761 -0.763711
v -0.431654 -0.680817 -0.924951
v -0.446253 -0.680817 -0.984530
v -0.072748 0.350204 0.201152
v -0.072748 0.366151 0.259438
v -0.059233 0.087914 -0.185097
v -0.047811 0.147209 -0.182826
v -0.158017 0.177405 -0.152784
v -0.169441 0.118111 -0.155055
v 0.052873 0.087914 -0.185097
v 0.041450 0.147209 -0.182826
v 0.151656 0.177405 -0.152784
v 0.163079 0.118111 -0.155055
v -0.059233 0.087914 -0.185097
v -0.047811 0.147209 -0.182826
v 0.052873 0.087914 -0.185097
v 0.041450 0.147209 -0.182826
v -0.158017 0.177405 -0.152784
v -0.169441 0.118111 -0.155055
v 0.151656 0.177405 -0.152784
v 0.163079 0.118111 -0.155055
v -0.169441 0.233177 -0.012485
v -0.158017 0.292472 -0.010214
v -0.104217 0.277373 -0.025235
v -0.047811 0.262276 -0.040256
v 0.163079 0.214060 -0.072499
v 0.151656 0.273355 -0.070226
v 0.052873 0.183864 -0.102541
v 0.109279 0.198961 -0.087520
v -0.104217 0.162306 -0.167805
v 0.097856 0.162306 -0.167805
v -0.115639 0.103012 -0.170076
v 0.109279 0.103012 -0.170076
vt 0.489132 0.748949
vt 0.489132 0.718137
vt 0.519717 0.718145
vt 0.519717 0.748957
vt 0.090171 0.693043
vt 0.090171 0.723854
vt 0.061402 0.723899
vt 0.061402 0.693087
vt 0.210985 0.718395
vt 0.210985 0.749207
vt 0.180404 0.749215
vt 0.180404 0.718403
vt 0.246514 0.722337
vt 0.246514 0.753149
vt 0.217065 0.753184
vt 0.217065 0.722372
vt 0.000000 0.693043
vt 0.030701 0.693043
vt 0.030701 0.723855
vt 0.000000 0.723855
vt 0.030701 0.693043
vt 0.061402 0.693043
vt 0.061402 0.723855
vt 0.030701 0.723855
vt 0.113868 0.693092
vt 0.144569 0.693034
vt 0.144569 0.729449
vt 0.113868 0.729507
vt 0.028567 0.723863
vt 0.028567 0.754674
vt 0.000000 0.754666
vt 0.000000 0.723855
vt 0.057131 0.723855
vt 0.057131 0.754666
vt 0.028567 0.754674
vt 0.028567 0.723863
vt 0.144569 0.693102
vt 0.175270 0.693034
vt 0.175270 0.728196
vt 0.144569 0.728264
vt 0.113868 0.693034
vt 0.113868 0.733059
vt 0.090234 0.749387
vt 0.090234 0.709362
vt 0.453595 0.706535
vt 0.429961 0.690207
vt 0.429961 0.730233
vt 0.453595 0.746561
vt 0.491495 0.718137
vt 0.489132 0.694236
vt 0.523439 0.692892
vt 0.525802 0.716793
vt 0.690895 0.620228
vt 0.683350 0.597128
vt 0.683350 0.421757
vt 0.690895 0.444858
vt 0.180404 0.543450
vt 0.182758 0.519548
vt 0.217065 0.520887
vt 0.214711 0.544789
vt 0.797976 0.023111
vt 0.805454 0.000000
vt 0.805454 0.175364
vt 0.797976 0.198475
vt 0.182758 0.717056
vt 0.217065 0.718395
vt 0.525802 0.519284
vt 0.491495 0.520628
vt 0.666799 0.889843
vt 0.653710 0.461156
vt 0.670262 0.460793
vt 0.683350 0.889480
vt 0.573487 0.421757
vt 0.573487 0.850735
vt 0.533024 0.888570
vt 0.533024 0.459592
vt 0.292521 0.928144
vt 0.305565 0.499455
vt 0.322117 0.499817
vt 0.309072 0.928506
vt 0.613599 0.850721
vt 0.613599 0.421757
vt 0.653710 0.459650
vt 0.653710 0.888614
vt 0.305565 0.967176
vt 0.322117 0.967538
vt 0.683350 0.421757
vt 0.666799 0.422120
vt 0.019350 0.693043
vt 0.000000 0.059266
vt 0.070884 0.057711
vt 0.090234 0.691487
vt 0.348156 0.690141
vt 0.348156 0.055936
vt 0.407978 0.000000
vt 0.407978 0.634205
vt 0.090234 0.633779
vt 0.109519 0.000000
vt 0.180404 0.001550
vt 0.161119 0.635328
vt 0.407978 0.634186
vt 0.407978 0.000000
vt 0.467279 0.056021
vt 0.467279 0.690207
vt 0.109519 0.691484
vt 0.180404 0.693034
vt 0.090234 0.000000
vt 0.019350 0.001555
vt 0.927182 0.678965
vt 0.914094 0.250278
vt 0.930645 0.249915
vt 0.943734 0.678602
vt 0.863881 0.210879
vt 0.863881 0.639856
vt 0.823417 0.677691
vt 0.823417 0.248714
vt 0.262925 0.928144
vt 0.275969 0.499455
vt 0.292521 0.499817
vt 0.279476 0.928506
vt 0.573487 0.850721
vt 0.573487 0.421757
vt 0.613599 0.459650
vt 0.613599 0.888614
vt 0.275969 0.967176
vt 0.292521 0.967538
vt 0.943734 0.210879
vt 0.927182 0.211242
vt 0.534758 0.210879
vt 0.533024 0.012472
vt 0.686823 0.012472
vt 0.688558 0.210879
vt 0.704336 0.000000
vt 0.704336 0.198456
vt 0.691310 0.210636
vt 0.691310 0.012181
vt 0.691294 0.223350
vt 0.689565 0.421757
vt 0.535765 0.421757
vt 0.537495 0.223350
vt 0.717250 0.012199
vt 0.717250 0.210649
vt 0.704336 0.198450
vt 0.704336 0.000000
vt 0.686823 0.210879
vt 0.533024 0.210879
vt 0.691310 0.000000
vt 0.537510 0.000000
vt 0.526837 0.561436
vt 0.525802 0.562405
vt 0.526922 0.532534
vt 0.527957 0.531566
vt 0.529626 0.520252
vt 0.530662 0.519284
vt 0.261228 0.519548
vt 0.262254 0.520518
vt 0.260242 0.532918
vt 0.259216 0.531948
vt 0.259409 0.562836
vt 0.258382 0.561866
vt 0.260242 0.592746
vt 0.259216 0.591777
vt 0.262254 0.605128
vt 0.261228 0.604158
vt 0.737396 0.137634
vt 0.745741 0.166619
vt 0.745741 0.196863
vt 0.737396 0.210649
vt 0.725595 0.199902
vt 0.717250 0.170917
vt 0.717250 0.140673
vt 0.725595 0.126887
vt 0.530662 0.603896
vt 0.529626 0.604865
vt 0.526922 0.592365
vt 0.527957 0.591397
vt 0.401848 0.734172
vt 0.393503 0.763157
vt 0.381702 0.773903
vt 0.373357 0.760116
vt 0.373357 0.729872
vt 0.381702 0.700888
vt 0.393503 0.690141
vt 0.401848 0.703928
vt 0.994427 0.211965
vt 0.996089 0.839044
vt 0.994823 0.839036
vt 0.993161 0.211957
vt 0.998881 0.838070
vt 0.998881 0.210879
vt 1.000000 0.211936
vt 1.000000 0.839128
vt 0.997751 0.210879
vt 0.997355 0.837960
vt 0.996089 0.837970
vt 0.996485 0.210889
vt 0.998881 0.210879
vt 0.998881 0.838089
vt 0.997751 0.839145
vt 0.997751 0.211935
vt 0.993557 0.210879
vt 0.994823 0.210887
vt 0.997751 0.839037
vt 0.996485 0.839048
vt 0.419228 0.746897
vt 0.407978 0.755091
vt 0.407978 0.706561
vt 0.419228 0.698367
vt 0.698133 0.347193
vt 0.699215 0.312870
vt 0.717830 0.331470
vt 0.749646 0.231355
vt 0.749881 0.265758
vt 0.716748 0.365793
vt 0.527891 0.514099
vt 0.526949 0.479752
vt 0.532082 0.484937
vt 0.533024 0.519284
vt 0.494398 0.414124
vt 0.474975 0.432859
vt 0.474033 0.398513
vt 0.493456 0.379778
vt 0.729140 0.108574
vt 0.729140 0.007234
vt 0.740514 0.000000
vt 0.740514 0.101340
vt 0.714070 0.736164
vt 0.691363 0.739897
vt 0.691363 0.728510
vt 0.714070 0.724777
vt 0.889098 0.635769
vt 0.894914 0.632147
vt 0.914094 0.858058
vt 0.908277 0.861681
vt 0.863881 0.436785
vt 0.869749 0.440407
vt 0.889098 0.861661
vt 0.883230 0.858039
vt 0.531090 0.632539
vt 0.525802 0.634527
vt 0.525802 0.606852
vt 0.531090 0.604865
vt 0.908277 0.214502
vt 0.914094 0.210879
vt 0.782198 0.435213
vt 0.789035 0.856782
vt 0.761467 0.857408
vt 0.754630 0.435839
vt 0.823417 0.211502
vt 0.816603 0.633071
vt 0.789035 0.632448
vt 0.795849 0.210879
vt 0.717250 0.014459
vt 0.717250 0.014459
vt 0.740514 0.000000
vt 0.974576 0.259453
vt 0.973975 0.225057
vt 0.992560 0.210879
vt 0.993161 0.245275
vt 0.753548 0.260468
vt 0.754630 0.719567
vt 0.749646 0.724777
vt 0.746721 0.223758
vt 0.742617 0.216089
vt 0.747601 0.210879
vt 0.754630 0.226145
vt 0.992000 0.730186
vt 0.969399 0.723737
vt 0.970561 0.718371
vt 0.993161 0.724820
vt 0.527891 0.000000
vt 0.533024 0.005185
vt 0.345667 0.978998
vt 0.334150 0.971992
vt 0.322117 0.965006
vt 0.323063 0.505903
vt 0.345667 0.499455
vt 0.061471 0.735801
vt 0.084178 0.739534
vt 0.084178 0.750921
vt 0.061471 0.747188
vt 0.061402 0.723899
vt 0.084109 0.727632
vt 0.717250 0.115799
vt 0.756487 0.007782
vt 0.751525 0.109002
vt 0.740514 0.101220
vt 0.745477 0.000000
vt 0.763052 0.015426
vt 0.763052 0.116800
vt 0.714001 0.748065
vt 0.691294 0.751799
vt 0.217065 0.543224
vt 0.229350 0.547359
vt 0.239504 0.600770
vt 0.227219 0.596635
vt 0.273697 0.117994
vt 0.274601 0.083610
vt 0.300568 0.103478
vt 0.341486 0.004919
vt 0.340582 0.039303
vt 0.299664 0.137862
vt 0.256530 0.514540
vt 0.255685 0.480181
vt 0.262080 0.485189
vt 0.262925 0.519548
vt 0.217130 0.415552
vt 0.192246 0.435023
vt 0.191402 0.400664
vt 0.216286 0.381193
vt 0.788994 0.009371
vt 0.788994 0.112674
vt 0.780519 0.121944
vt 0.780519 0.018640
vt 0.244691 0.719359
vt 0.229677 0.694175
vt 0.241808 0.691006
vt 0.256822 0.716189
vt 0.797976 0.103304
vt 0.797976 0.103304
vt 0.780519 0.121944
vt 0.947478 0.258507
vt 0.947551 0.224056
vt 0.969399 0.210879
vt 0.969325 0.245330
vt 0.347253 0.034384
vt 0.348156 0.494536
vt 0.341486 0.499455
vt 0.256822 0.663851
vt 0.256859 0.653076
vt 0.256822 0.642815
vt 0.262650 0.638760
vt 0.262651 0.659797
vt 0.348156 0.000000
vt 0.964146 0.731052
vt 0.943734 0.723818
vt 0.948987 0.718813
vt 0.969399 0.726048
vt 0.256530 0.000000
vt 0.262925 0.005008
vt 0.489132 1.000000
vt 0.478463 0.993392
vt 0.467279 0.986825
vt 0.468717 0.526520
vt 0.489132 0.519284
vt 0.246593 0.523683
vt 0.258382 0.527964
vt 0.241139 0.551640
vt 0.234309 0.519548
vt 0.797976 0.000000
vt 0.772039 0.112663
vt 0.772039 0.009368
vt 0.780519 0.018635
vt 0.780519 0.121930
vt 0.763052 0.103295
vt 0.763052 0.000000
vt 0.232080 0.722337
vt 0.217065 0.697153
vt 0.531090 0.664189
vt 0.525802 0.662201
vt 0.525802 0.634527
vt 0.531090 0.636514
vt 0.823417 0.857402
vt 0.795849 0.856779
vt 0.761467 0.211505
vt 0.789035 0.210879
vt 0.883230 0.210879
vt 0.889098 0.214501
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.000000 0.000000
vt 0.251293 0.605051
vt 0.258382 0.638760
vt 0.246593 0.634479
vt 0.234309 0.630343
vt 0.262925 0.062943
vt 0.263829 0.028558
vt 0.181248 0.489979
vt 0.180404 0.455620
vt 0.244691 0.641929
vt 0.256822 0.638760
vt 0.232080 0.644908
vt 0.348156 0.724456
vt 0.350583 0.690141
vt 0.361712 0.697753
vt 0.373357 0.705372
vt 0.370930 0.739687
vt 0.359285 0.732067
vt 0.361712 0.780537
vt 0.350583 0.772925
vt 0.429961 0.738737
vt 0.429961 0.690207
vt 0.691294 0.298430
vt 0.692376 0.264107
vt 0.468221 0.481611
vt 0.467279 0.447264
vt 0.373357 0.788156
vn -0.2010 0.1511 0.9679
vn -0.9796 -0.0310 -0.1986
vn 0.2010 -0.1511 -0.9679
vn 0.9796 0.0310 0.1986
vn -0.0000 -0.9880 0.1543
vn 0.0000 0.9880 -0.1543
vn -0.9796 0.0310 0.1986
vn -0.2010 -0.1511 -0.9679
vn 0.2010 0.1511 0.9679
vn 0.9796 -0.0310 -0.1986
vn 0.0000 -0.6153 0.7883
vn -1.0000 -0.0000 0.0000
vn 0.0000 0.6153 -0.7883
vn 1.0000 -0.0000 0.0000
vn 0.0000 -0.7883 -0.6153
vn 0.0000 0.7883 0.6153
vn 0.0000 -0.0000 1.0000
vn 0.0000 0.0000 -1.0000
vn 0.0000 -1.0000 0.0000
vn 0.0000 1.0000 0.0000
vn -0.9239 -0.3827 0.0000
vn -0.3827 -0.9239 0.0000
vn 0.3827 -0.9239 0.0000
vn 0.9239 -0.3827 0.0000
vn 0.9239 0.3827 0.0000
vn 0.3827 0.9239 0.0000
vn -0.3827 0.9239 0.0000
vn -0.9239 0.3827 0.0000
vn 0.0284 0.6521 -0.7576
vn 0.0273 0.6520 -0.7577
vn 0.0276 0.6521 -0.7576
vn -0.9793 -0.0575 -0.1940
vn 0.9562 0.1752 0.2343
vn 0.9614 0.1771 0.2106
vn 0.3279 -0.9076 -0.2623
vn -0.1696 0.9334 -0.3161
vn -0.1697 0.9334 -0.3162
vn -0.1732 0.9325 -0.3170
vn 0.0000 -0.9645 0.2639
vn 0.0000 0.2639 0.9645
vn 0.0000 -0.2639 -0.9645
vn 0.0001 0.7052 -0.7090
vn 0.3012 0.0944 -0.9489
vn -0.9088 -0.0550 -0.4135
vn -0.3003 0.9484 -0.1018
vn -0.9097 0.0325 -0.4139
vn -0.0418 -0.9991 -0.0102
vn 0.9652 0.1118 0.2365
vn -0.2303 -0.2363 0.9440
vn 0.2576 0.2358 -0.9370
vn 0.1697 -0.9334 0.3162
vn 0.1696 -0.9334 0.3161
vn 0.1732 -0.9325 0.3170
vn 0.1661 -0.9343 0.3153
vn 0.3146 -0.9114 -0.2653
vn -0.3279 0.9076 0.2623
vn -0.3872 0.8914 0.2355
vn -0.1661 0.9343 -0.3153
vn 0.0410 0.7775 -0.6275
vn 0.0430 0.7775 -0.6274
vn 0.0414 0.7775 -0.6275
vn -0.9614 0.1771 0.2106
vn 0.9562 -0.1752 -0.2343
vn 0.9614 -0.1772 -0.2106
vn 0.3279 0.9076 0.2623
vn -0.1696 -0.9334 0.3161
vn -0.1697 -0.9334 0.3162
vn -0.1732 -0.9325 0.3170
vn 0.0001 -0.7052 0.7090
vn 0.2407 -0.0834 0.9670
vn -0.9647 0.1165 0.2364
vn -0.2490 -0.9667 0.0583
vn -0.9562 0.1752 0.2343
vn -0.0418 0.9991 0.0102
vn 0.9652 -0.1118 -0.2365
vn -0.2303 0.2363 -0.9440
vn 0.2302 -0.2365 0.9440
vn 0.1697 0.9334 -0.3162
vn 0.1696 0.9334 -0.3161
vn 0.1732 0.9325 -0.3170
vn 0.1661 0.9343 -0.3153
vn 0.3146 0.9114 0.2653
vn -0.3279 -0.9076 -0.2623
vn -0.3146 -0.9114 -0.2653
vn -0.1661 -0.9343 0.3153
vn 0.0000 0.9645 -0.2639
vn 0.0000 -0.7913 -0.6115
vn 0.0000 0.7913 0.6115
vn -0.2407 0.0834 -0.9670
vn -0.9689 0.1926 -0.1554
vn 0.9689 -0.1926 0.1555
vn -0.0430 -0.7775 0.6275
vn -0.0426 -0.7775 0.6275
vn -0.0411 -0.7775 0.6275
vn -0.0410 -0.7775 0.6275
vn 0.0430 0.7775 -0.6275
vn -0.2407 -0.0834 0.9670
vn -0.0282 -0.6521 0.7576
vn -0.0286 -0.6520 0.7577
vn -0.0276 -0.6521 0.7576
vn 0.0286 0.6520 -0.7577
vn -0.9554 -0.1926 0.2239
vn 0.9554 0.1926 -0.2239
vn -0.0273 -0.6520 0.7577
usemtl Material.002
s 1
f 1/1/1 2/2/1 3/3/1 4/4/1
f 4/5/2 3/6/2 5/7/2 6/8/2
f 6/9/3 5/10/3 7/11/3 8/12/3
f 8/13/4 7/14/4 2/15/4 1/16/4
f 4/17/5 6/18/5 8/19/5 1/20/5
f 5/21/6 3/22/6 2/23/6 7/24/6
f 9/25/7 10/26/7 11/27/7 12/28/7
f 13/29/8 14/30/8 10/31/8 9/32/8
f 12/33/9 11/34/9 15/35/9 16/36/9
f 16/37/10 15/38/10 14/39/10 13/40/10
f 9/41/6 12/42/6 16/43/6 13/44/6
f 11/45/6 15/46/6 14/47/6 10/48/6
f 17/49/11 18/50/11 19/51/11 20/52/11
f 20/53/12 19/54/12 21/55/12 22/56/12
f 22/57/13 21/58/13 23/59/13 24/60/13
f 24/61/14 23/62/14 18/63/14 17/64/14
f 20/65/15 22/57/15 24/60/15 17/66/15
f 21/67/16 19/51/16 18/50/16 23/68/16
f 25/69/17 26/70/17 27/71/17 28/72/17
f 28/73/12 27/74/12 29/75/12 30/76/12
f 30/77/18 29/78/18 31/79/18 32/80/18
f 32/81/14 31/82/14 26/83/14 25/84/14
f 28/85/19 30/77/19 32/80/19 25/86/19
f 29/87/20 27/71/20 26/70/20 31/88/20
f 33/89/17 34/90/17 35/91/17 36/92/17
f 36/93/12 35/94/12 37/95/12 38/96/12
f 38/97/18 37/98/18 39/99/18 40/100/18
f 40/101/14 39/102/14 34/103/14 33/104/14
f 36/105/19 38/97/19 40/100/19 33/106/19
f 37/107/20 35/91/20 34/90/20 39/108/20
f 41/109/17 42/110/17 43/111/17 44/112/17
f 44/113/12 43/114/12 45/115/12 46/116/12
f 46/117/18 45/118/18 47/119/18 48/120/18
f 48/121/14 47/122/14 42/123/14 41/124/14
f 44/125/19 46/117/19 48/120/19 41/126/19
f 45/127/20 43/111/20 42/110/20 47/128/20
f 49/129/17 50/130/17 51/131/17 52/132/17
f 52/133/12 51/134/12 53/135/12 54/136/12
f 54/137/18 53/138/18 55/139/18 56/140/18
f 56/141/14 55/142/14 50/143/14 49/144/14
f 52/145/19 54/137/19 56/140/19 49/146/19
f 53/147/20 51/131/20 50/130/20 55/148/20
f 57/149/21 58/150/21 59/151/21 60/152/21
f 60/152/22 59/151/22 61/153/22 62/154/22
f 62/155/23 61/156/23 63/157/23 64/158/23
f 64/158/24 63/157/24 65/159/24 66/160/24
f 66/160/25 65/159/25 67/161/25 68/162/25
f 68/162/26 67/161/26 69/163/26 70/164/26
f 59/165/18 58/166/18 71/167/18 69/168/18 67/169/18 65/170/18 63/171/18 61/172/18
f 70/173/27 69/174/27 71/175/27 72/176/27
f 72/176/28 71/175/28 58/150/28 57/149/28
f 57/177/17 60/178/17 62/179/17 64/180/17 66/181/17 68/182/17 70/183/17 72/184/17
f 73/185/17 74/186/17 75/187/17 76/188/17
f 76/189/14 75/190/14 77/191/14 78/192/14
f 78/193/18 77/194/18 79/195/18 80/196/18
f 80/197/12 79/198/12 74/199/12 73/200/12
f 76/188/20 78/201/20 80/202/20 73/185/20
f 77/194/19 75/203/19 74/204/19 79/195/19
f 81/205/29 82/206/30 83/207/30 84/208/31
f 85/209/32 82/210/32 86/211/32 87/212/32 88/213/32 89/214/32
f 90/215/33 91/216/33 92/217/33 93/218/33
f 91/216/34 90/215/34 94/219/34 95/220/34 96/221/34 97/222/34
f 98/223/35 99/224/35 91/225/35 97/226/35
f 100/227/36 81/228/37 95/229/38 94/230/38
f 101/231/14 102/232/14 103/233/14 104/234/14
f 105/235/12 106/236/12 107/237/12 108/238/12
f 108/239/39 107/240/39 109/241/39 110/242/39
f 110/243/14 109/244/14 102/232/14 101/231/14
f 105/245/40 108/246/40 110/247/40 101/248/40
f 107/249/41 106/250/41 102/251/41 109/252/41
f 91/225/42 99/224/42 88/253/42 111/254/42 112/255/42
f 113/256/43 114/257/43 93/258/43 92/259/43
f 88/213/44 113/260/44 115/261/44 116/262/44
f 87/212/45 117/263/45 90/264/45 93/265/45 114/266/45
f 88/213/46 87/212/46 114/266/46 113/260/46
f 118/267/47 116/268/47 115/269/47 119/270/47
f 92/217/48 91/216/48 118/271/48 119/272/48
f 91/273/49 99/274/49 88/275/49 116/276/49 118/277/49
f 113/256/50 92/259/50 119/270/50 115/269/50
f 120/278/51 98/279/52 97/280/53 96/281/53
f 85/282/54 89/283/54 98/279/52 120/278/51
f 89/284/55 88/253/55 99/224/55 98/223/55
f 117/285/56 100/286/56 94/287/56 90/288/56
f 87/289/57 86/290/57 100/286/57 117/285/57
f 86/291/58 82/292/58 81/228/37 100/227/36
f 121/293/59 122/294/60 123/295/61 124/296/59
f 121/297/62 125/298/62 126/299/62 127/300/62 128/301/62 129/302/62
f 130/303/63 131/304/63 132/305/63 133/306/63
f 131/304/64 130/303/64 134/307/64 135/308/64 136/309/64 137/310/64
f 138/311/65 139/312/65 131/313/65 137/314/65
f 140/315/66 141/316/67 135/317/68 134/318/68
f 131/313/69 139/312/69 128/319/69 142/320/69 143/321/69
f 144/322/70 145/323/70 133/324/70 132/325/70
f 128/301/71 144/326/71 146/327/71 147/328/71
f 127/329/72 148/330/72 130/331/72 133/332/72 145/333/72
f 128/301/73 127/300/73 145/334/73 144/326/73
f 149/335/74 147/336/74 146/337/74 150/338/74
f 132/305/75 131/304/75 149/339/75 150/340/75
f 131/341/76 139/342/76 128/343/76 147/344/76 149/345/76
f 144/322/77 132/325/77 150/338/77 146/337/77
f 122/294/78 138/346/79 137/347/80 136/348/80
f 121/293/81 129/349/81 138/346/79 122/294/78
f 129/350/82 128/319/82 139/312/82 138/311/82
f 148/351/83 140/352/83 134/353/83 130/354/83
f 127/355/84 126/356/84 140/352/84 148/351/84
f 126/357/85 125/358/85 141/316/67 140/315/66
f 104/359/86 103/360/86 151/361/86 152/362/86
f 102/251/87 106/250/87 151/363/87 103/364/87
f 105/245/88 101/248/88 104/365/88 152/366/88
f 106/236/12 105/235/12 152/367/12 151/368/12
f 125/369/17 121/370/17 153/371/17 154/372/17
f 136/373/17 135/374/17 155/375/17 156/376/17
f 82/377/17 85/378/17 157/379/17 158/380/17
f 96/381/17 95/382/17 159/383/17 160/384/17
f 154/372/17 153/371/17 161/385/17 162/386/17
f 158/380/17 157/379/17 163/387/17 164/388/17
f 156/376/17 155/375/17 165/389/17 166/390/17
f 160/384/17 159/383/17 167/391/17 168/392/17
f 169/393/89 170/394/89 171/395/89 172/396/89 124/296/89 123/295/89
f 125/298/90 121/297/90 124/397/90 172/398/90
f 136/309/91 135/308/91 170/399/91 169/400/91
f 135/317/92 141/316/93 171/401/94 170/402/92
f 141/316/93 125/358/95 172/403/95 171/401/94
f 122/294/60 136/348/96 169/393/96 123/295/61
f 173/404/97 174/405/97 84/406/97 83/407/97 175/408/97 176/409/97
f 120/410/98 96/411/99 173/404/99 176/409/100
f 95/412/101 81/205/29 84/208/31 174/413/101
f 82/210/102 85/209/102 175/414/102 83/415/102
f 96/221/103 95/220/103 174/416/103 173/417/103
f 85/418/104 120/410/98 176/409/100 175/408/104
l 141 177
l 81 178
l 122 179
l 120 180

603
other.lua
View File

@@ -1,603 +0,0 @@
local pgad_rules={{x = 1, y = 0, z = 0},{x =-1, y = 0, z = 0},{x = 0, y = 1, z = 0},{x = 0, y =-1, z = 0},{x = 0, y = 0, z = 1},{x = 0, y = 0, z =-1}}
minetest.register_node("portalgun:cplps1", {
description = "Close player portal",
tiles = {"portalgun_gray.png"},
groups = {mesecon=2,snappy = 3, not_in_creative_inventory=0},
sounds = default.node_sound_stone_defaults(),
is_ground_content = false,
mesecons = {effector = {
action_on = function (pos, node)
for i, ob in pairs(minetest.get_objects_inside_radius(pos, 6)) do
if ob and ob:is_player() then
portal_delete(ob:get_player_name(),0)
end
end
minetest.swap_node(pos, {name="portalgun:cplps2"})
minetest.after((2), function(pos)
minetest.swap_node(pos, {name="portalgun:cplps1"})
end, pos)
return false
end,
}}
})
minetest.register_node("portalgun:cplps2", {
description = "Close player portal",
tiles = {"portalgun_gray.png^[colorize:#ffe85977"},
groups = {mesecon=2,snappy = 3, not_in_creative_inventory=1},
sounds = default.node_sound_stone_defaults(),
is_ground_content = false,
paramtype = "light",
light_source = 4,
})
minetest.register_node("portalgun:sign_v", {
description = "Sign V",
tiles = {"portalgun_v.png"},
inventory_image = "portalgun_v.png",
drop="portalgun:sign_x",
drawtype = "nodebox",
groups = {mesecon=2,snappy = 3, not_in_creative_inventory=1},
sounds = default.node_sound_wood_defaults(),
is_ground_content = false,
paramtype2 = "facedir",
paramtype = "light",
light_source = 5,
node_box = {
type="fixed",
fixed={-0.5,-0.5,0.45,0.5,0.5,0.5}},
mesecons = {effector = {
action_off = function (pos, node)
minetest.swap_node(pos, {name="portalgun:sign_x", param2=minetest.get_node(pos).param2})
end,
}}
})
minetest.register_node("portalgun:sign_x", {
description = "Sign X",
tiles = {"portalgun_x.png"},
inventory_image = "portalgun_x.png",
drawtype = "nodebox",
groups = {mesecon=2,snappy = 3, not_in_creative_inventory=0},
sounds = default.node_sound_wood_defaults(),
is_ground_content = false,
paramtype2 = "facedir",
paramtype = "light",
light_source = 3,
node_box = {
type="fixed",
fixed={-0.5,-0.5,0.45,0.5,0.5,0.5}},
mesecons = {effector = {
action_on = function (pos, node)
minetest.swap_node(pos, {name="portalgun:sign_v", param2=minetest.get_node(pos).param2})
end,
}}
})
local portaltarget_sig={
{1,"portalgun_blue.png"},
{2,"portalgun_orange.png"},
}
for ii = 1, #portaltarget_sig, 1 do
minetest.register_node("portalgun:portaltarget_" .. portaltarget_sig[ii][1], {
description = "Portal target " .. portaltarget_sig[ii][1] ,
tiles = {"portalgun_testblock.png^" .. portaltarget_sig[ii][2]},
groups = {mesecon = 2,cracky=2},
mesecons = {receptor = {state = "off"}},
sounds = default.node_sound_stone_defaults(),
is_ground_content = false,
paramtype2 = "facedir",
paramtype = "light",
on_timer = function (pos, elapsed)
for i, ob in pairs(minetest.get_objects_inside_radius(pos, 2)) do
if ob:get_luaentity() and ob:get_luaentity().portalgun and ob:get_luaentity().project==portaltarget_sig[ii][1] then
mesecon.receptor_on(pos)
return true
end
end
mesecon.receptor_off(pos)
return true
end,
on_construct = function(pos)
if not mesecon then return false end
minetest.get_node_timer(pos):start(2)
end,
})
end
minetest.register_node("portalgun:button", {
description = "Button",
tiles = {"portalgun_bu.png"},
groups = {cracky = 3,mesecon=1},
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
selection_box = {type = "fixed",fixed = { -0.2, -0.5, -0.2, 0.2, 0.85, 0.2 }},
sounds = default.node_sound_defaults(),
mesecons = {receptor = {state = "off"}},
on_rightclick = function(pos, node, clicker)
mesecon.receptor_on(pos)
minetest.get_node_timer(pos):start(2)
minetest.sound_play("default_dig_dig_immediate", {pos=pos,max_hear_distance = 10, gain = 1})
end,
on_timer = function (pos, elapsed)
mesecon.receptor_off(pos)
end,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-0.25, -0.5, -0.25, 0.25, 0.7, 0.25},
{-0.125, 0.5, -0.125, 0.125, 0.77, 0.125},
}}
})
minetest.register_node("portalgun:dmgblock_1", {
description = "Damage block (hurts when not active)",
tiles = {"portalgun_powerwall.png"},
groups = {cracky = 1,mesecon=2},
drawtype="glasslike",
paramtype="light",
alpha = 50,
sunlight_propagates = true,
sounds = default.node_sound_stone_defaults(),
walkable=false,
damage_per_second = 5,
mesecons = {conductor = {
state = mesecon.state.off,
onstate = "portalgun:dmgblock_2",
rules = pgad_rules
}},
})
minetest.register_node("portalgun:dmgblock_2", {
description = "Damage block",
tiles = {"portalgun_gravity.png"},
groups = {mesecon=2,not_in_creative_inventory=1},
drawtype="airlike",
pointable=false,
sunlight_propagates = true,
drop="portalgun:dmgblock_1",
paramtype="light",
walkable=false,
mesecons = {conductor = {
state = mesecon.state.on,
offstate = "portalgun:dmgblock_1",
rules = pgad_rules
}},
})
minetest.register_on_respawnplayer(function(player)
local name=player:get_player_name()
minetest.after(1, function(name)
if portalgun.checkpoints[name]~=nil then
player:move_to(portalgun.checkpoints[name])
end
end, name)
end)
minetest.register_on_leaveplayer(function(player)
local name=player:get_player_name()
if portalgun.checkpoints[name]~=nil then
portalgun.checkpoints[name]=nil
end
end)
minetest.register_node("portalgun:autocheckpoint", {
description = "Checkpoint (teleports to here on death)",
tiles = {"portalgun_checkpoint.png"},
groups = {cracky = 3,not_in_creative_inventory=0},
paramtype = "light",
sunlight_propagates = true,
light_source = 5,
sounds = default.node_sound_stone_defaults(),
drawtype="nodebox",
node_box = {
type="fixed",
fixed={-0.5,-0.5,-0.5,0.5,-0.4,0.5}},
on_construct = function(pos)
minetest.get_meta(pos):set_string("infotext","Checkpoint")
minetest.get_node_timer(pos):start(2)
end,
on_timer = function (pos, elapsed)
for i, ob in pairs(minetest.get_objects_inside_radius(pos, 1.5)) do
if ob:is_player() then
local name=ob:get_player_name()
if portalgun.checkpoints[name]~=nil then
local cp=portalgun.checkpoints[name]
if cp.x==pos.x and cp.y==pos.y and cp.z==pos.z then
return true
end
end
portal_delete(name,0)
portalgun_portal[name]=nil
portalgun.checkpoints[name]=pos
minetest.sound_play("portalgun_checkpoint", {pos=pos,max_hear_distance = 5, gain = 1})
minetest.chat_send_player(name, "<Portalgun> You will spawn here next time you die")
end
end
return true
end,
})
minetest.register_node("portalgun:powerdoor1_1", {
description = "Power door",
inventory_image = "portalgun_powerwall.png",
wield_image = "portalgun_powerwall.png",
groups = {mesecon=1,unbreakable = 1,not_in_creative_inventory=0},
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
sounds = default.node_sound_stone_defaults(),
drawtype="nodebox",
alpha = 160,
node_box = {
type="fixed",
fixed={-0.5,-0.5,0.4,0.5,0.5,0.5}},
tiles = {
{
name = "portalgun_powerwall1.png",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 0.2,
},
},
},
after_place_node = function(pos, placer, itemstack)
local name=placer:get_player_name()
minetest.get_meta(pos):set_string("owner",name)
local p2=minetest.get_node(pos)
pos.y=pos.y+1
local n=minetest.get_node(pos)
if n.name=="air" then
minetest.set_node(pos,{name="portalgun:powerdoor1_2",param2=p2.param2})
minetest.get_meta(pos):set_string("owner",name)
end
end,
on_punch = function(pos, node, player, pointed_thing)
local meta = minetest.get_meta(pos);
if meta:get_string("owner")==player:get_player_name() then
minetest.node_dig(pos,minetest.get_node(pos),player)
pos.y=pos.y+1
local un=minetest.get_node(pos).name
if un=="portalgun:powerdoor1_2" then
minetest.set_node(pos,{name="air"})
end
pos.y=pos.y-1
return true
end
end,
mesecons = {conductor = {
state = mesecon.state.off,
onstate = "portalgun:powerdoor2_1",
rules = pgad_rules
}},
})
minetest.register_node("portalgun:powerdoor1_2", {
description = "Power door",
inventory_image = "portalgun_powerwall.png",
groups = {mesecon=1,unbreakable = 1,not_in_creative_inventory=1},
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
sounds = default.node_sound_stone_defaults(),
drawtype="nodebox",
alpha = 160,
node_box = {
type="fixed",
fixed={-0.5,-0.5,0.4,0.5,0.5,0.5}},
tiles = {
{
name = "portalgun_powerwall1.png",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 0.2,
},
},
},
on_punch = function(pos, node, player, pointed_thing)
local meta = minetest.get_meta(pos);
if meta:get_string("owner")==player:get_player_name() then
minetest.set_node(pos,{name="air"})
pos.y=pos.y-1
local un=minetest.get_node(pos).name
if un=="portalgun:powerdoor1_1" then
minetest.node_dig(pos,minetest.get_node(pos),player)
end
pos.y=pos.y+1
return true
end
end,
mesecons = {conductor = {
state = mesecon.state.off,
onstate = "portalgun:powerdoor2_2",
rules = pgad_rules
}},
})
minetest.register_node("portalgun:powerdoor2_1", {
description = "Power door",
inventory_image = "portalgun_powerwall.png",
groups = {unbreakable=1,mesecon=1,not_in_creative_inventory=1},
paramtype = "light",
sunlight_propagates = true,
drawtype="airlike",
walkable = false,
pointable = false,
diggable = false,
mesecons = {conductor = {
state = mesecon.state.on,
offstate = "portalgun:powerdoor1_1",
rules = pgad_rules
}},
})
minetest.register_node("portalgun:powerdoor2_2", {
description = "Power door",
inventory_image = "portalgun_powerwall.png",
groups = {unbreakable=1,mesecon=1,not_in_creative_inventory=1},
paramtype = "light",
sunlight_propagates = true,
drawtype="airlike",
walkable = false,
pointable = false,
diggable = false,
mesecons = {conductor = {
state = mesecon.state.on,
offstate = "portalgun:powerdoor1_2",
rules = pgad_rules
}},
})
minetest.register_node("portalgun:delayer", {
description = "Delayer (Punsh to change time)",
tiles = {"portalgun_delayer.png","portalgun_testblock.png"},
groups = {dig_immediate = 2,mesecon=1},
sounds = default.node_sound_stone_defaults(),
paramtype = "light",
sunlight_propagates = true,
drawtype="nodebox",
node_box = {
type="fixed",
fixed={-0.5,-0.5,-0.5,0.5,-0.4,0.5}},
on_punch = function(pos, node, player, pointed_thing)
if minetest.is_protected(pos, player:get_player_name())==false then
local meta = minetest.get_meta(pos)
local time=meta:get_int("time")
if time>=10 then time=0 end
meta:set_int("time",time+1)
meta:set_string("infotext","Delayer (" .. (time+1) ..")")
end
end,
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_int("time",1)
meta:set_string("infotext","Delayer (1)")
meta:set_int("case",0)
end,
on_timer = function (pos, elapsed)
local meta = minetest.get_meta(pos)
if meta:get_int("case")==2 then
meta:set_int("case",0)
mesecon.receptor_off(pos)
end
if meta:get_int("case")==1 then
meta:set_int("case",2)
mesecon.receptor_on(pos)
minetest.get_node_timer(pos):start(meta:get_int("time"))
end
return false
end,
mesecons = {effector = {
action_on = function (pos, node)
local meta = minetest.get_meta(pos)
if meta:get_int("case")==0 then
meta:set_int("case",1)
minetest.get_node_timer(pos):start(meta:get_int("time"))
end
end,
}}
})
minetest.register_node("portalgun:testblocks", {
description = "Trapblock",
tiles = {"portalgun_testblock.png"},
groups = {cracky = 1,mesecon=2},
sounds = default.node_sound_stone_defaults(),
mesecons = {conductor = {
state = mesecon.state.off,
onstate = "portalgun:testblocks2",
rules = pgad_rules
}},
})
minetest.register_node("portalgun:testblocks2", {
description = "Damage block",
tiles = {"portalgun_gravity.png"},
groups = {mesecon=2,not_in_creative_inventory=1},
drawtype="airlike",
pointable=false,
sunlight_propagates = true,
drop="portalgun:testblocks",
paramtype="light",
walkable=false,
mesecons = {conductor = {
state = mesecon.state.on,
offstate = "portalgun:testblocks",
rules = pgad_rules
}},
})
minetest.register_node("portalgun:door_1", {
description = "Mesecon Door",
drop="portalgun:door_1",
drawtype = "nodebox",
paramtype = "light",
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.125, 0.5, 0.5, 0.125},
}
},
tiles = {"portalgun_testblock.png"},
groups = {mesecon=1,cracky = 1, level = 2, not_in_creative_inventory=0},
sounds = default.node_sound_stone_defaults(),
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
is_ground_content = false,
after_place_node = function(pos, placer, itemstack, pointed_thing)
local p={x=pos.x,y=pos.y+1,z=pos.z}
if minetest.registered_nodes[minetest.get_node(p).name].walkable then
return false
else
minetest.set_node(p, {name = "portalgun:door_2",param2=minetest.get_node(pos).param2})
end
end,
mesecons = {effector = {
action_on = function (pos, node)
local p={x=pos.x,y=pos.y+1,z=pos.z}
minetest.swap_node(p, {name="portalgun:door_open_2", param2=minetest.get_node(pos).param2})
minetest.swap_node(pos, {name="portalgun:door_open_1", param2=minetest.get_node(pos).param2})
minetest.sound_play("portalgun_door", {pos=pos, gain = 1, max_hear_distance = 5})
end,
}},
after_dig_node = function (pos, name, digger)
minetest.set_node({x=pos.x,y=pos.y+1,z=pos.z}, {name = "air"})
end,
})
minetest.register_node("portalgun:door_2", {
description = "Door 2-1",
drawtype = "nodebox",
drop="portalgun:door_1",
paramtype = "light",
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.125, 0.5, 0.5, 0.125},
}
},
tiles = {"portalgun_testblock.png"},
groups = {mesecon=1,cracky = 1, level = 2, not_in_creative_inventory=1},
sounds = default.node_sound_wood_defaults(),
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
is_ground_content = false,
mesecons = {effector = {
action_on = function (pos, node)
local p={x=pos.x,y=pos.y-1,z=pos.z}
minetest.swap_node(p, {name="portalgun:door_open_1", param2=minetest.get_node(pos).param2})
minetest.swap_node(pos, {name="portalgun:door_open_2", param2=minetest.get_node(pos).param2})
minetest.sound_play("portalgun_door", {pos=pos, gain = 1, max_hear_distance = 5})
end,
}},
after_dig_node = function (pos, name, digger)
minetest.set_node({x=pos.x,y=pos.y-1,z=pos.z}, {name = "air"})
end,
})
minetest.register_node("portalgun:door_open_1", {
description = "Door (open) 2-o-1",
drop="portalgun:door_1",
drawtype = "nodebox",
paramtype = "light",
node_box = {
type = "fixed",
fixed = {
{0.41, -0.5, -0.124, 1.41, 0.5, 0.125},
}
},
tiles = {"portalgun_testblock.png"},
groups = {mesecon=1,cracky = 1, level = 2, not_in_creative_inventory=1},
sounds = default.node_sound_wood_defaults(),
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
is_ground_content = false,
after_dig_node = function (pos, name, digger)
minetest.set_node({x=pos.x,y=pos.y+1,z=pos.z}, {name = "air"})
end,
mesecons = {effector = {
action_off = function (pos, node)
local p={x=pos.x,y=pos.y+1,z=pos.z}
minetest.sound_play("portalgun_door", {pos=pos, gain = 1, max_hear_distance = 5})
minetest.swap_node(p, {name="portalgun:door_2", param2=minetest.get_node(pos).param2})
minetest.swap_node(pos, {name="portalgun:door_1", param2=minetest.get_node(pos).param2})
end,
}}
})
minetest.register_node("portalgun:door_open_2", {
description = "Door (open) 2-o-1",
drawtype = "nodebox",
drop="portalgun:door_1",
paramtype = "light",
node_box = {
type = "fixed",
fixed = {
{0.41, -0.5, -0.124, 1.41, 0.5, 0.125},
}
},
tiles = {"portalgun_testblock.png"},
groups = {mesecon=1,cracky = 1, level = 2, not_in_creative_inventory=1},
sounds = default.node_sound_wood_defaults(),
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
is_ground_content = false,
after_dig_node = function (pos, name, digger)
minetest.set_node({x=pos.x,y=pos.y-1,z=pos.z}, {name = "air"})
end,
mesecons = {effector = {
action_off = function (pos, node)
local p={x=pos.x,y=pos.y-1,z=pos.z}
minetest.sound_play("portalgun_door", {pos=pos, gain = 1, max_hear_distance = 5})
minetest.swap_node(p, {name="portalgun:door_1", param2=minetest.get_node(pos).param2})
minetest.swap_node(pos, {name="portalgun:door_2", param2=minetest.get_node(pos).param2})
end,
}}
})

View File

@@ -1,137 +0,0 @@
minetest.register_node("portalgun:powerballspawner", {
description = "Power ball spawner" ,
tiles = {"default_steel_block.png","default_steel_block.png","default_steel_block.png","default_steel_block.png","default_steel_block.png","portalgun_powerballspawner.png"},
groups = {cracky=2},
sounds = default.node_sound_glass_defaults(),
is_ground_content = false,
paramtype2 = "facedir",
on_place = minetest.rotate_node,
on_construct = function(pos)
minetest.get_node_timer(pos):start(10)
end,
on_timer = function (pos, elapsed)
local dir=minetest.get_node(pos).param2
local v={x=0, y=0, z=0}
if dir==0 then v.z=-1
elseif dir==1 then v.x=-1
elseif dir==2 then v.z=1
elseif dir==3 then v.x=1
elseif dir==8 then v.y=-1
elseif dir==4 then v.y=1
end
local pv={x=pos.x+v.x, y=pos.y+v.y, z=pos.z+v.z}
portalgun.new=1
local m=minetest.add_entity(pv, "portalgun:powerball")
m:set_velocity({x=v.x*4, y=v.y*4, z=v.z*4})
return true
end,
})
minetest.register_node("portalgun:powerballspawner2", {
description = "Power ball spawner (spawn on activate)" ,
tiles = {"default_steel_block.png","default_steel_block.png","default_steel_block.png","default_steel_block.png","default_steel_block.png","portalgun_powerballspawner.png^[colorize:#aaaa0055"},
groups = {cracky=2,mesecon=1},
sounds = default.node_sound_glass_defaults(),
is_ground_content = false,
paramtype2 = "facedir",
on_place = minetest.rotate_node,
mesecons = {effector = {
action_on = function (pos, node)
local dir=minetest.get_node(pos).param2
local v={x=0, y=0, z=0}
if dir==0 then v.z=-1
elseif dir==1 then v.x=-1
elseif dir==2 then v.z=1
elseif dir==3 then v.x=1
elseif dir==8 then v.y=-1
elseif dir==4 then v.y=1
end
local pv={x=pos.x+v.x, y=pos.y+v.y, z=pos.z+v.z}
portalgun.new=1
local m=minetest.add_entity(pv, "portalgun:powerball")
m:set_velocity({x=v.x*4, y=v.y*4, z=v.z*4})
end
}}
})
minetest.register_entity("portalgun:powerball",{
hp_max = 1000,
physical = true,
weight = 0,
collisionbox = {-0.4,-0.4,-0.4, 0.4,0.4,0.4},
visual = "sprite",
visual_size = {x=1.1, y=1.1},
textures = {"portalgun_powrball.png"},
initial_sprite_basepos = {x=0, y=0},
is_visible = true,
makes_footstep_sound = false,
automatic_rotate = false,
portalgun=2,
powerball=1,
on_activate= function(self, staticdata)
if portalgun.new==0 then
self.object:remove()
return self
end
portalgun.new=0
local pos=self.object:get_pos()
self.sound=minetest.sound_play("portalgun_powerball", {pos=pos,max_hear_distance = 10, gain = 0.5})
minetest.sound_play("portalgun_powerballbonce", {pos=pos,max_hear_distance = 10, gain = 1})
end,
on_step= function(self, dtime)
self.timer=self.timer+dtime
if self.timer<0.2 then return self end
self.timer=0
local pos=self.object:get_pos()
for i, ob in pairs(minetest.get_objects_inside_radius(pos, 2)) do
if ob:is_player() or (ob:get_luaentity() and ob:get_luaentity().portalgun~=1 and ob:get_luaentity().wsc==nil and ob:get_luaentity().powerball~=1) then
ob:set_hp(0)
ob:punch(ob, {full_punch_interval=1.0,damage_groups={fleshy=9000}}, "default:bronze_pick", nil)
end
end
self.timer2=self.timer2+1
self.timer3=self.timer3+1
if self.timer3>=9 then
self.timer3=0
minetest.sound_stop(self.sound)
self.sound=minetest.sound_play("portalgun_powerball", {pos=pos,max_hear_distance = 10, gain = 0.5})
end
if self.timer2>40 then
minetest.sound_stop(self.sound)
self.object:set_hp(0)
self.object:punch(self.object, {full_punch_interval=1.0,damage_groups={fleshy=9000}}, "default:bronze_pick", nil)
return self
end
local v=self.object:get_velocity()
local nextn={x=pos.x+(v.x)/3, y=pos.y+(v.y)/3, z=pos.z+(v.z)/3}
local nname=minetest.get_node(nextn).name
if minetest.registered_nodes[nname].walkable then
if nname=="portalgun:powerballtarget" and mesecon then
mesecon.receptor_on(nextn)
minetest.get_node_timer(nextn):start(5)
end
self.object:set_velocity({x=v.x*-1, y=v.y*-1, z=v.z*-1})
minetest.sound_play("portalgun_powerballbonce", {pos=pos,max_hear_distance = 10, gain = 1})
end
end,
timer=0,
timer2=0,
timer3=0,
sound={}
})
minetest.register_node("portalgun:powerballtarget", {
description = "Power ball target" ,
tiles = {"portalgun_powerballstarget.png"},
groups = {mesecon = 2,cracky=2},
mesecons = {receptor = {state = "off"}},
sounds = default.node_sound_stone_defaults(),
is_ground_content = false,
on_timer = function (pos, elapsed)
mesecon.receptor_off(pos)
return false
end,
})

101
scripts/buildingblocks.lua Normal file
View File

@@ -0,0 +1,101 @@
stone_sounds = {}
stone_sounds.footstep = {name = "stone_walk", gain = 1.0}
stone_sounds.dug = {name = "stone_break", gain = 1.0}
stone_sounds.place = {name = "block_place", gain = 1.0}
glass_sounds = {}
glass_sounds.footstep = {name = "glass_walk", gain = 1.0}
glass_sounds.dug = {name = "glass_break", gain = 1.0}
glass_sounds.place = {name = "block_place", gain = 1.0}
wood_sounds = {}
wood_sounds.footstep = {name = "wood_walk", gain = 1.0}
wood_sounds.dug = {name = "wood_break", gain = 1.0}
wood_sounds.place = {name = "block_place", gain = 1.0}
local pgad_rules = {
{x = 1, y = 0, z = 0},
{x = -1, y = 0, z = 0},
{x = 0, y = 1, z = 0},
{x = 0, y = -1, z = 0},
{x = 0, y = 0, z = 1},
{x = 0, y = 0, z = -1}
}
minetest.register_node(
"portalgun:testblock",
{
description = "Test block",
tiles = {"portalgun_testblock.png"},
groups = {cracky = 1},
sounds = stone_sounds
}
)
minetest.register_node(
"portalgun:apb",
{
description = "Anti portal block",
tiles = {"portalgun_testblock.png^[colorize:#ffffffaa"},
groups = {cracky = 3, antiportal = 1},
sounds = stone_sounds
}
)
minetest.register_node(
"portalgun:apg",
{
description = "Anti portal glass",
drawtype = "glasslike",
paramtype = "light",
sunlight_propagates = true,
tiles = {"glass.png^[colorize:#ffffffaa"},
groups = {cracky = 1, antiportal = 1},
sounds = glass_sounds
}
)
minetest.register_node(
"portalgun:hard_glass",
{
description = "Hard glass",
drawtype = "glasslike",
paramtype = "light",
sunlight_propagates = true,
tiles = {"glass.png^[colorize:#ddddddaa"},
groups = {cracky = 1},
sounds = glass_sounds
}
)
minetest.register_node(
"portalgun:testblocks",
{
description = "Trapblock",
tiles = {"portalgun_testblock.png"},
groups = {cracky = 1, mesecon = 2},
sounds = stone_sounds,
mesecons = {
conductor = {
state = mesecon.state.off,
onstate = "portalgun:testblocks2",
rules = pgad_rules
}
}
}
)
minetest.register_node(
"portalgun:testblocks2",
{
description = "Air block",
tiles = {"portalgun_gravity.png"},
groups = {mesecon = 2, not_in_creative_inventory = 1},
drawtype = "airlike",
pointable = false,
sunlight_propagates = true,
drop = "portalgun:testblocks",
paramtype = "light",
walkable = false,
mesecons = {
conductor = {
state = mesecon.state.on,
offstate = "portalgun:testblocks",
rules = pgad_rules
}
}
}
)

51
scripts/button.lua Normal file
View File

@@ -0,0 +1,51 @@
local pgad_rules = {
{x = 1, y = 0, z = 0},
{x = -1, y = 0, z = 0},
{x = 0, y = 1, z = 0},
{x = 0, y = -1, z = 0},
{x = 0, y = 0, z = 1},
{x = 0, y = 0, z = -1}
}
stone_sounds = {}
stone_sounds.footstep = {name = "stone_walk", gain = 1.0}
stone_sounds.dug = {name = "stone_break", gain = 1.0}
stone_sounds.place = {name = "block_place", gain = 1.0}
glass_sounds = {}
glass_sounds.footstep = {name = "glass_walk", gain = 1.0}
glass_sounds.dug = {name = "glass_break", gain = 1.0}
glass_sounds.place = {name = "block_place", gain = 1.0}
wood_sounds = {}
wood_sounds.footstep = {name = "wood_walk", gain = 1.0}
wood_sounds.dug = {name = "wood_break", gain = 1.0}
wood_sounds.place = {name = "block_place", gain = 1.0}
minetest.register_node(
"portalgun:button",
{
description = "Button",
tiles = {"portalgun_bu.png"},
groups = {cracky = 3, mesecon = 1},
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
selection_box = {type = "fixed", fixed = {-0.2, -0.5, -0.2, 0.2, 0.85, 0.2}},
sounds = stone_sounds,
mesecons = {receptor = {state = "off"}},
on_rightclick = function(pos, node, clicker)
mesecon.receptor_on(pos)
minetest.get_node_timer(pos):start(2)
minetest.sound_play("button_press", {pos = pos, max_hear_distance = 10, gain = 1})
end,
on_timer = function(pos, elapsed)
mesecon.receptor_off(pos)
end,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-0.25, -0.5, -0.25, 0.25, 0.7, 0.25},
{-0.125, 0.5, -0.125, 0.125, 0.77, 0.125}
}
}
}
)

43
scripts/cake.lua Normal file
View File

@@ -0,0 +1,43 @@
stone_sounds = {}
stone_sounds.footstep = {name = "stone_walk", gain = 1.0}
stone_sounds.dug = {name = "stone_break", gain = 1.0}
stone_sounds.place = {name = "block_place", gain = 1.0}
glass_sounds = {}
glass_sounds.footstep = {name = "glass_walk", gain = 1.0}
glass_sounds.dug = {name = "glass_break", gain = 1.0}
glass_sounds.place = {name = "block_place", gain = 1.0}
wood_sounds = {}
wood_sounds.footstep = {name = "wood_walk", gain = 1.0}
wood_sounds.dug = {name = "wood_break", gain = 1.0}
wood_sounds.place = {name = "block_place", gain = 1.0}
minetest.register_node(
"portalgun:cake",
{
description = "Cake",
groups = {dig_immediate = 3, not_in_creative_inventory = 0},
paramtype = "light",
sunlight_propagates = true,
selection_box = {type = "fixed", fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.3}},
sounds = stone_sounds,
tiles = {
"dirt.png^portalgun_cake1.png",
"dirt.png^portalgun_cake2.png"
},
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-0.3125, -0.5, 0.375, 0.3125, -0.125, 0.4375},
{-0.3125, -0.5, -0.4375, 0.3125, -0.125, -0.375},
{-0.4375, -0.5, -0.3125, -0.375, -0.125, 0.3125},
{0.375, -0.5, -0.3125, 0.4375, -0.125, 0.3125},
{-0.375, -0.5, -0.375, 0.375, -0.125, 0.375},
{-0.25, -0.5, 0.4375, 0.25, -0.125, 0.5},
{-0.25, -0.5, -0.5, 0.25, -0.125, -0.4375},
{0.4375, -0.5, -0.25, 0.5, -0.125, 0.25},
{-0.5, -0.5, -0.25, -0.4375, -0.125, 0.25},
{0, -0.125, -0.0625, 0.0625, 0.1875, 0}
}
}
}
)

73
scripts/camera.lua Normal file
View File

@@ -0,0 +1,73 @@
stone_sounds = {}
stone_sounds.footstep = {name="stone_walk", gain=1.0}
stone_sounds.dug = {name="stone_break", gain=1.0}
stone_sounds.place = {name="block_place", gain=1.0}
glass_sounds = {}
glass_sounds.footstep = {name="glass_walk", gain=1.0}
glass_sounds.dug = {name="glass_break", gain=1.0}
glass_sounds.place = {name="block_place", gain=1.0}
wood_sounds = {}
wood_sounds.footstep = {name="wood_walk", gain=1.0}
wood_sounds.dug = {name="wood_break", gain=1.0}
wood_sounds.place = {name="block_place", gain=1.0}
minetest.register_node("portalgun:secam_off", {
description = "Security cam (off)" ,
tiles = {"portalgun_scam.png"},
drawtype = "nodebox",
walkable=false,
groups = {dig_immediate = 3},
sounds = glass_sounds,
is_ground_content = false,
paramtype = "light",
paramtype2 = "facedir",
node_box = {type="fixed",
fixed={ {-0.2, -0.5, -0.2, 0.2, -0.4, 0.2},
{-0.1, -0.2, -0.1, 0.1, -0.4, 0.1}}
},
on_place = minetest.rotate_node,
on_construct = function(pos)
minetest.get_meta(pos):set_string("infotext","click to activate")
end,
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
minetest.set_node(pos, {name ="portalgun:secam", param1 = node.param1, param2 = node.param2})
minetest.get_node_timer(pos):start(1)
end,
})
minetest.register_node("portalgun:secam", {
description = "Security cam",
tiles = {"portalgun_scam.png"},
drawtype = "nodebox",
walkable=false,
groups = {dig_immediate = 3,stone=1,not_in_creative_inventory=1},
sounds = glass_sounds,
is_ground_content = false,
paramtype = "light",
paramtype2 = "facedir",
drop="portalgun:secam_off",
node_box = {type="fixed",
fixed={ {-0.2, -0.5, -0.2, 0.2, -0.4, 0.2},
{-0.1, -0.2, -0.1, 0.1, -0.4, 0.1}}
},
on_timer=function(pos, elapsed)
for i, ob in pairs(minetest.get_objects_inside_radius(pos, 10)) do
if ob:is_player() or (ob:get_luaentity() and ob:get_luaentity().itemstring==nil and ob:get_luaentity().portalgun==nil) then
if portalgun_visiable(pos,ob) then
local v=ob:get_pos()
if not ob:get_luaentity() then v.y=v.y+1 end
local s={x=(v.x-pos.x)*3,y=(v.y-pos.y)*3,z=(v.z-pos.z)*3}
local m=minetest.add_entity(pos, "portalgun:bullet1")
m:set_velocity(s)
m:set_acceleration(s)
minetest.sound_play("portalgun_bullet1", {pos=pos, gain = 1, max_hear_distance = 15,})
minetest.after((math.random(1,9)*0.1), function(pos,s,v)
local m=minetest.add_entity(pos, "portalgun:bullet1")
m:set_velocity(s)
m:set_acceleration(s)
minetest.sound_play("portalgun_bullet1", {pos=pos, gain = 1, max_hear_distance = 15,})
end, pos,s,v)
end
end
end
return true
end,
})

64
scripts/checkpoint.lua Normal file
View File

@@ -0,0 +1,64 @@
stone_sounds = {}
stone_sounds.footstep = {name = "stone_walk", gain = 1.0}
stone_sounds.dug = {name = "stone_break", gain = 1.0}
stone_sounds.place = {name = "block_place", gain = 1.0}
glass_sounds = {}
glass_sounds.footstep = {name = "glass_walk", gain = 1.0}
glass_sounds.dug = {name = "glass_break", gain = 1.0}
glass_sounds.place = {name = "block_place", gain = 1.0}
wood_sounds = {}
wood_sounds.footstep = {name = "wood_walk", gain = 1.0}
wood_sounds.dug = {name = "wood_break", gain = 1.0}
wood_sounds.place = {name = "block_place", gain = 1.0}
checkpoints={}
minetest.register_node("portalgun:autocheckpoint", {
description = "Checkpoint (teleports to here on death)",
tiles = {"portalgun_checkpoint.png"},
groups = {cracky = 3,not_in_creative_inventory=0},
paramtype = "light",
sunlight_propagates = true,
light_source = 5,
sounds = stone_sounds,
drawtype="nodebox",
node_box = {
type="fixed",
fixed={-0.5,-0.5,-0.5,0.5,-0.4,0.5}},
on_construct = function(pos)
minetest.get_meta(pos):set_string("infotext","Checkpoint")
minetest.get_node_timer(pos):start(2)
end,
on_timer = function (pos, elapsed)
for i, ob in pairs(minetest.get_objects_inside_radius(pos, 1.5)) do
if ob:is_player() then
local name=ob:get_player_name()
if checkpoints[name]~=nil then
local cp=checkpoints[name]
if cp.x==pos.x and cp.y==pos.y and cp.z==pos.z then
return true
end
end
portal_delete(name,0)
portalgun_portal[name]=nil
checkpoints[name]=pos
minetest.sound_play("portalgun_checkpoint", {pos=pos,max_hear_distance = 5, gain = 1})
minetest.chat_send_player(name, "<Portalgun> You will spawn here next time you die")
end
end
return true
end,
})
minetest.register_on_respawnplayer(function(player)
local name=player:get_player_name()
minetest.after(1, function(name)
if checkpoints[name]~=nil then
player:move_to(checkpoints[name])
end
end, name)
end)
minetest.register_on_leaveplayer(function(player)
local name=player:get_player_name()
if checkpoints[name]~=nil then
checkpoints[name]=nil
end
end)

101
scripts/cubespawners.lua Normal file
View File

@@ -0,0 +1,101 @@
stone_sounds = {}
stone_sounds.footstep = {name = "stone_walk", gain = 1.0}
stone_sounds.dug = {name = "stone_break", gain = 1.0}
stone_sounds.place = {name = "block_place", gain = 1.0}
glass_sounds = {}
glass_sounds.footstep = {name = "glass_walk", gain = 1.0}
glass_sounds.dug = {name = "glass_break", gain = 1.0}
glass_sounds.place = {name = "block_place", gain = 1.0}
wood_sounds = {}
wood_sounds.footstep = {name = "wood_walk", gain = 1.0}
wood_sounds.dug = {name = "wood_break", gain = 1.0}
wood_sounds.place = {name = "block_place", gain = 1.0}
new = 0
local ptgwsc = {
{"weightedstoragecube.png", "portalgun_presplat.png", "(blue)"},
{"weightedstoragecube2.png", "portalgun_presplat2.png", "(orange)"},
{"weightedstoragecube3.png", "portalgun_presplat3.png", "(yellow)"},
{"weightedstoragecube4.png", "portalgun_presplat4.png", "(green)"},
{"weightedcompanioncube.png", "portalgun_presplat.png", "(blue companion)"},
{"weightedcompanioncube2.png", "portalgun_presplat2.png", "(orange companion)"},
{"weightedcompanioncube3.png", "portalgun_presplat3.png", "(yellow companion)"},
{"weightedcompanioncube4.png", "portalgun_presplat4.png", "(green companion)"}
}
for ii = 1, #ptgwsc, 1 do
minetest.register_node(
"portalgun:wscspawner2_" .. ii,
{
description = "Weighted storage cube spawner2 " .. ptgwsc[ii][3],
tiles = {"steel.png", "steel.png", "steel.png", "steel.png", "steel.png", ptgwsc[ii][1]},
groups = {cracky = 2, mesecon_receptor_off = 1, mesecon_effector_off = 1},
sounds = glass_sounds,
is_ground_content = false,
paramtype2 = "facedir",
mesecons = {
receptor = {state = "off"},
effector = {
action_on = function(pos, node)
local dir = minetest.get_node(pos).param2
local v = {x = 0, y = 0, z = 0}
if dir == 0 then
v.z = -1
elseif dir == 1 then
v.x = -1.2
elseif dir == 2 then
v.z = 1.2
elseif dir == 3 then
v.x = 1.2
elseif dir == 8 then
v.y = -1.2
elseif dir == 4 then
v.y = 1.2
end
local pv = {x = pos.x + v.x, y = pos.y + v.y, z = pos.z + v.z}
new = 1
local m = minetest.add_entity(pv, "portalgun:wsc" .. ii)
m:set_acceleration({x = 0, y = -10, z = 0})
end
}
}
}
)
minetest.register_node(
"portalgun:wscspawner" .. ii,
{
description = "Weighted storage cube spawner " .. ptgwsc[ii][3],
tiles = {ptgwsc[ii][1]},
groups = {cracky = 1, not_in_creative_inventory = 0},
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
light_source = 14,
sounds = stone_sounds,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-0.7, -0.5, -0.7, 0.7, -0.375, 0.7},
{0.7, -0.5, -0.1875, 0.9, -0.4375, 0.1875},
{-0.9, -0.5, -0.1875, -0.7, -0.4375, 0.1875},
{-0.1875, -0.5, -0.9, 0.1875, -0.4375, -0.7},
{-0.1875, -0.5, 0.7, 0.1875, -0.4375, 0.9}
}
},
on_construct = function(pos)
minetest.get_node_timer(pos):start(5)
end,
on_timer = function(pos, elapsed)
for i, ob in pairs(minetest.get_objects_inside_radius(pos, 40)) do
if ob:get_luaentity() and ob:get_luaentity().wsc == ii then
return true
end
end
new = 1
local m = minetest.add_entity(pos, "portalgun:wsc" .. ii)
m:set_acceleration({x = 0, y = -10, z = 0})
return true
end
}
)
end -- of for #

63
scripts/damageblock.lua Normal file
View File

@@ -0,0 +1,63 @@
local pgad_rules = {
{x = 1, y = 0, z = 0},
{x = -1, y = 0, z = 0},
{x = 0, y = 1, z = 0},
{x = 0, y = -1, z = 0},
{x = 0, y = 0, z = 1},
{x = 0, y = 0, z = -1}
}
stone_sounds = {}
stone_sounds.footstep = {name = "stone_walk", gain = 1.0}
stone_sounds.dug = {name = "stone_break", gain = 1.0}
stone_sounds.place = {name = "block_place", gain = 1.0}
glass_sounds = {}
glass_sounds.footstep = {name = "glass_walk", gain = 1.0}
glass_sounds.dug = {name = "glass_break", gain = 1.0}
glass_sounds.place = {name = "block_place", gain = 1.0}
wood_sounds = {}
wood_sounds.footstep = {name = "wood_walk", gain = 1.0}
wood_sounds.dug = {name = "wood_break", gain = 1.0}
wood_sounds.place = {name = "block_place", gain = 1.0}
minetest.register_node(
"portalgun:dmgblock_1",
{
description = "Damage block (hurts when not active)",
tiles = {"portalgun_powerwall.png"},
groups = {cracky = 1, mesecon = 2},
drawtype = "glasslike",
paramtype = "light",
use_texture_alpha = "blend",
sunlight_propagates = true,
sounds = stone_sounds,
walkable = false,
damage_per_second = 5,
mesecons = {
conductor = {
state = mesecon.state.off,
onstate = "portalgun:dmgblock_2",
rules = pgad_rules
}
}
}
)
minetest.register_node(
"portalgun:dmgblock_2",
{
description = "Damage block",
tiles = {"portalgun_gravity.png"},
groups = {mesecon = 2, not_in_creative_inventory = 1},
drawtype = "airlike",
pointable = false,
sunlight_propagates = true,
drop = "portalgun:dmgblock_1",
paramtype = "light",
walkable = false,
mesecons = {
conductor = {
state = mesecon.state.on,
offstate = "portalgun:dmgblock_1",
rules = pgad_rules
}
}
}
)

78
scripts/delayer.lua Normal file
View File

@@ -0,0 +1,78 @@
local pgad_rules = {
{x = 1, y = 0, z = 0},
{x = -1, y = 0, z = 0},
{x = 0, y = 1, z = 0},
{x = 0, y = -1, z = 0},
{x = 0, y = 0, z = 1},
{x = 0, y = 0, z = -1}
}
stone_sounds = {}
stone_sounds.footstep = {name = "stone_walk", gain = 1.0}
stone_sounds.dug = {name = "stone_break", gain = 1.0}
stone_sounds.place = {name = "block_place", gain = 1.0}
glass_sounds = {}
glass_sounds.footstep = {name = "glass_walk", gain = 1.0}
glass_sounds.dug = {name = "glass_break", gain = 1.0}
glass_sounds.place = {name = "block_place", gain = 1.0}
wood_sounds = {}
wood_sounds.footstep = {name = "wood_walk", gain = 1.0}
wood_sounds.dug = {name = "wood_break", gain = 1.0}
wood_sounds.place = {name = "block_place", gain = 1.0}
minetest.register_node(
"portalgun:delayer",
{
description = "Delayer (Punsh to change time)",
tiles = {"portalgun_delayer.png", "portalgun_testblock.png"},
groups = {dig_immediate = 2, mesecon = 1},
sounds = stone_sounds,
paramtype = "light",
sunlight_propagates = true,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -0.4, 0.5}
},
on_punch = function(pos, node, player, pointed_thing)
if minetest.is_protected(pos, player:get_player_name()) == false then
local meta = minetest.get_meta(pos)
local time = meta:get_int("time")
if time >= 10 then
time = 0
end
meta:set_int("time", time + 1)
meta:set_string("infotext", "Delayer (" .. (time + 1) .. ")")
end
end,
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_int("time", 1)
meta:set_string("infotext", "Delayer (1)")
meta:set_int("case", 0)
end,
on_timer = function(pos, elapsed)
local meta = minetest.get_meta(pos)
if meta:get_int("case") == 2 then
meta:set_int("case", 0)
mesecon.receptor_off(pos)
end
if meta:get_int("case") == 1 then
meta:set_int("case", 2)
mesecon.receptor_on(pos)
minetest.get_node_timer(pos):start(meta:get_int("time"))
end
return false
end,
mesecons = {
effector = {
action_on = function(pos, node)
local meta = minetest.get_meta(pos)
if meta:get_int("case") == 0 then
meta:set_int("case", 1)
minetest.get_node_timer(pos):start(meta:get_int("time"))
end
end
}
}
}
)

322
scripts/doors.lua Normal file
View File

@@ -0,0 +1,322 @@
local pgad_rules = {
{x = 1, y = 0, z = 0},
{x = -1, y = 0, z = 0},
{x = 0, y = 1, z = 0},
{x = 0, y = -1, z = 0},
{x = 0, y = 0, z = 1},
{x = 0, y = 0, z = -1}
}
stone_sounds = {}
stone_sounds.footstep = {name = "stone_walk", gain = 1.0}
stone_sounds.dug = {name = "stone_break", gain = 1.0}
stone_sounds.place = {name = "block_place", gain = 1.0}
glass_sounds = {}
glass_sounds.footstep = {name = "glass_walk", gain = 1.0}
glass_sounds.dug = {name = "glass_break", gain = 1.0}
glass_sounds.place = {name = "block_place", gain = 1.0}
wood_sounds = {}
wood_sounds.footstep = {name = "wood_walk", gain = 1.0}
wood_sounds.dug = {name = "wood_break", gain = 1.0}
wood_sounds.place = {name = "block_place", gain = 1.0}
minetest.register_node(
"portalgun:powerdoor1_1",
{
description = "Power door",
inventory_image = "portalgun_powerwall.png",
wield_image = "portalgun_powerwall.png",
groups = {mesecon = 1, unbreakable = 1, not_in_creative_inventory = 0},
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
sounds = stone_sounds,
drawtype = "nodebox",
use_texture_alpha = "blend",
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0.4, 0.5, 0.5, 0.5}
},
tiles = {
{
name = "portalgun_powerwall1.png",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 0.2
}
}
},
after_place_node = function(pos, placer, itemstack)
local name = placer:get_player_name()
minetest.get_meta(pos):set_string("owner", name)
local p2 = minetest.get_node(pos)
pos.y = pos.y + 1
local n = minetest.get_node(pos)
if n.name == "air" then
minetest.set_node(pos, {name = "portalgun:powerdoor1_2", param2 = p2.param2})
minetest.get_meta(pos):set_string("owner", name)
end
end,
on_punch = function(pos, node, player, pointed_thing)
local meta = minetest.get_meta(pos)
if meta:get_string("owner") == player:get_player_name() then
minetest.node_dig(pos, minetest.get_node(pos), player)
pos.y = pos.y + 1
local un = minetest.get_node(pos).name
if un == "portalgun:powerdoor1_2" then
minetest.set_node(pos, {name = "air"})
end
pos.y = pos.y - 1
return true
end
end,
mesecons = {
conductor = {
state = mesecon.state.off,
onstate = "portalgun:powerdoor2_1",
rules = pgad_rules
}
}
}
)
minetest.register_node(
"portalgun:powerdoor1_2",
{
description = "Power door",
inventory_image = "portalgun_powerwall.png",
groups = {mesecon = 1, unbreakable = 1, not_in_creative_inventory = 1},
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
sounds = stone_sounds,
drawtype = "nodebox",
use_texture_alpha = "blend",
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0.4, 0.5, 0.5, 0.5}
},
tiles = {
{
name = "portalgun_powerwall1.png",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 0.2
}
}
},
on_punch = function(pos, node, player, pointed_thing)
local meta = minetest.get_meta(pos)
if meta:get_string("owner") == player:get_player_name() then
minetest.set_node(pos, {name = "air"})
pos.y = pos.y - 1
local un = minetest.get_node(pos).name
if un == "portalgun:powerdoor1_1" then
minetest.node_dig(pos, minetest.get_node(pos), player)
end
pos.y = pos.y + 1
return true
end
end,
mesecons = {
conductor = {
state = mesecon.state.off,
onstate = "portalgun:powerdoor2_2",
rules = pgad_rules
}
}
}
)
minetest.register_node(
"portalgun:powerdoor2_1",
{
description = "Power door",
inventory_image = "portalgun_powerwall.png",
groups = {unbreakable = 1, mesecon = 1, not_in_creative_inventory = 1},
paramtype = "light",
sunlight_propagates = true,
drawtype = "airlike",
walkable = false,
pointable = false,
diggable = false,
mesecons = {
conductor = {
state = mesecon.state.on,
offstate = "portalgun:powerdoor1_1",
rules = pgad_rules
}
}
}
)
minetest.register_node(
"portalgun:powerdoor2_2",
{
description = "Power door",
inventory_image = "portalgun_powerwall.png",
groups = {unbreakable = 1, mesecon = 1, not_in_creative_inventory = 1},
paramtype = "light",
sunlight_propagates = true,
drawtype = "airlike",
walkable = false,
pointable = false,
diggable = false,
mesecons = {
conductor = {
state = mesecon.state.on,
offstate = "portalgun:powerdoor1_2",
rules = pgad_rules
}
}
}
)
minetest.register_node(
"portalgun:door_1",
{
description = "Mesecon Door",
drop = "portalgun:door_1",
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.125, 0.5, 0.5, 0.125}
}
},
tiles = {"portalgun_testblock.png"},
groups = {mesecon = 1, cracky = 1, level = 2, not_in_creative_inventory = 0},
sounds = stone_sounds,
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
is_ground_content = false,
after_place_node = function(pos, placer, itemstack, pointed_thing)
local p = {x = pos.x, y = pos.y + 1, z = pos.z}
if minetest.registered_nodes[minetest.get_node(p).name].walkable then
return false
else
minetest.set_node(p, {name = "portalgun:door_2", param2 = minetest.get_node(pos).param2})
end
end,
mesecons = {
effector = {
action_on = function(pos, node)
local p = {x = pos.x, y = pos.y + 1, z = pos.z}
minetest.swap_node(p, {name = "portalgun:door_open_2", param2 = minetest.get_node(pos).param2})
minetest.swap_node(pos, {name = "portalgun:door_open_1", param2 = minetest.get_node(pos).param2})
minetest.sound_play("portalgun_door", {pos = pos, gain = 1, max_hear_distance = 5})
end
}
},
after_dig_node = function(pos, name, digger)
minetest.set_node({x = pos.x, y = pos.y + 1, z = pos.z}, {name = "air"})
end
}
)
minetest.register_node(
"portalgun:door_2",
{
description = "Door 2-1",
drawtype = "nodebox",
drop = "portalgun:door_1",
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.125, 0.5, 0.5, 0.125}
}
},
tiles = {"portalgun_testblock.png"},
groups = {mesecon = 1, cracky = 1, level = 2, not_in_creative_inventory = 1},
sounds = wood_sounds,
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
is_ground_content = false,
mesecons = {
effector = {
action_on = function(pos, node)
local p = {x = pos.x, y = pos.y - 1, z = pos.z}
minetest.swap_node(p, {name = "portalgun:door_open_1", param2 = minetest.get_node(pos).param2})
minetest.swap_node(pos, {name = "portalgun:door_open_2", param2 = minetest.get_node(pos).param2})
minetest.sound_play("portalgun_door", {pos = pos, gain = 1, max_hear_distance = 5})
end
}
},
after_dig_node = function(pos, name, digger)
minetest.set_node({x = pos.x, y = pos.y - 1, z = pos.z}, {name = "air"})
end
}
)
minetest.register_node(
"portalgun:door_open_1",
{
description = "Door (open) 2-o-1",
drop = "portalgun:door_1",
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{0.41, -0.5, -0.124, 1.41, 0.5, 0.125}
}
},
tiles = {"portalgun_testblock.png"},
groups = {mesecon = 1, cracky = 1, level = 2, not_in_creative_inventory = 1},
sounds = wood_sounds,
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
is_ground_content = false,
after_dig_node = function(pos, name, digger)
minetest.set_node({x = pos.x, y = pos.y + 1, z = pos.z}, {name = "air"})
end,
mesecons = {
effector = {
action_off = function(pos, node)
local p = {x = pos.x, y = pos.y + 1, z = pos.z}
minetest.sound_play("portalgun_door", {pos = pos, gain = 1, max_hear_distance = 5})
minetest.swap_node(p, {name = "portalgun:door_2", param2 = minetest.get_node(pos).param2})
minetest.swap_node(pos, {name = "portalgun:door_1", param2 = minetest.get_node(pos).param2})
end
}
}
}
)
minetest.register_node(
"portalgun:door_open_2",
{
description = "Door (open) 2-o-1",
drawtype = "nodebox",
drop = "portalgun:door_1",
node_box = {
type = "fixed",
fixed = {
{0.41, -0.5, -0.124, 1.41, 0.5, 0.125}
}
},
tiles = {"portalgun_testblock.png"},
groups = {mesecon = 1, cracky = 1, level = 2, not_in_creative_inventory = 1},
sounds = wood_sounds,
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
is_ground_content = false,
after_dig_node = function(pos, name, digger)
minetest.set_node({x = pos.x, y = pos.y - 1, z = pos.z}, {name = "air"})
end,
mesecons = {
effector = {
action_off = function(pos, node)
local p = {x = pos.x, y = pos.y - 1, z = pos.z}
minetest.sound_play("portalgun_door", {pos = pos, gain = 1, max_hear_distance = 5})
minetest.swap_node(p, {name = "portalgun:door_1", param2 = minetest.get_node(pos).param2})
minetest.swap_node(pos, {name = "portalgun:door_2", param2 = minetest.get_node(pos).param2})
end
}
}
}
)

64
scripts/editingtools.lua Normal file
View File

@@ -0,0 +1,64 @@
minetest.register_tool(
"portalgun:pick",
{
--a pickaxe that can mine all blocks
description = "Portalgun Pickaxe",
inventory_image = "portalgun_pick.png",
tool_capabilities = {
full_punch_interval = 1.0,
max_drop_level = 3,
groupcaps = {
unbreakable = {times = {[1] = 1, [2] = 1, [3] = 1}, uses = 0, maxlevel = 3},
fleshy = {times = {[1] = 1, [2] = 1, [3] = 1}, uses = 0, maxlevel = 3},
choppy = {times = {[1] = 1, [2] = 1, [3] = 1}, uses = 0, maxlevel = 3},
bendy = {times = {[1] = 1, [2] = 1, [3] = 1}, uses = 0, maxlevel = 3},
cracky = {times = {[1] = 1, [2] = 1, [3] = 1}, uses = 0, maxlevel = 3},
crumbly = {times = {[1] = 1, [2] = 1, [3] = 1}, uses = 0, maxlevel = 3},
snappy = {times = {[1] = 1, [2] = 1, [3] = 1}, uses = 0, maxlevel = 3}
},
damage_groups = {fleshy = 1000}
}
}
)
minetest.register_tool(
"portalgun:ed",
{
description = "Entity Destroyer",
inventory_image = "portalgun_edestroyer.png",
range = 15,
on_use = function(itemstack, user, pointed_thing)
local pos = user:get_pos()
if pointed_thing.type == "node" then
pos = pointed_thing.above
end
if pointed_thing.type == "object" then
pos = pointed_thing.ref:get_pos()
end
local name = user:get_player_name()
if minetest.check_player_privs(name, {kick = true}) == false then
minetest.chat_send_player(name, "You need the kick privilege to use this tool!")
return itemstack
end
for ii, ob in pairs(minetest.get_objects_inside_radius(pos, 7)) do
if ob:get_luaentity() then
ob:set_hp(0)
end
end
return itemstack
end
}
)
--register command for admins to build a testblock at the players position
minetest.register_chatcommand(
"testblock",
{
params = "",
description = "builds a testblock at the players position",
privs = {server = true},
func = function(name, param)
local player = minetest.get_player_by_name(name)
local pos = player:get_pos()
minetest.set_node(pos, {name = "portalgun:testblock"})
end
}
)

88
scripts/fizzlers.lua Normal file
View File

@@ -0,0 +1,88 @@
stone_sounds = {}
stone_sounds.footstep = {name = "stone_walk", gain = 1.0}
stone_sounds.dug = {name = "stone_break", gain = 1.0}
stone_sounds.place = {name = "block_place", gain = 1.0}
glass_sounds = {}
glass_sounds.footstep = {name = "glass_walk", gain = 1.0}
glass_sounds.dug = {name = "glass_break", gain = 1.0}
glass_sounds.place = {name = "block_place", gain = 1.0}
wood_sounds = {}
wood_sounds.footstep = {name = "wood_walk", gain = 1.0}
wood_sounds.dug = {name = "wood_break", gain = 1.0}
wood_sounds.place = {name = "block_place", gain = 1.0}
minetest.register_node(
"portalgun:cplps1",
{
description = "Close player portal",
tiles = {"portalgun_gray.png"},
groups = {mesecon = 2, snappy = 3, not_in_creative_inventory = 0},
sounds = stone_sounds,
is_ground_content = false,
mesecons = {
effector = {
action_on = function(pos, node)
for i, ob in pairs(minetest.get_objects_inside_radius(pos, 6)) do
if ob and ob:is_player() then
portal_delete(ob:get_player_name(), 0)
end
end
minetest.swap_node(pos, {name = "portalgun:cplps2"})
minetest.after(
(2),
function(pos)
minetest.swap_node(pos, {name = "portalgun:cplps1"})
end,
pos
)
return false
end
}
}
}
)
minetest.register_node(
"portalgun:cplps3",
{
description = "Close player portal when player is near",
tiles = {"portalgun_gray.png"},
groups = {snappy = 3, not_in_creative_inventory = 0},
sounds = stone_sounds,
is_ground_content = false,
--every 2 seconds, check if player is near and close portal if so
on_t = function(pos, elapsed)
for i, ob in pairs(minetest.get_objects_inside_radius(pos, 4)) do
if ob and ob:is_player() then
minetest.sound_play("portalgun_close", {pos = pos, gain = 1.0, max_hear_distance = 10})
portal_delete(ob:get_player_name(), 0)
end
--destroy all entities except players
if ob and not ob:is_player() then
ob:remove()
end
end
local timer = minetest.get_node_timer(pos)
timer:start(2)
return true
end,
after_place_node = function(pos, placer, itemstack, pointed_thing)
local timer = minetest.get_node_timer(pos)
timer:start(2)
end
}
)
minetest.register_node(
"portalgun:cplps2",
{
description = "Close player portal",
tiles = {"portalgun_gray.png^[colorize:#ffe85977"},
groups = {mesecon = 2, snappy = 3, not_in_creative_inventory = 1},
sounds = stone_sounds,
is_ground_content = false,
paramtype = "light",
light_source = 4
}
)

173
scripts/gravityuse.lua Normal file
View File

@@ -0,0 +1,173 @@
portalgun_power = {}
portalgun_power_tmp_power = 0
function portalgun_gravity(itemstack, user, pointed_thing)
local ob = pointed_thing.ref
local at = ob:get_attach()
if at and at:get_luaentity() and at:get_luaentity().portalgun_power then
ob:set_detach()
local target = at:get_luaentity().target
if target and target:get_luaentity() and (target:get_luaentity().itemstring or target:get_luaentity().wsc) then
target:set_velocity({x = 0, y = -1, z = 0})
target:set_acceleration({x = 0, y = -8, z = 0})
end
return itemstack
end
if not ob:get_attach() and (ob:is_player() or (ob:get_luaentity() and ob:get_luaentity().powerball ~= 1)) then
--if 4 blocks or closer to player
if vector.distance(ob:get_pos(), user:get_pos()) < 4 then
portalgun_power.user = user
portalgun_power.target = ob
if ob:is_player() then
portalgun_power.player = 1
end
local m = minetest.add_entity(ob:get_pos(), "portalgun:power")
ob:set_attach(m, "", {x = 0, y = 0, z = 0}, {x = 0, y = 0, z = 0})
return itemstack
end
end
return itemstack
end
minetest.register_entity(
"portalgun:power",
{
hp_max = 100,
physical = false,
weight = 0,
collisionbox = {-0.2, -0.2, -0.2, 0.2, 0.2, 0.2},
visual = "sprite",
visual_size = {x = 1, y = 1},
textures = {"portalgun_gravity.png"},
spritediv = {x = 1, y = 1},
is_visible = true,
makes_footstep_sound = false,
automatic_rotate = 0,
timer = 0,
time = 0.1,
portalgun_power = 1,
portalgun = 1,
lifetime = 100,
on_activate = function(self, staticdata)
if portalgun_power.user then
self.user = portalgun_power.user
self.target = portalgun_power.target
self.player = portalgun_power.player
portalgun_power = {}
else
self.object:remove()
end
end,
on_punch = function(self, puncher, time_from_last_punch, tool_capabilities, dir)
if self.target and self.target:get_attach() then
self.target:set_detach()
self.target:set_hp(0)
end
end,
on_step = function(self, dtime)
self.timer = self.timer + dtime
if self.timer < self.time then
return self
end
self.timer = 0
if self.target == nil or (not self.target:get_attach()) then
self.object:set_hp(0)
if self.sound then
minetest.sound_stop(self.sound)
end
end
if self.player then
self.lifetime = self.lifetime - 1
if self.lifetime < 0 then
self.target:set_detach()
return self
end
end
local pos = self.user:get_pos()
if pos == nil then
return self
end
pos.y = pos.y + 1.6
local dir = self.user:get_look_dir()
local npos = {x = pos.x + (dir.x * 2), y = pos.y + (dir.y * 2), z = pos.z + (dir.z * 2)}
if minetest.registered_nodes[minetest.get_node(npos).name].walkable then
return self
end
self.object:move_to(npos)
return self
end
}
)
minetest.register_entity(
"portalgun:power2",
{
hp_max = 100,
physical = true,
weight = 10,
collisionbox = {-0.35, 0, -0.35, 0.35, 1, 0.35},
visual = "sprite",
visual_size = {x = 1, y = 1},
textures = {"portalgun_gravity.png"},
spritediv = {x = 1, y = 1},
is_visible = true,
makes_footstep_sound = false,
automatic_rotate = 0,
timer = 0,
time = 0.025,
portalgun_power = 1,
portalgun = 1,
lifetime = 1000,
v = 0.3,
ltime = 0,
on_activate = function(self, staticdata)
if portalgun_power.user then
self.user = portalgun_power.user
self.target = portalgun_power.target
self.ltime = portalgun_power_tmp_power
portalgun_power = {}
else
self.object:remove()
end
end,
on_step = function(self, dtime)
local pos = self.object:get_pos()
local v = self.object:get_velocity()
local v2 = {x = v.x - self.v, y = (v.y - self.v) * 0.99, z = v.z - self.v}
if v2.x < 0.5 and v2.x > -0.5 then
v2.x = 0
end
if v2.y < 0.5 and v2.y > -0.5 then
v2.y = 0
end
if v2.z < 0.5 and v2.z > -0.5 then
v2.z = 0
end
self.object:set_velocity(v2)
self.ltime = self.ltime - self.v
if self.ltime < self.v or (v2.x + v2.y + v2.z == 0) then
self.lifetime = -1
end
local nexpos = {x = pos.x + (v.x * 0.05), y = pos.y + (v.y * 0.05) + 1, z = pos.z + (v.z * 0.05)}
if minetest.registered_nodes[minetest.get_node(nexpos).name].walkable then
self.lifetime = -1
end
self.lifetime = self.lifetime - 1
if self.lifetime < 0 then
self.target:set_detach()
end
if self.target == nil or (not self.target:get_attach()) then
self.object:set_hp(0)
return self
end
return self
end
}
)

View File

@@ -0,0 +1,51 @@
stone_sounds = {}
stone_sounds.footstep = {name = "stone_walk", gain = 1.0}
stone_sounds.dug = {name = "stone_break", gain = 1.0}
stone_sounds.place = {name = "block_place", gain = 1.0}
glass_sounds = {}
glass_sounds.footstep = {name = "glass_walk", gain = 1.0}
glass_sounds.dug = {name = "glass_break", gain = 1.0}
glass_sounds.place = {name = "block_place", gain = 1.0}
wood_sounds = {}
wood_sounds.footstep = {name = "wood_walk", gain = 1.0}
wood_sounds.dug = {name = "wood_break", gain = 1.0}
wood_sounds.place = {name = "block_place", gain = 1.0}
minetest.register_node(
"portalgun:objdestroyer_1",
{
description = "Object destroyer (destroys on active)",
tiles = {"portalgun_testblock.png^[colorize:#FF0000aa"},
groups = {cracky = 2, mesecon = 1},
sounds = stone_sounds,
mesecons = {
effector = {
action_on = function(pos, node)
minetest.set_node(pos, {name = "portalgun:objdestroyer_2"})
for i, ob in pairs(minetest.get_objects_inside_radius(pos, 5)) do
if ob:get_luaentity() then
ob:set_hp(0)
end
end
end
}
}
}
)
minetest.register_node(
"portalgun:objdestroyer_2",
{
description = "Obj destroyer",
tiles = {"portalgun_testblock.png^[colorize:#FF0000cc"},
groups = {cracky = 2, mesecon = 1, not_in_creative_inventory = 1},
sunlight_propagates = true,
drop = "portalgun:objdestroyer_1",
paramtype = "light",
light_source = 14,
mesecons = {
conductor = {
state = mesecon.state.on,
offstate = "portalgun:objdestroyer_1"
}
}
}
)

655
scripts/portalgun.lua Normal file
View File

@@ -0,0 +1,655 @@
portalgun_portal = {}
portalgun_portal_tmp_user_abort = 0
portalgun_portal_tmp_user = ""
local portalgun_timer = 1.2
local portalgun_time = 0
portalgun_lifetime = 1200 --deletes portals that not used after a while
portalgun_max_rage = 100
portalgun_max_use_per_secund_time = 4 --destroys the portal if excessive used
portalgun_max_use_per_secund = 25 --4 & 25 is default = teleported (teleported 25 times in 4 sec)
function portalgun_param2(pos, param2, r)
local pos2 = {x = pos.x, y = pos.y, z = pos.z}
if r then
if param2 == 0 then
pos2.x = pos2.x - 1
elseif param2 == 1 then
pos2.z = pos2.z + 1
elseif param2 == 2 then
pos2.x = pos2.x + 1
elseif param2 == 3 then
pos2.z = pos2.z - 1
end
else
if param2 == 0 then
pos2.x = pos2.x + 1
elseif param2 == 1 then
pos2.z = pos2.z - 1
elseif param2 == 2 then
pos2.x = pos2.x - 1
elseif param2 == 3 then
pos2.z = pos2.z + 1
end
end
return pos2
end
local function portalgun_getLength(a) -- get length of an array / table
local count = 0
for _ in pairs(a) do
count = count + 1
end
return count
end
function portal_delete(name, n) -- using set_hp & :punch instand of :remove ... no risk for crash if something attach it
if portalgun_portal[name] == nil then
return
end
if (n == 1 or n == 0) and portalgun_portal[name].portal1 ~= nil then
if n == 0 then
local pos = portalgun_portal[name].portal1:get_pos()
if pos ~= nil then
minetest.sound_play("portalgun_closeportals", {pos = pos, max_hear_distance = 20, gain = 1})
end
end
portalgun_portal[name].portal1_active = false
portalgun_portal[name].portal1:set_hp(0)
end
if (n == 2 or n == 0) and portalgun_portal[name].portal2 ~= nil then
if n == 0 then
local pos = portalgun_portal[name].portal2:get_pos()
if pos ~= nil then
minetest.sound_play("portalgun_closeportals", {pos = pos, max_hear_distance = 20, gain = 1})
end
end
portalgun_portal[name].portal2_active = false
portalgun_portal[name].portal2:set_hp(0)
end
if n == 0 then
portalgun_portal[name] = nil
end
end
minetest.register_on_leaveplayer(
function(player) -- deletes user the profile (saveing memory)
local name = player:get_player_name()
portal_delete(name, 0)
portalgun_portal[name] = nil
end
)
minetest.register_on_dieplayer(
function(player)
local name = player:get_player_name()
portal_delete(name, 0)
portalgun_portal[name] = nil
end
)
portalgun_on_step = function(self, dtime)
local name = self.user
if portalgun_portal[self.user] == nil then
self.object:remove()
return self
end
if
(self.project == 1 and self.use ~= portalgun_portal[self.user].portal1_use) or
(self.project == 2 and self.use ~= portalgun_portal[self.user].portal2_use)
then
self.object:remove()
return self
end
if portalgun_portal[name].lifetime < 0 then
portal_delete(name, 0)
return self
end
if portalgun_portal[name].portal1_active and portalgun_portal[name].portal2_active then -- makes lifetime equal when both is acive, or it will be half
portalgun_portal[name].lifetime = portalgun_portal[name].lifetime - 0.5
else
portalgun_portal[name].lifetime = portalgun_portal[name].lifetime - 1
return self -- abort when only 1 is active (saves cpu)
end
if portalgun_portal[name].timer > 0 then -- makes teleported stuff wont move back at same time (bug fix)
portalgun_portal[name].timer = portalgun_portal[name].timer - dtime
return self
end
if self.portal_max_use > 0 then -- makes teleported stuff wont move back at same time (bug fix)
self.portal_max_use_time = self.portal_max_use_time + dtime
if self.portal_max_use >= portalgun_max_use_per_secund then
portal_delete(name, self.project)
return self
elseif self.portal_max_use_time >= portalgun_max_use_per_secund_time then
self.portal_max_use_time = 0
self.portal_max_use = 0
end
end
local pos1 = 0
local pos2 = 0
local d1 = 0
local d2 = 0
if self.project == 1 then
pos1 = portalgun_portal[name].portal1_pos
pos2 = portalgun_portal[name].portal2_pos
d1 = portalgun_portal[name].portal1_dir
d2 = portalgun_portal[name].portal2_dir
else
pos1 = portalgun_portal[name].portal2_pos
pos2 = portalgun_portal[name].portal1_pos
d1 = portalgun_portal[name].portal2_dir
d2 = portalgun_portal[name].portal1_dir
end
-- portalgun_front_of_field should fix teleport through walls, but is not working in all directions
-- waiting with this issue
if pos2 ~= 0 and pos1 ~= 0 then
for ii, ob in pairs(minetest.get_objects_inside_radius(pos1, self.area)) do
if pos2 ~= 0 then --and portalgun_front_of_field(self.object,ob)
if
(ob:is_player()) or
(ob:get_luaentity() and ob:get_luaentity().portalgun ~= 1 and
ob:get_luaentity().name:find(":text", 4) == nil)
then
if ob:get_attach() then
ob:set_detach()
ob:set_acceleration({x = 0, y = -10, z = 0})
end
--set velocity then teleport
local p = pos2
local x = 0
local y = 0
local z = 0
local dis = 2
if p == nil or p.x == nil then
return self
end
if ob:is_player() then
local v = ob:get_player_velocity()
local player_name = ob:get_player_name()
portalgun_power.user = player_name
portalgun_power.target = ob
local vv = {x = v.x, y = v.y, z = v.z}
-- get the highest velocity
dis = 2
if vv.x + vv.y + vv.z <= 0.3 then
if self.small == true then
vv.x = 1.4
else
vv.x = 2
end
end
if vv.x + vv.y + vv.z == 0 then
vv.x = 2
end
if vv.x < 0 then
vv.x = vv.x * -1
end
if vv.y < 0 then
vv.y = vv.y * -1
end
if vv.z < 0 then
vv.z = vv.z * -1
end
if vv.x > vv.z then
vv.a = vv.x
else
vv.a = vv.z
end
if vv.a < vv.y then
vv.a = vv.y
end
portalgun_power_tmp_power = vv.a
local m = minetest.add_entity(ob:get_pos(), "portalgun:power2")
ob:set_attach(m, "", {x = 0, y = 0, z = 0}, {x = 0, y = 0, z = 0})
m:set_velocity(v)
m:set_acceleration({x = 0, y = -10, z = 0})
ob = m
end
if ob:is_player() == false then
local v = ob:get_velocity()
if v.x < 0 then
v.x = v.x * -1
end
if v.y < 0 then
v.y = v.y * -1
end
if v.z < 0 then
v.z = v.z * -1
end
local vv = 0 -- get the highest velocity
if v.x > v.z then
vv = v.x
else
vv = v.z
end
if vv < v.y then
vv = v.y
end
v.x = 0
v.y = 0
v.z = 0
if d2 == "x+" then
v.x = vv
end
if d2 == "x-" then
v.x = vv * -1
end
if d2 == "y+" then
v.y = vv
end
if d2 == "y-" then
v.y = vv * -1
end
if d2 == "z+" then
v.z = vv
end
if d2 == "z-" then
v.z = vv * -1
end
ob:set_velocity({x = v.x, y = v.y, z = v.z})
end
if d2 == "x+" then
x = 2
elseif d2 == "x-" then
x = -dis
elseif d2 == "y+" then
y = dis
elseif d2 == "y-" then
y = -dis
elseif d2 == "z+" then
z = dis
elseif d2 == "z-" then
z = -dis
end
local obpos = {x = p.x + x, y = p.y + y, z = p.z + z}
portalgun_portal[name].timer = 0.2
self.portal_max_use = self.portal_max_use + 1
ob:set_pos(obpos, false)
portalgun_portal[name].lifetime = portalgun_lifetime
minetest.sound_play(
"portalgun_teleport",
{pos = portalgun_portal[name].portal1_pos, max_hear_distance = 10, gain = 30}
)
minetest.sound_play(
"portalgun_teleport",
{pos = portalgun_portal[name].portal2_pos, max_hear_distance = 10, gain = 30}
)
end --end of set velocity part then teleport
end
end
end
end
minetest.register_entity(
"portalgun:portal",
{
-- the portals
hp_max = 10000,
visual = "mesh",
mesh = "portalgun_portal_xp.obj",
physical = false,
textures = {"portalgun_blue.png"},
visual_size = {x = 1, y = 1},
spritediv = {x = 7, y = 0},
collisionbox = {0, 0, 0, 0, 0, 0},
timer = 0,
user = "",
project = 1,
portalgun = 1,
portal_max_use = 0,
portal_max_use_time = 0,
area = 2,
small = false,
get_staticdata = function(self)
return minetest.serialize(
{
user = self.user,
project = self.project,
use = self.use
}
)
end,
on_activate = function(self, staticdata)
local data = minetest.deserialize(staticdata)
if data and type(data) == "table" then
self.user = data.user
self.project = data.project
self.use = data.use
if portalgun_portal[self.user] == nil then
self.object:remove()
return self
end
if
(self.project == 1 and self.use ~= portalgun_portal[self.user].portal1_use) or
(self.project == 2 and self.use ~= portalgun_portal[self.user].portal2_use)
then
self.object:remove()
return self
end
elseif portalgun_portal_tmp_user ~= "" then
self.user = portalgun_portal_tmp_user
portalgun_portal_tmp_user = ""
self.project = portalgun_portal[self.user].project
if self.project == 1 then -- if inactivated then activated and another portal is created: remove
self.use = portalgun_portal[self.user].portal1_use
else
self.use = portalgun_portal[self.user].portal2_use
end
else
self.object:remove()
return self
end
if portalgun_portal[self.user] == nil then
self.object:remove()
return self
end
local d = ""
if self.project == 1 then
d = portalgun_portal[self.user].portal1_dir
self.object:set_properties({textures = {"portalgun_blue.png"}})
else
d = portalgun_portal[self.user].portal2_dir
self.object:set_properties({textures = {"portalgun_orange.png"}})
end
if d == "x+" then
self.object:set_yaw(math.pi * 0)
elseif d == "x-" then
self.object:set_yaw(math.pi * 1)
elseif d == "y+" then
self.object:set_properties({mesh = "portalgun_portal_yp.obj"}) -- becaouse there is no "setpitch"
elseif d == "y-" then
self.object:set_properties({mesh = "portalgun_portal_ym.obj"}) -- becaouse there is no "setpitch"
elseif d == "z+" then
self.object:set_yaw(math.pi * 0.5)
elseif d == "z-" then
self.object:set_yaw(math.pi * 1.5)
end
if d == "y+" then
local pos1 = {}
if self.project == 1 then
pos1 = portalgun_portal[self.user].portal1_pos
else
pos1 = portalgun_portal[self.user].portal2_pos
end
if portalgun_portal[self.user].y > 8 then
pos1.y = pos1.y + 1
end
if portalgun_portal[self.user].y > 12 then
pos1.y = pos1.y + 1
end
if self.project == 1 then
portalgun_portal[self.user].portal1_pos = pos1
else
portalgun_portal[self.user].portal2_pos = pos1
end
elseif
string.find(d, "y", 1) == nil and (portalgun_portal[self.user].x + portalgun_portal[self.user].z < 2.5)
then
self.area = 1.2
self.small = true
self.object:set_properties({visual_size = {x = 0.7, y = 0.7}})
end
end,
on_step = portalgun_on_step
}
)
minetest.register_craftitem(
":",
{
description = "Portalgun",
range = 100,
inventory_image = "portalgun_gun0_rndr.png",
wield_image = "portalgun_gun0_rndr.png",
groups = {not_in_creative_inventory = 1},
--inventory_image = "portalgun_gun_orange.png",
--wield_image = "portalgun_gun_orange.png",
on_place = function(itemstack, user, pointed_thing)
local node = minetest.get_node(pointed_thing.under)
if node.name == "portalgun:button" then
--use the item normally
minetest.item_place(itemstack, user, pointed_thing)
else
portalgun_onuse(itemstack, user, pointed_thing, 2)
end
return itemstack
end,
on_use = function(itemstack, user, pointed_thing)
portalgun_onuse(itemstack, user, pointed_thing, 1)
return itemstack
end
}
)
local function rnd(r)
return math.floor(r + 0.5)
end
function portalgun_onuse(itemstack, user, pointed_thing, mode) -- using the gun
if pointed_thing.type == "object" then
portalgun_gravity(itemstack, user, pointed_thing)
return itemstack
end
local pos = user:get_pos()
local dir = user:get_look_dir()
local key = user:get_player_control()
local name = user:get_player_name()
local exist = 0
local item = itemstack:to_table()
local ob = {}
ob.project = 1
ob.lifetime = portalgun_lifetime
ob.portal1 = 0
ob.portal2 = 0
ob.portal1_dir = 0
ob.portal2_dir = 0
ob.portal2_pos = 0
ob.portal1_pos = 0
ob.user = user:get_player_name()
if portalgun_portal[name] == nil then -- new portal profile
portalgun_portal[name] = {
lifetime = portalgun_lifetime,
project = 1,
timer = 0,
portal1_active = false,
portal2_active = false,
portal1_use = 0,
portal2_use = 0
}
end
if key.sneak then
portal_delete(name, 0)
return itemstack
end
pos.y = pos.y + 1.5
-- the project
for i = 1, portalgun_max_rage, 0.5 do
local nname = minetest.get_node({x = pos.x + (dir.x * i), y = pos.y + (dir.y * i), z = pos.z + (dir.z * i)}).name
if minetest.registered_nodes[nname].walkable then
portalgun_portal[name].lifetime = portalgun_lifetime
-- if minetest.get_node_group(nname, "antiportal") > 0 then
-- minetest.sound_play("portalgun_error", {pos = pos, max_hear_distance = 5, gain = 3})
-- return itemstack
-- end
local istestblock = string.find(nname, "portalgun:testblock", 1) or string.find(nname, "mesecons_lightstone:lightstone_white", 1)
if not istestblock then
minetest.sound_play("portalgun_error", {pos = pos, max_hear_distance = 5, gain = 3})
return itemstack
end
if
minetest.registered_nodes[
minetest.get_node(
{x = rnd(pos.x + (dir.x * i)), y = rnd(pos.y + (dir.y * i) + 1), z = rnd(pos.z + (dir.z * i))}
).name
].walkable == false and rnd(user:get_pos().y) > rnd(pos.y + (dir.y * i))
then
portalgun_setportal(pos, name, dir, i, mode, "y+")
return itemstack
elseif
minetest.registered_nodes[
minetest.get_node(
{x = rnd(pos.x + (dir.x * i)), y = rnd(pos.y + (dir.y * i) - 1), z = rnd(pos.z + (dir.z * i))}
).name
].walkable == false and rnd(user:get_pos().y) < rnd(pos.y + (dir.y * i))
then
portalgun_setportal(pos, name, dir, i, mode, "y-")
return itemstack
elseif
minetest.registered_nodes[
minetest.get_node(
{x = rnd(pos.x + (dir.x * i) - 1), y = rnd(pos.y + (dir.y * i)), z = rnd(pos.z + (dir.z * i))}
).name
].walkable == false and rnd(user:get_pos().x) < rnd(pos.x + (dir.x * i))
then
portalgun_setportal(pos, name, dir, i, mode, "x-")
return itemstack
elseif
minetest.registered_nodes[
minetest.get_node(
{x = rnd(pos.x + (dir.x * i)) + 1, y = rnd(pos.y + (dir.y * i)), z = rnd(pos.z + (dir.z * i))}
).name
].walkable == false and rnd(user:get_pos().x) > rnd(pos.x + (dir.x * i))
then
portalgun_setportal(pos, name, dir, i, mode, "x+")
return itemstack
elseif
minetest.registered_nodes[
minetest.get_node(
{x = rnd(pos.x + (dir.x * i)), y = rnd(pos.y + (dir.y * i)), z = rnd(pos.z + (dir.z * i) - 1)}
).name
].walkable == false and rnd(user:get_pos().z) < rnd(pos.z + (dir.z * i))
then
portalgun_setportal(pos, name, dir, i, mode, "z-")
return itemstack
elseif
minetest.registered_nodes[
minetest.get_node(
{x = rnd(pos.x + (dir.x * i)), y = rnd(pos.y + (dir.y * i)), z = rnd(pos.z + (dir.z * i) + 1)}
).name
].walkable == false and rnd(user:get_pos().z) > rnd(pos.z + (dir.z * i))
then
portalgun_setportal(pos, name, dir, i, mode, "z+")
return itemstack
end
minetest.sound_play("portalgun_error", {pos = pos, max_hear_distance = 20, gain = 3})
return itemstack
end
end
return itemstack
end
function portalgun_setportal(pos, name, dir, i, mode, portal_dir)
local lpos = {x = pos.x + (dir.x * (i - 1)), y = pos.y + (dir.y * (i - 1)), z = pos.z + (dir.z * (i - 1))} -- last pos
local cpos = {x = pos.x + (dir.x * i), y = pos.y + (dir.y * i), z = pos.z + (dir.z * i)} -- corrent poss
if portal_dir == "y+" then
cpos.y = (math.floor(cpos.y + 0.5)) + 0.524
elseif portal_dir == "y-" then
cpos.y = (math.floor(cpos.y + 0.5)) - 0.524
elseif portal_dir == "z+" then
cpos.z = (math.floor(cpos.z + 0.5)) + 0.524
elseif portal_dir == "z-" then
cpos.z = (math.floor(cpos.z + 0.5)) - 0.524
elseif portal_dir == "x+" then
cpos.x = (math.floor(cpos.x + 0.5)) + 0.524
elseif portal_dir == "x-" then
cpos.x = (math.floor(cpos.x + 0.5)) - 0.524
end
if portal_dir == "x+" or portal_dir == "x-" then -- auto correct (place in center)
cpos.y = (math.floor(cpos.y + 0.5))
cpos.z = (math.floor(cpos.z + 0.5))
elseif portal_dir == "y+" or portal_dir == "y-" then
cpos.x = (math.floor(cpos.x + 0.5))
cpos.z = (math.floor(cpos.z + 0.5))
elseif portal_dir == "z+" or portal_dir == "z-" then
cpos.x = (math.floor(cpos.x + 0.5))
cpos.y = (math.floor(cpos.y + 0.5))
end
if minetest.registered_nodes[minetest.get_node(cpos).name].walkable then
minetest.sound_play("portalgun_error", {pos = pos, max_hear_distance = 5, gain = 3})
return false
end
if string.find(portal_dir, "x", 1) or string.find(portal_dir, "z", 1) then -- auto correct (move from bottom / top)
local testpos1 = {x = cpos.x, y = cpos.y - 1, z = cpos.z}
local testpos2 = {x = cpos.x, y = cpos.y + 1, z = cpos.z}
if
minetest.registered_nodes[minetest.get_node(testpos1).name].walkable and
minetest.registered_nodes[minetest.get_node(testpos2).name].walkable == false
then
cpos.y = cpos.y + 0.5
elseif
minetest.registered_nodes[minetest.get_node(testpos2).name].walkable and
minetest.registered_nodes[minetest.get_node(testpos1).name].walkable == false
then
cpos.y = cpos.y - 0.5
end
end
portalgun_portal_tmp_user = name
portalgun_portal[name].x = pos.x - lpos.x
portalgun_portal[name].y = pos.y - lpos.y
portalgun_portal[name].z = pos.z - lpos.z
portalgun_portal[name].project = mode
if portalgun_portal[name].x < 0 then
portalgun_portal[name].x = portalgun_portal[name].x * -1
end
if portalgun_portal[name].z < 0 then
portalgun_portal[name].z = portalgun_portal[name].z * -1
end
if mode == 1 then
portal_delete(name, 1)
portalgun_portal[name].portal1_use = portalgun_portal[name].portal1_use + 1
portalgun_portal[name].portal1_dir = portal_dir
portalgun_portal[name].portal1_pos = cpos
portalgun_portal[name].portal1 = minetest.add_entity(cpos, "portalgun:portal")
portalgun_portal[name].portal1_active = true
minetest.sound_play("portalgun_portalblue", {pos = cpos, max_hear_distance = 20, gain = 1})
else
portal_delete(name, 2)
portalgun_portal[name].portal2_use = portalgun_portal[name].portal2_use + 1
portalgun_portal[name].portal2_dir = portal_dir
portalgun_portal[name].portal2_pos = cpos
portalgun_portal[name].portal2 = minetest.add_entity(cpos, "portalgun:portal")
portalgun_portal[name].portal2_active = true
minetest.sound_play("portalgun_portalorange", {pos = cpos, max_hear_distance = 20, gain = 1})
end
end
portalgun_front_of_field = function(ob, ob2)
local pos2 = ob2:get_pos()
return vector.distance(ob:get_pos(), pos2) > vector.distance(portalgun_pointat(ob), pos2)
end
portalgun_pointat = function(ob)
local pos = ob:get_pos()
local yaw = ob:get_yaw()
if yaw ~= yaw or type(yaw) ~= "number" then
yaw = 0
end
local z = math.sin(yaw) * -0.1
local x = math.cos(yaw) * 0.1
return {x = pos.x + x, y = pos.y, z = pos.z + z}
end

52
scripts/portaltarget.lua Normal file
View File

@@ -0,0 +1,52 @@
stone_sounds = {}
stone_sounds.footstep = {name = "stone_walk", gain = 1.0}
stone_sounds.dug = {name = "stone_break", gain = 1.0}
stone_sounds.place = {name = "block_place", gain = 1.0}
glass_sounds = {}
glass_sounds.footstep = {name = "glass_walk", gain = 1.0}
glass_sounds.dug = {name = "glass_break", gain = 1.0}
glass_sounds.place = {name = "block_place", gain = 1.0}
wood_sounds = {}
wood_sounds.footstep = {name = "wood_walk", gain = 1.0}
wood_sounds.dug = {name = "wood_break", gain = 1.0}
wood_sounds.place = {name = "block_place", gain = 1.0}
local portaltarget_sig = {
{1, "portalgun_blue.png"},
{2, "portalgun_orange.png"}
}
for ii = 1, #portaltarget_sig, 1 do
minetest.register_node(
"portalgun:portaltarget_" .. portaltarget_sig[ii][1],
{
description = "Portal target " .. portaltarget_sig[ii][1],
tiles = {"portalgun_testblock.png^" .. portaltarget_sig[ii][2]},
groups = {mesecon = 2, cracky = 2},
mesecons = {receptor = {state = "off"}},
sounds = stone_sounds,
is_ground_content = false,
paramtype2 = "facedir",
paramtype = "light",
on_timer = function(pos, elapsed)
for i, ob in pairs(minetest.get_objects_inside_radius(pos, 2)) do
if
ob:get_luaentity() and ob:get_luaentity().portalgun and
ob:get_luaentity().project == portaltarget_sig[ii][1]
then
mesecon.receptor_on(pos)
return true
end
end
mesecon.receptor_off(pos)
return true
end,
on_construct = function(pos)
if not mesecon then
return false
end
minetest.get_node_timer(pos):start(2)
end
}
)
end

86
scripts/powerball.lua Normal file
View File

@@ -0,0 +1,86 @@
stone_sounds = {}
stone_sounds.footstep = {name = "stone_walk", gain = 1.0}
stone_sounds.dug = {name = "stone_break", gain = 1.0}
stone_sounds.place = {name = "block_place", gain = 1.0}
glass_sounds = {}
glass_sounds.footstep = {name = "glass_walk", gain = 1.0}
glass_sounds.dug = {name = "glass_break", gain = 1.0}
glass_sounds.place = {name = "block_place", gain = 1.0}
wood_sounds = {}
wood_sounds.footstep = {name = "wood_walk", gain = 1.0}
wood_sounds.dug = {name = "wood_break", gain = 1.0}
wood_sounds.place = {name = "block_place", gain = 1.0}
new = 0
minetest.register_entity(
"portalgun:powerball",
{
hp_max = 1000,
physical = true,
weight = 0,
collisionbox = {-0.4, -0.4, -0.4, 0.4, 0.4, 0.4},
visual = "sprite",
visual_size = {x = 1.1, y = 1.1},
textures = {"portalgun_powrball.png"},
initial_sprite_basepos = {x = 0, y = 0},
is_visible = true,
makes_footstep_sound = false,
automatic_rotate = 0,
portalgun = 2,
powerball = 1,
on_activate = function(self, staticdata)
if new == 0 then
self.object:remove()
return self
end
new = 0
local pos = self.object:get_pos()
self.sound = minetest.sound_play("portalgun_powerball", {pos = pos, max_hear_distance = 10, gain = 0.5})
minetest.sound_play("portalgun_powerballbonce", {pos = pos, max_hear_distance = 10, gain = 1})
end,
on_step = function(self, dtime)
self.timer = self.timer + dtime
if self.timer < 0.2 then
return self
end
self.timer = 0
local pos = self.object:get_pos()
for i, ob in pairs(minetest.get_objects_inside_radius(pos, 2)) do
if
ob:is_player() or
(ob:get_luaentity() and ob:get_luaentity().portalgun ~= 1 and ob:get_luaentity().wsc == nil and
ob:get_luaentity().powerball ~= 1)
then
ob:set_hp(0)
end
end
self.timer2 = self.timer2 + 1
self.timer3 = self.timer3 + 1
if self.timer3 >= 9 then
self.timer3 = 0
minetest.sound_stop(self.sound)
self.sound = minetest.sound_play("portalgun_powerball", {pos = pos, max_hear_distance = 10, gain = 0.5})
end
if self.timer2 > 40 then
minetest.sound_stop(self.sound)
self.object:set_hp(0)
return self
end
local v = self.object:get_velocity()
local nextn = {x = pos.x + (v.x) / 3, y = pos.y + (v.y) / 3, z = pos.z + (v.z) / 3}
local nname = minetest.get_node(nextn).name
if minetest.registered_nodes[nname].walkable then
if nname == "portalgun:powerballtarget" and mesecon then
mesecon.receptor_on(nextn)
minetest.get_node_timer(nextn):start(5)
self.object:remove()
end
self.object:set_velocity({x = v.x * -1, y = v.y * -1, z = v.z * -1})
minetest.sound_play("portalgun_powerballbonce", {pos = pos, max_hear_distance = 10, gain = 1})
end
end,
timer = 0,
timer2 = 0,
timer3 = 0,
sound = {}
}
)

View File

@@ -0,0 +1,95 @@
stone_sounds = {}
stone_sounds.footstep = {name = "stone_walk", gain = 1.0}
stone_sounds.dug = {name = "stone_break", gain = 1.0}
stone_sounds.place = {name = "block_place", gain = 1.0}
glass_sounds = {}
glass_sounds.footstep = {name = "glass_walk", gain = 1.0}
glass_sounds.dug = {name = "glass_break", gain = 1.0}
glass_sounds.place = {name = "block_place", gain = 1.0}
wood_sounds = {}
wood_sounds.footstep = {name = "wood_walk", gain = 1.0}
wood_sounds.dug = {name = "wood_break", gain = 1.0}
wood_sounds.place = {name = "block_place", gain = 1.0}
new = 0
minetest.register_node(
"portalgun:powerballspawner",
{
description = "Power ball spawner",
tiles = {"steel.png", "steel.png", "steel.png", "steel.png", "steel.png", "portalgun_powerballspawner.png"},
groups = {cracky = 2},
sounds = glass_sounds,
is_ground_content = false,
paramtype2 = "facedir",
on_construct = function(pos)
minetest.get_node_timer(pos):start(10)
end,
on_timer = function(pos, elapsed)
local dir = minetest.get_node(pos).param2
local v = {x = 0, y = 0, z = 0}
if dir == 0 then
v.z = -1
elseif dir == 1 then
v.x = -1
elseif dir == 2 then
v.z = 1
elseif dir == 3 then
v.x = 1
elseif dir == 5 then
v.y = -1
elseif dir == 4 then
v.y = 1
else
v.y = -1
end
local pv = {x = pos.x + v.x, y = pos.y + v.y, z = pos.z + v.z}
new = 1
local m = minetest.add_entity(pv, "portalgun:powerball")
m:set_velocity({x = v.x * 4, y = v.y * 4, z = v.z * 4})
return true
end
}
)
minetest.register_node(
"portalgun:powerballspawner2",
{
description = "Power ball spawner (spawn on activate)",
tiles = {
"steel.png",
"steel.png",
"steel.png",
"steel.png",
"steel.png",
"portalgun_powerballspawner.png^[colorize:#aaaa0055"
},
groups = {cracky = 2, mesecon = 1},
sounds = glass_sounds,
is_ground_content = false,
paramtype2 = "facedir",
on_place = minetest.rotate_node,
mesecons = {
effector = {
action_on = function(pos, node)
local dir = minetest.get_node(pos).param2
local v = {x = 0, y = 0, z = 0}
if dir == 0 then
v.z = -1
elseif dir == 1 then
v.x = -1
elseif dir == 2 then
v.z = 1
elseif dir == 3 then
v.x = 1
elseif dir == 8 then
v.y = -1
elseif dir == 4 then
v.y = 1
end
local pv = {x = pos.x + v.x, y = pos.y + v.y, z = pos.z + v.z}
new = 1
local m = minetest.add_entity(pv, "portalgun:powerball")
m:set_velocity({x = v.x * 4, y = v.y * 4, z = v.z * 4})
end
}
}
}
)

View File

@@ -0,0 +1,27 @@
stone_sounds = {}
stone_sounds.footstep = {name = "stone_walk", gain = 1.0}
stone_sounds.dug = {name = "stone_break", gain = 1.0}
stone_sounds.place = {name = "block_place", gain = 1.0}
glass_sounds = {}
glass_sounds.footstep = {name = "glass_walk", gain = 1.0}
glass_sounds.dug = {name = "glass_break", gain = 1.0}
glass_sounds.place = {name = "block_place", gain = 1.0}
wood_sounds = {}
wood_sounds.footstep = {name = "wood_walk", gain = 1.0}
wood_sounds.dug = {name = "wood_break", gain = 1.0}
wood_sounds.place = {name = "block_place", gain = 1.0}
minetest.register_node(
"portalgun:powerballtarget",
{
description = "Power ball target",
tiles = {"portalgun_powerballstarget.png"},
groups = {mesecon = 2, cracky = 2},
mesecons = {receptor = {state = "off"}},
sounds = stone_sounds,
is_ground_content = false,
on_timer = function(pos, elapsed)
mesecon.receptor_off(pos)
return false
end
}
)

View File

@@ -0,0 +1,236 @@
stone_sounds = {}
stone_sounds.footstep = {name = "stone_walk", gain = 1.0}
stone_sounds.dug = {name = "stone_break", gain = 1.0}
stone_sounds.place = {name = "block_place", gain = 1.0}
glass_sounds = {}
glass_sounds.footstep = {name = "glass_walk", gain = 1.0}
glass_sounds.dug = {name = "glass_break", gain = 1.0}
glass_sounds.place = {name = "block_place", gain = 1.0}
wood_sounds = {}
wood_sounds.footstep = {name = "wood_walk", gain = 1.0}
wood_sounds.dug = {name = "wood_break", gain = 1.0}
wood_sounds.place = {name = "block_place", gain = 1.0}
local ptgwsc = {
{"weightedstoragecube.png", "portalgun_presplat.png", "(blue)"},
{"weightedstoragecube2.png", "portalgun_presplat2.png", "(orange)"},
{"weightedstoragecube3.png", "portalgun_presplat3.png", "(yellow)"},
{"weightedstoragecube4.png", "portalgun_presplat4.png", "(green)"},
{"weightedcompanioncube.png", "portalgun_presplat.png", "(blue companion)"},
{"weightedcompanioncube2.png", "portalgun_presplat2.png", "(orange companion)"},
{"weightedcompanioncube3.png", "portalgun_presplat3.png", "(yellow companion)"},
{"weightedcompanioncube4.png", "portalgun_presplat4.png", "(green companion)"}
}
for ii = 1, #ptgwsc, 1 do
minetest.register_node(
"portalgun:plantform1_" .. ii,
{
description = "Pressure platform " .. ptgwsc[ii][3],
tiles = {ptgwsc[ii][2], "cloud.png", "cloud.png", "cloud.png", "cloud.png", "cloud.png"},
groups = {mesecon = 2, cracky = 1, not_in_creative_inventory = 0},
mesecons = {receptor = {state = "off"}},
paramtype = "light",
sunlight_propagates = true,
sounds = stone_sounds,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-0.7, -0.5, -0.7, 0.7, -0.375, 0.7},
{0.7, -0.5, -0.1875, 0.9, -0.4375, 0.1875},
{-0.9, -0.5, -0.1875, -0.7, -0.4375, 0.1875},
{-0.1875, -0.5, -0.9, 0.1875, -0.4375, -0.7},
{-0.1875, -0.5, 0.7, 0.1875, -0.4375, 0.9},
{-0.5, -0.5, -0.5, 0.5, -0.3125, 0.5}
}
},
on_construct = function(pos)
minetest.get_node_timer(pos):start(2)
end,
on_timer = function(pos, elapsed)
if not mesecon then
return false
end
for i, ob in pairs(minetest.get_objects_inside_radius(pos, 1)) do
if ob:get_luaentity() and ob:get_luaentity().wsc == ii then
local node = minetest.get_node(pos)
mesecon.receptor_on(pos)
minetest.set_node(
pos,
{name = "portalgun:plantform2_" .. ii, param1 = node.param1, param2 = node.param2}
)
end
return true
end
return true
end
}
)
minetest.register_node(
"portalgun:plantform2_" .. ii,
{
description = "Pressure platform",
tiles = {ptgwsc[ii][2], "cloud.png", "cloud.png", "cloud.png", "cloud.png", "cloud.png"},
drop = "portalgun:plantform1_" .. ii,
groups = {mesecon = 2, cracky = 1, not_in_creative_inventory = 1},
mesecons = {receptor = {state = "on"}},
paramtype = "light",
sunlight_propagates = true,
light_source = 14,
sounds = stone_sounds,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-0.7, -0.5, -0.7, 0.7, -0.375, 0.7},
{0.7, -0.5, -0.1875, 0.9, -0.4375, 0.1875},
{-0.9, -0.5, -0.1875, -0.7, -0.4375, 0.1875},
{-0.1875, -0.5, -0.9, 0.1875, -0.4375, -0.7},
{-0.1875, -0.5, 0.7, 0.1875, -0.4375, 0.9}
}
},
on_construct = function(pos)
minetest.get_node_timer(pos):start(2)
end,
on_timer = function(pos, elapsed)
for i, ob in pairs(minetest.get_objects_inside_radius(pos, 1)) do
if ob:get_luaentity() and ob:get_luaentity().wsc == ii then
return true
end
end
mesecon.receptor_off(pos)
local node = minetest.get_node(pos)
minetest.set_node(
pos,
{name = "portalgun:plantform1_" .. ii, param1 = node.param1, param2 = node.param2}
)
return true
end
}
)
end -- of for #
minetest.register_node(
"portalgun:plantform_nu1",
{
description = "Pressure platform (player or cube)",
tiles = {"portalgun_presplat5.png", "cloud.png", "cloud.png", "cloud.png", "cloud.png", "cloud.png"},
groups = {mesecon = 2, cracky = 1, not_in_creative_inventory = 0},
mesecons = {receptor = {state = "off"}},
paramtype = "light",
sunlight_propagates = true,
sounds = stone_sounds,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-0.7, -0.5, -0.7, 0.7, -0.375, 0.7},
{0.7, -0.5, -0.1875, 0.9, -0.4375, 0.1875},
{-0.9, -0.5, -0.1875, -0.7, -0.4375, 0.1875},
{-0.1875, -0.5, -0.9, 0.1875, -0.4375, -0.7},
{-0.1875, -0.5, 0.7, 0.1875, -0.4375, 0.9},
{-0.5, -0.5, -0.5, 0.5, -0.3125, 0.5}
}
},
on_construct = function(pos)
minetest.get_node_timer(pos):start(2)
end,
on_timer = function(pos, elapsed)
if not mesecon then
return false
end
for i, ob in pairs(minetest.get_objects_inside_radius(pos, 1)) do
if ob:is_player() or (ob:get_luaentity() and ob:get_luaentity().wsc) then
local node = minetest.get_node(pos)
mesecon.receptor_on(pos)
minetest.set_node(
pos,
{name = "portalgun:plantform_nu2", param1 = node.param1, param2 = node.param2}
)
end
return true
end
return true
end
}
)
minetest.register_node(
"portalgun:plantform_nu2",
{
description = "Pressure platform",
tiles = {"portalgun_presplat5.png", "cloud.png", "cloud.png", "cloud.png", "cloud.png", "cloud.png"},
drop = "portalgun:plantform_nu1",
groups = {mesecon = 2, cracky = 1, not_in_creative_inventory = 1},
mesecons = {receptor = {state = "on"}},
paramtype = "light",
sunlight_propagates = true,
light_source = 14,
sounds = stone_sounds,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-0.7, -0.5, -0.7, 0.7, -0.375, 0.7},
{0.7, -0.5, -0.1875, 0.9, -0.4375, 0.1875},
{-0.9, -0.5, -0.1875, -0.7, -0.4375, 0.1875},
{-0.1875, -0.5, -0.9, 0.1875, -0.4375, -0.7},
{-0.1875, -0.5, 0.7, 0.1875, -0.4375, 0.9}
}
},
on_construct = function(pos)
minetest.get_node_timer(pos):start(2)
end,
on_timer = function(pos, elapsed)
for i, ob in pairs(minetest.get_objects_inside_radius(pos, 1)) do
if ob:is_player() or (ob:get_luaentity() and ob:get_luaentity().wsc) then
return true
end
end
mesecon.receptor_off(pos)
local node = minetest.get_node(pos)
minetest.set_node(pos, {name = "portalgun:plantform_nu1", param1 = node.param1, param2 = node.param2})
return true
end
}
)
minetest.register_node(
"portalgun:planthole",
{
description = "Plathole (activate by any cube, 2 blocks under)",
tiles = {"cloud.png"},
groups = {mesecon = 2, cracky = 1},
mesecons = {receptor = {state = "off"}},
paramtype = "light",
sunlight_propagates = true,
sounds = stone_sounds,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-1.5, -0.5, -1.5, 0.5, -0.25, -1.3},
{-1.5, -0.5, 0.3, 0.5, -0.25, 0.5},
{0.3, -0.5, -1.5, 0.5, -0.25, 0.5},
{-1.5, -0.5, -1.5, -1.3, -0.25, 0.5},
{0.5, -0.5, -0.9, 0.7, -0.375, -0.0625},
{-1.7, -0.5, -0.9, -1.5, -0.3125, -0.0625},
{-0.9, -0.5, -1.7, -0.0625, -0.375, -1.5},
{-1, -0.5, 0.5, -0.0625, -0.375, 0.7}
}
},
on_construct = function(pos)
minetest.get_node_timer(pos):start(5)
end,
on_timer = function(pos, elapsed)
local pos2 = {x = pos.x, y = pos.y - 2, z = pos.z}
for i, ob in pairs(minetest.get_objects_inside_radius(pos2, 1)) do
if ob:get_luaentity() and ob:get_luaentity().wsc then
mesecon.receptor_on(pos)
return true
end
end
mesecon.receptor_off(pos)
return true
end
}
)

202
scripts/signs.lua Normal file
View File

@@ -0,0 +1,202 @@
stone_sounds = {}
stone_sounds.footstep = {name = "stone_walk", gain = 1.0}
stone_sounds.dug = {name = "stone_break", gain = 1.0}
stone_sounds.place = {name = "block_place", gain = 1.0}
glass_sounds = {}
glass_sounds.footstep = {name = "glass_walk", gain = 1.0}
glass_sounds.dug = {name = "glass_break", gain = 1.0}
glass_sounds.place = {name = "block_place", gain = 1.0}
wood_sounds = {}
wood_sounds.footstep = {name = "wood_walk", gain = 1.0}
wood_sounds.dug = {name = "wood_break", gain = 1.0}
wood_sounds.place = {name = "block_place", gain = 1.0}
local snuma = 1
for ii = 0, 9, 1 do
if ii == 1 then
snuma = 0
end
minetest.register_node(
"portalgun:sign_numa" .. ii,
{
description = "Sign number (" .. ii .. ")",
tiles = {"portalgun_snum" .. ii .. ".png"},
drop = "portalgun:sign_numa1",
drawtype = "nodebox",
groups = {mesecon = 2, portalnuma = 1, dig_immediate = 3, not_in_creative_inventory = snuma},
sounds = wood_sounds,
is_ground_content = false,
paramtype2 = "facedir",
paramtype = "light",
light_source = 3,
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, 0.4375, 0, 0.5, 0.5}
}
},
after_place_node = function(pos, placer, itemstack)
local param2 = minetest.get_node(pos).param2
local pos2 = portalgun_param2(pos, param2)
if minetest.get_node(pos2) and minetest.get_node(pos2).name == "air" then
minetest.set_node(pos2, {name = "portalgun:sign_numb1", param2 = param2})
minetest.swap_node(pos, {name = "portalgun:sign_numa0", param2 = minetest.get_node(pos).param2})
end
end,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
if not minetest.is_protected(pos, clicker:get_player_name()) then
local iin = ii + 1
if iin == 10 then
iin = 0
end
minetest.swap_node(
pos,
{name = "portalgun:sign_numa" .. iin, param2 = minetest.get_node(pos).param2}
)
end
end,
on_punch = function(pos, node, player, pointed_thing)
local param2 = minetest.get_node(pos).param2
local pos2 = portalgun_param2(pos, param2)
local node = minetest.get_node(pos2)
if node and minetest.get_node_group(node.name, "portalnumb") > 0 then
minetest.set_node(pos2, {name = "air"})
end
end
}
)
if snuma == 0 then
snuma = 1
end
minetest.register_node(
"portalgun:sign_numb" .. ii,
{
description = "Sign number",
tiles = {"portalgun_snum" .. ii .. ".png"},
drop = "portalgun:sign_numa1",
drawtype = "nodebox",
groups = {mesecon = 2, portalnumb = 1, dig_immediate = 3, not_in_creative_inventory = 1},
sounds = wood_sounds,
is_ground_content = false,
paramtype2 = "facedir",
paramtype = "light",
light_source = 3,
node_box = {
type = "fixed",
fixed = {
{-1, -0.5, 0.4375, -0.5, 0.5, 0.5}
}
},
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
if not minetest.is_protected(pos, clicker:get_player_name()) then
local iin = ii + 1
if iin == 10 then
iin = 0
end
minetest.swap_node(
pos,
{name = "portalgun:sign_numb" .. iin, param2 = minetest.get_node(pos).param2}
)
end
end,
on_punch = function(pos, node, player, pointed_thing)
local param2 = minetest.get_node(pos).param2
local pos2 = portalgun_param2(pos, param2, true)
local node = minetest.get_node(pos2)
if node and minetest.get_node_group(node.name, "portalnuma") > 0 then
minetest.set_node(pos2, {name = "air"})
end
end
}
)
end
minetest.register_node(
"portalgun:sign1",
{
description = "Portal sign blue",
tiles = {"portalgun_testblock.png^portalgun_sign1.png"},
inventory_image = "portalgun_testblock.png^portalgun_sign1.png",
drawtype = "nodebox",
groups = {snappy = 3, not_in_creative_inventory = 0},
sounds = wood_sounds,
is_ground_content = false,
paramtype2 = "facedir",
paramtype = "light",
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0.45, 0.5, 0.5, 0.5}
}
}
)
minetest.register_node(
"portalgun:sign2",
{
description = "Portal sign orange",
tiles = {"portalgun_testblock.png^portalgun_sign2.png"},
inventory_image = "portalgun_testblock.png^portalgun_sign2.png",
drawtype = "nodebox",
groups = {snappy = 3, not_in_creative_inventory = 0},
sounds = wood_sounds,
is_ground_content = false,
paramtype2 = "facedir",
paramtype = "light",
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0.45, 0.5, 0.5, 0.5}
}
}
)
minetest.register_node(
"portalgun:sign_v",
{
description = "Sign V",
tiles = {"portalgun_v.png"},
inventory_image = "portalgun_v.png",
drop = "portalgun:sign_x",
drawtype = "nodebox",
groups = {mesecon = 2, snappy = 3, not_in_creative_inventory = 1},
sounds = wood_sounds,
is_ground_content = false,
paramtype2 = "facedir",
paramtype = "light",
light_source = 5,
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0.45, 0.5, 0.5, 0.5}
},
mesecons = {
effector = {
action_off = function(pos, node)
minetest.swap_node(pos, {name = "portalgun:sign_x", param2 = minetest.get_node(pos).param2})
end
}
}
}
)
minetest.register_node(
"portalgun:sign_x",
{
description = "Sign X",
tiles = {"portalgun_x.png"},
inventory_image = "portalgun_x.png",
drawtype = "nodebox",
groups = {mesecon = 2, snappy = 3, not_in_creative_inventory = 0},
sounds = wood_sounds,
is_ground_content = false,
paramtype2 = "facedir",
paramtype = "light",
light_source = 3,
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0.45, 0.5, 0.5, 0.5}
},
mesecons = {
effector = {
action_on = function(pos, node)
minetest.swap_node(pos, {name = "portalgun:sign_v", param2 = minetest.get_node(pos).param2})
end
}
}
}
)

142
scripts/toxicwater.lua Normal file
View File

@@ -0,0 +1,142 @@
minetest.register_node(
"portalgun:toxwater_1",
{
description = "Toxic water",
drawtype = "liquid",
waving = 3,
tiles = {
{
name = "portal_toxwater_anim.png",
backface_culling = false,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 8.0,
},
},
{
name = "portal_toxwater_anim.png",
backface_culling = true,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 8.0,
},
},
},
special_tiles = {
{
name = "portal_toxwater_anim.png",
backface_culling = false,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 8.0,
},
},
{
name = "portal_toxwater_anim.png",
backface_culling = true,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 8.0,
},
},
},
use_texture_alpha = "blend",
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
is_ground_content = false,
drop = "",
drowning = 1,
damage_per_second = 20,
liquidtype = "source",
liquid_alternative_flowing = "portalgun:toxwater_2",
liquid_alternative_source = "portalgun:toxwater_1",
liquid_viscosity = 2,
liquid_renewable = false,
liquid_range = 3,
post_effect_color = {a = 200, r = 119, g = 70, b = 16},
groups = {water = 3, liquid = 3}
}
)
minetest.register_node(
"portalgun:toxwater_2",
{
description = "Toxic water 2",
drawtype = "flowingliquid",
waving = 3,
tiles = {
{
name = "portal_toxwater_anim.png",
backface_culling = false,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 8.0,
},
},
{
name = "portal_toxwater_anim.png",
backface_culling = true,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 8.0,
},
},
},
special_tiles = {
{
name = "portal_toxwater_anim.png",
backface_culling = false,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 8.0,
},
},
{
name = "portal_toxwater_anim.png",
backface_culling = true,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 8.0,
},
},
},
use_texture_alpha = "blend",
paramtype = "light",
paramtype2 = "flowingliquid",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
is_ground_content = false,
drop = "",
drowning = 1,
damage_per_second = 4,
liquidtype = "flowing",
liquid_alternative_flowing = "portalgun:toxwater_2",
liquid_alternative_source = "portalgun:toxwater_1",
liquid_viscosity = 2,
liquid_renewable = false,
liquid_range = 3,
post_effect_color = {a = 200, r = 119, g = 70, b = 16},
groups = {water = 3, liquid = 3, not_in_creative_inventory = 1}
}
)

360
scripts/turrets.lua Normal file
View File

@@ -0,0 +1,360 @@
stone_sounds = {}
stone_sounds.footstep = {name = "stone_walk", gain = 1.0}
stone_sounds.dug = {name = "stone_break", gain = 1.0}
stone_sounds.place = {name = "block_place", gain = 1.0}
glass_sounds = {}
glass_sounds.footstep = {name = "glass_walk", gain = 1.0}
glass_sounds.dug = {name = "glass_break", gain = 1.0}
glass_sounds.place = {name = "block_place", gain = 1.0}
wood_sounds = {}
wood_sounds.footstep = {name = "wood_walk", gain = 1.0}
wood_sounds.dug = {name = "wood_break", gain = 1.0}
wood_sounds.place = {name = "block_place", gain = 1.0}
minetest.register_node(
"portalgun:tureta",
{
description = "Tureta",
tiles = {"portalgun_sentry_turret.png"},
drawtype = "mesh",
mesh = "turret1.obj",
--spawn turretgun and set to air
on_place = function(itemstack, placer, pointed_thing)
local pos = pointed_thing.above
local obj = minetest.add_entity(pos, "portalgun:turretgun")
--rotate turret to face player
local dir = placer:get_look_dir()
local yaw = math.atan(dir.z, dir.x) + math.pi / 2
if dir.x < 0 then
yaw = yaw + math.pi
end
yaw = yaw + math.pi
local deg = math.deg(yaw)
deg = math.fmod(deg, 360)
deg = math.floor(deg / 90) * 90
deg = deg + 90
deg = math.fmod(deg, 360)
obj:set_yaw(math.rad(deg))
--set turret to air
minetest.set_node(pos, {name = "air"})
end
}
)
minetest.register_craftitem(
"portalgun:turret_rotator",
{
description = "Turret rotator",
inventory_image = "portalgun_turret_rotator.png",
stack_max = 1,
on_use = function(itemstack, user, pointed_thing)
--if pointing at a entity
if pointed_thing.type == "object" then
local obj = pointed_thing.ref
--if entity is a turret
if obj:get_luaentity().name == "portalgun:turretgun" then
--get object yaw
local yaw = obj:get_yaw()
local deg = math.deg(yaw)
deg = math.fmod(deg, 360)
deg = math.floor(deg / 90) * 90
deg = deg + 90
deg = math.fmod(deg, 360)
--set object yaw
obj:set_yaw(math.rad(deg))
end
end
end,
}
)
minetest.register_entity(
"portalgun:turretgun2",
{
description = "Sentry turret",
textures = {"portalgun_sentry_turret.png"},
visual = "mesh",
hp_max = 100,
physical = true,
collisionbox = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
weight = 5,
is_visible = true,
visual_size = {x = 6, y = 6},
make_footstep_sound = true,
_tmr = 0,
_stop = 1,
automatic_rotate = 0,
mesh = "turret2.obj",
on_step = function(self, elapsed, moveresult)
self._tmr = self._tmr + elapsed
self.object:set_yaw(math.rad(math.fmod((math.floor(math.fmod(math.deg(self.object:get_yaw()), 360) / 90) * 90), 360)))
--get yaw and convert it into param2
local p = self.object:get_yaw()
--convert yaw from rad to degrees
local yaw = math.deg(p)
yaw = math.floor(yaw / 90)
--if param2 is less than 0, set it to 3
if yaw < 0 then
yaw = 3
end
p = yaw
--add -y force
local force = {x = 0, y = -10, z = 0}
self.object:set_velocity(force)
if self._tmr < 0.2 then
return
else
self._tmr = 0
end
local pos = self.object:get_pos()
local pos1 = {x = pos.x, y = pos.y + 0.5, z = pos.z}
local d
--swap 1 and 3 in p
if p == 1 then
p = 3
elseif p == 3 then
p = 1
end
for i, ob in pairs(minetest.get_objects_inside_radius(pos, 10)) do
if portalgun_visible(pos1, ob) and (ob:is_player()) then
local a = ob:get_pos()
if a.y < pos.y + 2 and a.y > pos.y - 1 then
a = {x = math.floor(a.x), y = math.floor(a.y), z = math.floor(a.z)}
if p == 3 and a.x > pos.x and a.z == pos.z then
d = {x = 20, y = 0, z = 0}
break
elseif p == 1 and a.x < pos.x and a.z == pos.z then
d = {x = -20, y = 0, z = 0}
break
elseif p == 2 and a.z > pos.z and a.x == pos.x then
d = {x = 0, y = 0, z = 20}
break
elseif p == 0 and a.z < pos.z and a.x == pos.x then
d = {x = 0, y = 0, z = -20}
break
end
end
end
end
if d then
local bullet_ent = minetest.add_entity(pos1, "portalgun:bullet1")
bullet_ent:set_velocity(d)
--rotate bullet to by 90 degrees in x axis
local yaw = math.rad(math.fmod((math.floor(math.fmod(math.deg(self.object:get_yaw()), 360) / 90) * 90), 360))
bullet_ent:set_yaw(yaw)
minetest.sound_play("portalgun_bullet1", {pos = pos, gain = 1, max_hear_distance = 15})
else
local obj = minetest.add_entity(pos1, "portalgun:turretgun")
obj:set_yaw(self.object:get_yaw())
self.object:remove()
end
return true
end
}
)
minetest.register_node("portalgun:turretgun_spawner",
{
--this node spawns a turret on top of the block if there is no turret nearby
description = "Turret spawner",
--separate tile for top others same
tiles = {"portalgun_turret_spawner_top.png", "portalgun_turret_spawner_side.png"},
groups = {cracky = 3},
sounds = stone_sounds,
drawtype = "allfaces",
paramtype = "light",
paramtype2 = "facedir",
drop = "",
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("pos", minetest.pos_to_string(pos))
meta:set_int("yaw", 0)
meta:set_string("infotext", "Turret spawner (" .. meta:get_int("yaw") .. ")")
minetest.get_node_timer(pos):start(1.0)
end,
on_punch = function(pos, node, puncher, pointed_thing)
local haspriv, missingpriv = minetest.check_player_privs(puncher:get_player_name(), {server = true})
--if puncher has privilege server add 90 degrees to yaw
if haspriv then
local meta = minetest.get_meta(pos)
local tmppos = minetest.string_to_pos(meta:get_string("pos"))
if tmppos ~= pos then
minetest.crash("hehe")
end
local yaw = meta:get_int("yaw")
yaw = yaw + 90
yaw = yaw % 360
meta:set_int("yaw", yaw)
meta:set_string("infotext", "Turret spawner (" .. meta:get_int("yaw") .. ")")
end
end,
on_timer = function (pos, elapsed)
local meta = minetest.get_meta(pos)
local pos = meta:get_string("pos")
local pos1 = minetest.string_to_pos(pos)
local pos2 = {x = pos1.x, y = pos1.y + 1, z = pos1.z}
local objs = minetest.get_objects_inside_radius(pos2, 1)
local found = 0
for i, obj in pairs(objs) do
local name = obj:get_luaentity().name
if name== "portalgun:turretgun" or name == "portalgun:turretgun2" then
found = found + 1
end
end
if found == 0 then
local obj = minetest.add_entity(pos2, "portalgun:turretgun")
obj:setyaw(math.rad(meta:get_int("yaw")))
end
minetest.get_node_timer(pos1):start(120)
end
})
minetest.register_entity(
"portalgun:turretgun",
{
description = "Sentry turret",
textures = {"portalgun_sentry_turret.png"},
visual = "mesh",
hp_max = 100,
physical = true,
collisionbox = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
weight = 5,
is_visible = true,
make_footstep_sound = true,
automatic_rotate = 0,
_tmr = 0,
_stop = 1,
visual_size = {x = 5.8, y = 5.8},
mesh = "turret1.obj",
on_step = function(self, elapsed, moveresult)
self.object:set_yaw(math.rad(math.fmod((math.floor(math.fmod(math.deg(self.object:get_yaw()), 360) / 90) * 90), 360)))
--get yaw and convert it into param2
local p = self.object:get_yaw()
--convert yaw from rad to degrees
local yaw = math.deg(p)
yaw = math.floor(yaw / 90)
--if param2 is less than 0, set it to 3
if yaw < 0 then
yaw = 3
end
p = yaw
local pos = self.object:get_pos()
local pos1 = {x = pos.x, y = pos.y + 0.5, z = pos.z}
local force = {x = 0, y = -10, z = 0}
self.object:set_velocity(force)
self._tmr = self._tmr + elapsed
if self._tmr < 0.2 then
return
else
self._tmr = 0
end
--swap 1 and 3 in p
if p == 1 then
p = 3
elseif p == 3 then
p = 1
end
local d
for i, ob in pairs(minetest.get_objects_inside_radius(pos1, 10)) do
if portalgun_visible(pos1, ob) and (ob:is_player()) then
local a = ob:get_pos()
if a.y < pos.y + 2 and a.y > pos.y - 1 then
a = {x = math.floor(a.x), y = math.floor(a.y), z = math.floor(a.z)}
if p == 3 and a.x > pos.x and a.z == pos.z then
d = {x = 20, y = 0, z = 0}
break
elseif p == 1 and a.x < pos.x and a.z == pos.z then
d = {x = -20, y = 0, z = 0}
break
elseif p == 2 and a.z > pos.z and a.x == pos.x then
d = {x = 0, y = 0, z = 20}
break
elseif p == 0 and a.z < pos.z and a.x == pos.x then
d = {x = 0, y = 0, z = -20}
break
end
end
end
end
if d then
local obj = minetest.add_entity(pos1, "portalgun:turretgun2")
--set yaw to same as this object
obj:setyaw(self.object:get_yaw())
self.object:remove()
end
return true
end
}
)
function portalgun_visible(pos, ob)
if ob == nil or ob:get_pos() == nil or ob:get_pos().y == nil then
return false
end
local ta = ob:get_pos()
local v = {x = pos.x - ta.x, y = pos.y - ta.y - 1, z = pos.z - ta.z}
v.y = v.y - 1
local amount = (v.x ^ 2 + v.y ^ 2 + v.z ^ 2) ^ 0.5
local d =
math.sqrt((pos.x - ta.x) * (pos.x - ta.x) + (pos.y - ta.y) * (pos.y - ta.y) + (pos.z - ta.z) * (pos.z - ta.z))
v.x = (v.x / amount) * -1
v.y = (v.y / amount) * -1
v.z = (v.z / amount) * -1
for i = 1, d, 1 do
local node =
minetest.registered_nodes[
minetest.get_node({x = pos.x + (v.x * i), y = pos.y + (v.y * i), z = pos.z + (v.z * i)}).name
]
if node.walkable then
return false
end
end
return true
end
function portalgun_round(x)
if x % 2 ~= 0.5 then
return math.floor(x + 0.5)
end
return x - 0.5
end
minetest.register_entity(
"portalgun:bullet1",
{
hp_max = 1,
--physical = true,
--collisionbox={-0.01,-0.01,-0.01,0.01,0.01,0.01},
pointable = false,
visual = "mesh",
visual_size = {x = 2, y = 2},
mesh = "bullet.obj",
--yellow color as tiles
tiles = {"#color[yellow]"},
initial_sprite_basepos = {x = 0, y = 0},
portalgun = 2,
bullet = 1,
on_step = function(self, dtime)
self.timer = self.timer + dtime
self.timer2 = self.timer2 + dtime
local pos = self.object:get_pos()
local n = minetest.registered_nodes[minetest.get_node(self.object:get_pos()).name]
if self.timer > 1 or (n and n.walkable) then
self.object:remove()
return
end
for i, ob in pairs(minetest.get_objects_inside_radius(pos, 1.5)) do
if ob:is_player() then
if ob:get_hp() > 3 then
ob:set_hp(ob:get_hp() - 3)
elseif ob:get_hp() == 0 then
else
ob:set_hp(0)
end
self.object:remove()
return
end
end
end,
timer = 0,
timer2 = 0
}
)

32
scripts/warntape.lua Normal file
View File

@@ -0,0 +1,32 @@
stone_sounds = {}
stone_sounds.footstep = {name = "stone_walk", gain = 1.0}
stone_sounds.dug = {name = "stone_break", gain = 1.0}
stone_sounds.place = {name = "block_place", gain = 1.0}
glass_sounds = {}
glass_sounds.footstep = {name = "glass_walk", gain = 1.0}
glass_sounds.dug = {name = "glass_break", gain = 1.0}
glass_sounds.place = {name = "block_place", gain = 1.0}
wood_sounds = {}
wood_sounds.footstep = {name = "wood_walk", gain = 1.0}
wood_sounds.dug = {name = "wood_break", gain = 1.0}
wood_sounds.place = {name = "block_place", gain = 1.0}
minetest.register_node(
"portalgun:warntape",
{
description = "Warntape",
groups = {dig_immediate = 3, not_in_creative_inventory = 0},
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
sounds = stone_sounds,
tiles = {"portalgun_warntape.png"},
walkable = false,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, 0.3125, 0.5, -0.4375, 0.5}
}
}
}
)

View File

@@ -0,0 +1,88 @@
stone_sounds = {}
stone_sounds.footstep = {name = "stone_walk", gain = 1.0}
stone_sounds.dug = {name = "stone_break", gain = 1.0}
stone_sounds.place = {name = "block_place", gain = 1.0}
glass_sounds = {}
glass_sounds.footstep = {name = "glass_walk", gain = 1.0}
glass_sounds.dug = {name = "glass_break", gain = 1.0}
glass_sounds.place = {name = "block_place", gain = 1.0}
wood_sounds = {}
wood_sounds.footstep = {name = "wood_walk", gain = 1.0}
wood_sounds.dug = {name = "wood_break", gain = 1.0}
wood_sounds.place = {name = "block_place", gain = 1.0}
new = 0
local ptgwsc = {
{"weightedstoragecube.png", "portalgun_presplat.png", "(blue)"},
{"weightedstoragecube2.png", "portalgun_presplat2.png", "(orange)"},
{"weightedstoragecube3.png", "portalgun_presplat3.png", "(yellow)"},
{"weightedstoragecube4.png", "portalgun_presplat4.png", "(green)"},
{"weightedcompanioncube.png", "portalgun_presplat.png", "(blue companion)"},
{"weightedcompanioncube2.png", "portalgun_presplat2.png", "(orange companion)"},
{"weightedcompanioncube3.png", "portalgun_presplat3.png", "(yellow companion)"},
{"weightedcompanioncube4.png", "portalgun_presplat4.png", "(green companion)"}
}
for ii = 1, #ptgwsc, 1 do
minetest.register_craftitem(
"portalgun:wscube" .. ii,
{
description = "Weighted storage cube " .. ptgwsc[ii][3],
inventory_image = minetest.inventorycube(ptgwsc[ii][1]),
on_place = function(itemstack, user, pointed_thing)
if pointed_thing.type == "node" then
new = 1
local m = minetest.add_entity(pointed_thing.above, "portalgun:wsc" .. ii)
m:set_acceleration({x = 0, y = -10, z = 0})
itemstack:take_item()
end
return itemstack
end
}
)
minetest.register_entity(
"portalgun:wsc" .. ii,
{
hp_max = 100,
physical = true,
weight = 5,
collisionbox = {-0.6, -0.6, -0.6, 0.6, 0.6, 0.6},
visual = "cube",
visual_size = {x = 1.1, y = 1.1},
textures = {ptgwsc[ii][1], ptgwsc[ii][1], ptgwsc[ii][1], ptgwsc[ii][1], ptgwsc[ii][1], ptgwsc[ii][1]},
initial_sprite_basepos = {x = 0, y = 0},
is_visible = true,
makes_footstep_sound = true,
automatic_rotate = 0,
portalgun = 2,
wsc = ii,
on_activate = function(self, staticdata)
if new == 0 then
self.object:remove()
return self
end
new = 0
end,
on_step = function(self, dtime)
self.timer = self.timer + dtime
if self.timer < 1 then
return self
end
self.timer = 0
self.object:set_acceleration({x = 0, y = -10, z = 0})
self.timer2 = self.timer2 + 1
if self.timer2 > 4 then
self.timer2 = 0
for i, ob in pairs(minetest.get_objects_inside_radius(self.object:get_pos(), 20)) do
if ob:is_player() then
return true
end
end
self.object:set_hp(0)
end
end,
timer = 0,
timer2 = 0
}
)
end -- of for #

BIN
sounds/block_place.ogg Normal file

Binary file not shown.

BIN
sounds/button_press.ogg Normal file

Binary file not shown.

BIN
sounds/glass_break.ogg Normal file

Binary file not shown.

BIN
sounds/glass_walk.ogg Normal file

Binary file not shown.

BIN
sounds/stone_break.ogg Normal file

Binary file not shown.

BIN
sounds/stone_walk.ogg Normal file

Binary file not shown.

BIN
sounds/wood_break.ogg Normal file

Binary file not shown.

BIN
sounds/wood_walk.ogg Normal file

Binary file not shown.

549
stuff.lua
View File

@@ -1,549 +0,0 @@
local snuma=1
for ii = 0, 9, 1 do
if ii==1 then snuma=0 end
minetest.register_node("portalgun:sign_numa".. ii, {
description = "Sign number (" .. ii ..")",
tiles = {"portalgun_snum" .. ii ..".png"},
drop="portalgun:sign_numa1",
drawtype = "nodebox",
groups = {mesecon=2,portalnuma=1,dig_immediate = 3, not_in_creative_inventory=snuma},
sounds = default.node_sound_wood_defaults(),
is_ground_content = false,
paramtype2 = "facedir",
paramtype = "light",
light_source = 3,
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, 0.4375, 0, 0.5, 0.5},
}
},
after_place_node = function(pos, placer, itemstack)
local param2=minetest.get_node(pos).param2
local pos2=portalgun_param2(pos,param2)
if minetest.get_node(pos2) and minetest.get_node(pos2).name=="air" then
minetest.set_node(pos2,{name="portalgun:sign_numb1",param2=param2})
minetest.swap_node(pos, {name="portalgun:sign_numa0", param2=minetest.get_node(pos).param2})
end
end,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
if not minetest.is_protected(pos,clicker:get_player_name()) then
local iin=ii+1
if iin==10 then iin=0 end
minetest.swap_node(pos, {name="portalgun:sign_numa".. iin, param2=minetest.get_node(pos).param2})
end
end,
on_punch = function(pos, node, player, pointed_thing)
local param2=minetest.get_node(pos).param2
local pos2=portalgun_param2(pos,param2)
local node=minetest.get_node(pos2)
if node and minetest.get_node_group(node.name, "portalnumb")>0 then
minetest.set_node(pos2, {name = "air"})
end
end,
})
if snuma==0 then snuma=1 end
minetest.register_node("portalgun:sign_numb".. ii, {
description = "Sign number",
tiles = {"portalgun_snum" .. ii ..".png"},
drop="portalgun:sign_numa1",
drawtype = "nodebox",
groups = {mesecon=2,portalnumb=1,dig_immediate = 3, not_in_creative_inventory=1},
sounds = default.node_sound_wood_defaults(),
is_ground_content = false,
paramtype2 = "facedir",
paramtype = "light",
light_source = 3,
node_box = {
type = "fixed",
fixed = {
{-1, -0.5, 0.4375, -0.5, 0.5, 0.5},
}
},
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
if not minetest.is_protected(pos,clicker:get_player_name()) then
local iin=ii+1
if iin==10 then iin=0 end
minetest.swap_node(pos, {name="portalgun:sign_numb".. iin, param2=minetest.get_node(pos).param2})
end
end,
on_punch = function(pos, node, player, pointed_thing)
local param2=minetest.get_node(pos).param2
local pos2=portalgun_param2(pos,param2,true)
local node=minetest.get_node(pos2)
if node and minetest.get_node_group(node.name, "portalnuma")>0 then
minetest.set_node(pos2, {name = "air"})
end
end,
})
end
minetest.register_node("portalgun:turretgun2", {
description = "Sentry turret",
groups = {cracky=3,not_in_creative_inventory=1},
drop="portalgun:turretgun",
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
sounds = default.node_sound_defaults(),
tiles = {"portalgun_sentry_turret.png"},
drawtype = "mesh",
mesh="torret2.obj",
selection_box = {
type = "fixed",
fixed = {
{-0.3, -0.5, -0.3, 0.3, 1,0.3},
}
},
on_timer=function(pos, elapsed)
local p=minetest.get_node(pos).param2
local pos1={x=pos.x,y=pos.y+0.5,z=pos.z}
local d
for i, ob in pairs(minetest.get_objects_inside_radius(pos, 10)) do
if portalgun_visiable(pos1,ob) and (ob:is_player() or (ob:get_luaentity() and (ob:get_luaentity().type or ob:get_luaentity().portalgun==nil))) then
local a=ob:get_pos()
if a.y<pos.y+2 and a.y>pos.y-1 then
a={x=math.floor(a.x),y=math.floor(a.y),z=math.floor(a.z)}
if p==3 and a.x>pos.x and a.z==pos.z then
d={x=20,y=0,z=0}
break
elseif p==1 and a.x<pos.x and a.z==pos.z then
d={x=-20,y=0,z=0}
break
elseif p==2 and a.z>pos.z and a.x==pos.x then
d={x=0,y=0,z=20}
break
elseif p==0 and a.z<pos.z and a.x==pos.x then
d={x=0,y=0,z=-20}
break
end
end
end
end
local m=minetest.get_meta(pos)
if d then
m:set_int("stop",0)
minetest.add_entity(pos1, "portalgun:bullet1"):set_velocity(d)
minetest.sound_play("portalgun_bullet1", {pos=pos, gain = 1, max_hear_distance = 15})
for i=2,5,1 do
minetest.after(i*0.1, function(pos,d)
minetest.add_entity(pos1, "portalgun:bullet1"):set_velocity(d)
minetest.sound_play("portalgun_bullet1", {pos=pos, gain = 1, max_hear_distance = 15})
end, pos,d)
end
else
if m:get_int("stop")==1 then
minetest.set_node(pos,{name="portalgun:turretgun",param2=p})
minetest.get_node_timer(pos):start(0.2)
else
m:set_int("stop",1)
end
end
return true
end
})
minetest.register_node("portalgun:turretgun", {
description = "Sentry turret",
groups = {cracky=3},
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
sounds = default.node_sound_defaults(),
tiles = {"portalgun_sentry_turret.png"},
drawtype = "mesh",
mesh="torret1.obj",
selection_box = {
type = "fixed",
fixed = {
{-0.3, -0.5, -0.3, 0.3, 1,0.3},
}
},
on_construct = function(pos)
minetest.get_node_timer(pos):start(0.2)
end,
on_timer=function(pos, elapsed)
local p=minetest.get_node(pos).param2
local pos1={x=pos.x,y=pos.y+0.5,z=pos.z}
local d
for i, ob in pairs(minetest.get_objects_inside_radius(pos1, 10)) do
if portalgun_visiable(pos1,ob) and (ob:is_player() or (ob:get_luaentity() and (ob:get_luaentity().type or ob:get_luaentity().portalgun==nil))) then
local a=ob:get_pos()
if a.y<pos.y+2 and a.y>pos.y-1 then
a={x=math.floor(a.x),y=math.floor(a.y),z=math.floor(a.z)}
if p==3 and a.x>pos.x and a.z==pos.z then
d={x=20,y=0,z=0}
break
elseif p==1 and a.x<pos.x and a.z==pos.z then
d={x=-20,y=0,z=0}
break
elseif p==2 and a.z>pos.z and a.x==pos.x then
d={x=0,y=0,z=20}
break
elseif p==0 and a.z<pos.z and a.x==pos.x then
d={x=0,y=0,z=-20}
break
end
end
end
end
if d then
minetest.add_entity(pos1, "portalgun:bullet1"):set_velocity(d)
minetest.set_node(pos,{name="portalgun:turretgun2",param2=p})
minetest.get_node_timer(pos):start(1)
minetest.sound_play("portalgun_bullet1", {pos=pos, gain = 1, max_hear_distance = 15})
for i=2,5,1 do
minetest.after(i*0.1, function(pos,d)
minetest.add_entity(pos1, "portalgun:bullet1"):set_velocity(d)
minetest.sound_play("portalgun_bullet1", {pos=pos, gain = 1, max_hear_distance = 15})
end, pos,d)
end
end
return true
end
})
minetest.register_node("portalgun:warntape", {
description = "Warntape",
groups = {dig_immediate = 3,not_in_creative_inventory=0},
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
sounds = default.node_sound_defaults(),
tiles = {"portalgun_warntape.png",},
walkable = false,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, 0.3125, 0.5, -0.4375, 0.5},
}
}
})
minetest.register_node("portalgun:toxwater_1", {
description = "Toxic water",
drawtype = "liquid",
tiles = {"portalgun_toxwat.png"},
post_effect_color = {a = 200, r = 119, g = 70, b = 16},
alpha = 190,
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
is_ground_content = false,
drop = "",
drowning = 1,
damage_per_second = 20,
liquidtype = "source",
liquid_alternative_flowing = "portalgun:toxwater_2",
liquid_alternative_source = "portalgun:toxwater_1",
liquid_viscosity = 2,
liquid_renewable = false,
liquid_range = 3,
post_effect_color = {a = 200, r = 119, g = 70, b = 16},
groups = {water = 3, liquid = 3},
sounds = default.node_sound_water_defaults(),
})
minetest.register_node("portalgun:toxwater_2", {
description = "Toxic water 2",
drawtype = "flowingliquid",
tiles = {"portalgun_toxwat.png"},
tiles = {name = "portalgun_toxwat.png",backface_culling=false},
special_tiles = {{name = "portalgun_toxwat.png",backface_culling=true},{name = "portalgun_toxwat.png",backface_culling=false}},
alpha = 190,
paramtype = "light",
paramtype2 = "flowingliquid",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
is_ground_content = false,
drop = "",
drowning = 1,
damage_per_second = 4,
liquidtype = "flowing",
liquid_alternative_flowing = "portalgun:toxwater_2",
liquid_alternative_source = "portalgun:toxwater_1",
liquid_viscosity = 2,
liquid_renewable = false,
liquid_range = 3,
post_effect_color = {a = 200, r = 119, g = 70, b = 16},
groups = {water = 3, liquid = 3, not_in_creative_inventory = 1},
sounds = default.node_sound_water_defaults(),
})
minetest.register_tool("portalgun:ed", {
description = "Entity Destroyer",
inventory_image = "portalgun_edestroyer.png",
range = 15,
on_use = function(itemstack, user, pointed_thing)
local pos=user:get_pos()
if pointed_thing.type=="node" then
pos=pointed_thing.above
end
if pointed_thing.type=="object" then
pos=pointed_thing.ref:get_pos()
end
local name=user:get_player_name()
if minetest.check_player_privs(name, {kick=true})==false then
minetest.chat_send_player(name, "You need the kick privilege to use this tool!")
return itemstack
end
for ii, ob in pairs(minetest.get_objects_inside_radius(pos, 7)) do
if ob:get_luaentity() then
ob:set_hp(0)
ob:punch(ob, {full_punch_interval=1.0,damage_groups={fleshy=9000}}, "default:bronze_pick", nil)
end
end
return itemstack
end
})
minetest.register_node("portalgun:cake", {
description = "Cake",
groups = {dig_immediate = 3,not_in_creative_inventory=0},
paramtype = "light",
sunlight_propagates = true,
selection_box = {type = "fixed",fixed = { -0.3, -0.5, -0.3, 0.3, 0, 0.3 }},
sounds = default.node_sound_defaults(),
tiles = {
"default_dirt.png^portalgun_cake1.png",
"default_dirt.png^portalgun_cake2.png",
},
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-0.3125, -0.5, 0.375, 0.3125, -0.125, 0.4375},
{-0.3125, -0.5, -0.4375, 0.3125, -0.125, -0.375},
{-0.4375, -0.5, -0.3125, -0.375, -0.125, 0.3125},
{0.375, -0.5, -0.3125, 0.4375, -0.125, 0.3125},
{-0.375, -0.5, -0.375, 0.375, -0.125, 0.375},
{-0.25, -0.5, 0.4375, 0.25, -0.125, 0.5},
{-0.25, -0.5, -0.5, 0.25, -0.125, -0.4375},
{0.4375, -0.5, -0.25, 0.5, -0.125, 0.25},
{-0.5, -0.5, -0.25, -0.4375, -0.125, 0.25},
{0, -0.125, -0.0625, 0.0625, 0.1875, 0},
}
}
})
minetest.register_node("portalgun:testblock", {
description = "Test block",
tiles = {"portalgun_testblock.png"},
groups = {cracky = 1},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("portalgun:apb", {
description = "Anti portal block",
tiles = {"portalgun_testblock.png^[colorize:#ffffffaa"},
groups = {cracky = 3,antiportal=1},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("portalgun:apg", {
description = "Anti portal glass",
drawtype="glasslike",
paramtype="light",
sunlight_propagates = true,
tiles = {"default_glass.png^[colorize:#ffffffaa"},
groups = {cracky = 1,antiportal=1},
sounds = default.node_sound_glass_defaults(),
})
minetest.register_node("portalgun:hard_glass", {
description = "Hard glass",
drawtype="glasslike",
paramtype="light",
sunlight_propagates = true,
tiles = {"default_glass.png^[colorize:#ddddddaa"},
groups = {cracky = 1},
sounds = default.node_sound_glass_defaults(),
})
function portalgun_visiable(pos,ob)
if ob==nil or ob:get_pos()==nil or ob:get_pos().y==nil then return false end
local ta=ob:get_pos()
local v = {x = pos.x - ta.x, y = pos.y - ta.y-1, z = pos.z - ta.z}
v.y=v.y-1
local amount = (v.x ^ 2 + v.y ^ 2 + v.z ^ 2) ^ 0.5
local d=math.sqrt((pos.x-ta.x)*(pos.x-ta.x) + (pos.y-ta.y)*(pos.y-ta.y)+(pos.z-ta.z)*(pos.z-ta.z))
v.x = (v.x / amount)*-1
v.y = (v.y / amount)*-1
v.z = (v.z / amount)*-1
for i=1,d,1 do
local node=minetest.registered_nodes[minetest.get_node({x=pos.x+(v.x*i),y=pos.y+(v.y*i),z=pos.z+(v.z*i)}).name]
if node.walkable then
return false
end
end
return true
end
function portalgun_round(x)
if x%2 ~= 0.5 then
return math.floor(x+0.5)
end
return x-0.5
end
function portalgun_ra2shoot(pos,ob)
local op=ob:get_pos()
local m=minetest.get_meta(pos)
local x=m:get_int("x")
local y=m:get_int("y")
local z=m:get_int("z")
local ox=portalgun_round(op.x)
local oy=portalgun_round(op.y)
local oz=portalgun_round(op.z)
if x==1 and ox==pos.x and oz<=pos.z then
return true
end
if x==-1 and ox==pos.x and oz>=pos.z then
return true
end
if z==-1 and oz==pos.z and ox<=pos.x then
return true
end
if z==1 and oz==pos.z and ox>=pos.x then
return true
end
return false
end
minetest.register_node("portalgun:secam_off", {
description = "Security cam (off)" ,
tiles = {"portalgun_scam.png"},
drawtype = "nodebox",
walkable=false,
groups = {dig_immediate = 3},
sounds = default.node_sound_glass_defaults(),
is_ground_content = false,
paramtype = "light",
paramtype2 = "facedir",
node_box = {type="fixed",
fixed={ {-0.2, -0.5, -0.2, 0.2, -0.4, 0.2},
{-0.1, -0.2, -0.1, 0.1, -0.4, 0.1}}
},
on_place = minetest.rotate_node,
on_construct = function(pos)
minetest.get_meta(pos):set_string("infotext","click to activate")
end,
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
minetest.set_node(pos, {name ="portalgun:secam", param1 = node.param1, param2 = node.param2})
minetest.get_node_timer(pos):start(1)
end,
})
minetest.register_node("portalgun:secam", {
description = "Security cam",
tiles = {"portalgun_scam.png"},
drawtype = "nodebox",
walkable=false,
groups = {dig_immediate = 3,stone=1,not_in_creative_inventory=1},
sounds = default.node_sound_glass_defaults(),
is_ground_content = false,
paramtype = "light",
paramtype2 = "facedir",
drop="portalgun:secam_off",
node_box = {type="fixed",
fixed={ {-0.2, -0.5, -0.2, 0.2, -0.4, 0.2},
{-0.1, -0.2, -0.1, 0.1, -0.4, 0.1}}
},
on_timer=function(pos, elapsed)
for i, ob in pairs(minetest.get_objects_inside_radius(pos, 10)) do
if ob:is_player() or (ob:get_luaentity() and ob:get_luaentity().itemstring==nil and ob:get_luaentity().portalgun==nil) then
if portalgun_visiable(pos,ob) then
local v=ob:get_pos()
if not ob:get_luaentity() then v.y=v.y+1 end
local s={x=(v.x-pos.x)*3,y=(v.y-pos.y)*3,z=(v.z-pos.z)*3}
local m=minetest.add_entity(pos, "portalgun:bullet1")
m:set_velocity(s)
m:set_acceleration(s)
minetest.sound_play("portalgun_bullet1", {pos=pos, gain = 1, max_hear_distance = 15,})
minetest.after((math.random(1,9)*0.1), function(pos,s,v)
local m=minetest.add_entity(pos, "portalgun:bullet1")
m:set_velocity(s)
m:set_acceleration(s)
minetest.sound_play("portalgun_bullet1", {pos=pos, gain = 1, max_hear_distance = 15,})
end, pos,s,v)
end
end
end
return true
end,
})
minetest.register_entity("portalgun:bullet1",{
hp_max = 1,
--physical = true,
--collisionbox={-0.01,-0.01,-0.01,0.01,0.01,0.01},
pointable=false,
visual = "sprite",
visual_size = {x=0.1, y=0.1},
textures = {"default_mese_block.png"},
initial_sprite_basepos = {x=0, y=0},
portalgun=2,
bullet=1,
on_step= function(self, dtime)
self.timer=self.timer+dtime
self.timer2=self.timer2+dtime
local pos=self.object:get_pos()
local n=minetest.registered_nodes[minetest.get_node(self.object:get_pos()).name]
if self.timer>1 or (n and n.walkable) then
self.object:remove()
return
end
for i, ob in pairs(minetest.get_objects_inside_radius(pos, 1.5)) do
if ob:is_player() or (ob:get_luaentity() and ob:get_luaentity().bullet~=1) then
ob:set_hp(ob:get_hp()-7)
ob:punch(self.object, 1,{full_punch_interval=1.0,damage_groups={fleshy=4}}, "default:bronze_pick", nil)
self.object:remove()
return
end
end
end,
timer=0,
timer2=0,
})
minetest.register_node("portalgun:sign1", {
description = "Portal sign blue",
tiles = {"portalgun_testblock.png^portalgun_sign1.png"},
inventory_image = "portalgun_testblock.png^portalgun_sign1.png",
drawtype = "nodebox",
groups = {snappy = 3, not_in_creative_inventory=0},
sounds = default.node_sound_wood_defaults(),
is_ground_content = false,
paramtype2 = "facedir",
paramtype = "light",
node_box = {
type="fixed",
fixed={-0.5,-0.5,0.45,0.5,0.5,0.5}},
})
minetest.register_node("portalgun:sign2", {
description = "Portal sign orange",
tiles = {"portalgun_testblock.png^portalgun_sign2.png"},
inventory_image = "portalgun_testblock.png^portalgun_sign2.png",
drawtype = "nodebox",
groups = {snappy = 3, not_in_creative_inventory=0},
sounds = default.node_sound_wood_defaults(),
is_ground_content = false,
paramtype2 = "facedir",
paramtype = "light",
node_box = {
type="fixed",
fixed={-0.5,-0.5,0.45,0.5,0.5,0.5}},
})

BIN
textures/cloud.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 B

BIN
textures/dirt.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 507 B

BIN
textures/glass.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 553 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

BIN
textures/portalgun_pick.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 293 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

BIN
textures/steel.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 247 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -1,354 +0,0 @@
local ptgwsc={
{"weightedstoragecube.png","portalgun_presplat.png","(blue)"},
{"weightedstoragecube2.png","portalgun_presplat2.png","(orange)"},
{"weightedstoragecube3.png","portalgun_presplat3.png","(yellow)"},
{"weightedstoragecube4.png","portalgun_presplat4.png","(green)"},
}
for ii = 1, #ptgwsc, 1 do
minetest.register_craftitem("portalgun:wscube" ..ii, {
description = "Weighted storage cube " .. ptgwsc[ii][3],
inventory_image = minetest.inventorycube(ptgwsc[ii][1]),
on_place=function(itemstack, user, pointed_thing)
if pointed_thing.type=="node" then
portalgun.new=1
local m=minetest.add_entity(pointed_thing.above, "portalgun:wsc"..ii)
m:set_acceleration({x=0,y=-10,z=0})
itemstack:take_item()
end
return itemstack
end,
})
minetest.register_node("portalgun:wscspawner2_" .. ii, {
description = "Weighted storage cube spawner2 " ..ptgwsc[ii][3],
tiles = {"default_steel_block.png","default_steel_block.png","default_steel_block.png","default_steel_block.png","default_steel_block.png",ptgwsc[ii][1]},
groups = {cracky=2,mesecon_receptor_off = 1, mesecon_effector_off = 1},
mesecons = {receptor = {state = "off"}},
sounds = default.node_sound_glass_defaults(),
is_ground_content = false,
paramtype2 = "facedir",
mesecons = {effector = {
action_on = function (pos, node)
local dir=minetest.get_node(pos).param2
local v={x=0, y=0, z=0}
if dir==0 then v.z=-1
elseif dir==1 then v.x=-1.2
elseif dir==2 then v.z=1.2
elseif dir==3 then v.x=1.2
elseif dir==8 then v.y=-1.2
elseif dir==4 then v.y=1.2
end
local pv={x=pos.x+v.x, y=pos.y+v.y, z=pos.z+v.z}
portalgun.new=1
local m=minetest.add_entity(pv, "portalgun:wsc" ..ii)
m:set_acceleration({x=0, y=-10, z=0})
end
}}
})
minetest.register_entity("portalgun:wsc" ..ii,{
hp_max = 100,
physical = true,
weight = 5,
collisionbox = {-0.6,-0.6,-0.6, 0.6,0.6,0.6},
visual = "cube",
visual_size = {x=1.1, y=1.1},
textures = {ptgwsc[ii][1],ptgwsc[ii][1],ptgwsc[ii][1],ptgwsc[ii][1],ptgwsc[ii][1],ptgwsc[ii][1]},
initial_sprite_basepos = {x=0, y=0},
is_visible = true,
makes_footstep_sound = true,
automatic_rotate = false,
portalgun=2,
wsc=ii,
on_activate= function(self, staticdata)
if portalgun.new==0 then
self.object:remove()
return self
end
portalgun.new=0
end,
on_step= function(self, dtime)
self.timer=self.timer+dtime
if self.timer<1 then return self end
self.timer=0
self.object:set_acceleration({x=0, y=-10, z=0})
self.timer2=self.timer2+1
if self.timer2>10 then
self.timer2=0
for i, ob in pairs(minetest.get_objects_inside_radius(self.object:get_pos(), 20)) do
if ob:is_player() then
return true
end
end
self.object:set_hp(0)
self.object:punch(self.object, 1, "default:bronze_pick", nil)
end
end,
timer=0,
timer2=0,
})
minetest.register_node("portalgun:wscspawner"..ii, {
description = "Weighted storage cube spawner " ..ptgwsc[ii][3],
tiles = {ptgwsc[ii][1]},
groups = {cracky = 1, not_in_creative_inventory=0},
paramtype = "light",
paramtype2="facedir",
sunlight_propagates = true,
light_source = default.LIGHT_MAX - 1,
sounds = default.node_sound_stone_defaults(),
drawtype="nodebox",
node_box = {
type = "fixed",
fixed = {
{-0.7, -0.5, -0.7, 0.7, -0.375, 0.7},
{0.7, -0.5, -0.1875, 0.9, -0.4375, 0.1875},
{-0.9, -0.5, -0.1875, -0.7, -0.4375, 0.1875},
{-0.1875, -0.5, -0.9, 0.1875, -0.4375, -0.7},
{-0.1875, -0.5, 0.7, 0.1875, -0.4375, 0.9},
}
},
on_construct = function(pos)
minetest.get_node_timer(pos):start(5)
end,
on_timer = function (pos, elapsed)
for i, ob in pairs(minetest.get_objects_inside_radius(pos, 40)) do
if ob:get_luaentity() and ob:get_luaentity().wsc==ii then
return true
end
end
portalgun.new=1
local m=minetest.add_entity(pos, "portalgun:wsc" ..ii)
m:set_acceleration({x=0,y=-10,z=0})
return true
end,
})
minetest.register_node("portalgun:plantform1_" ..ii, {
description = "Pressure platform " .. ptgwsc[ii][3],
tiles = {ptgwsc[ii][2],"default_cloud.png","default_cloud.png","default_cloud.png","default_cloud.png","default_cloud.png"},
groups = {mesecon = 2,cracky = 1, not_in_creative_inventory=0},
mesecons = {receptor = {state = "off"}},
paramtype = "light",
sunlight_propagates = true,
sounds = default.node_sound_stone_defaults(),
drawtype="nodebox",
node_box = {
type = "fixed",
fixed = {
{-0.7, -0.5, -0.7, 0.7, -0.375, 0.7},
{0.7, -0.5, -0.1875, 0.9, -0.4375, 0.1875},
{-0.9, -0.5, -0.1875, -0.7, -0.4375, 0.1875},
{-0.1875, -0.5, -0.9, 0.1875, -0.4375, -0.7},
{-0.1875, -0.5, 0.7, 0.1875, -0.4375, 0.9},
{-0.5, -0.5, -0.5, 0.5, -0.3125, 0.5},
}
},
on_construct = function(pos)
minetest.get_node_timer(pos):start(2)
end,
on_timer = function (pos, elapsed)
if not mesecon then return false end
for i, ob in pairs(minetest.get_objects_inside_radius(pos, 1)) do
if ob:get_luaentity() and ob:get_luaentity().wsc==ii then
local node=minetest.get_node(pos)
mesecon.receptor_on(pos)
minetest.set_node(pos, {name ="portalgun:plantform2_"..ii, param1 = node.param1, param2 = node.param2})
end
return true
end
return true
end,
})
minetest.register_node("portalgun:plantform2_"..ii, {
description = "Pressure platform",
tiles = {ptgwsc[ii][2],"default_cloud.png","default_cloud.png","default_cloud.png","default_cloud.png","default_cloud.png"},
drop="portalgun:plantform1_"..ii,
groups = {mesecon = 2,cracky = 1, not_in_creative_inventory=1},
mesecons = {receptor = {state = "on"}},
paramtype = "light",
sunlight_propagates = true,
light_source = default.LIGHT_MAX - 1,
sounds = default.node_sound_stone_defaults(),
drawtype="nodebox",
node_box = {
type = "fixed",
fixed = {
{-0.7, -0.5, -0.7, 0.7, -0.375, 0.7},
{0.7, -0.5, -0.1875, 0.9, -0.4375, 0.1875},
{-0.9, -0.5, -0.1875, -0.7, -0.4375, 0.1875},
{-0.1875, -0.5, -0.9, 0.1875, -0.4375, -0.7},
{-0.1875, -0.5, 0.7, 0.1875, -0.4375, 0.9},
}
},
on_construct = function(pos)
minetest.get_node_timer(pos):start(2)
end,
on_timer = function (pos, elapsed)
for i, ob in pairs(minetest.get_objects_inside_radius(pos, 1)) do
if ob:get_luaentity() and ob:get_luaentity().wsc==ii then
return true
end
end
mesecon.receptor_off(pos)
local node=minetest.get_node(pos)
minetest.set_node(pos, {name ="portalgun:plantform1_"..ii, param1 = node.param1, param2 = node.param2})
return true
end,
})
end -- of for #
minetest.register_node("portalgun:plantform_nu1", {
description = "Pressure platform (player or cube)",
tiles = {"portalgun_presplat5.png","default_cloud.png","default_cloud.png","default_cloud.png","default_cloud.png","default_cloud.png"},
groups = {mesecon = 2,cracky = 1, not_in_creative_inventory=0},
mesecons = {receptor = {state = "off"}},
paramtype = "light",
sunlight_propagates = true,
sounds = default.node_sound_stone_defaults(),
drawtype="nodebox",
node_box = {
type = "fixed",
fixed = {
{-0.7, -0.5, -0.7, 0.7, -0.375, 0.7},
{0.7, -0.5, -0.1875, 0.9, -0.4375, 0.1875},
{-0.9, -0.5, -0.1875, -0.7, -0.4375, 0.1875},
{-0.1875, -0.5, -0.9, 0.1875, -0.4375, -0.7},
{-0.1875, -0.5, 0.7, 0.1875, -0.4375, 0.9},
{-0.5, -0.5, -0.5, 0.5, -0.3125, 0.5},
}
},
on_construct = function(pos)
minetest.get_node_timer(pos):start(2)
end,
on_timer = function (pos, elapsed)
if not mesecon then return false end
for i, ob in pairs(minetest.get_objects_inside_radius(pos, 1)) do
if ob:is_player() or (ob:get_luaentity() and ob:get_luaentity().wsc) then
local node=minetest.get_node(pos)
mesecon.receptor_on(pos)
minetest.set_node(pos, {name ="portalgun:plantform_nu2", param1 = node.param1, param2 = node.param2})
end
return true
end
return true
end,
})
minetest.register_node("portalgun:plantform_nu2", {
description = "Pressure platform",
tiles = {"portalgun_presplat5.png","default_cloud.png","default_cloud.png","default_cloud.png","default_cloud.png","default_cloud.png"},
drop="portalgun:plantform_nu1",
groups = {mesecon = 2,cracky = 1, not_in_creative_inventory=1},
mesecons = {receptor = {state = "on"}},
paramtype = "light",
sunlight_propagates = true,
light_source = default.LIGHT_MAX - 1,
sounds = default.node_sound_stone_defaults(),
drawtype="nodebox",
node_box = {
type = "fixed",
fixed = {
{-0.7, -0.5, -0.7, 0.7, -0.375, 0.7},
{0.7, -0.5, -0.1875, 0.9, -0.4375, 0.1875},
{-0.9, -0.5, -0.1875, -0.7, -0.4375, 0.1875},
{-0.1875, -0.5, -0.9, 0.1875, -0.4375, -0.7},
{-0.1875, -0.5, 0.7, 0.1875, -0.4375, 0.9},
}
},
on_construct = function(pos)
minetest.get_node_timer(pos):start(2)
end,
on_timer = function (pos, elapsed)
for i, ob in pairs(minetest.get_objects_inside_radius(pos, 1)) do
if ob:is_player() or (ob:get_luaentity() and ob:get_luaentity().wsc) then
return true
end
end
mesecon.receptor_off(pos)
local node=minetest.get_node(pos)
minetest.set_node(pos, {name ="portalgun:plantform_nu1", param1 = node.param1, param2 = node.param2})
return true
end,
})
minetest.register_node("portalgun:planthole", {
description = "Plathole (activate by any cube, 2 blocks under)",
tiles = {"default_cloud.png"},
groups = {mesecon = 2,cracky = 1},
mesecons = {receptor = {state = "off"}},
paramtype = "light",
sunlight_propagates = true,
sounds = default.node_sound_stone_defaults(),
drawtype="nodebox",
node_box = {
type = "fixed",
fixed = {
{-1.5, -0.5, -1.5, 0.5, -0.25, -1.3},
{-1.5, -0.5, 0.3, 0.5, -0.25, 0.5},
{0.3, -0.5, -1.5, 0.5, -0.25, 0.5},
{-1.5, -0.5, -1.5, -1.3, -0.25, 0.5},
{0.5, -0.5, -0.9, 0.7, -0.375, -0.0625},
{-1.7, -0.5, -0.9, -1.5, -0.3125, -0.0625},
{-0.9, -0.5, -1.7, -0.0625, -0.375, -1.5},
{-1, -0.5, 0.5, -0.0625, -0.375, 0.7},
}
},
on_construct = function(pos)
minetest.get_node_timer(pos):start(5)
end,
on_timer = function (pos, elapsed)
local pos2={x=pos.x,y=pos.y-2,z=pos.z}
for i, ob in pairs(minetest.get_objects_inside_radius(pos2, 1)) do
if ob:get_luaentity() and ob:get_luaentity().wsc then
mesecon.receptor_on(pos)
return true
end
end
mesecon.receptor_off(pos)
return true
end,
})
minetest.register_node("portalgun:objdestroyer_1", {
description = "Object destroyer (destroys on active)",
tiles = {"portalgun_testblock.png^[colorize:#FF0000aa"},
groups = {cracky = 2,mesecon=1},
sounds = default.node_sound_stone_defaults(),
mesecons = {effector = {
action_on = function (pos, node)
minetest.set_node(pos, {name ="portalgun:objdestroyer_2"})
for i, ob in pairs(minetest.get_objects_inside_radius(pos, 5)) do
if ob:get_luaentity() then
ob:set_hp(0)
ob:punch(ob, {full_punch_interval=1.0,damage_groups={fleshy=9000}}, "default:bronze_pick", nil)
end
end
end
}}
})
minetest.register_node("portalgun:objdestroyer_2", {
description = "Obj destroyer",
tiles = {"portalgun_testblock.png^[colorize:#FF0000cc"},
groups = {cracky=2,mesecon=1,not_in_creative_inventory=1},
sunlight_propagates = true,
drop="portalgun:objdestroyer_1",
paramtype="light",
light_source = default.LIGHT_MAX - 1,
mesecons = {conductor = {
state = mesecon.state.on,
offstate = "portalgun:objdestroyer_1",
}},
})