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