local constructionutil = require "constructionutil" function data() return { type = "ASSET_DEFAULT", description = { name = _("Fachwerkhäuser"), description = _("Fachwerkhäuser") }, availability = { yearFrom = 1879, }, buildMode = "SINGLE", categories = { "Frank's Asset's" }, order = 28954 + 72, skipCollision = true, autoRemovable = false, params = { { key = "type", name = _("Haustype"), values = { _("No1"), }, }, { key = "farbe", name = _("Fachwerkfarbe"), values = { _("Dunkelbraun"), _("Hellbraun"), _("Schwarz"), _("Rotbraun"), }, }, { key = "fassade", name = _("Fassade"), values = { _("Ziegel Hellrot"), _("Ziegel Rot"), _("Ziegel Hell"), _("Putz"), }, }, { key = "dach", name = _("Dach"), values = { _("Ziegel Dunkel"), _("Ziegel Hell"), _("Schindel"), }, }, { key = "keller", name = _("Keller"), values = { _("Aus"), _("keller 01"), _("Keller 02"), _("Keller 03"), }, }, { key = "fenster", name = _("Fenster"), values = { _("fenster 01"), _("fenster 02"), }, }, { key = "tuer", name = _("Tür"), values = { _("tür 01"), _("tür 02"), }, }, }, updateFn = function(params) local result = { } result.models = { } --if params.type == 0 then --result.models[#result.models+1] = { id = "fwh_01/fwh_01.mdl", transf = constructionutil.rotateTransf(params, { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 } ) } --end -- if params.type > 0 -- then -- result.personCapacity = { -- type = "RESIDENTIAL", -- capacity = 10 -- } -- end if params.farbe == 0 then result.models[#result.models+1] = { id = "fwh_01/fwh_01_fachwerk_dunkelbraun.mdl", transf = constructionutil.rotateTransf(params, { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 } ) } elseif params.farbe == 1 then result.models[#result.models+1] = { id = "fwh_01/fwh_01_fachwerk_hellbraun.mdl", transf = constructionutil.rotateTransf(params, { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 } ) } elseif params.farbe == 2 then result.models[#result.models+1] = { id = "fwh_01/fwh_01_fachwerk_schwarz.mdl", transf = constructionutil.rotateTransf(params, { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 } ) } elseif params.farbe == 3 then result.models[#result.models+1] = { id = "fwh_01/fwh_01_fachwerk_rotbraun.mdl", transf = constructionutil.rotateTransf(params, { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 } ) } end if params.fassade == 0 then result.models[#result.models+1] = { id = "fwh_01/fwh_01_fassade_ziegel_hellrot.mdl", transf = constructionutil.rotateTransf(params, { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 } ) } elseif params.fassade == 1 then result.models[#result.models+1] = { id = "fwh_01/fwh_01_fassade_ziegel_rot_alt.mdl", transf = constructionutil.rotateTransf(params, { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 } ) } elseif params.fassade == 2 then result.models[#result.models+1] = { id = "fwh_01/fwh_01_fassade_ziegel_hell.mdl", transf = constructionutil.rotateTransf(params, { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 } ) } elseif params.fassade == 3 then result.models[#result.models+1] = { id = "fwh_01/fwh_01_fassade_putz.mdl", transf = constructionutil.rotateTransf(params, { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 } ) } end if params.dach == 0 then result.models[#result.models+1] = { id = "fwh_01/fwh_01_dach_ziegel_dunkel.mdl", transf = constructionutil.rotateTransf(params, { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 } ) } elseif params.dach == 1 then result.models[#result.models+1] = { id = "fwh_01/fwh_01_dach_ziegel_hell.mdl", transf = constructionutil.rotateTransf(params, { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 } ) } elseif params.dach == 2 then result.models[#result.models+1] = { id = "fwh_01/fwh_01_dach_schindel.mdl", transf = constructionutil.rotateTransf(params, { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 } ) } end if params.keller == 0 then elseif params.keller == 1 then result.models[#result.models+1] = { id = "fwh_01/fwh_01_keller_01.mdl", transf = constructionutil.rotateTransf(params, { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 } ) } elseif params.keller == 2 then result.models[#result.models+1] = { id = "fwh_01/fwh_01_keller_02.mdl", transf = constructionutil.rotateTransf(params, { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 } ) } elseif params.keller == 3 then result.models[#result.models+1] = { id = "fwh_01/fwh_01_keller_03.mdl", transf = constructionutil.rotateTransf(params, { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 } ) } end if params.keller >= 1 and params.fenster == 0 then result.models[#result.models+1] = { id = "fwh_01/fwh_01_kellerfenster_01.mdl", transf = constructionutil.rotateTransf(params, { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 } ) } elseif params.keller >= 1 and params.fenster == 1 then result.models[#result.models+1] = { id = "fwh_01/fwh_01_kellerfenster_02.mdl", transf = constructionutil.rotateTransf(params, { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 } ) } end if params.fenster == 0 then result.models[#result.models+1] = { id = "fwh_01/fwh_01_fenster_01.mdl", transf = constructionutil.rotateTransf(params, { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 } ) } elseif params.fenster == 1 then result.models[#result.models+1] = { id = "fwh_01/fwh_01_fenster_02.mdl", transf = constructionutil.rotateTransf(params, { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 } ) } end if params.tuer == 0 then result.models[#result.models+1] = { id = "fwh_01/fwh_01_tuer_01.mdl", transf = constructionutil.rotateTransf(params, { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 } ) } elseif params.tuer == 1 then result.models[#result.models+1] = { id = "fwh_01/fwh_01_tuer_02.mdl", transf = constructionutil.rotateTransf(params, { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 } ) } end result.terrainAlignmentLists = { { type = "EQUAL", faces = { } }} return result end } end