functions.lua 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. function dlxtrains_cargo.get_crate_texture_count()
  2. return 3
  3. end
  4. function dlxtrains_cargo.get_crate_texture(index)
  5. local crate_textures = {
  6. "dlxtrains_cargo_wooden_crate_acacia_wood.png",
  7. "dlxtrains_cargo_wooden_crate_junglewood.png",
  8. "dlxtrains_cargo_wooden_crate_pine_wood.png",
  9. }
  10. local texture = crate_textures[1]
  11. if index > 1 and index <= dlxtrains_cargo.get_crate_texture_count() then
  12. texture = crate_textures[index]
  13. end
  14. return dlxtrains.add_modifier_escaping(texture)
  15. end
  16. function dlxtrains_cargo.get_shipping_container_livery_count()
  17. return 18
  18. end
  19. function dlxtrains_cargo.get_shipping_container_texture(livery_id)
  20. local texture = "dlxtrains_cargo_shipping_container_livery_"..livery_id..".png"
  21. return dlxtrains.add_modifier_escaping(texture)
  22. end
  23. function dlxtrains_cargo.get_tank_container_livery_count()
  24. return 14
  25. end
  26. function dlxtrains_cargo.get_tank_container_texture(livery_id)
  27. local texture = "dlxtrains_cargo_tank_container_livery_"..livery_id..".png"
  28. return dlxtrains.add_modifier_escaping(texture)
  29. end