initial commit
This commit is contained in:
commit
ac7b1051af
1
depends.txt
Normal file
1
depends.txt
Normal file
@ -0,0 +1 @@
|
||||
travelnet
|
1
init.lua
Normal file
1
init.lua
Normal file
@ -0,0 +1 @@
|
||||
dofile(minetest.get_modpath("ctravelnet").."/nodes.lua")
|
66
nodes.lua
Normal file
66
nodes.lua
Normal file
@ -0,0 +1,66 @@
|
||||
minetest.register_node("ctravelnet:travelnet", {
|
||||
description = "Blue Travelnet Box",
|
||||
drawtype = "mesh",
|
||||
mesh = "travelnet.obj",
|
||||
sunlight_propagates = true,
|
||||
paramtype = 'light',
|
||||
paramtype2 = "facedir",
|
||||
wield_scale = {x=0.6, y=0.6, z=0.6},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, -0.5, 0.5, 1.5, 0.5 }
|
||||
},
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ 0.45, -0.5,-0.5, 0.5, 1.45, 0.5},
|
||||
{-0.5 , -0.5, 0.45, 0.45, 1.45, 0.5},
|
||||
{-0.5, -0.5,-0.5 ,-0.45, 1.45, 0.5},
|
||||
{ -0.5,-0.5,-0.5,0.5,-0.45, 0.5},
|
||||
{ -0.5, 1.45,-0.5,0.5, 1.5, 0.5},
|
||||
},
|
||||
},
|
||||
tiles = {
|
||||
"blue_travelnet_travelnet_front.png", -- backward view
|
||||
"blue_travelnet_travelnet_back.png", -- front view
|
||||
"blue_travelnet_travelnet_side.png", -- sides :)
|
||||
"default_steel_block.png", -- view from top
|
||||
"default_clay.png", -- view from bottom
|
||||
},
|
||||
inventory_image = "blue_travelnet_inv.png",
|
||||
groups = {cracky=1,choppy=1,snappy=1},
|
||||
light_source = 20,
|
||||
after_place_node = function(pos, placer, itemstack)
|
||||
local meta = minetest.get_meta(pos);
|
||||
meta:set_string("infotext", "Blue Travelnet-box (unconfigured)");
|
||||
meta:set_string("station_name", "");
|
||||
meta:set_string("station_network","");
|
||||
meta:set_string("owner", placer:get_player_name() );
|
||||
meta:set_string("formspec",
|
||||
"size[12,10]"..
|
||||
"field[0.3,5.6;6,0.7;station_name;Name of this station:;]"..
|
||||
"field[0.3,6.6;6,0.7;station_network;Assign to Network:;]"..
|
||||
"field[0.3,7.6;6,0.7;owner_name;(optional) owned by:;]"..
|
||||
"button_exit[6.3,6.2;1.7,0.7;station_set;Store]" );
|
||||
end,
|
||||
on_receive_fields = travelnet.on_receive_fields,
|
||||
on_punch = function(pos, node, puncher)
|
||||
travelnet.update_formspec(pos, puncher:get_player_name())
|
||||
end,
|
||||
can_dig = function( pos, player )
|
||||
return travelnet.can_dig( pos, player, 'travelnet box' )
|
||||
end,
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
travelnet.remove_box( pos, oldnode, oldmetadata, digger )
|
||||
end,
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
|
||||
local pos = pointed_thing.above;
|
||||
if( minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name ~= "air" ) then
|
||||
minetest.chat_send_player( placer:get_player_name(), 'Not enough vertical space to place the travelnet box!' )
|
||||
return;
|
||||
end
|
||||
return minetest.item_place(itemstack, placer, pointed_thing);
|
||||
end,
|
||||
|
||||
})
|
15
readme.md
Normal file
15
readme.md
Normal file
@ -0,0 +1,15 @@
|
||||
#### colored Travelnet Box
|
||||
|
||||
![](https://git.tchncs.de/Illuna-Minetest/ctravelnet/raw/master/screenshot.jpg)
|
||||
|
||||
This little Mod provides a (currently only) blue Travelbox.
|
||||
Its depending on [Sokomine's Travelnet Mod](https://github.com/Sokomine/travelnet).
|
||||
|
||||
different to regular box:
|
||||
|
||||
* No recipe, since its designed to mark travelnets by admins
|
||||
* Brigter Lightsource
|
||||
|
||||
known issues:
|
||||
|
||||
* draws a shadow on removing
|
BIN
screenshot.jpg
Normal file
BIN
screenshot.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 142 KiB |
BIN
textures/blue_travelnet_inv.png
Normal file
BIN
textures/blue_travelnet_inv.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.9 KiB |
BIN
textures/blue_travelnet_travelnet_back.png
Normal file
BIN
textures/blue_travelnet_travelnet_back.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 499 B |
BIN
textures/blue_travelnet_travelnet_front.png
Normal file
BIN
textures/blue_travelnet_travelnet_front.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 716 B |
BIN
textures/blue_travelnet_travelnet_side.png
Normal file
BIN
textures/blue_travelnet_travelnet_side.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 570 B |
Loading…
Reference in New Issue
Block a user