+ Add photo item inventory image for Minetest < 5.8.0

This commit is contained in:
Nils Dagsson Moskopp 2023-11-12 14:26:16 +01:00
parent 768c8b2caa
commit 6290c3394d
Signed by: erle
GPG Key ID: A3BC671C35191080
3 changed files with 27 additions and 1 deletions

26
generate_textures.lua Normal file
View File

@ -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")

View File

@ -187,7 +187,7 @@ minetest.register_craftitem(
"xcam:photo",
{
description = "A photo.",
inventory_image = "blank.png",
inventory_image = "xcam_photo.tga",
groups = { not_in_creative_inventory = 1 },
on_place = function(itemstack, player, pointed_thing)
if "node" ~= pointed_thing.type then

BIN
textures/xcam_photo.tga Normal file

Binary file not shown.