Removed env:

This commit is contained in:
DonBatman 2015-11-15 05:12:26 -08:00
parent 863b69a82f
commit dc14fe4b93
3 changed files with 5 additions and 39 deletions

View File

@ -1,34 +0,0 @@
millwork
========
Crown Mold, Baseboards, Columns and more
Latest update adds different textures to the millwork.
If you want to add or remove a texture simply edit the table at the top of millwork.lua file.
Right now I have these textures: White, Sandstone, Desert Sand and Clay. The others are commented out.
Each texture has 28 nodes so careful that you don't add too many textures.
local material = {--{Name for description}, {image without .png}, {item name}, {mod name}
{ "White", "crownmold_white","white","wool"},
-- { "Cobble", "default_cobble","cobble","default"},
{ "Sandstone", "default_sandstone","sandstone","default"},
-- { "Desert Stone", "default_desert_stone","desert_stone","default"},
-- { "Stone", "default_stone","stone","default"},
-- { "Tree", "default_tree","tree","default"},
{ "Desert Sand", "default_desert_sand","desert_sand","default"},
{ "Clay", "default_clay","clay","default"},
-- { "Dirt", "default_dirt","dirt","default"},
}

View File

@ -36,13 +36,13 @@ minetest.register_node("mymillwork:machine", {
},
after_place_node = function(pos, placer)
local meta = minetest.env:get_meta(pos);
local meta = minetest.get_meta(pos);
meta:set_string("owner", (placer:get_player_name() or ""));
meta:set_string("infotext", "Millwork Machine is empty (owned by " .. (placer:get_player_name() or "") .. ")");
meta:set_string("infotext", "Millwork Machine (owned by " .. (placer:get_player_name() or "") .. ")");
end,
can_dig = function(pos,player)
local meta = minetest.env:get_meta(pos);
local meta = minetest.get_meta(pos);
local inv = meta:get_inventory()
if not inv:is_empty("ingot") then
return false
@ -53,7 +53,7 @@ can_dig = function(pos,player)
end,
on_construct = function(pos)
local meta = minetest.env:get_meta(pos)
local meta = minetest.get_meta(pos)
meta:set_string("formspec", "invsize[10,11;]"..
"background[-0.15,-0.25;10.40,11.75;mymillwork_background.png]"..
"list[current_name;ingot;7,5.5.5;1,1;]"..
@ -101,7 +101,7 @@ on_construct = function(pos)
end,
on_receive_fields = function(pos, formname, fields, sender)
local meta = minetest.env:get_meta(pos)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
-----------------------------

BIN
screenshot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 329 KiB