+ Add photo item inventory image for Minetest < 5.8.0
This commit is contained in:
parent
768c8b2caa
commit
6290c3394d
|
@ -0,0 +1,26 @@
|
||||||
|
dofile("../tga_encoder/init.lua")
|
||||||
|
|
||||||
|
local L = { 128 }
|
||||||
|
local _ = { 160 }
|
||||||
|
local O = { 192 }
|
||||||
|
local W = { 255 }
|
||||||
|
|
||||||
|
local pixels = {
|
||||||
|
{ W, W, W, W, W, W, W, W, W, W, W, W, W, W, W, W },
|
||||||
|
{ W, W, W, W, W, W, W, W, W, W, W, W, W, W, W, W },
|
||||||
|
{ W, W, _, _, _, _, _, _, _, _, _, _, _, _, W, W },
|
||||||
|
{ W, W, _, _, _, _, _, _, _, _, _, _, _, _, W, W },
|
||||||
|
{ W, W, _, _, _, L, _, _, _, L, L, L, _, _, W, W },
|
||||||
|
{ W, W, _, _, _, L, _, _, _, L, L, L, _, _, W, W },
|
||||||
|
{ W, W, O, O, O, L, O, O, O, L, L, L, O, O, W, W },
|
||||||
|
{ W, W, O, O, L, L, L, O, O, O, O, O, O, O, W, W },
|
||||||
|
{ W, W, O, L, L, L, L, L, O, O, O, O, O, O, W, W },
|
||||||
|
{ W, W, O, L, L, L, L, L, O, O, O, O, O, O, W, W },
|
||||||
|
{ W, W, O, L, L, L, L, L, O, O, _, _, O, O, W, W },
|
||||||
|
{ W, W, O, O, L, L, L, O, O, O, _, _, O, O, W, W },
|
||||||
|
{ W, W, O, O, O, O, O, O, O, O, O, O, O, O, W, W },
|
||||||
|
{ W, W, O, O, O, O, O, O, O, O, O, O, O, O, W, W },
|
||||||
|
{ W, W, W, W, W, W, W, W, W, W, W, W, W, W, W, W },
|
||||||
|
{ W, W, W, W, W, W, W, W, W, W, W, W, W, W, W, W },
|
||||||
|
}
|
||||||
|
tga_encoder.image(pixels):save("textures/xcam_photo.tga")
|
2
init.lua
2
init.lua
|
@ -187,7 +187,7 @@ minetest.register_craftitem(
|
||||||
"xcam:photo",
|
"xcam:photo",
|
||||||
{
|
{
|
||||||
description = "A photo.",
|
description = "A photo.",
|
||||||
inventory_image = "blank.png",
|
inventory_image = "xcam_photo.tga",
|
||||||
groups = { not_in_creative_inventory = 1 },
|
groups = { not_in_creative_inventory = 1 },
|
||||||
on_place = function(itemstack, player, pointed_thing)
|
on_place = function(itemstack, player, pointed_thing)
|
||||||
if "node" ~= pointed_thing.type then
|
if "node" ~= pointed_thing.type then
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue