function data() return { info = { minorVersion = 0, severityAdd = "NONE", severityRemove = "NONE", name = _("Test"), description = _(info_desc), tags = {"Misc","Script Mod"}, authors = { { name = 'test', role = 'CREATOR', text = 'For myself', }, }, visible = true, }, options = { }, runFn = function (params) result.terrainAlignmentLists = { { type = "EQUAL", faces = { } } } result.personCapacity = { type = townBuildingParams.landUseType, capacity = params.capacity } if (townBuildingParams.landUseType == "INDUSTRIAL" or townBuildingParams.landUseType == "COMMERCIAL") then local ruleCapacity = math.floor(params.capacity / 16 + 0.5) if (ruleCapacity > 0) then result.stocks = { } result.stockRules = { } local cargoTypes = townBuildingParams.landUseType == "INDUSTRIAL" and { "CONSTRUCTION_MATERIALS", "MACHINES", "FUEL" } or { "TOOLS", "FOOD", "GOODS" } local inputs = { { { 1, 0, 0 } }, { { 0, 1, 0 } }, { { 0, 0, 1 } } } for i = 1, 3 do result.stocks[i] = { cargoType = cargoTypes[i], type = "RECEIVING", edges = { }, moreCapacity = ruleCapacity } result.stockRules[i] = { input = inputs[i], output = { { 0, 0, 0 } }, capacity = ruleCapacity } end end } end