1
2
3
4
5
6
7
8
9
10
11
12 package cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands;import java.util.*;import javax.vecmath.*;import cz.cuni.amis.pogamut.base.communication.messages.*;import cz.cuni.amis.pogamut.base.communication.worldview.*;import cz.cuni.amis.pogamut.base.communication.worldview.event.*;import cz.cuni.amis.pogamut.base.communication.worldview.object.*;import cz.cuni.amis.pogamut.multi.communication.worldview.object.*;import cz.cuni.amis.pogamut.base.communication.translator.event.*;import cz.cuni.amis.pogamut.multi.communication.translator.event.*;import cz.cuni.amis.pogamut.base3d.worldview.object.*;import cz.cuni.amis.pogamut.base3d.worldview.object.event.*;import cz.cuni.amis.pogamut.ut2004.communication.messages.*;import cz.cuni.amis.pogamut.ut2004.communication.worldview.objects.*;import cz.cuni.amis.pogamut.ut2004multi.communication.worldview.objects.*;import cz.cuni.amis.pogamut.ut2004.communication.translator.itemdescriptor.*;import cz.cuni.amis.pogamut.ut2004.communication.messages.ItemType.Category;import cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId;import cz.cuni.amis.utils.exception.*;import cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdateResult.Result;import cz.cuni.amis.utils.SafeEquals;import cz.cuni.amis.pogamut.base.agent.*;import cz.cuni.amis.pogamut.multi.agent.*;import cz.cuni.amis.pogamut.multi.communication.worldview.property.*;import cz.cuni.amis.pogamut.ut2004multi.communication.worldview.property.*;import cz.cuni.amis.utils.token.*;import cz.cuni.amis.utils.*;
13
14
15
16
17
18
19
20
21
22 public class Initialize
23 extends CommandMessage
24 {
25
26
27
28 public static final String PROTOTYPE =
29 " {Name text} {Team 0} {ManualSpawn False} {AutoTrace False} {Location 0,0,0} {Rotation 0,0,0} {Skin text} {DesiredSkill 0} {ShouldLeadTarget False} {AutoPickupOff False} {Jmx text} {ClassName text} ";
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 public Initialize(
90 String Name, Integer Team, Boolean ManualSpawn, Boolean AutoTrace, Location Location, Rotation Rotation, String Skin, Integer DesiredSkill, Boolean ShouldLeadTarget, Boolean AutoPickupOff, String Jmx, String ClassName
91 ) {
92
93 this.Name = Name;
94
95 this.Team = Team;
96
97 this.ManualSpawn = ManualSpawn;
98
99 this.AutoTrace = AutoTrace;
100
101 this.Location = Location;
102
103 this.Rotation = Rotation;
104
105 this.Skin = Skin;
106
107 this.DesiredSkill = DesiredSkill;
108
109 this.ShouldLeadTarget = ShouldLeadTarget;
110
111 this.AutoPickupOff = AutoPickupOff;
112
113 this.Jmx = Jmx;
114
115 this.ClassName = ClassName;
116
117 }
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132 public Initialize() {
133 }
134
135
136
137
138
139
140
141 public Initialize(Initialize original) {
142
143 this.Name = original.Name;
144
145 this.Team = original.Team;
146
147 this.ManualSpawn = original.ManualSpawn;
148
149 this.AutoTrace = original.AutoTrace;
150
151 this.Location = original.Location;
152
153 this.Rotation = original.Rotation;
154
155 this.Skin = original.Skin;
156
157 this.DesiredSkill = original.DesiredSkill;
158
159 this.ShouldLeadTarget = original.ShouldLeadTarget;
160
161 this.AutoPickupOff = original.AutoPickupOff;
162
163 this.Jmx = original.Jmx;
164
165 this.ClassName = original.ClassName;
166
167 }
168
169
170
171
172 protected
173 String Name =
174
175 null
176 ;
177
178
179
180
181
182
183 public String getName()
184
185 {
186 return
187 Name;
188 }
189
190
191
192
193
194
195
196 public Initialize
197 setName(String Name)
198
199 {
200 this.Name = Name;
201 return this;
202 }
203
204
205
206
207
208
209
210
211 protected
212 Integer Team =
213
214 null
215 ;
216
217
218
219
220
221
222
223
224
225
226 public Integer getTeam()
227
228 {
229 return
230 Team;
231 }
232
233
234
235
236
237
238
239
240
241
242
243 public Initialize
244 setTeam(Integer Team)
245
246 {
247 this.Team = Team;
248 return this;
249 }
250
251
252
253
254
255
256
257
258 protected
259 Boolean ManualSpawn =
260
261 null
262 ;
263
264
265
266
267
268
269
270
271
272
273 public Boolean isManualSpawn()
274
275 {
276 return
277 ManualSpawn;
278 }
279
280
281
282
283
284
285
286
287
288
289
290 public Initialize
291 setManualSpawn(Boolean ManualSpawn)
292
293 {
294 this.ManualSpawn = ManualSpawn;
295 return this;
296 }
297
298
299
300
301
302
303 protected
304 Boolean AutoTrace =
305
306 null
307 ;
308
309
310
311
312
313
314
315
316 public Boolean isAutoTrace()
317
318 {
319 return
320 AutoTrace;
321 }
322
323
324
325
326
327
328
329
330
331 public Initialize
332 setAutoTrace(Boolean AutoTrace)
333
334 {
335 this.AutoTrace = AutoTrace;
336 return this;
337 }
338
339
340
341
342
343
344 protected
345 Location Location =
346
347 null
348 ;
349
350
351
352
353
354
355
356
357 public Location getLocation()
358
359 {
360 return
361 Location;
362 }
363
364
365
366
367
368
369
370
371
372 public Initialize
373 setLocation(Location Location)
374
375 {
376 this.Location = Location;
377 return this;
378 }
379
380
381
382
383
384
385 protected
386 Rotation Rotation =
387
388 null
389 ;
390
391
392
393
394
395
396
397
398 public Rotation getRotation()
399
400 {
401 return
402 Rotation;
403 }
404
405
406
407
408
409
410
411
412
413 public Initialize
414 setRotation(Rotation Rotation)
415
416 {
417 this.Rotation = Rotation;
418 return this;
419 }
420
421
422
423
424
425
426
427
428
429
430
431 protected
432 String Skin =
433
434 null
435 ;
436
437
438
439
440
441
442
443
444
445
446
447
448
449 public String getSkin()
450
451 {
452 return
453 Skin;
454 }
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469 public Initialize
470 setSkin(String Skin)
471
472 {
473 this.Skin = Skin;
474 return this;
475 }
476
477
478
479
480
481
482
483 protected
484 Integer DesiredSkill =
485
486 null
487 ;
488
489
490
491
492
493
494
495
496
497 public Integer getDesiredSkill()
498
499 {
500 return
501 DesiredSkill;
502 }
503
504
505
506
507
508
509
510
511
512
513 public Initialize
514 setDesiredSkill(Integer DesiredSkill)
515
516 {
517 this.DesiredSkill = DesiredSkill;
518 return this;
519 }
520
521
522
523
524
525
526
527
528 protected
529 Boolean ShouldLeadTarget =
530
531 null
532 ;
533
534
535
536
537
538
539
540
541
542
543 public Boolean isShouldLeadTarget()
544
545 {
546 return
547 ShouldLeadTarget;
548 }
549
550
551
552
553
554
555
556
557
558
559
560 public Initialize
561 setShouldLeadTarget(Boolean ShouldLeadTarget)
562
563 {
564 this.ShouldLeadTarget = ShouldLeadTarget;
565 return this;
566 }
567
568
569
570
571
572
573 protected
574 Boolean AutoPickupOff =
575
576 null
577 ;
578
579
580
581
582
583
584
585
586 public Boolean isAutoPickupOff()
587
588 {
589 return
590 AutoPickupOff;
591 }
592
593
594
595
596
597
598
599
600
601 public Initialize
602 setAutoPickupOff(Boolean AutoPickupOff)
603
604 {
605 this.AutoPickupOff = AutoPickupOff;
606 return this;
607 }
608
609
610
611
612
613
614 protected
615 String Jmx =
616
617 null
618 ;
619
620
621
622
623
624
625
626
627 public String getJmx()
628
629 {
630 return
631 Jmx;
632 }
633
634
635
636
637
638
639
640
641
642 public Initialize
643 setJmx(String Jmx)
644
645 {
646 this.Jmx = Jmx;
647 return this;
648 }
649
650
651
652
653
654
655 protected
656 String ClassName =
657
658 null
659 ;
660
661
662
663
664
665
666
667
668 public String getClassName()
669
670 {
671 return
672 ClassName;
673 }
674
675
676
677
678
679
680
681
682
683 public Initialize
684 setClassName(String ClassName)
685
686 {
687 this.ClassName = ClassName;
688 return this;
689 }
690
691 public String toString() {
692 return toMessage();
693 }
694
695 public String toHtmlString() {
696 return super.toString() + "[<br/>" +
697
698 "<b>Name</b> = " +
699 String.valueOf(getName()
700 ) +
701 " <br/> " +
702
703 "<b>Team</b> = " +
704 String.valueOf(getTeam()
705 ) +
706 " <br/> " +
707
708 "<b>ManualSpawn</b> = " +
709 String.valueOf(isManualSpawn()
710 ) +
711 " <br/> " +
712
713 "<b>AutoTrace</b> = " +
714 String.valueOf(isAutoTrace()
715 ) +
716 " <br/> " +
717
718 "<b>Location</b> = " +
719 String.valueOf(getLocation()
720 ) +
721 " <br/> " +
722
723 "<b>Rotation</b> = " +
724 String.valueOf(getRotation()
725 ) +
726 " <br/> " +
727
728 "<b>Skin</b> = " +
729 String.valueOf(getSkin()
730 ) +
731 " <br/> " +
732
733 "<b>DesiredSkill</b> = " +
734 String.valueOf(getDesiredSkill()
735 ) +
736 " <br/> " +
737
738 "<b>ShouldLeadTarget</b> = " +
739 String.valueOf(isShouldLeadTarget()
740 ) +
741 " <br/> " +
742
743 "<b>AutoPickupOff</b> = " +
744 String.valueOf(isAutoPickupOff()
745 ) +
746 " <br/> " +
747
748 "<b>Jmx</b> = " +
749 String.valueOf(getJmx()
750 ) +
751 " <br/> " +
752
753 "<b>ClassName</b> = " +
754 String.valueOf(getClassName()
755 ) +
756 " <br/> " +
757
758 "<br/>]"
759 ;
760 }
761
762 public String toMessage() {
763 StringBuffer buf = new StringBuffer();
764 buf.append("INIT");
765
766 if (Name != null) {
767 buf.append(" {Name " + Name + "}");
768 }
769
770 if (Team != null) {
771 buf.append(" {Team " + Team + "}");
772 }
773
774 if (ManualSpawn != null) {
775 buf.append(" {ManualSpawn " + ManualSpawn + "}");
776 }
777
778 if (AutoTrace != null) {
779 buf.append(" {AutoTrace " + AutoTrace + "}");
780 }
781
782 if (Location != null) {
783 buf.append(" {Location " +
784 Location.getX() + "," +
785 Location.getY() + "," +
786 Location.getZ() + "}");
787 }
788
789 if (Rotation != null) {
790 buf.append(" {Rotation " +
791 Rotation.getPitch() + "," +
792 Rotation.getYaw() + "," +
793 Rotation.getRoll() + "}");
794 }
795
796 if (Skin != null) {
797 buf.append(" {Skin " + Skin + "}");
798 }
799
800 if (DesiredSkill != null) {
801 buf.append(" {DesiredSkill " + DesiredSkill + "}");
802 }
803
804 if (ShouldLeadTarget != null) {
805 buf.append(" {ShouldLeadTarget " + ShouldLeadTarget + "}");
806 }
807
808 if (AutoPickupOff != null) {
809 buf.append(" {AutoPickupOff " + AutoPickupOff + "}");
810 }
811
812 if (Jmx != null) {
813 buf.append(" {Jmx " + Jmx + "}");
814 }
815
816 if (ClassName != null) {
817 buf.append(" {ClassName " + ClassName + "}");
818 }
819
820 return buf.toString();
821 }
822
823
824
825
826
827 }
828