Merge pull request #20 from Uberi/master

Add inventory images to speed up load times.
This commit is contained in:
VanessaE 2013-03-18 20:14:27 -07:00
commit 519a99f44e
4 changed files with 14 additions and 2 deletions

View File

@ -329,9 +329,11 @@ for fill = 0, 10 do
if fill == 0 then
filldesc="empty"
sgroups = {snappy=3, pipe=1, tankfill=fill+1}
image = nil
else
filldesc=fill.."0% full"
sgroups = {snappy=3, pipe=1, tankfill=fill+1, not_in_creative_inventory=1}
image = "pipeworks_storage_tank_fittings.png"
end
minetest.register_node("pipeworks:expansion_tank_"..fill, {
@ -344,6 +346,7 @@ for fill = 0, 10 do
"pipeworks_storage_tank_back.png",
pipeworks_liquid_texture.."^pipeworks_storage_tank_front_"..fill..".png"
},
inventory_image = image,
paramtype = "light",
paramtype2 = "facedir",
groups = {snappy=3, pipe=1, tankfill=fill+1, not_in_creative_inventory=1},
@ -374,6 +377,7 @@ for fill = 0, 10 do
"pipeworks_storage_tank_back.png",
pipeworks_liquid_texture.."^pipeworks_storage_tank_front_"..fill..".png"
},
inventory_image = image,
paramtype = "light",
paramtype2 = "facedir",
groups = sgroups,

View File

@ -248,15 +248,18 @@ for zp = 0, 1 do
if pname ~= "110000" then
pgroups = {snappy=3, pipe=1, not_in_creative_inventory=1}
pipedesc = "Pipe segment (empty, "..pname..")... You hacker, you."
image = "pipeworks_plain.png"
else
pgroups = {snappy=3, pipe=1}
pipedesc = "Pipe segment"
image = nil
end
minetest.register_node("pipeworks:pipe_"..pname.."_empty", {
description = pipedesc,
drawtype = "nodebox",
tiles = pipes_fix_image_names(outimgs, "_empty"),
inventory_image = image,
paramtype = "light",
selection_box = {
type = "fixed",
@ -287,6 +290,7 @@ for zp = 0, 1 do
description = "Pipe segment (loaded, "..pname..")... You hacker, you.",
drawtype = "nodebox",
tiles = pipes_fix_image_names(outimgs, "_loaded"),
inventory_image = image,
paramtype = "light",
selection_box = {
type = "fixed",

View File

@ -311,14 +311,17 @@ for node in ipairs(nodenames) do
if node ~= 2 then
pgroups = {snappy=3, pipe=1, not_in_creative_inventory=1}
image = "pipeworks_plain.png"
else
pgroups = {snappy=3, pipe=1}
image = nil
end
minetest.register_node("pipeworks:"..nodenames[node], {
description = "Empty Pipe ("..descriptions[node]..")",
drawtype = "nodebox",
tiles = fix_image_names(node, "_empty"),
inventory_image = image,
paramtype = "light",
paramtype2 = "facedir",
selection_box = {
@ -340,6 +343,7 @@ for node in ipairs(nodenames) do
description = "Loaded Pipe ("..descriptions[node]..")",
drawtype = "nodebox",
tiles = fix_image_names(node, "_loaded"),
inventory_image = image,
paramtype = "light",
paramtype2 = "facedir",
selection_box = {

View File

@ -157,7 +157,7 @@ for zp = 0, 1 do
if tname ~= "000000" then
tgroups = {snappy=3, tube=1, not_in_creative_inventory=1}
tubedesc = desc.." ("..tname..")... You hacker, you."
iimg=nil
iimg=plain_textures[1]
wscale = {x=1,y=1,z=1}
else
tgroups = {snappy=3, tube=1}
@ -464,4 +464,4 @@ minetest.register_abm({nodenames={"group:sand_tube"},interval=1,chance=1,
end})
modpath=minetest.get_modpath("pipeworks")
dofile(modpath.."/teleport_tube.lua")
dofile(modpath.."/teleport_tube.lua")