-- Copyright (C) 2025 Anatoly Raev
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU Affero General Public License as
-- published by the Free Software Foundation, either version 3 of the
-- License, or (at your option) any later version.
--
-- This program 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 Affero General Public License for more details.
--
-- You should have received a copy of the GNU Affero General Public License
-- along with this program.  If not, see <https://www.gnu.org/licenses/>.

MEL.DefineRecipe("714_new_number_ranges", "gmod_subway_81-714_mvm")
function RECIPE:Inject(ent)
    -- некрасиво? да.
    if MEL.IsDebug() then
        ent.NumberRanges = {
            --714 МВМ
            {true, {0413, 0414, 0415, 0416, 0417, 0418, 0419, 0420, 0430, 0431, 0432, 0433, 0434, 0435, 0436, 0437, 0438, 0439, 0440, 0441, 0442, 0443, 0444, 0445, 0446, 0447, 0448, 0449, 0450, 0451, 0452, 0453, 0455, 0456, 0457, 0458, 0460, 0461, 0462, 0464, 0465, 0466, 0467, 0468, 0469, 0470, 0471, 0472, 0473, 0474, 0475, 0476, 0477, 0478, 0479, 0480, 0481, 0482, 0483, 0484, 0485, 0486, 0487, 0488, 0489, 0490, 0491, 0492, 0493, 0494, 0495, 0496}, {false, false, true, true, {"Def_717MSKWhite", "Def_717MSKWood4"}}},
            {
                true,
                {9495, 9505, 9526, 9533, 9539, 9543, 9545, 9548, 9549, 9552, 9569, 9577, 9579, 9589, 9591, 9593, 9597, 9603, 9605, 9613, 9614, 9615, 9619, 9621, 9631, 9654, 9656, 9657, 9660, 9661, 9662, 9664, 9665, 9667, 9668, 9673, 9676, 9677, 9678, 9682, 9683, 9684, 9686, 9687, 9689, 9690, 9691, 9692, 9693, 9694, 9695, 9698, 9699, 9700, 9701, 9702, 9703, 9704, 9705, 9706, 9707, 9708, 9710, 9711, 9712, 9714, 9716, 9717, 9718, 9731, 9732, 9734, 9735, 9736, 9744, 9748, 9749, 9751, 9752, 9753, 9755, 9765, 9766, 9775, 9778, 9782, 9783, 9788, 9789, 9790, 9791, 9792, 9793, 9794, 9796, 9799, 9800, 9801, 9802, 9805, 9806, 9807, 9808, 9809, 9810, 9811, 9812, 9813, 9814, 9815, 9816, 9817, 9818, 9819, 9821, 9822, 9823, 9824, 9825, 9826, 9827, 9828, 9832, 9833, 9834, 9835, 9837, 9838, 9839, 9840, 9841, 9843, 9844, 9845, 9846, 9847, 9848, 9849, 9850, 9851, 9852, 9853, 9854, 9855, 9856, 9857, 9858, 9859, 9884, 9885, 9886, 9887, 9888, 9889, 9890, 9891, 9892, 9893, 9894, 9895, 9896, 9897, 9898, 9899, 9900, 9901, 9902, 9903, 9904, 9905, 9906, 9907, 9908, 9909, 9910, 9911, 9912, 9913, 9914, 9915, 9916, 9917, 9918, 9919, 9920, 9921, 9922, 9926, 9927, 9928, 9929, 9930, 9931, 9932, 9933, 9934, 9935, 9936, 9937, 9938, 9939, 9940, 9941, 9942, 9943, 9944, 9945, 9946, 9947, 9948, 9953, 9954, 9955, 9956, 9957, 9958, 9965, 9966, 9967, 9968, 9969, 9970, 9971, 9972, 9973, 9977, 9978, 9979, 9981, 9982, 9983, 9984, 9985, 9986, 9987, 9988, 9989, 9990, 9991, 9992, 9993},
                {
                    false, --[[ "Def_717MSKWood",--]]
                    false,
                    false,
                    true,
                    {"Def_717MSKBlue", "Def_717MSKWhite", "Def_717MSKWood2"}
                }
            },
            --714 ЛВЗ
            {
                true,
                {7237, 7317, 7327, 7334, 7336, 7339, 7340, 7343, 7345, 7346, 7347, 7356, 7366, 7420, 7423, 7424, 7426, 7491, 7492, 7493, 7494, 7495, 7496, 7497, 7498, 7499, 7500, 7501, 7502, 7503, 7505, 7506, 7507, 7508, 7509, 7510, 7511, 7512, 7514, 7517, 7519, 7520, 7521, 7522, 7523, 7524, 7525, 7528, 7529, 7530, 7531, 7532, 7534, 7535, 7536, 7537, 7538, 7539, 7540, 7541, 7542, 7543, 7544, 7545, 7547, 7549, 7550, 7551, 7552, 7553, 7554, 7555, 7559, 7561, 7563, 7564, 7565, 7566, 7567, 7568, 7569, 7570, 7572, 7573, 7574, 7575, 7576, 7578, 7579, 7580, 7581, 7582, 7583, 7585, 7587, 7589, 7590, 7591, 7592, 7593, 7594, 7595, 7596, 7620, 7621, 7622, 7623, 7624, 7625, 7627, 7628, 7629, 7630, 7631, 7633, 7634, 7637, 7639, 7640, 7641, 7642, 7643, 7644, 7646, 7647, 7648, 7650, 7651, 7693, 7695, 7696, 7697, 7698, 7703, 7704, 7705, 7706, 7732, 7734, 7738, 7739, 7740, 7741, 7742, 7743, 7744, 7745, 7746, 7747, 7748, 7749, 7750, 7751, 7752, 7753, 7754, 7755, 7756, 7757, 7758, 7759, 7760, 7761, 7762, 7763, 7764, 7766, 7767, 7768, 7769, 7770, 7771, 7772, 7876, 7878, 7879, 7880, 7882, 7883, 7887, 7890, 7891, 7892, 7893, 7894, 7895, 7896, 7897, 7898, 7899, 7900, 7901, 7902, 7903, 7904, 7905, 7906, 7907, 7908, 7909, 7910, 7911, 7912, 7913, 7914, 7915, 7916, 7917, 7918, 7920, 7921, 7922, 7923, 7924, 7925, 7926, 7927, 7928, 7929, 7930, 7931, 7933, 7935, 7937, 7950, 7951, 7952, 7953, 7954, 7955, 7956, 7957, 7958, 7959, 7960, 7961, 7968, 7969, 7970, 7971, 7972, 7973, 7979, 7981, 7982, 7983, 7984, 7985, 7986, 7987, 7988, 7989, 7990, 7991, 7992, 7994, 7995, 7996, 7997, 8012, 8018, 8020, 8021, 8023, 8024, 8025, 8026, 8036, 8043, 8044, 8045, 8046, 8053, 8062, 8063, 8064, 8065, 8071, 8072, 8073, 8074, 8075, 8076, 8078, 8079, 8080, 8081, 8083, 8084, 8086, 8087, 8088, 8089, 8093, 8094, 8095, 8096, 8097, 8098, 8099, 8100, 8101, 8102, 8103, 8104, 8105, 8106, 8107, 8110, 8111, 8113, 8114, 8115, 8116, 8117, 8135, 8136, 8137, 8138, 8139, 8140, 8141, 8142,},
                --{true,false,false,false,{"Def_717MSKWhite","Def_717MSKWood4"},true}
                {true, false, false, true, {"Def_717MSKWhite", "Def_717MSKWood4"}}
            },
            --717.5 МВМ
            {
                true,
                {0497, 0498, 0499, 0500, 0501, 0502, 0503, 0504, 0505, 0506, 0507, 0508, 0509, 0510, 0511, 0512, 0513, 0514, 0515, 0516, 0517, 0518, 0519, 0520, 0521, 0522, 0523, 0524, 0525, 0526, 0527, 0528, 0529, 0530, 0531, 0532, 0533, 0534, 0535, 0536, 0536, 0538, 0539, 0540, 0541, 0542, 0543, 0544, 0545, 0546, 0547, 0548, 0549, 0550, 0551, 0552, 0553, 0554},
                --{false, true,false,true,{"Def_717MSKWhite","Def_717MSKWood4"},true,true}
                {false, false, false, true, {"Def_717MSKWhite", "Def_717MSKWood4"}}
            },
            {true, {0623, 0624, 0625, 0626, 0627, 0628, 0629, 0630, 0631, 0632, 0633, 0634, 0635, 0636, 0637, 0638, 0639, 0640, 0641, 0642, 0643, 0644, 0645, 0646, 0647, 0648, 0649, 0650, 0651, 0652, 0653, 0654, 0655, 0656, 0657, 0658, 0662, 0663, 0664, 0665, 0666, 0667, 0668, 0669, 0670, 0671, 0672, 0673, 0674, 0682, 0684, 0685, 0686, 0687, 0688, 0689, 0690, 0691, 0692, 0693, 0694, 0695, 0696, 0697, 0698, 0699, 0703, 0704, 0705, 0712, 0713, 074, 0715, 0722, 0723, 0724, 0725, 0726, 0727, 0728, 0729, 0730, 0731, 0732, 0733, 0734, 0735, 0736, 0737, 0738, 0739, 0752, 0753, 0754, 0755, 0756, 0757, 0758, 0759, 0760, 0761, 0762, 0763, 0764, 0765, 0766, 0767, 0768, 0769, 0770, 0771, 0781, 0782, 0783, 0786, 0787, 0788, 0795, 0796, 0797, 0798, 0802, 0803, 0804, 0805, 0806, 0807, 0808, 0809, 0810, 0811, 0812, 0813, 0814, 0818, 0819, 0820, 0821, 0822, 0823, 0824, 0825, 0826, 0827, 0828, 0829, 0830, 0831, 0833, 0834, 0835, 0836, 0837, 0838, 0839, 0840, 0841, 0842, 0843, 0844, 0845, 0846, 0847, 0848, 0849, 0855, 0856, 0857, 0858, 0859, 0860, 0861, 0862, 0863, 0864, 0867, 0872, 0874, 0875, 0876, 0877, 0880, 0881, 0882, 0883, 0884, 0885, 0886, 0887, 0890, 0891, 0892, 0893, 0894, 0895, 0896, 0897, 0902, 0903, 0904, 0905, 0906, 0907, 0908, 0909, 0916, 0917, 0918}, {false, true, true, true, {"Def_717MSKWhite", "Def_717MSKWood4"}}},
            --717.5 ЛВЗ
            {true, {8204, 8205, 8207, 8208, 8209, 8210, 8211, 8212, 8213, 8214, 8216, 8217, 8218, 8219, 8220, 8221, 8222, 8223, 8224, 8225, 8226, 8227, 8228, 8229, 8230, 8231, 8232, 8233, 8234, 8235, 8236, 8237, 8238, 8239, 8270, 8271, 8272, 8273, 8274, 8275, 8276, 8278, 8279, 8280, 8281, 8282, 8283, 8284, 828, 8286, 8287, 8288, 8289, 8290, 8291, 8292, 8293, 8294, 8295, 8296, 8297, 8298, 8299, 8300, 8301, 8302, 8303, 8304, 8305, 8306, 8307, 8309, 8312, 8343, 8360, 8361, 8362, 8363, 8364, 8365, 8366, 8367, 8368, 8368, 8370, 8377, 8378, 8379, 8380, 8381, 8382, 8383, 8384, 8385, 8386, 8387, 8388}, {true, true, false, true, {"Def_717MSKWhite", "Def_717MSKWood4"}}},
            {true, {11021, 11022, 11023, 11024, 11025, 11026, 11029, 11030, 11031, 11032, 11033, 11034, 11035, 11036, 11037, 11038, 11039, 11040, 11075, 11076, 11079, 11089, 11092, 11093, 11094, 11095, 11096, 11097, 11098, 11099, 1117, 11119, 11120, 11121, 11122, 11123, 1112411125, 11126, 11127, 11128, 11129, 11130, 11131, 11132, 11133, 11139, 11140, 11142, 11143, 11144, 11145, 11146, 11147, 11148, 11149, 11150, 11151, 11152, 11153, 11154, 11155, 11158, 11159, 11160, 11161, 11162, 11163, 11164, 11165, 11166, 11169, 11170, 11171, 11172, 11175, 11176, 11177, 11178, 11179, 11180, 11183, 11184, 11185, 11186, 11193, 11194, 11195, 11197, 11198, 11199, 11200, 11201, 11202, 11203, 11204, 11205, 11206, 11207, 11208, 11212, 11213, 11214, 11216, 11217, 11218, 11219, 11221, 11222, 11223, 11224, 11226, 11227, 11228, 11229, 11230, 11231, 11232, 11233, 11234, 11235, 11236, 11237, 11238, 11239, 11240, 11248, 11250, 11251, 11252, 11253, 11256, 11257, 11264, 11265, 11266, 11267, 11268, 11269, 11270, 11272, 11274, 11275, 11276, 11277, 11278, 11279, 11280, 11281, 11282, 11283, 11286, 11287, 11288, 11289, 11290, 11291, 11295, 11299, 11307, 11308, 11309, 11310, 11311, 11312, 11313, 11314, 11315, 11317, 11318, 11319, 11320, 11321, 11324, 11325, 11326, 11327, 11328, 11329, 11330, 11331, 11332, 11333, 11334, 11358, 11359, 11361, 11363, 11365, 11366, 11376}, {true, true, true, true, {"Def_717MSKWhite", "Def_717MSKWood4"}}},
        }
    end

    -- 714 MVM
    for i = 9737, 9745 do
        table.insert(ent.NumberRanges[2][2], i)
    end

    for i = 9754, 9768 do
        table.insert(ent.NumberRanges[2][2], i)
    end

    for i = 9949, 9952 do
        table.insert(ent.NumberRanges[2][2], i)
    end

    for i = 7652, 7654 do
        table.insert(ent.NumberRanges[2][2], i)
    end

    -- 714.5 LVZ
    for i = 11552, 11557 do
        table.insert(ent.NumberRanges[7][2], i)
    end

    for i = 8344, 8359 do
        table.insert(ent.NumberRanges[6][2], i)
    end

    for i = 0898, 0900 do
        table.insert(ent.NumberRanges[6][2], i)
    end

    for i = 8371, 8376 do
        table.insert(ent.NumberRanges[6][2], i)
    end

    --
    for i = 11302, 11305 do
        table.insert(ent.NumberRanges[7][2], i)
    end

    table.Add(ent.NumberRanges[7][2], {11316, 11338, 11354, 11379, 11380, 11395, 11396, 11410, 11411, 11413, 11414, 11421, 11422, 11424, 11425, 11429, 11430, 11460, 11461, 11462, 11463, 11464, 11465, 11466, 11467, 11468, 11469, 11470, 11471})
end
