forked from mtcontrib/pipeworks
Merge pull request #20 from Uberi/master
Add inventory images to speed up load times.
This commit is contained in:
commit
519a99f44e
@ -329,9 +329,11 @@ for fill = 0, 10 do
|
|||||||
if fill == 0 then
|
if fill == 0 then
|
||||||
filldesc="empty"
|
filldesc="empty"
|
||||||
sgroups = {snappy=3, pipe=1, tankfill=fill+1}
|
sgroups = {snappy=3, pipe=1, tankfill=fill+1}
|
||||||
|
image = nil
|
||||||
else
|
else
|
||||||
filldesc=fill.."0% full"
|
filldesc=fill.."0% full"
|
||||||
sgroups = {snappy=3, pipe=1, tankfill=fill+1, not_in_creative_inventory=1}
|
sgroups = {snappy=3, pipe=1, tankfill=fill+1, not_in_creative_inventory=1}
|
||||||
|
image = "pipeworks_storage_tank_fittings.png"
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_node("pipeworks:expansion_tank_"..fill, {
|
minetest.register_node("pipeworks:expansion_tank_"..fill, {
|
||||||
@ -344,6 +346,7 @@ for fill = 0, 10 do
|
|||||||
"pipeworks_storage_tank_back.png",
|
"pipeworks_storage_tank_back.png",
|
||||||
pipeworks_liquid_texture.."^pipeworks_storage_tank_front_"..fill..".png"
|
pipeworks_liquid_texture.."^pipeworks_storage_tank_front_"..fill..".png"
|
||||||
},
|
},
|
||||||
|
inventory_image = image,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
groups = {snappy=3, pipe=1, tankfill=fill+1, not_in_creative_inventory=1},
|
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_storage_tank_back.png",
|
||||||
pipeworks_liquid_texture.."^pipeworks_storage_tank_front_"..fill..".png"
|
pipeworks_liquid_texture.."^pipeworks_storage_tank_front_"..fill..".png"
|
||||||
},
|
},
|
||||||
|
inventory_image = image,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
groups = sgroups,
|
groups = sgroups,
|
||||||
|
4
init.lua
4
init.lua
@ -248,15 +248,18 @@ for zp = 0, 1 do
|
|||||||
if pname ~= "110000" then
|
if pname ~= "110000" then
|
||||||
pgroups = {snappy=3, pipe=1, not_in_creative_inventory=1}
|
pgroups = {snappy=3, pipe=1, not_in_creative_inventory=1}
|
||||||
pipedesc = "Pipe segment (empty, "..pname..")... You hacker, you."
|
pipedesc = "Pipe segment (empty, "..pname..")... You hacker, you."
|
||||||
|
image = "pipeworks_plain.png"
|
||||||
else
|
else
|
||||||
pgroups = {snappy=3, pipe=1}
|
pgroups = {snappy=3, pipe=1}
|
||||||
pipedesc = "Pipe segment"
|
pipedesc = "Pipe segment"
|
||||||
|
image = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_node("pipeworks:pipe_"..pname.."_empty", {
|
minetest.register_node("pipeworks:pipe_"..pname.."_empty", {
|
||||||
description = pipedesc,
|
description = pipedesc,
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = pipes_fix_image_names(outimgs, "_empty"),
|
tiles = pipes_fix_image_names(outimgs, "_empty"),
|
||||||
|
inventory_image = image,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
@ -287,6 +290,7 @@ for zp = 0, 1 do
|
|||||||
description = "Pipe segment (loaded, "..pname..")... You hacker, you.",
|
description = "Pipe segment (loaded, "..pname..")... You hacker, you.",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = pipes_fix_image_names(outimgs, "_loaded"),
|
tiles = pipes_fix_image_names(outimgs, "_loaded"),
|
||||||
|
inventory_image = image,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
|
@ -311,14 +311,17 @@ for node in ipairs(nodenames) do
|
|||||||
|
|
||||||
if node ~= 2 then
|
if node ~= 2 then
|
||||||
pgroups = {snappy=3, pipe=1, not_in_creative_inventory=1}
|
pgroups = {snappy=3, pipe=1, not_in_creative_inventory=1}
|
||||||
|
image = "pipeworks_plain.png"
|
||||||
else
|
else
|
||||||
pgroups = {snappy=3, pipe=1}
|
pgroups = {snappy=3, pipe=1}
|
||||||
|
image = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_node("pipeworks:"..nodenames[node], {
|
minetest.register_node("pipeworks:"..nodenames[node], {
|
||||||
description = "Empty Pipe ("..descriptions[node]..")",
|
description = "Empty Pipe ("..descriptions[node]..")",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = fix_image_names(node, "_empty"),
|
tiles = fix_image_names(node, "_empty"),
|
||||||
|
inventory_image = image,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
selection_box = {
|
selection_box = {
|
||||||
@ -340,6 +343,7 @@ for node in ipairs(nodenames) do
|
|||||||
description = "Loaded Pipe ("..descriptions[node]..")",
|
description = "Loaded Pipe ("..descriptions[node]..")",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = fix_image_names(node, "_loaded"),
|
tiles = fix_image_names(node, "_loaded"),
|
||||||
|
inventory_image = image,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
selection_box = {
|
selection_box = {
|
||||||
|
@ -157,7 +157,7 @@ for zp = 0, 1 do
|
|||||||
if tname ~= "000000" then
|
if tname ~= "000000" then
|
||||||
tgroups = {snappy=3, tube=1, not_in_creative_inventory=1}
|
tgroups = {snappy=3, tube=1, not_in_creative_inventory=1}
|
||||||
tubedesc = desc.." ("..tname..")... You hacker, you."
|
tubedesc = desc.." ("..tname..")... You hacker, you."
|
||||||
iimg=nil
|
iimg=plain_textures[1]
|
||||||
wscale = {x=1,y=1,z=1}
|
wscale = {x=1,y=1,z=1}
|
||||||
else
|
else
|
||||||
tgroups = {snappy=3, tube=1}
|
tgroups = {snappy=3, tube=1}
|
||||||
|
Loading…
Reference in New Issue
Block a user