1
0
mirror of https://github.com/Sokomine/cottages.git synced 2026-01-10 19:15:45 +01:00

fixed threshing floor formspec including anz seeds done

This commit is contained in:
Sokomine
2025-09-06 13:17:53 +02:00
parent 6be2fab510
commit a936c66753

View File

@@ -269,7 +269,10 @@ minetest.register_node("cottages:threshing_floor", {
end
local hud0 = puncher:hud_add({
hud_elem_type = "image",
name = "cottages_threshing_floor_base",
direction = 0,
z_index = 110,
type = "image",
scale = {x = 38, y = 38},
text = "cottages_junglewood.png^[colorize:#888888:128",
position = {x = 0.5, y = 0.5},
@@ -277,21 +280,30 @@ minetest.register_node("cottages:threshing_floor", {
});
local hud1 = puncher:hud_add({
hud_elem_type = "image",
name = "cottages_threshing_floor_overlay1",
direction = 0,
z_index = 111,
type = "image",
scale = {x = 15, y = 15},
text = "cottages_junglewood.png"..overlay1,
position = {x = 0.4, y = 0.5},
alignment = {x = 0, y = 0}
});
local hud2 = puncher:hud_add({
hud_elem_type = "image",
name = "cottages_threshing_floor_overlay2",
direction = 0,
z_index = 112,
type = "image",
scale = {x = 15, y = 15},
text = "cottages_junglewood.png"..overlay2,
position = {x = 0.6, y = 0.35},
alignment = {x = 0, y = 0}
});
local hud3 = puncher:hud_add({
hud_elem_type = "image",
name = "cottages_threshing_floor_overlay3",
direction = 0,
z_index = 113,
type = "image",
scale = {x = 15, y = 15},
text = "cottages_junglewood.png"..overlay3,
position = {x = 0.6, y = 0.65},
@@ -299,7 +311,10 @@ minetest.register_node("cottages:threshing_floor", {
});
local hud4 = puncher:hud_add({
hud_elem_type = "text",
name = "cottages_threshing_floor_remaining",
direction = 0,
z_index = 114,
type = "text",
text = tostring( found_wheat-anz_wheat ),
number = 0x00CC00,
alignment = {x = 0, y = 0},
@@ -309,11 +324,14 @@ minetest.register_node("cottages:threshing_floor", {
if( not( anz_straw )) then
anz_straw = "0";
end
if( not( anz_seed )) then
anz_seed = "0";
if( not( anz_seeds )) then
anz_seeds = "0"
end
local hud5 = puncher:hud_add({
hud_elem_type = "text",
name = "cottages_threshing_floor_anz_straw",
direction = 0,
z_index = 115,
type = "text",
text = '+ '..tostring( anz_straw )..' straw',
number = 0x00CC00,
alignment = {x = 0, y = 0},
@@ -321,8 +339,11 @@ minetest.register_node("cottages:threshing_floor", {
position = {x = 0.6, y = 0.35},
});
local hud6 = puncher:hud_add({
hud_elem_type = "text",
text = '+ '..tostring( anz_seed )..' seeds',
name = "cottages_threshing_floor_anz_seeds",
direction = 0,
z_index = 116,
type = "text",
text = '+ '..tostring( anz_seeds )..' seeds',
number = 0x00CC00,
alignment = {x = 0, y = 0},
scale = {x = 100, y = 100}, -- bounding rectangle of the text