Add few screenshots to visualize better

This commit is contained in:
2025-11-22 15:27:21 +01:00
parent b4ea5629c1
commit be435e616a
5 changed files with 28 additions and 8 deletions

View File

@@ -26,6 +26,7 @@ local pages={
<left> <left>
IndustrialTest implements finite power functionality which can be used to perform various tasks using generators and consumers. Such features are not a new thing in Luanti, as there are older mods which do that already. This mod, however, proves to be more flexible. IndustrialTest implements finite power functionality which can be used to perform various tasks using generators and consumers. Such features are not a new thing in Luanti, as there are older mods which do that already. This mod, however, proves to be more flexible.
</left> </left>
<img name="industrialtest_guide_introduction.png" width="{{IMAGE_WIDTH}}">
]] ]]
}, },
{ {
@@ -38,6 +39,7 @@ local pages={
In order to attach electricity consumers to power sources (like generators, batteries, further just called generators) electrical network is used. Consumers can get connected either directly to generators or through various cables. Each generator can output certain voltage (this is actually amperage, however since this mod doesn't simulate electricity accurately, it's called voltage), the same situation is for consumers as they can only handle up to certain voltage. In order to attach electricity consumers to power sources (like generators, batteries, further just called generators) electrical network is used. Consumers can get connected either directly to generators or through various cables. Each generator can output certain voltage (this is actually amperage, however since this mod doesn't simulate electricity accurately, it's called voltage), the same situation is for consumers as they can only handle up to certain voltage.
Figure 1 shows voltage levels present in this mod. Figure 1 shows voltage levels present in this mod.
If voltage is too high for cable it will melt without dropping anything while consumer will explode also without dropping anything and possibly destroying terrain around. Power capacity is measured in EU (Energy Units) and the voltage is EU/update. If voltage is too high for cable it will melt without dropping anything while consumer will explode also without dropping anything and possibly destroying terrain around. Power capacity is measured in EU (Energy Units) and the voltage is EU/update.
Picture 1 shows environment after consumer explosion.
</left> </left>
<mono> <mono>
-------------------------------------------- --------------------------------------------
@@ -51,6 +53,8 @@ local pages={
-------------------------------------------- --------------------------------------------
Figure 1. Voltage levels and respective cables Figure 1. Voltage levels and respective cables
</mono> </mono>
<img name="industrialtest_guide_explosion.png" width="{{IMAGE_WIDTH}}">
<left>Picture 1. Environment after consumer explosion</left>
]] ]]
}, },
{ {
@@ -60,7 +64,7 @@ local pages={
content=[[ content=[[
<big>Cable Former</big> <big>Cable Former</big>
<left> <left>
Cable Former can be used to produce cables with higher material efficiency. It can, however, only produce cables from metals so for example Glass Fibre Cable can't be produced in it. Cable Former can be used to produce cables with higher material efficiency. It can, however, only produce cables from metals so for example <item name="industrialtest:glass_fibre_cable" height="{{ITEM_HEIGHT}}"> <b>Glass Fibre Cable</b> can't be produced in it.
</left> </left>
<mono> <mono>
--------------------------------------- ---------------------------------------
@@ -71,6 +75,8 @@ local pages={
--------------------------------------- ---------------------------------------
Figure 1. Machine information for Cable Former Figure 1. Machine information for Cable Former
</mono> </mono>
<img name="industrialtest_guide_cable_former.png" width="{{IMAGE_WIDTH}}">
<left>Picture 1. Cable Former running</left>
]] ]]
}, },
{ {
@@ -80,7 +86,7 @@ local pages={
content=[[ content=[[
<big>Canning Machine</big> <big>Canning Machine</big>
<left> <left>
Canning Machine is used to move certain fluid from one item to another. The common usage is to refill fuel in Jetpack or Fuel Can. Canning Machine is used to move certain fluid from one item to another. The common usage is to refill fuel in <item name="industrialtest:jetpack_v" height="{{ITEM_HEIGHT}}"> <b>Jetpack</b> or <item name="industrialtest:fuel_can" height="{{ITEM_HEIGHT}}"> <b>Fuel Can</b>.
</left> </left>
<mono> <mono>
--------------------------------------- ---------------------------------------
@@ -91,10 +97,19 @@ local pages={
--------------------------------------- ---------------------------------------
Figure 1. Machine information for Canning Machine Figure 1. Machine information for Canning Machine
</mono> </mono>
<img name="industrialtest_guide_canning_machine.png" width="{{IMAGE_WIDTH}}">
<left>Picture 1. Canning Machine refilling <item name="industrialtest:fuel_can" height="{{ITEM_HEIGHT}}"> <b>Fuel Can</b> with fuel from <item name="industrialtest:coalfuel_cell" height="{{ITEM_HEIGHT}}"> <b>Coalfuel Cell</b></left>
]] ]]
} }
} }
local function preprocessHypertext(content,vars)
for key,value in pairs(vars) do
content=string.gsub(content,string.format("{{%s}}",key),value)
end
return content
end
local function getGuideFormspec(playerName,pageName) local function getGuideFormspec(playerName,pageName)
local formspec={ local formspec={
"formspec_version[4]", "formspec_version[4]",
@@ -115,12 +130,17 @@ local function getGuideFormspec(playerName,pageName)
end end
table.insert(formspec,"scroll_container_end[]") table.insert(formspec,"scroll_container_end[]")
if pageName then -- Introduction page is shown by default
for _,page in ipairs(pages) do pageName=(pageName or "introduction")
if page.name==pageName then
table.insert(formspec,string.format("hypertext[4.2,0.4;10.7,10.3;content;%s]",page.content)) for _,page in ipairs(pages) do
break if page.name==pageName then
end local content=preprocessHypertext(page.content,{
IMAGE_WIDTH=700,
ITEM_HEIGHT=16
})
table.insert(formspec,string.format("hypertext[4.2,0.4;10.7,10.3;content;%s]",content))
break
end end
end end

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 KiB