forked from mrkubax10/industrialtest
Resize guide screenshots so they only contain machine formspecs
This commit is contained in:
@@ -29,6 +29,7 @@ local pages={
|
||||
<img name="industrialtest_guide_introduction.png" width="{{IMAGE_WIDTH}}">
|
||||
]]
|
||||
},
|
||||
|
||||
{
|
||||
name="electricalNetwork",
|
||||
title=S("Electrical network"),
|
||||
@@ -57,6 +58,7 @@ local pages={
|
||||
<left>Picture 1. Environment after consumer explosion</left>
|
||||
]]
|
||||
},
|
||||
|
||||
{
|
||||
name="cableFormer",
|
||||
title=S("Cable Former"),
|
||||
@@ -79,6 +81,7 @@ local pages={
|
||||
<left>Picture 1. Cable Former running</left>
|
||||
]]
|
||||
},
|
||||
|
||||
{
|
||||
name="canningMachine",
|
||||
title=S("Canning Machine"),
|
||||
@@ -136,7 +139,7 @@ local function getGuideFormspec(playerName,pageName)
|
||||
for _,page in ipairs(pages) do
|
||||
if page.name==pageName then
|
||||
local content=preprocessHypertext(page.content,{
|
||||
IMAGE_WIDTH=700,
|
||||
IMAGE_WIDTH=550,
|
||||
ITEM_HEIGHT=16
|
||||
})
|
||||
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",{
|
||||
description=S("Shows graphical guide for content and features provided by IndustrialTest"),
|
||||
func=showGuide
|
||||
func=function(playerName)
|
||||
showGuide(playerName)
|
||||
end
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user