1 package cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages;
2
3
4 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.*;
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 public class ConfigChangeMessage
30 extends
31 ConfigChange
32 implements IWorldObjectUpdatedEvent, ICompositeWorldObjectUpdatedEvent
33
34 {
35
36
37
38
39
40
41 public ConfigChangeMessage()
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 public ConfigChangeMessage(
170 UnrealId Id, UnrealId BotId, boolean ManualSpawn, boolean AutoTrace, String Name, double SpeedMultiplier, Rotation RotationRate, boolean Invulnerable, double SelfUpdateTime, double VisionTime, int LocUpdateMultiplier, boolean ShowDebug, boolean ShowFocalPoint, boolean DrawTraceLines, boolean SynchronousOff, boolean AutoPickupOff, String Action
171 ) {
172
173 this.Id = Id;
174
175 this.BotId = BotId;
176
177 this.ManualSpawn = ManualSpawn;
178
179 this.AutoTrace = AutoTrace;
180
181 this.Name = Name;
182
183 this.SpeedMultiplier = SpeedMultiplier;
184
185 this.RotationRate = RotationRate;
186
187 this.Invulnerable = Invulnerable;
188
189 this.SelfUpdateTime = SelfUpdateTime;
190
191 this.VisionTime = VisionTime;
192
193 this.LocUpdateMultiplier = LocUpdateMultiplier;
194
195 this.ShowDebug = ShowDebug;
196
197 this.ShowFocalPoint = ShowFocalPoint;
198
199 this.DrawTraceLines = DrawTraceLines;
200
201 this.SynchronousOff = SynchronousOff;
202
203 this.AutoPickupOff = AutoPickupOff;
204
205 this.Action = Action;
206
207 }
208
209
210
211
212
213
214 public ConfigChangeMessage(ConfigChangeMessage original) {
215
216 this.Id = original.getId()
217 ;
218
219 this.BotId = original.getBotId()
220 ;
221
222 this.ManualSpawn = original.isManualSpawn()
223 ;
224
225 this.AutoTrace = original.isAutoTrace()
226 ;
227
228 this.Name = original.getName()
229 ;
230
231 this.SpeedMultiplier = original.getSpeedMultiplier()
232 ;
233
234 this.RotationRate = original.getRotationRate()
235 ;
236
237 this.Invulnerable = original.isInvulnerable()
238 ;
239
240 this.SelfUpdateTime = original.getSelfUpdateTime()
241 ;
242
243 this.VisionTime = original.getVisionTime()
244 ;
245
246 this.LocUpdateMultiplier = original.getLocUpdateMultiplier()
247 ;
248
249 this.ShowDebug = original.isShowDebug()
250 ;
251
252 this.ShowFocalPoint = original.isShowFocalPoint()
253 ;
254
255 this.DrawTraceLines = original.isDrawTraceLines()
256 ;
257
258 this.SynchronousOff = original.isSynchronousOff()
259 ;
260
261 this.AutoPickupOff = original.isAutoPickupOff()
262 ;
263
264 this.Action = original.getAction()
265 ;
266
267 this.TeamId = original.getTeamId();
268
269 this.SimTime = original.getSimTime();
270 }
271
272
273 protected ITeamId TeamId;
274
275
276
277
278 protected void setTeamId(ITeamId TeamId) {
279 this.TeamId = TeamId;
280 }
281
282 public ITeamId getTeamId() {
283 return TeamId;
284 }
285
286
287
288
289
290
291
292 protected
293 UnrealId Id =
294 null;
295
296
297
298
299
300 protected boolean Id_Set = false;
301
302 @Override
303
304
305
306
307 public UnrealId getId()
308 {
309 return Id;
310 }
311
312
313
314
315
316 protected
317 UnrealId BotId =
318 null;
319
320
321
322
323
324 protected boolean BotId_Set = false;
325
326 @Override
327
328
329
330
331 public UnrealId getBotId()
332 {
333 return BotId;
334 }
335
336
337
338
339
340
341
342 protected
343 boolean ManualSpawn =
344 false;
345
346
347
348
349
350 protected boolean ManualSpawn_Set = false;
351
352 @Override
353
354
355
356
357
358
359 public boolean isManualSpawn()
360 {
361 return ManualSpawn;
362 }
363
364
365
366
367
368
369
370
371
372 protected
373 boolean AutoTrace =
374 false;
375
376
377
378
379
380 protected boolean AutoTrace_Set = false;
381
382 @Override
383
384
385
386
387
388
389
390
391 public boolean isAutoTrace()
392 {
393 return AutoTrace;
394 }
395
396
397
398
399
400 protected
401 String Name =
402 null;
403
404
405
406
407
408 protected boolean Name_Set = false;
409
410 @Override
411
412
413
414
415 public String getName()
416 {
417 return Name;
418 }
419
420
421
422
423
424
425
426 protected
427 double SpeedMultiplier =
428 0;
429
430
431
432
433
434 protected boolean SpeedMultiplier_Set = false;
435
436 @Override
437
438
439
440
441
442
443 public double getSpeedMultiplier()
444 {
445 return SpeedMultiplier;
446 }
447
448
449
450
451
452
453
454 protected
455 Rotation RotationRate =
456 null;
457
458
459
460
461
462 protected boolean RotationRate_Set = false;
463
464 @Override
465
466
467
468
469
470
471 public Rotation getRotationRate()
472 {
473 return RotationRate;
474 }
475
476
477
478
479
480
481
482 protected
483 boolean Invulnerable =
484 false;
485
486
487
488
489
490 protected boolean Invulnerable_Set = false;
491
492 @Override
493
494
495
496
497
498
499 public boolean isInvulnerable()
500 {
501 return Invulnerable;
502 }
503
504
505
506
507
508
509
510
511
512 protected
513 double SelfUpdateTime =
514 0;
515
516
517
518
519
520 protected boolean SelfUpdateTime_Set = false;
521
522 @Override
523
524
525
526
527
528
529
530
531 public double getSelfUpdateTime()
532 {
533 return SelfUpdateTime;
534 }
535
536
537
538
539
540
541
542
543
544
545 protected
546 double VisionTime =
547 0;
548
549
550
551
552
553 protected boolean VisionTime_Set = false;
554
555 @Override
556
557
558
559
560
561
562
563
564
565 public double getVisionTime()
566 {
567 return VisionTime;
568 }
569
570
571
572
573
574
575
576 protected
577 int LocUpdateMultiplier =
578 0;
579
580
581
582
583
584 protected boolean LocUpdateMultiplier_Set = false;
585
586 @Override
587
588
589
590
591
592
593 public int getLocUpdateMultiplier()
594 {
595 return LocUpdateMultiplier;
596 }
597
598
599
600
601
602
603
604
605 protected
606 boolean ShowDebug =
607 false;
608
609
610
611
612
613 protected boolean ShowDebug_Set = false;
614
615 @Override
616
617
618
619
620
621
622
623 public boolean isShowDebug()
624 {
625 return ShowDebug;
626 }
627
628
629
630
631
632
633
634
635 protected
636 boolean ShowFocalPoint =
637 false;
638
639
640
641
642
643 protected boolean ShowFocalPoint_Set = false;
644
645 @Override
646
647
648
649
650
651
652
653 public boolean isShowFocalPoint()
654 {
655 return ShowFocalPoint;
656 }
657
658
659
660
661
662
663
664
665 protected
666 boolean DrawTraceLines =
667 false;
668
669
670
671
672
673 protected boolean DrawTraceLines_Set = false;
674
675 @Override
676
677
678
679
680
681
682
683 public boolean isDrawTraceLines()
684 {
685 return DrawTraceLines;
686 }
687
688
689
690
691
692
693
694
695 protected
696 boolean SynchronousOff =
697 false;
698
699
700
701
702
703 protected boolean SynchronousOff_Set = false;
704
705 @Override
706
707
708
709
710
711
712
713 public boolean isSynchronousOff()
714 {
715 return SynchronousOff;
716 }
717
718
719
720
721
722
723
724 protected
725 boolean AutoPickupOff =
726 false;
727
728
729
730
731
732 protected boolean AutoPickupOff_Set = false;
733
734 @Override
735
736
737
738
739
740
741 public boolean isAutoPickupOff()
742 {
743 return AutoPickupOff;
744 }
745
746
747
748
749
750
751
752 protected
753 String Action =
754 null;
755
756
757
758
759
760 protected boolean Action_Set = false;
761
762 @Override
763
764
765
766
767
768
769 public String getAction()
770 {
771 return Action;
772 }
773
774
775 private ConfigChangeLocal localPart = null;
776
777 @Override
778 public ConfigChangeLocal
779 getLocal() {
780 if (localPart != null) return localPart;
781 return localPart = new
782 ConfigChangeLocalMessage();
783 }
784
785 private ConfigChangeShared sharedPart = null;
786
787 @Override
788 public ConfigChangeShared
789 getShared() {
790 if (sharedPart != null) return sharedPart;
791 return sharedPart = new
792 ConfigChangeSharedMessage();
793 }
794
795 private ConfigChangeStatic staticPart = null;
796
797 @Override
798 public ConfigChangeStatic
799 getStatic() {
800 if (staticPart != null) return staticPart;
801 return staticPart = new
802 ConfigChangeStaticMessage();
803 }
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819 public class ConfigChangeLocalMessage
820 extends
821 ConfigChangeLocal
822 {
823
824 @Override
825 public
826 ConfigChangeLocalMessage clone() {
827 return this;
828 }
829
830 public ConfigChangeLocalMessage getLocal() {
831 return this;
832 }
833 public ISharedWorldObject getShared() {
834 throw new UnsupportedOperationException("Could not return LOCAL as SHARED");
835 }
836 public IStaticWorldObject getStatic() {
837 throw new UnsupportedOperationException("Could not return LOCAL as STATIC");
838 }
839
840
841
842
843 public UnrealId getId()
844 {
845 return Id;
846 }
847
848
849
850
851 public UnrealId getBotId()
852 {
853 return BotId;
854 }
855
856
857
858
859
860
861 public boolean isManualSpawn()
862 {
863 return ManualSpawn;
864 }
865
866
867
868
869
870
871
872
873 public boolean isAutoTrace()
874 {
875 return AutoTrace;
876 }
877
878
879
880
881 public String getName()
882 {
883 return Name;
884 }
885
886
887
888
889
890
891 public double getSpeedMultiplier()
892 {
893 return SpeedMultiplier;
894 }
895
896
897
898
899
900
901 public Rotation getRotationRate()
902 {
903 return RotationRate;
904 }
905
906
907
908
909
910
911 public boolean isInvulnerable()
912 {
913 return Invulnerable;
914 }
915
916
917
918
919
920
921
922
923 public double getSelfUpdateTime()
924 {
925 return SelfUpdateTime;
926 }
927
928
929
930
931
932
933
934
935
936 public double getVisionTime()
937 {
938 return VisionTime;
939 }
940
941
942
943
944
945
946 public int getLocUpdateMultiplier()
947 {
948 return LocUpdateMultiplier;
949 }
950
951
952
953
954
955
956
957 public boolean isShowDebug()
958 {
959 return ShowDebug;
960 }
961
962
963
964
965
966
967
968 public boolean isShowFocalPoint()
969 {
970 return ShowFocalPoint;
971 }
972
973
974
975
976
977
978
979 public boolean isDrawTraceLines()
980 {
981 return DrawTraceLines;
982 }
983
984
985
986
987
988
989
990 public boolean isSynchronousOff()
991 {
992 return SynchronousOff;
993 }
994
995
996
997
998
999
1000 public boolean isAutoPickupOff()
1001 {
1002 return AutoPickupOff;
1003 }
1004
1005
1006
1007
1008
1009
1010 public String getAction()
1011 {
1012 return Action;
1013 }
1014
1015
1016 public String toString() {
1017 return
1018 super.toString() + "[" +
1019
1020 "Id = " + String.valueOf(getId()
1021 ) + " | " +
1022
1023 "BotId = " + String.valueOf(getBotId()
1024 ) + " | " +
1025
1026 "ManualSpawn = " + String.valueOf(isManualSpawn()
1027 ) + " | " +
1028
1029 "AutoTrace = " + String.valueOf(isAutoTrace()
1030 ) + " | " +
1031
1032 "Name = " + String.valueOf(getName()
1033 ) + " | " +
1034
1035 "SpeedMultiplier = " + String.valueOf(getSpeedMultiplier()
1036 ) + " | " +
1037
1038 "RotationRate = " + String.valueOf(getRotationRate()
1039 ) + " | " +
1040
1041 "Invulnerable = " + String.valueOf(isInvulnerable()
1042 ) + " | " +
1043
1044 "SelfUpdateTime = " + String.valueOf(getSelfUpdateTime()
1045 ) + " | " +
1046
1047 "VisionTime = " + String.valueOf(getVisionTime()
1048 ) + " | " +
1049
1050 "LocUpdateMultiplier = " + String.valueOf(getLocUpdateMultiplier()
1051 ) + " | " +
1052
1053 "ShowDebug = " + String.valueOf(isShowDebug()
1054 ) + " | " +
1055
1056 "ShowFocalPoint = " + String.valueOf(isShowFocalPoint()
1057 ) + " | " +
1058
1059 "DrawTraceLines = " + String.valueOf(isDrawTraceLines()
1060 ) + " | " +
1061
1062 "SynchronousOff = " + String.valueOf(isSynchronousOff()
1063 ) + " | " +
1064
1065 "AutoPickupOff = " + String.valueOf(isAutoPickupOff()
1066 ) + " | " +
1067
1068 "Action = " + String.valueOf(getAction()
1069 ) + " | " +
1070
1071 "]";
1072 }
1073
1074
1075 public String toHtmlString() {
1076 return super.toString() + "[<br/>" +
1077
1078 "<b>Id</b> = " + String.valueOf(getId()
1079 ) + " <br/> " +
1080
1081 "<b>BotId</b> = " + String.valueOf(getBotId()
1082 ) + " <br/> " +
1083
1084 "<b>ManualSpawn</b> = " + String.valueOf(isManualSpawn()
1085 ) + " <br/> " +
1086
1087 "<b>AutoTrace</b> = " + String.valueOf(isAutoTrace()
1088 ) + " <br/> " +
1089
1090 "<b>Name</b> = " + String.valueOf(getName()
1091 ) + " <br/> " +
1092
1093 "<b>SpeedMultiplier</b> = " + String.valueOf(getSpeedMultiplier()
1094 ) + " <br/> " +
1095
1096 "<b>RotationRate</b> = " + String.valueOf(getRotationRate()
1097 ) + " <br/> " +
1098
1099 "<b>Invulnerable</b> = " + String.valueOf(isInvulnerable()
1100 ) + " <br/> " +
1101
1102 "<b>SelfUpdateTime</b> = " + String.valueOf(getSelfUpdateTime()
1103 ) + " <br/> " +
1104
1105 "<b>VisionTime</b> = " + String.valueOf(getVisionTime()
1106 ) + " <br/> " +
1107
1108 "<b>LocUpdateMultiplier</b> = " + String.valueOf(getLocUpdateMultiplier()
1109 ) + " <br/> " +
1110
1111 "<b>ShowDebug</b> = " + String.valueOf(isShowDebug()
1112 ) + " <br/> " +
1113
1114 "<b>ShowFocalPoint</b> = " + String.valueOf(isShowFocalPoint()
1115 ) + " <br/> " +
1116
1117 "<b>DrawTraceLines</b> = " + String.valueOf(isDrawTraceLines()
1118 ) + " <br/> " +
1119
1120 "<b>SynchronousOff</b> = " + String.valueOf(isSynchronousOff()
1121 ) + " <br/> " +
1122
1123 "<b>AutoPickupOff</b> = " + String.valueOf(isAutoPickupOff()
1124 ) + " <br/> " +
1125
1126 "<b>Action</b> = " + String.valueOf(getAction()
1127 ) + " <br/> " +
1128
1129 "<br/>]";
1130 }
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141 }
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157 public class ConfigChangeStaticMessage
1158 extends
1159 ConfigChangeStatic
1160 {
1161
1162 @Override
1163 public
1164 ConfigChangeStaticMessage clone() {
1165 return this;
1166 }
1167
1168
1169
1170
1171 public UnrealId getId()
1172 {
1173 return Id;
1174 }
1175
1176
1177 @Override
1178 public boolean isDifferentFrom(IStaticWorldObject other)
1179 {
1180 if (other == null)
1181 {
1182 return true;
1183 }
1184 else if (other == this)
1185 {
1186 return false;
1187 }
1188 else
1189 {
1190 ConfigChangeStatic obj = (ConfigChangeStatic) other;
1191
1192
1193 if ( !(
1194 AdvancedEquals.equalsOrNull(this.getId()
1195 , obj.getId()
1196 )
1197 ) )
1198 {
1199 System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property Id on object class ConfigChangeStatic");
1200 return true;
1201 }
1202
1203 }
1204 return false;
1205 }
1206
1207
1208 public String toString() {
1209 return
1210 super.toString() + "[" +
1211
1212 "Id = " + String.valueOf(getId()
1213 ) + " | " +
1214
1215 "]";
1216 }
1217
1218
1219 public String toHtmlString() {
1220 return super.toString() + "[<br/>" +
1221
1222 "<b>Id</b> = " + String.valueOf(getId()
1223 ) + " <br/> " +
1224
1225 "<br/>]";
1226 }
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237 }
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253 public class ConfigChangeSharedMessage
1254 extends
1255 ConfigChangeShared
1256 {
1257
1258
1259
1260 public ConfigChangeSharedMessage()
1261 {
1262
1263 }
1264
1265 @Override
1266 public
1267 ConfigChangeSharedMessage clone() {
1268 return this;
1269 }
1270
1271
1272
1273
1274 protected HashMap<PropertyId, ISharedProperty> propertyMap = new HashMap<PropertyId, ISharedProperty>(
1275 0
1276 );
1277
1278 @Override
1279 public ISharedProperty getProperty(PropertyId id) {
1280 return propertyMap.get(id);
1281 }
1282
1283 @Override
1284 public Map<PropertyId, ISharedProperty> getProperties() {
1285 return propertyMap;
1286 }
1287
1288
1289
1290
1291
1292
1293 public UnrealId getId()
1294 {
1295 return Id;
1296 }
1297
1298
1299 public String toString() {
1300 return
1301 super.toString() + "[" +
1302
1303 "Id = " + String.valueOf(getId()
1304 ) + " | " +
1305
1306 "]";
1307 }
1308
1309
1310 public String toHtmlString() {
1311 return super.toString() + "[<br/>" +
1312
1313 "<b>Id</b> = " + String.valueOf(getId()
1314 ) + " <br/> " +
1315
1316 "<br/>]";
1317 }
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328 }
1329
1330
1331
1332
1333 @Override
1334 public IWorldObjectUpdateResult<IWorldObject> update(IWorldObject object) {
1335 if (object == null)
1336 {
1337 return new IWorldObjectUpdateResult.WorldObjectUpdateResult(IWorldObjectUpdateResult.Result.CREATED, this);
1338 }
1339 if (!( object instanceof ConfigChangeMessage) ) {
1340 throw new PogamutException("Can't update different class than ConfigChangeMessage, got class " + object.getClass().getSimpleName() + "!", this);
1341 }
1342 ConfigChangeMessage toUpdate = (ConfigChangeMessage)object;
1343
1344 boolean updated = false;
1345
1346
1347
1348 if (!SafeEquals.equals(toUpdate.BotId, getBotId()
1349 )) {
1350 toUpdate.BotId=getBotId()
1351 ;
1352 updated = true;
1353 }
1354
1355 if (toUpdate.ManualSpawn != isManualSpawn()
1356 ) {
1357 toUpdate.ManualSpawn=isManualSpawn()
1358 ;
1359 updated = true;
1360 }
1361
1362 if (toUpdate.AutoTrace != isAutoTrace()
1363 ) {
1364 toUpdate.AutoTrace=isAutoTrace()
1365 ;
1366 updated = true;
1367 }
1368
1369 if (!SafeEquals.equals(toUpdate.Name, getName()
1370 )) {
1371 toUpdate.Name=getName()
1372 ;
1373 updated = true;
1374 }
1375
1376 if (toUpdate.SpeedMultiplier != getSpeedMultiplier()
1377 ) {
1378 toUpdate.SpeedMultiplier=getSpeedMultiplier()
1379 ;
1380 updated = true;
1381 }
1382
1383 if (!SafeEquals.equals(toUpdate.RotationRate, getRotationRate()
1384 )) {
1385 toUpdate.RotationRate=getRotationRate()
1386 ;
1387 updated = true;
1388 }
1389
1390 if (toUpdate.Invulnerable != isInvulnerable()
1391 ) {
1392 toUpdate.Invulnerable=isInvulnerable()
1393 ;
1394 updated = true;
1395 }
1396
1397 if (toUpdate.SelfUpdateTime != getSelfUpdateTime()
1398 ) {
1399 toUpdate.SelfUpdateTime=getSelfUpdateTime()
1400 ;
1401 updated = true;
1402 }
1403
1404 if (toUpdate.VisionTime != getVisionTime()
1405 ) {
1406 toUpdate.VisionTime=getVisionTime()
1407 ;
1408 updated = true;
1409 }
1410
1411 if (toUpdate.LocUpdateMultiplier != getLocUpdateMultiplier()
1412 ) {
1413 toUpdate.LocUpdateMultiplier=getLocUpdateMultiplier()
1414 ;
1415 updated = true;
1416 }
1417
1418 if (toUpdate.ShowDebug != isShowDebug()
1419 ) {
1420 toUpdate.ShowDebug=isShowDebug()
1421 ;
1422 updated = true;
1423 }
1424
1425 if (toUpdate.ShowFocalPoint != isShowFocalPoint()
1426 ) {
1427 toUpdate.ShowFocalPoint=isShowFocalPoint()
1428 ;
1429 updated = true;
1430 }
1431
1432 if (toUpdate.DrawTraceLines != isDrawTraceLines()
1433 ) {
1434 toUpdate.DrawTraceLines=isDrawTraceLines()
1435 ;
1436 updated = true;
1437 }
1438
1439 if (toUpdate.SynchronousOff != isSynchronousOff()
1440 ) {
1441 toUpdate.SynchronousOff=isSynchronousOff()
1442 ;
1443 updated = true;
1444 }
1445
1446 if (toUpdate.AutoPickupOff != isAutoPickupOff()
1447 ) {
1448 toUpdate.AutoPickupOff=isAutoPickupOff()
1449 ;
1450 updated = true;
1451 }
1452
1453 if (!SafeEquals.equals(toUpdate.Action, getAction()
1454 )) {
1455 toUpdate.Action=getAction()
1456 ;
1457 updated = true;
1458 }
1459
1460
1461
1462
1463
1464
1465 toUpdate.SimTime = SimTime;
1466
1467 if (updated) {
1468 return new IWorldObjectUpdateResult.WorldObjectUpdateResult<IWorldObject>(IWorldObjectUpdateResult.Result.UPDATED, toUpdate);
1469 } else {
1470 return new IWorldObjectUpdateResult.WorldObjectUpdateResult<IWorldObject>(IWorldObjectUpdateResult.Result.SAME, toUpdate);
1471 }
1472 }
1473
1474 @Override
1475 public ILocalWorldObjectUpdatedEvent getLocalEvent() {
1476 return new ConfigChangeLocalImpl.ConfigChangeLocalUpdate
1477 (this.getLocal(), SimTime);
1478 }
1479
1480 @Override
1481 public ISharedWorldObjectUpdatedEvent getSharedEvent() {
1482 return new ConfigChangeSharedImpl.ConfigChangeSharedUpdate
1483 (this.getShared(), SimTime, this.getTeamId());
1484 }
1485
1486 @Override
1487 public IStaticWorldObjectUpdatedEvent getStaticEvent() {
1488 return new ConfigChangeStaticImpl.ConfigChangeStaticUpdate
1489 (this.getStatic(), SimTime);
1490 }
1491
1492
1493 public String toString() {
1494 return
1495 super.toString() + "[" +
1496
1497 "Id = " + String.valueOf(getId()
1498 ) + " | " +
1499
1500 "BotId = " + String.valueOf(getBotId()
1501 ) + " | " +
1502
1503 "ManualSpawn = " + String.valueOf(isManualSpawn()
1504 ) + " | " +
1505
1506 "AutoTrace = " + String.valueOf(isAutoTrace()
1507 ) + " | " +
1508
1509 "Name = " + String.valueOf(getName()
1510 ) + " | " +
1511
1512 "SpeedMultiplier = " + String.valueOf(getSpeedMultiplier()
1513 ) + " | " +
1514
1515 "RotationRate = " + String.valueOf(getRotationRate()
1516 ) + " | " +
1517
1518 "Invulnerable = " + String.valueOf(isInvulnerable()
1519 ) + " | " +
1520
1521 "SelfUpdateTime = " + String.valueOf(getSelfUpdateTime()
1522 ) + " | " +
1523
1524 "VisionTime = " + String.valueOf(getVisionTime()
1525 ) + " | " +
1526
1527 "LocUpdateMultiplier = " + String.valueOf(getLocUpdateMultiplier()
1528 ) + " | " +
1529
1530 "ShowDebug = " + String.valueOf(isShowDebug()
1531 ) + " | " +
1532
1533 "ShowFocalPoint = " + String.valueOf(isShowFocalPoint()
1534 ) + " | " +
1535
1536 "DrawTraceLines = " + String.valueOf(isDrawTraceLines()
1537 ) + " | " +
1538
1539 "SynchronousOff = " + String.valueOf(isSynchronousOff()
1540 ) + " | " +
1541
1542 "AutoPickupOff = " + String.valueOf(isAutoPickupOff()
1543 ) + " | " +
1544
1545 "Action = " + String.valueOf(getAction()
1546 ) + " | " +
1547
1548 "]";
1549 }
1550
1551
1552 public String toHtmlString() {
1553 return super.toString() + "[<br/>" +
1554
1555 "<b>Id</b> = " + String.valueOf(getId()
1556 ) + " <br/> " +
1557
1558 "<b>BotId</b> = " + String.valueOf(getBotId()
1559 ) + " <br/> " +
1560
1561 "<b>ManualSpawn</b> = " + String.valueOf(isManualSpawn()
1562 ) + " <br/> " +
1563
1564 "<b>AutoTrace</b> = " + String.valueOf(isAutoTrace()
1565 ) + " <br/> " +
1566
1567 "<b>Name</b> = " + String.valueOf(getName()
1568 ) + " <br/> " +
1569
1570 "<b>SpeedMultiplier</b> = " + String.valueOf(getSpeedMultiplier()
1571 ) + " <br/> " +
1572
1573 "<b>RotationRate</b> = " + String.valueOf(getRotationRate()
1574 ) + " <br/> " +
1575
1576 "<b>Invulnerable</b> = " + String.valueOf(isInvulnerable()
1577 ) + " <br/> " +
1578
1579 "<b>SelfUpdateTime</b> = " + String.valueOf(getSelfUpdateTime()
1580 ) + " <br/> " +
1581
1582 "<b>VisionTime</b> = " + String.valueOf(getVisionTime()
1583 ) + " <br/> " +
1584
1585 "<b>LocUpdateMultiplier</b> = " + String.valueOf(getLocUpdateMultiplier()
1586 ) + " <br/> " +
1587
1588 "<b>ShowDebug</b> = " + String.valueOf(isShowDebug()
1589 ) + " <br/> " +
1590
1591 "<b>ShowFocalPoint</b> = " + String.valueOf(isShowFocalPoint()
1592 ) + " <br/> " +
1593
1594 "<b>DrawTraceLines</b> = " + String.valueOf(isDrawTraceLines()
1595 ) + " <br/> " +
1596
1597 "<b>SynchronousOff</b> = " + String.valueOf(isSynchronousOff()
1598 ) + " <br/> " +
1599
1600 "<b>AutoPickupOff</b> = " + String.valueOf(isAutoPickupOff()
1601 ) + " <br/> " +
1602
1603 "<b>Action</b> = " + String.valueOf(getAction()
1604 ) + " <br/> " +
1605
1606 "<br/>]";
1607 }
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618 }
1619