Advertisement
Guest User

Untitled

a guest
Nov 4th, 2015
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.61 KB | None | 0 0
  1.  require "stringutil"
  2. require "tableutil"
  3.  
  4. local ff = fileFilters
  5.  
  6. local usaDlcOrMod = ff.package.dlcOrMod("usa")
  7.  
  8. addFileFilter("model/vehicle", "/usa", _("American"), ff.combine({ usaDlcOrMod, ff.model.vehicle }))
  9. addFileFilter("model/tree", "/usa", _("American"), ff.combine({ usaDlcOrMod, ff.model.tree }))
  10.  
  11. addFileFilter("model/industry", "/usa", _("American"), function (fileName, data)
  12.             if not ff.model.industry(fileName, data) then return false end
  13.                        
  14.             if usaDlcOrMod(fileName, data) then return true end
  15.            
  16.             if fileName == "res/models/model/industry/forest_1850.mdl" then return false end
  17.                    
  18.             return true
  19.         end)
  20.  
  21. addFileFilter("multipleUnit", "/usa", _("American"), usaDlcOrMod)
  22.  
  23. addFileFilter("building", "/usa", _("American"), usaDlcOrMod)
  24.  
  25. addFileFilter("street", "/usa", _("American"), function (fileName, data)
  26.             if usaDlcOrMod(fileName, data) then return true end
  27.  
  28.             if fileName == "res/config/street/country_new_large.lua" then return true end
  29.             if fileName == "res/config/street/country_new_large_upgrade.lua" then return true end
  30.             if fileName == "res/config/street/country_new_medium.lua" then return true end
  31.             if fileName == "res/config/street/country_new_medium_upgrade.lua" then return true end
  32.             if fileName == "res/config/street/country_new_small.lua" then return true end
  33.             if fileName == "res/config/street/country_old_large.lua" then return true end
  34.             if fileName == "res/config/street/country_old_large_upgrade.lua" then return true end
  35.             if fileName == "res/config/street/country_old_medium.lua" then return true end
  36.             if fileName == "res/config/street/country_old_medium_upgrade.lua" then return true end
  37.             if fileName == "res/config/street/country_old_small.lua" then return true end
  38.            
  39.             return false
  40.         end)
  41.        
  42.  
  43. local terCfg = table.copy(getConfig("terrain", "/default"))
  44.  
  45. terCfg.name = _("American")
  46. terCfg.generator.ridgeTex.fileName = "terrain/usa/ridge.tga"
  47. terCfg.textures.riverBed[1][1].fileName = "terrain/usa/riverbed_detail.tga"
  48. terCfg.textures.riverBed[2][1].fileName = "terrain/usa/riverbed_color.tga"
  49. terCfg.textures.forestFloor.detailTex.fileName = "terrain/usa/grass_wood.tga"
  50. terCfg.textures.forestFloor.detailNrmlTex.fileName = "terrain/usa/grass_wood_nrml.tga"
  51. terCfg.textures.farmland[1].colorTex.fileName = "terrain/usa/farmland_brown_color.tga"
  52. terCfg.textures.farmland[2].colorTex.fileName = "terrain/usa/farmland_green_color.tga"
  53. terCfg.textures.farmland[3].colorTex.fileName = "terrain/usa/farmland_yellow_color.tga"
  54. terCfg.shader.noiseTex.fileName = "terrain/usa/noise.tga"
  55. terCfg.shader.textures[1].detailTex.fileName = "terrain/usa/grass_detail.tga"
  56. terCfg.shader.textures[1].detailNrmlTex.fileName = "terrain/usa/grass_detail_nrml.tga"
  57. terCfg.shader.textures[1].colorTex.fileName = "terrain/usa/grass_colors.tga"
  58. terCfg.shader.textures[2].detailTex.fileName = "terrain/usa/rock_detail.tga"
  59. terCfg.shader.textures[2].detailNrmlTex.fileName = "terrain/usa/rock_detail_nrml.tga"
  60. terCfg.shader.textures[2].colorTex.fileName = "terrain/usa/rock_colors.tga"
  61.  
  62. setConfig("terrain", "/usa", terCfg)
  63.  
  64.  
  65. local envCfg = table.copy(getConfig("environment", "/default"))
  66.  
  67. envCfg.name = _("American")
  68. envCfg.skyBox.textures[1] = "skybox/usa/0.tga"
  69. envCfg.skyBox.textures[2] = "skybox/usa/90.tga"
  70. envCfg.skyBox.textures[3] = "skybox/usa/180.tga"
  71. envCfg.skyBox.textures[4] = "skybox/usa/270.tga"
  72. envCfg.skyBox.textures[5] = "skybox/usa/top.tga"
  73. envCfg.skyBox.textures[6] = "skybox/usa/bottom.tga"
  74. envCfg.envMap.texture = "usa/c.tga"
  75.  
  76. setConfig("environment", "/usa", envCfg)
  77.  
  78.  
  79. setConfig("nameList", "/usa", { name = _("American"), folder = "usa" })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement