-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmod.lua
51 lines (45 loc) · 1.27 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
function data()
return {
info = {
minorVersion = 0,
severityAdd = "NONE",
severityRemove = "WARNING",
name = _("mod_name"),
description = _("mod_desc"),
authors = {
{
name = "Modwerkstatt",
role = "CREATOR",
},
},
tags = {"dampflok", "steam", "drg", "kpev", "locomotive", "preußen"},
visible = true,
params = {
{
key = "hide_prg3_legacy",
name = _("Legacy G3 available?"),
uiType = "CHECKBOX",
values = { "No", "Yes", },
defaultIndex = 1,
},
},
},
runFn = function (settings, modParams)
local function legacyFilter(fileName, data)
if data.metadata.description and data.metadata.description.name == "VEHICLE_TRAIN_BR53_PREUS_G3_NAME" then
data.metadata.availability.yearFrom = 1
data.metadata.availability.yearTo = 2
end
return data
end
if modParams[getCurrentModId()] ~= nil then
local params = modParams[getCurrentModId()]
if params["hide_prg3_legacy"] == 0 then
addModifier("loadModel", legacyFilter)
end
else
addModifier("loadModel", legacyFilter)
end
end
}
end