Files
@ r23371:9cd9ac4bfc93
Branch filter:
Location: cpp/openttd-patchpack/source/src/vehicle_gui.cpp - annotation
r23371:9cd9ac4bfc93
104.1 KiB
text/x-c
Update: Translations from eints
dutch: 80 changes by JanWillem
dutch: 80 changes by JanWillem
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 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 | r5584:545d748cc681 r5584:545d748cc681 r12768:980ae0491352 r12768:980ae0491352 r12768:980ae0491352 r12768:980ae0491352 r12768:980ae0491352 r12768:980ae0491352 r12768:980ae0491352 r9111:983de9c5a848 r6423:c3b8b9853091 r5584:545d748cc681 r5584:545d748cc681 r10208:ef8fcc3dc4ca r5584:545d748cc681 r8107:82461791b7a2 r8116:df67d3c5e4fd r10122:8be97f532491 r8224:194097dc7288 r5584:545d748cc681 r15073:02cc9885c126 r5584:545d748cc681 r11980:193f7a6b6e37 r12374:50d157b51c2c r15934:789c54d0000d r8111:6bed4623f3b9 r8114:866ed489ed98 r8144:1432edd15267 r8212:13ec7a6b1407 r8214:9a3935f9ef4e r8284:d769847bf11d r9117:e2b5a638a7c1 r11238:1abc5ab40770 r13608:06bb7056281f r14248:a9050881acd7 r14248:a9050881acd7 r14248:a9050881acd7 r15306:1e95a9ffc6fb r16050:f8b5963745b7 r18462:a1ba75a7f741 r5584:545d748cc681 r21383:942c32fb8b0e r21383:942c32fb8b0e r8264:d493cb51fe8a r9182:0d593e61d67e r5584:545d748cc681 r9563:18672374a0bf r9563:18672374a0bf r9563:18672374a0bf r9563:18672374a0bf r9563:18672374a0bf r9563:18672374a0bf r9563:18672374a0bf r9563:18672374a0bf r9563:18672374a0bf r9563:18672374a0bf r9563:18672374a0bf r10161:fbc2bd5a86b2 r12707:8316c73753e1 r5584:545d748cc681 r10647:62911ec68e89 r5584:545d748cc681 r5584:545d748cc681 r5584:545d748cc681 r5584:545d748cc681 r5584:545d748cc681 r5584:545d748cc681 r5584:545d748cc681 r5584:545d748cc681 r5584:545d748cc681 r5584:545d748cc681 r8974:eb38c1c3d164 r10161:fbc2bd5a86b2 r12707:8316c73753e1 r5584:545d748cc681 r5584:545d748cc681 r10122:8be97f532491 r5584:545d748cc681 r12483:edbdfbf85fff r5584:545d748cc681 r5584:545d748cc681 r5584:545d748cc681 r5584:545d748cc681 r5584:545d748cc681 r5584:545d748cc681 r5584:545d748cc681 r5584:545d748cc681 r8974:eb38c1c3d164 r10161:fbc2bd5a86b2 r12707:8316c73753e1 r5584:545d748cc681 r5584:545d748cc681 r5584:545d748cc681 r15507:d6cc390ab191 r15507:d6cc390ab191 r15507:d6cc390ab191 r15507:d6cc390ab191 r15507:d6cc390ab191 r15507:d6cc390ab191 r15507:d6cc390ab191 r21861:c724235732d2 r21861:c724235732d2 r21861:c724235732d2 r21861:c724235732d2 r21861:c724235732d2 r21861:c724235732d2 r21861:c724235732d2 r21861:c724235732d2 r21861:c724235732d2 r21861:c724235732d2 r21861:c724235732d2 r21861:c724235732d2 r21861:c724235732d2 r21861:c724235732d2 r21861:c724235732d2 r21861:c724235732d2 r21861:c724235732d2 r21861:c724235732d2 r21861:c724235732d2 r21861:c724235732d2 r21861:c724235732d2 r21861:c724235732d2 r21861:c724235732d2 r21861:c724235732d2 r16074:92f60cf5758b r5584:545d748cc681 r10122:8be97f532491 r5584:545d748cc681 r16074:92f60cf5758b r5584:545d748cc681 r16074:92f60cf5758b r5584:545d748cc681 r21861:c724235732d2 r13600:8268515184a7 r10122:8be97f532491 r15769:4a935f419828 r5584:545d748cc681 r5584:545d748cc681 r15505:306dfef4fc70 r15506:26ede26dbbe9 r15508:ba762c312927 r15506:26ede26dbbe9 r15506:26ede26dbbe9 r15506:26ede26dbbe9 r15508:ba762c312927 r15506:26ede26dbbe9 r15506:26ede26dbbe9 r15506:26ede26dbbe9 r15508:ba762c312927 r15506:26ede26dbbe9 r16074:92f60cf5758b r15506:26ede26dbbe9 r15506:26ede26dbbe9 r15506:26ede26dbbe9 r15506:26ede26dbbe9 r15506:26ede26dbbe9 r15506:26ede26dbbe9 r15506:26ede26dbbe9 r15506:26ede26dbbe9 r15506:26ede26dbbe9 r15506:26ede26dbbe9 r15505:306dfef4fc70 r15508:ba762c312927 r15505:306dfef4fc70 r15505:306dfef4fc70 r15505:306dfef4fc70 r15508:ba762c312927 r15505:306dfef4fc70 r15505:306dfef4fc70 r15505:306dfef4fc70 r21009:09fb379ed85b r21009:09fb379ed85b r21009:09fb379ed85b r15505:306dfef4fc70 r15505:306dfef4fc70 r21009:09fb379ed85b r21009:09fb379ed85b r15505:306dfef4fc70 r15505:306dfef4fc70 r15505:306dfef4fc70 r15505:306dfef4fc70 r15505:306dfef4fc70 r8662:7a0d7c188db5 r8662:7a0d7c188db5 r8662:7a0d7c188db5 r10122:8be97f532491 r5584:545d748cc681 r10122:8be97f532491 r5584:545d748cc681 r8662:7a0d7c188db5 r8662:7a0d7c188db5 r5584:545d748cc681 r5584:545d748cc681 r9351:bad76dded915 r5584:545d748cc681 r9351:bad76dded915 r9563:18672374a0bf r5584:545d748cc681 r5584:545d748cc681 r6423:c3b8b9853091 r13499:0af2aac7f5aa r5584:545d748cc681 r16017:2291ca54c6cd r5584:545d748cc681 r11085:c87a330fb4c2 r18149:d084e89bff7d r16017:2291ca54c6cd r8614:5dc67f095106 r16017:2291ca54c6cd r18149:d084e89bff7d r16017:2291ca54c6cd r5584:545d748cc681 r16017:2291ca54c6cd r5584:545d748cc681 r16017:2291ca54c6cd r5584:545d748cc681 r5584:545d748cc681 r14213:f6ed1a0100e4 r14213:f6ed1a0100e4 r13949:666a7220b4aa r13952:d0372804e739 r18630:60f0459747eb r18630:60f0459747eb r18630:60f0459747eb r13952:d0372804e739 r13952:d0372804e739 r18630:60f0459747eb r13952:d0372804e739 r13952:d0372804e739 r18265:402499249079 r13952:d0372804e739 r18630:60f0459747eb r18630:60f0459747eb r18630:60f0459747eb r18630:60f0459747eb r18630:60f0459747eb r18630:60f0459747eb r18630:60f0459747eb r18630:60f0459747eb r18630:60f0459747eb r18630:60f0459747eb r13952:d0372804e739 r13952:d0372804e739 r13952:d0372804e739 r18630:60f0459747eb r18630:60f0459747eb r18630:60f0459747eb r18630:60f0459747eb r18630:60f0459747eb r18630:60f0459747eb r18630:60f0459747eb r18630:60f0459747eb r18630:60f0459747eb r18630:60f0459747eb r18630:60f0459747eb r18630:60f0459747eb r18630:60f0459747eb r18630:60f0459747eb r18630:60f0459747eb r18630:60f0459747eb r18630:60f0459747eb r18630:60f0459747eb r18630:60f0459747eb r18630:60f0459747eb r18630:60f0459747eb r20079:6dd928cf041b r20079:6dd928cf041b r20079:6dd928cf041b r20079:6dd928cf041b r20079:6dd928cf041b r18630:60f0459747eb r18630:60f0459747eb r18630:60f0459747eb r18630:60f0459747eb r18630:60f0459747eb r18630:60f0459747eb r18630:60f0459747eb r18630:60f0459747eb r18630:60f0459747eb r18630:60f0459747eb r18630:60f0459747eb r18630:60f0459747eb r18630:60f0459747eb r18630:60f0459747eb r18630:60f0459747eb r18630:60f0459747eb r18296:89d34cbdf3a3 r13952:d0372804e739 r13952:d0372804e739 r13952:d0372804e739 r13952:d0372804e739 r13952:d0372804e739 r14215:643572e0842f r6248:b940b09d7ab8 r14215:643572e0842f r14215:643572e0842f r20079:6dd928cf041b r14215:643572e0842f r15798:f2e2f0c75969 r15798:f2e2f0c75969 r15798:f2e2f0c75969 r15798:f2e2f0c75969 r15798:f2e2f0c75969 r18782:6453522c2154 r14215:643572e0842f r20079:6dd928cf041b r14215:643572e0842f r14928:db3712149038 r15798:f2e2f0c75969 r15798:f2e2f0c75969 r15798:f2e2f0c75969 r15798:f2e2f0c75969 r15798:f2e2f0c75969 r18782:6453522c2154 r14928:db3712149038 r20079:6dd928cf041b r14928:db3712149038 r6248:b940b09d7ab8 r5584:545d748cc681 r15800:374f3518cc15 r5584:545d748cc681 r14215:643572e0842f r15610:623a23fb6560 r15800:374f3518cc15 r13343:d5d790760261 r13343:d5d790760261 r13343:d5d790760261 r13343:d5d790760261 r13343:d5d790760261 r5584:545d748cc681 r20081:fae57edbbc37 r5584:545d748cc681 r13343:d5d790760261 r15800:374f3518cc15 r5584:545d748cc681 r20094:d62bfb9e6cd8 r20094:d62bfb9e6cd8 r20094:d62bfb9e6cd8 r20094:d62bfb9e6cd8 r20094:d62bfb9e6cd8 r20094:d62bfb9e6cd8 r20094:d62bfb9e6cd8 r20094:d62bfb9e6cd8 r20094:d62bfb9e6cd8 r20094:d62bfb9e6cd8 r20094:d62bfb9e6cd8 r20094:d62bfb9e6cd8 r15800:374f3518cc15 r15800:374f3518cc15 r15800:374f3518cc15 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r15800:374f3518cc15 r15800:374f3518cc15 r15800:374f3518cc15 r15800:374f3518cc15 r15800:374f3518cc15 r5584:545d748cc681 r20094:d62bfb9e6cd8 r20094:d62bfb9e6cd8 r20094:d62bfb9e6cd8 r20094:d62bfb9e6cd8 r20094:d62bfb9e6cd8 r20094:d62bfb9e6cd8 r20094:d62bfb9e6cd8 r20094:d62bfb9e6cd8 r20094:d62bfb9e6cd8 r20094:d62bfb9e6cd8 r20094:d62bfb9e6cd8 r20094:d62bfb9e6cd8 r20081:fae57edbbc37 r15800:374f3518cc15 r15800:374f3518cc15 r20079:6dd928cf041b r20094:d62bfb9e6cd8 r15800:374f3518cc15 r15800:374f3518cc15 r15800:374f3518cc15 r5584:545d748cc681 r5584:545d748cc681 r5584:545d748cc681 r5584:545d748cc681 r13341:dac3d8eb019f r9262:ecd39f10b07a r20081:fae57edbbc37 r18847:c72a2915657e r15800:374f3518cc15 r15800:374f3518cc15 r18668:b656d614c4fd r16822:3e0d72e4f914 r16822:3e0d72e4f914 r16822:3e0d72e4f914 r16822:3e0d72e4f914 r16822:3e0d72e4f914 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r18243:cf295a72fdc8 r13341:dac3d8eb019f r15799:adc217286266 r15799:adc217286266 r15799:adc217286266 r15799:adc217286266 r15799:adc217286266 r15800:374f3518cc15 r15799:adc217286266 r15799:adc217286266 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r15799:adc217286266 r16823:010aa7eca7b6 r18228:6cd8bae37157 r22867:9bff1c966805 r15799:adc217286266 r15799:adc217286266 r15799:adc217286266 r15799:adc217286266 r18243:cf295a72fdc8 r18243:cf295a72fdc8 r15799:adc217286266 r18668:b656d614c4fd r15800:374f3518cc15 r15799:adc217286266 r15799:adc217286266 r15799:adc217286266 r15799:adc217286266 r15800:374f3518cc15 r15800:374f3518cc15 r15800:374f3518cc15 r15800:374f3518cc15 r15799:adc217286266 r20080:370491fa9c80 r20080:370491fa9c80 r20080:370491fa9c80 r20080:370491fa9c80 r20080:370491fa9c80 r20080:370491fa9c80 r20080:370491fa9c80 r20080:370491fa9c80 r20080:370491fa9c80 r20078:a7a34cf316df r20078:a7a34cf316df r20078:a7a34cf316df r20078:a7a34cf316df r20078:a7a34cf316df r15799:adc217286266 r15799:adc217286266 r15799:adc217286266 r15799:adc217286266 r15799:adc217286266 r15799:adc217286266 r15799:adc217286266 r15799:adc217286266 r15799:adc217286266 r15799:adc217286266 r15799:adc217286266 r15799:adc217286266 r15799:adc217286266 r20079:6dd928cf041b r20079:6dd928cf041b r20080:370491fa9c80 r20080:370491fa9c80 r20080:370491fa9c80 r20080:370491fa9c80 r20080:370491fa9c80 r20080:370491fa9c80 r20080:370491fa9c80 r20080:370491fa9c80 r20080:370491fa9c80 r20080:370491fa9c80 r20080:370491fa9c80 r20080:370491fa9c80 r20080:370491fa9c80 r20080:370491fa9c80 r20080:370491fa9c80 r20080:370491fa9c80 r20080:370491fa9c80 r20080:370491fa9c80 r20080:370491fa9c80 r20080:370491fa9c80 r20080:370491fa9c80 r20080:370491fa9c80 r20080:370491fa9c80 r20080:370491fa9c80 r20080:370491fa9c80 r20080:370491fa9c80 r20080:370491fa9c80 r20080:370491fa9c80 r20080:370491fa9c80 r20080:370491fa9c80 r20080:370491fa9c80 r20080:370491fa9c80 r20080:370491fa9c80 r20080:370491fa9c80 r15799:adc217286266 r15799:adc217286266 r15799:adc217286266 r15799:adc217286266 r15799:adc217286266 r15799:adc217286266 r15799:adc217286266 r15799:adc217286266 r15799:adc217286266 r15799:adc217286266 r15800:374f3518cc15 r15799:adc217286266 r16773:b3301f1d5bbb r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r15800:374f3518cc15 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r15800:374f3518cc15 r20081:fae57edbbc37 r20081:fae57edbbc37 r20441:7ab5ef4090c7 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r15800:374f3518cc15 r15800:374f3518cc15 r15800:374f3518cc15 r15800:374f3518cc15 r15800:374f3518cc15 r15800:374f3518cc15 r15800:374f3518cc15 r15800:374f3518cc15 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r20081:fae57edbbc37 r15799:adc217286266 r15799:adc217286266 r20280:ca1fc41725ff r13341:dac3d8eb019f r20081:fae57edbbc37 r20081:fae57edbbc37 r18243:cf295a72fdc8 r20078:a7a34cf316df r20280:ca1fc41725ff r9262:ecd39f10b07a r18682:0cc315a3a76a r18682:0cc315a3a76a r18682:0cc315a3a76a r18682:0cc315a3a76a r18682:0cc315a3a76a r13341:dac3d8eb019f r13341:dac3d8eb019f r18682:0cc315a3a76a r18682:0cc315a3a76a r13341:dac3d8eb019f r20280:ca1fc41725ff r11084:003adceca07c r9262:ecd39f10b07a r20081:fae57edbbc37 r9262:ecd39f10b07a r9262:ecd39f10b07a r14928:db3712149038 r14928:db3712149038 r14928:db3712149038 r14928:db3712149038 r14928:db3712149038 r14928:db3712149038 r14928:db3712149038 r15799:adc217286266 r20081:fae57edbbc37 r20081:fae57edbbc37 r14928:db3712149038 r15800:374f3518cc15 r15800:374f3518cc15 r15800:374f3518cc15 r20081:fae57edbbc37 r20081:fae57edbbc37 r15800:374f3518cc15 r15800:374f3518cc15 r15800:374f3518cc15 r14928:db3712149038 r14928:db3712149038 r14928:db3712149038 r20081:fae57edbbc37 r20081:fae57edbbc37 r14928:db3712149038 r14928:db3712149038 r19878:34102534d9f9 r14928:db3712149038 r14928:db3712149038 r14928:db3712149038 r16822:3e0d72e4f914 r16822:3e0d72e4f914 r16822:3e0d72e4f914 r16822:3e0d72e4f914 r16822:3e0d72e4f914 r16822:3e0d72e4f914 r18682:0cc315a3a76a r16822:3e0d72e4f914 r16822:3e0d72e4f914 r16822:3e0d72e4f914 r16822:3e0d72e4f914 r16822:3e0d72e4f914 r16823:010aa7eca7b6 r16822:3e0d72e4f914 r16822:3e0d72e4f914 r16823:010aa7eca7b6 r16822:3e0d72e4f914 r16822:3e0d72e4f914 r16822:3e0d72e4f914 r16822:3e0d72e4f914 r16822:3e0d72e4f914 r13695:e0bf1a35834a r13341:dac3d8eb019f r13341:dac3d8eb019f r18682:0cc315a3a76a r13341:dac3d8eb019f r13341:dac3d8eb019f r13341:dac3d8eb019f r16210:b4551373db45 r18682:0cc315a3a76a r21979:8f441a1deb2a r16822:3e0d72e4f914 r16822:3e0d72e4f914 r18682:0cc315a3a76a r16210:b4551373db45 r16210:b4551373db45 r13341:dac3d8eb019f r13341:dac3d8eb019f r9262:ecd39f10b07a r13341:dac3d8eb019f r13341:dac3d8eb019f r18682:0cc315a3a76a r13341:dac3d8eb019f r13341:dac3d8eb019f r16479:d326df66d563 r16479:d326df66d563 r23023:7b8669afd1db r16479:d326df66d563 r16479:d326df66d563 r16479:d326df66d563 r16479:d326df66d563 r16479:d326df66d563 r17379:14ef3e1cd869 r16479:d326df66d563 r23235:c3023d73b75c r23235:c3023d73b75c r16479:d326df66d563 r16479:d326df66d563 r16479:d326df66d563 r16479:d326df66d563 r16479:d326df66d563 r16479:d326df66d563 r19613:74f448f7a8ed r16479:d326df66d563 r16479:d326df66d563 r16479:d326df66d563 r22246:1660bb4bd90b r22246:1660bb4bd90b r22246:1660bb4bd90b r22246:1660bb4bd90b r19613:74f448f7a8ed r19613:74f448f7a8ed r19613:74f448f7a8ed r19613:74f448f7a8ed r19613:74f448f7a8ed r19613:74f448f7a8ed r16479:d326df66d563 r22246:1660bb4bd90b r22246:1660bb4bd90b r22246:1660bb4bd90b r22246:1660bb4bd90b r22246:1660bb4bd90b r19613:74f448f7a8ed r19613:74f448f7a8ed r19613:74f448f7a8ed r19613:74f448f7a8ed r19613:74f448f7a8ed r19613:74f448f7a8ed r16479:d326df66d563 r16479:d326df66d563 r16479:d326df66d563 r13341:dac3d8eb019f r13341:dac3d8eb019f r13341:dac3d8eb019f r18682:0cc315a3a76a r16822:3e0d72e4f914 r16822:3e0d72e4f914 r18234:0d83ef81cba4 r16822:3e0d72e4f914 r16824:4f7bd5624348 r17151:3ceb977b9212 r16824:4f7bd5624348 r16824:4f7bd5624348 r16824:4f7bd5624348 r16824:4f7bd5624348 r16824:4f7bd5624348 r16824:4f7bd5624348 r16824:4f7bd5624348 r16824:4f7bd5624348 r16824:4f7bd5624348 r16824:4f7bd5624348 r16824:4f7bd5624348 r16824:4f7bd5624348 r16824:4f7bd5624348 r16824:4f7bd5624348 r16824:4f7bd5624348 r16824:4f7bd5624348 r16824:4f7bd5624348 r16824:4f7bd5624348 r16824:4f7bd5624348 r16824:4f7bd5624348 r16824:4f7bd5624348 r16824:4f7bd5624348 r16824:4f7bd5624348 r16824:4f7bd5624348 r16824:4f7bd5624348 r16824:4f7bd5624348 r16824:4f7bd5624348 r16824:4f7bd5624348 r18682:0cc315a3a76a r16824:4f7bd5624348 r16824:4f7bd5624348 r16824:4f7bd5624348 r16824:4f7bd5624348 r21979:8f441a1deb2a r16824:4f7bd5624348 r16824:4f7bd5624348 r16824:4f7bd5624348 r16824:4f7bd5624348 r16824:4f7bd5624348 r16824:4f7bd5624348 r16824:4f7bd5624348 r16824:4f7bd5624348 r16824:4f7bd5624348 r16824:4f7bd5624348 r16824:4f7bd5624348 r16824:4f7bd5624348 r16824:4f7bd5624348 r16824:4f7bd5624348 r16822:3e0d72e4f914 r16822:3e0d72e4f914 r16822:3e0d72e4f914 r18682:0cc315a3a76a r15769:4a935f419828 r13341:dac3d8eb019f r9262:ecd39f10b07a r18682:0cc315a3a76a r13341:dac3d8eb019f r16479:d326df66d563 r16479:d326df66d563 r13341:dac3d8eb019f r16479:d326df66d563 r13341:dac3d8eb019f r13341:dac3d8eb019f r13341:dac3d8eb019f r9262:ecd39f10b07a r9262:ecd39f10b07a r9262:ecd39f10b07a r17476:d3b7a183536d r17476:d3b7a183536d r17476:d3b7a183536d r17476:d3b7a183536d r17476:d3b7a183536d r17476:d3b7a183536d r15063:8f5c4afdb886 r15063:8f5c4afdb886 r19878:34102534d9f9 r19878:34102534d9f9 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r22850:1d6a79ca3a7c r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r17479:f070b348c09a r15799:adc217286266 r16823:010aa7eca7b6 r16822:3e0d72e4f914 r18234:0d83ef81cba4 r16210:b4551373db45 r16210:b4551373db45 r16210:b4551373db45 r16210:b4551373db45 r16210:b4551373db45 r16479:d326df66d563 r16479:d326df66d563 r16479:d326df66d563 r16210:b4551373db45 r16210:b4551373db45 r16210:b4551373db45 r16210:b4551373db45 r16210:b4551373db45 r16210:b4551373db45 r16210:b4551373db45 r16210:b4551373db45 r16210:b4551373db45 r22850:1d6a79ca3a7c r15063:8f5c4afdb886 r15063:8f5c4afdb886 r15063:8f5c4afdb886 r17479:f070b348c09a r15800:374f3518cc15 r20081:fae57edbbc37 r15063:8f5c4afdb886 r15063:8f5c4afdb886 r15063:8f5c4afdb886 r15063:8f5c4afdb886 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r18682:0cc315a3a76a r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16839:ca859b8cdc87 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r17154:187c999b2833 r17154:187c999b2833 r17154:187c999b2833 r17154:187c999b2833 r17154:187c999b2833 r17154:187c999b2833 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16826:4c20900b2848 r16826:4c20900b2848 r16826:4c20900b2848 r16826:4c20900b2848 r22850:1d6a79ca3a7c r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r14399:3f819c0da60a r9262:ecd39f10b07a r9262:ecd39f10b07a r18682:0cc315a3a76a r16823:010aa7eca7b6 r18682:0cc315a3a76a r16823:010aa7eca7b6 r16823:010aa7eca7b6 r18682:0cc315a3a76a r17362:708316e71331 r17362:708316e71331 r17362:708316e71331 r17362:708316e71331 r17362:708316e71331 r17362:708316e71331 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r18682:0cc315a3a76a r20081:fae57edbbc37 r20081:fae57edbbc37 r15553:7db2c5732f29 r15063:8f5c4afdb886 r14399:3f819c0da60a r22850:1d6a79ca3a7c r5584:545d748cc681 r15616:f386c05f9d59 r18682:0cc315a3a76a r9262:ecd39f10b07a r11917:612c11f7ab47 r5584:545d748cc681 r9262:ecd39f10b07a r16825:fbc78276b403 r17153:3744b23fb476 r9262:ecd39f10b07a r20078:a7a34cf316df r5584:545d748cc681 r9262:ecd39f10b07a r9262:ecd39f10b07a r9262:ecd39f10b07a r9262:ecd39f10b07a r5584:545d748cc681 r16824:4f7bd5624348 r16824:4f7bd5624348 r16824:4f7bd5624348 r18682:0cc315a3a76a r16824:4f7bd5624348 r18682:0cc315a3a76a r16824:4f7bd5624348 r18682:0cc315a3a76a r16824:4f7bd5624348 r16824:4f7bd5624348 r16824:4f7bd5624348 r16824:4f7bd5624348 r16824:4f7bd5624348 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r18682:0cc315a3a76a r16823:010aa7eca7b6 r18682:0cc315a3a76a r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r16823:010aa7eca7b6 r13334:52f3226937dd r9262:ecd39f10b07a r18234:0d83ef81cba4 r18682:0cc315a3a76a r18682:0cc315a3a76a r5584:545d748cc681 r9262:ecd39f10b07a r5584:545d748cc681 r11668:77695be2e0ed r11668:77695be2e0ed r13742:180ad925befc r18682:0cc315a3a76a r20287:5b9a8691769e r11668:77695be2e0ed r16822:3e0d72e4f914 r16822:3e0d72e4f914 r18682:0cc315a3a76a r18682:0cc315a3a76a r18682:0cc315a3a76a r16822:3e0d72e4f914 r16822:3e0d72e4f914 r18682:0cc315a3a76a r11668:77695be2e0ed r11668:77695be2e0ed r20513:82a59932b307 r18682:0cc315a3a76a r11668:77695be2e0ed r18682:0cc315a3a76a r11668:77695be2e0ed r18682:0cc315a3a76a r13742:180ad925befc r11668:77695be2e0ed r11668:77695be2e0ed r11668:77695be2e0ed r20280:ca1fc41725ff r20283:2a199c78224c r6491:6b6c19f090e1 r19745:d8f95208ad9e r13554:d1964ead02ee r11368:058349c3a02c r5584:545d748cc681 r15610:623a23fb6560 r15610:623a23fb6560 r11356:ae9277304002 r20078:a7a34cf316df r13060:e57594b0ca84 r18243:cf295a72fdc8 r11356:ae9277304002 r18243:cf295a72fdc8 r5584:545d748cc681 r5584:545d748cc681 r18243:cf295a72fdc8 r10184:9c5fe3a1bdab r5584:545d748cc681 r5584:545d748cc681 r6423:c3b8b9853091 r11444:8fe61cd1c07a r5584:545d748cc681 r5584:545d748cc681 r22867:9bff1c966805 r5584:545d748cc681 r22867:9bff1c966805 r5584:545d748cc681 r5584:545d748cc681 r14450:8f83ebfe28cc r5584:545d748cc681 r5584:545d748cc681 r5584:545d748cc681 r19143:be8ee3cb7887 r5584:545d748cc681 r5584:545d748cc681 r5584:545d748cc681 r16357:7b29732245a9 r5584:545d748cc681 r19143:be8ee3cb7887 r19143:be8ee3cb7887 r19143:be8ee3cb7887 r5584:545d748cc681 r19143:be8ee3cb7887 r5584:545d748cc681 r5584:545d748cc681 r19143:be8ee3cb7887 r5584:545d748cc681 r5584:545d748cc681 r11133:84e4d86c0cb1 r11133:84e4d86c0cb1 r11133:84e4d86c0cb1 r13026:0c3f00ec0a74 r11133:84e4d86c0cb1 r11133:84e4d86c0cb1 r18296:89d34cbdf3a3 r18296:89d34cbdf3a3 r18296:89d34cbdf3a3 r18296:89d34cbdf3a3 r18229:a35410711978 r11133:84e4d86c0cb1 r11133:84e4d86c0cb1 r11133:84e4d86c0cb1 r11133:84e4d86c0cb1 r5584:545d748cc681 r9528:048134951a49 r10647:62911ec68e89 r5584:545d748cc681 r9528:048134951a49 r5584:545d748cc681 r5584:545d748cc681 r9528:048134951a49 r10647:62911ec68e89 r5584:545d748cc681 r9528:048134951a49 r5584:545d748cc681 r9528:048134951a49 r9528:048134951a49 r9528:048134951a49 r9528:048134951a49 r5584:545d748cc681 r5584:545d748cc681 r9528:048134951a49 r9528:048134951a49 r9528:048134951a49 r9528:048134951a49 r5584:545d748cc681 r5584:545d748cc681 r16604:2b94452893e9 r9528:048134951a49 r5584:545d748cc681 r5584:545d748cc681 r9528:048134951a49 r10647:62911ec68e89 r5584:545d748cc681 r9528:048134951a49 r9528:048134951a49 r5584:545d748cc681 r5584:545d748cc681 r9528:048134951a49 r10647:62911ec68e89 r5584:545d748cc681 r9528:048134951a49 r9528:048134951a49 r5584:545d748cc681 r5584:545d748cc681 r9528:048134951a49 r10647:62911ec68e89 r5584:545d748cc681 r9528:048134951a49 r9528:048134951a49 r5584:545d748cc681 r5584:545d748cc681 r9528:048134951a49 r10647:62911ec68e89 r5584:545d748cc681 r9528:048134951a49 r12251:58d0d73149cb r9528:048134951a49 r19944:25a78576fb5e r9528:048134951a49 r9528:048134951a49 r9528:048134951a49 r5584:545d748cc681 r6350:7a0fb15b3676 r9528:048134951a49 r5584:545d748cc681 r5584:545d748cc681 r5584:545d748cc681 r9528:048134951a49 r5584:545d748cc681 r5584:545d748cc681 r9528:048134951a49 r10647:62911ec68e89 r5584:545d748cc681 r9528:048134951a49 r9528:048134951a49 r5584:545d748cc681 r5584:545d748cc681 r9528:048134951a49 r10647:62911ec68e89 r5584:545d748cc681 r16373:fab42163de3d r9528:048134951a49 r5584:545d748cc681 r5584:545d748cc681 r9528:048134951a49 r10647:62911ec68e89 r5584:545d748cc681 r9528:048134951a49 r9528:048134951a49 r5584:545d748cc681 r5584:545d748cc681 r19944:25a78576fb5e r10647:62911ec68e89 r5584:545d748cc681 r5584:545d748cc681 r9528:048134951a49 r5584:545d748cc681 r9528:048134951a49 r9528:048134951a49 r5584:545d748cc681 r9528:048134951a49 r9528:048134951a49 r5584:545d748cc681 r5584:545d748cc681 r9528:048134951a49 r10647:62911ec68e89 r8974:eb38c1c3d164 r16778:660bd976d69f r9528:048134951a49 r8974:eb38c1c3d164 r8974:eb38c1c3d164 r10161:fbc2bd5a86b2 r10647:62911ec68e89 r10161:fbc2bd5a86b2 r10161:fbc2bd5a86b2 r10161:fbc2bd5a86b2 r10161:fbc2bd5a86b2 r10161:fbc2bd5a86b2 r12707:8316c73753e1 r12707:8316c73753e1 r12707:8316c73753e1 r12707:8316c73753e1 r12707:8316c73753e1 r12707:8316c73753e1 r12707:8316c73753e1 r6247:96e840dbefcc r5584:545d748cc681 r9528:048134951a49 r5584:545d748cc681 r5584:545d748cc681 r9861:5771d7825c6d r9861:5771d7825c6d r9861:5771d7825c6d r9861:5771d7825c6d r9861:5771d7825c6d r9861:5771d7825c6d r9861:5771d7825c6d r9861:5771d7825c6d r9861:5771d7825c6d r9861:5771d7825c6d r17241:d97886f09e96 r9861:5771d7825c6d r9861:5771d7825c6d r17241:d97886f09e96 r17241:d97886f09e96 r17241:d97886f09e96 r17241:d97886f09e96 r17241:d97886f09e96 r17241:d97886f09e96 r17479:f070b348c09a r19878:34102534d9f9 r9861:5771d7825c6d r9861:5771d7825c6d r9861:5771d7825c6d r9861:5771d7825c6d r9861:5771d7825c6d r9861:5771d7825c6d r9861:5771d7825c6d r5584:545d748cc681 r9060:95eaab033b9c r5584:545d748cc681 r9861:5771d7825c6d r9861:5771d7825c6d r9861:5771d7825c6d r9861:5771d7825c6d r9861:5771d7825c6d r5584:545d748cc681 r5584:545d748cc681 r11457:9a04ad49bedb r11457:9a04ad49bedb r13742:180ad925befc r18682:0cc315a3a76a r14035:4f06488d5a62 r20287:5b9a8691769e r13742:180ad925befc r11457:9a04ad49bedb r11457:9a04ad49bedb r11457:9a04ad49bedb r18682:0cc315a3a76a r18682:0cc315a3a76a r13745:49505a0400d8 r11457:9a04ad49bedb r11457:9a04ad49bedb r11457:9a04ad49bedb r11457:9a04ad49bedb r20513:82a59932b307 r18682:0cc315a3a76a r11457:9a04ad49bedb r11457:9a04ad49bedb r11457:9a04ad49bedb r18682:0cc315a3a76a r11457:9a04ad49bedb r18682:0cc315a3a76a r15574:ade638420449 r19622:2ffb0e610d7f r18682:0cc315a3a76a r12622:202e83a6cee7 r18682:0cc315a3a76a r12622:202e83a6cee7 r18682:0cc315a3a76a r12622:202e83a6cee7 r11457:9a04ad49bedb r13349:9181d35bf72b r13745:49505a0400d8 r11457:9a04ad49bedb r13742:180ad925befc r11457:9a04ad49bedb r11457:9a04ad49bedb r11457:9a04ad49bedb r13761:148e336fa28f r5584:545d748cc681 r13761:148e336fa28f r13761:148e336fa28f r5584:545d748cc681 r21872:fd80368dbae4 r21979:8f441a1deb2a r21979:8f441a1deb2a r13761:148e336fa28f r13761:148e336fa28f r5584:545d748cc681 r13761:148e336fa28f r17184:a6dd7165a9b8 r5584:545d748cc681 r8836:911846a8cfa6 r8840:f5c2213cf909 r21872:fd80368dbae4 r5584:545d748cc681 r13597:7146c5f53156 r5584:545d748cc681 r5584:545d748cc681 r13761:148e336fa28f r13761:148e336fa28f r13761:148e336fa28f r13761:148e336fa28f r13761:148e336fa28f r13761:148e336fa28f r13761:148e336fa28f r13761:148e336fa28f r5584:545d748cc681 r5584:545d748cc681 r12364:cbc66d4e5c75 r12364:cbc66d4e5c75 r13599:f6ef46132fe6 r13599:f6ef46132fe6 r13599:f6ef46132fe6 r13599:f6ef46132fe6 r13060:e57594b0ca84 r13599:f6ef46132fe6 r12364:cbc66d4e5c75 r18234:0d83ef81cba4 r10122:8be97f532491 r10122:8be97f532491 r18234:0d83ef81cba4 r18234:0d83ef81cba4 r18234:0d83ef81cba4 r18234:0d83ef81cba4 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r13596:83142daf4c93 r13596:83142daf4c93 r13596:83142daf4c93 r13596:83142daf4c93 r13596:83142daf4c93 r13596:83142daf4c93 r13596:83142daf4c93 r13597:7146c5f53156 r21979:8f441a1deb2a r13597:7146c5f53156 r13597:7146c5f53156 r13597:7146c5f53156 r13596:83142daf4c93 r13596:83142daf4c93 r13596:83142daf4c93 r13596:83142daf4c93 r13596:83142daf4c93 r13596:83142daf4c93 r13596:83142daf4c93 r13596:83142daf4c93 r10122:8be97f532491 r13346:d5390ec15c71 r13346:d5390ec15c71 r13346:d5390ec15c71 r10122:8be97f532491 r13348:a18e66ad9ec7 r10122:8be97f532491 r13346:d5390ec15c71 r13346:d5390ec15c71 r13602:30f9b380fb13 r16431:ec558deca9d7 r13596:83142daf4c93 r21806:6d9f5fa48e29 r13600:8268515184a7 r13600:8268515184a7 r13596:83142daf4c93 r16074:92f60cf5758b r21979:8f441a1deb2a r21979:8f441a1deb2a r13602:30f9b380fb13 r13602:30f9b380fb13 r13602:30f9b380fb13 r13596:83142daf4c93 r16017:2291ca54c6cd r13596:83142daf4c93 r13346:d5390ec15c71 r15769:4a935f419828 r15769:4a935f419828 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r18234:0d83ef81cba4 r13596:83142daf4c93 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r13596:83142daf4c93 r10348:f56261e03086 r10348:f56261e03086 r10348:f56261e03086 r13596:83142daf4c93 r10122:8be97f532491 r10122:8be97f532491 r17184:a6dd7165a9b8 r10122:8be97f532491 r19467:47fa1346a132 r12483:edbdfbf85fff r10122:8be97f532491 r11725:57bc99fdc1bc r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r12710:e1020cfc5c9b r10122:8be97f532491 r13596:83142daf4c93 r10122:8be97f532491 r13346:d5390ec15c71 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r9183:200d86a0cdf3 r9183:200d86a0cdf3 r9183:200d86a0cdf3 r5584:545d748cc681 r10207:a1fc2f2a33db r5584:545d748cc681 r5584:545d748cc681 r5584:545d748cc681 r9183:200d86a0cdf3 r10122:8be97f532491 r13349:9181d35bf72b r13349:9181d35bf72b r13349:9181d35bf72b r13349:9181d35bf72b r13349:9181d35bf72b r13349:9181d35bf72b r9183:200d86a0cdf3 r13349:9181d35bf72b r20280:ca1fc41725ff r9183:200d86a0cdf3 r13387:8955456e8734 r13387:8955456e8734 r13387:8955456e8734 r16074:92f60cf5758b r13387:8955456e8734 r13387:8955456e8734 r13387:8955456e8734 r13387:8955456e8734 r13387:8955456e8734 r13387:8955456e8734 r13387:8955456e8734 r20280:ca1fc41725ff r15769:4a935f419828 r18682:0cc315a3a76a r15769:4a935f419828 r13387:8955456e8734 r13387:8955456e8734 r13387:8955456e8734 r16074:92f60cf5758b r13387:8955456e8734 r13387:8955456e8734 r9183:200d86a0cdf3 r18682:0cc315a3a76a r9949:5ac3bf61abad r16074:92f60cf5758b r18682:0cc315a3a76a r12441:9b4b7d54e20a r18682:0cc315a3a76a r9183:200d86a0cdf3 r5584:545d748cc681 r20280:ca1fc41725ff r19345:0ce699e7c1d3 r9183:200d86a0cdf3 r9183:200d86a0cdf3 r9183:200d86a0cdf3 r9183:200d86a0cdf3 r9530:bac0735f8a5e r9183:200d86a0cdf3 r9183:200d86a0cdf3 r13695:e0bf1a35834a r9183:200d86a0cdf3 r15509:866266be392a r18682:0cc315a3a76a r16074:92f60cf5758b r13596:83142daf4c93 r16074:92f60cf5758b r15509:866266be392a r15509:866266be392a r15509:866266be392a r15509:866266be392a r15509:866266be392a r15509:866266be392a r15509:866266be392a r15509:866266be392a r15509:866266be392a r15509:866266be392a r13349:9181d35bf72b r15509:866266be392a r18682:0cc315a3a76a r16280:cc4f24443d19 r21814:76dbe7ca0bbf r16280:cc4f24443d19 r16280:cc4f24443d19 r16280:cc4f24443d19 r16280:cc4f24443d19 r16280:cc4f24443d19 r18682:0cc315a3a76a r16074:92f60cf5758b r15509:866266be392a r15509:866266be392a r15509:866266be392a r13349:9181d35bf72b r15509:866266be392a r13349:9181d35bf72b r13349:9181d35bf72b r5584:545d748cc681 r13349:9181d35bf72b r13349:9181d35bf72b r15574:ade638420449 r18682:0cc315a3a76a r16074:92f60cf5758b r9183:200d86a0cdf3 r9183:200d86a0cdf3 r18682:0cc315a3a76a r16074:92f60cf5758b r16069:5049a8060a4d r15574:ade638420449 r15574:ade638420449 r17127:fe5262df76e1 r15574:ade638420449 r15574:ade638420449 r15769:4a935f419828 r15574:ade638420449 r9183:200d86a0cdf3 r16069:5049a8060a4d r15574:ade638420449 r16074:92f60cf5758b r15769:4a935f419828 r15574:ade638420449 r5584:545d748cc681 r16069:5049a8060a4d r16074:92f60cf5758b r16074:92f60cf5758b r15769:4a935f419828 r15574:ade638420449 r15574:ade638420449 r16069:5049a8060a4d r15574:ade638420449 r16074:92f60cf5758b r16074:92f60cf5758b r15769:4a935f419828 r15574:ade638420449 r15574:ade638420449 r15574:ade638420449 r15608:7b580ec7448a r15608:7b580ec7448a r9183:200d86a0cdf3 r13349:9181d35bf72b r13349:9181d35bf72b r13349:9181d35bf72b r13349:9181d35bf72b r13349:9181d35bf72b r18682:0cc315a3a76a r13349:9181d35bf72b r13349:9181d35bf72b r13349:9181d35bf72b r13349:9181d35bf72b r18682:0cc315a3a76a r13349:9181d35bf72b r13349:9181d35bf72b r13349:9181d35bf72b r13349:9181d35bf72b r13349:9181d35bf72b r13349:9181d35bf72b r13349:9181d35bf72b r16074:92f60cf5758b r13349:9181d35bf72b r13349:9181d35bf72b r18682:0cc315a3a76a r15361:a266d6f1f693 r15361:a266d6f1f693 r9183:200d86a0cdf3 r11669:c83aff725e8d r11669:c83aff725e8d r13349:9181d35bf72b r18682:0cc315a3a76a r13349:9181d35bf72b r13349:9181d35bf72b r13349:9181d35bf72b r13349:9181d35bf72b r11669:c83aff725e8d r18682:0cc315a3a76a r11669:c83aff725e8d r18682:0cc315a3a76a r18682:0cc315a3a76a r18682:0cc315a3a76a r11669:c83aff725e8d r11669:c83aff725e8d r11669:c83aff725e8d r11458:19dc175db074 r18682:0cc315a3a76a r11458:19dc175db074 r9273:0df9c11598cc r9183:200d86a0cdf3 r9183:200d86a0cdf3 r14399:3f819c0da60a r9183:200d86a0cdf3 r9183:200d86a0cdf3 r18682:0cc315a3a76a r9530:bac0735f8a5e r9183:200d86a0cdf3 r9183:200d86a0cdf3 r13349:9181d35bf72b r18682:0cc315a3a76a r18682:0cc315a3a76a r16074:92f60cf5758b r9183:200d86a0cdf3 r13349:9181d35bf72b r18682:0cc315a3a76a r18682:0cc315a3a76a r9365:9bd51de92a64 r9183:200d86a0cdf3 r15571:b1604632e995 r16050:f8b5963745b7 r15608:7b580ec7448a r15608:7b580ec7448a r9183:200d86a0cdf3 r18682:0cc315a3a76a r16074:92f60cf5758b r9183:200d86a0cdf3 r5584:545d748cc681 r18682:0cc315a3a76a r22470:ad7ada400287 r18682:0cc315a3a76a r9183:200d86a0cdf3 r5584:545d748cc681 r9183:200d86a0cdf3 r18682:0cc315a3a76a r18682:0cc315a3a76a r18682:0cc315a3a76a r9183:200d86a0cdf3 r9183:200d86a0cdf3 r9183:200d86a0cdf3 r5584:545d748cc681 r9183:200d86a0cdf3 r9183:200d86a0cdf3 r9183:200d86a0cdf3 r18682:0cc315a3a76a r9530:bac0735f8a5e r9183:200d86a0cdf3 r18682:0cc315a3a76a r9365:9bd51de92a64 r5584:545d748cc681 r9183:200d86a0cdf3 r15508:ba762c312927 r19475:f7bcaee131d9 r9183:200d86a0cdf3 r15508:ba762c312927 r15508:ba762c312927 r16074:92f60cf5758b r9183:200d86a0cdf3 r5584:545d748cc681 r9183:200d86a0cdf3 r9183:200d86a0cdf3 r9183:200d86a0cdf3 r9183:200d86a0cdf3 r9183:200d86a0cdf3 r9183:200d86a0cdf3 r5584:545d748cc681 r9183:200d86a0cdf3 r23124:8fa6d269005b r9183:200d86a0cdf3 r9530:bac0735f8a5e r16074:92f60cf5758b r9183:200d86a0cdf3 r16074:92f60cf5758b r9183:200d86a0cdf3 r9183:200d86a0cdf3 r9183:200d86a0cdf3 r9183:200d86a0cdf3 r13334:52f3226937dd r9183:200d86a0cdf3 r18682:0cc315a3a76a r9183:200d86a0cdf3 r9297:6cd3e74fc38e r17476:d3b7a183536d r17476:d3b7a183536d r17476:d3b7a183536d r17476:d3b7a183536d r17476:d3b7a183536d r17476:d3b7a183536d r9297:6cd3e74fc38e r17480:5461d9a79ce5 r17480:5461d9a79ce5 r16074:92f60cf5758b r16074:92f60cf5758b r9942:8032a9a93376 r9942:8032a9a93376 r9942:8032a9a93376 r17482:4dbb8b190ff9 r9530:bac0735f8a5e r17482:4dbb8b190ff9 r9530:bac0735f8a5e r9530:bac0735f8a5e r9530:bac0735f8a5e r9530:bac0735f8a5e r9297:6cd3e74fc38e r9183:200d86a0cdf3 r5584:545d748cc681 r20518:7c8efbb138e6 r20283:2a199c78224c r10118:487cb3dbf22d r19745:d8f95208ad9e r13554:d1964ead02ee r11368:058349c3a02c r5584:545d748cc681 r20518:7c8efbb138e6 r20518:7c8efbb138e6 r20518:7c8efbb138e6 r20518:7c8efbb138e6 r20518:7c8efbb138e6 r20518:7c8efbb138e6 r20518:7c8efbb138e6 r20918:cce18d275514 r5584:545d748cc681 r19345:0ce699e7c1d3 r5584:545d748cc681 r20518:7c8efbb138e6 r20518:7c8efbb138e6 r20518:7c8efbb138e6 r20518:7c8efbb138e6 r20518:7c8efbb138e6 r20518:7c8efbb138e6 r20518:7c8efbb138e6 r5584:545d748cc681 r5584:545d748cc681 r10207:a1fc2f2a33db r5584:545d748cc681 r9413:fcf267325763 r10207:a1fc2f2a33db r7547:e2bbed677270 r7547:e2bbed677270 r7547:e2bbed677270 r10207:a1fc2f2a33db r10207:a1fc2f2a33db r6643:fa000ce7441e r16069:5049a8060a4d r6643:fa000ce7441e r5584:545d748cc681 r5584:545d748cc681 r5745:711848d18034 r5584:545d748cc681 r16069:5049a8060a4d r5584:545d748cc681 r5584:545d748cc681 r10207:a1fc2f2a33db r5745:711848d18034 r16069:5049a8060a4d r5745:711848d18034 r5745:711848d18034 r10207:a1fc2f2a33db r5584:545d748cc681 r5584:545d748cc681 r5584:545d748cc681 r6259:e2dba394134b r5584:545d748cc681 r5584:545d748cc681 r12991:ff20fa5b1c08 r5584:545d748cc681 r16069:5049a8060a4d r5584:545d748cc681 r7486:610eee847f11 r7486:610eee847f11 r7530:8eaeedf8b40c r7530:8eaeedf8b40c r18682:0cc315a3a76a r18682:0cc315a3a76a r18682:0cc315a3a76a r18682:0cc315a3a76a r12069:84bc50fb033a r13355:15a0c800af15 r13355:15a0c800af15 r13355:15a0c800af15 r13742:180ad925befc r18682:0cc315a3a76a r18682:0cc315a3a76a r14035:4f06488d5a62 r20287:5b9a8691769e r13742:180ad925befc r13355:15a0c800af15 r18682:0cc315a3a76a r18682:0cc315a3a76a r13721:3499c8d2d992 r18682:0cc315a3a76a r13721:3499c8d2d992 r18682:0cc315a3a76a r13721:3499c8d2d992 r20040:cb74932ab295 r20040:cb74932ab295 r18682:0cc315a3a76a r13742:180ad925befc r13355:15a0c800af15 r7530:8eaeedf8b40c r7530:8eaeedf8b40c r13355:15a0c800af15 r13355:15a0c800af15 r11668:77695be2e0ed r13742:180ad925befc r18682:0cc315a3a76a r18682:0cc315a3a76a r14035:4f06488d5a62 r20287:5b9a8691769e r13742:180ad925befc r11668:77695be2e0ed r18682:0cc315a3a76a r11668:77695be2e0ed r20513:82a59932b307 r18682:0cc315a3a76a r11668:77695be2e0ed r13721:3499c8d2d992 r18682:0cc315a3a76a r13721:3499c8d2d992 r18682:0cc315a3a76a r22674:d18c4335b953 r20040:cb74932ab295 r20040:cb74932ab295 r18682:0cc315a3a76a r13355:15a0c800af15 r11668:77695be2e0ed r18682:0cc315a3a76a r13721:3499c8d2d992 r18682:0cc315a3a76a r13721:3499c8d2d992 r18682:0cc315a3a76a r13721:3499c8d2d992 r18682:0cc315a3a76a r13721:3499c8d2d992 r13742:180ad925befc r11668:77695be2e0ed r11668:77695be2e0ed r7530:8eaeedf8b40c r7530:8eaeedf8b40c r12069:84bc50fb033a r12292:c3b6baef441a r11443:81f75d8ddd0c r11443:81f75d8ddd0c r12374:50d157b51c2c r7530:8eaeedf8b40c r20040:cb74932ab295 r20040:cb74932ab295 r20040:cb74932ab295 r20040:cb74932ab295 r20040:cb74932ab295 r20040:cb74932ab295 r20040:cb74932ab295 r13355:15a0c800af15 r9254:d818c13eb2d9 r13355:15a0c800af15 r15769:4a935f419828 r9254:d818c13eb2d9 r9254:d818c13eb2d9 r20280:ca1fc41725ff r9254:d818c13eb2d9 r15769:4a935f419828 r13355:15a0c800af15 r20280:ca1fc41725ff r18682:0cc315a3a76a r20280:ca1fc41725ff r13355:15a0c800af15 r18682:0cc315a3a76a r9254:d818c13eb2d9 r13355:15a0c800af15 r13355:15a0c800af15 r13355:15a0c800af15 r9254:d818c13eb2d9 r17476:d3b7a183536d r17476:d3b7a183536d r17476:d3b7a183536d r17476:d3b7a183536d r17476:d3b7a183536d r17476:d3b7a183536d r14921:f28746b8a042 r19878:34102534d9f9 r17461:b8195531ac06 r17479:f070b348c09a r17461:b8195531ac06 r17461:b8195531ac06 r17479:f070b348c09a r14921:f28746b8a042 r14921:f28746b8a042 r18682:0cc315a3a76a r14921:f28746b8a042 r14921:f28746b8a042 r14921:f28746b8a042 r14921:f28746b8a042 r14921:f28746b8a042 r14921:f28746b8a042 r14921:f28746b8a042 r14921:f28746b8a042 r14921:f28746b8a042 r14921:f28746b8a042 r14921:f28746b8a042 r14921:f28746b8a042 r14921:f28746b8a042 r14921:f28746b8a042 r14921:f28746b8a042 r14921:f28746b8a042 r17175:412ca7ec4689 r14921:f28746b8a042 r21979:8f441a1deb2a r14921:f28746b8a042 r14921:f28746b8a042 r14921:f28746b8a042 r14921:f28746b8a042 r14921:f28746b8a042 r14921:f28746b8a042 r14921:f28746b8a042 r14921:f28746b8a042 r14921:f28746b8a042 r14921:f28746b8a042 r13695:e0bf1a35834a r13355:15a0c800af15 r13355:15a0c800af15 r18682:0cc315a3a76a r13909:8908f1220c1c r13355:15a0c800af15 r13909:8908f1220c1c r19846:75a27628493b r13909:8908f1220c1c r13909:8908f1220c1c r13909:8908f1220c1c r13909:8908f1220c1c r13909:8908f1220c1c r13909:8908f1220c1c r13909:8908f1220c1c r13909:8908f1220c1c r13909:8908f1220c1c r13909:8908f1220c1c r13909:8908f1220c1c r13909:8908f1220c1c r13909:8908f1220c1c r15608:7b580ec7448a r15608:7b580ec7448a r9254:d818c13eb2d9 r18682:0cc315a3a76a r13355:15a0c800af15 r13355:15a0c800af15 r13355:15a0c800af15 r14921:f28746b8a042 r13355:15a0c800af15 r7530:8eaeedf8b40c r13355:15a0c800af15 r13355:15a0c800af15 r13355:15a0c800af15 r13355:15a0c800af15 r13355:15a0c800af15 r13355:15a0c800af15 r13355:15a0c800af15 r9254:d818c13eb2d9 r13355:15a0c800af15 r18682:0cc315a3a76a r13355:15a0c800af15 r13355:15a0c800af15 r13355:15a0c800af15 r9254:d818c13eb2d9 r18682:0cc315a3a76a r21979:8f441a1deb2a r13355:15a0c800af15 r9254:d818c13eb2d9 r7530:8eaeedf8b40c r20040:cb74932ab295 r20040:cb74932ab295 r20040:cb74932ab295 r20040:cb74932ab295 r20040:cb74932ab295 r20040:cb74932ab295 r20040:cb74932ab295 r20040:cb74932ab295 r20040:cb74932ab295 r20040:cb74932ab295 r18682:0cc315a3a76a r19846:75a27628493b r19846:75a27628493b r13721:3499c8d2d992 r13355:15a0c800af15 r9254:d818c13eb2d9 r9254:d818c13eb2d9 r7530:8eaeedf8b40c r7530:8eaeedf8b40c r9254:d818c13eb2d9 r12027:83216fa52f8f r9254:d818c13eb2d9 r12027:83216fa52f8f r9254:d818c13eb2d9 r9254:d818c13eb2d9 r12027:83216fa52f8f r12027:83216fa52f8f r12027:83216fa52f8f r12027:83216fa52f8f r9254:d818c13eb2d9 r9254:d818c13eb2d9 r7530:8eaeedf8b40c r9254:d818c13eb2d9 r11443:81f75d8ddd0c r9254:d818c13eb2d9 r11443:81f75d8ddd0c r11443:81f75d8ddd0c r11443:81f75d8ddd0c r11443:81f75d8ddd0c r12069:84bc50fb033a r12069:84bc50fb033a r12069:84bc50fb033a r9254:d818c13eb2d9 r12069:84bc50fb033a r9254:d818c13eb2d9 r9254:d818c13eb2d9 r12292:c3b6baef441a r11443:81f75d8ddd0c r11443:81f75d8ddd0c r12374:50d157b51c2c r9254:d818c13eb2d9 r9254:d818c13eb2d9 r7530:8eaeedf8b40c r7530:8eaeedf8b40c r13355:15a0c800af15 r13355:15a0c800af15 r18682:0cc315a3a76a r13355:15a0c800af15 r13355:15a0c800af15 r13355:15a0c800af15 r13355:15a0c800af15 r13376:fa7fefceafa2 r13376:fa7fefceafa2 r13376:fa7fefceafa2 r18682:0cc315a3a76a r13376:fa7fefceafa2 r13376:fa7fefceafa2 r13376:fa7fefceafa2 r13376:fa7fefceafa2 r13376:fa7fefceafa2 r13376:fa7fefceafa2 r13376:fa7fefceafa2 r13376:fa7fefceafa2 r13376:fa7fefceafa2 r13376:fa7fefceafa2 r13376:fa7fefceafa2 r16776:bc50cd8a147c r16776:bc50cd8a147c r16776:bc50cd8a147c r16776:bc50cd8a147c r16776:bc50cd8a147c r16776:bc50cd8a147c r16776:bc50cd8a147c r16776:bc50cd8a147c r16776:bc50cd8a147c r16776:bc50cd8a147c r16776:bc50cd8a147c r16776:bc50cd8a147c r16776:bc50cd8a147c r16776:bc50cd8a147c r16776:bc50cd8a147c r16776:bc50cd8a147c r22586:e1be37d1179e r22586:e1be37d1179e r22586:e1be37d1179e r22586:e1be37d1179e r22586:e1be37d1179e r22586:e1be37d1179e r22586:e1be37d1179e r22586:e1be37d1179e r18646:67fc6c803d34 r18646:67fc6c803d34 r18646:67fc6c803d34 r13376:fa7fefceafa2 r16776:bc50cd8a147c r13376:fa7fefceafa2 r13376:fa7fefceafa2 r13376:fa7fefceafa2 r13376:fa7fefceafa2 r13376:fa7fefceafa2 r13376:fa7fefceafa2 r13376:fa7fefceafa2 r13376:fa7fefceafa2 r13376:fa7fefceafa2 r13376:fa7fefceafa2 r13376:fa7fefceafa2 r13376:fa7fefceafa2 r13376:fa7fefceafa2 r13376:fa7fefceafa2 r13376:fa7fefceafa2 r18682:0cc315a3a76a r13376:fa7fefceafa2 r15769:4a935f419828 r13376:fa7fefceafa2 r13376:fa7fefceafa2 r18682:0cc315a3a76a r13376:fa7fefceafa2 r16431:ec558deca9d7 r22455:95b1d0dba378 r13608:06bb7056281f r13608:06bb7056281f r13608:06bb7056281f r13608:06bb7056281f r15464:75d3cbe6c1f9 r17175:412ca7ec4689 r18234:0d83ef81cba4 r15464:75d3cbe6c1f9 r15464:75d3cbe6c1f9 r15464:75d3cbe6c1f9 r13608:06bb7056281f r18234:0d83ef81cba4 r15464:75d3cbe6c1f9 r15783:50b1a6a736a0 r15608:7b580ec7448a r15608:7b580ec7448a r13376:fa7fefceafa2 r18682:0cc315a3a76a r13376:fa7fefceafa2 r20037:2761c8d9b8cc r13376:fa7fefceafa2 r13376:fa7fefceafa2 r20038:7e99f805aa24 r13376:fa7fefceafa2 r13376:fa7fefceafa2 r13355:15a0c800af15 r13355:15a0c800af15 r9254:d818c13eb2d9 r9254:d818c13eb2d9 r9254:d818c13eb2d9 r11917:612c11f7ab47 r7530:8eaeedf8b40c r18682:0cc315a3a76a r9254:d818c13eb2d9 r9254:d818c13eb2d9 r18682:0cc315a3a76a r15769:4a935f419828 r9254:d818c13eb2d9 r7530:8eaeedf8b40c r9254:d818c13eb2d9 r12027:83216fa52f8f r18682:0cc315a3a76a r18682:0cc315a3a76a r9254:d818c13eb2d9 r9254:d818c13eb2d9 r20040:cb74932ab295 r20040:cb74932ab295 r20040:cb74932ab295 r20040:cb74932ab295 r20038:7e99f805aa24 r9273:0df9c11598cc r9254:d818c13eb2d9 r7530:8eaeedf8b40c r14399:3f819c0da60a r9254:d818c13eb2d9 r9254:d818c13eb2d9 r18682:0cc315a3a76a r11917:612c11f7ab47 r9254:d818c13eb2d9 r13355:15a0c800af15 r17569:79cc833a8f35 r15608:7b580ec7448a r15608:7b580ec7448a r7530:8eaeedf8b40c r18682:0cc315a3a76a r18682:0cc315a3a76a r9254:d818c13eb2d9 r11917:612c11f7ab47 r9254:d818c13eb2d9 r18682:0cc315a3a76a r20038:7e99f805aa24 r20037:2761c8d9b8cc r9254:d818c13eb2d9 r20038:7e99f805aa24 r20038:7e99f805aa24 r20038:7e99f805aa24 r20038:7e99f805aa24 r20040:cb74932ab295 r20038:7e99f805aa24 r20040:cb74932ab295 r15608:7b580ec7448a r15608:7b580ec7448a r7530:8eaeedf8b40c r18682:0cc315a3a76a r18682:0cc315a3a76a r18682:0cc315a3a76a r18682:0cc315a3a76a r9254:d818c13eb2d9 r18682:0cc315a3a76a r18682:0cc315a3a76a r18682:0cc315a3a76a r18682:0cc315a3a76a r9254:d818c13eb2d9 r9254:d818c13eb2d9 r9254:d818c13eb2d9 r18682:0cc315a3a76a r9254:d818c13eb2d9 r9254:d818c13eb2d9 r9254:d818c13eb2d9 r9254:d818c13eb2d9 r7530:8eaeedf8b40c r20040:cb74932ab295 r20040:cb74932ab295 r20040:cb74932ab295 r20040:cb74932ab295 r20040:cb74932ab295 r20040:cb74932ab295 r20040:cb74932ab295 r20040:cb74932ab295 r20040:cb74932ab295 r20040:cb74932ab295 r20040:cb74932ab295 r20040:cb74932ab295 r20040:cb74932ab295 r20040:cb74932ab295 r9254:d818c13eb2d9 r9254:d818c13eb2d9 r10148:ec65442a5187 r10148:ec65442a5187 r12473:c79d3ca6b875 r9254:d818c13eb2d9 r7530:8eaeedf8b40c r13334:52f3226937dd r9254:d818c13eb2d9 r18682:0cc315a3a76a r13355:15a0c800af15 r18682:0cc315a3a76a r13355:15a0c800af15 r7530:8eaeedf8b40c r9254:d818c13eb2d9 r7530:8eaeedf8b40c r7530:8eaeedf8b40c r20280:ca1fc41725ff r20283:2a199c78224c r13355:15a0c800af15 r19745:d8f95208ad9e r13554:d1964ead02ee r13355:15a0c800af15 r13355:15a0c800af15 r13355:15a0c800af15 r20280:ca1fc41725ff r20283:2a199c78224c r7530:8eaeedf8b40c r19745:d8f95208ad9e r13554:d1964ead02ee r11368:058349c3a02c r7530:8eaeedf8b40c r7530:8eaeedf8b40c r7530:8eaeedf8b40c r7530:8eaeedf8b40c r10562:37a99a59efaf r10562:37a99a59efaf r13355:15a0c800af15 r7530:8eaeedf8b40c r7530:8eaeedf8b40c r7530:8eaeedf8b40c r7486:610eee847f11 r7486:610eee847f11 r7486:610eee847f11 r11821:abc8a592f030 r11821:abc8a592f030 r13742:180ad925befc r18682:0cc315a3a76a r15073:02cc9885c126 r14035:4f06488d5a62 r20287:5b9a8691769e r13742:180ad925befc r11821:abc8a592f030 r11821:abc8a592f030 r13745:49505a0400d8 r13745:49505a0400d8 r18682:0cc315a3a76a r13333:63c37538cfb6 r11821:abc8a592f030 r11821:abc8a592f030 r22351:3bc77bea7948 r18682:0cc315a3a76a r22351:3bc77bea7948 r22351:3bc77bea7948 r11821:abc8a592f030 r13332:4760d932d738 r22351:3bc77bea7948 r13332:4760d932d738 r18682:0cc315a3a76a r22351:3bc77bea7948 r22351:3bc77bea7948 r12474:6d6f8d461c5d r11821:abc8a592f030 r22351:3bc77bea7948 r22351:3bc77bea7948 r22351:3bc77bea7948 r11821:abc8a592f030 r11821:abc8a592f030 r11821:abc8a592f030 r18682:0cc315a3a76a r13742:180ad925befc r11821:abc8a592f030 r11821:abc8a592f030 r7486:610eee847f11 r7486:610eee847f11 r20280:ca1fc41725ff r20283:2a199c78224c r7486:610eee847f11 r19745:d8f95208ad9e r13554:d1964ead02ee r11368:058349c3a02c r7486:610eee847f11 r15610:623a23fb6560 r15610:623a23fb6560 r7486:610eee847f11 r7486:610eee847f11 r20280:ca1fc41725ff r20283:2a199c78224c r7486:610eee847f11 r19745:d8f95208ad9e r13554:d1964ead02ee r11368:058349c3a02c r7486:610eee847f11 r7486:610eee847f11 r7486:610eee847f11 r7486:610eee847f11 r7486:610eee847f11 r7486:610eee847f11 r7486:610eee847f11 r7486:610eee847f11 r7486:610eee847f11 r7486:610eee847f11 r7486:610eee847f11 r7486:610eee847f11 r7486:610eee847f11 r7486:610eee847f11 r7486:610eee847f11 r7486:610eee847f11 r7486:610eee847f11 r7486:610eee847f11 r7486:610eee847f11 r7486:610eee847f11 r7486:610eee847f11 r7486:610eee847f11 r7486:610eee847f11 r7486:610eee847f11 r7486:610eee847f11 r7486:610eee847f11 r7486:610eee847f11 r7486:610eee847f11 r7486:610eee847f11 r7486:610eee847f11 r7486:610eee847f11 r7486:610eee847f11 r11725:57bc99fdc1bc r11725:57bc99fdc1bc r11725:57bc99fdc1bc r11725:57bc99fdc1bc r7486:610eee847f11 r7486:610eee847f11 r12943:c1043c7d6f68 r12943:c1043c7d6f68 r12943:c1043c7d6f68 r12943:c1043c7d6f68 r7486:610eee847f11 r7486:610eee847f11 r12341:44c95fb99562 r12472:303f27c554de r7486:610eee847f11 r22847:9493041c47ee r7486:610eee847f11 r7486:610eee847f11 r7486:610eee847f11 r15074:dbc845b6aa54 r22465:20da188dc9bb r22465:20da188dc9bb r15078:76a51dd49982 r15078:76a51dd49982 r15078:76a51dd49982 r15078:76a51dd49982 r15078:76a51dd49982 r15078:76a51dd49982 r15078:76a51dd49982 r15078:76a51dd49982 r15078:76a51dd49982 r15078:76a51dd49982 r15078:76a51dd49982 r15078:76a51dd49982 r15078:76a51dd49982 r15078:76a51dd49982 r15078:76a51dd49982 r15078:76a51dd49982 r15078:76a51dd49982 r15074:dbc845b6aa54 r15074:dbc845b6aa54 r15078:76a51dd49982 r15074:dbc845b6aa54 r15078:76a51dd49982 r15074:dbc845b6aa54 r15074:dbc845b6aa54 r15078:76a51dd49982 r15074:dbc845b6aa54 r15074:dbc845b6aa54 r9315:73d8147a031d r9315:73d8147a031d r7486:610eee847f11 r10430:9babbda02879 r10430:9babbda02879 r10430:9babbda02879 r10430:9babbda02879 r16773:b3301f1d5bbb r10430:9babbda02879 r10430:9babbda02879 r9315:73d8147a031d r9315:73d8147a031d r13335:6e7b3863ded9 r9315:73d8147a031d r13332:4760d932d738 r13332:4760d932d738 r13332:4760d932d738 r18682:0cc315a3a76a r18682:0cc315a3a76a r18682:0cc315a3a76a r18682:0cc315a3a76a r18682:0cc315a3a76a r18682:0cc315a3a76a r18682:0cc315a3a76a r18682:0cc315a3a76a r13332:4760d932d738 r9315:73d8147a031d r15610:623a23fb6560 r15610:623a23fb6560 r13332:4760d932d738 r13332:4760d932d738 r13332:4760d932d738 r13332:4760d932d738 r13332:4760d932d738 r13332:4760d932d738 r13332:4760d932d738 r18682:0cc315a3a76a r13332:4760d932d738 r9315:73d8147a031d r13332:4760d932d738 r13332:4760d932d738 r18682:0cc315a3a76a r13332:4760d932d738 r13332:4760d932d738 r13332:4760d932d738 r13332:4760d932d738 r13332:4760d932d738 r13332:4760d932d738 r13332:4760d932d738 r13332:4760d932d738 r20280:ca1fc41725ff r13332:4760d932d738 r22612:5c38bbcea9df r20280:ca1fc41725ff r12473:c79d3ca6b875 r13335:6e7b3863ded9 r13335:6e7b3863ded9 r13335:6e7b3863ded9 r13335:6e7b3863ded9 r13335:6e7b3863ded9 r13335:6e7b3863ded9 r13335:6e7b3863ded9 r13335:6e7b3863ded9 r18682:0cc315a3a76a r13335:6e7b3863ded9 r13335:6e7b3863ded9 r13335:6e7b3863ded9 r13335:6e7b3863ded9 r13335:6e7b3863ded9 r13335:6e7b3863ded9 r13335:6e7b3863ded9 r13335:6e7b3863ded9 r18682:0cc315a3a76a r13335:6e7b3863ded9 r9315:73d8147a031d r9315:73d8147a031d r18682:0cc315a3a76a r9315:73d8147a031d r9315:73d8147a031d r9315:73d8147a031d r9315:73d8147a031d r9315:73d8147a031d r9315:73d8147a031d r9315:73d8147a031d r13332:4760d932d738 r9315:73d8147a031d r9315:73d8147a031d r12473:c79d3ca6b875 r9315:73d8147a031d r20280:ca1fc41725ff r13332:4760d932d738 r18682:0cc315a3a76a r18682:0cc315a3a76a r18682:0cc315a3a76a r18682:0cc315a3a76a r18682:0cc315a3a76a r18682:0cc315a3a76a r18682:0cc315a3a76a r18682:0cc315a3a76a r18682:0cc315a3a76a r23298:05fee739366e r23298:05fee739366e r9315:73d8147a031d r9315:73d8147a031d r9315:73d8147a031d r9315:73d8147a031d r10528:99ad5205b347 r10528:99ad5205b347 r10528:99ad5205b347 r10528:99ad5205b347 r9315:73d8147a031d r9315:73d8147a031d r13695:e0bf1a35834a r13332:4760d932d738 r13332:4760d932d738 r13332:4760d932d738 r20762:6495330471ac r20762:6495330471ac r20762:6495330471ac r20762:6495330471ac r18682:0cc315a3a76a r13332:4760d932d738 r13332:4760d932d738 r13332:4760d932d738 r15608:7b580ec7448a r15621:165865e2071c r13333:63c37538cfb6 r18682:0cc315a3a76a r13333:63c37538cfb6 r13333:63c37538cfb6 r13333:63c37538cfb6 r13332:4760d932d738 r13332:4760d932d738 r13332:4760d932d738 r9315:73d8147a031d r9315:73d8147a031d r11917:612c11f7ab47 r10207:a1fc2f2a33db r9315:73d8147a031d r9315:73d8147a031d r18682:0cc315a3a76a r18682:0cc315a3a76a r18682:0cc315a3a76a r7486:610eee847f11 r9315:73d8147a031d r18682:0cc315a3a76a r18682:0cc315a3a76a r18682:0cc315a3a76a r9315:73d8147a031d r9315:73d8147a031d r9315:73d8147a031d r13332:4760d932d738 r13332:4760d932d738 r13332:4760d932d738 r13332:4760d932d738 r18682:0cc315a3a76a r13332:4760d932d738 r13332:4760d932d738 r13332:4760d932d738 r13332:4760d932d738 r13332:4760d932d738 r13332:4760d932d738 r13332:4760d932d738 r18682:0cc315a3a76a r13332:4760d932d738 r13332:4760d932d738 r13332:4760d932d738 r9315:73d8147a031d r11725:57bc99fdc1bc r9315:73d8147a031d r11725:57bc99fdc1bc r9315:73d8147a031d r9315:73d8147a031d r9315:73d8147a031d r16775:3ed9b708bc5a r12622:202e83a6cee7 r7759:89644b136fe9 r11725:57bc99fdc1bc r9315:73d8147a031d r9315:73d8147a031d r9315:73d8147a031d r17205:3efa24804974 r9315:73d8147a031d r9315:73d8147a031d r11725:57bc99fdc1bc r9315:73d8147a031d r12457:fda18fe9b6c0 r12622:202e83a6cee7 r18646:67fc6c803d34 r18646:67fc6c803d34 r9315:73d8147a031d r9315:73d8147a031d r9315:73d8147a031d r9315:73d8147a031d r9315:73d8147a031d r17205:3efa24804974 r15608:7b580ec7448a r15608:7b580ec7448a r9315:73d8147a031d r9315:73d8147a031d r15157:bb076a01b6d6 r15157:bb076a01b6d6 r15157:bb076a01b6d6 r17284:259dd48e2856 r17284:259dd48e2856 r19944:25a78576fb5e r17284:259dd48e2856 r17284:259dd48e2856 r17284:259dd48e2856 r17284:259dd48e2856 r17284:259dd48e2856 r17284:259dd48e2856 r17205:3efa24804974 r9315:73d8147a031d r17205:3efa24804974 r7759:89644b136fe9 r15608:7b580ec7448a r15608:7b580ec7448a r7759:89644b136fe9 r9315:73d8147a031d r11725:57bc99fdc1bc r7486:610eee847f11 r9315:73d8147a031d r9315:73d8147a031d r12351:edd77a5b715f r9315:73d8147a031d r17205:3efa24804974 r9315:73d8147a031d r7486:610eee847f11 r9315:73d8147a031d r9315:73d8147a031d r9315:73d8147a031d r9315:73d8147a031d r11725:57bc99fdc1bc r9315:73d8147a031d r9315:73d8147a031d r22672:3473f7daf422 r9315:73d8147a031d r16899:d7758bff8ae6 r17205:3efa24804974 r9315:73d8147a031d r9315:73d8147a031d r9315:73d8147a031d r9315:73d8147a031d r7486:610eee847f11 r7486:610eee847f11 r9315:73d8147a031d r9315:73d8147a031d r20760:077125d40f4b r20760:077125d40f4b r20760:077125d40f4b r20760:077125d40f4b r20760:077125d40f4b r20760:077125d40f4b r20760:077125d40f4b r20761:990141772ce0 r20761:990141772ce0 r20761:990141772ce0 r9315:73d8147a031d r9315:73d8147a031d r14399:3f819c0da60a r9315:73d8147a031d r11917:612c11f7ab47 r7486:610eee847f11 r9315:73d8147a031d r18682:0cc315a3a76a r14629:5f2efcec4129 r14629:5f2efcec4129 r14629:5f2efcec4129 r14629:5f2efcec4129 r14629:5f2efcec4129 r14629:5f2efcec4129 r15078:76a51dd49982 r14629:5f2efcec4129 r9315:73d8147a031d r18682:0cc315a3a76a r9315:73d8147a031d r9315:73d8147a031d r18462:a1ba75a7f741 r9315:73d8147a031d r9315:73d8147a031d r11370:6df9331ca497 r9315:73d8147a031d r15608:7b580ec7448a r15608:7b580ec7448a r7486:610eee847f11 r18682:0cc315a3a76a r16069:5049a8060a4d r9315:73d8147a031d r18682:0cc315a3a76a r10184:9c5fe3a1bdab r9315:73d8147a031d r18682:0cc315a3a76a r9315:73d8147a031d r9315:73d8147a031d r9315:73d8147a031d r9315:73d8147a031d r9315:73d8147a031d r9315:73d8147a031d r18682:0cc315a3a76a r9315:73d8147a031d r9315:73d8147a031d r18682:0cc315a3a76a r19853:ccf0a375c83e r19853:ccf0a375c83e r19853:ccf0a375c83e r19853:ccf0a375c83e r10499:570896340d7a r10499:570896340d7a r19853:ccf0a375c83e r9315:73d8147a031d r18682:0cc315a3a76a r16773:b3301f1d5bbb r10499:570896340d7a r9315:73d8147a031d r9315:73d8147a031d r18682:0cc315a3a76a r9315:73d8147a031d r11725:57bc99fdc1bc r9315:73d8147a031d r9315:73d8147a031d r9315:73d8147a031d r7486:610eee847f11 r13334:52f3226937dd r9315:73d8147a031d r13333:63c37538cfb6 r18682:0cc315a3a76a r13333:63c37538cfb6 r13333:63c37538cfb6 r9315:73d8147a031d r9315:73d8147a031d r23298:05fee739366e r9315:73d8147a031d r11917:612c11f7ab47 r9315:73d8147a031d r9315:73d8147a031d r18682:0cc315a3a76a r18682:0cc315a3a76a r13332:4760d932d738 r13332:4760d932d738 r18682:0cc315a3a76a r13332:4760d932d738 r13332:4760d932d738 r18682:0cc315a3a76a r13332:4760d932d738 r18682:0cc315a3a76a r16773:b3301f1d5bbb r13332:4760d932d738 r18682:0cc315a3a76a r13332:4760d932d738 r13332:4760d932d738 r18682:0cc315a3a76a r7486:610eee847f11 r9315:73d8147a031d r7486:610eee847f11 r15073:02cc9885c126 r17476:d3b7a183536d r17476:d3b7a183536d r17476:d3b7a183536d r17476:d3b7a183536d r17476:d3b7a183536d r17476:d3b7a183536d r17461:b8195531ac06 r19878:34102534d9f9 r17461:b8195531ac06 r17479:f070b348c09a r17461:b8195531ac06 r17461:b8195531ac06 r23298:05fee739366e r23298:05fee739366e r17461:b8195531ac06 r17461:b8195531ac06 r15073:02cc9885c126 r15073:02cc9885c126 r15073:02cc9885c126 r15073:02cc9885c126 r15073:02cc9885c126 r15073:02cc9885c126 r15073:02cc9885c126 r15073:02cc9885c126 r15073:02cc9885c126 r9315:73d8147a031d r9315:73d8147a031d r9315:73d8147a031d r9315:73d8147a031d r9315:73d8147a031d r9315:73d8147a031d r9315:73d8147a031d r7486:610eee847f11 r8144:1432edd15267 r16050:f8b5963745b7 r16050:f8b5963745b7 r16050:f8b5963745b7 r16050:f8b5963745b7 r16050:f8b5963745b7 r16050:f8b5963745b7 r16050:f8b5963745b7 r16050:f8b5963745b7 r16050:f8b5963745b7 r16050:f8b5963745b7 r16050:f8b5963745b7 r16050:f8b5963745b7 r16050:f8b5963745b7 r18627:ed625b8206b5 r16050:f8b5963745b7 r16050:f8b5963745b7 r9274:76c4320046fb r9274:76c4320046fb r9274:76c4320046fb r9274:76c4320046fb r11370:6df9331ca497 r9274:76c4320046fb r9274:76c4320046fb r9274:76c4320046fb r14218:a6f34e5b981d r14218:a6f34e5b981d r14218:a6f34e5b981d r14218:a6f34e5b981d r14220:2b66d13ca715 r14218:a6f34e5b981d r14218:a6f34e5b981d r14218:a6f34e5b981d r14218:a6f34e5b981d r14220:2b66d13ca715 r14218:a6f34e5b981d r14220:2b66d13ca715 r14218:a6f34e5b981d r14218:a6f34e5b981d r14218:a6f34e5b981d r14218:a6f34e5b981d r16819:56a1c089ed2b r16819:56a1c089ed2b r22424:a25b9a5bc66b r16819:56a1c089ed2b r16819:56a1c089ed2b r16819:56a1c089ed2b r22424:a25b9a5bc66b r16819:56a1c089ed2b r16819:56a1c089ed2b r16819:56a1c089ed2b r22424:a25b9a5bc66b r16819:56a1c089ed2b r16819:56a1c089ed2b r22424:a25b9a5bc66b r16819:56a1c089ed2b r16819:56a1c089ed2b r16819:56a1c089ed2b r22459:c1921e75ce89 r22459:c1921e75ce89 r22460:68e4922ff4a3 r22460:68e4922ff4a3 r22460:68e4922ff4a3 r16819:56a1c089ed2b r22424:a25b9a5bc66b r22424:a25b9a5bc66b r22424:a25b9a5bc66b r22424:a25b9a5bc66b r22424:a25b9a5bc66b r22424:a25b9a5bc66b r22424:a25b9a5bc66b r22424:a25b9a5bc66b r22424:a25b9a5bc66b r22424:a25b9a5bc66b r22424:a25b9a5bc66b r22424:a25b9a5bc66b r22424:a25b9a5bc66b r22424:a25b9a5bc66b r22424:a25b9a5bc66b r22424:a25b9a5bc66b r22424:a25b9a5bc66b r22424:a25b9a5bc66b r16819:56a1c089ed2b r22423:7fe76492aff2 r22423:7fe76492aff2 r22423:7fe76492aff2 r22423:7fe76492aff2 r22423:7fe76492aff2 r22423:7fe76492aff2 r22423:7fe76492aff2 r22423:7fe76492aff2 r22423:7fe76492aff2 r22423:7fe76492aff2 r22425:2a98eaaaa820 r22425:2a98eaaaa820 r22425:2a98eaaaa820 r22425:2a98eaaaa820 r22425:2a98eaaaa820 r22458:62fd1cae9152 r22459:c1921e75ce89 r22459:c1921e75ce89 r22459:c1921e75ce89 r22461:8bf6c5210cf7 r22461:8bf6c5210cf7 r22461:8bf6c5210cf7 r22461:8bf6c5210cf7 r22461:8bf6c5210cf7 r22461:8bf6c5210cf7 r22461:8bf6c5210cf7 r22461:8bf6c5210cf7 r22461:8bf6c5210cf7 r22461:8bf6c5210cf7 r22425:2a98eaaaa820 r22425:2a98eaaaa820 r22425:2a98eaaaa820 r22425:2a98eaaaa820 r22425:2a98eaaaa820 r22425:2a98eaaaa820 r22425:2a98eaaaa820 r22425:2a98eaaaa820 r22425:2a98eaaaa820 r22423:7fe76492aff2 r22423:7fe76492aff2 r22423:7fe76492aff2 | /* $Id$ */
/*
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file vehicle_gui.cpp The base GUI for all vehicles. */
#include "stdafx.h"
#include "debug.h"
#include "company_func.h"
#include "gui.h"
#include "textbuf_gui.h"
#include "command_func.h"
#include "vehicle_gui_base.h"
#include "viewport_func.h"
#include "newgrf_text.h"
#include "newgrf_debug.h"
#include "roadveh.h"
#include "train.h"
#include "aircraft.h"
#include "depot_map.h"
#include "group_gui.h"
#include "strings_func.h"
#include "vehicle_func.h"
#include "autoreplace_gui.h"
#include "string_func.h"
#include "widgets/dropdown_func.h"
#include "timetable.h"
#include "articulated_vehicles.h"
#include "spritecache.h"
#include "core/geometry_func.hpp"
#include "company_base.h"
#include "engine_func.h"
#include "station_base.h"
#include "tilehighlight_func.h"
#include "zoom_func.h"
#include "safeguards.h"
Sorting _sorting;
static GUIVehicleList::SortFunction VehicleNumberSorter;
static GUIVehicleList::SortFunction VehicleNameSorter;
static GUIVehicleList::SortFunction VehicleAgeSorter;
static GUIVehicleList::SortFunction VehicleProfitThisYearSorter;
static GUIVehicleList::SortFunction VehicleProfitLastYearSorter;
static GUIVehicleList::SortFunction VehicleCargoSorter;
static GUIVehicleList::SortFunction VehicleReliabilitySorter;
static GUIVehicleList::SortFunction VehicleMaxSpeedSorter;
static GUIVehicleList::SortFunction VehicleModelSorter;
static GUIVehicleList::SortFunction VehicleValueSorter;
static GUIVehicleList::SortFunction VehicleLengthSorter;
static GUIVehicleList::SortFunction VehicleTimeToLiveSorter;
static GUIVehicleList::SortFunction VehicleTimetableDelaySorter;
GUIVehicleList::SortFunction * const BaseVehicleListWindow::vehicle_sorter_funcs[] = {
&VehicleNumberSorter,
&VehicleNameSorter,
&VehicleAgeSorter,
&VehicleProfitThisYearSorter,
&VehicleProfitLastYearSorter,
&VehicleCargoSorter,
&VehicleReliabilitySorter,
&VehicleMaxSpeedSorter,
&VehicleModelSorter,
&VehicleValueSorter,
&VehicleLengthSorter,
&VehicleTimeToLiveSorter,
&VehicleTimetableDelaySorter,
};
const StringID BaseVehicleListWindow::vehicle_sorter_names[] = {
STR_SORT_BY_NUMBER,
STR_SORT_BY_NAME,
STR_SORT_BY_AGE,
STR_SORT_BY_PROFIT_THIS_YEAR,
STR_SORT_BY_PROFIT_LAST_YEAR,
STR_SORT_BY_TOTAL_CAPACITY_PER_CARGOTYPE,
STR_SORT_BY_RELIABILITY,
STR_SORT_BY_MAX_SPEED,
STR_SORT_BY_MODEL,
STR_SORT_BY_VALUE,
STR_SORT_BY_LENGTH,
STR_SORT_BY_LIFE_TIME,
STR_SORT_BY_TIMETABLE_DELAY,
INVALID_STRING_ID
};
const StringID BaseVehicleListWindow::vehicle_depot_name[] = {
STR_VEHICLE_LIST_SEND_TRAIN_TO_DEPOT,
STR_VEHICLE_LIST_SEND_ROAD_VEHICLE_TO_DEPOT,
STR_VEHICLE_LIST_SEND_SHIP_TO_DEPOT,
STR_VEHICLE_LIST_SEND_AIRCRAFT_TO_HANGAR
};
/**
* Get the number of digits the biggest unit number of a set of vehicles has.
* @param vehicles The list of vehicles.
* @return The number of digits to allocate space for.
*/
uint GetUnitNumberDigits(VehicleList &vehicles)
{
uint unitnumber = 0;
for (const Vehicle **v = vehicles.Begin(); v != vehicles.End(); v++) {
unitnumber = max<uint>(unitnumber, (*v)->unitnumber);
}
if (unitnumber >= 10000) return 5;
if (unitnumber >= 1000) return 4;
if (unitnumber >= 100) return 3;
/*
* When the smallest unit number is less than 10, it is
* quite likely that it will expand to become more than
* 10 quite soon.
*/
return 2;
}
void BaseVehicleListWindow::BuildVehicleList()
{
if (!this->vehicles.NeedRebuild()) return;
DEBUG(misc, 3, "Building vehicle list type %d for company %d given index %d", this->vli.type, this->vli.company, this->vli.index);
GenerateVehicleSortList(&this->vehicles, this->vli);
this->unitnumber_digits = GetUnitNumberDigits(this->vehicles);
this->vehicles.RebuildDone();
this->vscroll->SetCount(this->vehicles.Length());
}
/**
* Compute the size for the Action dropdown.
* @param show_autoreplace If true include the autoreplace item.
* @param show_group If true include group-related stuff.
* @return Required size.
*/
Dimension BaseVehicleListWindow::GetActionDropdownSize(bool show_autoreplace, bool show_group)
{
Dimension d = {0, 0};
if (show_autoreplace) d = maxdim(d, GetStringBoundingBox(STR_VEHICLE_LIST_REPLACE_VEHICLES));
d = maxdim(d, GetStringBoundingBox(STR_VEHICLE_LIST_SEND_FOR_SERVICING));
d = maxdim(d, GetStringBoundingBox(this->vehicle_depot_name[this->vli.vtype]));
if (show_group) {
d = maxdim(d, GetStringBoundingBox(STR_GROUP_ADD_SHARED_VEHICLE));
d = maxdim(d, GetStringBoundingBox(STR_GROUP_REMOVE_ALL_VEHICLES));
}
return d;
}
/**
* Display the Action dropdown window.
* @param show_autoreplace If true include the autoreplace item.
* @param show_group If true include group-related stuff.
* @return Itemlist for dropdown
*/
DropDownList *BaseVehicleListWindow::BuildActionDropdownList(bool show_autoreplace, bool show_group)
{
DropDownList *list = new DropDownList();
if (show_autoreplace) *list->Append() = new DropDownListStringItem(STR_VEHICLE_LIST_REPLACE_VEHICLES, ADI_REPLACE, false);
*list->Append() = new DropDownListStringItem(STR_VEHICLE_LIST_SEND_FOR_SERVICING, ADI_SERVICE, false);
*list->Append() = new DropDownListStringItem(this->vehicle_depot_name[this->vli.vtype], ADI_DEPOT, false);
if (show_group) {
*list->Append() = new DropDownListStringItem(STR_GROUP_ADD_SHARED_VEHICLE, ADI_ADD_SHARED, false);
*list->Append() = new DropDownListStringItem(STR_GROUP_REMOVE_ALL_VEHICLES, ADI_REMOVE_ALL, false);
}
return list;
}
/* cached values for VehicleNameSorter to spare many GetString() calls */
static const Vehicle *_last_vehicle[2] = { NULL, NULL };
void BaseVehicleListWindow::SortVehicleList()
{
if (this->vehicles.Sort()) return;
/* invalidate cached values for name sorter - vehicle names could change */
_last_vehicle[0] = _last_vehicle[1] = NULL;
}
void DepotSortList(VehicleList *list)
{
if (list->Length() < 2) return;
QSortT(list->Begin(), list->Length(), &VehicleNumberSorter);
}
/** draw the vehicle profit button in the vehicle list window. */
static void DrawVehicleProfitButton(const Vehicle *v, int x, int y)
{
SpriteID spr;
/* draw profit-based coloured icons */
if (v->age <= VEHICLE_PROFIT_MIN_AGE) {
spr = SPR_PROFIT_NA;
} else if (v->GetDisplayProfitLastYear() < 0) {
spr = SPR_PROFIT_NEGATIVE;
} else if (v->GetDisplayProfitLastYear() < VEHICLE_PROFIT_THRESHOLD) {
spr = SPR_PROFIT_SOME;
} else {
spr = SPR_PROFIT_LOT;
}
DrawSprite(spr, PAL_NONE, x, y);
}
/** Maximum number of refit cycles we try, to prevent infinite loops. And we store only a byte anyway */
static const uint MAX_REFIT_CYCLE = 256;
/**
* Get the best fitting subtype when 'cloning'/'replacing' \a v_from with \a v_for.
* All articulated parts of both vehicles are tested to find a possibly shared subtype.
* For \a v_for only vehicle refittable to \a dest_cargo_type are considered.
* @param v_from the vehicle to match the subtype from
* @param v_for the vehicle to get the subtype for
* @param dest_cargo_type Destination cargo type.
* @return the best sub type
*/
byte GetBestFittingSubType(Vehicle *v_from, Vehicle *v_for, CargoID dest_cargo_type)
{
v_from = v_from->GetFirstEnginePart();
v_for = v_for->GetFirstEnginePart();
/* Create a list of subtypes used by the various parts of v_for */
static SmallVector<StringID, 4> subtypes;
subtypes.Clear();
for (; v_from != NULL; v_from = v_from->HasArticulatedPart() ? v_from->GetNextArticulatedPart() : NULL) {
const Engine *e_from = v_from->GetEngine();
if (!e_from->CanCarryCargo() || !HasBit(e_from->info.callback_mask, CBM_VEHICLE_CARGO_SUFFIX)) continue;
subtypes.Include(GetCargoSubtypeText(v_from));
}
byte ret_refit_cyc = 0;
bool success = false;
if (subtypes.Length() > 0) {
/* Check whether any articulated part is refittable to 'dest_cargo_type' with a subtype listed in 'subtypes' */
for (Vehicle *v = v_for; v != NULL; v = v->HasArticulatedPart() ? v->GetNextArticulatedPart() : NULL) {
const Engine *e = v->GetEngine();
if (!e->CanCarryCargo() || !HasBit(e->info.callback_mask, CBM_VEHICLE_CARGO_SUFFIX)) continue;
if (!HasBit(e->info.refit_mask, dest_cargo_type) && v->cargo_type != dest_cargo_type) continue;
CargoID old_cargo_type = v->cargo_type;
byte old_cargo_subtype = v->cargo_subtype;
/* Set the 'destination' cargo */
v->cargo_type = dest_cargo_type;
/* Cycle through the refits */
for (uint refit_cyc = 0; refit_cyc < MAX_REFIT_CYCLE; refit_cyc++) {
v->cargo_subtype = refit_cyc;
/* Make sure we don't pick up anything cached. */
v->First()->InvalidateNewGRFCache();
v->InvalidateNewGRFCache();
StringID subtype = GetCargoSubtypeText(v);
if (subtype == STR_EMPTY) break;
if (!subtypes.Contains(subtype)) continue;
/* We found something matching. */
ret_refit_cyc = refit_cyc;
success = true;
break;
}
/* Reset the vehicle's cargo type */
v->cargo_type = old_cargo_type;
v->cargo_subtype = old_cargo_subtype;
/* Make sure we don't taint the vehicle. */
v->First()->InvalidateNewGRFCache();
v->InvalidateNewGRFCache();
if (success) break;
}
}
return ret_refit_cyc;
}
/** Option to refit a vehicle chain */
struct RefitOption {
CargoID cargo; ///< Cargo to refit to
byte subtype; ///< Subcargo to use
StringID string; ///< GRF-local String to display for the cargo
/**
* Inequality operator for #RefitOption.
* @param other Compare to this #RefitOption.
* @return True if both #RefitOption are different.
*/
inline bool operator != (const RefitOption &other) const
{
return other.cargo != this->cargo || other.string != this->string;
}
/**
* Equality operator for #RefitOption.
* @param other Compare to this #RefitOption.
* @return True if both #RefitOption are equal.
*/
inline bool operator == (const RefitOption &other) const
{
return other.cargo == this->cargo && other.string == this->string;
}
};
typedef SmallVector<RefitOption, 32> SubtypeList; ///< List of refit subtypes associated to a cargo.
/**
* Draw the list of available refit options for a consist and highlight the selected refit option (if any).
* @param list List of subtype options for each (sorted) cargo.
* @param sel Selected refit cargo-type in the window
* @param pos Position of the selected item in caller widow
* @param rows Number of rows(capacity) in caller window
* @param delta Step height in caller window
* @param r Rectangle of the matrix widget.
*/
static void DrawVehicleRefitWindow(const SubtypeList list[NUM_CARGO], const int sel[2], uint pos, uint rows, uint delta, const Rect &r)
{
uint y = r.top + WD_MATRIX_TOP;
uint current = 0;
bool rtl = _current_text_dir == TD_RTL;
uint iconwidth = max(GetSpriteSize(SPR_CIRCLE_FOLDED).width, GetSpriteSize(SPR_CIRCLE_UNFOLDED).width);
uint iconheight = GetSpriteSize(SPR_CIRCLE_FOLDED).height;
int linecolour = _colour_gradient[COLOUR_ORANGE][4];
int iconleft = rtl ? r.right - WD_MATRIX_RIGHT - iconwidth : r.left + WD_MATRIX_LEFT;
int iconcenter = rtl ? r.right - WD_MATRIX_RIGHT - iconwidth / 2 : r.left + WD_MATRIX_LEFT + iconwidth / 2;
int iconinner = rtl ? r.right - WD_MATRIX_RIGHT - iconwidth : r.left + WD_MATRIX_LEFT + iconwidth;
int textleft = r.left + WD_MATRIX_LEFT + (rtl ? 0 : iconwidth + 4);
int textright = r.right - WD_MATRIX_RIGHT - (rtl ? iconwidth + 4 : 0);
/* Draw the list of subtypes for each cargo, and find the selected refit option (by its position). */
for (uint i = 0; current < pos + rows && i < NUM_CARGO; i++) {
for (uint j = 0; current < pos + rows && j < list[i].Length(); j++) {
const RefitOption &refit = list[i][j];
/* Hide subtypes if sel[0] does not match */
if (sel[0] != (int)i && refit.subtype != 0xFF) continue;
/* Refit options with a position smaller than pos don't have to be drawn. */
if (current < pos) {
current++;
continue;
}
if (list[i].Length() > 1) {
if (refit.subtype != 0xFF) {
/* Draw tree lines */
int ycenter = y + FONT_HEIGHT_NORMAL / 2;
GfxDrawLine(iconcenter, y - WD_MATRIX_TOP, iconcenter, j == list[i].Length() - 1 ? ycenter : y - WD_MATRIX_TOP + delta - 1, linecolour);
GfxDrawLine(iconcenter, ycenter, iconinner, ycenter, linecolour);
} else {
/* Draw expand/collapse icon */
DrawSprite(sel[0] == (int)i ? SPR_CIRCLE_UNFOLDED : SPR_CIRCLE_FOLDED, PAL_NONE, iconleft, y + (FONT_HEIGHT_NORMAL - iconheight) / 2);
}
}
TextColour colour = (sel[0] == (int)i && (uint)sel[1] == j) ? TC_WHITE : TC_BLACK;
/* Get the cargo name. */
SetDParam(0, CargoSpec::Get(refit.cargo)->name);
SetDParam(1, refit.string);
DrawString(textleft, textright, y, STR_JUST_STRING_STRING, colour);
y += delta;
current++;
}
}
}
/** Refit cargo window. */
struct RefitWindow : public Window {
int sel[2]; ///< Index in refit options, sel[0] == -1 if nothing is selected.
RefitOption *cargo; ///< Refit option selected by #sel.
SubtypeList list[NUM_CARGO]; ///< List of refit subtypes available for each sorted cargo.
VehicleOrderID order; ///< If not #INVALID_VEH_ORDER_ID, selection is part of a refit order (rather than execute directly).
uint information_width; ///< Width required for correctly displaying all cargoes in the information panel.
Scrollbar *vscroll; ///< The main scrollbar.
Scrollbar *hscroll; ///< Only used for long vehicles.
int vehicle_width; ///< Width of the vehicle being drawn.
int sprite_left; ///< Left position of the vehicle sprite.
int sprite_right; ///< Right position of the vehicle sprite.
uint vehicle_margin; ///< Margin to use while selecting vehicles when the vehicle image is centered.
int click_x; ///< Position of the first click while dragging.
VehicleID selected_vehicle; ///< First vehicle in the current selection.
uint8 num_vehicles; ///< Number of selected vehicles.
bool auto_refit; ///< Select cargo for auto-refitting.
/**
* Collects all (cargo, subcargo) refit options of a vehicle chain.
*/
void BuildRefitList()
{
for (uint i = 0; i < NUM_CARGO; i++) this->list[i].Clear();
Vehicle *v = Vehicle::Get(this->window_number);
/* Check only the selected vehicles. */
VehicleSet vehicles_to_refit;
GetVehicleSet(vehicles_to_refit, Vehicle::Get(this->selected_vehicle), this->num_vehicles);
do {
if (v->type == VEH_TRAIN && !vehicles_to_refit.Contains(v->index)) continue;
const Engine *e = v->GetEngine();
CargoTypes cmask = e->info.refit_mask;
byte callback_mask = e->info.callback_mask;
/* Skip this engine if it does not carry anything */
if (!e->CanCarryCargo()) continue;
/* Skip this engine if we build the list for auto-refitting and engine doesn't allow it. */
if (this->auto_refit && !HasBit(e->info.misc_flags, EF_AUTO_REFIT)) continue;
/* Loop through all cargoes in the refit mask */
int current_index = 0;
const CargoSpec *cs;
FOR_ALL_SORTED_CARGOSPECS(cs) {
CargoID cid = cs->Index();
/* Skip cargo type if it's not listed */
if (!HasBit(cmask, cid)) {
current_index++;
continue;
}
bool first_vehicle = this->list[current_index].Length() == 0;
if (first_vehicle) {
/* Keeping the current subtype is always an option. It also serves as the option in case of no subtypes */
RefitOption *option = this->list[current_index].Append();
option->cargo = cid;
option->subtype = 0xFF;
option->string = STR_EMPTY;
}
/* Check the vehicle's callback mask for cargo suffixes.
* This is not supported for ordered refits, since subtypes only have a meaning
* for a specific vehicle at a specific point in time, which conflicts with shared orders,
* autoreplace, autorenew, clone, order restoration, ... */
if (this->order == INVALID_VEH_ORDER_ID && HasBit(callback_mask, CBM_VEHICLE_CARGO_SUFFIX)) {
/* Make a note of the original cargo type. It has to be
* changed to test the cargo & subtype... */
CargoID temp_cargo = v->cargo_type;
byte temp_subtype = v->cargo_subtype;
v->cargo_type = cid;
for (uint refit_cyc = 0; refit_cyc < MAX_REFIT_CYCLE; refit_cyc++) {
v->cargo_subtype = refit_cyc;
/* Make sure we don't pick up anything cached. */
v->First()->InvalidateNewGRFCache();
v->InvalidateNewGRFCache();
StringID subtype = GetCargoSubtypeText(v);
if (first_vehicle) {
/* Append new subtype (don't add duplicates though) */
if (subtype == STR_EMPTY) break;
RefitOption option;
option.cargo = cid;
option.subtype = refit_cyc;
option.string = subtype;
this->list[current_index].Include(option);
} else {
/* Intersect the subtypes of earlier vehicles with the subtypes of this vehicle */
if (subtype == STR_EMPTY) {
/* No more subtypes for this vehicle, delete all subtypes >= refit_cyc */
SubtypeList &l = this->list[current_index];
/* 0xFF item is in front, other subtypes are sorted. So just truncate the list in the right spot */
for (uint i = 1; i < l.Length(); i++) {
if (l[i].subtype >= refit_cyc) {
l.Resize(i);
break;
}
}
break;
} else {
/* Check whether the subtype matches with the subtype of earlier vehicles. */
uint pos = 1;
SubtypeList &l = this->list[current_index];
while (pos < l.Length() && l[pos].subtype != refit_cyc) pos++;
if (pos < l.Length() && l[pos].string != subtype) {
/* String mismatch, remove item keeping the order */
l.ErasePreservingOrder(pos);
}
}
}
}
/* Reset the vehicle's cargo type */
v->cargo_type = temp_cargo;
v->cargo_subtype = temp_subtype;
/* And make sure we haven't tainted the cache */
v->First()->InvalidateNewGRFCache();
v->InvalidateNewGRFCache();
}
current_index++;
}
} while (v->IsGroundVehicle() && (v = v->Next()) != NULL);
}
/**
* Refresh scrollbar after selection changed
*/
void RefreshScrollbar()
{
uint scroll_row = 0;
uint row = 0;
for (uint i = 0; i < NUM_CARGO; i++) {
for (uint j = 0; j < this->list[i].Length(); j++) {
const RefitOption &refit = this->list[i][j];
/* Hide subtypes if sel[0] does not match */
if (this->sel[0] != (int)i && refit.subtype != 0xFF) continue;
if (this->sel[0] == (int)i && (uint)this->sel[1] == j) scroll_row = row;
row++;
}
}
this->vscroll->SetCount(row);
if (scroll_row < row) this->vscroll->ScrollTowards(scroll_row);
}
/**
* Select a row.
* @param click_row Clicked row
*/
void SetSelection(uint click_row)
{
uint row = 0;
for (uint i = 0; i < NUM_CARGO; i++) {
for (uint j = 0; j < this->list[i].Length(); j++) {
const RefitOption &refit = this->list[i][j];
/* Hide subtypes if sel[0] does not match */
if (this->sel[0] != (int)i && refit.subtype != 0xFF) continue;
if (row == click_row) {
this->sel[0] = i;
this->sel[1] = j;
return;
}
row++;
}
}
this->sel[0] = -1;
this->sel[1] = 0;
}
/**
* Gets the #RefitOption placed in the selected index.
* @return Pointer to the #RefitOption currently in use.
*/
RefitOption *GetRefitOption()
{
if (this->sel[0] < 0) return NULL;
SubtypeList &l = this->list[this->sel[0]];
if ((uint)this->sel[1] >= l.Length()) return NULL;
return &l[this->sel[1]];
}
RefitWindow(WindowDesc *desc, const Vehicle *v, VehicleOrderID order, bool auto_refit) : Window(desc)
{
this->sel[0] = -1;
this->sel[1] = 0;
this->auto_refit = auto_refit;
this->order = order;
this->CreateNestedTree();
this->vscroll = this->GetScrollbar(WID_VR_SCROLLBAR);
this->hscroll = (v->IsGroundVehicle() ? this->GetScrollbar(WID_VR_HSCROLLBAR) : NULL);
this->GetWidget<NWidgetCore>(WID_VR_SELECT_HEADER)->tool_tip = STR_REFIT_TRAIN_LIST_TOOLTIP + v->type;
this->GetWidget<NWidgetCore>(WID_VR_MATRIX)->tool_tip = STR_REFIT_TRAIN_LIST_TOOLTIP + v->type;
NWidgetCore *nwi = this->GetWidget<NWidgetCore>(WID_VR_REFIT);
nwi->widget_data = STR_REFIT_TRAIN_REFIT_BUTTON + v->type;
nwi->tool_tip = STR_REFIT_TRAIN_REFIT_TOOLTIP + v->type;
this->GetWidget<NWidgetStacked>(WID_VR_SHOW_HSCROLLBAR)->SetDisplayedPlane(v->IsGroundVehicle() ? 0 : SZSP_HORIZONTAL);
this->GetWidget<NWidgetCore>(WID_VR_VEHICLE_PANEL_DISPLAY)->tool_tip = (v->type == VEH_TRAIN) ? STR_REFIT_SELECT_VEHICLES_TOOLTIP : STR_NULL;
this->FinishInitNested(v->index);
this->owner = v->owner;
this->SetWidgetDisabledState(WID_VR_REFIT, this->sel[0] < 0);
}
virtual void OnInit()
{
if (this->cargo != NULL) {
/* Store the RefitOption currently in use. */
RefitOption current_refit_option = *(this->cargo);
/* Rebuild the refit list */
this->BuildRefitList();
this->sel[0] = -1;
this->sel[1] = 0;
this->cargo = NULL;
for (uint i = 0; this->cargo == NULL && i < NUM_CARGO; i++) {
for (uint j = 0; j < list[i].Length(); j++) {
if (list[i][j] == current_refit_option) {
this->sel[0] = i;
this->sel[1] = j;
this->cargo = &list[i][j];
break;
}
}
}
this->SetWidgetDisabledState(WID_VR_REFIT, this->sel[0] < 0);
this->RefreshScrollbar();
} else {
/* Rebuild the refit list */
this->OnInvalidateData(VIWD_CONSIST_CHANGED);
}
}
virtual void OnPaint()
{
/* Determine amount of items for scroller. */
if (this->hscroll != NULL) this->hscroll->SetCount(this->vehicle_width);
/* Calculate sprite position. */
NWidgetCore *vehicle_panel_display = this->GetWidget<NWidgetCore>(WID_VR_VEHICLE_PANEL_DISPLAY);
int sprite_width = max(0, ((int)vehicle_panel_display->current_x - this->vehicle_width) / 2);
this->sprite_left = vehicle_panel_display->pos_x;
this->sprite_right = vehicle_panel_display->pos_x + vehicle_panel_display->current_x - 1;
if (_current_text_dir == TD_RTL) {
this->sprite_right -= sprite_width;
this->vehicle_margin = vehicle_panel_display->current_x - sprite_right;
} else {
this->sprite_left += sprite_width;
this->vehicle_margin = sprite_left;
}
this->DrawWidgets();
}
virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
{
switch (widget) {
case WID_VR_MATRIX:
resize->height = WD_MATRIX_TOP + FONT_HEIGHT_NORMAL + WD_MATRIX_BOTTOM;
size->height = resize->height * 8;
break;
case WID_VR_VEHICLE_PANEL_DISPLAY:
size->height = ScaleGUITrad(GetVehicleHeight(Vehicle::Get(this->window_number)->type));
break;
case WID_VR_INFO:
size->width = WD_FRAMERECT_LEFT + this->information_width + WD_FRAMERECT_RIGHT;
break;
}
}
virtual void SetStringParameters(int widget) const
{
if (widget == WID_VR_CAPTION) SetDParam(0, Vehicle::Get(this->window_number)->index);
}
/**
* Gets the #StringID to use for displaying capacity.
* @param option Cargo and cargo subtype to check for capacity.
* @return INVALID_STRING_ID if there is no capacity. StringID to use in any other case.
* @post String parameters have been set.
*/
StringID GetCapacityString(RefitOption *option) const
{
assert(_current_company == _local_company);
Vehicle *v = Vehicle::Get(this->window_number);
CommandCost cost = DoCommand(v->tile, this->selected_vehicle, option->cargo | option->subtype << 8 | this->num_vehicles << 16 |
(int)this->auto_refit << 24, DC_QUERY_COST, GetCmdRefitVeh(v->type));
if (cost.Failed()) return INVALID_STRING_ID;
SetDParam(0, option->cargo);
SetDParam(1, _returned_refit_capacity);
Money money = cost.GetCost();
if (_returned_mail_refit_capacity > 0) {
SetDParam(2, CT_MAIL);
SetDParam(3, _returned_mail_refit_capacity);
if (this->order != INVALID_VEH_ORDER_ID) {
/* No predictable cost */
return STR_PURCHASE_INFO_AIRCRAFT_CAPACITY;
} else if (money <= 0) {
SetDParam(4, -money);
return STR_REFIT_NEW_CAPACITY_INCOME_FROM_AIRCRAFT_REFIT;
} else {
SetDParam(4, money);
return STR_REFIT_NEW_CAPACITY_COST_OF_AIRCRAFT_REFIT;
}
} else {
if (this->order != INVALID_VEH_ORDER_ID) {
/* No predictable cost */
SetDParam(2, STR_EMPTY);
return STR_PURCHASE_INFO_CAPACITY;
} else if (money <= 0) {
SetDParam(2, -money);
return STR_REFIT_NEW_CAPACITY_INCOME_FROM_REFIT;
} else {
SetDParam(2, money);
return STR_REFIT_NEW_CAPACITY_COST_OF_REFIT;
}
}
}
virtual void DrawWidget(const Rect &r, int widget) const
{
switch (widget) {
case WID_VR_VEHICLE_PANEL_DISPLAY: {
Vehicle *v = Vehicle::Get(this->window_number);
DrawVehicleImage(v, this->sprite_left + WD_FRAMERECT_LEFT, this->sprite_right - WD_FRAMERECT_RIGHT,
r.top + WD_FRAMERECT_TOP, INVALID_VEHICLE, EIT_IN_DETAILS, this->hscroll != NULL ? this->hscroll->GetPosition() : 0);
/* Highlight selected vehicles. */
if (this->order != INVALID_VEH_ORDER_ID) break;
int x = 0;
switch (v->type) {
case VEH_TRAIN: {
VehicleSet vehicles_to_refit;
GetVehicleSet(vehicles_to_refit, Vehicle::Get(this->selected_vehicle), this->num_vehicles);
int left = INT32_MIN;
int width = 0;
for (Train *u = Train::From(v); u != NULL; u = u->Next()) {
/* Start checking. */
if (vehicles_to_refit.Contains(u->index) && left == INT32_MIN) {
left = x - this->hscroll->GetPosition() + r.left + this->vehicle_margin;
width = 0;
}
/* Draw a selection. */
if ((!vehicles_to_refit.Contains(u->index) || u->Next() == NULL) && left != INT32_MIN) {
if (u->Next() == NULL && vehicles_to_refit.Contains(u->index)) {
int current_width = u->GetDisplayImageWidth();
width += current_width;
x += current_width;
}
int right = Clamp(left + width, 0, r.right);
left = max(0, left);
if (_current_text_dir == TD_RTL) {
right = this->GetWidget<NWidgetCore>(WID_VR_VEHICLE_PANEL_DISPLAY)->current_x - left;
left = right - width;
}
if (left != right) {
DrawFrameRect(left, r.top + WD_FRAMERECT_TOP, right, r.top + WD_FRAMERECT_TOP + ScaleGUITrad(14) - 1, COLOUR_WHITE, FR_BORDERONLY);
}
left = INT32_MIN;
}
int current_width = u->GetDisplayImageWidth();
width += current_width;
x += current_width;
}
break;
}
default: break;
}
break;
}
case WID_VR_MATRIX:
DrawVehicleRefitWindow(this->list, this->sel, this->vscroll->GetPosition(), this->vscroll->GetCapacity(), this->resize.step_height, r);
break;
case WID_VR_INFO:
if (this->cargo != NULL) {
StringID string = this->GetCapacityString(this->cargo);
if (string != INVALID_STRING_ID) {
DrawStringMultiLine(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT,
r.top + WD_FRAMERECT_TOP, r.bottom - WD_FRAMERECT_BOTTOM, string);
}
}
break;
}
}
/**
* Some data on this window has become invalid.
* @param data Information about the changed data.
* @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
*/
virtual void OnInvalidateData(int data = 0, bool gui_scope = true)
{
switch (data) {
case VIWD_AUTOREPLACE: // Autoreplace replaced the vehicle; selected_vehicle became invalid.
case VIWD_CONSIST_CHANGED: { // The consist has changed; rebuild the entire list.
/* Clear the selection. */
Vehicle *v = Vehicle::Get(this->window_number);
this->selected_vehicle = v->index;
this->num_vehicles = UINT8_MAX;
FALLTHROUGH;
}
case 2: { // The vehicle selection has changed; rebuild the entire list.
if (!gui_scope) break;
this->BuildRefitList();
/* The vehicle width has changed too. */
this->vehicle_width = GetVehicleWidth(Vehicle::Get(this->window_number), EIT_IN_DETAILS);
uint max_width = 0;
/* Check the width of all cargo information strings. */
for (uint i = 0; i < NUM_CARGO; i++) {
for (uint j = 0; j < this->list[i].Length(); j++) {
StringID string = this->GetCapacityString(&list[i][j]);
if (string != INVALID_STRING_ID) {
Dimension dim = GetStringBoundingBox(string);
max_width = max(dim.width, max_width);
}
}
}
if (this->information_width < max_width) {
this->information_width = max_width;
this->ReInit();
}
FALLTHROUGH;
}
case 1: // A new cargo has been selected.
if (!gui_scope) break;
this->cargo = GetRefitOption();
this->RefreshScrollbar();
break;
}
}
int GetClickPosition(int click_x)
{
const NWidgetCore *matrix_widget = this->GetWidget<NWidgetCore>(WID_VR_VEHICLE_PANEL_DISPLAY);
if (_current_text_dir == TD_RTL) click_x = matrix_widget->current_x - click_x;
click_x -= this->vehicle_margin;
if (this->hscroll != NULL) click_x += this->hscroll->GetPosition();
return click_x;
}
void SetSelectedVehicles(int drag_x)
{
drag_x = GetClickPosition(drag_x);
int left_x = min(this->click_x, drag_x);
int right_x = max(this->click_x, drag_x);
this->num_vehicles = 0;
Vehicle *v = Vehicle::Get(this->window_number);
/* Find the vehicle part that was clicked. */
switch (v->type) {
case VEH_TRAIN: {
/* Don't select anything if we are not clicking in the vehicle. */
if (left_x >= 0) {
const Train *u = Train::From(v);
bool start_counting = false;
for (; u != NULL; u = u->Next()) {
int current_width = u->GetDisplayImageWidth();
left_x -= current_width;
right_x -= current_width;
if (left_x < 0 && !start_counting) {
this->selected_vehicle = u->index;
start_counting = true;
/* Count the first vehicle, even if articulated part */
this->num_vehicles++;
} else if (start_counting && !u->IsArticulatedPart()) {
/* Do not count articulated parts */
this->num_vehicles++;
}
if (right_x < 0) break;
}
}
/* If the selection is not correct, clear it. */
if (this->num_vehicles != 0) {
if (_ctrl_pressed) this->num_vehicles = UINT8_MAX;
break;
}
FALLTHROUGH;
}
default:
/* Clear the selection. */
this->selected_vehicle = v->index;
this->num_vehicles = UINT8_MAX;
break;
}
}
virtual void OnClick(Point pt, int widget, int click_count)
{
switch (widget) {
case WID_VR_VEHICLE_PANEL_DISPLAY: { // Vehicle image.
if (this->order != INVALID_VEH_ORDER_ID) break;
NWidgetBase *nwi = this->GetWidget<NWidgetBase>(WID_VR_VEHICLE_PANEL_DISPLAY);
this->click_x = GetClickPosition(pt.x - nwi->pos_x);
this->SetSelectedVehicles(pt.x - nwi->pos_x);
this->SetWidgetDirty(WID_VR_VEHICLE_PANEL_DISPLAY);
if (!_ctrl_pressed) {
SetObjectToPlaceWnd(SPR_CURSOR_MOUSE, PAL_NONE, HT_DRAG, this);
} else {
/* The vehicle selection has changed. */
this->InvalidateData(2);
}
break;
}
case WID_VR_MATRIX: { // listbox
this->SetSelection(this->vscroll->GetScrolledRowFromWidget(pt.y, this, WID_VR_MATRIX));
this->SetWidgetDisabledState(WID_VR_REFIT, this->sel[0] < 0);
this->InvalidateData(1);
if (click_count == 1) break;
FALLTHROUGH;
}
case WID_VR_REFIT: // refit button
if (this->cargo != NULL) {
const Vehicle *v = Vehicle::Get(this->window_number);
if (this->order == INVALID_VEH_ORDER_ID) {
bool delete_window = this->selected_vehicle == v->index && this->num_vehicles == UINT8_MAX;
if (DoCommandP(v->tile, this->selected_vehicle, this->cargo->cargo | this->cargo->subtype << 8 | this->num_vehicles << 16, GetCmdRefitVeh(v)) && delete_window) delete this;
} else {
if (DoCommandP(v->tile, v->index, this->cargo->cargo | this->order << 16, CMD_ORDER_REFIT)) delete this;
}
}
break;
}
}
virtual void OnMouseDrag(Point pt, int widget)
{
switch (widget) {
case WID_VR_VEHICLE_PANEL_DISPLAY: { // Vehicle image.
if (this->order != INVALID_VEH_ORDER_ID) break;
NWidgetBase *nwi = this->GetWidget<NWidgetBase>(WID_VR_VEHICLE_PANEL_DISPLAY);
this->SetSelectedVehicles(pt.x - nwi->pos_x);
this->SetWidgetDirty(WID_VR_VEHICLE_PANEL_DISPLAY);
break;
}
}
}
virtual void OnDragDrop(Point pt, int widget)
{
switch (widget) {
case WID_VR_VEHICLE_PANEL_DISPLAY: { // Vehicle image.
if (this->order != INVALID_VEH_ORDER_ID) break;
NWidgetBase *nwi = this->GetWidget<NWidgetBase>(WID_VR_VEHICLE_PANEL_DISPLAY);
this->SetSelectedVehicles(pt.x - nwi->pos_x);
this->InvalidateData(2);
break;
}
}
}
virtual void OnResize()
{
this->vehicle_width = GetVehicleWidth(Vehicle::Get(this->window_number), EIT_IN_DETAILS);
this->vscroll->SetCapacityFromWidget(this, WID_VR_MATRIX);
if (this->hscroll != NULL) this->hscroll->SetCapacityFromWidget(this, WID_VR_VEHICLE_PANEL_DISPLAY);
}
};
static const NWidgetPart _nested_vehicle_refit_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY, WID_VR_CAPTION), SetDataTip(STR_REFIT_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_DEFSIZEBOX, COLOUR_GREY),
EndContainer(),
/* Vehicle display + scrollbar. */
NWidget(NWID_VERTICAL),
NWidget(WWT_PANEL, COLOUR_GREY, WID_VR_VEHICLE_PANEL_DISPLAY), SetMinimalSize(228, 14), SetResize(1, 0), SetScrollbar(WID_VR_HSCROLLBAR), EndContainer(),
NWidget(NWID_SELECTION, INVALID_COLOUR, WID_VR_SHOW_HSCROLLBAR),
NWidget(NWID_HSCROLLBAR, COLOUR_GREY, WID_VR_HSCROLLBAR),
EndContainer(),
EndContainer(),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_VR_SELECT_HEADER), SetDataTip(STR_REFIT_TITLE, STR_NULL), SetResize(1, 0),
/* Matrix + scrollbar. */
NWidget(NWID_HORIZONTAL),
NWidget(WWT_MATRIX, COLOUR_GREY, WID_VR_MATRIX), SetMinimalSize(228, 112), SetResize(1, 14), SetFill(1, 1), SetMatrixDataTip(1, 0, STR_NULL), SetScrollbar(WID_VR_SCROLLBAR),
NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_VR_SCROLLBAR),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY, WID_VR_INFO), SetMinimalTextLines(2, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM), SetResize(1, 0), EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_VR_REFIT), SetFill(1, 0), SetResize(1, 0),
NWidget(WWT_RESIZEBOX, COLOUR_GREY),
EndContainer(),
};
static WindowDesc _vehicle_refit_desc(
WDP_AUTO, "view_vehicle_refit", 240, 174,
WC_VEHICLE_REFIT, WC_VEHICLE_VIEW,
WDF_CONSTRUCTION,
_nested_vehicle_refit_widgets, lengthof(_nested_vehicle_refit_widgets)
);
/**
* Show the refit window for a vehicle
* @param *v The vehicle to show the refit window for
* @param order of the vehicle to assign refit to, or INVALID_VEH_ORDER_ID to refit the vehicle now
* @param parent the parent window of the refit window
* @param auto_refit Choose cargo for auto-refitting
*/
void ShowVehicleRefitWindow(const Vehicle *v, VehicleOrderID order, Window *parent, bool auto_refit)
{
DeleteWindowById(WC_VEHICLE_REFIT, v->index);
RefitWindow *w = new RefitWindow(&_vehicle_refit_desc, v, order, auto_refit);
w->parent = parent;
}
/** Display list of cargo types of the engine, for the purchase information window */
uint ShowRefitOptionsList(int left, int right, int y, EngineID engine)
{
/* List of cargo types of this engine */
CargoTypes cmask = GetUnionOfArticulatedRefitMasks(engine, false);
/* List of cargo types available in this climate */
CargoTypes lmask = _cargo_mask;
/* Draw nothing if the engine is not refittable */
if (HasAtMostOneBit(cmask)) return y;
if (cmask == lmask) {
/* Engine can be refitted to all types in this climate */
SetDParam(0, STR_PURCHASE_INFO_ALL_TYPES);
} else {
/* Check if we are able to refit to more cargo types and unable to. If
* so, invert the cargo types to list those that we can't refit to. */
if (CountBits(cmask ^ lmask) < CountBits(cmask) && CountBits(cmask ^ lmask) <= 7) {
cmask ^= lmask;
SetDParam(0, STR_PURCHASE_INFO_ALL_BUT);
} else {
SetDParam(0, STR_JUST_CARGO_LIST);
}
SetDParam(1, cmask);
}
return DrawStringMultiLine(left, right, y, INT32_MAX, STR_PURCHASE_INFO_REFITTABLE_TO);
}
/** Get the cargo subtype text from NewGRF for the vehicle details window. */
StringID GetCargoSubtypeText(const Vehicle *v)
{
if (HasBit(EngInfo(v->engine_type)->callback_mask, CBM_VEHICLE_CARGO_SUFFIX)) {
uint16 cb = GetVehicleCallback(CBID_VEHICLE_CARGO_SUFFIX, 0, 0, v->engine_type, v);
if (cb != CALLBACK_FAILED) {
if (cb > 0x400) ErrorUnknownCallbackResult(v->GetGRFID(), CBID_VEHICLE_CARGO_SUFFIX, cb);
if (cb >= 0x400 || (v->GetGRF()->grf_version < 8 && cb == 0xFF)) cb = CALLBACK_FAILED;
}
if (cb != CALLBACK_FAILED) {
return GetGRFStringID(v->GetGRFID(), 0xD000 + cb);
}
}
return STR_EMPTY;
}
/** Sort vehicles by their number */
static int CDECL VehicleNumberSorter(const Vehicle * const *a, const Vehicle * const *b)
{
return (*a)->unitnumber - (*b)->unitnumber;
}
/** Sort vehicles by their name */
static int CDECL VehicleNameSorter(const Vehicle * const *a, const Vehicle * const *b)
{
static char last_name[2][64];
if (*a != _last_vehicle[0]) {
_last_vehicle[0] = *a;
SetDParam(0, (*a)->index);
GetString(last_name[0], STR_VEHICLE_NAME, lastof(last_name[0]));
}
if (*b != _last_vehicle[1]) {
_last_vehicle[1] = *b;
SetDParam(0, (*b)->index);
GetString(last_name[1], STR_VEHICLE_NAME, lastof(last_name[1]));
}
int r = strnatcmp(last_name[0], last_name[1]); // Sort by name (natural sorting).
return (r != 0) ? r : VehicleNumberSorter(a, b);
}
/** Sort vehicles by their age */
static int CDECL VehicleAgeSorter(const Vehicle * const *a, const Vehicle * const *b)
{
int r = (*a)->age - (*b)->age;
return (r != 0) ? r : VehicleNumberSorter(a, b);
}
/** Sort vehicles by this year profit */
static int CDECL VehicleProfitThisYearSorter(const Vehicle * const *a, const Vehicle * const *b)
{
int r = ClampToI32((*a)->GetDisplayProfitThisYear() - (*b)->GetDisplayProfitThisYear());
return (r != 0) ? r : VehicleNumberSorter(a, b);
}
/** Sort vehicles by last year profit */
static int CDECL VehicleProfitLastYearSorter(const Vehicle * const *a, const Vehicle * const *b)
{
int r = ClampToI32((*a)->GetDisplayProfitLastYear() - (*b)->GetDisplayProfitLastYear());
return (r != 0) ? r : VehicleNumberSorter(a, b);
}
/** Sort vehicles by their cargo */
static int CDECL VehicleCargoSorter(const Vehicle * const *a, const Vehicle * const *b)
{
const Vehicle *v;
CargoArray diff;
/* Append the cargo of the connected waggons */
for (v = *a; v != NULL; v = v->Next()) diff[v->cargo_type] += v->cargo_cap;
for (v = *b; v != NULL; v = v->Next()) diff[v->cargo_type] -= v->cargo_cap;
int r = 0;
for (CargoID i = 0; i < NUM_CARGO; i++) {
r = diff[i];
if (r != 0) break;
}
return (r != 0) ? r : VehicleNumberSorter(a, b);
}
/** Sort vehicles by their reliability */
static int CDECL VehicleReliabilitySorter(const Vehicle * const *a, const Vehicle * const *b)
{
int r = (*a)->reliability - (*b)->reliability;
return (r != 0) ? r : VehicleNumberSorter(a, b);
}
/** Sort vehicles by their max speed */
static int CDECL VehicleMaxSpeedSorter(const Vehicle * const *a, const Vehicle * const *b)
{
int r = (*a)->vcache.cached_max_speed - (*b)->vcache.cached_max_speed;
return (r != 0) ? r : VehicleNumberSorter(a, b);
}
/** Sort vehicles by model */
static int CDECL VehicleModelSorter(const Vehicle * const *a, const Vehicle * const *b)
{
int r = (*a)->engine_type - (*b)->engine_type;
return (r != 0) ? r : VehicleNumberSorter(a, b);
}
/** Sort vehicles by their value */
static int CDECL VehicleValueSorter(const Vehicle * const *a, const Vehicle * const *b)
{
const Vehicle *u;
Money diff = 0;
for (u = *a; u != NULL; u = u->Next()) diff += u->value;
for (u = *b; u != NULL; u = u->Next()) diff -= u->value;
int r = ClampToI32(diff);
return (r != 0) ? r : VehicleNumberSorter(a, b);
}
/** Sort vehicles by their length */
static int CDECL VehicleLengthSorter(const Vehicle * const *a, const Vehicle * const *b)
{
int r = (*a)->GetGroundVehicleCache()->cached_total_length - (*b)->GetGroundVehicleCache()->cached_total_length;
return (r != 0) ? r : VehicleNumberSorter(a, b);
}
/** Sort vehicles by the time they can still live */
static int CDECL VehicleTimeToLiveSorter(const Vehicle * const *a, const Vehicle * const *b)
{
int r = ClampToI32(((*a)->max_age - (*a)->age) - ((*b)->max_age - (*b)->age));
return (r != 0) ? r : VehicleNumberSorter(a, b);
}
/** Sort vehicles by the timetable delay */
static int CDECL VehicleTimetableDelaySorter(const Vehicle * const *a, const Vehicle * const *b)
{
int r = (*a)->lateness_counter - (*b)->lateness_counter;
return (r != 0) ? r : VehicleNumberSorter(a, b);
}
void InitializeGUI()
{
MemSetT(&_sorting, 0);
}
/**
* Assign a vehicle window a new vehicle
* @param window_class WindowClass to search for
* @param from_index the old vehicle ID
* @param to_index the new vehicle ID
*/
static inline void ChangeVehicleWindow(WindowClass window_class, VehicleID from_index, VehicleID to_index)
{
Window *w = FindWindowById(window_class, from_index);
if (w != NULL) {
/* Update window_number */
w->window_number = to_index;
if (w->viewport != NULL) w->viewport->follow_vehicle = to_index;
/* Update vehicle drag data */
if (_thd.window_class == window_class && _thd.window_number == (WindowNumber)from_index) {
_thd.window_number = to_index;
}
/* Notify the window. */
w->InvalidateData(VIWD_AUTOREPLACE, false);
}
}
/**
* Report a change in vehicle IDs (due to autoreplace) to affected vehicle windows.
* @param from_index the old vehicle ID
* @param to_index the new vehicle ID
*/
void ChangeVehicleViewWindow(VehicleID from_index, VehicleID to_index)
{
ChangeVehicleWindow(WC_VEHICLE_VIEW, from_index, to_index);
ChangeVehicleWindow(WC_VEHICLE_ORDERS, from_index, to_index);
ChangeVehicleWindow(WC_VEHICLE_REFIT, from_index, to_index);
ChangeVehicleWindow(WC_VEHICLE_DETAILS, from_index, to_index);
ChangeVehicleWindow(WC_VEHICLE_TIMETABLE, from_index, to_index);
}
static const NWidgetPart _nested_vehicle_list[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY, WID_VL_CAPTION),
NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_DEFSIZEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_VL_SORT_ORDER), SetMinimalSize(81, 12), SetFill(0, 1), SetDataTip(STR_BUTTON_SORT_BY, STR_TOOLTIP_SORT_ORDER),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_VL_SORT_BY_PULLDOWN), SetMinimalSize(167, 12), SetFill(0, 1), SetDataTip(0x0, STR_TOOLTIP_SORT_CRITERIA),
NWidget(WWT_PANEL, COLOUR_GREY), SetMinimalSize(12, 12), SetFill(1, 1), SetResize(1, 0),
EndContainer(),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_MATRIX, COLOUR_GREY, WID_VL_LIST), SetMinimalSize(248, 0), SetFill(1, 0), SetResize(1, 1), SetMatrixDataTip(1, 0, STR_NULL), SetScrollbar(WID_VL_SCROLLBAR),
NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_VL_SCROLLBAR),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(NWID_SELECTION, INVALID_COLOUR, WID_VL_HIDE_BUTTONS),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_VL_AVAILABLE_VEHICLES), SetMinimalSize(106, 12), SetFill(0, 1),
SetDataTip(STR_BLACK_STRING, STR_VEHICLE_LIST_AVAILABLE_ENGINES_TOOLTIP),
NWidget(WWT_PANEL, COLOUR_GREY), SetMinimalSize(0, 12), SetResize(1, 0), SetFill(1, 1), EndContainer(),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_VL_MANAGE_VEHICLES_DROPDOWN), SetMinimalSize(118, 12), SetFill(0, 1),
SetDataTip(STR_VEHICLE_LIST_MANAGE_LIST, STR_VEHICLE_LIST_MANAGE_LIST_TOOLTIP),
NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, WID_VL_STOP_ALL), SetMinimalSize(12, 12), SetFill(0, 1),
SetDataTip(SPR_FLAG_VEH_STOPPED, STR_VEHICLE_LIST_MASS_STOP_LIST_TOOLTIP),
NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, WID_VL_START_ALL), SetMinimalSize(12, 12), SetFill(0, 1),
SetDataTip(SPR_FLAG_VEH_RUNNING, STR_VEHICLE_LIST_MASS_START_LIST_TOOLTIP),
EndContainer(),
/* Widget to be shown for other companies hiding the previous 5 widgets. */
NWidget(WWT_PANEL, COLOUR_GREY), SetFill(1, 1), SetResize(1, 0), EndContainer(),
EndContainer(),
NWidget(WWT_RESIZEBOX, COLOUR_GREY),
EndContainer(),
};
static void DrawSmallOrderList(const Vehicle *v, int left, int right, int y, VehicleOrderID start = 0)
{
const Order *order = v->GetOrder(start);
if (order == NULL) return;
bool rtl = _current_text_dir == TD_RTL;
int l_offset = rtl ? 0 : ScaleGUITrad(6);
int r_offset = rtl ? ScaleGUITrad(6) : 0;
int i = 0;
VehicleOrderID oid = start;
do {
if (oid == v->cur_real_order_index) DrawString(left, right, y, STR_TINY_RIGHT_ARROW, TC_BLACK);
if (order->IsType(OT_GOTO_STATION)) {
SetDParam(0, order->GetDestination());
DrawString(left + l_offset, right - r_offset, y, STR_TINY_BLACK_STATION);
y += FONT_HEIGHT_SMALL;
if (++i == 4) break;
}
oid++;
order = order->next;
if (order == NULL) {
order = v->orders.list->GetFirstOrder();
oid = 0;
}
} while (oid != start);
}
/**
* Draws an image of a vehicle chain
* @param v Front vehicle
* @param left The minimum horizontal position
* @param right The maximum horizontal position
* @param y Vertical position to draw at
* @param selection Selected vehicle to draw a frame around
* @param skip Number of pixels to skip at the front (for scrolling)
*/
void DrawVehicleImage(const Vehicle *v, int left, int right, int y, VehicleID selection, EngineImageType image_type, int skip)
{
switch (v->type) {
case VEH_TRAIN: DrawTrainImage(Train::From(v), left, right, y, selection, image_type, skip); break;
case VEH_ROAD: DrawRoadVehImage(v, left, right, y, selection, image_type, skip); break;
case VEH_SHIP: DrawShipImage(v, left, right, y, selection, image_type); break;
case VEH_AIRCRAFT: DrawAircraftImage(v, left, right, y, selection, image_type); break;
default: NOT_REACHED();
}
}
/**
* Get the height of a vehicle in the vehicle list GUIs.
* @param type the vehicle type to look at
* @param divisor the resulting height must be dividable by this
* @return the height
*/
uint GetVehicleListHeight(VehicleType type, uint divisor)
{
/* Name + vehicle + profit */
uint base = ScaleGUITrad(GetVehicleHeight(type)) + 2 * FONT_HEIGHT_SMALL;
/* Drawing of the 4 small orders + profit*/
if (type >= VEH_SHIP) base = max(base, 5U * FONT_HEIGHT_SMALL);
if (divisor == 1) return base;
/* Make sure the height is dividable by divisor */
uint rem = base % divisor;
return base + (rem == 0 ? 0 : divisor - rem);
}
/**
* Draw all the vehicle list items.
* @param selected_vehicle The vehicle that is to be highlighted.
* @param line_height Height of a single item line.
* @param r Rectangle with edge positions of the matrix widget.
*/
void BaseVehicleListWindow::DrawVehicleListItems(VehicleID selected_vehicle, int line_height, const Rect &r) const
{
int left = r.left + WD_MATRIX_LEFT;
int right = r.right - WD_MATRIX_RIGHT;
int width = right - left;
bool rtl = _current_text_dir == TD_RTL;
int text_offset = max<int>(GetSpriteSize(SPR_PROFIT_LOT).width, GetDigitWidth() * this->unitnumber_digits) + WD_FRAMERECT_RIGHT;
int text_left = left + (rtl ? 0 : text_offset);
int text_right = right - (rtl ? text_offset : 0);
bool show_orderlist = this->vli.vtype >= VEH_SHIP;
int orderlist_left = left + (rtl ? 0 : max(ScaleGUITrad(100) + text_offset, width / 2));
int orderlist_right = right - (rtl ? max(ScaleGUITrad(100) + text_offset, width / 2) : 0);
int image_left = (rtl && show_orderlist) ? orderlist_right : text_left;
int image_right = (!rtl && show_orderlist) ? orderlist_left : text_right;
int vehicle_button_x = rtl ? right - GetSpriteSize(SPR_PROFIT_LOT).width : left;
int y = r.top;
uint max = min(this->vscroll->GetPosition() + this->vscroll->GetCapacity(), this->vehicles.Length());
for (uint i = this->vscroll->GetPosition(); i < max; ++i) {
const Vehicle *v = this->vehicles[i];
StringID str;
SetDParam(0, v->GetDisplayProfitThisYear());
SetDParam(1, v->GetDisplayProfitLastYear());
DrawVehicleImage(v, image_left, image_right, y + FONT_HEIGHT_SMALL - 1, selected_vehicle, EIT_IN_LIST, 0);
DrawString(text_left, text_right, y + line_height - FONT_HEIGHT_SMALL - WD_FRAMERECT_BOTTOM - 1, STR_VEHICLE_LIST_PROFIT_THIS_YEAR_LAST_YEAR);
if (v->name != NULL) {
/* The vehicle got a name so we will print it */
SetDParam(0, v->index);
DrawString(text_left, text_right, y, STR_TINY_BLACK_VEHICLE);
} else if (v->group_id != DEFAULT_GROUP) {
/* The vehicle has no name, but is member of a group, so print group name */
SetDParam(0, v->group_id);
DrawString(text_left, text_right, y, STR_TINY_GROUP, TC_BLACK);
}
if (show_orderlist) DrawSmallOrderList(v, orderlist_left, orderlist_right, y, v->cur_real_order_index);
if (v->IsChainInDepot()) {
str = STR_BLUE_COMMA;
} else {
str = (v->age > v->max_age - DAYS_IN_LEAP_YEAR) ? STR_RED_COMMA : STR_BLACK_COMMA;
}
SetDParam(0, v->unitnumber);
DrawString(left, right, y + 2, str);
DrawVehicleProfitButton(v, vehicle_button_x, y + FONT_HEIGHT_NORMAL + 3);
y += line_height;
}
}
/**
* Window for the (old) vehicle listing.
*
* bitmask for w->window_number
* 0-7 CompanyID (owner)
* 8-10 window type (use flags in vehicle_gui.h)
* 11-15 vehicle type (using VEH_, but can be compressed to fewer bytes if needed)
* 16-31 StationID or OrderID depending on window type (bit 8-10)
*/
struct VehicleListWindow : public BaseVehicleListWindow {
private:
/** Enumeration of planes of the button row at the bottom. */
enum ButtonPlanes {
BP_SHOW_BUTTONS, ///< Show the buttons.
BP_HIDE_BUTTONS, ///< Show the empty panel.
};
public:
VehicleListWindow(WindowDesc *desc, WindowNumber window_number) : BaseVehicleListWindow(desc, window_number)
{
/* Set up sorting. Make the window-specific _sorting variable
* point to the correct global _sorting struct so we are freed
* from having conditionals during window operation */
switch (this->vli.vtype) {
case VEH_TRAIN: this->sorting = &_sorting.train; break;
case VEH_ROAD: this->sorting = &_sorting.roadveh; break;
case VEH_SHIP: this->sorting = &_sorting.ship; break;
case VEH_AIRCRAFT: this->sorting = &_sorting.aircraft; break;
default: NOT_REACHED();
}
this->CreateNestedTree();
this->vscroll = this->GetScrollbar(WID_VL_SCROLLBAR);
this->vehicles.SetListing(*this->sorting);
this->vehicles.ForceRebuild();
this->vehicles.NeedResort();
this->BuildVehicleList();
this->SortVehicleList();
/* Set up the window widgets */
this->GetWidget<NWidgetCore>(WID_VL_LIST)->tool_tip = STR_VEHICLE_LIST_TRAIN_LIST_TOOLTIP + this->vli.vtype;
if (this->vli.type == VL_SHARED_ORDERS) {
this->GetWidget<NWidgetCore>(WID_VL_CAPTION)->widget_data = STR_VEHICLE_LIST_SHARED_ORDERS_LIST_CAPTION;
} else {
this->GetWidget<NWidgetCore>(WID_VL_CAPTION)->widget_data = STR_VEHICLE_LIST_TRAIN_CAPTION + this->vli.vtype;
}
this->FinishInitNested(window_number);
if (this->vli.company != OWNER_NONE) this->owner = this->vli.company;
}
~VehicleListWindow()
{
*this->sorting = this->vehicles.GetListing();
}
virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
{
switch (widget) {
case WID_VL_LIST:
resize->height = GetVehicleListHeight(this->vli.vtype, 1);
switch (this->vli.vtype) {
case VEH_TRAIN:
case VEH_ROAD:
size->height = 6 * resize->height;
break;
case VEH_SHIP:
case VEH_AIRCRAFT:
size->height = 4 * resize->height;
break;
default: NOT_REACHED();
}
break;
case WID_VL_SORT_ORDER: {
Dimension d = GetStringBoundingBox(this->GetWidget<NWidgetCore>(widget)->widget_data);
d.width += padding.width + Window::SortButtonWidth() * 2; // Doubled since the string is centred and it also looks better.
d.height += padding.height;
*size = maxdim(*size, d);
break;
}
case WID_VL_MANAGE_VEHICLES_DROPDOWN: {
Dimension d = this->GetActionDropdownSize(this->vli.type == VL_STANDARD, false);
d.height += padding.height;
d.width += padding.width;
*size = maxdim(*size, d);
break;
}
}
}
virtual void SetStringParameters(int widget) const
{
switch (widget) {
case WID_VL_AVAILABLE_VEHICLES:
SetDParam(0, STR_VEHICLE_LIST_AVAILABLE_TRAINS + this->vli.vtype);
break;
case WID_VL_CAPTION: {
switch (this->vli.type) {
case VL_SHARED_ORDERS: // Shared Orders
if (this->vehicles.Length() == 0) {
/* We can't open this window without vehicles using this order
* and we should close the window when deleting the order. */
NOT_REACHED();
}
SetDParam(0, this->vscroll->GetCount());
break;
case VL_STANDARD: // Company Name
SetDParam(0, STR_COMPANY_NAME);
SetDParam(1, this->vli.index);
SetDParam(3, this->vscroll->GetCount());
break;
case VL_STATION_LIST: // Station/Waypoint Name
SetDParam(0, Station::IsExpected(BaseStation::Get(this->vli.index)) ? STR_STATION_NAME : STR_WAYPOINT_NAME);
SetDParam(1, this->vli.index);
SetDParam(3, this->vscroll->GetCount());
break;
case VL_DEPOT_LIST:
SetDParam(0, STR_DEPOT_CAPTION);
SetDParam(1, this->vli.vtype);
SetDParam(2, this->vli.index);
SetDParam(3, this->vscroll->GetCount());
break;
default: NOT_REACHED();
}
break;
}
}
}
virtual void DrawWidget(const Rect &r, int widget) const
{
switch (widget) {
case WID_VL_SORT_ORDER:
/* draw arrow pointing up/down for ascending/descending sorting */
this->DrawSortButtonState(widget, this->vehicles.IsDescSortOrder() ? SBS_DOWN : SBS_UP);
break;
case WID_VL_LIST:
this->DrawVehicleListItems(INVALID_VEHICLE, this->resize.step_height, r);
break;
}
}
virtual void OnPaint()
{
this->BuildVehicleList();
this->SortVehicleList();
if (this->vehicles.Length() == 0 && this->IsWidgetLowered(WID_VL_MANAGE_VEHICLES_DROPDOWN)) {
HideDropDownMenu(this);
}
/* Hide the widgets that we will not use in this window
* Some windows contains actions only fit for the owner */
int plane_to_show = (this->owner == _local_company) ? BP_SHOW_BUTTONS : BP_HIDE_BUTTONS;
NWidgetStacked *nwi = this->GetWidget<NWidgetStacked>(WID_VL_HIDE_BUTTONS);
if (plane_to_show != nwi->shown_plane) {
nwi->SetDisplayedPlane(plane_to_show);
nwi->SetDirty(this);
}
if (this->owner == _local_company) {
this->SetWidgetDisabledState(WID_VL_AVAILABLE_VEHICLES, this->vli.type != VL_STANDARD);
this->SetWidgetsDisabledState(this->vehicles.Length() == 0,
WID_VL_MANAGE_VEHICLES_DROPDOWN,
WID_VL_STOP_ALL,
WID_VL_START_ALL,
WIDGET_LIST_END);
}
/* Set text of sort by dropdown widget. */
this->GetWidget<NWidgetCore>(WID_VL_SORT_BY_PULLDOWN)->widget_data = this->vehicle_sorter_names[this->vehicles.SortType()];
this->DrawWidgets();
}
virtual void OnClick(Point pt, int widget, int click_count)
{
switch (widget) {
case WID_VL_SORT_ORDER: // Flip sorting method ascending/descending
this->vehicles.ToggleSortOrder();
this->SetDirty();
break;
case WID_VL_SORT_BY_PULLDOWN:// Select sorting criteria dropdown menu
ShowDropDownMenu(this, this->vehicle_sorter_names, this->vehicles.SortType(), WID_VL_SORT_BY_PULLDOWN, 0,
(this->vli.vtype == VEH_TRAIN || this->vli.vtype == VEH_ROAD) ? 0 : (1 << 10));
return;
case WID_VL_LIST: { // Matrix to show vehicles
uint id_v = this->vscroll->GetScrolledRowFromWidget(pt.y, this, WID_VL_LIST);
if (id_v >= this->vehicles.Length()) return; // click out of list bound
const Vehicle *v = this->vehicles[id_v];
if (!VehicleClicked(v)) ShowVehicleViewWindow(v);
break;
}
case WID_VL_AVAILABLE_VEHICLES:
ShowBuildVehicleWindow(INVALID_TILE, this->vli.vtype);
break;
case WID_VL_MANAGE_VEHICLES_DROPDOWN: {
DropDownList *list = this->BuildActionDropdownList(VehicleListIdentifier::UnPack(this->window_number).type == VL_STANDARD, false);
ShowDropDownList(this, list, 0, WID_VL_MANAGE_VEHICLES_DROPDOWN);
break;
}
case WID_VL_STOP_ALL:
case WID_VL_START_ALL:
DoCommandP(0, (1 << 1) | (widget == WID_VL_START_ALL ? (1 << 0) : 0), this->window_number, CMD_MASS_START_STOP);
break;
}
}
virtual void OnDropdownSelect(int widget, int index)
{
switch (widget) {
case WID_VL_SORT_BY_PULLDOWN:
this->vehicles.SetSortType(index);
break;
case WID_VL_MANAGE_VEHICLES_DROPDOWN:
assert(this->vehicles.Length() != 0);
switch (index) {
case ADI_REPLACE: // Replace window
ShowReplaceGroupVehicleWindow(ALL_GROUP, this->vli.vtype);
break;
case ADI_SERVICE: // Send for servicing
case ADI_DEPOT: // Send to Depots
DoCommandP(0, DEPOT_MASS_SEND | (index == ADI_SERVICE ? DEPOT_SERVICE : (DepotCommand)0), this->window_number, GetCmdSendToDepot(this->vli.vtype));
break;
default: NOT_REACHED();
}
break;
default: NOT_REACHED();
}
this->SetDirty();
}
virtual void OnGameTick()
{
if (this->vehicles.NeedResort()) {
StationID station = (this->vli.type == VL_STATION_LIST) ? this->vli.index : INVALID_STATION;
DEBUG(misc, 3, "Periodic resort %d list company %d at station %d", this->vli.vtype, this->owner, station);
this->SetDirty();
}
}
virtual void OnResize()
{
this->vscroll->SetCapacityFromWidget(this, WID_VL_LIST);
}
/**
* Some data on this window has become invalid.
* @param data Information about the changed data.
* @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
*/
virtual void OnInvalidateData(int data = 0, bool gui_scope = true)
{
if (!gui_scope && HasBit(data, 31) && this->vli.type == VL_SHARED_ORDERS) {
/* Needs to be done in command-scope, so everything stays valid */
this->vli.index = GB(data, 0, 20);
this->window_number = this->vli.Pack();
this->vehicles.ForceRebuild();
return;
}
if (data == 0) {
/* This needs to be done in command-scope to enforce rebuilding before resorting invalid data */
this->vehicles.ForceRebuild();
} else {
this->vehicles.ForceResort();
}
}
};
static WindowDesc _vehicle_list_other_desc(
WDP_AUTO, "list_vehicles", 260, 246,
WC_INVALID, WC_NONE,
0,
_nested_vehicle_list, lengthof(_nested_vehicle_list)
);
static WindowDesc _vehicle_list_train_desc(
WDP_AUTO, "list_vehicles_train", 325, 246,
WC_TRAINS_LIST, WC_NONE,
0,
_nested_vehicle_list, lengthof(_nested_vehicle_list)
);
static void ShowVehicleListWindowLocal(CompanyID company, VehicleListType vlt, VehicleType vehicle_type, uint32 unique_number)
{
if (!Company::IsValidID(company) && company != OWNER_NONE) return;
WindowNumber num = VehicleListIdentifier(vlt, vehicle_type, company, unique_number).Pack();
if (vehicle_type == VEH_TRAIN) {
AllocateWindowDescFront<VehicleListWindow>(&_vehicle_list_train_desc, num);
} else {
_vehicle_list_other_desc.cls = GetWindowClassForVehicleType(vehicle_type);
AllocateWindowDescFront<VehicleListWindow>(&_vehicle_list_other_desc, num);
}
}
void ShowVehicleListWindow(CompanyID company, VehicleType vehicle_type)
{
/* If _settings_client.gui.advanced_vehicle_list > 1, display the Advanced list
* if _settings_client.gui.advanced_vehicle_list == 1, display Advanced list only for local company
* if _ctrl_pressed, do the opposite action (Advanced list x Normal list)
*/
if ((_settings_client.gui.advanced_vehicle_list > (uint)(company != _local_company)) != _ctrl_pressed) {
ShowCompanyGroup(company, vehicle_type);
} else {
ShowVehicleListWindowLocal(company, VL_STANDARD, vehicle_type, company);
}
}
void ShowVehicleListWindow(const Vehicle *v)
{
ShowVehicleListWindowLocal(v->owner, VL_SHARED_ORDERS, v->type, v->FirstShared()->index);
}
void ShowVehicleListWindow(CompanyID company, VehicleType vehicle_type, StationID station)
{
ShowVehicleListWindowLocal(company, VL_STATION_LIST, vehicle_type, station);
}
void ShowVehicleListWindow(CompanyID company, VehicleType vehicle_type, TileIndex depot_tile)
{
uint16 depot_airport_index;
if (vehicle_type == VEH_AIRCRAFT) {
depot_airport_index = GetStationIndex(depot_tile);
} else {
depot_airport_index = GetDepotIndex(depot_tile);
}
ShowVehicleListWindowLocal(company, VL_DEPOT_LIST, vehicle_type, depot_airport_index);
}
/* Unified vehicle GUI - Vehicle Details Window */
assert_compile(WID_VD_DETAILS_CARGO_CARRIED == WID_VD_DETAILS_CARGO_CARRIED + TDW_TAB_CARGO );
assert_compile(WID_VD_DETAILS_TRAIN_VEHICLES == WID_VD_DETAILS_CARGO_CARRIED + TDW_TAB_INFO );
assert_compile(WID_VD_DETAILS_CAPACITY_OF_EACH == WID_VD_DETAILS_CARGO_CARRIED + TDW_TAB_CAPACITY);
assert_compile(WID_VD_DETAILS_TOTAL_CARGO == WID_VD_DETAILS_CARGO_CARRIED + TDW_TAB_TOTALS );
/** Vehicle details widgets (other than train). */
static const NWidgetPart _nested_nontrain_vehicle_details_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY, WID_VD_CAPTION), SetDataTip(STR_VEHICLE_DETAILS_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_VD_RENAME_VEHICLE), SetMinimalSize(40, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_VEHICLE_NAME_BUTTON, STR_NULL /* filled in later */),
NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_DEFSIZEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY, WID_VD_TOP_DETAILS), SetMinimalSize(405, 42), SetResize(1, 0), EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY, WID_VD_MIDDLE_DETAILS), SetMinimalSize(405, 45), SetResize(1, 0), EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_VD_DECREASE_SERVICING_INTERVAL), SetFill(0, 1),
SetDataTip(AWV_DECREASE, STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_VD_INCREASE_SERVICING_INTERVAL), SetFill(0, 1),
SetDataTip(AWV_INCREASE, STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_VD_SERVICE_INTERVAL_DROPDOWN), SetFill(0, 1),
SetDataTip(STR_EMPTY, STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP),
NWidget(WWT_PANEL, COLOUR_GREY, WID_VD_SERVICING_INTERVAL), SetFill(1, 1), SetResize(1, 0), EndContainer(),
NWidget(WWT_RESIZEBOX, COLOUR_GREY),
EndContainer(),
};
/** Train details widgets. */
static const NWidgetPart _nested_train_vehicle_details_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY, WID_VD_CAPTION), SetDataTip(STR_VEHICLE_DETAILS_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_VD_RENAME_VEHICLE), SetMinimalSize(40, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_VEHICLE_NAME_BUTTON, STR_NULL /* filled in later */),
NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_DEFSIZEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY, WID_VD_TOP_DETAILS), SetResize(1, 0), SetMinimalSize(405, 42), EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_MATRIX, COLOUR_GREY, WID_VD_MATRIX), SetResize(1, 1), SetMinimalSize(393, 45), SetMatrixDataTip(1, 0, STR_NULL), SetFill(1, 0), SetScrollbar(WID_VD_SCROLLBAR),
NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_VD_SCROLLBAR),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_VD_DECREASE_SERVICING_INTERVAL), SetFill(0, 1),
SetDataTip(AWV_DECREASE, STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_VD_INCREASE_SERVICING_INTERVAL), SetFill(0, 1),
SetDataTip(AWV_INCREASE, STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_VD_SERVICE_INTERVAL_DROPDOWN), SetFill(0, 1),
SetDataTip(STR_EMPTY, STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP),
NWidget(WWT_PANEL, COLOUR_GREY, WID_VD_SERVICING_INTERVAL), SetFill(1, 1), SetResize(1, 0), EndContainer(),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_VD_DETAILS_CARGO_CARRIED), SetMinimalSize(96, 12),
SetDataTip(STR_VEHICLE_DETAIL_TAB_CARGO, STR_VEHICLE_DETAILS_TRAIN_CARGO_TOOLTIP), SetFill(1, 0), SetResize(1, 0),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_VD_DETAILS_TRAIN_VEHICLES), SetMinimalSize(99, 12),
SetDataTip(STR_VEHICLE_DETAIL_TAB_INFORMATION, STR_VEHICLE_DETAILS_TRAIN_INFORMATION_TOOLTIP), SetFill(1, 0), SetResize(1, 0),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_VD_DETAILS_CAPACITY_OF_EACH), SetMinimalSize(99, 12),
SetDataTip(STR_VEHICLE_DETAIL_TAB_CAPACITIES, STR_VEHICLE_DETAILS_TRAIN_CAPACITIES_TOOLTIP), SetFill(1, 0), SetResize(1, 0),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_VD_DETAILS_TOTAL_CARGO), SetMinimalSize(99, 12),
SetDataTip(STR_VEHICLE_DETAIL_TAB_TOTAL_CARGO, STR_VEHICLE_DETAILS_TRAIN_TOTAL_CARGO_TOOLTIP), SetFill(1, 0), SetResize(1, 0),
NWidget(WWT_RESIZEBOX, COLOUR_GREY),
EndContainer(),
};
extern int GetTrainDetailsWndVScroll(VehicleID veh_id, TrainDetailsWindowTabs det_tab);
extern void DrawTrainDetails(const Train *v, int left, int right, int y, int vscroll_pos, uint16 vscroll_cap, TrainDetailsWindowTabs det_tab);
extern void DrawRoadVehDetails(const Vehicle *v, int left, int right, int y);
extern void DrawShipDetails(const Vehicle *v, int left, int right, int y);
extern void DrawAircraftDetails(const Aircraft *v, int left, int right, int y);
static StringID _service_interval_dropdown[] = {
STR_VEHICLE_DETAILS_DEFAULT,
STR_VEHICLE_DETAILS_DAYS,
STR_VEHICLE_DETAILS_PERCENT,
INVALID_STRING_ID,
};
/** Class for managing the vehicle details window. */
struct VehicleDetailsWindow : Window {
TrainDetailsWindowTabs tab; ///< For train vehicles: which tab is displayed.
Scrollbar *vscroll;
/** Initialize a newly created vehicle details window */
VehicleDetailsWindow(WindowDesc *desc, WindowNumber window_number) : Window(desc)
{
const Vehicle *v = Vehicle::Get(window_number);
this->CreateNestedTree();
this->vscroll = (v->type == VEH_TRAIN ? this->GetScrollbar(WID_VD_SCROLLBAR) : NULL);
this->FinishInitNested(window_number);
this->GetWidget<NWidgetCore>(WID_VD_RENAME_VEHICLE)->tool_tip = STR_VEHICLE_DETAILS_TRAIN_RENAME + v->type;
this->owner = v->owner;
this->tab = TDW_TAB_CARGO;
}
/**
* Some data on this window has become invalid.
* @param data Information about the changed data.
* @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
*/
virtual void OnInvalidateData(int data = 0, bool gui_scope = true)
{
if (data == VIWD_AUTOREPLACE) {
/* Autoreplace replaced the vehicle.
* Nothing to do for this window. */
return;
}
if (!gui_scope) return;
const Vehicle *v = Vehicle::Get(this->window_number);
if (v->type == VEH_ROAD) {
const NWidgetBase *nwid_info = this->GetWidget<NWidgetBase>(WID_VD_MIDDLE_DETAILS);
uint aimed_height = this->GetRoadVehDetailsHeight(v);
/* If the number of articulated parts changes, the size of the window must change too. */
if (aimed_height != nwid_info->current_y) {
this->ReInit();
}
}
}
/**
* Gets the desired height for the road vehicle details panel.
* @param v Road vehicle being shown.
* @return Desired height in pixels.
*/
uint GetRoadVehDetailsHeight(const Vehicle *v)
{
uint desired_height;
if (v->HasArticulatedPart()) {
/* An articulated RV has its text drawn under the sprite instead of after it, hence 15 pixels extra. */
desired_height = WD_FRAMERECT_TOP + ScaleGUITrad(15) + 3 * FONT_HEIGHT_NORMAL + 2 + WD_FRAMERECT_BOTTOM;
/* Add space for the cargo amount for each part. */
for (const Vehicle *u = v; u != NULL; u = u->Next()) {
if (u->cargo_cap != 0) desired_height += FONT_HEIGHT_NORMAL + 1;
}
} else {
desired_height = WD_FRAMERECT_TOP + 4 * FONT_HEIGHT_NORMAL + 3 + WD_FRAMERECT_BOTTOM;
}
return desired_height;
}
virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
{
switch (widget) {
case WID_VD_TOP_DETAILS: {
Dimension dim = { 0, 0 };
size->height = WD_FRAMERECT_TOP + 4 * FONT_HEIGHT_NORMAL + WD_FRAMERECT_BOTTOM;
for (uint i = 0; i < 4; i++) SetDParamMaxValue(i, INT16_MAX);
static const StringID info_strings[] = {
STR_VEHICLE_INFO_MAX_SPEED,
STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED,
STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED_MAX_TE,
STR_VEHICLE_INFO_PROFIT_THIS_YEAR_LAST_YEAR,
STR_VEHICLE_INFO_RELIABILITY_BREAKDOWNS
};
for (uint i = 0; i < lengthof(info_strings); i++) {
dim = maxdim(dim, GetStringBoundingBox(info_strings[i]));
}
SetDParam(0, STR_VEHICLE_INFO_AGE);
dim = maxdim(dim, GetStringBoundingBox(STR_VEHICLE_INFO_AGE_RUNNING_COST_YR));
size->width = dim.width + WD_FRAMERECT_LEFT + WD_FRAMERECT_RIGHT;
break;
}
case WID_VD_MIDDLE_DETAILS: {
const Vehicle *v = Vehicle::Get(this->window_number);
switch (v->type) {
case VEH_ROAD:
size->height = this->GetRoadVehDetailsHeight(v);
break;
case VEH_SHIP:
size->height = WD_FRAMERECT_TOP + 4 * FONT_HEIGHT_NORMAL + 3 + WD_FRAMERECT_BOTTOM;
break;
case VEH_AIRCRAFT:
size->height = WD_FRAMERECT_TOP + 5 * FONT_HEIGHT_NORMAL + 4 + WD_FRAMERECT_BOTTOM;
break;
default:
NOT_REACHED(); // Train uses WID_VD_MATRIX instead.
}
break;
}
case WID_VD_MATRIX:
resize->height = max(ScaleGUITrad(14), WD_MATRIX_TOP + FONT_HEIGHT_NORMAL + WD_MATRIX_BOTTOM);
size->height = 4 * resize->height;
break;
case WID_VD_SERVICE_INTERVAL_DROPDOWN: {
StringID *strs = _service_interval_dropdown;
while (*strs != INVALID_STRING_ID) {
*size = maxdim(*size, GetStringBoundingBox(*strs++));
}
size->width += padding.width;
size->height = FONT_HEIGHT_NORMAL + WD_DROPDOWNTEXT_TOP + WD_DROPDOWNTEXT_BOTTOM;
break;
}
case WID_VD_SERVICING_INTERVAL:
SetDParamMaxValue(0, MAX_SERVINT_DAYS); // Roughly the maximum interval
SetDParamMaxValue(1, MAX_YEAR * DAYS_IN_YEAR); // Roughly the maximum year
size->width = max(GetStringBoundingBox(STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT).width, GetStringBoundingBox(STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS).width) + WD_FRAMERECT_LEFT + WD_FRAMERECT_RIGHT;
size->height = WD_FRAMERECT_TOP + FONT_HEIGHT_NORMAL + WD_FRAMERECT_BOTTOM;
break;
}
}
/** Checks whether service interval is enabled for the vehicle. */
static bool IsVehicleServiceIntervalEnabled(const VehicleType vehicle_type, CompanyID company_id)
{
const VehicleDefaultSettings *vds = &Company::Get(company_id)->settings.vehicle;
switch (vehicle_type) {
default: NOT_REACHED();
case VEH_TRAIN: return vds->servint_trains != 0;
case VEH_ROAD: return vds->servint_roadveh != 0;
case VEH_SHIP: return vds->servint_ships != 0;
case VEH_AIRCRAFT: return vds->servint_aircraft != 0;
}
}
/**
* Draw the details for the given vehicle at the position of the Details windows
*
* @param v current vehicle
* @param left The left most coordinate to draw
* @param right The right most coordinate to draw
* @param y The y coordinate
* @param vscroll_pos Position of scrollbar (train only)
* @param vscroll_cap Number of lines currently displayed (train only)
* @param det_tab Selected details tab (train only)
*/
static void DrawVehicleDetails(const Vehicle *v, int left, int right, int y, int vscroll_pos, uint vscroll_cap, TrainDetailsWindowTabs det_tab)
{
switch (v->type) {
case VEH_TRAIN: DrawTrainDetails(Train::From(v), left, right, y, vscroll_pos, vscroll_cap, det_tab); break;
case VEH_ROAD: DrawRoadVehDetails(v, left, right, y); break;
case VEH_SHIP: DrawShipDetails(v, left, right, y); break;
case VEH_AIRCRAFT: DrawAircraftDetails(Aircraft::From(v), left, right, y); break;
default: NOT_REACHED();
}
}
virtual void SetStringParameters(int widget) const
{
if (widget == WID_VD_CAPTION) SetDParam(0, Vehicle::Get(this->window_number)->index);
}
virtual void DrawWidget(const Rect &r, int widget) const
{
const Vehicle *v = Vehicle::Get(this->window_number);
switch (widget) {
case WID_VD_TOP_DETAILS: {
int y = r.top + WD_FRAMERECT_TOP;
/* Draw running cost */
SetDParam(1, v->age / DAYS_IN_LEAP_YEAR);
SetDParam(0, (v->age + DAYS_IN_YEAR < v->max_age) ? STR_VEHICLE_INFO_AGE : STR_VEHICLE_INFO_AGE_RED);
SetDParam(2, v->max_age / DAYS_IN_LEAP_YEAR);
SetDParam(3, v->GetDisplayRunningCost());
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, y, STR_VEHICLE_INFO_AGE_RUNNING_COST_YR);
y += FONT_HEIGHT_NORMAL;
/* Draw max speed */
StringID string;
if (v->type == VEH_TRAIN ||
(v->type == VEH_ROAD && _settings_game.vehicle.roadveh_acceleration_model != AM_ORIGINAL)) {
const GroundVehicleCache *gcache = v->GetGroundVehicleCache();
SetDParam(2, v->GetDisplayMaxSpeed());
SetDParam(1, gcache->cached_power);
SetDParam(0, gcache->cached_weight);
SetDParam(3, gcache->cached_max_te / 1000);
if (v->type == VEH_TRAIN && (_settings_game.vehicle.train_acceleration_model == AM_ORIGINAL ||
GetRailTypeInfo(Train::From(v)->railtype)->acceleration_type == 2)) {
string = STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED;
} else {
string = STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED_MAX_TE;
}
} else {
SetDParam(0, v->GetDisplayMaxSpeed());
if (v->type == VEH_AIRCRAFT) {
SetDParam(1, v->GetEngine()->GetAircraftTypeText());
if (Aircraft::From(v)->GetRange() > 0) {
SetDParam(2, Aircraft::From(v)->GetRange());
string = STR_VEHICLE_INFO_MAX_SPEED_TYPE_RANGE;
} else {
string = STR_VEHICLE_INFO_MAX_SPEED_TYPE;
}
} else {
string = STR_VEHICLE_INFO_MAX_SPEED;
}
}
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, y, string);
y += FONT_HEIGHT_NORMAL;
/* Draw profit */
SetDParam(0, v->GetDisplayProfitThisYear());
SetDParam(1, v->GetDisplayProfitLastYear());
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, y, STR_VEHICLE_INFO_PROFIT_THIS_YEAR_LAST_YEAR);
y += FONT_HEIGHT_NORMAL;
/* Draw breakdown & reliability */
SetDParam(0, ToPercent16(v->reliability));
SetDParam(1, v->breakdowns_since_last_service);
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, y, STR_VEHICLE_INFO_RELIABILITY_BREAKDOWNS);
break;
}
case WID_VD_MATRIX:
/* For trains only. */
DrawVehicleDetails(v, r.left + WD_MATRIX_LEFT, r.right - WD_MATRIX_RIGHT, r.top + WD_MATRIX_TOP, this->vscroll->GetPosition(), this->vscroll->GetCapacity(), this->tab);
break;
case WID_VD_MIDDLE_DETAILS: {
/* For other vehicles, at the place of the matrix. */
bool rtl = _current_text_dir == TD_RTL;
uint sprite_width = GetSingleVehicleWidth(v, EIT_IN_DETAILS) + WD_FRAMERECT_LEFT + WD_FRAMERECT_RIGHT;
uint text_left = r.left + (rtl ? 0 : sprite_width);
uint text_right = r.right - (rtl ? sprite_width : 0);
/* Articulated road vehicles use a complete line. */
if (v->type == VEH_ROAD && v->HasArticulatedPart()) {
DrawVehicleImage(v, r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, r.top + WD_FRAMERECT_TOP, INVALID_VEHICLE, EIT_IN_DETAILS, 0);
} else {
uint sprite_left = rtl ? text_right : r.left;
uint sprite_right = rtl ? r.right : text_left;
DrawVehicleImage(v, sprite_left + WD_FRAMERECT_LEFT, sprite_right - WD_FRAMERECT_RIGHT, r.top + WD_FRAMERECT_TOP, INVALID_VEHICLE, EIT_IN_DETAILS, 0);
}
DrawVehicleDetails(v, text_left + WD_FRAMERECT_LEFT, text_right - WD_FRAMERECT_RIGHT, r.top + WD_FRAMERECT_TOP, 0, 0, this->tab);
break;
}
case WID_VD_SERVICING_INTERVAL:
/* Draw service interval text */
SetDParam(0, v->GetServiceInterval());
SetDParam(1, v->date_of_last_service);
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, r.top + (r.bottom - r.top + 1 - FONT_HEIGHT_NORMAL) / 2,
v->ServiceIntervalIsPercent() ? STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT : STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS);
break;
}
}
/** Repaint vehicle details window. */
virtual void OnPaint()
{
const Vehicle *v = Vehicle::Get(this->window_number);
this->SetWidgetDisabledState(WID_VD_RENAME_VEHICLE, v->owner != _local_company);
if (v->type == VEH_TRAIN) {
this->DisableWidget(this->tab + WID_VD_DETAILS_CARGO_CARRIED);
this->vscroll->SetCount(GetTrainDetailsWndVScroll(v->index, this->tab));
}
/* Disable service-scroller when interval is set to disabled */
this->SetWidgetsDisabledState(!IsVehicleServiceIntervalEnabled(v->type, v->owner),
WID_VD_INCREASE_SERVICING_INTERVAL,
WID_VD_DECREASE_SERVICING_INTERVAL,
WIDGET_LIST_END);
StringID str = v->ServiceIntervalIsCustom() ?
(v->ServiceIntervalIsPercent() ? STR_VEHICLE_DETAILS_PERCENT : STR_VEHICLE_DETAILS_DAYS) :
STR_VEHICLE_DETAILS_DEFAULT;
this->GetWidget<NWidgetCore>(WID_VD_SERVICE_INTERVAL_DROPDOWN)->widget_data = str;
this->DrawWidgets();
}
virtual void OnClick(Point pt, int widget, int click_count)
{
switch (widget) {
case WID_VD_RENAME_VEHICLE: { // rename
const Vehicle *v = Vehicle::Get(this->window_number);
SetDParam(0, v->index);
ShowQueryString(STR_VEHICLE_NAME, STR_QUERY_RENAME_TRAIN_CAPTION + v->type,
MAX_LENGTH_VEHICLE_NAME_CHARS, this, CS_ALPHANUMERAL, QSF_ENABLE_DEFAULT | QSF_LEN_IN_CHARS);
break;
}
case WID_VD_INCREASE_SERVICING_INTERVAL: // increase int
case WID_VD_DECREASE_SERVICING_INTERVAL: { // decrease int
int mod = _ctrl_pressed ? 5 : 10;
const Vehicle *v = Vehicle::Get(this->window_number);
mod = (widget == WID_VD_DECREASE_SERVICING_INTERVAL) ? -mod : mod;
mod = GetServiceIntervalClamped(mod + v->GetServiceInterval(), v->ServiceIntervalIsPercent());
if (mod == v->GetServiceInterval()) return;
DoCommandP(v->tile, v->index, mod | (1 << 16) | (v->ServiceIntervalIsPercent() << 17), CMD_CHANGE_SERVICE_INT | CMD_MSG(STR_ERROR_CAN_T_CHANGE_SERVICING));
break;
}
case WID_VD_SERVICE_INTERVAL_DROPDOWN: {
const Vehicle *v = Vehicle::Get(this->window_number);
ShowDropDownMenu(this, _service_interval_dropdown, v->ServiceIntervalIsCustom() ? (v->ServiceIntervalIsPercent() ? 2 : 1) : 0, widget, 0, 0);
break;
}
case WID_VD_DETAILS_CARGO_CARRIED:
case WID_VD_DETAILS_TRAIN_VEHICLES:
case WID_VD_DETAILS_CAPACITY_OF_EACH:
case WID_VD_DETAILS_TOTAL_CARGO:
this->SetWidgetsDisabledState(false,
WID_VD_DETAILS_CARGO_CARRIED,
WID_VD_DETAILS_TRAIN_VEHICLES,
WID_VD_DETAILS_CAPACITY_OF_EACH,
WID_VD_DETAILS_TOTAL_CARGO,
widget,
WIDGET_LIST_END);
this->tab = (TrainDetailsWindowTabs)(widget - WID_VD_DETAILS_CARGO_CARRIED);
this->SetDirty();
break;
}
}
virtual void OnDropdownSelect(int widget, int index)
{
switch (widget) {
case WID_VD_SERVICE_INTERVAL_DROPDOWN: {
const Vehicle *v = Vehicle::Get(this->window_number);
bool iscustom = index != 0;
bool ispercent = iscustom ? (index == 2) : Company::Get(v->owner)->settings.vehicle.servint_ispercent;
uint16 interval = GetServiceIntervalClamped(v->GetServiceInterval(), ispercent);
DoCommandP(v->tile, v->index, interval | (iscustom << 16) | (ispercent << 17), CMD_CHANGE_SERVICE_INT | CMD_MSG(STR_ERROR_CAN_T_CHANGE_SERVICING));
break;
}
}
}
virtual void OnQueryTextFinished(char *str)
{
if (str == NULL) return;
DoCommandP(0, this->window_number, 0, CMD_RENAME_VEHICLE | CMD_MSG(STR_ERROR_CAN_T_RENAME_TRAIN + Vehicle::Get(this->window_number)->type), NULL, str);
}
virtual void OnResize()
{
NWidgetCore *nwi = this->GetWidget<NWidgetCore>(WID_VD_MATRIX);
if (nwi != NULL) {
this->vscroll->SetCapacityFromWidget(this, WID_VD_MATRIX);
}
}
};
/** Vehicle details window descriptor. */
static WindowDesc _train_vehicle_details_desc(
WDP_AUTO, "view_vehicle_details_train", 405, 178,
WC_VEHICLE_DETAILS, WC_VEHICLE_VIEW,
0,
_nested_train_vehicle_details_widgets, lengthof(_nested_train_vehicle_details_widgets)
);
/** Vehicle details window descriptor for other vehicles than a train. */
static WindowDesc _nontrain_vehicle_details_desc(
WDP_AUTO, "view_vehicle_details", 405, 113,
WC_VEHICLE_DETAILS, WC_VEHICLE_VIEW,
0,
_nested_nontrain_vehicle_details_widgets, lengthof(_nested_nontrain_vehicle_details_widgets)
);
/** Shows the vehicle details window of the given vehicle. */
static void ShowVehicleDetailsWindow(const Vehicle *v)
{
DeleteWindowById(WC_VEHICLE_ORDERS, v->index, false);
DeleteWindowById(WC_VEHICLE_TIMETABLE, v->index, false);
AllocateWindowDescFront<VehicleDetailsWindow>((v->type == VEH_TRAIN) ? &_train_vehicle_details_desc : &_nontrain_vehicle_details_desc, v->index);
}
/* Unified vehicle GUI - Vehicle View Window */
/** Vehicle view widgets. */
static const NWidgetPart _nested_vehicle_view_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY, WID_VV_CAPTION), SetDataTip(STR_VEHICLE_VIEW_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_DEBUGBOX, COLOUR_GREY),
NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_DEFSIZEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_PANEL, COLOUR_GREY),
NWidget(WWT_INSET, COLOUR_GREY), SetPadding(2, 2, 2, 2),
NWidget(NWID_VIEWPORT, INVALID_COLOUR, WID_VV_VIEWPORT), SetMinimalSize(226, 84), SetResize(1, 1), SetPadding(1, 1, 1, 1),
EndContainer(),
EndContainer(),
NWidget(NWID_VERTICAL),
NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, WID_VV_CENTER_MAIN_VIEW), SetMinimalSize(18, 18), SetDataTip(SPR_CENTRE_VIEW_VEHICLE, 0x0 /* filled later */),
NWidget(NWID_SELECTION, INVALID_COLOUR, WID_VV_SELECT_DEPOT_CLONE),
NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, WID_VV_GOTO_DEPOT), SetMinimalSize(18, 18), SetDataTip(0x0 /* filled later */, 0x0 /* filled later */),
NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, WID_VV_CLONE), SetMinimalSize(18, 18), SetDataTip(0x0 /* filled later */, 0x0 /* filled later */),
EndContainer(),
/* For trains only, 'ignore signal' button. */
NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, WID_VV_FORCE_PROCEED), SetMinimalSize(18, 18),
SetDataTip(SPR_IGNORE_SIGNALS, STR_VEHICLE_VIEW_TRAIN_IGNORE_SIGNAL_TOOLTIP),
NWidget(NWID_SELECTION, INVALID_COLOUR, WID_VV_SELECT_REFIT_TURN),
NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, WID_VV_REFIT), SetMinimalSize(18, 18), SetDataTip(SPR_REFIT_VEHICLE, 0x0 /* filled later */),
NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, WID_VV_TURN_AROUND), SetMinimalSize(18, 18),
SetDataTip(SPR_FORCE_VEHICLE_TURN, STR_VEHICLE_VIEW_ROAD_VEHICLE_REVERSE_TOOLTIP),
EndContainer(),
NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, WID_VV_SHOW_ORDERS), SetMinimalSize(18, 18), SetDataTip(SPR_SHOW_ORDERS, 0x0 /* filled later */),
NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, WID_VV_SHOW_DETAILS), SetMinimalSize(18, 18), SetDataTip(SPR_SHOW_VEHICLE_DETAILS, 0x0 /* filled later */),
NWidget(WWT_PANEL, COLOUR_GREY), SetMinimalSize(18, 0), SetResize(0, 1), EndContainer(),
EndContainer(),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_PUSHBTN, COLOUR_GREY, WID_VV_START_STOP), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetResize(1, 0), SetFill(1, 0),
NWidget(WWT_RESIZEBOX, COLOUR_GREY),
EndContainer(),
};
/** Vehicle view window descriptor for all vehicles but trains. */
static WindowDesc _vehicle_view_desc(
WDP_AUTO, "view_vehicle", 250, 116,
WC_VEHICLE_VIEW, WC_NONE,
0,
_nested_vehicle_view_widgets, lengthof(_nested_vehicle_view_widgets)
);
/**
* Vehicle view window descriptor for trains. Only minimum_height and
* default_height are different for train view.
*/
static WindowDesc _train_view_desc(
WDP_AUTO, "view_vehicle_train", 250, 134,
WC_VEHICLE_VIEW, WC_NONE,
0,
_nested_vehicle_view_widgets, lengthof(_nested_vehicle_view_widgets)
);
/* Just to make sure, nobody has changed the vehicle type constants, as we are
using them for array indexing in a number of places here. */
assert_compile(VEH_TRAIN == 0);
assert_compile(VEH_ROAD == 1);
assert_compile(VEH_SHIP == 2);
assert_compile(VEH_AIRCRAFT == 3);
/** Zoom levels for vehicle views indexed by vehicle type. */
static const ZoomLevel _vehicle_view_zoom_levels[] = {
ZOOM_LVL_TRAIN,
ZOOM_LVL_ROADVEH,
ZOOM_LVL_SHIP,
ZOOM_LVL_AIRCRAFT,
};
/* Constants for geometry of vehicle view viewport */
static const int VV_INITIAL_VIEWPORT_WIDTH = 226;
static const int VV_INITIAL_VIEWPORT_HEIGHT = 84;
static const int VV_INITIAL_VIEWPORT_HEIGHT_TRAIN = 102;
/** Command indices for the _vehicle_command_translation_table. */
enum VehicleCommandTranslation {
VCT_CMD_START_STOP = 0,
VCT_CMD_CLONE_VEH,
VCT_CMD_TURN_AROUND,
};
/** Command codes for the shared buttons indexed by VehicleCommandTranslation and vehicle type. */
static const uint32 _vehicle_command_translation_table[][4] = {
{ // VCT_CMD_START_STOP
CMD_START_STOP_VEHICLE | CMD_MSG(STR_ERROR_CAN_T_STOP_START_TRAIN),
CMD_START_STOP_VEHICLE | CMD_MSG(STR_ERROR_CAN_T_STOP_START_ROAD_VEHICLE),
CMD_START_STOP_VEHICLE | CMD_MSG(STR_ERROR_CAN_T_STOP_START_SHIP),
CMD_START_STOP_VEHICLE | CMD_MSG(STR_ERROR_CAN_T_STOP_START_AIRCRAFT)
},
{ // VCT_CMD_CLONE_VEH
CMD_CLONE_VEHICLE | CMD_MSG(STR_ERROR_CAN_T_BUY_TRAIN),
CMD_CLONE_VEHICLE | CMD_MSG(STR_ERROR_CAN_T_BUY_ROAD_VEHICLE),
CMD_CLONE_VEHICLE | CMD_MSG(STR_ERROR_CAN_T_BUY_SHIP),
CMD_CLONE_VEHICLE | CMD_MSG(STR_ERROR_CAN_T_BUY_AIRCRAFT)
},
{ // VCT_CMD_TURN_AROUND
CMD_REVERSE_TRAIN_DIRECTION | CMD_MSG(STR_ERROR_CAN_T_REVERSE_DIRECTION_TRAIN),
CMD_TURN_ROADVEH | CMD_MSG(STR_ERROR_CAN_T_MAKE_ROAD_VEHICLE_TURN),
0xffffffff, // invalid for ships
0xffffffff // invalid for aircraft
},
};
/**
* This is the Callback method after attempting to start/stop a vehicle
* @param result the result of the start/stop command
* @param tile unused
* @param p1 vehicle ID
* @param p2 unused
*/
void CcStartStopVehicle(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
{
if (result.Failed()) return;
const Vehicle *v = Vehicle::GetIfValid(p1);
if (v == NULL || !v->IsPrimaryVehicle() || v->owner != _local_company) return;
StringID msg = (v->vehstatus & VS_STOPPED) ? STR_VEHICLE_COMMAND_STOPPED : STR_VEHICLE_COMMAND_STARTED;
Point pt = RemapCoords(v->x_pos, v->y_pos, v->z_pos);
AddTextEffect(msg, pt.x, pt.y, DAY_TICKS, TE_RISING);
}
/**
* Executes #CMD_START_STOP_VEHICLE for given vehicle.
* @param v Vehicle to start/stop
* @param texteffect Should a texteffect be shown?
*/
void StartStopVehicle(const Vehicle *v, bool texteffect)
{
assert(v->IsPrimaryVehicle());
DoCommandP(v->tile, v->index, 0, _vehicle_command_translation_table[VCT_CMD_START_STOP][v->type], texteffect ? CcStartStopVehicle : NULL);
}
/** Checks whether the vehicle may be refitted at the moment.*/
static bool IsVehicleRefitable(const Vehicle *v)
{
if (!v->IsStoppedInDepot()) return false;
do {
if (IsEngineRefittable(v->engine_type)) return true;
} while (v->IsGroundVehicle() && (v = v->Next()) != NULL);
return false;
}
/** Window manager class for viewing a vehicle. */
struct VehicleViewWindow : Window {
private:
/** Display planes available in the vehicle view window. */
enum PlaneSelections {
SEL_DC_GOTO_DEPOT, ///< Display 'goto depot' button in #WID_VV_SELECT_DEPOT_CLONE stacked widget.
SEL_DC_CLONE, ///< Display 'clone vehicle' button in #WID_VV_SELECT_DEPOT_CLONE stacked widget.
SEL_RT_REFIT, ///< Display 'refit' button in #WID_VV_SELECT_REFIT_TURN stacked widget.
SEL_RT_TURN_AROUND, ///< Display 'turn around' button in #WID_VV_SELECT_REFIT_TURN stacked widget.
SEL_DC_BASEPLANE = SEL_DC_GOTO_DEPOT, ///< First plane of the #WID_VV_SELECT_DEPOT_CLONE stacked widget.
SEL_RT_BASEPLANE = SEL_RT_REFIT, ///< First plane of the #WID_VV_SELECT_REFIT_TURN stacked widget.
};
/**
* Display a plane in the window.
* @param plane Plane to show.
*/
void SelectPlane(PlaneSelections plane)
{
switch (plane) {
case SEL_DC_GOTO_DEPOT:
case SEL_DC_CLONE:
this->GetWidget<NWidgetStacked>(WID_VV_SELECT_DEPOT_CLONE)->SetDisplayedPlane(plane - SEL_DC_BASEPLANE);
break;
case SEL_RT_REFIT:
case SEL_RT_TURN_AROUND:
this->GetWidget<NWidgetStacked>(WID_VV_SELECT_REFIT_TURN)->SetDisplayedPlane(plane - SEL_RT_BASEPLANE);
break;
default:
NOT_REACHED();
}
}
public:
VehicleViewWindow(WindowDesc *desc, WindowNumber window_number) : Window(desc)
{
this->flags |= WF_DISABLE_VP_SCROLL;
this->CreateNestedTree();
/* Sprites for the 'send to depot' button indexed by vehicle type. */
static const SpriteID vehicle_view_goto_depot_sprites[] = {
SPR_SEND_TRAIN_TODEPOT,
SPR_SEND_ROADVEH_TODEPOT,
SPR_SEND_SHIP_TODEPOT,
SPR_SEND_AIRCRAFT_TODEPOT,
};
const Vehicle *v = Vehicle::Get(window_number);
this->GetWidget<NWidgetCore>(WID_VV_GOTO_DEPOT)->widget_data = vehicle_view_goto_depot_sprites[v->type];
/* Sprites for the 'clone vehicle' button indexed by vehicle type. */
static const SpriteID vehicle_view_clone_sprites[] = {
SPR_CLONE_TRAIN,
SPR_CLONE_ROADVEH,
SPR_CLONE_SHIP,
SPR_CLONE_AIRCRAFT,
};
this->GetWidget<NWidgetCore>(WID_VV_CLONE)->widget_data = vehicle_view_clone_sprites[v->type];
switch (v->type) {
case VEH_TRAIN:
this->GetWidget<NWidgetCore>(WID_VV_TURN_AROUND)->tool_tip = STR_VEHICLE_VIEW_TRAIN_REVERSE_TOOLTIP;
break;
case VEH_ROAD:
break;
case VEH_SHIP:
case VEH_AIRCRAFT:
this->SelectPlane(SEL_RT_REFIT);
break;
default: NOT_REACHED();
}
this->FinishInitNested(window_number);
this->owner = v->owner;
this->GetWidget<NWidgetViewport>(WID_VV_VIEWPORT)->InitializeViewport(this, this->window_number | (1 << 31), _vehicle_view_zoom_levels[v->type]);
this->GetWidget<NWidgetCore>(WID_VV_START_STOP)->tool_tip = STR_VEHICLE_VIEW_TRAIN_STATE_START_STOP_TOOLTIP + v->type;
this->GetWidget<NWidgetCore>(WID_VV_CENTER_MAIN_VIEW)->tool_tip = STR_VEHICLE_VIEW_TRAIN_LOCATION_TOOLTIP + v->type;
this->GetWidget<NWidgetCore>(WID_VV_REFIT)->tool_tip = STR_VEHICLE_VIEW_TRAIN_REFIT_TOOLTIP + v->type;
this->GetWidget<NWidgetCore>(WID_VV_GOTO_DEPOT)->tool_tip = STR_VEHICLE_VIEW_TRAIN_SEND_TO_DEPOT_TOOLTIP + v->type;
this->GetWidget<NWidgetCore>(WID_VV_SHOW_ORDERS)->tool_tip = STR_VEHICLE_VIEW_TRAIN_ORDERS_TOOLTIP + v->type;
this->GetWidget<NWidgetCore>(WID_VV_SHOW_DETAILS)->tool_tip = STR_VEHICLE_VIEW_TRAIN_SHOW_DETAILS_TOOLTIP + v->type;
this->GetWidget<NWidgetCore>(WID_VV_CLONE)->tool_tip = STR_VEHICLE_VIEW_CLONE_TRAIN_INFO + v->type;
this->UpdateButtonStatus();
}
~VehicleViewWindow()
{
DeleteWindowById(WC_VEHICLE_ORDERS, this->window_number, false);
DeleteWindowById(WC_VEHICLE_REFIT, this->window_number, false);
DeleteWindowById(WC_VEHICLE_DETAILS, this->window_number, false);
DeleteWindowById(WC_VEHICLE_TIMETABLE, this->window_number, false);
}
virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
{
const Vehicle *v = Vehicle::Get(this->window_number);
switch (widget) {
case WID_VV_START_STOP:
size->height = max(size->height, max(GetSpriteSize(SPR_FLAG_VEH_STOPPED).height, GetSpriteSize(SPR_FLAG_VEH_RUNNING).height) + WD_IMGBTN_TOP + WD_IMGBTN_BOTTOM);
break;
case WID_VV_FORCE_PROCEED:
if (v->type != VEH_TRAIN) {
size->height = 0;
size->width = 0;
}
break;
case WID_VV_VIEWPORT:
size->width = VV_INITIAL_VIEWPORT_WIDTH;
size->height = (v->type == VEH_TRAIN) ? VV_INITIAL_VIEWPORT_HEIGHT_TRAIN : VV_INITIAL_VIEWPORT_HEIGHT;
break;
}
}
virtual void OnPaint()
{
const Vehicle *v = Vehicle::Get(this->window_number);
bool is_localcompany = v->owner == _local_company;
bool refitable_and_stopped_in_depot = IsVehicleRefitable(v);
this->SetWidgetDisabledState(WID_VV_GOTO_DEPOT, !is_localcompany);
this->SetWidgetDisabledState(WID_VV_REFIT, !refitable_and_stopped_in_depot || !is_localcompany);
this->SetWidgetDisabledState(WID_VV_CLONE, !is_localcompany);
if (v->type == VEH_TRAIN) {
this->SetWidgetLoweredState(WID_VV_FORCE_PROCEED, Train::From(v)->force_proceed == TFP_SIGNAL);
this->SetWidgetDisabledState(WID_VV_FORCE_PROCEED, !is_localcompany);
this->SetWidgetDisabledState(WID_VV_TURN_AROUND, !is_localcompany);
}
this->DrawWidgets();
}
virtual void SetStringParameters(int widget) const
{
if (widget != WID_VV_CAPTION) return;
const Vehicle *v = Vehicle::Get(this->window_number);
SetDParam(0, v->index);
}
virtual void DrawWidget(const Rect &r, int widget) const
{
if (widget != WID_VV_START_STOP) return;
const Vehicle *v = Vehicle::Get(this->window_number);
StringID str;
if (v->vehstatus & VS_CRASHED) {
str = STR_VEHICLE_STATUS_CRASHED;
} else if (v->type != VEH_AIRCRAFT && v->breakdown_ctr == 1) { // check for aircraft necessary?
str = STR_VEHICLE_STATUS_BROKEN_DOWN;
} else if (v->vehstatus & VS_STOPPED) {
if (v->type == VEH_TRAIN) {
if (v->cur_speed == 0) {
if (Train::From(v)->gcache.cached_power == 0) {
str = STR_VEHICLE_STATUS_TRAIN_NO_POWER;
} else {
str = STR_VEHICLE_STATUS_STOPPED;
}
} else {
SetDParam(0, v->GetDisplaySpeed());
str = STR_VEHICLE_STATUS_TRAIN_STOPPING_VEL;
}
} else { // no train
str = STR_VEHICLE_STATUS_STOPPED;
}
} else if (v->type == VEH_TRAIN && HasBit(Train::From(v)->flags, VRF_TRAIN_STUCK) && !v->current_order.IsType(OT_LOADING)) {
str = STR_VEHICLE_STATUS_TRAIN_STUCK;
} else if (v->type == VEH_AIRCRAFT && HasBit(Aircraft::From(v)->flags, VAF_DEST_TOO_FAR) && !v->current_order.IsType(OT_LOADING)) {
str = STR_VEHICLE_STATUS_AIRCRAFT_TOO_FAR;
} else { // vehicle is in a "normal" state, show current order
switch (v->current_order.GetType()) {
case OT_GOTO_STATION: {
SetDParam(0, v->current_order.GetDestination());
SetDParam(1, v->GetDisplaySpeed());
str = STR_VEHICLE_STATUS_HEADING_FOR_STATION_VEL;
break;
}
case OT_GOTO_DEPOT: {
SetDParam(0, v->type);
SetDParam(1, v->current_order.GetDestination());
SetDParam(2, v->GetDisplaySpeed());
if (v->current_order.GetDepotActionType() & ODATFB_NEAREST_DEPOT) {
/* This case *only* happens when multiple nearest depot orders
* follow each other (including an order list only one order: a
* nearest depot order) and there are no reachable depots.
* It is primarily to guard for the case that there is no
* depot with index 0, which would be used as fallback for
* evaluating the string in the status bar. */
str = STR_EMPTY;
} else if (v->current_order.GetDepotActionType() & ODATFB_HALT) {
str = STR_VEHICLE_STATUS_HEADING_FOR_DEPOT_VEL;
} else {
str = STR_VEHICLE_STATUS_HEADING_FOR_DEPOT_SERVICE_VEL;
}
break;
}
case OT_LOADING:
str = STR_VEHICLE_STATUS_LOADING_UNLOADING;
break;
case OT_GOTO_WAYPOINT: {
assert(v->type == VEH_TRAIN || v->type == VEH_SHIP);
SetDParam(0, v->current_order.GetDestination());
str = STR_VEHICLE_STATUS_HEADING_FOR_WAYPOINT_VEL;
SetDParam(1, v->GetDisplaySpeed());
break;
}
case OT_LEAVESTATION:
if (v->type != VEH_AIRCRAFT) {
str = STR_VEHICLE_STATUS_LEAVING;
break;
}
FALLTHROUGH;
default:
if (v->GetNumManualOrders() == 0) {
str = STR_VEHICLE_STATUS_NO_ORDERS_VEL;
SetDParam(0, v->GetDisplaySpeed());
} else {
str = STR_EMPTY;
}
break;
}
}
/* Draw the flag plus orders. */
bool rtl = (_current_text_dir == TD_RTL);
uint text_offset = max(GetSpriteSize(SPR_FLAG_VEH_STOPPED).width, GetSpriteSize(SPR_FLAG_VEH_RUNNING).width) + WD_IMGBTN_LEFT + WD_IMGBTN_RIGHT;
int text_left = r.left + (rtl ? (uint)WD_FRAMERECT_LEFT : text_offset);
int text_right = r.right - (rtl ? text_offset : (uint)WD_FRAMERECT_RIGHT);
int image_left = (rtl ? text_right + 1 : r.left) + WD_IMGBTN_LEFT;
int image = ((v->vehstatus & VS_STOPPED) != 0) ? SPR_FLAG_VEH_STOPPED : SPR_FLAG_VEH_RUNNING;
int lowered = this->IsWidgetLowered(WID_VV_START_STOP) ? 1 : 0;
DrawSprite(image, PAL_NONE, image_left + lowered, r.top + WD_IMGBTN_TOP + lowered);
DrawString(text_left + lowered, text_right + lowered, r.top + WD_FRAMERECT_TOP + lowered, str, TC_FROMSTRING, SA_HOR_CENTER);
}
virtual void OnClick(Point pt, int widget, int click_count)
{
const Vehicle *v = Vehicle::Get(this->window_number);
switch (widget) {
case WID_VV_START_STOP: // start stop
if (_ctrl_pressed) {
/* Scroll to current order destination */
TileIndex tile = v->current_order.GetLocation(v);
if (tile != INVALID_TILE) ScrollMainWindowToTile(tile);
} else {
/* Start/Stop */
StartStopVehicle(v, false);
}
break;
case WID_VV_CENTER_MAIN_VIEW: {// center main view
const Window *mainwindow = FindWindowById(WC_MAIN_WINDOW, 0);
/* code to allow the main window to 'follow' the vehicle if the ctrl key is pressed */
if (_ctrl_pressed && mainwindow->viewport->zoom <= ZOOM_LVL_OUT_4X) {
mainwindow->viewport->follow_vehicle = v->index;
} else {
ScrollMainWindowTo(v->x_pos, v->y_pos, v->z_pos);
}
break;
}
case WID_VV_GOTO_DEPOT: // goto hangar
DoCommandP(v->tile, v->index | (_ctrl_pressed ? DEPOT_SERVICE : 0U), 0, GetCmdSendToDepot(v));
break;
case WID_VV_REFIT: // refit
ShowVehicleRefitWindow(v, INVALID_VEH_ORDER_ID, this);
break;
case WID_VV_SHOW_ORDERS: // show orders
if (_ctrl_pressed) {
ShowTimetableWindow(v);
} else {
ShowOrdersWindow(v);
}
break;
case WID_VV_SHOW_DETAILS: // show details
ShowVehicleDetailsWindow(v);
break;
case WID_VV_CLONE: // clone vehicle
/* Suppress the vehicle GUI when share-cloning.
* There is no point to it except for starting the vehicle.
* For starting the vehicle the player has to open the depot GUI, which is
* most likely already open, but is also visible in the vehicle viewport. */
DoCommandP(v->tile, v->index, _ctrl_pressed ? 1 : 0,
_vehicle_command_translation_table[VCT_CMD_CLONE_VEH][v->type],
_ctrl_pressed ? NULL : CcCloneVehicle);
break;
case WID_VV_TURN_AROUND: // turn around
assert(v->IsGroundVehicle());
DoCommandP(v->tile, v->index, 0,
_vehicle_command_translation_table[VCT_CMD_TURN_AROUND][v->type]);
break;
case WID_VV_FORCE_PROCEED: // force proceed
assert(v->type == VEH_TRAIN);
DoCommandP(v->tile, v->index, 0, CMD_FORCE_TRAIN_PROCEED | CMD_MSG(STR_ERROR_CAN_T_MAKE_TRAIN_PASS_SIGNAL));
break;
}
}
virtual void OnResize()
{
if (this->viewport != NULL) {
NWidgetViewport *nvp = this->GetWidget<NWidgetViewport>(WID_VV_VIEWPORT);
nvp->UpdateViewportCoordinates(this);
}
}
void UpdateButtonStatus()
{
const Vehicle *v = Vehicle::Get(this->window_number);
bool veh_stopped = v->IsStoppedInDepot();
/* Widget WID_VV_GOTO_DEPOT must be hidden if the vehicle is already stopped in depot.
* Widget WID_VV_CLONE_VEH should then be shown, since cloning is allowed only while in depot and stopped.
*/
PlaneSelections plane = veh_stopped ? SEL_DC_CLONE : SEL_DC_GOTO_DEPOT;
NWidgetStacked *nwi = this->GetWidget<NWidgetStacked>(WID_VV_SELECT_DEPOT_CLONE); // Selection widget 'send to depot' / 'clone'.
if (nwi->shown_plane + SEL_DC_BASEPLANE != plane) {
this->SelectPlane(plane);
this->SetWidgetDirty(WID_VV_SELECT_DEPOT_CLONE);
}
/* The same system applies to widget WID_VV_REFIT_VEH and VVW_WIDGET_TURN_AROUND.*/
if (v->IsGroundVehicle()) {
PlaneSelections plane = veh_stopped ? SEL_RT_REFIT : SEL_RT_TURN_AROUND;
NWidgetStacked *nwi = this->GetWidget<NWidgetStacked>(WID_VV_SELECT_REFIT_TURN);
if (nwi->shown_plane + SEL_RT_BASEPLANE != plane) {
this->SelectPlane(plane);
this->SetWidgetDirty(WID_VV_SELECT_REFIT_TURN);
}
}
}
/**
* Some data on this window has become invalid.
* @param data Information about the changed data.
* @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
*/
virtual void OnInvalidateData(int data = 0, bool gui_scope = true)
{
if (data == VIWD_AUTOREPLACE) {
/* Autoreplace replaced the vehicle.
* Nothing to do for this window. */
return;
}
this->UpdateButtonStatus();
}
virtual bool IsNewGRFInspectable() const
{
return ::IsNewGRFInspectable(GetGrfSpecFeature(Vehicle::Get(this->window_number)->type), this->window_number);
}
virtual void ShowNewGRFInspectWindow() const
{
::ShowNewGRFInspectWindow(GetGrfSpecFeature(Vehicle::Get(this->window_number)->type), this->window_number);
}
};
/** Shows the vehicle view window of the given vehicle. */
void ShowVehicleViewWindow(const Vehicle *v)
{
AllocateWindowDescFront<VehicleViewWindow>((v->type == VEH_TRAIN) ? &_train_view_desc : &_vehicle_view_desc, v->index);
}
/**
* Dispatch a "vehicle selected" event if any window waits for it.
* @param v selected vehicle;
* @return did any window accept vehicle selection?
*/
bool VehicleClicked(const Vehicle *v)
{
assert(v != NULL);
if (!(_thd.place_mode & HT_VEHICLE)) return false;
v = v->First();
if (!v->IsPrimaryVehicle()) return false;
return _thd.GetCallbackWnd()->OnVehicleSelect(v);
}
void StopGlobalFollowVehicle(const Vehicle *v)
{
Window *w = FindWindowById(WC_MAIN_WINDOW, 0);
if (w != NULL && w->viewport->follow_vehicle == v->index) {
ScrollMainWindowTo(v->x_pos, v->y_pos, v->z_pos, true); // lock the main view on the vehicle's last position
w->viewport->follow_vehicle = INVALID_VEHICLE;
}
}
/**
* This is the Callback method after the construction attempt of a primary vehicle
* @param result indicates completion (or not) of the operation
* @param tile unused
* @param p1 unused
* @param p2 unused
*/
void CcBuildPrimaryVehicle(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
{
if (result.Failed()) return;
const Vehicle *v = Vehicle::Get(_new_vehicle_id);
ShowVehicleViewWindow(v);
}
/**
* Get the width of a vehicle (part) in pixels.
* @param v Vehicle to get the width for.
* @return Width of the vehicle.
*/
int GetSingleVehicleWidth(const Vehicle *v, EngineImageType image_type)
{
switch (v->type) {
case VEH_TRAIN:
return Train::From(v)->GetDisplayImageWidth();
case VEH_ROAD:
return RoadVehicle::From(v)->GetDisplayImageWidth();
default:
bool rtl = _current_text_dir == TD_RTL;
VehicleSpriteSeq seq;
v->GetImage(rtl ? DIR_E : DIR_W, image_type, &seq);
Rect rec;
seq.GetBounds(&rec);
return UnScaleGUI(rec.right - rec.left + 1);
}
}
/**
* Get the width of a vehicle (including all parts of the consist) in pixels.
* @param v Vehicle to get the width for.
* @return Width of the vehicle.
*/
int GetVehicleWidth(const Vehicle *v, EngineImageType image_type)
{
if (v->type == VEH_TRAIN || v->type == VEH_ROAD) {
int vehicle_width = 0;
for (const Vehicle *u = v; u != NULL; u = u->Next()) {
vehicle_width += GetSingleVehicleWidth(u, image_type);
}
return vehicle_width;
} else {
return GetSingleVehicleWidth(v, image_type);
}
}
/**
* Set the mouse cursor to look like a vehicle.
* @param v Vehicle
* @param image_type Type of vehicle image to use.
*/
void SetMouseCursorVehicle(const Vehicle *v, EngineImageType image_type)
{
bool rtl = _current_text_dir == TD_RTL;
_cursor.sprite_count = 0;
int total_width = 0;
for (; v != NULL; v = v->HasArticulatedPart() ? v->GetNextArticulatedPart() : NULL) {
if (total_width >= 2 * (int)VEHICLEINFO_FULL_VEHICLE_WIDTH) break;
PaletteID pal = (v->vehstatus & VS_CRASHED) ? PALETTE_CRASH : GetVehiclePalette(v);
VehicleSpriteSeq seq;
v->GetImage(rtl ? DIR_E : DIR_W, image_type, &seq);
if (_cursor.sprite_count + seq.count > lengthof(_cursor.sprite_seq)) break;
for (uint i = 0; i < seq.count; ++i) {
PaletteID pal2 = (v->vehstatus & VS_CRASHED) || !seq.seq[i].pal ? pal : seq.seq[i].pal;
_cursor.sprite_seq[_cursor.sprite_count].sprite = seq.seq[i].sprite;
_cursor.sprite_seq[_cursor.sprite_count].pal = pal2;
_cursor.sprite_pos[_cursor.sprite_count].x = rtl ? -total_width : total_width;
_cursor.sprite_pos[_cursor.sprite_count].y = 0;
_cursor.sprite_count++;
}
total_width += GetSingleVehicleWidth(v, image_type);
}
int offs = ((int)VEHICLEINFO_FULL_VEHICLE_WIDTH - total_width) / 2;
if (rtl) offs = -offs;
for (uint i = 0; i < _cursor.sprite_count; ++i) {
_cursor.sprite_pos[i].x += offs;
}
UpdateCursorSize();
}
|