-
Notifications
You must be signed in to change notification settings - Fork 0
/
mod.lua
62 lines (56 loc) · 1.47 KB
/
mod.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
function data()
return {
info = {
minorVersion = 2,
severityAdd = "NONE",
severityRemove = "WARNING",
name = _("mod_name"),
description = _("mod_desc"),
authors = {
{
name = "ModWerkstatt",
role = "CREATOR",
},
},
tags = { "europe", "waggon", "schuettgut", "deutschland", "germany", "UIC", "gueterwagen", "db" },
minGameVersion = 0,
dependencies = { },
url = { "" },
params = {
{
key = "facs124_fake",
name = _("Fake_facs124_wagen"),
values = { "No", "Yes", },
tooltip = _("option_fake_facs124_desc"),
defaultIndex = 0,
},
},
},
options = {
},
runFn = function (settings, modParams)
local params = modParams[getCurrentModId()]
local hidden = {
["y_dr_fake.mdl"] = true,
["db_fake.mdl"] = true,
["dbag_fake.mdl"] = true,
["dr_fake.mdl"] = true,
["vr_fake.mdl"] = true,
}
local modelFilter = function(fileName, data)
local modelName = fileName:match('/Eads-([^/]*.mdl)')
or fileName:match('/Facs124_([^/]*.mdl)')
return (modelName==nil or hidden[modelName]~=true)
end
if modParams[getCurrentModId()] ~= nil then
local params = modParams[getCurrentModId()]
if params["facs124_fake"] == 0 then
addFileFilter("model/vehicle", modelFilter)
end
else
addFileFilter("model/vehicle", modelFilter)
end
addModifier( "loadModel", metadataHandler )
end
}
end