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
|
||||
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,
|
||||
|
4
init.lua
4
init.lua
@ -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",
|
||||
|
@ -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 = {
|
||||
|
Loading…
Reference in New Issue
Block a user