Ich hab mal wieder ein kleines Skript-Problem.
Ich hab in Bereich um Zeile 233 aber nichts geändert und find auch keinen Fehler.
local constructionutil = require "constructionutil"
function data()
return
{
type = "ASSET_DEFAULT",
description =
{
name = _("Villa von 1937"),
description = _("eine kleine Vorstadtvilla in mehreren Varianten als Asset")
},
buildMode = "MULTI",
categories = { "kwirl77" },
skipCollision = true,
autoRemovable = false,
params =
{
{
key = "auswahl",
name = _("Fassadenauswahl/Fensterläden"),
values =
{
_("Variante gelb/gruen"),
_("variante weiss/braun"),
_("variante ziegel_rot/braun"),
_("variante Naturstein/braun"),
},
},
{
key = "type",
name = _("Bewohnt"),
values =
{
_("Asset"), _("Bewohnt"),
},
defaultIndex = 1
},
{
key = "bodenanpassung",
name = _("ohne Bodenanpassung"),
uiType = "CHECKBOX",
values = {"0", "1"}
},
},
updateFn = function(params)
local result = { }
result.models = { }
if params.type == 1
then
result.personCapacity =
{
type = "RESIDENTIAL",
capacity = 3
}
end
if params.auswahl == 0 and params.type == 0 then
result.models =
{ {
id = "villa_1937_variante1.mdl",
transf = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0.0, 1 }
} }
end
if params.auswahl == 0 and params.type == 1
then
result.models[#result.models+1] =
{
id = "villa_1937_variante1.mdl",
transf =
{ 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0.0, 1 },
}
result.models[#result.models+1] =
{
id = "villa_1937_lane_1.mdl", transf = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 },
}
end
if params.auswahl == 1 and params.type == 0 then
result.models =
{ {
id = "villa_1937_variante2.mdl",
transf = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0.0, 1 }
} }
end
if params.auswahl == 1 and params.type == 1
then
result.models[#result.models+1] =
{
id = "villa_1937_variante2.mdl",
transf =
{ 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0.0, 1 },
}
result.models[#result.models+1] =
{
id = "villa_1937_lane_1.mdl", transf = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 },
}
if params.auswahl == 2 and params.type == 0 then
result.models =
{ {
id = "villa_1937_variante3.mdl",
transf = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0.0, 1 }
} }
end
if params.auswahl == 2 and params.type == 1
then
result.models[#result.models+1] =
{
id = "villa_1937_variante3.mdl",
transf =
{ 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0.0, 1 },
}
result.models[#result.models+1] =
{
id = "villa_1937_lane_1.mdl", transf = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 },
}
if params.auswahl == 3 and params.type == 0 then
result.models =
{ {
id = "villa_1937_variante4.mdl",
transf = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0.0, 1 }
} }
end
if params.auswahl == 3 and params.type == 1
then
result.models[#result.models+1] =
{
id = "villa_1937_variante4.mdl",
transf =
{ 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0.0, 1 },
}
result.models[#result.models+1] =
{
id = "villa_1937_lane_1.mdl", transf = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 },
}
if params.bodenanpassung == 0 then
result.terrainAlignmentLists =
{
--vorne links
{
type = "EQUAL",
faces = { { { -4, -2, -0.15}, { -4, 0, -0.15 }, { 15, 3.86, -0.1}, { 15, -2, -0.1}, }, },
--slopeLow = 0.2,
--slopeHigh = .25,
optiaonal = true,
},
--vorne recht
{
type = "EQUAL",
faces = { { { 15, -2, -0.1}, { 20, -2, -0.1, }, { 20, 3.86, -0.1}, { 15, 3.86, -0.1}, }, },
--slopeLow = 0.2,
--slopeHigh = .25,
optional = true,a
},
--links Rampe
{
type = "EQUAL",
faces = { { { -4, -0, -0.15}, { 1; 0, -0.15}, { 1, 10.61, 1.31}, {-4, 10.61, 1.31}, }, },
--slopeLow = 0.2,
--slopeHigh = .25,
optional = true,
},
--hinten
{
type = "EQUAL",
faces = { { { -3, 10.61, 1.31}, { 18.64; 10.61, 1.31}, { 18.64, 14.61, 1.31}, {-3, 14.61, 1.31}, }, },
--slopeLow = 0.2,
--slopeHigh = .25,
optional = true,
},
--rechts
{
type = "EQUAL",
faces = { { { 14.64, -1, 0.0}, { 19; -1, 0.0}, { 19, 2.11, 0.0}, { 14.64, 2.11, 0.0}, }, },
--slopeLow = 0.2,
--slopeHigh = .25,
optional = true,
},
--Treppe rechts
{
type = "EQUAL",
faces = { { { 14.64, 2.20, 0.0}, { 19; 2.20, 0.0}, { 19, 4.1, 1.31}, {14.64, 4.1, 1.31}, }, },
--slopeLow = 0.2,
--slopeHigh = .25,
optional = true,
},
--Treppe oben
{
type = "EQUAL",
faces = { { { 17.64, 3.86, 1.31}, { 19; 3.86, 1.31}, { 19, 13.15, 1.31}, {17.64, 13.15, 1.31}, }, },
--slopeLow = 0.2,
--slopeHigh = .25,
optional = true,
},
}
end
if params.bodenanpassung == 1 then
result.terrainAlignmentLists =
{
{
type = "EQUAL",
faces = { }
}
}
end
return result
end
}
end
Alles anzeigen
Die .con kann ich hier irgendwie nicht hochladen, da er mit dann immer ungültige Dateiendung bringt.