This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
modding:constructiontypes [2020/07/14 10:43] yoshi [Industry Properties] |
modding:constructiontypes [2021/01/13 09:54] yoshi [UpdateFn Return Properties] |
||
---|---|---|---|
Line 170: | Line 170: | ||
* '' | * '' | ||
- | It is recommended to support these additional parameters to allow mission or game scripts to adjust the production and consumption of industries. The '' | + | It is recommended to support these additional parameters to allow mission or game scripts to adjust the production and consumption of industries. The '' |
==== UpdateFn Return Properties ==== | ==== UpdateFn Return Properties ==== | ||
Line 212: | Line 212: | ||
<code lua> | <code lua> | ||
result.stocks = { } | result.stocks = { } | ||
- | result.rule = { input = { { 0 } }, output = { COAL = 1 }, capacity = 200 } | + | result.rule = { input = { { } }, output = { COAL = 1 }, capacity = 200 } |
</ | </ | ||
Line 312: | Line 312: | ||
The '' | The '' | ||
<code lua> | <code lua> | ||
- | | + | result.personCapacity = { |
- | capacity = 2, | + | capacity = 2, |
- | type = " | + | type = " |
- | }, | + | }, |
</ | </ | ||
It contains two properties: | It contains two properties: | ||
Line 324: | Line 324: | ||
Buildings may request cargo items. Therefore they have '' | Buildings may request cargo items. Therefore they have '' | ||
<code lua> | <code lua> | ||
- | stocks = { | + | result.stocks = { |
{ | { | ||
cargoType = " | cargoType = " | ||
Line 333: | Line 333: | ||
... | ... | ||
}, | }, | ||
- | rule = { | + | result.rule = { |
capacity = 1, | capacity = 1, | ||
consumptionFactor = 1.2, | consumptionFactor = 1.2, | ||
Line 346: | Line 346: | ||
The scaffolding is shown while the building is constructed. To define its outline, there is a '' | The scaffolding is shown while the building is constructed. To define its outline, there is a '' | ||
<code lua> | <code lua> | ||
- | scaffold = { | + | result.scaffold = { |
buildingFace = { { { 7.68415, 4.89475, 0 }, { 7.67744, 15.68718, 0 }, { 0.80814, 15.69474, 0 }, ... } }, | buildingFace = { { { 7.68415, 4.89475, 0 }, { 7.67744, 15.68718, 0 }, { 0.80814, 15.69474, 0 }, ... } }, | ||
height = -1 | height = -1 |