diff --git a/guide.lua b/guide.lua
index 11dbf03..777df50 100644
--- a/guide.lua
+++ b/guide.lua
@@ -89,9 +89,9 @@ local pages={
icon=industrialtest.elementKeys.paper,
content={
[[
- Introduction
+ ||Introduction||
- 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.||
]]
@@ -104,12 +104,12 @@ local pages={
icon="industrialtest:insulated_copper_cable",
content={
[[
- Electrical network
+ ||Electrical network||
- 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.
+ ||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.||
]],
createTable({
@@ -143,10 +143,10 @@ local pages={
"163800",
"Glass Fibre"
}
- },true,"Figure 1. Voltage levels and respective cables"),
+ },true,S("Figure 1. Voltage levels and respective cables")),
[[
- Picture 1. Environment after consumer explosion
+ ||Picture 1. Environment after consumer explosion||
]]
}
},
@@ -157,9 +157,9 @@ local pages={
icon="industrialtest:cable_former",
content={
[[
- Cable Former
+ ||Cable Former||
- 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
- Glass Fibre Cable can't be produced in it.||
]],
createMachineInformationTable({
@@ -182,7 +182,7 @@ local pages={
},S("Cable Former")),
[[
- Picture 1. Cable Former running
+ ||Picture 1. Cable Former running||
]]
}
},
@@ -193,9 +193,9 @@ local pages={
icon="industrialtest:canning_machine",
content={
[[
- Canning Machine
+ ||Canning Machine||
- 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
- Jetpack or
- Fuel Can.||
]],
createMachineInformationTable({
@@ -218,7 +218,7 @@ local pages={
},S("Canning Machine")),
[[
- Picture 1. Canning Machine refilling - Fuel Can with fuel from
- Coalfuel Cell
+ ||Picture 1. Canning Machine refilling - Fuel Can with fuel from
- Coalfuel Cell||
]]
}
},
@@ -229,9 +229,9 @@ local pages={
icon="industrialtest:compressor",
content={
[[
- Compressor
+ ||Compressor||
- Compressor as the name suggests is used to compress various materials. Mostly required to produce items for crafting other items.
+ ||Compressor as the name suggests is used to compress various materials. Mostly required to produce items for crafting other items.||
]],
createMachineInformationTable({
@@ -258,7 +258,7 @@ local pages={
},S("Compressor")),
[[
- Picture 1. Compressor compressing - Plantball into
- Compressed Plantball
+ ||Picture 1. Compressor compressing - Plantball into
- Compressed Plantball||
]]
}
},
@@ -269,9 +269,9 @@ local pages={
icon="industrialtest:electric_furnace",
content={
[[
- Electric Furnace
+ ||Electric Furnace||
- Electric Furnace like regular furnace can be used to smelt items. The difference is that Electric Furnace is slightly faster even without any upgrades and, well, it's electric so it doesn't require fuel.
+ ||Electric Furnace like regular furnace can be used to smelt items. The difference is that Electric Furnace is slightly faster even without any upgrades and, well, it's electric so it doesn't require fuel.||
]],
createMachineInformationTable({
@@ -298,16 +298,22 @@ local pages={
},S("Electric Furnace")),
[[
- Picture 1. Electric Furnace smelting - Iron Dust into
- Iron Ingot
+ ||Picture 1. Electric Furnace smelting - Iron Dust into
- Iron Ingot||
]]
}
}
}
local function preprocessHypertext(content,vars)
+ -- Find and replace strings which should be translated, this pattern matches any string that doesn't include | which is contained within || at both ends
+ content=string.gsub(content,"||([^|]+)||",function(sourceString)
+ return S(sourceString)
+ end)
+
for key,value in pairs(vars) do
content=string.gsub(content,string.format("{{%s}}",key),value)
end
+
return content
end