1520DLC/main.lua

81 lines
3.1 KiB
Lua
Raw Normal View History

2016-03-08 13:02:03 +03:00
require "stringutil"
require "tableutil"
local ff = fileFilters
local x_1520DlcOrMod = ff.package.dlcOrMod("1520")
local baseOrMod = ff.package.baseOrMod
addFileFilter("model/vehicle", "/1520", _("1520"), ff.combine({ x_1520DlcOrMod, ff.model.vehicle }))
addFileFilter("model/tree", "/1520", _("1520"), ff.combine({ x_1520DlcOrMod, ff.model.tree }))
addFileFilter("model/industry", "/1520", _("1520"), function (fileName, data)
if not ff.model.industry(fileName, data) then return false end
if x_1520DlcOrMod(fileName, data) then return true end
if fileName == "res/models/model/industry/forest_1850.mdl" then return false end
return true
end)
function filterModels(fileName, data)
if ff.model.other(fileName, data) then
return x_1520DlcOrMod
else
return false
end
end
function filterStreets(filename, data)
return baseOrMod(filename, data) or x_1520DlcOrMod(filename, data)
end
addFileFilter("model/other", "/1520", _("1520"), filterModels)
addFileFilter("multipleUnit", "/1520", _("1520"), x_1520DlcOrMod)
addFileFilter("building", "/default", _("1520"), baseOrMod)
addFileFilter("street", "/1520", _("1520"), filterStreets)
local terCfg = table.copy(getConfig("terrain", "/default"))
terCfg.name = _("1520")
terCfg.generator.ridgeTex.fileName = "terrain/1520/ridge.tga"
terCfg.textures.riverBed[1][1].fileName = "terrain/1520/riverbed_detail.tga"
terCfg.textures.riverBed[2][1].fileName = "terrain/1520/riverbed_color.tga"
terCfg.textures.forestFloor.detailTex.fileName = "terrain/1520/grass_wood.tga"
terCfg.textures.forestFloor.detailNrmlTex.fileName = "terrain/1520/grass_wood_nrml.tga"
terCfg.textures.farmland[1].colorTex.fileName = "terrain/1520/farmland_brown_color.tga"
terCfg.textures.farmland[2].colorTex.fileName = "terrain/1520/farmland_green_color.tga"
terCfg.textures.farmland[3].colorTex.fileName = "terrain/1520/farmland_yellow_color.tga"
terCfg.shader.noiseTex.fileName = "terrain/1520/noise.tga"
terCfg.shader.textures[1].detailTex.fileName = "terrain/1520/grass_detail.tga"
terCfg.shader.textures[1].detailNrmlTex.fileName = "terrain/1520/grass_detail_nrml.tga"
terCfg.shader.textures[1].colorTex.fileName = "terrain/1520/grass_colors.tga"
terCfg.shader.textures[2].detailTex.fileName = "terrain/1520/rock_detail.tga"
terCfg.shader.textures[2].detailNrmlTex.fileName = "terrain/1520/rock_detail_nrml.tga"
terCfg.shader.textures[2].colorTex.fileName = "terrain/1520/rock_colors.tga"
setConfig("terrain", "/1520", terCfg)
local envCfg = table.copy(getConfig("environment", "/default"))
envCfg.name = _("1520")
envCfg.skyBox.textures[1] = "skybox/1520/0.tga"
envCfg.skyBox.textures[2] = "skybox/1520/90.tga"
envCfg.skyBox.textures[3] = "skybox/1520/180.tga"
envCfg.skyBox.textures[4] = "skybox/1520/270.tga"
envCfg.skyBox.textures[5] = "skybox/1520/top.tga"
envCfg.skyBox.textures[6] = "skybox/1520/bottom.tga"
envCfg.envMap.texture = "1520/c.tga"
setConfig("environment", "/1520", envCfg)
setConfig("nameList", "/1520", { name = _("1520"), folder = "1520" })