local vec3 = require "vec3"
local transf = require "transf"
local industryutil = require "industryutil"
local constructionutil = require "constructionutil"
local paramsutil = require "paramsutil"
local colliderutil = require "colliderutil"
--Begin Generated
local generatedData = {
["base"] = {
models = {
["dafxf_baggerstationen/dafxf_bagger_ladestation_station.mdl"] = {
{ 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 },
},
},
meshes = {
["equal"] = { -- Grundfläche 0
{ { { 8, 8, 0 }, {-17, 8, 0 }, {-17, -8, 0 }, },{ {-17, -8, 0 }, {8, -8, 0 }, { 8, 8, 0 }, }, },
},
["greater"] = { -- Grundfläche 0
{ { { 8, 8, 0 }, {-17, 8, 0 }, {-17, -8, 0 }, },{ {-17, -8, 0 }, {8, -8, 0 }, { 8, 8, 0 }, }, },
},
["less"] = { -- Grundfläche 0
{ { { 8, 8, 0 }, {-17, 8, 0 }, {-17, -8, 0 }, },{ {-17, -8, 0 }, {8, -8, 0 }, { 8, 8, 0 }, }, },
},
},
curves = {
["collider"] = {
{ { 8, 8, 0 }, {-17, 8, 0 }, {-17, -5, 0 }, {8, -5, 0 }, },
},
["shared/dirt.gtex.lua"] = {
{{-17, 8, 0 }, {-17, 9.2, 0 }, {-17, -7.99998, 0 }, {-17, -8, 0 }, {-16.99998, -8, 0 }, {7.99998, -8, 0 }, {8, -8, 0 }, {8, -7.99998, 0 }, { 8, 9.2, 0 }, { 8, 8, 0 }, },
},
},
},
}
--End Generated
function data()
return {
skipOnInit = false,
type = "INDUSTRY",
description = {
name = _("Bagger-Station für eine optisch, fiktive Beladung eines LKW"),
description = _("Eine unsichtbare Station mit Industrie, für den Bagger, um fiktiv einen LKW beladen zu können"),
},
availability = {
yearFrom = 0
},
skipOnInit = false,
soundConfig = {
soundSet = { name = "Residential_1850" },
effects = {
select = {
"selected_residential.wav"
}
}
},
categories = { "SM1" },
order = 25558758,
params = {
{
key = "dafxf_industrie",
name = _("Auswahl der Industrie"),
uiType = "BUTTON",
values = { _("0"), },
},
{
key = "dafxf_dekoauswahl",
name = _("Auswahl der Deko"),
uiType = "BUTTON",
values = { _("Deko1"), },
},
},
updateFn = function(params)
local streetTypes = { "dafxf_bagger_strassen/dafxf_Bagger_2-Spuren-breit.lua", }
local level = (params.productionLevel or 0) + 1
local groundFace = { }
local terrainFaces = { }
local edges = { }
result.models = { }
result.groundFaces = { }
result.stocks = { }
result.stockRules = { }
result.edgeLists = {
{
type = "STREET",
params = { type = streetTypes[(params.streetType or 0) + 1], },
edges = {
{ { -27.0, 1.5, .0 }, { 10.0, 0, .0 } },
{ { -17.0, 1.5, .0 }, { 10.0, 0, .0 } },
},
snapNodes = { 0, }
}
}
-- Deko --
if params.dafxf_dekoauswahl == 0
then result.models[#result.models + 1] = { id = "asset/ricos_minibagger/ricos_minibagger_verladestation_deko.mdl",
transf = transf.rotZYXTransl(transf.degToRad(0.0, 0.0, 0.0), vec3.new(0.0, 0.0, 0.0)) }
end
-- Industrie --
if params.dafxf_industrie == 0 then
result.personCapacity = { type = "INDUSTRIAL", capacity = 1}
constructionutil.makeStocks({
stocks = {
{ cargoType = "COAL", type = "RECEIVING", x = -1, y = 2, z = -4, sizex = 1, sizey = 1},
},
rule = { input = { { 1, }, }, output = { COAL = 5, FOOD = 1, }, capacity = 20 }
}, result)
end
local gFace = { { 8, -8, -0.05 }, { -17.0, -8, -0.05 }, { -17.0, 8, -0.05 }, { 8, 8, -0.05 }, }
result.groundFaces[#result.groundFaces + 1] = { face = gFace, modes = { { type = "FILL", key = "farmland_border.lua" } } }
result.groundFaces[#result.groundFaces + 1] = { face = gFace, modes = { { type = "STROKE_OUTER", key = "pedestrian_connection_border.lua" } } }
constructionutil.addModelsAndGroups(params, generatedData["base"], result, constr)
return result
end
}
end
Alles anzeigen