Resize guide screenshots so they only contain machine formspecs

This commit is contained in:
2025-11-22 19:50:45 +01:00
parent be435e616a
commit d1511a5f10
3 changed files with 7 additions and 2 deletions

View File

@@ -29,6 +29,7 @@ local pages={
<img name="industrialtest_guide_introduction.png" width="{{IMAGE_WIDTH}}"> <img name="industrialtest_guide_introduction.png" width="{{IMAGE_WIDTH}}">
]] ]]
}, },
{ {
name="electricalNetwork", name="electricalNetwork",
title=S("Electrical network"), title=S("Electrical network"),
@@ -57,6 +58,7 @@ local pages={
<left>Picture 1. Environment after consumer explosion</left> <left>Picture 1. Environment after consumer explosion</left>
]] ]]
}, },
{ {
name="cableFormer", name="cableFormer",
title=S("Cable Former"), title=S("Cable Former"),
@@ -79,6 +81,7 @@ local pages={
<left>Picture 1. Cable Former running</left> <left>Picture 1. Cable Former running</left>
]] ]]
}, },
{ {
name="canningMachine", name="canningMachine",
title=S("Canning Machine"), title=S("Canning Machine"),
@@ -136,7 +139,7 @@ local function getGuideFormspec(playerName,pageName)
for _,page in ipairs(pages) do for _,page in ipairs(pages) do
if page.name==pageName then if page.name==pageName then
local content=preprocessHypertext(page.content,{ local content=preprocessHypertext(page.content,{
IMAGE_WIDTH=700, IMAGE_WIDTH=550,
ITEM_HEIGHT=16 ITEM_HEIGHT=16
}) })
table.insert(formspec,string.format("hypertext[4.2,0.4;10.7,10.3;content;%s]",content)) table.insert(formspec,string.format("hypertext[4.2,0.4;10.7,10.3;content;%s]",content))
@@ -169,5 +172,7 @@ minetest.register_on_player_receive_fields(handleGuideFields)
minetest.register_chatcommand("industrialtest_guide",{ minetest.register_chatcommand("industrialtest_guide",{
description=S("Shows graphical guide for content and features provided by IndustrialTest"), description=S("Shows graphical guide for content and features provided by IndustrialTest"),
func=showGuide func=function(playerName)
showGuide(playerName)
end
}) })

Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 178 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB