Compare commits
3 Commits
69c8355ecb
...
8aa5ddc972
| Author | SHA1 | Date | |
|---|---|---|---|
| 8aa5ddc972 | |||
| a2ce0e5177 | |||
| 85b5d5808a |
127
guide.lua
127
guide.lua
@@ -64,9 +64,11 @@ end
|
|||||||
local function createMachineInformationTable(fields,machineName)
|
local function createMachineInformationTable(fields,machineName)
|
||||||
local fieldLabels={
|
local fieldLabels={
|
||||||
inputVoltage="Input voltage level",
|
inputVoltage="Input voltage level",
|
||||||
|
outputVoltage="Output voltage level",
|
||||||
recipe="Recipe type",
|
recipe="Recipe type",
|
||||||
powerCapacity="Power capacity",
|
powerCapacity="Power capacity",
|
||||||
opPower="Power per operation",
|
opPower="Power per operation",
|
||||||
|
powerPerFuel="Power per fuel unit",
|
||||||
efficiency="Default efficiency"
|
efficiency="Default efficiency"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -89,9 +91,9 @@ local pages={
|
|||||||
icon=industrialtest.elementKeys.paper,
|
icon=industrialtest.elementKeys.paper,
|
||||||
content={
|
content={
|
||||||
[[
|
[[
|
||||||
<big>Introduction</big>
|
<big>||Introduction||</big>
|
||||||
<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}}">
|
<img name="industrialtest_guide_introduction.png" width="{{IMAGE_WIDTH}}">
|
||||||
]]
|
]]
|
||||||
@@ -104,12 +106,12 @@ local pages={
|
|||||||
icon="industrialtest:insulated_copper_cable",
|
icon="industrialtest:insulated_copper_cable",
|
||||||
content={
|
content={
|
||||||
[[
|
[[
|
||||||
<big>Electrical network</big>
|
<big>||Electrical network||</big>
|
||||||
<left>
|
<left>
|
||||||
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.
|
||Picture 1 shows environment after consumer explosion.||
|
||||||
</left>
|
</left>
|
||||||
]],
|
]],
|
||||||
createTable({
|
createTable({
|
||||||
@@ -143,10 +145,10 @@ local pages={
|
|||||||
"163800",
|
"163800",
|
||||||
"Glass Fibre"
|
"Glass Fibre"
|
||||||
}
|
}
|
||||||
},true,"Figure 1. Voltage levels and respective cables"),
|
},true,S("Figure 1. Voltage levels and respective cables")),
|
||||||
[[
|
[[
|
||||||
<img name="industrialtest_guide_explosion.png" width="{{IMAGE_WIDTH}}">
|
<img name="industrialtest_guide_explosion.png" width="{{IMAGE_WIDTH}}">
|
||||||
<left>Picture 1. Environment after consumer explosion</left>
|
<left>||Picture 1. Environment after consumer explosion||</left>
|
||||||
]]
|
]]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -157,9 +159,9 @@ local pages={
|
|||||||
icon="industrialtest:cable_former",
|
icon="industrialtest:cable_former",
|
||||||
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 <item name="industrialtest:glass_fibre_cable" height="{{ITEM_HEIGHT}}"> <b>Glass Fibre Cable</b> 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>
|
||||||
]],
|
]],
|
||||||
createMachineInformationTable({
|
createMachineInformationTable({
|
||||||
@@ -182,7 +184,7 @@ local pages={
|
|||||||
},S("Cable Former")),
|
},S("Cable Former")),
|
||||||
[[
|
[[
|
||||||
<img name="industrialtest_guide_cable_former.png" width="{{IMAGE_WIDTH}}">
|
<img name="industrialtest_guide_cable_former.png" width="{{IMAGE_WIDTH}}">
|
||||||
<left>Picture 1. Cable Former running</left>
|
<left>||Picture 1. Cable Former running||</left>
|
||||||
]]
|
]]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -193,9 +195,9 @@ local pages={
|
|||||||
icon="industrialtest:canning_machine",
|
icon="industrialtest:canning_machine",
|
||||||
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 <item name="industrialtest:jetpack_v" height="{{ITEM_HEIGHT}}"> <b>Jetpack</b> or <item name="industrialtest:fuel_can" height="{{ITEM_HEIGHT}}"> <b>Fuel Can</b>.
|
||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>
|
||||||
]],
|
]],
|
||||||
createMachineInformationTable({
|
createMachineInformationTable({
|
||||||
@@ -218,7 +220,7 @@ local pages={
|
|||||||
},S("Canning Machine")),
|
},S("Canning Machine")),
|
||||||
[[
|
[[
|
||||||
<img name="industrialtest_guide_canning_machine.png" width="{{IMAGE_WIDTH}}">
|
<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>
|
<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>
|
||||||
]]
|
]]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -229,9 +231,9 @@ local pages={
|
|||||||
icon="industrialtest:compressor",
|
icon="industrialtest:compressor",
|
||||||
content={
|
content={
|
||||||
[[
|
[[
|
||||||
<big>Compressor</big>
|
<big>||Compressor||</big>
|
||||||
<left>
|
<left>
|
||||||
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.||
|
||||||
</left>
|
</left>
|
||||||
]],
|
]],
|
||||||
createMachineInformationTable({
|
createMachineInformationTable({
|
||||||
@@ -258,7 +260,7 @@ local pages={
|
|||||||
},S("Compressor")),
|
},S("Compressor")),
|
||||||
[[
|
[[
|
||||||
<img name="industrialtest_guide_compressor.png" width="{{IMAGE_WIDTH}}">
|
<img name="industrialtest_guide_compressor.png" width="{{IMAGE_WIDTH}}">
|
||||||
<left>Picture 1. Compressor compressing <item name="industrialtest:plantball" height="{{ITEM_HEIGHT}}"> <b>Plantball</b> into <item name="industrialtest:compressed_plantball" height="{{ITEM_HEIGHT}}"> <b>Compressed Plantball</b></left>
|
<left>||Picture 1. Compressor compressing <item name="industrialtest:plantball" height="{{ITEM_HEIGHT}}"> <b>Plantball</b> into <item name="industrialtest:compressed_plantball" height="{{ITEM_HEIGHT}}"> <b>Compressed Plantball</b>||</left>
|
||||||
]]
|
]]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -269,9 +271,9 @@ local pages={
|
|||||||
icon="industrialtest:electric_furnace",
|
icon="industrialtest:electric_furnace",
|
||||||
content={
|
content={
|
||||||
[[
|
[[
|
||||||
<big>Electric Furnace</big>
|
<big>||Electric Furnace||</big>
|
||||||
<left>
|
<left>
|
||||||
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.||
|
||||||
</left>
|
</left>
|
||||||
]],
|
]],
|
||||||
createMachineInformationTable({
|
createMachineInformationTable({
|
||||||
@@ -298,16 +300,94 @@ local pages={
|
|||||||
},S("Electric Furnace")),
|
},S("Electric Furnace")),
|
||||||
[[
|
[[
|
||||||
<img name="industrialtest_guide_electric_furnace.png" width="{{IMAGE_WIDTH}}">
|
<img name="industrialtest_guide_electric_furnace.png" width="{{IMAGE_WIDTH}}">
|
||||||
<left>Picture 1. Electric Furnace smelting <item name="industrialtest:iron_dust" height="{{ITEM_HEIGHT}}"> <b>Iron Dust</b> into <item name="{{elementKeyIronIngot}}" height="{{ITEM_HEIGHT}}"> <b>Iron Ingot</b></left>
|
<left>||Picture 1. Electric Furnace smelting <item name="industrialtest:iron_dust" height="{{ITEM_HEIGHT}}"> <b>Iron Dust</b> into <item name="{{elementKeyIronIngot}}" height="{{ITEM_HEIGHT}}"> <b>Iron Ingot</b>||</left>
|
||||||
|
]]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
name="extractor",
|
||||||
|
title=S("Extractor"),
|
||||||
|
icon="industrialtest:extractor",
|
||||||
|
content={
|
||||||
|
[[
|
||||||
|
<big>||Extractor||</big>
|
||||||
|
<left>
|
||||||
|
||Extractor is used to separate materials from within other materials, often when it's not possible by other means.||
|
||||||
|
</left>
|
||||||
|
]],
|
||||||
|
createMachineInformationTable({
|
||||||
|
{
|
||||||
|
name="inputVoltage",
|
||||||
|
value="LV"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name="recipe",
|
||||||
|
value="Extracting"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name="powerCapacity",
|
||||||
|
value="1000 EU"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name="opPower",
|
||||||
|
value="100 EU"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name="efficiency",
|
||||||
|
value="1"
|
||||||
|
}
|
||||||
|
},S("Extractor")),
|
||||||
|
[[
|
||||||
|
<img name="industrialtest_guide_extractor.png" width="{{IMAGE_WIDTH}}">
|
||||||
|
<left>||Picture 1. Extractor extracting <item name="{{elementKeyRubber}}" height="{{ITEM_HEIGHT}}"> <b>Rubber</b> from <item name="{{elementKeyRubberWood}}" height="{{ITEM_HEIGHT}}"> <b>Rubber Wood</b>||</left>
|
||||||
|
]]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
name="generator",
|
||||||
|
title=S("Generator"),
|
||||||
|
icon="industrialtest:generator",
|
||||||
|
content={
|
||||||
|
[[
|
||||||
|
<big>||Generator||</big>
|
||||||
|
<left>
|
||||||
|
||Generator produces energy from various fuels which can be used for smelting. It is the most basic way of powering electric machines and also the simplest to obtain.||
|
||||||
|
</left>
|
||||||
|
]],
|
||||||
|
createMachineInformationTable({
|
||||||
|
{
|
||||||
|
name="outputVoltage",
|
||||||
|
value="LV"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name="powerCapacity",
|
||||||
|
value="7000 EU"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name="powerPerFuel",
|
||||||
|
value="200 EU"
|
||||||
|
}
|
||||||
|
},S("Generator")),
|
||||||
|
[[
|
||||||
|
<img name="industrialtest_guide_generator.png" width="{{IMAGE_WIDTH}}">
|
||||||
|
<left>||Picture 1. Generator producing power from <item name="{{elementKeyCoal}}" height="{{ITEM_HEIGHT}}"> <b>Coal</b>||</left>
|
||||||
]]
|
]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
local function preprocessHypertext(content,vars)
|
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
|
for key,value in pairs(vars) do
|
||||||
content=string.gsub(content,string.format("{{%s}}",key),value)
|
content=string.gsub(content,string.format("{{%s}}",key),value)
|
||||||
end
|
end
|
||||||
|
|
||||||
return content
|
return content
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -339,7 +419,10 @@ local function getGuideFormspec(playerName,pageName)
|
|||||||
local content=preprocessHypertext(table.concat(page.content,""),{
|
local content=preprocessHypertext(table.concat(page.content,""),{
|
||||||
IMAGE_WIDTH=550,
|
IMAGE_WIDTH=550,
|
||||||
ITEM_HEIGHT=16,
|
ITEM_HEIGHT=16,
|
||||||
elementKeyIronIngot=industrialtest.elementKeys.ironIngot
|
elementKeyCoal=industrialtest.elementKeys.coal,
|
||||||
|
elementKeyIronIngot=industrialtest.elementKeys.ironIngot,
|
||||||
|
elementKeyRubber=industrialtest.elementKeys.rubber,
|
||||||
|
elementKeyRubberWood=industrialtest.elementKeys.rubberWood
|
||||||
})
|
})
|
||||||
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))
|
||||||
break
|
break
|
||||||
|
|||||||
BIN
textures/industrialtest_guide_extractor.png
Normal file
BIN
textures/industrialtest_guide_extractor.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
BIN
textures/industrialtest_guide_generator.png
Normal file
BIN
textures/industrialtest_guide_generator.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.4 KiB |
Reference in New Issue
Block a user