33#include " PickingCommon.as"
44#include " ApprovedTeams.as"
55#include " BindingsCommon.as"
6+ #include " TranslationsSystem.as"
67
78class SpecAllCommand : ChatCommand
89{
910 SpecAllCommand()
1011 {
11- super (" specall" , " Puts everyone in Spectators " );
12+ super (" specall" , Descriptions :: specallcomtext );
1213 }
1314
1415 bool canPlayerExecute(CPlayer @ player )
@@ -33,7 +34,7 @@ class AppointCommand : ChatCommand
3334{
3435 AppointCommand()
3536 {
36- super (" appoint" , " Appoints two Team Leaders (they pick players in their teams) " );
37+ super (" appoint" , Descriptions :: appointcomtext );
3738 AddAlias(" caps" );
3839 SetUsage(" <blue leader username> <red leader username>" );
3940 }
@@ -94,7 +95,7 @@ class DemoteCommand : ChatCommand
9495{
9596 DemoteCommand()
9697 {
97- super (" demote" , " Demotes the Team Leaders " );
98+ super (" demote" , Descriptions :: demotecomtext );
9899 }
99100
100101 bool canPlayerExecute(CPlayer @ player )
@@ -115,7 +116,7 @@ class PickPlayerCommand : ChatCommand
115116{
116117 PickPlayerCommand()
117118 {
118- super (" pick" , " Picks one player FROM SPECTATORS to your team and passes an opportunity to pick to next Team Leader " );
119+ super (" pick" , Descriptions :: pickcomtext );
119120 SetUsage(" <username>" );
120121 }
121122
@@ -164,7 +165,7 @@ class ApproveTeamsCommand : ChatCommand
164165{
165166 ApproveTeamsCommand()
166167 {
167- super (" lock" , " Ends picking process by approving team personnel " );
168+ super (" lock" , Descriptions :: lockcomtext );
168169 }
169170
170171 bool canPlayerExecute(CPlayer @ player )
@@ -187,24 +188,10 @@ class ApproveTeamsCommand : ChatCommand
187188 approved_teams.ClearLists();
188189 if (! was_locked) {
189190 approved_teams.FormLists();
190- if (g_locale == " ru" )
191- {
192- server_AddToChat(" Команды сформированы" , SColor(0xff474ac6 ));
193- }
194- else
195- {
196- server_AddToChat(" Teams locked" , SColor(0xff474ac6 ));
197- }
191+ server_AddToChat(Descriptions :: lockcomchatloc, SColor(0xff474ac6 ));
198192 }
199193 else
200- if (g_locale == " ru" )
201- {
202- server_AddToChat(" Команды расформированы" , SColor(0xff474ac6 ));
203- }
204- else
205- {
206- server_AddToChat(" Teams unlocked" , SColor(0xff474ac6 ));
207- }
194+ server_AddToChat(Descriptions :: lockcomchatunl, SColor(0xff474ac6 ));
208195
209196 approved_teams.PrintMembers();
210197 rules.set(" approved_teams" , @ approved_teams );
@@ -215,7 +202,7 @@ class SetBuilderLimitCommand : ChatCommand
215202{
216203 SetBuilderLimitCommand()
217204 {
218- super (" blim" , " Limits count of builders for every team " );
205+ super (" blim" , Descriptions :: builderlimtext );
219206 SetUsage(" <builder limit>" );
220207 }
221208
@@ -240,15 +227,15 @@ class SetBuilderLimitCommand : ChatCommand
240227
241228 rules.set_u8(" builders_limit" , parseInt(args[0 ]));
242229
243- if (isServer()) server_AddToChat(" Максимум строителей теперь " + args[0 ], SColor(0xff474ac6 ));
230+ if (isServer()) server_AddToChat(Descriptions :: builderlimchat + args[0 ], SColor(0xff474ac6 ));
244231 }
245232}
246233
247234class SetArcherLimitCommand : ChatCommand
248235{
249236 SetArcherLimitCommand()
250237 {
251- super (" alim" , " Limits count of archers for every team " );
238+ super (" alim" , Descriptions :: archerlimtext );
252239 SetUsage(" <archer limit>" );
253240 }
254241
@@ -273,15 +260,15 @@ class SetArcherLimitCommand : ChatCommand
273260
274261 rules.set_u8(" archers_limit" , parseInt(args[0 ]));
275262
276- if (isServer()) server_AddToChat(" Максимум лучников теперь " + args[0 ], SColor(0xff474ac6 ));
263+ if (isServer()) server_AddToChat(Descriptions :: archerlimchat + args[0 ], SColor(0xff474ac6 ));
277264 }
278265}
279266
280267class ToggleClassChangingOnShops : ChatCommand
281268{
282269 ToggleClassChangingOnShops()
283270 {
284- super (" togglechclass" , " Disallowing class changing on shops " );
271+ super (" togglechclass" , Descriptions :: togglechcomtext );
285272 }
286273
287274 bool canPlayerExecute(CPlayer @ player )
@@ -298,19 +285,19 @@ class ToggleClassChangingOnShops : ChatCommand
298285 bool isEnable = rules.get_bool(" no_class_change_on_shop" );
299286 rules.set_bool(" no_class_change_on_shop" , ! isEnable);
300287 // printf("Boolean no_class_change_on_shop is " + rules.get_bool("no_class_change_on_shop"));
301- string isEnableStr = " включена " ;
288+ string isEnableStr = Descriptions :: togglechcom2 ;
302289 if (! isEnable) {
303- isEnableStr = " выключена " ;
290+ isEnableStr = Descriptions :: togglechcom3 ;
304291 }
305- if (isServer()) server_AddToChat(" Смена классов теперь " + isEnableStr, SColor(0xff474ac6 ));
292+ if (isServer()) server_AddToChat(Descriptions :: togglechcomchat + isEnableStr, SColor(0xff474ac6 ));
306293 }
307294}
308295
309296class BindingsMenu : ChatCommand
310297{
311298 BindingsMenu()
312299 {
313- super (" bindings" , " Show mod bindings menu " );
300+ super (" bindings" , Descriptions :: bindingscom );
314301 }
315302
316303 bool canPlayerExecute(CPlayer @ player )
@@ -335,4 +322,4 @@ class BindingsMenu : ChatCommand
335322
336323 // printf("Boolean no_class_change_on_shop is " + rules.get_bool("no_class_change_on_shop"));
337324 }
338- }
325+ }
0 commit comments