-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmod.lua
80 lines (72 loc) · 1.93 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
function data()
return {
info = {
minorVersion = 3,
severityAdd = "NONE",
severityRemove = "WARNING",
name = _("mod_name"),
description = _("mod_desc"),
tags = { "europe", "train", "deutsche bahn", "ice", "high speed" },
params = {
{
key = "ice1fake",
name = _("Fake"),
values = { "No", "Yes", },
tooltip = _("option_fake_ice1_desc"),
defaultIndex = 0,
},
},
dependencies = { },
requiredMods = { },
authors = {
{
name = "ModWerkstatt",
role = "CREATOR",
},
{
name = "Skyrames",
role = "Sound",
},
},
url = { "" },
visible = true,
},
runFn = function (settings, modParams)
local hidden = {
["CH-CH_fake.lua"] = true,
["CH-CH_klima_fake.lua"] = true,
["CH-CH_or_DBAG_fake.lua"] = true,
["CH-CH_or_fake.lua"] = true,
["CH-DE_fake.lua"] = true,
["CH-DE_klima_fake.lua"] = true,
["CH-DE_or_DBAG_fake.lua"] = true,
["CH-DE_or_fake.lua"] = true,
["duplo_fake.lua"] = true,
["fake.lua"] = true,
["klima_fake.lua"] = true,
["or_DBAG_fake.lua"] = true,
["or_fake.lua"] = true,
["klima_fake.lua"] = true,
["klima_rev_fake.lua"] = true,
["or_DBAG_fake.lua"] = true,
["or_DBAG_rev_fake.lua"] = true,
["rev_fake.lua"] = true,
["30Jahre_fake.lua"] = true,
["vr_fake.lua"] = true,
["vr_rev_fake.lua"] = true,
}
local modelFilter = function(fileName, data)
local modelName = fileName:match('/ice1_([^/]*.lua)') or fileName:match('/ice1R_([^/]*.lua)') or fileName:match('/ice2_([^/]*.lua)')
return (modelName==nil or hidden[modelName]~=true)
end
if modParams[getCurrentModId()] ~= nil then
local params = modParams[getCurrentModId()]
if params["ice1fake"] == 0 then
addFileFilter("multipleUnit", modelFilter)
end
else
addFileFilter("multipleUnit", modelFilter)
end
end
}
end