Merge pull request 36.

This commit is contained in:
Duane 2016-07-04 00:16:19 -05:00
commit ededbd5a78
4 changed files with 101 additions and 14 deletions

View file

@ -11,6 +11,11 @@ mod, distributed under the WTFPL license.
https://forum.minetest.net/viewtopic.php?f=9&t=9522 https://forum.minetest.net/viewtopic.php?f=9&t=9522
Translocator node design, including models and textures came from Auke Kok's warps mod, distributed under LGPL 2.1 and cc-by-sa 3.
https://github.com/minetest-mods/warps/blob/master/LICENSE
The rest of this mod is distributed under the LGPL 2.1 license for The rest of this mod is distributed under the LGPL 2.1 license for
historic reasons. historic reasons.

View file

@ -0,0 +1,70 @@
# Blender v2.60 (sub 0) OBJ File: ''
# www.blender.org
mtllib warps_warpstone.mtl
o Plane
v 0.000345 -0.332211 0.238072
v -0.238873 -0.332211 -0.000181
v -0.187467 0.347788 0.000753
v 0.003339 0.347788 0.186987
v -0.000061 0.473738 -0.000013
v -0.000061 -0.400212 -0.000013
v 0.238345 -0.332211 0.000071
v 0.187345 0.347788 -0.000779
v -0.000467 -0.332211 -0.238097
v -0.003461 0.347788 -0.187013
vt 0.247005 0.000534
vt 0.000000 0.000534
vt 0.000000 0.499516
vt 0.247005 0.499516
vt 0.744000 0.749758
vt 0.744000 0.501019
vt 0.248498 0.501019
vt 0.248498 0.749758
vt 0.495503 0.000534
vt 0.248498 0.000534
vt 0.248498 0.499516
vt 0.495503 0.499516
vt 0.744000 1.000000
vt 0.744000 0.751261
vt 0.248498 0.751261
vt 0.248498 1.000000
vt 0.247005 1.000000
vt 0.247005 0.752012
vt 0.000746 1.000000
vt 0.497742 0.249273
vt 0.744000 0.001285
vt 0.744000 0.249273
vt 0.744000 0.251528
vt 0.497742 0.499516
vt 0.744000 0.499516
vt 0.247005 0.749758
vt 0.000746 0.749758
vt 0.247005 0.501770
vt 0.000000 0.751261
vt 0.000000 0.999249
vt 0.246259 0.751261
vt 0.743254 0.000534
vt 0.496995 0.248522
vt 0.496995 0.000534
vt 0.496995 0.250776
vt 0.496995 0.498764
vt 0.743254 0.250776
vt 0.000000 0.501019
vt 0.246259 0.501019
vt 0.000000 0.749006
g Plane_Plane_Material.001
usemtl Material.001
s off
f 2/1 1/2 4/3 3/4
f 1/5 7/6 8/7 4/8
f 7/9 9/10 10/11 8/12
f 9/13 2/14 3/15 10/16
s 1
f 5/17 3/18 4/19
f 1/20 2/21 6/22
f 7/23 1/24 6/25
f 5/26 4/27 8/28
f 5/29 8/30 10/31
f 9/32 7/33 6/34
f 6/35 2/36 9/37
f 5/38 10/39 3/40

View file

@ -325,12 +325,10 @@ local function translocate(pos, node, clicker, itemstack, pointed_thing)
local pos2 local pos2
if minetest.serialize(pair[2]) == minetest.serialize(pos) then if minetest.serialize(pair[2]) == minetest.serialize(pos) then
pos2 = table.copy(pair[1]) clicker:setpos(pair[1])
else else
pos2 = table.copy(pair[2]) clicker:setpos(pair[2])
end end
pos2.y = pos2.y + 1
clicker:setpos(pos2)
end end
local function trans_use(itemstack, user, pointed_thing) local function trans_use(itemstack, user, pointed_thing)
@ -428,16 +426,30 @@ local function trans_dig(pos, node, digger)
end end
end end
local newnode = fun_caves.clone_node("default:steelblock") minetest.register_node("fun_caves:translocator", {
newnode.description = "Translocator" visual = 'mesh',
newnode.tiles = {'fun_caves_translocator.png'} mesh = "fun_caves_translocator.obj",
newnode.on_rightclick = translocate description = 'Translocator',
newnode.on_use = trans_use tiles = {'fun_caves_translocator.png'},
newnode.on_place = trans_place drawtype = 'mesh',
newnode.on_dig = trans_dig sunlight_propagates = true,
newnode.stack_max = 1 walkable = false,
newnode.groups = {cracky = 3, oddly_breakable_by_hand = 3} paramtype = 'light',
minetest.register_node("fun_caves:translocator", newnode) paramtype2 = 'facedir',
use_texture_alpha = true,
groups = {cracky = 3, oddly_breakable_by_hand = 3},
light_source = 13,
sounds = default.node_sound_glass_defaults(),
stack_max = 1,
selection_box = {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.5, 0.25}
},
on_rightclick = translocate,
on_use = trans_use,
on_place = trans_place,
on_dig = trans_dig,
})
for _, gem in pairs(gems) do for _, gem in pairs(gems) do
minetest.register_craft({ minetest.register_craft({

Binary file not shown.

Before

Width:  |  Height:  |  Size: 357 B

After

Width:  |  Height:  |  Size: 2.4 KiB

Before After
Before After