@@ -14,46 +14,46 @@ public static class ServiceCollectionExtensions
1414 public static IServiceCollection AddMapObjects ( this IServiceCollection services )
1515 {
1616 services
17- . AddSingleton < MapDefinition , Aim_Headshot > ( )
18- . AddSingleton < MapDefinition , Aim_Headshot2 > ( )
19- . AddSingleton < MapDefinition , Area51 > ( )
20- . AddSingleton < MapDefinition , Area66 > ( )
21- . AddSingleton < MapDefinition , Compound > ( )
22- . AddSingleton < MapDefinition , CrackFactory > ( )
23- . AddSingleton < MapDefinition , cs_assault > ( )
24- . AddSingleton < MapDefinition , cs_deagle5 > ( )
25- . AddSingleton < MapDefinition , cs_opposition > ( )
26- . AddSingleton < MapDefinition , cs_rockwar > ( )
27- . AddSingleton < MapDefinition , cs_train > ( )
28- . AddSingleton < MapDefinition , DesertGlory > ( )
29- . AddSingleton < MapDefinition , de_aztec > ( )
30- . AddSingleton < MapDefinition , de_dust2 > ( )
31- . AddSingleton < MapDefinition , de_dust2x1 > ( )
32- . AddSingleton < MapDefinition , de_dust2x2 > ( )
33- . AddSingleton < MapDefinition , de_dust2x3 > ( )
34- . AddSingleton < MapDefinition , de_dust2x4 > ( )
35- . AddSingleton < MapDefinition , de_dust2x5 > ( )
36- . AddSingleton < MapDefinition , de_dust2_small > ( )
37- . AddSingleton < MapDefinition , de_dust5 > ( )
38- . AddSingleton < MapDefinition , fy_iceworld > ( )
39- . AddSingleton < MapDefinition , fy_iceworld2 > ( )
40- . AddSingleton < MapDefinition , fy_snow > ( )
41- . AddSingleton < MapDefinition , fy_snow2 > ( )
42- . AddSingleton < MapDefinition , GateToHell > ( )
43- . AddSingleton < MapDefinition , mp_island > ( )
44- . AddSingleton < MapDefinition , mp_jetdoor > ( )
45- . AddSingleton < MapDefinition , PleasureDomes > ( )
46- . AddSingleton < MapDefinition , RC_Battlefield > ( )
47- . AddSingleton < MapDefinition , RC_Battlefield2 > ( )
48- . AddSingleton < MapDefinition , SA_Hill > ( )
49- . AddSingleton < MapDefinition , Simpson > ( )
50- . AddSingleton < MapDefinition , TheBunker > ( )
51- . AddSingleton < MapDefinition , TheConstruction > ( )
52- . AddSingleton < MapDefinition , TheWild > ( )
53- . AddSingleton < MapDefinition , WarZone > ( )
54- . AddSingleton < MapDefinition , WarZone2 > ( )
55- . AddSingleton < MapDefinition , ZM_Italy > ( )
56- . AddSingleton < MapDefinition , zone_paintball > ( ) ;
17+ . AddMapDefinition < Aim_Headshot > ( )
18+ . AddMapDefinition < Aim_Headshot2 > ( )
19+ . AddMapDefinition < Area51 > ( )
20+ . AddMapDefinition < Area66 > ( )
21+ . AddMapDefinition < Compound > ( )
22+ . AddMapDefinition < CrackFactory > ( )
23+ . AddMapDefinition < cs_assault > ( )
24+ . AddMapDefinition < cs_deagle5 > ( )
25+ . AddMapDefinition < cs_opposition > ( )
26+ . AddMapDefinition < cs_rockwar > ( )
27+ . AddMapDefinition < cs_train > ( )
28+ . AddMapDefinition < DesertGlory > ( )
29+ . AddMapDefinition < de_aztec > ( )
30+ . AddMapDefinition < de_dust2 > ( )
31+ . AddMapDefinition < de_dust2x1 > ( )
32+ . AddMapDefinition < de_dust2x2 > ( )
33+ . AddMapDefinition < de_dust2x3 > ( )
34+ . AddMapDefinition < de_dust2x4 > ( )
35+ . AddMapDefinition < de_dust2x5 > ( )
36+ . AddMapDefinition < de_dust2_small > ( )
37+ . AddMapDefinition < de_dust5 > ( )
38+ . AddMapDefinition < fy_iceworld > ( )
39+ . AddMapDefinition < fy_iceworld2 > ( )
40+ . AddMapDefinition < fy_snow > ( )
41+ . AddMapDefinition < fy_snow2 > ( )
42+ . AddMapDefinition < GateToHell > ( )
43+ . AddMapDefinition < mp_island > ( )
44+ . AddMapDefinition < mp_jetdoor > ( )
45+ . AddMapDefinition < PleasureDomes > ( )
46+ . AddMapDefinition < RC_Battlefield > ( )
47+ . AddMapDefinition < RC_Battlefield2 > ( )
48+ . AddMapDefinition < SA_Hill > ( )
49+ . AddMapDefinition < Simpson > ( )
50+ . AddMapDefinition < TheBunker > ( )
51+ . AddMapDefinition < TheConstruction > ( )
52+ . AddMapDefinition < TheWild > ( )
53+ . AddMapDefinition < WarZone > ( )
54+ . AddMapDefinition < WarZone2 > ( )
55+ . AddMapDefinition < ZM_Italy > ( )
56+ . AddMapDefinition < zone_paintball > ( ) ;
5757
5858 services
5959 . AddSingleton ( sp =>
@@ -67,4 +67,23 @@ public static IServiceCollection AddMapObjects(this IServiceCollection services)
6767
6868 return services ;
6969 }
70+
71+ /// <summary>
72+ /// Registers a custom map definition.
73+ /// </summary>
74+ /// <typeparam name="T">
75+ /// The type of the map definition to register.
76+ /// </typeparam>
77+ /// <param name="services">
78+ /// The <see cref="IServiceCollection"/> to add the map definition to.
79+ /// </param>
80+ /// <returns>
81+ /// The same <see cref="IServiceCollection"/> instance so that additional calls can be chained.
82+ /// </returns>
83+ public static IServiceCollection AddMapDefinition < T > ( this IServiceCollection services )
84+ where T : MapDefinition
85+ {
86+ services . AddSingleton < MapDefinition , T > ( ) ;
87+ return services ;
88+ }
7089}
0 commit comments