local constructionutil = require "::/scripts/construction/constructionutil.lua" function data() return { updateFn = function(captureParams, params) local subconstruction = {} local offset_x = params.offset_x and params.offset_x or 0 local locomotiveModels = { [1] = "fake_br170_dc_db.mdl", [2] = "fake_br192_siemens.mdl", [3] = "fake_br193_ac_rpool.mdl", [4] = "fake_br193_ac_rpool_zza.mdl", [5] = "fake_br193_ac_siemens.mdl", [6] = "fake_br193_dc_siemens.mdl", [7] = "fake_br193_ms_siemens.mdl", [8] = "fake_br193_ms_siemens2.mdl", [9] = "fake_br247_siemens.mdl", [10] = "fake_br248_siemens.mdl", [11] = "fake_br249_db.mdl", } subconstruction.models = { } subconstruction.models[#subconstruction.models+1] = { id = locomotiveModels[params.vectron and params.vectron or 1], transf = constructionutil.rotateTransf(params, { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, offset_x, 0, 0, 1 }) } subconstruction.terrainAlignmentLists = { { type = "EQUAL", faces = { } } } local result = { } result.snapPoint = { transportModes = { "TRAIN", "ELECTRIC_TRAIN" }, allowSnapToBaseEdgeEnds = true, allowSnapToMesh = true, } result.subconstructions = { subconstruction } return result end } end