User Tools

Site Tools

Urban Games

modding:constructiontypes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

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:
   * ''industrialCapacity'' might be a capacity for jobs of residents.   * ''industrialCapacity'' might be a capacity for jobs of residents.
  
-It is recommended to support these additional parameters to allow mission or game scripts to adjust the production and consumption of industries. The ''industryutil.lua'' in ''res/scripts/'' contains a possible implementation in the ''addIndutryData'' function.+It is recommended to support these additional parameters to allow mission or game scripts to adjust the production and consumption of industries. The ''industryutil.lua'' in ''res/scripts/'' contains a possible implementation in the ''addIndustryData'' function.
  
 ==== UpdateFn Return Properties ==== ==== UpdateFn Return Properties ====
Line 212: Line 212:
 <code lua> <code lua>
 result.stocks = { } result.stocks = { }
-result.rule = { input = { { } }, output = { COAL = 1 }, capacity = 200 }+result.rule = { input = { { } }, output = { COAL = 1 }, capacity = 200 }
 </code> </code>
  
Line 312: Line 312:
 The ''personCapacity'' block defines the number of residents that can be covered by this building in the specific type of building: The ''personCapacity'' block defines the number of residents that can be covered by this building in the specific type of building:
 <code lua> <code lua>
-  personCapacity = { +result.personCapacity = { 
-    capacity = 2, +  capacity = 2, 
-    type = "INDUSTRIAL" +  type = "INDUSTRIAL" 
-  },+},
 </code> </code>
 It contains two properties: It contains two properties:
Line 324: Line 324:
 Buildings may request cargo items. Therefore they have ''stocks'' and ''rule'' blocks too: Buildings may request cargo items. Therefore they have ''stocks'' and ''rule'' blocks too:
 <code lua> <code lua>
-stocks = {+result.stocks = {
   {         {      
     cargoType = "MACHINES",           cargoType = "MACHINES",      
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 ''scaffold'' property: The scaffolding is shown while the building is constructed. To define its outline, there is a ''scaffold'' property:
 <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
modding/constructiontypes.txt · Last modified: 2023/02/04 14:32 by yoshi