forked from mrkubax10/industrialtest
Add few screenshots to visualize better
This commit is contained in:
36
guide.lua
36
guide.lua
@@ -26,6 +26,7 @@ local pages={
|
||||
<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.
|
||||
</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.
|
||||
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.
|
||||
Picture 1 shows environment after consumer explosion.
|
||||
</left>
|
||||
<mono>
|
||||
--------------------------------------------
|
||||
@@ -51,6 +53,8 @@ local pages={
|
||||
--------------------------------------------
|
||||
Figure 1. Voltage levels and respective cables
|
||||
</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=[[
|
||||
<big>Cable Former</big>
|
||||
<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>
|
||||
<mono>
|
||||
---------------------------------------
|
||||
@@ -71,6 +75,8 @@ local pages={
|
||||
---------------------------------------
|
||||
Figure 1. Machine information for Cable Former
|
||||
</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=[[
|
||||
<big>Canning Machine</big>
|
||||
<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>
|
||||
<mono>
|
||||
---------------------------------------
|
||||
@@ -91,10 +97,19 @@ local pages={
|
||||
---------------------------------------
|
||||
Figure 1. Machine information for Canning Machine
|
||||
</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 formspec={
|
||||
"formspec_version[4]",
|
||||
@@ -115,12 +130,17 @@ local function getGuideFormspec(playerName,pageName)
|
||||
end
|
||||
table.insert(formspec,"scroll_container_end[]")
|
||||
|
||||
if pageName then
|
||||
for _,page in ipairs(pages) do
|
||||
if page.name==pageName then
|
||||
table.insert(formspec,string.format("hypertext[4.2,0.4;10.7,10.3;content;%s]",page.content))
|
||||
break
|
||||
end
|
||||
-- Introduction page is shown by default
|
||||
pageName=(pageName or "introduction")
|
||||
|
||||
for _,page in ipairs(pages) do
|
||||
if page.name==pageName then
|
||||
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
|
||||
|
||||
|
||||
BIN
textures/industrialtest_guide_cable_former.png
Normal file
BIN
textures/industrialtest_guide_cable_former.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 172 KiB |
BIN
textures/industrialtest_guide_canning_machine.png
Normal file
BIN
textures/industrialtest_guide_canning_machine.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 178 KiB |
BIN
textures/industrialtest_guide_explosion.png
Normal file
BIN
textures/industrialtest_guide_explosion.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 295 KiB |
BIN
textures/industrialtest_guide_introduction.png
Normal file
BIN
textures/industrialtest_guide_introduction.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 321 KiB |
Reference in New Issue
Block a user