init.lua 45 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253
  1. local mod_name = "classic_coaches_nationality_livery_pack"
  2. -- Notify player if a newer version of AdvTrains Livery Tools is needed.
  3. if not advtrains_livery_database.is_compatible_mod_version or
  4. not advtrains_livery_database.is_compatible_mod_version({major = 0, minor = 9, patch = 0}) then
  5. minetest.log("error", "["..mod_name.."] An old version of AdvTrains Livery Tools was detected. Please update to the latest version.")
  6. -- Version 0.9.0 is required because advtrains_livery_database.has_wagon_livery_template() is called.
  7. return
  8. end
  9. local S = minetest.get_translator(mod_name)
  10. -- Get the translated livery template names from the classic_coaches_generic_livery_pack
  11. -- mod in order to insure they will match during look-up.
  12. local livery_template_generic_tricolor = minetest.translate("classic_coaches_generic_livery_pack", "Generic - Tricolor")
  13. local livery_template_generic_window_stripes = minetest.translate("classic_coaches_generic_livery_pack", "Generic - Window Stripes")
  14. local livery_template_generic_slanted_bands = minetest.translate("classic_coaches_generic_livery_pack", "Generic - Slanted Bands")
  15. -- Define groups of wagon types that will share predefined liveries.
  16. local wagon_types = {
  17. all_coaches = {
  18. "classic_coaches:corridor_coach_class1",
  19. "classic_coaches:corridor_coach_class2",
  20. "classic_coaches:open_coach_class1",
  21. "classic_coaches:open_coach_class2",
  22. "classic_coaches:bistro_coach",
  23. },
  24. common_coaches = {
  25. "classic_coaches:corridor_coach_class1",
  26. "classic_coaches:corridor_coach_class2",
  27. "classic_coaches:open_coach_class1",
  28. "classic_coaches:open_coach_class2",
  29. },
  30. bistro_coaches = {
  31. "classic_coaches:bistro_coach",
  32. },
  33. }
  34. local predefined_liveries = {
  35. {
  36. name = S("Nationality - Argentina"),
  37. wagon_types = wagon_types.all_coaches,
  38. notes = "",
  39. livery_design = {
  40. livery_template_name = livery_template_generic_tricolor,
  41. overlays = {
  42. [1] = {id = 1, color = "#75AADB"}, -- "Upper Side Walls",
  43. [2] = {id = 2, color = "#75AADB"}, -- "Lower Side Walls",
  44. [3] = {id = 3, color = "#FFFFFF"}, -- "Window Band",
  45. [4] = {id = 4, color = "#FCBF49"}, -- "Window Band Trim",
  46. [5] = {id = 5, color = "#843511"}, -- "Class Number"/"Bistro Label",
  47. },
  48. },
  49. },
  50. {
  51. name = S("Nationality - Argentina (Slanted Bands)"),
  52. wagon_types = wagon_types.all_coaches,
  53. notes = "",
  54. livery_design = {
  55. livery_template_name = livery_template_generic_slanted_bands,
  56. overlays = {
  57. -- [1] = {id = 1, color = "#000000"}, -- "Side Walls",
  58. [2] = {id = 2, color = "#75AADB"}, -- "Left Slanted Band",
  59. [3] = {id = 3, color = "#FFFFFF"}, -- "Middle Slanted Band",
  60. [4] = {id = 4, color = "#75AADB"}, -- "Right Slanted Band",
  61. [5] = {id = 5, color = "#FCBF49"}, -- "Stripe",
  62. [6] = {id = 6, color = "#843511"}, -- "Class Number"/"Bistro Label",
  63. },
  64. },
  65. },
  66. {
  67. name = S("Nationality - Australia"),
  68. wagon_types = wagon_types.common_coaches,
  69. notes = "",
  70. livery_design = {
  71. livery_template_name = livery_template_generic_tricolor,
  72. overlays = {
  73. [1] = {id = 1, color = "#00008B"}, -- "Upper Side Walls",
  74. [2] = {id = 2, color = "#00008B"}, -- "Lower Side Walls",
  75. [3] = {id = 3, color = "#FF0000"}, -- "Window Band",
  76. [4] = {id = 4, color = "#FFFFFF"}, -- "Window Band Trim",
  77. [5] = {id = 5, color = "#00008B"}, -- "Class Number",
  78. },
  79. },
  80. },
  81. {
  82. name = S("Nationality - Australia"),
  83. wagon_types = wagon_types.bistro_coaches,
  84. notes = "",
  85. livery_design = {
  86. livery_template_name = livery_template_generic_tricolor,
  87. overlays = {
  88. [1] = {id = 1, color = "#00008B"}, -- "Upper Side Walls",
  89. [2] = {id = 2, color = "#00008B"}, -- "Lower Side Walls",
  90. [3] = {id = 3, color = "#FF0000"}, -- "Window Band",
  91. [4] = {id = 4, color = "#FFFFFF"}, -- "Window Band Trim",
  92. [5] = {id = 5, color = "#FFFFFF"}, -- "Bistro Label",
  93. -- [6] = {id = 6, color = "#000000"}, -- "Galley",
  94. },
  95. },
  96. },
  97. {
  98. name = S("Nationality - Australia (Slanted Bands)"),
  99. wagon_types = wagon_types.common_coaches,
  100. notes = "",
  101. livery_design = {
  102. livery_template_name = livery_template_generic_slanted_bands,
  103. overlays = {
  104. -- [1] = {id = 1, color = "#000000"}, -- "Side Walls",
  105. [2] = {id = 2, color = "#FFFFFF"}, -- "Left Slanted Band",
  106. [3] = {id = 3, color = "#FF0000"}, -- "Middle Slanted Band",
  107. [4] = {id = 4, color = "#00008B"}, -- "Right Slanted Band",
  108. [5] = {id = 5, color = "#FFFFFF"}, -- "Stripe",
  109. [6] = {id = 6, color = "#00008B"}, -- "Class Number",
  110. },
  111. },
  112. },
  113. {
  114. name = S("Nationality - Australia (Slanted Bands)"),
  115. wagon_types = wagon_types.bistro_coaches,
  116. notes = "",
  117. livery_design = {
  118. livery_template_name = livery_template_generic_slanted_bands,
  119. overlays = {
  120. -- [1] = {id = 1, color = "#000000"}, -- "Side Walls",
  121. [2] = {id = 2, color = "#FFFFFF"}, -- "Left Slanted Band",
  122. [3] = {id = 3, color = "#FF0000"}, -- "Middle Slanted Band",
  123. [4] = {id = 4, color = "#00008B"}, -- "Right Slanted Band",
  124. [5] = {id = 5, color = "#FFFFFF"}, -- "Stripe",
  125. -- [6] = {id = 6, color = "#000000"}, -- "Bistro Label",
  126. },
  127. },
  128. },
  129. {
  130. name = S("Nationality - Brazil"),
  131. wagon_types = wagon_types.all_coaches,
  132. notes = "",
  133. livery_design = {
  134. livery_template_name = livery_template_generic_tricolor,
  135. overlays = {
  136. [1] = {id = 1, color = "#FFDF00"}, -- "Upper Side Walls",
  137. [2] = {id = 2, color = "#009C3B"}, -- "Lower Side Walls",
  138. [3] = {id = 3, color = "#002776"}, -- "Window Band",
  139. [4] = {id = 4, color = "#FFDF00"}, -- "Window Band Trim",
  140. [5] = {id = 5, color = "#FFFFFF"}, -- "Class Number"/"Bistro Label",
  141. },
  142. },
  143. },
  144. {
  145. name = S("Nationality - Brazil (Slanted Bands)"),
  146. wagon_types = wagon_types.common_coaches,
  147. notes = "",
  148. livery_design = {
  149. livery_template_name = livery_template_generic_slanted_bands,
  150. overlays = {
  151. -- [1] = {id = 1, color = "#000000"}, -- "Side Walls",
  152. [2] = {id = 2, color = "#009440"}, -- "Left Slanted Band",
  153. [3] = {id = 3, color = "#FFCB00"}, -- "Middle Slanted Band",
  154. [4] = {id = 4, color = "#302681"}, -- "Right Slanted Band",
  155. [5] = {id = 5, color = "#FFFFFF"}, -- "Stripe",
  156. [6] = {id = 6, color = "#302681"}, -- "Class Number",
  157. },
  158. },
  159. },
  160. {
  161. name = S("Nationality - Brazil (Slanted Bands)"),
  162. wagon_types = wagon_types.bistro_coaches,
  163. notes = "",
  164. livery_design = {
  165. livery_template_name = livery_template_generic_slanted_bands,
  166. overlays = {
  167. -- [1] = {id = 1, color = "#000000"}, -- "Side Walls",
  168. [2] = {id = 2, color = "#009440"}, -- "Left Slanted Band",
  169. [3] = {id = 3, color = "#FFCB00"}, -- "Middle Slanted Band",
  170. [4] = {id = 4, color = "#302681"}, -- "Right Slanted Band",
  171. [5] = {id = 5, color = "#FFFFFF"}, -- "Stripe",
  172. -- [6] = {id = 6, color = "#000000"}, -- "Bistro Label",
  173. },
  174. },
  175. },
  176. {
  177. name = S("Nationality - Canada"),
  178. wagon_types = wagon_types.common_coaches,
  179. notes = "",
  180. livery_design = {
  181. livery_template_name = livery_template_generic_tricolor,
  182. overlays = {
  183. [1] = {id = 1, color = "#FF0000"}, -- "Upper Side Walls",
  184. [2] = {id = 2, color = "#FF0000"}, -- "Lower Side Walls",
  185. [3] = {id = 3, color = "#FFFFFF"}, -- "Window Band",
  186. [4] = {id = 4, color = "#FF0000"}, -- "Window Band Trim",
  187. [5] = {id = 5, color = "#FF0000"}, -- "Class Number",
  188. },
  189. },
  190. },
  191. {
  192. name = S("Nationality - Canada"),
  193. wagon_types = wagon_types.bistro_coaches,
  194. notes = "",
  195. livery_design = {
  196. livery_template_name = livery_template_generic_tricolor,
  197. overlays = {
  198. [1] = {id = 1, color = "#FF0000"}, -- "Upper Side Walls",
  199. [2] = {id = 2, color = "#FF0000"}, -- "Lower Side Walls",
  200. [3] = {id = 3, color = "#FFFFFF"}, -- "Window Band",
  201. [4] = {id = 4, color = "#FF0000"}, -- "Window Band Trim",
  202. [5] = {id = 5, color = "#FFFFFF"}, -- "Bistro Label",
  203. -- [6] = {id = 6, color = "#000000"}, -- "Galley",
  204. },
  205. },
  206. },
  207. {
  208. name = S("Nationality - Canada (Slanted Bands)"),
  209. wagon_types = wagon_types.common_coaches,
  210. notes = "",
  211. livery_design = {
  212. livery_template_name = livery_template_generic_slanted_bands,
  213. overlays = {
  214. -- [1] = {id = 1, color = "#000000"}, -- "Side Walls",
  215. [2] = {id = 2, color = "#FF0000"}, -- "Left Slanted Band",
  216. [3] = {id = 3, color = "#FFFFFF"}, -- "Middle Slanted Band",
  217. [4] = {id = 4, color = "#FF0000"}, -- "Right Slanted Band",
  218. -- [5] = {id = 5, color = "#000000"}, -- "Stripe",
  219. [6] = {id = 6, color = "#181818"}, -- "Class Number",
  220. },
  221. },
  222. },
  223. {
  224. name = S("Nationality - Canada (Slanted Bands)"),
  225. wagon_types = wagon_types.bistro_coaches,
  226. notes = "",
  227. livery_design = {
  228. livery_template_name = livery_template_generic_slanted_bands,
  229. overlays = {
  230. -- [1] = {id = 1, color = "#000000"}, -- "Side Walls",
  231. [2] = {id = 2, color = "#FF0000"}, -- "Left Slanted Band",
  232. [3] = {id = 3, color = "#FFFFFF"}, -- "Middle Slanted Band",
  233. [4] = {id = 4, color = "#FF0000"}, -- "Right Slanted Band",
  234. -- [5] = {id = 5, color = "#000000"}, -- "Stripe",
  235. -- [6] = {id = 6, color = "#000000"}, -- ""Bistro Label",
  236. },
  237. },
  238. },
  239. {
  240. name = S("Nationality - China"),
  241. wagon_types = wagon_types.all_coaches,
  242. notes = "",
  243. livery_design = {
  244. livery_template_name = livery_template_generic_tricolor,
  245. overlays = {
  246. [1] = {id = 1, color = "#EE1C25"}, -- "Side Walls",
  247. [2] = {id = 2, color = "#EE1C25"}, -- "Seats",
  248. -- [3] = {id = 3, color = "#000000"}, -- "Service Stripe",
  249. [4] = {id = 4, color = "#EE1C25"}, -- "Logo",
  250. [5] = {id = 5, color = "#FFFF00"}, -- "Class Number"/"Bistro Label",
  251. },
  252. },
  253. },
  254. {
  255. name = S("Nationality - China (Slanted Bands)"),
  256. wagon_types = wagon_types.all_coaches,
  257. notes = "",
  258. livery_design = {
  259. livery_template_name = livery_template_generic_slanted_bands,
  260. overlays = {
  261. -- [1] = {id = 1, color = "#000000"}, -- "Side Walls",
  262. [2] = {id = 2, color = "#EE1C25"}, -- "Left Slanted Band",
  263. [3] = {id = 3, color = "#EE1C25"}, -- "Middle Slanted Band",
  264. -- [4] = {id = 4, color = "#000000"}, -- "Right Slanted Band",
  265. -- [5] = {id = 5, color = "#000000"}, -- "Stripe",
  266. [6] = {id = 6, color = "#FFFF00"}, -- "Class Number"/"Bistro Label",
  267. },
  268. },
  269. },
  270. {
  271. name = S("Nationality - Czech Republic"),
  272. wagon_types = wagon_types.common_coaches,
  273. notes = "",
  274. livery_design = {
  275. livery_template_name = livery_template_generic_tricolor,
  276. overlays = {
  277. [1] = {id = 1, color = "#FFFFFF"}, -- "Upper Side Walls",
  278. [2] = {id = 2, color = "#D7141A"}, -- "Lower Side Walls",
  279. [3] = {id = 3, color = "#11457E"}, -- "Window Band",
  280. [4] = {id = 4, color = "#FFFFFF"}, -- "Window Band Trim",
  281. [5] = {id = 5, color = "#D7141A"}, -- "Class Number",
  282. },
  283. },
  284. },
  285. {
  286. name = S("Nationality - Czech Republic"),
  287. wagon_types = wagon_types.bistro_coaches,
  288. notes = "",
  289. livery_design = {
  290. livery_template_name = livery_template_generic_tricolor,
  291. overlays = {
  292. [1] = {id = 1, color = "#FFFFFF"}, -- "Upper Side Walls",
  293. [2] = {id = 2, color = "#D7141A"}, -- "Lower Side Walls",
  294. [3] = {id = 3, color = "#11457E"}, -- "Window Band",
  295. [4] = {id = 4, color = "#FFFFFF"}, -- "Window Band Trim",
  296. [5] = {id = 5, color = "#FFFFFF"}, -- "Bistro Label",
  297. -- [6] = {id = 6, color = "#000000"}, -- "Galley",
  298. },
  299. },
  300. },
  301. {
  302. name = S("Nationality - Czech Republic (Slanted Bands)"),
  303. wagon_types = wagon_types.common_coaches,
  304. notes = "",
  305. livery_design = {
  306. livery_template_name = livery_template_generic_slanted_bands,
  307. overlays = {
  308. -- [1] = {id = 1, color = "#000000"}, -- "Side Walls",
  309. [2] = {id = 2, color = "#FFFFFF"}, -- "Left Slanted Band",
  310. [3] = {id = 3, color = "#D7141A"}, -- "Middle Slanted Band",
  311. [4] = {id = 4, color = "#11457E"}, -- "Right Slanted Band",
  312. -- [5] = {id = 5, color = "#000000"}, -- "Stripe",
  313. [6] = {id = 6, color = "#181818"}, -- "Class Number",
  314. },
  315. },
  316. },
  317. {
  318. name = S("Nationality - Czech Republic (Slanted Bands)"),
  319. wagon_types = wagon_types.bistro_coaches,
  320. notes = "",
  321. livery_design = {
  322. livery_template_name = livery_template_generic_slanted_bands,
  323. overlays = {
  324. -- [1] = {id = 1, color = "#000000"}, -- "Side Walls",
  325. [2] = {id = 2, color = "#FFFFFF"}, -- "Left Slanted Band",
  326. [3] = {id = 3, color = "#D7141A"}, -- "Middle Slanted Band",
  327. [4] = {id = 4, color = "#11457E"}, -- "Right Slanted Band",
  328. -- [5] = {id = 5, color = "#000000"}, -- "Stripe",
  329. -- [6] = {id = 6, color = "#000000"}, -- "Bistro Label",
  330. },
  331. },
  332. },
  333. {
  334. name = S("Nationality - France"),
  335. wagon_types = wagon_types.all_coaches,
  336. notes = "",
  337. livery_design = {
  338. livery_template_name = livery_template_generic_tricolor,
  339. overlays = {
  340. [1] = {id = 1, color = "#FFFFFF"}, -- "Upper Side Walls",
  341. [2] = {id = 2, color = "#0055A4"}, -- "Lower Side Walls",
  342. [3] = {id = 3, color = "#EF4135"}, -- "Window Band",
  343. [4] = {id = 4, color = "#FFFFFF"}, -- "Window Band Trim",
  344. [5] = {id = 5, color = "#FFFFFF"}, -- "Class Number"/"Bistro Label",
  345. },
  346. },
  347. },
  348. {
  349. name = S("Nationality - France (Slanted Bands)"),
  350. wagon_types = wagon_types.common_coaches,
  351. notes = "",
  352. livery_design = {
  353. livery_template_name = livery_template_generic_slanted_bands,
  354. overlays = {
  355. -- [1] = {id = 1, color = "#000000"}, -- "Side Walls",
  356. [2] = {id = 2, color = "#0055A4"}, -- "Left Slanted Band",
  357. [3] = {id = 3, color = "#FFFFFF"}, -- "Middle Slanted Band",
  358. [4] = {id = 4, color = "#EF4135"}, -- "Right Slanted Band",
  359. -- [5] = {id = 5, color = "#000000"}, -- "Stripe",
  360. [6] = {id = 6, color = "#EF4135"}, -- "Class Number",
  361. },
  362. },
  363. },
  364. {
  365. name = S("Nationality - France (Slanted Bands)"),
  366. wagon_types = wagon_types.bistro_coaches,
  367. notes = "",
  368. livery_design = {
  369. livery_template_name = livery_template_generic_slanted_bands,
  370. overlays = {
  371. -- [1] = {id = 1, color = "#000000"}, -- "Side Walls",
  372. [2] = {id = 2, color = "#0055A4"}, -- "Left Slanted Band",
  373. [3] = {id = 3, color = "#FFFFFF"}, -- "Middle Slanted Band",
  374. [4] = {id = 4, color = "#EF4135"}, -- "Right Slanted Band",
  375. -- [5] = {id = 5, color = "#000000"}, -- "Stripe",
  376. -- [6] = {id = 6, color = "#000000"}, -- "Bistro Label",
  377. },
  378. },
  379. },
  380. {
  381. name = S("Nationality - Germany"),
  382. wagon_types = wagon_types.all_coaches,
  383. notes = "",
  384. livery_design = {
  385. livery_template_name = livery_template_generic_tricolor,
  386. overlays = {
  387. [1] = {id = 1, color = "#FFCC00"}, -- "Upper Side Walls",
  388. [2] = {id = 2, color = "#FF0000"}, -- "Lower Side Walls",
  389. [3] = {id = 3, color = "#000000"}, -- "Window Band",
  390. [4] = {id = 4, color = "#FFCC00"}, -- "Window Band Trim",
  391. [5] = {id = 5, color = "#FFCC00"}, -- "Class Number"/"Bistro Label",
  392. },
  393. },
  394. },
  395. {
  396. name = S("Nationality - Germany (Slanted Bands)"),
  397. wagon_types = wagon_types.all_coaches,
  398. notes = "",
  399. livery_design = {
  400. livery_template_name = livery_template_generic_slanted_bands,
  401. overlays = {
  402. -- [1] = {id = 1, color = "#000000"}, -- "Side Walls",
  403. [2] = {id = 2, color = "#000000"}, -- "Left Slanted Band",
  404. [3] = {id = 3, color = "#FF0000"}, -- "Middle Slanted Band",
  405. [4] = {id = 4, color = "#FFCC00"}, -- "Right Slanted Band",
  406. -- [5] = {id = 5, color = "#000000"}, -- "Stripe",
  407. -- [6] = {id = 6, color = "#000000"}, -- "Class Number"/"Bistro Label",
  408. },
  409. },
  410. },
  411. {
  412. name = S("Nationality - India"),
  413. wagon_types = wagon_types.all_coaches,
  414. notes = "",
  415. livery_design = {
  416. livery_template_name = livery_template_generic_tricolor,
  417. overlays = {
  418. [1] = {id = 1, color = "#FF671F"}, -- "Upper Side Walls",
  419. [2] = {id = 2, color = "#046A38"}, -- "Lower Side Walls",
  420. [3] = {id = 3, color = "#FFFFFF"}, -- "Window Band",
  421. [4] = {id = 4, color = "#FFFFFF"}, -- "Window Band Trim",
  422. [5] = {id = 5, color = "#06038D"}, -- "Class Number"/"Bistro Label",
  423. },
  424. },
  425. },
  426. {
  427. name = S("Nationality - India (Slanted Bands)"),
  428. wagon_types = wagon_types.all_coaches,
  429. notes = "",
  430. livery_design = {
  431. livery_template_name = livery_template_generic_slanted_bands,
  432. overlays = {
  433. -- [1] = {id = 1, color = "#000000"}, -- "Side Walls",
  434. [2] = {id = 2, color = "#FF671F"}, -- "Left Slanted Band",
  435. [3] = {id = 3, color = "#FFFFFF"}, -- "Middle Slanted Band",
  436. [4] = {id = 4, color = "#046A38"}, -- "Right Slanted Band",
  437. -- [5] = {id = 5, color = "#000000"}, -- "Stripe",
  438. [6] = {id = 6, color = "#06038D"}, -- "Class Number"/"Bistro Label",
  439. },
  440. },
  441. },
  442. {
  443. name = S("Nationality - Iran"),
  444. wagon_types = wagon_types.common_coaches,
  445. notes = "",
  446. livery_design = {
  447. livery_template_name = livery_template_generic_tricolor,
  448. overlays = {
  449. [1] = {id = 1, color = "#239F40"}, -- "Upper Side Walls",
  450. [2] = {id = 2, color = "#DA0000"}, -- "Lower Side Walls",
  451. [3] = {id = 3, color = "#FFFFFF"}, -- "Window Band",
  452. [4] = {id = 4, color = "#239F40"}, -- "Window Band Trim",
  453. [5] = {id = 5, color = "#239F40"}, -- "Class Number",
  454. },
  455. },
  456. },
  457. {
  458. name = S("Nationality - Iran"),
  459. wagon_types = wagon_types.bistro_coaches,
  460. notes = "",
  461. livery_design = {
  462. livery_template_name = livery_template_generic_tricolor,
  463. overlays = {
  464. [1] = {id = 1, color = "#239F40"}, -- "Upper Side Walls",
  465. [2] = {id = 2, color = "#DA0000"}, -- "Lower Side Walls",
  466. [3] = {id = 3, color = "#FFFFFF"}, -- "Window Band",
  467. [4] = {id = 4, color = "#239F40"}, -- "Window Band Trim",
  468. [5] = {id = 5, color = "#FFFFFF"}, -- "Bistro Label",
  469. -- [6] = {id = 6, color = "#000000"}, -- "Galley",
  470. },
  471. },
  472. },
  473. {
  474. name = S("Nationality - Iran (Slanted Bands)"),
  475. wagon_types = wagon_types.common_coaches,
  476. notes = "",
  477. livery_design = {
  478. livery_template_name = livery_template_generic_slanted_bands,
  479. overlays = {
  480. -- [1] = {id = 1, color = "#000000"}, -- "Side Walls",
  481. [2] = {id = 2, color = "#239F40"}, -- "Left Slanted Band",
  482. [3] = {id = 3, color = "#FFFFFF"}, -- "Middle Slanted Band",
  483. [4] = {id = 4, color = "#DA0000"}, -- "Right Slanted Band",
  484. -- [5] = {id = 5, color = "#000000"}, -- "Stripe",
  485. [6] = {id = 6, color = "#DA0000"}, -- "Class Number",
  486. },
  487. },
  488. },
  489. {
  490. name = S("Nationality - Iran (Slanted Bands)"),
  491. wagon_types = wagon_types.bistro_coaches,
  492. notes = "",
  493. livery_design = {
  494. livery_template_name = livery_template_generic_slanted_bands,
  495. overlays = {
  496. -- [1] = {id = 1, color = "#000000"}, -- "Side Walls",
  497. [2] = {id = 2, color = "#239F40"}, -- "Left Slanted Band",
  498. [3] = {id = 3, color = "#FFFFFF"}, -- "Middle Slanted Band",
  499. [4] = {id = 4, color = "#DA0000"}, -- "Right Slanted Band",
  500. -- [5] = {id = 5, color = "#000000"}, -- "Stripe",
  501. -- [6] = {id = 6, color = "#000000"}, -- "Bistro Label",
  502. },
  503. },
  504. },
  505. {
  506. name = S("Nationality - Italy"),
  507. wagon_types = wagon_types.all_coaches,
  508. notes = "",
  509. livery_design = {
  510. livery_template_name = livery_template_generic_tricolor,
  511. overlays = {
  512. [1] = {id = 1, color = "#FFFFFF"}, -- "Upper Side Walls",
  513. [2] = {id = 2, color = "#008C45"}, -- "Lower Side Walls",
  514. [3] = {id = 3, color = "#CD212A"}, -- "Window Band",
  515. [4] = {id = 4, color = "#FFFFFF"}, -- "Window Band Trim",
  516. [5] = {id = 5, color = "#FFFFFF"}, -- "Class Number"/"Bistro Label",
  517. },
  518. },
  519. },
  520. {
  521. name = S("Nationality - Italy (Slanted Bands)"),
  522. wagon_types = wagon_types.common_coaches,
  523. notes = "",
  524. livery_design = {
  525. livery_template_name = livery_template_generic_slanted_bands,
  526. overlays = {
  527. -- [1] = {id = 1, color = "#000000"}, -- "Side Walls",
  528. [2] = {id = 2, color = "#008C45"}, -- "Left Slanted Band",
  529. [3] = {id = 3, color = "#F4F5F0"}, -- "Middle Slanted Band",
  530. [4] = {id = 4, color = "#CD212A"}, -- "Right Slanted Band",
  531. -- [5] = {id = 5, color = "#000000"}, -- "Stripe",
  532. [6] = {id = 6, color = "#181818"}, -- "Class Number",
  533. },
  534. },
  535. },
  536. {
  537. name = S("Nationality - Italy (Slanted Bands)"),
  538. wagon_types = wagon_types.bistro_coaches,
  539. notes = "",
  540. livery_design = {
  541. livery_template_name = livery_template_generic_slanted_bands,
  542. overlays = {
  543. -- [1] = {id = 1, color = "#000000"}, -- "Side Walls",
  544. [2] = {id = 2, color = "#008C45"}, -- "Left Slanted Band",
  545. [3] = {id = 3, color = "#F4F5F0"}, -- "Middle Slanted Band",
  546. [4] = {id = 4, color = "#CD212A"}, -- "Right Slanted Band",
  547. -- [5] = {id = 5, color = "#000000"}, -- "Stripe",
  548. -- [6] = {id = 6, color = "#000000"}, -- "Bistro Label",
  549. },
  550. },
  551. },
  552. {
  553. name = S("Nationality - Japan"),
  554. wagon_types = wagon_types.common_coaches,
  555. notes = "",
  556. livery_design = {
  557. livery_template_name = livery_template_generic_tricolor,
  558. overlays = {
  559. [1] = {id = 1, color = "#FFFFFF"}, -- "Upper Side Walls",
  560. [2] = {id = 2, color = "#FFFFFF"}, -- "Lower Side Walls",
  561. [3] = {id = 3, color = "#BC002D"}, -- "Window Band",
  562. [4] = {id = 4, color = "#FFFFFF"}, -- "Window Band Trim",
  563. [5] = {id = 5, color = "#FFFFFF"}, -- "Class Number",
  564. },
  565. },
  566. },
  567. {
  568. name = S("Nationality - Japan"),
  569. wagon_types = wagon_types.bistro_coaches,
  570. notes = "",
  571. livery_design = {
  572. livery_template_name = livery_template_generic_tricolor,
  573. overlays = {
  574. [1] = {id = 1, color = "#FFFFFF"}, -- "Upper Side Walls",
  575. [2] = {id = 2, color = "#FFFFFF"}, -- "Lower Side Walls",
  576. [3] = {id = 3, color = "#BC002D"}, -- "Window Band",
  577. [4] = {id = 4, color = "#FFFFFF"}, -- "Window Band Trim",
  578. [5] = {id = 5, color = "#BC002D"}, -- "Bistro Label",
  579. -- [6] = {id = 6, color = "#000000"}, -- "Galley",
  580. },
  581. },
  582. },
  583. {
  584. name = S("Nationality - Japan (Slanted Bands)"),
  585. wagon_types = wagon_types.common_coaches,
  586. notes = "",
  587. livery_design = {
  588. livery_template_name = livery_template_generic_slanted_bands,
  589. overlays = {
  590. -- [1] = {id = 1, color = "#000000"}, -- "Side Walls",
  591. [2] = {id = 2, color = "#FFFFFF"}, -- "Left Slanted Band",
  592. [3] = {id = 3, color = "#BC002D"}, -- "Middle Slanted Band",
  593. [4] = {id = 4, color = "#FFFFFF"}, -- "Right Slanted Band",
  594. -- [5] = {id = 5, color = "#000000"}, -- "Stripe",
  595. [6] = {id = 6, color = "#181818"}, -- "Class Number",
  596. },
  597. },
  598. },
  599. {
  600. name = S("Nationality - Japan (Slanted Bands)"),
  601. wagon_types = wagon_types.bistro_coaches,
  602. notes = "",
  603. livery_design = {
  604. livery_template_name = livery_template_generic_slanted_bands,
  605. overlays = {
  606. -- [1] = {id = 1, color = "#000000"}, -- "Side Walls",
  607. [2] = {id = 2, color = "#FFFFFF"}, -- "Left Slanted Band",
  608. [3] = {id = 3, color = "#BC002D"}, -- "Middle Slanted Band",
  609. [4] = {id = 4, color = "#FFFFFF"}, -- "Right Slanted Band",
  610. -- [5] = {id = 5, color = "#000000"}, -- "Stripe",
  611. -- [6] = {id = 6, color = "#000000"}, -- "Bistro Label",
  612. },
  613. },
  614. },
  615. {
  616. name = S("Nationality - Kazakhstan"),
  617. wagon_types = wagon_types.all_coaches,
  618. notes = "",
  619. livery_design = {
  620. livery_template_name = livery_template_generic_tricolor,
  621. overlays = {
  622. [1] = {id = 1, color = "#00ABC2"}, -- "Upper Side Walls",
  623. [2] = {id = 2, color = "#00ABC2"}, -- "Lower Side Walls",
  624. [3] = {id = 3, color = "#00ABC2"}, -- "Window Band",
  625. [4] = {id = 4, color = "#FFEC2D"}, -- "Window Band Trim",
  626. [5] = {id = 5, color = "#FFEC2D"}, -- "Class Number"/"Bistro Label",
  627. },
  628. },
  629. },
  630. {
  631. name = S("Nationality - Kazakhstan (Slanted Bands)"),
  632. wagon_types = wagon_types.common_coaches,
  633. notes = "",
  634. livery_design = {
  635. livery_template_name = livery_template_generic_slanted_bands,
  636. overlays = {
  637. -- [1] = {id = 1, color = "#000000"}, -- "Side Walls",
  638. [2] = {id = 2, color = "#00ABC2"}, -- "Left Slanted Band",
  639. [3] = {id = 3, color = "#00ABC2"}, -- "Middle Slanted Band",
  640. -- [4] = {id = 4, color = "#000000"}, -- "Right Slanted Band",
  641. [5] = {id = 5, color = "#FFEC2D"}, -- "Stripe",
  642. [6] = {id = 6, color = "#FFEC2D"}, -- "Class Number",
  643. },
  644. },
  645. },
  646. {
  647. name = S("Nationality - Kazakhstan (Slanted Bands)"),
  648. wagon_types = wagon_types.bistro_coaches,
  649. notes = "",
  650. livery_design = {
  651. livery_template_name = livery_template_generic_slanted_bands,
  652. overlays = {
  653. -- [1] = {id = 1, color = "#000000"}, -- "Side Walls",
  654. [2] = {id = 2, color = "#00ABC2"}, -- "Left Slanted Band",
  655. [3] = {id = 3, color = "#00ABC2"}, -- "Middle Slanted Band",
  656. -- [4] = {id = 4, color = "#000000"}, -- "Right Slanted Band",
  657. [5] = {id = 5, color = "#FFEC2D"}, -- "Stripe",
  658. -- [6] = {id = 6, color = "#000000"}, -- "Bistro Label",
  659. },
  660. },
  661. },
  662. {
  663. name = S("Nationality - Mexico"),
  664. wagon_types = wagon_types.all_coaches,
  665. notes = "",
  666. livery_design = {
  667. livery_template_name = livery_template_generic_tricolor,
  668. overlays = {
  669. [1] = {id = 1, color = "#FFFFFF"}, -- "Upper Side Walls",
  670. [2] = {id = 2, color = "#CE1125"}, -- "Lower Side Walls",
  671. [3] = {id = 3, color = "#006847"}, -- "Window Band",
  672. [4] = {id = 4, color = "#FFFFFF"}, -- "Window Band Trim",
  673. [5] = {id = 5, color = "#FFFFFF"}, -- "Class Number"/"Bistro Label",
  674. },
  675. },
  676. },
  677. {
  678. name = S("Nationality - Mexico (Slanted Bands)"),
  679. wagon_types = wagon_types.common_coaches,
  680. notes = "",
  681. livery_design = {
  682. livery_template_name = livery_template_generic_slanted_bands,
  683. overlays = {
  684. -- [1] = {id = 1, color = "#000000"}, -- "Side Walls",
  685. [2] = {id = 2, color = "#006847"}, -- "Left Slanted Band",
  686. [3] = {id = 3, color = "#FFFFFF"}, -- "Middle Slanted Band",
  687. [4] = {id = 4, color = "#CE1125"}, -- "Right Slanted Band",
  688. -- [5] = {id = 5, color = "#000000"}, -- "Stripe",
  689. [6] = {id = 6, color = "#181818"}, -- "Class Number",
  690. },
  691. },
  692. },
  693. {
  694. name = S("Nationality - Mexico (Slanted Bands)"),
  695. wagon_types = wagon_types.bistro_coaches,
  696. notes = "",
  697. livery_design = {
  698. livery_template_name = livery_template_generic_slanted_bands,
  699. overlays = {
  700. -- [1] = {id = 1, color = "#000000"}, -- "Side Walls",
  701. [2] = {id = 2, color = "#006847"}, -- "Left Slanted Band",
  702. [3] = {id = 3, color = "#FFFFFF"}, -- "Middle Slanted Band",
  703. [4] = {id = 4, color = "#CE1125"}, -- "Right Slanted Band",
  704. -- [5] = {id = 5, color = "#000000"}, -- "Stripe",
  705. -- [6] = {id = 6, color = "#000000"}, -- "Bistro Label",
  706. },
  707. },
  708. },
  709. {
  710. name = S("Nationality - Myanmar"),
  711. wagon_types = wagon_types.all_coaches,
  712. notes = "",
  713. livery_design = {
  714. livery_template_name = livery_template_generic_tricolor,
  715. overlays = {
  716. [1] = {id = 1, color = "#FECB00"}, -- "Upper Side Walls",
  717. [2] = {id = 2, color = "#EA2839"}, -- "Lower Side Walls",
  718. [3] = {id = 3, color = "#34B233"}, -- "Window Band",
  719. [4] = {id = 4, color = "#FECB00"}, -- "Window Band Trim",
  720. [5] = {id = 5, color = "#FFFFFF"}, -- "Class Number"/"Bistro Label",
  721. },
  722. },
  723. },
  724. {
  725. name = S("Nationality - Myanmar (Slanted Bands)"),
  726. wagon_types = wagon_types.common_coaches,
  727. notes = "",
  728. livery_design = {
  729. livery_template_name = livery_template_generic_slanted_bands,
  730. overlays = {
  731. -- [1] = {id = 1, color = "#000000"}, -- "Side Walls",
  732. [2] = {id = 2, color = "#FECB00"}, -- "Left Slanted Band",
  733. [3] = {id = 3, color = "#34B233"}, -- "Middle Slanted Band",
  734. [4] = {id = 4, color = "#EA2839"}, -- "Right Slanted Band",
  735. -- [5] = {id = 5, color = "#000000"}, -- "Stripe",
  736. [6] = {id = 6, color = "#FFFFFF"}, -- "Class Number",
  737. },
  738. },
  739. },
  740. {
  741. name = S("Nationality - Myanmar (Slanted Bands)"),
  742. wagon_types = wagon_types.bistro_coaches,
  743. notes = "",
  744. livery_design = {
  745. livery_template_name = livery_template_generic_slanted_bands,
  746. overlays = {
  747. -- [1] = {id = 1, color = "#000000"}, -- "Side Walls",
  748. [2] = {id = 2, color = "#FECB00"}, -- "Left Slanted Band",
  749. [3] = {id = 3, color = "#34B233"}, -- "Middle Slanted Band",
  750. [4] = {id = 4, color = "#EA2839"}, -- "Right Slanted Band",
  751. -- [5] = {id = 5, color = "#000000"}, -- "Stripe",
  752. -- [6] = {id = 6, color = "#000000"}, -- "Bistro Label",
  753. },
  754. },
  755. },
  756. {
  757. name = S("Nationality - Poland"),
  758. wagon_types = wagon_types.common_coaches,
  759. notes = "",
  760. livery_design = {
  761. livery_template_name = livery_template_generic_tricolor,
  762. overlays = {
  763. [1] = {id = 1, color = "#FFFFFF"}, -- "Upper Side Walls",
  764. [2] = {id = 2, color = "#DC143C"}, -- "Lower Side Walls",
  765. [3] = {id = 3, color = "#FFFFFF"}, -- "Window Band",
  766. [4] = {id = 4, color = "#FFFFFF"}, -- "Window Band Trim",
  767. [5] = {id = 5, color = "#DC143C"}, -- "Class Number",
  768. },
  769. },
  770. },
  771. {
  772. name = S("Nationality - Poland"),
  773. wagon_types = wagon_types.bistro_coaches,
  774. notes = "",
  775. livery_design = {
  776. livery_template_name = livery_template_generic_tricolor,
  777. overlays = {
  778. [1] = {id = 1, color = "#FFFFFF"}, -- "Upper Side Walls",
  779. [2] = {id = 2, color = "#DC143C"}, -- "Lower Side Walls",
  780. [3] = {id = 3, color = "#FFFFFF"}, -- "Window Band",
  781. [4] = {id = 4, color = "#FFFFFF"}, -- "Window Band Trim",
  782. [5] = {id = 5, color = "#FFFFFF"}, -- "Bistro Label",
  783. -- [6] = {id = 6, color = "#000000"}, -- "Galley",
  784. },
  785. },
  786. },
  787. {
  788. name = S("Nationality - Poland (Slanted Bands)"),
  789. wagon_types = wagon_types.common_coaches,
  790. notes = "",
  791. livery_design = {
  792. livery_template_name = livery_template_generic_slanted_bands,
  793. overlays = {
  794. -- [1] = {id = 1, color = "#000000"}, -- "Side Walls",
  795. [2] = {id = 2, color = "#FFFFFF"}, -- "Left Slanted Band",
  796. [3] = {id = 3, color = "#DC143C"}, -- "Middle Slanted Band",
  797. -- [4] = {id = 4, color = "#000000"}, -- "Right Slanted Band",
  798. -- [5] = {id = 5, color = "#000000"}, -- "Stripe",
  799. [6] = {id = 6, color = "#181818"}, -- "Class Number",
  800. },
  801. },
  802. },
  803. {
  804. name = S("Nationality - Poland (Slanted Bands)"),
  805. wagon_types = wagon_types.bistro_coaches,
  806. notes = "",
  807. livery_design = {
  808. livery_template_name = livery_template_generic_slanted_bands,
  809. overlays = {
  810. -- [1] = {id = 1, color = "#000000"}, -- "Side Walls",
  811. [2] = {id = 2, color = "#FFFFFF"}, -- "Left Slanted Band",
  812. [3] = {id = 3, color = "#DC143C"}, -- "Middle Slanted Band",
  813. -- [4] = {id = 4, color = "#000000"}, -- "Right Slanted Band",
  814. -- [5] = {id = 5, color = "#000000"}, -- "Stripe",
  815. -- [6] = {id = 6, color = "#000000"}, -- "Bistro Label",
  816. },
  817. },
  818. },
  819. {
  820. name = S("Nationality - Romania"),
  821. wagon_types = wagon_types.all_coaches,
  822. notes = "",
  823. livery_design = {
  824. livery_template_name = livery_template_generic_tricolor,
  825. overlays = {
  826. [1] = {id = 1, color = "#002B7F"}, -- "Upper Side Walls",
  827. [2] = {id = 2, color = "#CE1126"}, -- "Lower Side Walls",
  828. [3] = {id = 3, color = "#FCD116"}, -- "Window Band",
  829. [4] = {id = 4, color = "#002B7F"}, -- "Window Band Trim",
  830. [5] = {id = 5, color = "#002B7F"}, -- "Class Number"/"Bistro Label",
  831. },
  832. },
  833. },
  834. {
  835. name = S("Nationality - Romania (Slanted Bands)"),
  836. wagon_types = wagon_types.all_coaches,
  837. notes = "",
  838. livery_design = {
  839. livery_template_name = livery_template_generic_slanted_bands,
  840. overlays = {
  841. -- [1] = {id = 1, color = "#000000"}, -- "Side Walls",
  842. [2] = {id = 2, color = "#002B7F"}, -- "Left Slanted Band",
  843. [3] = {id = 3, color = "#FCD116"}, -- "Middle Slanted Band",
  844. [4] = {id = 4, color = "#CE1126"}, -- "Right Slanted Band",
  845. -- [5] = {id = 5, color = "#000000"}, -- "Stripe",
  846. -- [6] = {id = 6, color = "#000000"}, -- "Class Number"/"Bistro Label",
  847. },
  848. },
  849. },
  850. {
  851. name = S("Nationality - Russia"),
  852. wagon_types = wagon_types.all_coaches,
  853. notes = "",
  854. livery_design = {
  855. livery_template_name = livery_template_generic_tricolor,
  856. overlays = {
  857. [1] = {id = 1, color = "#FFFFFF"}, -- "Upper Side Walls",
  858. [2] = {id = 2, color = "#DA291C"}, -- "Lower Side Walls",
  859. [3] = {id = 3, color = "#0032A0"}, -- "Window Band",
  860. [4] = {id = 4, color = "#FFFFFF"}, -- "Window Band Trim",
  861. [5] = {id = 5, color = "#FFFFFF"}, -- "Class Number"/"Bistro Label",
  862. },
  863. },
  864. },
  865. {
  866. name = S("Nationality - Russia (Slanted Bands)"),
  867. wagon_types = wagon_types.common_coaches,
  868. notes = "",
  869. livery_design = {
  870. livery_template_name = livery_template_generic_slanted_bands,
  871. overlays = {
  872. -- [1] = {id = 1, color = "#000000"}, -- "Side Walls",
  873. [2] = {id = 2, color = "#FFFFFF"}, -- "Left Slanted Band",
  874. [3] = {id = 3, color = "#0032A0"}, -- "Middle Slanted Band",
  875. [4] = {id = 4, color = "#DA291C"}, -- "Right Slanted Band",
  876. -- [5] = {id = 5, color = "#000000"}, -- "Stripe",
  877. [6] = {id = 6, color = "#181818"}, -- "Class Number",
  878. },
  879. },
  880. },
  881. {
  882. name = S("Nationality - Russia (Slanted Bands)"),
  883. wagon_types = wagon_types.bistro_coaches,
  884. notes = "",
  885. livery_design = {
  886. livery_template_name = livery_template_generic_slanted_bands,
  887. overlays = {
  888. -- [1] = {id = 1, color = "#000000"}, -- "Side Walls",
  889. [2] = {id = 2, color = "#FFFFFF"}, -- "Left Slanted Band",
  890. [3] = {id = 3, color = "#0032A0"}, -- "Middle Slanted Band",
  891. [4] = {id = 4, color = "#DA291C"}, -- "Right Slanted Band",
  892. -- [5] = {id = 5, color = "#000000"}, -- "Stripe",
  893. -- [6] = {id = 6, color = "#000000"}, -- "Bistro Label",
  894. },
  895. },
  896. },
  897. {
  898. name = S("Nationality - South Africa"),
  899. wagon_types = wagon_types.all_coaches,
  900. notes = "",
  901. livery_design = {
  902. livery_template_name = livery_template_generic_window_stripes,
  903. overlays = {
  904. [1] = {id = 1, color = "#007A4D"}, -- "Side Walls",
  905. [2] = {id = 2, color = "#FFFFFF"}, -- "Upper Stripe",
  906. [3] = {id = 3, color = "#000000"}, -- "Window Band",
  907. [4] = {id = 4, color = "#DE3831"}, -- "Middle Stripe",
  908. [5] = {id = 5, color = "#002395"}, -- "Lower Stripe",
  909. [6] = {id = 6, color = "#FFB612"}, -- "Class Number"/"Bistro Label",
  910. },
  911. },
  912. },
  913. {
  914. name = S("Nationality - South Africa (Slanted Bands)"),
  915. wagon_types = wagon_types.all_coaches,
  916. notes = "",
  917. livery_design = {
  918. livery_template_name = livery_template_generic_slanted_bands,
  919. overlays = {
  920. -- [1] = {id = 1, color = "#000000"}, -- "Side Walls",
  921. [2] = {id = 2, color = "#DE3831"}, -- "Left Slanted Band",
  922. [3] = {id = 3, color = "#007A4D"}, -- "Middle Slanted Band",
  923. [4] = {id = 4, color = "#002395"}, -- "Right Slanted Band",
  924. [5] = {id = 5, color = "#000000"}, -- "Stripe",
  925. [6] = {id = 6, color = "#FFB612"}, -- "Class Number"/"Bistro Label",
  926. },
  927. },
  928. },
  929. {
  930. name = S("Nationality - Spain"),
  931. wagon_types = wagon_types.common_coaches,
  932. notes = "",
  933. livery_design = {
  934. livery_template_name = livery_template_generic_tricolor,
  935. overlays = {
  936. [1] = {id = 1, color = "#FABD00"}, -- "Upper Side Walls",
  937. [2] = {id = 2, color = "#AD1519"}, -- "Lower Side Walls",
  938. [3] = {id = 3, color = "#FABD00"}, -- "Window Band",
  939. [4] = {id = 4, color = "#FABD00"}, -- "Window Band Trim",
  940. [5] = {id = 5, color = "#AD1519"}, -- "Class Number"/"Bistro Label",
  941. },
  942. },
  943. },
  944. {
  945. name = S("Nationality - Spain"),
  946. wagon_types = wagon_types.bistro_coaches,
  947. notes = "",
  948. livery_design = {
  949. livery_template_name = livery_template_generic_tricolor,
  950. overlays = {
  951. [1] = {id = 1, color = "#FABD00"}, -- "Upper Side Walls",
  952. [2] = {id = 2, color = "#AD1519"}, -- "Lower Side Walls",
  953. [3] = {id = 3, color = "#FABD00"}, -- "Window Band",
  954. [4] = {id = 4, color = "#FABD00"}, -- "Window Band Trim",
  955. [5] = {id = 5, color = "#FABD00"}, -- "Bistro Label",
  956. -- [6] = {id = 6, color = "#000000"}, -- "Galley",
  957. },
  958. },
  959. },
  960. {
  961. name = S("Nationality - Spain (Slanted Bands)"),
  962. wagon_types = wagon_types.all_coaches,
  963. notes = "",
  964. livery_design = {
  965. livery_template_name = livery_template_generic_slanted_bands,
  966. overlays = {
  967. -- [1] = {id = 1, color = "#000000"}, -- "Side Walls",
  968. [2] = {id = 2, color = "#AD1519"}, -- "Left Slanted Band",
  969. [3] = {id = 3, color = "#FABD00"}, -- "Middle Slanted Band",
  970. [4] = {id = 4, color = "#AD1519"}, -- "Right Slanted Band",
  971. -- [5] = {id = 5, color = "#000000"}, -- "Stripe",
  972. -- [6] = {id = 6, color = "#000000"}, -- "Class Number"/"Bistro Label",
  973. },
  974. },
  975. },
  976. {
  977. name = S("Nationality - Sweden"),
  978. wagon_types = wagon_types.common_coaches,
  979. notes = "",
  980. livery_design = {
  981. livery_template_name = livery_template_generic_tricolor,
  982. overlays = {
  983. [1] = {id = 1, color = "#005293"}, -- "Upper Side Walls",
  984. [2] = {id = 2, color = "#005293"}, -- "Lower Side Walls",
  985. [3] = {id = 3, color = "#FFCD00"}, -- "Window Band",
  986. [4] = {id = 4, color = "#005293"}, -- "Window Band Trim",
  987. [5] = {id = 5, color = "#005293"}, -- "Class Number",
  988. },
  989. },
  990. },
  991. {
  992. name = S("Nationality - Sweden"),
  993. wagon_types = wagon_types.bistro_coaches,
  994. notes = "",
  995. livery_design = {
  996. livery_template_name = livery_template_generic_tricolor,
  997. overlays = {
  998. [1] = {id = 1, color = "#005293"}, -- "Upper Side Walls",
  999. [2] = {id = 2, color = "#005293"}, -- "Lower Side Walls",
  1000. [3] = {id = 3, color = "#FFCD00"}, -- "Window Band",
  1001. [4] = {id = 4, color = "#005293"}, -- "Window Band Trim",
  1002. [5] = {id = 5, color = "#FFCD00"}, -- "Bistro Label",
  1003. -- [6] = {id = 6, color = "#000000"}, -- "Galley",
  1004. },
  1005. },
  1006. },
  1007. {
  1008. name = S("Nationality - Sweden (Slanted Bands)"),
  1009. wagon_types = wagon_types.common_coaches,
  1010. notes = "",
  1011. livery_design = {
  1012. livery_template_name = livery_template_generic_slanted_bands,
  1013. overlays = {
  1014. -- [1] = {id = 1, color = "#000000"}, -- "Side Walls",
  1015. [2] = {id = 2, color = "#005293"}, -- "Left Slanted Band",
  1016. [3] = {id = 3, color = "#FFCD00"}, -- "Middle Slanted Band",
  1017. [4] = {id = 4, color = "#005293"}, -- "Right Slanted Band",
  1018. [5] = {id = 5, color = "#FFCD00"}, -- "Stripe",
  1019. [6] = {id = 6, color = "#181818"}, -- "Class Number",
  1020. },
  1021. },
  1022. },
  1023. {
  1024. name = S("Nationality - Sweden (Slanted Bands)"),
  1025. wagon_types = wagon_types.bistro_coaches,
  1026. notes = "",
  1027. livery_design = {
  1028. livery_template_name = livery_template_generic_slanted_bands,
  1029. overlays = {
  1030. -- [1] = {id = 1, color = "#000000"}, -- "Side Walls",
  1031. [2] = {id = 2, color = "#005293"}, -- "Left Slanted Band",
  1032. [3] = {id = 3, color = "#FFCD00"}, -- "Middle Slanted Band",
  1033. [4] = {id = 4, color = "#005293"}, -- "Right Slanted Band",
  1034. [5] = {id = 5, color = "#FFCD00"}, -- "Stripe",
  1035. -- [6] = {id = 6, color = "#000000"}, -- "Bistro Label",
  1036. },
  1037. },
  1038. },
  1039. {
  1040. name = S("Nationality - Türkiye"),
  1041. wagon_types = wagon_types.all_coaches,
  1042. notes = "",
  1043. livery_design = {
  1044. livery_template_name = livery_template_generic_tricolor,
  1045. overlays = {
  1046. [1] = {id = 1, color = "#FFFFFF"}, -- "Upper Side Walls",
  1047. [2] = {id = 2, color = "#E30A17"}, -- "Lower Side Walls",
  1048. [3] = {id = 3, color = "#E30A17"}, -- "Window Band",
  1049. [4] = {id = 4, color = "#E30A17"}, -- "Window Band Trim",
  1050. [5] = {id = 5, color = "#FFFFFF"}, -- "Class Number"/"Bistro Label",
  1051. },
  1052. },
  1053. },
  1054. {
  1055. name = S("Nationality - Türkiye (Slanted Bands)"),
  1056. wagon_types = wagon_types.all_coaches,
  1057. notes = "",
  1058. livery_design = {
  1059. livery_template_name = livery_template_generic_slanted_bands,
  1060. overlays = {
  1061. -- [1] = {id = 1, color = "#000000"}, -- "Side Walls",
  1062. [2] = {id = 2, color = "#E30A17"}, -- "Left Slanted Band",
  1063. [3] = {id = 3, color = "#E30A17"}, -- "Middle Slanted Band",
  1064. -- [4] = {id = 4, color = "#000000"}, -- "Right Slanted Band",
  1065. -- [5] = {id = 5, color = "#000000"}, -- "Stripe",
  1066. [6] = {id = 6, color = "#FFFFFF"}, -- "Class Number"/"Bistro Label",
  1067. },
  1068. },
  1069. },
  1070. {
  1071. name = S("Nationality - USA"),
  1072. wagon_types = wagon_types.all_coaches,
  1073. notes = "",
  1074. livery_design = {
  1075. livery_template_name = livery_template_generic_tricolor,
  1076. overlays = {
  1077. [1] = {id = 1, color = "#FFFFFF"}, -- "Upper Side Walls",
  1078. [2] = {id = 2, color = "#B31942"}, -- "Lower Side Walls",
  1079. [3] = {id = 3, color = "#0A3161"}, -- "Window Band",
  1080. [4] = {id = 4, color = "#0A3161"}, -- "Window Band Trim",
  1081. [5] = {id = 5, color = "#FFFFFF"}, -- "Class Number"/"Bistro Label",
  1082. },
  1083. },
  1084. },
  1085. {
  1086. name = S("Nationality - USA (Slanted Bands)"),
  1087. wagon_types = wagon_types.common_coaches,
  1088. notes = "",
  1089. livery_design = {
  1090. livery_template_name = livery_template_generic_slanted_bands,
  1091. overlays = {
  1092. -- [1] = {id = 1, color = "#000000"}, -- "Side Walls",
  1093. [2] = {id = 2, color = "#B31942"}, -- "Left Slanted Band",
  1094. [3] = {id = 3, color = "#FFFFFF"}, -- "Middle Slanted Band",
  1095. [4] = {id = 4, color = "#0A3161"}, -- "Right Slanted Band",
  1096. -- [5] = {id = 5, color = "#000000"}, -- "Stripe",
  1097. [6] = {id = 6, color = "#0A3161"}, -- "Class Number",
  1098. },
  1099. },
  1100. },
  1101. {
  1102. name = S("Nationality - USA (Slanted Bands)"),
  1103. wagon_types = wagon_types.bistro_coaches,
  1104. notes = "",
  1105. livery_design = {
  1106. livery_template_name = livery_template_generic_slanted_bands,
  1107. overlays = {
  1108. -- [1] = {id = 1, color = "#000000"}, -- "Side Walls",
  1109. [2] = {id = 2, color = "#B31942"}, -- "Left Slanted Band",
  1110. [3] = {id = 3, color = "#FFFFFF"}, -- "Middle Slanted Band",
  1111. [4] = {id = 4, color = "#0A3161"}, -- "Right Slanted Band",
  1112. -- [5] = {id = 5, color = "#000000"}, -- "Stripe",
  1113. -- [6] = {id = 6, color = "#000000"}, -- "Bistro Label",
  1114. },
  1115. },
  1116. },
  1117. {
  1118. name = S("Nationality - Ukraine"),
  1119. wagon_types = wagon_types.common_coaches,
  1120. notes = "",
  1121. livery_design = {
  1122. livery_template_name = livery_template_generic_tricolor,
  1123. overlays = {
  1124. [1] = {id = 1, color = "#0057B7"}, -- "Upper Side Walls",
  1125. [2] = {id = 2, color = "#FFD700"}, -- "Lower Side Walls",
  1126. [3] = {id = 3, color = "#0057B7"}, -- "Window Band",
  1127. [4] = {id = 4, color = "#0057B7"}, -- "Window Band Trim",
  1128. [5] = {id = 5, color = "#FFD700"}, -- "Class Number",
  1129. },
  1130. },
  1131. },
  1132. {
  1133. name = S("Nationality - Ukraine"),
  1134. wagon_types = wagon_types.bistro_coaches,
  1135. notes = "",
  1136. livery_design = {
  1137. livery_template_name = livery_template_generic_tricolor,
  1138. overlays = {
  1139. [1] = {id = 1, color = "#0057B7"}, -- "Upper Side Walls",
  1140. [2] = {id = 2, color = "#FFD700"}, -- "Lower Side Walls",
  1141. [3] = {id = 3, color = "#0057B7"}, -- "Window Band",
  1142. [4] = {id = 4, color = "#0057B7"}, -- "Window Band Trim",
  1143. [5] = {id = 5, color = "#0057B7"}, -- "Bistro Label",
  1144. -- [6] = {id = 6, color = "#000000"}, -- "Galley",
  1145. },
  1146. },
  1147. },
  1148. {
  1149. name = S("Nationality - Ukraine (Slanted Bands)"),
  1150. wagon_types = wagon_types.common_coaches,
  1151. notes = "",
  1152. livery_design = {
  1153. livery_template_name = livery_template_generic_slanted_bands,
  1154. overlays = {
  1155. -- [1] = {id = 1, color = "#000000"}, -- "Side Walls",
  1156. [2] = {id = 2, color = "#0057B7"}, -- "Left Slanted Band",
  1157. [3] = {id = 3, color = "#FFD700"}, -- "Middle Slanted Band",
  1158. -- [4] = {id = 4, color = "#000000"}, -- "Right Slanted Band",
  1159. -- [5] = {id = 5, color = "#000000"}, -- "Stripe",
  1160. [6] = {id = 6, color = "#181818"}, -- "Class Number",
  1161. },
  1162. },
  1163. },
  1164. {
  1165. name = S("Nationality - Ukraine (Slanted Bands)"),
  1166. wagon_types = wagon_types.bistro_coaches,
  1167. notes = "",
  1168. livery_design = {
  1169. livery_template_name = livery_template_generic_slanted_bands,
  1170. overlays = {
  1171. -- [1] = {id = 1, color = "#000000"}, -- "Side Walls",
  1172. [2] = {id = 2, color = "#0057B7"}, -- "Left Slanted Band",
  1173. [3] = {id = 3, color = "#FFD700"}, -- "Middle Slanted Band",
  1174. -- [4] = {id = 4, color = "#000000"}, -- "Right Slanted Band",
  1175. -- [5] = {id = 5, color = "#000000"}, -- "Stripe",
  1176. -- [6] = {id = 6, color = "#000000"}, -- "Bistro Label",
  1177. },
  1178. },
  1179. },
  1180. {
  1181. name = S("Nationality - United Kingdom"),
  1182. wagon_types = wagon_types.all_coaches,
  1183. notes = "",
  1184. livery_design = {
  1185. livery_template_name = livery_template_generic_tricolor,
  1186. overlays = {
  1187. [1] = {id = 1, color = "#012169"}, -- "Upper Side Walls",
  1188. [2] = {id = 2, color = "#012169"}, -- "Lower Side Walls",
  1189. [3] = {id = 3, color = "#C8102E"}, -- "Window Band",
  1190. [4] = {id = 4, color = "#FFFFFF"}, -- "Window Band Trim",
  1191. [5] = {id = 5, color = "#FFFFFF"}, -- "Class Number"/"Bistro Label",
  1192. },
  1193. },
  1194. },
  1195. {
  1196. name = S("Nationality - United Kingdom (Slanted Bands)"),
  1197. wagon_types = wagon_types.common_coaches,
  1198. notes = "",
  1199. livery_design = {
  1200. livery_template_name = livery_template_generic_slanted_bands,
  1201. overlays = {
  1202. [1] = {id = 1, color = "#012169"}, -- "Side Walls",
  1203. [2] = {id = 2, color = "#FFFFFF"}, -- "Left Slanted Band",
  1204. [3] = {id = 3, color = "#C8102E"}, -- "Middle Slanted Band",
  1205. [4] = {id = 4, color = "#FFFFFF"}, -- "Right Slanted Band",
  1206. [5] = {id = 5, color = "#FFFFFF"}, -- "Stripe",
  1207. -- [6] = {id = 6, color = "#000000"}, -- "Class Number",
  1208. },
  1209. },
  1210. },
  1211. {
  1212. name = S("Nationality - United Kingdom (Slanted Bands)"),
  1213. wagon_types = wagon_types.bistro_coaches,
  1214. notes = "",
  1215. livery_design = {
  1216. livery_template_name = livery_template_generic_slanted_bands,
  1217. overlays = {
  1218. [1] = {id = 1, color = "#012169"}, -- "Side Walls",
  1219. [2] = {id = 2, color = "#FFFFFF"}, -- "Left Slanted Band",
  1220. [3] = {id = 3, color = "#C8102E"}, -- "Middle Slanted Band",
  1221. [4] = {id = 4, color = "#FFFFFF"}, -- "Right Slanted Band",
  1222. [5] = {id = 5, color = "#FFFFFF"}, -- "Stripe",
  1223. [6] = {id = 6, color = "#FFFFFF"}, -- "Bistro Label",
  1224. },
  1225. },
  1226. },
  1227. }
  1228. -- This mod needs to register itself with the livery database in order to be
  1229. -- allowed to add predefined liveries. It does not need to register itself with
  1230. -- the livery designer tool, however, since it is will not be registering any
  1231. -- wagons.
  1232. advtrains_livery_database.register_mod(mod_name)
  1233. -- Register this mod's predefined wagon liveries with the advtrains_livery_database.
  1234. local detected_old_mod_version = false
  1235. for _, predefined_livery in pairs(predefined_liveries) do
  1236. for _, wagon_type in pairs(predefined_livery.wagon_types) do
  1237. if not detected_old_mod_version and not advtrains_livery_database.has_wagon_livery_template(wagon_type, predefined_livery.livery_design.livery_template_name) then
  1238. minetest.log("error", "["..mod_name.."] An old version of classic_coaches_generic_livery_pack was detected. Some predefined liveries will fail to be added.")
  1239. detected_old_mod_version = true
  1240. end
  1241. local livery_design = predefined_livery.livery_design
  1242. livery_design.wagon_type = wagon_type
  1243. advtrains_livery_database.add_predefined_livery(predefined_livery.name, livery_design, mod_name, predefined_livery.notes)
  1244. end
  1245. end