forked from leo7044/CnC_TA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTACS.user.js
3848 lines (3670 loc) · 208 KB
/
TACS.user.js
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
// ==UserScript==
// @name TACS (Tiberium Alliances Combat Simulator)
// @description Allows you to simulate combat before actually attacking.
// @downloadURL https://raw.githubusercontent.com/leo7044/CnC_TA/master/TACS.user.js
// @updateURL https://raw.githubusercontent.com/leo7044/CnC_TA/master/TACS.user.js
// @include http*://prodgame*.alliances.commandandconquer.com/*/index.aspx*
// @include http*://cncapp*.alliances.commandandconquer.com/*/index.aspx*
// @version 3.52b.1
// @author KRS_L | Contributions/Updates by WildKatana, CodeEcho, PythEch, Matthias Fuchs, Enceladus, TheLuminary, Panavia2, Da Xue, MrHIDEn, TheStriker, JDuarteDJ, null, g3gg0.de
// @contributor leo7044 (https://github.com/leo7044)
// @translator TR: PythEch | DE: Matthias Fuchs, Leafy & sebb912 | PT: JDuarteDJ & Contosbarbudos | IT: Hellcco | NL: SkeeterPan | HU: Mancika | FR: Pyroa & NgXAlex | FI: jipx | RO: MoshicVargur
// @grant none
// ==/UserScript==
window.TACS_version = GM_info.script.version;
(function () {
'use strict';
var TASuite_mainFunction = function () {
console.log("TACS: Simulator loaded");
/* not used
function compare(a, b) {
return a - b;
}
function sort_and_unique(my_array) {
my_array.sort(compare);
for (var i = 1; i < my_array.length; i++) {
if (my_array[i] === my_array[i - 1]) {
my_array.splice(i--, 1);
}
}
return my_array;
}*/
var locale = null;
var languages = ["tr_TR", "de_DE", "pt_PT", "it_IT", "nl_NL", "hu_HU", "fr_FR", "fi_FI", "ro_RO"]; //en is default
var translations = {
"Stats" : ["İstatistik", "Statistik", "Estatística", "Statistiche", "Statistieken", "Statisztika", "Statistiques", "Tiedot", "Statistici"],
"Enemy Base:" : ["Düşman Üssü:", "Feindliche Basis:", "Base Inimiga:", "Base Nemica:", "Vijandelijke Basis:", "Ellenséges bázis:", "Base Ennemie:", "Vihollisen tukikohta:", "Baza inamică"],
"Defences:" : ["Savunma Üniteleri:", "Verteidigung:", "Defesas:", "Difesa:", "Verdediging:", "Védelem:", "Défenses:", "Puolustus:", "Apărare"],
"Buildings:" : ["Binalar:", "Gebäude:", "Edifícios:", "Strutture:", "Gebouwen:", "Épületek:", "Bâtiments:", "Rakennelmat:", "Clădiri"],
"Construction Yard:" : ["Şantiye:", "Bauhof:", "Estaleiro:", "Cantiere:", "Bouwplaats:", "Központ:", "Chantier De Construction:", "Rakennustukikohta:", "Șantierul de construcții"],
"Defense Facility:" : ["Savunma Tesisi:", "Verteidigungseinrichtung:", "Instalações de Defesa:", "Stazione di Difesa:", "Defensiefaciliteit:", "Védelmi Bázis:", "Complexe De Défense:", "Puolustuslaitos:", "Unitate de apărare"],
"Command Center:" : ["Komuta Merkezi:", "Kommandozentrale:", "Centro de Comando:", "Centro di Comando:", "Commandocentrum:", "Parancsnoki központ:", "Centre De Commandement:", "Komentokeskus:", "Centrul de comandă"],
"Available Repair:" : ["Mevcut Onarım:", "Verfügbare Reparaturen", "", "", "", "", "", "Korjausaikaa jäljellä:", "Timp de reparare disponibil"],
"Available Attacks:" : ["Mevcut Saldırılar:", "Verfügbare Angriffe", "", "", "", "", "", "Hyökkäyksiä:", "Atacuri disponibile"],
"Overall:" : ["Tüm Birlikler:", "Gesamt:", "Geral:", "Totale:", "Totaal:", "Áttekintés:", "Total:", "Yhteensä:", "Ansamblu"],
"Infantry:" : ["Piyadeler:", "Infanterie:", "Infantaria:", "Fanteria:", "Infanterie:", "Gyalogság:", "Infanterie:", "Jalkaväki:", "Infanterie"],
"Vehicle:" : ["Motorlu Birlikler:", "Fahrzeuge:", "Veículos:", "Veicoli:", "Voertuigen:", "Jármu:", "Véhicules:", "Ajoneuvot:", "Vehicule"],
"Aircraft:" : ["Hava Araçları:", "Flugzeuge:", "Aviões:", "Velivoli:", "Vliegtuigen:", "Légiero:", "Avions:", "Lentokoneet:", "Aviație"],
"Outcome:" : ["Sonuç:", "Ergebnis:", "Resultado:", "Esito:", "Uitkomst:", "Eredmény:", "Résultat:", "Lopputulos:", "Rezultat"],
"Unknown" : ["Bilinmiyor", "Unbekannt", "Desconhecido", "Sconosciuto", "Onbekend", "Ismeretlen", "Inconnu", "Tuntematon", "Necunoscut"],
"Battle Time:" : ["Savaş Süresi:", "Kampfdauer:", "Tempo de Batalha:", "Tempo di Battaglia:", "Gevechtsduur:", "Csata ideje:", "Durée Du Combat:", "Taistelun kesto:", "Timp de atac"],
"Layouts" : ["Diziliş", "Layouts", "Formações", "Formazione", "Indelingen", "Elrendezés", "Dispositions", "Asetelmat", "Scheme"],
"Load" : ["Yükle", "Laden", "Carregar", "Carica", "Laad", "Töltés", "Charger", "Lataa", "Încarcă"],
"Load this saved layout." : ["Kayıtlı dizilişi yükle.", "Gespeichertes Layout laden.", "Carregar esta formação guardada.", "Carica questa formazione salvata.", "Laad deze opgeslagen indeling.", "Töltsd be ezt az elmentett elrendezést.", "Charger Cette Disposition.", "Lataa valittu asetelma.", "Încarcă acest formație salvată."],
"Delete" : ["Sil", "Löschen", "Apagar", "Cancella", "Verwijder", "Törlés", "Effacer", "Poista", "Șterge"],
"Name: " : ["İsim: ", "Name: ", "Nome: ", "Nome: ", "Naam: ", "Név: ", "Nom: ", "Nimi: ", "Nume: "],
"Delete this saved layout." : ["Kayıtlı dizilişi sil.", "Gewähltes Layout löschen.", "Apagar esta formação guardada.", "Cancella questa formazione salvata.", "Verwijder deze opgeslagen indeling.", "Töröld ezt az elmentett elrendezést.", "Effacer Cette Disposition.", "Poista valittu asetelma.", "Șterge acest formație salvat."],
"Save" : ["Kaydet", "Speichern", "Guardar", "Salva", "Opslaan", "Mentés", "Sauvegarder", "Tallenna", "Salvează"],
"Save this layout." : ["Bu dizilişi kaydet.", "Layout speichern.", "Guardar esta formação.", "Salva questa formazione.", "Deze indeling opslaan.", "Mentsd el ezt az elrendezést.", "Sauvegarder Cette Disposition.", "Tallenna nykyinen asetelma.", "Salvează acest formație "],
"Info" : ["Bilgi", "Info", "Info", "Info", "Info", "Info", "Infos", "Tietoa", "Info"],
"Forums" : ["Forum", "Forum", "Fóruns", "Forum", "Forums", "Fórum", "Forums", "Keskustelupalsta", "Forum"],
"Spoils" : ["Ganimetler", "Rohstoffausbeute", "Espólios", "Bottino", "Opbrengst", "Zsákmény", "Butin", "Sotasaalis", "Pradă"],
"Options" : ["Seçenekler", "Optionen", "Opções:", "Opzioni:", "Opties:", "Opciók:", "Options:", "Asetukset", "Opțiuni"],
"TACS Options": ["TACS Seçenekleri", "TACS Optionen", "", "", "", "", "", "", "Opțiuni TACS: "],
"Auto display stats" : ["İstatistik penceresini otomatik olarak göster", "Dieses Fenster automatisch öffnen", "Mostrar esta caixa automaticamente", "Apri automaticamente la finestra Strumenti", "Dit venster automatisch weergeven", "Ezen ablak autómatikus megjelenítése", "Affich. Auto. de cette Fenêtre", "Näytä simuloinnin tiedot automaattisesti", "Afișează automat statisticile"], // need to change translations
"Show shift buttons" : ["Kaydırma tuşlarını göster", "Bewegungstasten anzeigen", "Mostrar botões de deslocamento", "Mostra i pulsanti di spostamento", "Verschuifknoppen weergeven", "Eltoló gombok megjelenítése", "Affich. Auto. Boutons de Déplacement", "Näytä armeijan siirtopainikkeet", "Afișează butoanele de deplasare"],
"Warning!" : ["Uyarı!", "Warnung!", "Aviso!", "Attenzione!", "Waarschuwing!", "Figyelem!", "Attention!", "Varoitus!", "Atenție!"],
"Simulate" : ["Simule et", "Simulieren", "Simular", "Simula", "Simuleer", "Szimuláció", "Simuler", "Simuloi", "Simulează"],
"Start Combat Simulation" : ["Savaş Simulasyonunu Başlat", "Kampfsimulation starten", "Começar a simalação de combate", "Avvia simulazione", "Start Gevechtssimulatie", "Csata szimuláció elindítása", "Démarrer La Simulation Du Combat", "Aloita taistelun simulaatio", "Începe simularea luptei"],
"Setup" : ["Düzen", "Aufstellung", "Configuração", "Setup", "Opzet", "Elrendezés", "Organisation", "Takaisin", "Pregătire"],
"Return to Combat Setup" : ["Ordu düzenini göster", "Zurück zur Einheitenaufstellung", "Voltar à configuração de combate", "Ritorna alla configurazione", "Keer terug naar Gevechtsopzet", "Vissza az egységek elrendezéséhez", "Retourner à l'Organisation Des Troupes", "Return to Combat Setup", "Întoarcere la ecranul pentru pregătirea luptei"],
"Unlock" : ["Kilidi aç", "Freigabe", "Desbloquear", "Sblocca", "Ontgrendel", "Felold", "Debloquer", "Avaa", "Descuie"],
//"Tools" : ["Araçlar", "Extras", "Ferramentas", "Strumenti", "Gereedschap", "Eszközök", "Outils", "Työkalut"],
"Open Simulator Tools" : ["Simulatör Araçlarını Göster", "Extras öffnen", "Abrir as ferramentas do simulador", "Apri strumenti", "Open Simulator Gereedschap", "Megnyitja a szimulátor információs ablakát", "Ouvrir Les Réglages Du Simulateur", "Avaa simulaattorin työkalut", "Deschide opțiunile simulatorului"],
"Shift units left" : ["Birlikleri sola kaydır", "Einheiten nach links bewegen", "Deslocar as unidades para a esquerda", "Spostare le unità a sinistra", "Verschuif eenheden links", "Egységek eltolása balra", "Déplacer Les Unités Vers La Gauche", "Siirtää yksikköjä vasemmalle", "Deplasează unitățile la stânga"],
"Shift units right" : ["Birlikleri sağa kaydır", "Einheiten nach rechts bewegen", "Deslocar as unidades para a direita", "Spostare le unità a destra", "Verschuif eenheden rechts", "Egységek eltolása jobbra", "Déplacer Les Unités Vers La Droite", "Siirtää yksikköjä oikealle", "Deplasează unitățile la dreapta"],
"Shift units up" : ["Birlikleri yukarı kaydır", "Einheiten nach oben bewegen", "Deslocar as unidades para cima", "Spostare le unità in alto", "Verschuif eenheden omhoog", "Egységek eltolása fel", "Déplacer Les Unités Vers Le Haut", "Siirtää yksikköjä ylös", "Deplasează unitățile mai sus"],
"Shift units down" : ["Birlikleri aşağı kaydır", "Einheiten nach unten bewegen", "Deslocar as unidades para baixo", "Spostare le unità in basso", "Verschuif eenheden omlaag", "Egységek eltolása le", "Déplacer Les Unités Vers Le Bas", "Siirtää yksikköjä alas", "Deplasează unitățile mai jos"],
//"Battle Simulator" : ["Savaş Simulatörü", "Kampfsimulator", "Simulador de Combate", "Simulatore", "Gevechtssimulator", "Csata szimulátor", "Simulateur De Combat", "Taistelusimulaattori"],
"Total Victory" : ["Mutlak Zafer", "Gesamtsieg", "Vitória Total", "Vittoria Totale", "Totale Overwinning", "Teljes gyozelem", "Victoire Totale", "Totaalinen Voitto","Victorie totală"],
"Victory" : ["Zafer", "Sieg", "Vitória", "Vittoria", "Overwinning", "Gyozelem", "Victoire", "Voitto", "Victorie"],
"Total Defeat" : ["Mutlak Yenilgi", "Totale Niederlage", "Derrota total", "Sconfitta Totale", "Totale Nederlaag", "Teljes vereség", "Défaite Totale", "Total Tappio", "Înfrângere totală"],
"Support lvl " : ["Takviye seviyesi ", "Stufe Supportwaffe ", "Nível do Suporte ", "Supporto lvl ", "Ondersteuningsniveau ", '"Support" épület szintje ', "Lvl. Du Support ", "Tukitykistön taso ", "Nivelul suportului "],
"Refresh" : ["Yenile", "Erfrischen", "Actualizar", "Rinfrescare", "Verversen", "Felfrissít", "Actualiser", "Päivitä", "Împrospătează"], //google translate non-PT langs
"Refresh Stats" : ["İstatistikleri Yenile", "Erfrischen Statistik", "Estatística", "Rinfrescare Statistiche", "Verversen Statistieken", "Frissítés Stats", "Actualiser Les Stats", "Päivitä tiedot", "Împrospătează statisticile"], //google translate non-PT langs 'refresh' + statistics label
"Side:" : ["Taraf:", "Seite", "Lado:", "", "Zijde", "", "Côté", "Sijainti:", "Lateral"],
"Left" : ["Sol", "Links", "Esquerda", "", "Links", "", "Gauche", "Vasen", "Stânga"],
"Right" : ["Sağ", "Rechts", "Direita", "", "Rechts", "", "Droite", "Oikea", "Dreapta"],
"Locks:" : ["Kilitler:", "Freigabe", "Bloquear:", "", "Vergrendelingen:", "", "Vérouiller:", "Varmistimet:", "Blochează:"],
"Attack" : ["Saldırı", "Angriff", "Atacar", "", "Aanvallen", "", "Attaquer", "Hyökkäys", "Atacă "],
"Repair" : ["Onarım", "Reparatur", "Reparar", "", "Repareren", "", "Réparer", "Korjaus", "Reparare"],
"Reset" : ["Sıfırla", "Zurücksetzen", "", "", "", "", "", "Palauta", "Resetare"],
"Simulation will be based on most recently refreshed stats!" : ["Simulasyon en son güncellenen istatistiklere göre yapılacaktır!", "Die Simulation basiert auf den zuletzt aktualisierten Stand", "A simulação vai ser baseada na mais recente data!", "", "Simulatie zal gebaseerd worden op meest recentelijke ververste statistieken!", "", "La Simulation sera basée en fonction des dernières stats actualisées !", "Simulaatio suoritetaan viimeisimmän päivityksen tiedoilla!", "Simularea se va baza pe cele mai recente statistici!"],
"Unlock Attack Button" : ["Saldırı Düğmesinin Kilidini Aç", "Angriffsbutton freigeben", "Desbloquear o botão de ataque", "Sblocca pulsante d'attacco", "Ontgrendel Aanvalsknop", "a Támadás gomb feloldása", "Débloquer Le Bouton d'Attaque", "Poista hyökkäusnapin lukitus", "Descuie butonul de atac"],
"Unlock Repair Button" : ["Onarım Düğmesinin Kilidini Aç", "Reparaturbutton freigeben", "Desbloquear botão de reparação", "", "Ontgrendel Repareerknop", "", "Débloquer Le Bouton de Réparation", "Poista korjausnapin lukitus", "Descuie butonul de reparare"],
"Unlock Reset Button" : ["Sıfırlama Düğmesinin Kilidini Aç", "", "", "", "", "", "", "Avaa Tyhjennä nappi", "Descuie butonul de resetare"],
"SKIP": ["ATLA", "Überspringen", "", "", "", "", "", "", ""],
"Skip to end" : ["Simulasyonu atla", "Zum Ende Vorspringen", "", "", "", "", "", "Mene loppuun", "Sari la final"],
"Reset Formation" : ["Dizilişi Sıfırla", "Formation zurücksetzen", "", "", "", "", "", "Palauta armeijan oletusasetelma", "Resetează formația"],
"Flip Horizontal" : ["Yatay Çevir", "Horizontal Spiegeln", "", "", "", "", "", "Käännä vaakasuunnassa", "Întoarce orizontal"],
"Flip Vertical" : ["Dikey Çevir", "Vertikal Spiegeln", "", "", "", "", "", "Käännä pystysuunnassa", "Întoarce vertical"],
"Activate All" : ["Hepsini Aktifleştir", "Alle Aktivieren", "", "", "", "", "", "Aktivoi kaikki", "Activează totul"],
"Deactivate All" : ["Hepsini Deaktifleştir", "Alle Deaktivieren", "", "", "", "", "", "Poista kaikki käytöstä", "Dezactivează totul"],
"Activate Infantry" : ["Piyadeleri Aktifleştir", "Infanterie Aktivieren", "", "", "", "", "", "Aktivoi jalkaväki", "Activează infanteria"],
"Deactivate Infantry" : ["Piyadeleri Deaktifleştir", "Infanterie Deaktivieren", "", "", "", "", "", "Poista jalkaväki käytöstä", "Dezactivează infanteria"],
"Activate Vehicles" : ["Motorlu Birlikleri Aktifleştir", "Fahrzeuge Aktivieren", "", "", "", "", "", "Aktivoi ajoneuvot", "Activează vehiculele"],
"Deactivate Vehicles" : ["Motorlu Birlikleri Deaktifleştir", "Fahrzeuge Deaktivieren", "", "", "", "", "", "Poista ajoneuvot käytöstä", "Dezactivează vehiculele"],
"Activate Air" : ["Hava Araçlarını Aktifleştir", "Flugzeuge Aktivieren", "", "", "", "", "", "Aktivoi lentokoneet", "Activează avioanele"],
"Deactivate Air" : ["Hava Araçlarını Deaktifleştir", "Flugzeuge Deaktivieren", "", "", "", "", "", "Poista lentokoneet käytöstä", "Dezactivează avioanele"],
"Activate Repair Mode" : ["Onarım Modunu Aç", "Reparatur Modus Aktivieren", "", "", "", "", "", "Aktivoi korjaustila", "Activează modul de reparare"],
"Deactivate Repair Mode" : ["Onarım Modunu Kapat", "Reparatur Modus Deaktivieren", "", "", "", "", "", "Poista korjaustila käytöstä", "Dezactivează modul de reparare"],
"Version: " : ["Sürüm: ", "", "", "", "", "", "", "Versio: ", "Versiunea: "],
"Mark saved targets on region map" : ["Kaydedilmiş hedefleri haritada işaretle", "Gespeicherte Ziele auf der Karte Markieren", "", "", "", "", "", "Merkitse tallennetut kohteet alue kartalle", "Marchează țintele salvate pe harta regiunii"], // region view
"Enable 'Double-click to (De)activate units'" : ["Çift-tıklama ile birlikleri (de)aktifleştirmeyi etkinleştir", "Doppel-Klick zum Einheiten (De)-Aktivieren ", "", "", "", "", "", "Tuplaklikkaus aktivoi/deaktivoi yksiköt", "Activează \"Dublu click pentru a (De)activa unitățile\""],
"Show Loot Summary" : ["", "Zeige Beute-Zusammenfassung", "", "", "", "", "", "", "Afișează rezumatul prăzii"],
"Show Resource Layout Window" : ["", "", "", "", "", "", "", "", "Afișează fereastra cu schema resurselor"],
"Show Stats During Attack" : ["İstatistikleri saldırı sırasında göster", "Zeige Statistik während des Angriffs", "", "", "", "", "", "Näytä tiedot -ikkuna hyökkäyksen aikana", "Afișează statisticile în timpul atacului"],
"Show Stats During Simulation" : ["İstatistikleri simulasyondayken göster", "Zeige Statistik während der Simulation", "", "", "", "", "", "Näytä tiedot -ikkuna simuloinnin aikana", "Afișează statisticile în timpul simulării"],
"Skip Victory-Popup After Battle" : ["Savaş Bitiminde Zafer Bildirimini Atla", "Siegesbildschirm überspringen", "", "", "", "", "", "Ohita taistelun jälkeinen voittoruutu", "Sari peste popup-ul victoriei după luptă"],
"Stats Window Opacity" : ["İstatistik Penceresi Saydamlığı", "Transparenz des Statistik-Fenster", "", "", "", "", "", "Tiedot -ikkunan läpinäkyvyys", "Opacitatea ferestrei de statistici"],
"Disable Unit Tooltips In Army Formation Manager" : ["Ordu Dizilişi Yöneticisinde Birlik İpuçlarını Gizle", "", "", "", "", "", "", "Poista käytöstä yksiköiden työkaluvihjeet armeijan muodostamisikkunassa", "Dezactivează tooltip-urile unităților în managerul formației armatei"],
"Disable Tooltips In Attack Preparation View" : ["Saldırı Hazırlık Görünümünde İpuçlarını Gizle", "", "", "", "", "", "", "Poista työkaluvihjeet käytöstä hyökkäyksen valmisteluikkunassa", "Dezactivează tooltip-urile unităților în ecranul preparării armatei"],
"Undo" : ["Geri Al", "", "", "", "", "", "", "Kumoa", "Anulează"],
"Redo" : ["İleri Al", "", "", "", "", "", "", "Tee uudelleen", "Refă"],
"Open Stats Window" : ["İstatistik Penceresini Aç", "Statistik öffnen", "", "", "", "", "", "Avaa tiedot -ikkuna", "Deschide fereastra de statistici"]
};
function lang(text) {
try {
if (languages.indexOf(locale) > -1) {
var translated = translations[text][languages.indexOf(locale)];
if (translated !== "") {
return translated;
} else {
return text;
}
} else {
return text;
}
} catch (e) {
console.log(e);
//console.log("Text is undefined: "+text);
return text;
}
}
function CreateTweak() {
var TASuite = {};
qx.Class.define("TACS", {
type : "singleton",
extend : qx.core.Object,
members : {
// Default settings
saveObj : {
// section.option
section : {
option : "foo"
},
bounds : {
battleResultsBoxLeft : 125,
battleResultsBoxTop : 125,
resourceLayoutWindowLeft : 125,
resourceLayoutWindowTop : 550
},
checkbox : {
showLootSummary : true,
showResourceLayoutWindow : true,
showStatsDuringAttack : true,
showStatsDuringSimulation : true,
skipVictoryPopup : false,
disableArmyFormationManagerTooltips : false,
disableAttackPreparationTooltips : false
},
audio : {
playRepairSound : true
},
slider : {
statsOpacity : 100
}
},
buttons : {
attack : {
layout : {
save : null, // buttonLayoutSave
load : null // buttonLayoutLoad
},
simulate : null, // buttonSimulateCombat
unlock : null, // buttonUnlockAttack
repair : null, // buttonUnlockRepair
unlockReset : null, // buttonUnlockReset
tools : null, // buttonTools
refreshStats : null, // buttonRefreshStats
formationReset : null, // buttonResetFormation
flipVertical : null, // buttonFlipVertical
flipHorizontal : null, // buttonFlipHorizontal
activateInfantry : null, // buttonActivateInfantry
activateVehicles : null, // buttonActivateVehicles
activateAir : null, // buttonActivateAir
activateAll : null, // buttonActivateAll
repairMode : null, // buttonToggleRepairMode
toolbarRefreshStats : null, // buttontoolbarRefreshStats
toolbarShowStats : null,
toolbarUndo : null,
toolbarRedo : null,
options : null // buttonOptions
},
simulate : {
back : null, // buttonReturnSetup
skip : null // buttonSkipSimulation
},
shiftFormationUp : null,
shiftFormationDown : null,
shiftFormationLeft : null,
shiftFormationRight : null,
optionStats : null
},
stats : {
spoils : {
tiberium : null, // tiberiumSpoils
crystal : null, // crystalSpoils
credit : null, // creditSpoils
research : null // researchSpoils
},
health : {
infantry : null, // lastInfantryPercentage
vehicle : null, // lastVehiclePercentage
aircraft : null, // lastAirPercentage
overall : null // lastPercentage
},
repair : {
infantry : null, // lastInfantryRepairTime
vehicle : null, // lastVehicleRepairTime
aircraft : null, // lastAircraftRepairTime
overall : null, // lastRepairTime
available : null, // storedRepairTime
max : null // maxRepairCharges
},
attacks : {
availableCP : null,
attackCost : null,
availableAttacksCP: null,
availableAttacksAtFullStrength: null,
availableAttacksWithCurrentRepairCharges: null
},
damage : {
units : {
overall : null // lastEnemyUnitsPercentage
},
structures : {
construction : null, // lastCYPercentage
defense : null, // lastDFPercentage
command : null, // lastCCPercentage
support : null,
overall : null // lastEnemyBuildingsPercentage
},
overall : null // lastEnemyPercentage
},
resourcesummary : {
research : null,
credits : null,
crystal : null,
tiberium : null
},
time : null,
supportLevel : null
},
labels : {
health : {
infantry : null, // infantryTroopStrengthLabel
vehicle : null, // vehicleTroopStrengthLabel
aircraft : null, // airTroopStrengthLabel
overall : null // simTroopDamageLabel
},
repair : {
available : null
},
repairinfos : {
infantry : null,
vehicle : null,
aircraft : null,
available : null
},
attacks : {
available : null
},
damage : {
units : {
overall : null // enemyUnitsStrengthLabel
},
structures : {
construction : null, // CYTroopStrengthLabel
defense : null, // DFTroopStrengthLabel
command : null, // CCTroopStrengthLabel
support : null, // enemySupportStrengthLabel
overall : null // enemyBuildingsStrengthLabel
},
overall : null, // enemyTroopStrengthLabel
outcome : null // simVictoryLabel
},
resourcesummary : {
research : null,
credits : null,
crystal : null,
tiberium : null
},
time : null, // simTimeLabel
supportLevel : null, // enemySupportLevelLabel
countDown : null // countDownLabel
},
view : {
playerCity : null,
playerCityDefenseBonus : null,
ownCity : null,
ownCityId : null,
targetCityId : null,
lastUnits : null,
lastUnitList : null
},
layouts : {
label : null,
list : null,
all : null,
current : null,
restore : null
},
options : {
autoDisplayStats : null,
showShift : null,
sideLabel : null,
locksLabel : null,
leftSide : null,
rightSide : null,
attackLock : null,
repairLock : null,
markSavedTargets : null,
dblClick2DeActivate : null,
showLootSummary : null,
showResourceLayoutWindow : null,
showStatsDuringAttack : null,
showStatsDuringSimulation : null,
skipVictoryPopup : null,
statsOpacityLabel : null,
statsOpacity : null,
statsOpacityOutput: null,
disableArmyFormationManagerTooltips : null,
disableAttackPreparationTooltips : null
},
audio : {
soundRepairImpact : null,
soundRepairReload : null
},
_Application : null,
_MainData : null,
_Cities : null,
_VisMain : null,
_ActiveView : null,
_PlayArea : null,
_armyBarContainer : null,
_armyBar : null,
attacker_modules : null,
defender_modules : null,
resourceSummaryVerticalBox : null,
battleResultsBox : null,
optionsWindow : null,
resourceLayoutWindow : null,
statsPage : null,
lastSimulation : null,
count : null,
counter : null,
statsOnly : null,
simulationWarning : null,
warningIcon : null,
userInterface : null,
infantryActivated : null,
vehiclesActivated : null,
airActivated : null,
allActivated : null,
toolBar : null,
toolBarParent : null,
TOOL_BAR_LOW : 113, // hidden
TOOL_BAR_HIGH : 155, // popped-up
TOOL_BAR_WIDTH : 740,
resourceLayout : null,
repairInfo : null,
repairButtons : [],
repairButtonsRedrawTimer : null,
armybarClickCount : null,
armybarClearnClickCounter : null,
repairModeTimer : null,
curPAVM : null,
curViewMode : null,
DEFAULTS : null,
undoCache : [],
ts1 : null, //timestamps
ts2 : null,
attackUnitsLoaded : null,
loadData : function () {
var str = localStorage.getItem("TACS");
var temp;
// this needs to be thoroughly checked
if (str != null) {
//previous options found
temp = JSON.parse(str);
for (var i in this.saveObj) {
if (typeof temp[i] == "object") {
for (var j in this.saveObj[i]) {
if (typeof temp[i][j] == "object") {
//recurse deeper?
} else if (typeof temp[i][j] == "undefined") {
// create missing option
console.log("Creating missing save option: " + i + "." + j);
temp[i][j] = this.saveObj[i][j];
}
}
} else if (typeof temp[i] == "undefined") {
// create missing option section
console.log("Creating missing option section: " + i);
temp[i] = this.saveObj[i];
}
}
this.saveObj = temp;
this.saveData();
}
},
saveData : function () {
var obj = this.saveObj || window.TACS.getInstance().saveObj;
var str = JSON.stringify(obj);
localStorage.setItem("TACS", str);
},
initialize : function () {
try {
this.loadData();
locale = ClientLib.Config.Main.GetInstance().GetConfig(ClientLib.Config.Main.CONFIG_LANGUAGE);
this.targetCityId = "0";
// Store references
this._Application = qx.core.Init.getApplication();
this._MainData = ClientLib.Data.MainData.GetInstance();
this._VisMain = ClientLib.Vis.VisMain.GetInstance();
this._ActiveView = this._VisMain.GetActiveView();
this._PlayArea = this._Application.getPlayArea();
this._armyBarContainer = this._Application.getArmySetupAttackBar();
this._armyBar = this._Application.getUIItem(ClientLib.Data.Missions.PATH.BAR_ATTACKSETUP);
if (PerforceChangelist >= 443425) { // 16.1 patch
for (var i in this._armyBarContainer) {
if (typeof this._armyBarContainer[i] == "object" && this._armyBarContainer[i] != null) {
if (this._armyBarContainer[i].objid == "btn_disable") {
console.log(this._armyBarContainer[i].objid);
var nativeSimBarDisableButton = this._armyBarContainer[i];
}
if (this._armyBarContainer[i].objid == "cnt_controls" || this._armyBarContainer[i].objid == "btn_toggle") {
this._armyBarContainer[i].setVisibility("excluded");
}
}
}
var armyBarChildren = this._armyBar.getChildren();
for (var i in armyBarChildren) {
if (armyBarChildren[i].$$user_decorator == "pane-armysetup-right") {
console.log(armyBarChildren[i].$$user_decorator)
var armySetupRight = armyBarChildren[i];
armySetupRight.removeAt(1);
armySetupRight.addAt(nativeSimBarDisableButton, 1);
break;
}
}
}
// Fix Defense Bonus Rounding
for (var key in ClientLib.Data.City.prototype) {
if (typeof ClientLib.Data.City.prototype[key] === 'function') {
var strFunction = ClientLib.Data.City.prototype[key].toString();
if (strFunction.indexOf("Math.floor(a.adb)") > -1) {
ClientLib.Data.City.prototype[key] = this.fixBonusRounding(ClientLib.Data.City.prototype[key], "a");
break;
}
}
}
// Event Handlers
phe.cnc.Util.attachNetEvent(ClientLib.API.Battleground.GetInstance(), "OnSimulateBattleFinished", ClientLib.API.OnSimulateBattleFinished, this, this.onSimulateBattleFinishedEvent);
phe.cnc.Util.attachNetEvent(ClientLib.API.Battleground.GetInstance(), "OnSimulateCombatReport", ClientLib.API.OnSimulateCombatReport, this, this.OnSimulateCombatReportEvent);
phe.cnc.Util.attachNetEvent(this._VisMain, "ViewModeChange", ClientLib.Vis.ViewModeChange, this, this.viewChangeHandler);
phe.cnc.Util.attachNetEvent(this._MainData.get_Cities(), "CurrentOwnChange", ClientLib.Data.CurrentOwnCityChange, this, this.ownCityChangeHandler);
// Setup Button
this.buttons.simulate.back = new qx.ui.form.Button(lang("Setup"));
this.buttons.simulate.back.set({
width : 80,
height : 24,
appearance : "button-addpoints",
toolTipText : lang("Return to Combat Setup")
});
this.buttons.simulate.back.addListener("click", this.returnSetup, this);
// Skip to end Button
this.buttons.simulate.skip = new qx.ui.form.Button();
this.buttons.simulate.skip.set({
width : 35,
height : 24,
appearance : "button-addpoints",
icon : "FactionUI/icons/icon_replay_skip.png",
toolTipText : lang("Skip to end")
});
this.buttons.simulate.skip.addListener("click", this.skipSimulation, this);
var replayBar = this._Application.getReportReplayOverlay();
replayBar.add(this.buttons.simulate.back, {
top : 21,
left : 185
});
if (typeof(CCTAWrapper_IsInstalled) != 'undefined' && CCTAWrapper_IsInstalled) {
replayBar.add(this.buttons.simulate.skip, {
top : 21,
left : 435
});
}
// Unlock Button
this.buttons.attack.unlock = new qx.ui.form.Button(lang("Unlock"));
this.buttons.attack.unlock.set({
width : 54,
height : 37,
padding : 0,
appearance : "button-text-small",
toolTipText : lang("Unlock Attack Button")
});
this.buttons.attack.unlock.addListener("click", this.unlockAttacks, this);
this.buttons.attack.unlock.setOpacity(0.5);
var temp = localStorage.ta_sim_attackLock;
if (temp) {
temp = JSON.parse(localStorage.ta_sim_attackLock);
} else {
temp = true;
}
if (temp) {
this._armyBar.add(this.buttons.attack.unlock, {
top : 108,
right : 10
});
}
// Unlock Repair
this.buttons.attack.repair = new qx.ui.form.Button(lang("Unlock"));
this.buttons.attack.repair.set({
width : 54,
height : 44,
padding : 0,
appearance : "button-text-small",
toolTipText : lang("Unlock Repair Button")
});
this.buttons.attack.repair.addListener("click", this.unlockRepairs, this);
this.buttons.attack.repair.setOpacity(0.5);
var temp = localStorage.ta_sim_repairLock;
if (temp) {
temp = JSON.parse(localStorage.ta_sim_repairLock);
} else {
temp = true;
}
if (temp) {
this._armyBar.add(this.buttons.attack.repair, {
top : 23,
right : 10
});
}
var battleUnitData = ClientLib.Data.CityPreArmyUnit.prototype;
if (!battleUnitData.set_Enabled_Original) {
battleUnitData.set_Enabled_Original = battleUnitData.set_Enabled;
}
battleUnitData.set_Enabled = function (a) {
this.set_Enabled_Original(a);
window.TACS.getInstance().formationChangeHandler();
};
if (!battleUnitData.MoveBattleUnit_Original) {
battleUnitData.MoveBattleUnit_Original = battleUnitData.MoveBattleUnit;
}
battleUnitData.MoveBattleUnit = function (a, b) {
var _this = window.TACS.getInstance();
if (_this.options.dblClick2DeActivate.getValue()) {
if (_this.armybarClickCount >= 2) {
if (this.get_CoordX() === a && this.get_CoordY() === b) {
var enabledState = this.get_Enabled();
enabledState ^= true;
this.set_Enabled_Original(enabledState);
}
}
}
this.MoveBattleUnit_Original(a, b);
_this.formationChangeHandler();
_this.armybarClickCount = 0;
clearInterval(_this.armybarClearnClickCounter);
};
this.loadLayouts();
// The Options Window
this.optionsWindow = new qx.ui.window.Window(lang("Options"), "FactionUI/icons/icon_forum_properties.png").set({
contentPaddingTop : 1,
contentPaddingBottom : 8,
contentPaddingRight : 8,
contentPaddingLeft : 8,
//width : 400,
height : 400,
showMaximize : false,
showMinimize : false,
allowMaximize : false,
allowMinimize : false,
resizable : false
});
this.optionsWindow.getChildControl("icon").set({
scale : true,
width : 25,
height : 25
});
this.optionsWindow.setLayout(new qx.ui.layout.VBox());
var optionsWindowTop = localStorage.ta_sim_options_top;
if (optionsWindowTop) {
optionsWindowTop = JSON.parse(localStorage.ta_sim_options_top);
var optionsWindowLeft = JSON.parse(localStorage.ta_sim_options_left);
this.optionsWindow.moveTo(optionsWindowLeft, optionsWindowTop);
} else {
this.optionsWindow.center();
}
this.optionsWindow.addListener("close", function () {
localStorage.ta_sim_options_top = JSON.stringify(this.optionsWindow.getLayoutProperties().top);
localStorage.ta_sim_options_left = JSON.stringify(this.optionsWindow.getLayoutProperties().left);
this.saveData();
}, this);
// Resource Layout Window
this.resourceLayoutWindow = new qx.ui.window.Window().set({
contentPaddingTop : 1,
contentPaddingBottom : 8,
contentPaddingRight : 8,
contentPaddingLeft : 8,
width : 185,
showMaximize : false,
showMinimize : false,
allowMaximize : false,
allowMinimize : false,
resizable : false
});
/*this.resourceLayoutWindow.getChildControl("icon").set({
scale : true,
width : 25,
height : 25
});*/
this.resourceLayoutWindow.setLayout(new qx.ui.layout.HBox());
this.resourceLayoutWindow.moveTo(this.saveObj.bounds.resourceLayoutWindowLeft, this.saveObj.bounds.resourceLayoutWindowTop);
this.resourceLayoutWindow.addListener("move", function () {
this.saveObj.bounds.resourceLayoutWindowLeft = this.resourceLayoutWindow.getBounds().left;
this.saveObj.bounds.resourceLayoutWindowTop = this.resourceLayoutWindow.getBounds().top;
this.saveData();
}, this);
this.resourceLayoutWindow.addListener("close", function () {
localStorage.ta_sim_layout_top = JSON.stringify(this.resourceLayoutWindow.getLayoutProperties().top);
localStorage.ta_sim_layout_left = JSON.stringify(this.resourceLayoutWindow.getLayoutProperties().left);
}, this);
// The Battle Simulator box
this.battleResultsBox = new qx.ui.window.Window("TACS", "FactionUI/icons/icon_res_plinfo_command_points.png").set({
contentPaddingTop : 0,
contentPaddingBottom : 2,
contentPaddingRight : 2,
contentPaddingLeft : 6,
showMaximize : false,
showMinimize : false,
allowMaximize : false,
allowMinimize : false,
resizable : false
});
this.battleResultsBox.getChildControl("icon").set({
scale : true,
width : 20,
height : 20,
alignY: "middle"
});
this.battleResultsBox.setLayout(new qx.ui.layout.HBox());
this.battleResultsBox.moveTo(this.saveObj.bounds.battleResultsBoxLeft, this.saveObj.bounds.battleResultsBoxTop);
this.battleResultsBox.addListener("move", function () {
this.saveObj.bounds.battleResultsBoxLeft = this.battleResultsBox.getBounds().left;
this.saveObj.bounds.battleResultsBoxTop = this.battleResultsBox.getBounds().top;
this.saveData();
}, this);
this.battleResultsBox.addListener("appear", function () {
this.battleResultsBox.setOpacity(this.saveObj.slider.statsOpacity/100);
}, this);
var tabView = new qx.ui.tabview.TabView().set({
contentPaddingTop : 3,
contentPaddingBottom : 6,
contentPaddingRight : 7,
contentPaddingLeft : 3
});
this.battleResultsBox.add(tabView);
this.initializeStats(tabView);
this.initializeLayout(tabView);
this.initializeInfo(tabView);
this.initializeOptions();
this.setupInterface();
this.createHasAttackFormationFunction();
this.createBasePlateFunction(ClientLib.Vis.Region.RegionNPCCamp);
this.createBasePlateFunction(ClientLib.Vis.Region.RegionNPCBase);
this.createBasePlateFunction(ClientLib.Vis.Region.RegionCity);
// Fix armyBar container divs, the mouse has a horrible offset in the armybar when this is enabled
// if this worked it would essentially fix a layout bug, shame... using zIndex instead
// Abort, Retry, Fail?
/*
this._armyBar.getLayoutParent().getContentElement().getParent().setStyles({
height : "155px"
});
this._armyBar.getLayoutParent().getContentElement().setStyles({
height : "155px"
});
this._armyBar.getLayoutParent().setLayoutProperties({
bottom : 0
});
this._armyBar.getLayoutParent().setHeight(155);
this._armyBar.setLayoutProperties({
top : -5
});
*/
// putting overlays in front so we have 19 layers to work with behind them
// zIndex 5 is reserved for Shiva
this.gameOverlaysToFront();
} catch (e) {
console.log(e);
}
},
fixBonusRounding: function (bonus, data) {
try {
if (data == null) data = "";
var strFunction = bonus.toString();
strFunction = strFunction.replace("floor", "round");
var functionBody = strFunction.substring(strFunction.indexOf("{") + 1, strFunction.lastIndexOf("}"));
var fn = Function(data, functionBody);
return fn;
} catch (e) {
console.log("fixBonusRounding error: ", e);
}
},
initializeStats : function (tabView) {
try {
////////////////// Stats ////////////////////
this.statsPage = new qx.ui.tabview.Page(lang("Stats"));
this.statsPage.setLayout(new qx.ui.layout.VBox(1));
tabView.add(this.statsPage);
// Refresh Vertical Box
var container = new qx.ui.container.Composite();
var layout = new qx.ui.layout.Grid();
layout.setColumnAlign(0, "left", "middle");
layout.setColumnAlign(1, "right", "middle");
layout.setColumnFlex(0, 1);
layout.setRowHeight(0, 15);
container.setLayout(layout);
container.setThemedFont("bold");
container.setThemedBackgroundColor("#eef");
this.statsPage.add(container);
// Countdown for next refresh
this.labels.countDown = new qx.ui.basic.Label("");
this.labels.countDown.set({
width : 0,
height : 10,
marginLeft : 5,
backgroundColor : "#B40404"
});
container.add(this.labels.countDown, {
row : 0,
column : 0
});
this.buttons.attack.refreshStats = new qx.ui.form.Button(lang("Refresh"));
this.buttons.attack.refreshStats.set({
width : 58,
appearance : "button-text-small",
toolTipText : lang("Refresh Stats")
});
this.buttons.attack.refreshStats.addListener("click", this.refreshStatistics, this);
container.add(this.buttons.attack.refreshStats, {
row : 0,
column : 1
});
// The Enemy Vertical Box
var container = new qx.ui.container.Composite();
var layout = new qx.ui.layout.Grid();
layout.setColumnAlign(1, "right", "middle");
layout.setColumnFlex(0, 1);
container.setLayout(layout);
container.setThemedFont("bold");
container.setThemedBackgroundColor("#eef");
this.statsPage.add(container);
// The Enemy Troop Strength Label
container.add(new qx.ui.basic.Label(lang("Enemy Base:")), {
row : 0,
column : 0
});
this.labels.damage.overall = new qx.ui.basic.Label("100");
container.add(this.labels.damage.overall, {
row : 0,
column : 1
});
// Units
container.add(new qx.ui.basic.Label(lang("Defences:")), {
row : 1,
column : 0
});
this.labels.damage.units.overall = new qx.ui.basic.Label("100");
container.add(this.labels.damage.units.overall, {
row : 1,
column : 1
});
// Buildings
container.add(new qx.ui.basic.Label(lang("Buildings:")), {
row : 2,
column : 0
});
this.labels.damage.structures.overall = new qx.ui.basic.Label("100");
container.add(this.labels.damage.structures.overall, {
row : 2,
column : 1
});
// Command Center
container.add(new qx.ui.basic.Label(lang("Construction Yard:")), {
row : 3,
column : 0
});
this.labels.damage.structures.construction = new qx.ui.basic.Label("100");
container.add(this.labels.damage.structures.construction, {
row : 3,
column : 1
});
// Defense Facility
container.add(new qx.ui.basic.Label(lang("Defense Facility:")), {
row : 4,
column : 0
});
this.labels.damage.structures.defense = new qx.ui.basic.Label("100");
container.add(this.labels.damage.structures.defense, {
row : 4,
column : 1
});
// Command Center
container.add(new qx.ui.basic.Label(lang("Command Center:")), {
row : 5,
column : 0
});
this.labels.damage.structures.command = new qx.ui.basic.Label("100");
container.add(this.labels.damage.structures.command, {
row : 5,
column : 1
});
// The Support Horizontal Box
this.labels.supportLevel = new qx.ui.basic.Label("");
container.add(this.labels.supportLevel, {
row : 6,
column : 0
});
this.labels.damage.structures.support = new qx.ui.basic.Label("");
container.add(this.labels.damage.structures.support, {
row : 6,
column : 1
});
// The Troops Vertical Box
container = new qx.ui.container.Composite();
layout = new qx.ui.layout.Grid();
layout.setColumnAlign(1, "right", "middle");
layout.setColumnFlex(0, 1);
container.setLayout(layout);
container.setThemedFont("bold");
container.setThemedBackgroundColor("#eef");
this.statsPage.add(container);
// The Troop Strength Label
container.add(new qx.ui.basic.Label(lang("Overall:")), {
row : 0,
column : 0
});
this.labels.health.overall = new qx.ui.basic.Label("100");
container.add(this.labels.health.overall, {
row : 0,
column : 1
});
// The Infantry Troop Strength Label
container.add(new qx.ui.basic.Label(lang("Infantry:")), {
row : 1,
column : 0
});
this.labels.health.infantry = new qx.ui.basic.Label("100");
container.add(this.labels.health.infantry, {
row : 1,
column : 1
});
// The Vehicle Troop Strength Label
container.add(new qx.ui.basic.Label(lang("Vehicle:")), {
row : 2,
column : 0
});
this.labels.health.vehicle = new qx.ui.basic.Label("100");
container.add(this.labels.health.vehicle, {
row : 2,
column : 1
});
// The Air Troop Strength Label
container.add(new qx.ui.basic.Label(lang("Aircraft:")), {
row : 3,
column : 0
});
this.labels.health.aircraft = new qx.ui.basic.Label("100");
container.add(this.labels.health.aircraft, {
row : 3,
column : 1
});
// The inner Vertical Box
container = new qx.ui.container.Composite();
layout = new qx.ui.layout.Grid();
layout.setColumnAlign(1, "right", "middle");
layout.setColumnFlex(0, 1);
container.setLayout(layout);
container.setThemedFont("bold");
container.setThemedBackgroundColor("#eef");
this.statsPage.add(container);
// The Victory Label
container.add(new qx.ui.basic.Label(lang("Outcome:")), {
row : 0,
column : 0
});
this.labels.damage.outcome = new qx.ui.basic.Label(lang("Unknown"));
container.add(this.labels.damage.outcome, {
row : 0,
column : 1
});
// The Battle Time Label
container.add(new qx.ui.basic.Label(lang("Battle Time:")), {
row : 1,
column : 0
});
this.labels.time = new qx.ui.basic.Label("120");
container.add(this.labels.time, {
row : 1,
column : 1
});
// Available RT/Attacks Vertical Box
container = new qx.ui.container.Composite();
layout = new qx.ui.layout.Grid();
layout.setColumnAlign(1, "right", "middle");
layout.setColumnFlex(0, 1);
container.setLayout(layout);
container.setThemedFont("bold");
container.setThemedBackgroundColor("#eef");
this.statsPage.add(container);
// Available Repair Time Label
container.add(new qx.ui.basic.Label(lang("Available Repair:")), {
row : 0,
column : 0
});
this.labels.repair.available = new qx.ui.basic.Label("00:00:00");
container.add(this.labels.repair.available, {
row : 0,
column : 1
});
// Available Attacks Label
container.add(new qx.ui.basic.Label(lang("Available Attacks:")), {
row : 1,
column : 0
});
this.labels.attacks.available = new qx.ui.basic.Label("CP:- / FR:- / CFR:-");
container.add(this.labels.attacks.available, {
row : 1,
column : 1
});
// Resource Summary Vertical Box
this.resourceSummaryVerticalBox = new qx.ui.container.Composite();
var layout = new qx.ui.layout.Grid();
layout.setColumnAlign(1, "right", "middle");
layout.setColumnWidth(0, 90);