View Javadoc

1   package cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages;
2    		
3    		// --- IMPORTS FROM /messages/settings/javasettings/javaimport BEGIN
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   		// --- IMPORTS FROM /messages/settings/javasettings/javaimport END
6   		
7   		
8   		// --- IMPORTS FROM extra/code/java/javapart/classcategory[@name='all'] BEGIN
9   				
10  		// --- IMPORTS FROM extra/code/java/javapart/classcategory[@name='all'] END
11  		
12  		// --- IMPORTS FROM extra/code/java/javapart/classcategory[@name=local]+classtype[@name=impl] BEGIN
13  		
14  		// --- IMPORTS FROM extra/code/java/javapart/classcategory[@name=local]+classtype[@name=impl] END
15      
16   		/**
17           *  
18              				Implementation of the local part of the GameBots2004 message CONFCH.  
19              			
20           *
21           *  <p></p><p></p>
22           *  Complete message documentation:               
23           *  
24  		Asynchronous message. Message sent when the bot configuration
25  		changed - each agent has a lot of parameters affecting his state
26  		in the environment. See each property for the details.
27  	
28           */
29   	public class ConfigChangeLocalImpl 
30    						extends
31    						ConfigChangeLocal
32  	    {
33   	
34      	
35      	
36      	/**
37      	 * Parameter-less contructor for the message.
38      	 */
39  		public ConfigChangeLocalImpl()
40  		{
41  		}
42  	
43      	
44      	
45      	
46      	/**
47  		 * Creates new instance of the message ConfigChange.
48  		 * 
49  		Asynchronous message. Message sent when the bot configuration
50  		changed - each agent has a lot of parameters affecting his state
51  		in the environment. See each property for the details.
52  	
53  		 * Corresponding GameBots message
54  		 *   (local part)
55  		 *   is
56  		 *   CONFCH.
57  		 * 
58   	  	 * 
59  		 *   
60  		 *     @param Id Id of this config message. This Id is generated from BotId, string "_CONFCH" is added at the end.
61  		 *   
62  		 * 
63  		 *   
64  		 *     @param BotId Unique Id of the bot.
65  		 *   
66  		 * 
67  		 *   
68  		 *     @param ManualSpawn 
69  			True if we have to spawn the bot manually after each death
70  		
71  		 *   
72  		 * 
73  		 *   
74  		 *     @param AutoTrace 
75  			True if the bot is using auto ray tracing (is provided with
76  			synchronous ATR messages). See ATR messages for more
77  			details.
78  		
79  		 *   
80  		 * 
81  		 *   
82  		 *     @param Name The bot's name.
83  		 *   
84  		 * 
85  		 *   
86  		 *     @param SpeedMultiplier 
87  			Bots default speed will be multiplied by this number. Ranges from 0.1 to 2 (default, can be set in ini in [GameBots2004.RemoteBot] MaxSpeed).
88  		
89  		 *   
90  		 * 
91  		 *   
92  		 *     @param RotationRate 
93  			Bot rotation rate. Default rotation rate is: (Pitch=3072,Yaw=60000,Roll=2048) and may be configured in ini file in [GameBots2004.RemoteBot] DefaultRotationRate. (pitch - up/down, yaw - left/right, roll - equivalent of doing a cartwheel)
94  		
95  		 *   
96  		 * 
97  		 *   
98  		 *     @param Invulnerable 
99  			If bot is invulnerable (cannot die) or not.
100 		
101 		 *   
102 		 * 
103 		 *   
104 		 *     @param SelfUpdateTime 
105 			The delay between two self message synchronous batches 
106 			(can range from 0.01 to 2 seconds). Will be used only if NewSelfBatchProtocol
107 			attribute is set to true in INIT message.
108 		
109 		 *   
110 		 * 
111 		 *   
112 		 *     @param VisionTime 
113 			The delay between two synchronous batches containing vision updates
114 			(can range from 0.1 to 2 seconds). If NewSelfBatchProtocol
115 			attribute is set to true in INIT message, more batch messages containing only
116 			SELF message will arrive between two vision update batches (containing PLR,PRJ,INV.. messages).
117 		
118 		 *   
119 		 * 
120 		 *   
121 		 *     @param LocUpdateMultiplier 
122 			Holds information how many times faster is exported location update message (UPD) compared to sync. batch, e.g. when this multiplier is set to 5 and vision time is 250 ms, UPD message will arrive every 50 ms.
123 		
124 		 *   
125 		 * 
126 		 *   
127 		 *     @param ShowDebug 
128 			If some additional debug information will be shown in the
129 			UT2004 server console window.
130 		
131 		 *   
132 		 * 
133 		 *   
134 		 *     @param ShowFocalPoint 
135 			If true an actor visualizing the location the bot is
136 			actually looking at will appear in the game.
137 		
138 		 *   
139 		 * 
140 		 *   
141 		 *     @param DrawTraceLines 
142 			if the GB should draw lines representing the auto ray traces
143 			of the bot (for more information see ATR message).
144 		
145 		 *   
146 		 * 
147 		 *   
148 		 *     @param SynchronousOff 
149 			It informs if sending of all GB synchronous messages is
150 			enabled or disabled.
151 		
152 		 *   
153 		 * 
154 		 *   
155 		 *     @param AutoPickupOff 
156 			It enables/disables automatic pickup of the bot. If true the items can be picked up through PICK command.
157 		
158 		 *   
159 		 * 
160 		 *   
161 		 *     @param Action 
162 			Name of current BDI action.
163 		
164 		 *   
165 		 * 
166 		 */
167 		public ConfigChangeLocalImpl(
168 			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
169 		) {
170 			
171 					this.Id = Id;
172 				
173 					this.BotId = BotId;
174 				
175 					this.ManualSpawn = ManualSpawn;
176 				
177 					this.AutoTrace = AutoTrace;
178 				
179 					this.Name = Name;
180 				
181 					this.SpeedMultiplier = SpeedMultiplier;
182 				
183 					this.RotationRate = RotationRate;
184 				
185 					this.Invulnerable = Invulnerable;
186 				
187 					this.SelfUpdateTime = SelfUpdateTime;
188 				
189 					this.VisionTime = VisionTime;
190 				
191 					this.LocUpdateMultiplier = LocUpdateMultiplier;
192 				
193 					this.ShowDebug = ShowDebug;
194 				
195 					this.ShowFocalPoint = ShowFocalPoint;
196 				
197 					this.DrawTraceLines = DrawTraceLines;
198 				
199 					this.SynchronousOff = SynchronousOff;
200 				
201 					this.AutoPickupOff = AutoPickupOff;
202 				
203 					this.Action = Action;
204 				
205 		}
206     
207     	/**
208 		 * Cloning constructor from the full message.
209 		 *
210 		 * @param original
211 		 */
212 		public ConfigChangeLocalImpl(ConfigChange original) {		
213 			
214 					this.Id = original.getId()
215  	;
216 				
217 					this.BotId = original.getBotId()
218  	;
219 				
220 					this.ManualSpawn = original.isManualSpawn()
221  	;
222 				
223 					this.AutoTrace = original.isAutoTrace()
224  	;
225 				
226 					this.Name = original.getName()
227  	;
228 				
229 					this.SpeedMultiplier = original.getSpeedMultiplier()
230  	;
231 				
232 					this.RotationRate = original.getRotationRate()
233  	;
234 				
235 					this.Invulnerable = original.isInvulnerable()
236  	;
237 				
238 					this.SelfUpdateTime = original.getSelfUpdateTime()
239  	;
240 				
241 					this.VisionTime = original.getVisionTime()
242  	;
243 				
244 					this.LocUpdateMultiplier = original.getLocUpdateMultiplier()
245  	;
246 				
247 					this.ShowDebug = original.isShowDebug()
248  	;
249 				
250 					this.ShowFocalPoint = original.isShowFocalPoint()
251  	;
252 				
253 					this.DrawTraceLines = original.isDrawTraceLines()
254  	;
255 				
256 					this.SynchronousOff = original.isSynchronousOff()
257  	;
258 				
259 					this.AutoPickupOff = original.isAutoPickupOff()
260  	;
261 				
262 					this.Action = original.getAction()
263  	;
264 				
265 			this.SimTime = original.getSimTime();			
266 		}
267 		
268 		/**
269 		 * Cloning constructor from the full message.
270 		 *
271 		 * @param original
272 		 */
273 		public ConfigChangeLocalImpl(ConfigChangeLocalImpl original) {		
274 			
275 					this.Id = original.getId()
276  	;
277 				
278 					this.BotId = original.getBotId()
279  	;
280 				
281 					this.ManualSpawn = original.isManualSpawn()
282  	;
283 				
284 					this.AutoTrace = original.isAutoTrace()
285  	;
286 				
287 					this.Name = original.getName()
288  	;
289 				
290 					this.SpeedMultiplier = original.getSpeedMultiplier()
291  	;
292 				
293 					this.RotationRate = original.getRotationRate()
294  	;
295 				
296 					this.Invulnerable = original.isInvulnerable()
297  	;
298 				
299 					this.SelfUpdateTime = original.getSelfUpdateTime()
300  	;
301 				
302 					this.VisionTime = original.getVisionTime()
303  	;
304 				
305 					this.LocUpdateMultiplier = original.getLocUpdateMultiplier()
306  	;
307 				
308 					this.ShowDebug = original.isShowDebug()
309  	;
310 				
311 					this.ShowFocalPoint = original.isShowFocalPoint()
312  	;
313 				
314 					this.DrawTraceLines = original.isDrawTraceLines()
315  	;
316 				
317 					this.SynchronousOff = original.isSynchronousOff()
318  	;
319 				
320 					this.AutoPickupOff = original.isAutoPickupOff()
321  	;
322 				
323 					this.Action = original.getAction()
324  	;
325 				
326 			this.SimTime = original.getSimTime();
327 		}
328 		
329 			/**
330 			 * Cloning constructor from the message part.
331 			 *
332 			 * @param original
333 			 */
334 			public ConfigChangeLocalImpl(ConfigChangeLocal original) {
335 				
336 						this.Id = original.getId()
337  	;
338 					
339 						this.BotId = original.getBotId()
340  	;
341 					
342 						this.ManualSpawn = original.isManualSpawn()
343  	;
344 					
345 						this.AutoTrace = original.isAutoTrace()
346  	;
347 					
348 						this.Name = original.getName()
349  	;
350 					
351 						this.SpeedMultiplier = original.getSpeedMultiplier()
352  	;
353 					
354 						this.RotationRate = original.getRotationRate()
355  	;
356 					
357 						this.Invulnerable = original.isInvulnerable()
358  	;
359 					
360 						this.SelfUpdateTime = original.getSelfUpdateTime()
361  	;
362 					
363 						this.VisionTime = original.getVisionTime()
364  	;
365 					
366 						this.LocUpdateMultiplier = original.getLocUpdateMultiplier()
367  	;
368 					
369 						this.ShowDebug = original.isShowDebug()
370  	;
371 					
372 						this.ShowFocalPoint = original.isShowFocalPoint()
373  	;
374 					
375 						this.DrawTraceLines = original.isDrawTraceLines()
376  	;
377 					
378 						this.SynchronousOff = original.isSynchronousOff()
379  	;
380 					
381 						this.AutoPickupOff = original.isAutoPickupOff()
382  	;
383 					
384 						this.Action = original.getAction()
385  	;
386 					
387 			}
388 		
389    				
390    				@Override
391    				public void setSimTime(long SimTime) {
392 					super.setSimTime(SimTime);
393 				}
394    			
395 	    				@Override
396 	    				public 
397 	    				ConfigChangeLocalImpl clone() {
398 	    					return new 
399 	    					ConfigChangeLocalImpl(this);
400 	    				}
401 	    				
402 	    				
403     	
404 	    /**
405          * Id of this config message. This Id is generated from BotId, string "_CONFCH" is added at the end. 
406          */
407         protected
408          UnrealId Id =
409        	null;
410 	
411  		/**
412          * Id of this config message. This Id is generated from BotId, string "_CONFCH" is added at the end. 
413          */
414         public  UnrealId getId()
415  	 {
416 				    					return Id;
417 				    				}
418 				    			
419     	
420 	    /**
421          * Unique Id of the bot. 
422          */
423         protected
424          UnrealId BotId =
425        	null;
426 	
427  		/**
428          * Unique Id of the bot. 
429          */
430         public  UnrealId getBotId()
431  	 {
432 				    					return BotId;
433 				    				}
434 				    			
435     	
436 	    /**
437          * 
438 			True if we have to spawn the bot manually after each death
439 		 
440          */
441         protected
442          boolean ManualSpawn =
443        	false;
444 	
445  		/**
446          * 
447 			True if we have to spawn the bot manually after each death
448 		 
449          */
450         public  boolean isManualSpawn()
451  	 {
452 				    					return ManualSpawn;
453 				    				}
454 				    			
455     	
456 	    /**
457          * 
458 			True if the bot is using auto ray tracing (is provided with
459 			synchronous ATR messages). See ATR messages for more
460 			details.
461 		 
462          */
463         protected
464          boolean AutoTrace =
465        	false;
466 	
467  		/**
468          * 
469 			True if the bot is using auto ray tracing (is provided with
470 			synchronous ATR messages). See ATR messages for more
471 			details.
472 		 
473          */
474         public  boolean isAutoTrace()
475  	 {
476 				    					return AutoTrace;
477 				    				}
478 				    			
479     	
480 	    /**
481          * The bot's name. 
482          */
483         protected
484          String Name =
485        	null;
486 	
487  		/**
488          * The bot's name. 
489          */
490         public  String getName()
491  	 {
492 				    					return Name;
493 				    				}
494 				    			
495     	
496 	    /**
497          * 
498 			Bots default speed will be multiplied by this number. Ranges from 0.1 to 2 (default, can be set in ini in [GameBots2004.RemoteBot] MaxSpeed).
499 		 
500          */
501         protected
502          double SpeedMultiplier =
503        	0;
504 	
505  		/**
506          * 
507 			Bots default speed will be multiplied by this number. Ranges from 0.1 to 2 (default, can be set in ini in [GameBots2004.RemoteBot] MaxSpeed).
508 		 
509          */
510         public  double getSpeedMultiplier()
511  	 {
512 				    					return SpeedMultiplier;
513 				    				}
514 				    			
515     	
516 	    /**
517          * 
518 			Bot rotation rate. Default rotation rate is: (Pitch=3072,Yaw=60000,Roll=2048) and may be configured in ini file in [GameBots2004.RemoteBot] DefaultRotationRate. (pitch - up/down, yaw - left/right, roll - equivalent of doing a cartwheel)
519 		 
520          */
521         protected
522          Rotation RotationRate =
523        	null;
524 	
525  		/**
526          * 
527 			Bot rotation rate. Default rotation rate is: (Pitch=3072,Yaw=60000,Roll=2048) and may be configured in ini file in [GameBots2004.RemoteBot] DefaultRotationRate. (pitch - up/down, yaw - left/right, roll - equivalent of doing a cartwheel)
528 		 
529          */
530         public  Rotation getRotationRate()
531  	 {
532 				    					return RotationRate;
533 				    				}
534 				    			
535     	
536 	    /**
537          * 
538 			If bot is invulnerable (cannot die) or not.
539 		 
540          */
541         protected
542          boolean Invulnerable =
543        	false;
544 	
545  		/**
546          * 
547 			If bot is invulnerable (cannot die) or not.
548 		 
549          */
550         public  boolean isInvulnerable()
551  	 {
552 				    					return Invulnerable;
553 				    				}
554 				    			
555     	
556 	    /**
557          * 
558 			The delay between two self message synchronous batches 
559 			(can range from 0.01 to 2 seconds). Will be used only if NewSelfBatchProtocol
560 			attribute is set to true in INIT message.
561 		 
562          */
563         protected
564          double SelfUpdateTime =
565        	0;
566 	
567  		/**
568          * 
569 			The delay between two self message synchronous batches 
570 			(can range from 0.01 to 2 seconds). Will be used only if NewSelfBatchProtocol
571 			attribute is set to true in INIT message.
572 		 
573          */
574         public  double getSelfUpdateTime()
575  	 {
576 				    					return SelfUpdateTime;
577 				    				}
578 				    			
579     	
580 	    /**
581          * 
582 			The delay between two synchronous batches containing vision updates
583 			(can range from 0.1 to 2 seconds). If NewSelfBatchProtocol
584 			attribute is set to true in INIT message, more batch messages containing only
585 			SELF message will arrive between two vision update batches (containing PLR,PRJ,INV.. messages).
586 		 
587          */
588         protected
589          double VisionTime =
590        	0;
591 	
592  		/**
593          * 
594 			The delay between two synchronous batches containing vision updates
595 			(can range from 0.1 to 2 seconds). If NewSelfBatchProtocol
596 			attribute is set to true in INIT message, more batch messages containing only
597 			SELF message will arrive between two vision update batches (containing PLR,PRJ,INV.. messages).
598 		 
599          */
600         public  double getVisionTime()
601  	 {
602 				    					return VisionTime;
603 				    				}
604 				    			
605     	
606 	    /**
607          * 
608 			Holds information how many times faster is exported location update message (UPD) compared to sync. batch, e.g. when this multiplier is set to 5 and vision time is 250 ms, UPD message will arrive every 50 ms.
609 		 
610          */
611         protected
612          int LocUpdateMultiplier =
613        	0;
614 	
615  		/**
616          * 
617 			Holds information how many times faster is exported location update message (UPD) compared to sync. batch, e.g. when this multiplier is set to 5 and vision time is 250 ms, UPD message will arrive every 50 ms.
618 		 
619          */
620         public  int getLocUpdateMultiplier()
621  	 {
622 				    					return LocUpdateMultiplier;
623 				    				}
624 				    			
625     	
626 	    /**
627          * 
628 			If some additional debug information will be shown in the
629 			UT2004 server console window.
630 		 
631          */
632         protected
633          boolean ShowDebug =
634        	false;
635 	
636  		/**
637          * 
638 			If some additional debug information will be shown in the
639 			UT2004 server console window.
640 		 
641          */
642         public  boolean isShowDebug()
643  	 {
644 				    					return ShowDebug;
645 				    				}
646 				    			
647     	
648 	    /**
649          * 
650 			If true an actor visualizing the location the bot is
651 			actually looking at will appear in the game.
652 		 
653          */
654         protected
655          boolean ShowFocalPoint =
656        	false;
657 	
658  		/**
659          * 
660 			If true an actor visualizing the location the bot is
661 			actually looking at will appear in the game.
662 		 
663          */
664         public  boolean isShowFocalPoint()
665  	 {
666 				    					return ShowFocalPoint;
667 				    				}
668 				    			
669     	
670 	    /**
671          * 
672 			if the GB should draw lines representing the auto ray traces
673 			of the bot (for more information see ATR message).
674 		 
675          */
676         protected
677          boolean DrawTraceLines =
678        	false;
679 	
680  		/**
681          * 
682 			if the GB should draw lines representing the auto ray traces
683 			of the bot (for more information see ATR message).
684 		 
685          */
686         public  boolean isDrawTraceLines()
687  	 {
688 				    					return DrawTraceLines;
689 				    				}
690 				    			
691     	
692 	    /**
693          * 
694 			It informs if sending of all GB synchronous messages is
695 			enabled or disabled.
696 		 
697          */
698         protected
699          boolean SynchronousOff =
700        	false;
701 	
702  		/**
703          * 
704 			It informs if sending of all GB synchronous messages is
705 			enabled or disabled.
706 		 
707          */
708         public  boolean isSynchronousOff()
709  	 {
710 				    					return SynchronousOff;
711 				    				}
712 				    			
713     	
714 	    /**
715          * 
716 			It enables/disables automatic pickup of the bot. If true the items can be picked up through PICK command.
717 		 
718          */
719         protected
720          boolean AutoPickupOff =
721        	false;
722 	
723  		/**
724          * 
725 			It enables/disables automatic pickup of the bot. If true the items can be picked up through PICK command.
726 		 
727          */
728         public  boolean isAutoPickupOff()
729  	 {
730 				    					return AutoPickupOff;
731 				    				}
732 				    			
733     	
734 	    /**
735          * 
736 			Name of current BDI action.
737 		 
738          */
739         protected
740          String Action =
741        	null;
742 	
743  		/**
744          * 
745 			Name of current BDI action.
746 		 
747          */
748         public  String getAction()
749  	 {
750 				    					return Action;
751 				    				}
752 				    			
753     	
754     	
755     	
756     	
757     	public ConfigChangeLocalImpl getLocal() {
758 			return this;
759     	}
760 		public ISharedWorldObject getShared() {
761 		 	throw new UnsupportedOperationException("Could not return LOCAL as SHARED");
762 		}
763 		public IStaticWorldObject getStatic() {
764 		    throw new UnsupportedOperationException("Could not return LOCAL as STATIC");
765 		}
766  	
767 		public static class ConfigChangeLocalUpdate
768      implements ILocalWorldObjectUpdatedEvent, IGBWorldObjectEvent
769 		{
770 			protected long time;
771 			
772 			protected ConfigChangeLocal data = null; //contains object data for this update
773 			
774 			public ConfigChangeLocalUpdate
775     (ConfigChangeLocal moverLocal, long time)
776 			{
777 				this.data = moverLocal;
778 				this.time = time;
779 			}
780 			
781 			@Override
782 			public IWorldObjectUpdateResult<ILocalWorldObject> update(
783 					ILocalWorldObject object) 
784 			{
785 				if ( object == null)
786 				{
787 					data = new ConfigChangeLocalImpl(data); //we always return Impl object
788 					return new IWorldObjectUpdateResult.WorldObjectUpdateResult<ILocalWorldObject>(IWorldObjectUpdateResult.Result.CREATED, data);
789 				}
790 				if ( object instanceof ConfigChangeLocalImpl )
791 				{
792 					ConfigChangeLocalImpl toUpdate = (ConfigChangeLocalImpl)object;
793 					
794 					boolean updated = false;
795 					
796 					// UPDATING LOCAL PROPERTIES
797 					
798 				if (!SafeEquals.equals(toUpdate.BotId, data.getBotId()
799  	)) {
800 					toUpdate.BotId=data.getBotId()
801  	;
802 					updated = true;
803 				}
804 			
805 				if (toUpdate.ManualSpawn != data.isManualSpawn()
806  	) {
807 				    toUpdate.ManualSpawn=data.isManualSpawn()
808  	;
809 					updated = true;
810 				}
811 			
812 				if (toUpdate.AutoTrace != data.isAutoTrace()
813  	) {
814 				    toUpdate.AutoTrace=data.isAutoTrace()
815  	;
816 					updated = true;
817 				}
818 			
819 				if (!SafeEquals.equals(toUpdate.Name, data.getName()
820  	)) {
821 					toUpdate.Name=data.getName()
822  	;
823 					updated = true;
824 				}
825 			
826 				if (toUpdate.SpeedMultiplier != data.getSpeedMultiplier()
827  	) {
828 				    toUpdate.SpeedMultiplier=data.getSpeedMultiplier()
829  	;
830 					updated = true;
831 				}
832 			
833 				if (!SafeEquals.equals(toUpdate.RotationRate, data.getRotationRate()
834  	)) {
835 					toUpdate.RotationRate=data.getRotationRate()
836  	;
837 					updated = true;
838 				}
839 			
840 				if (toUpdate.Invulnerable != data.isInvulnerable()
841  	) {
842 				    toUpdate.Invulnerable=data.isInvulnerable()
843  	;
844 					updated = true;
845 				}
846 			
847 				if (toUpdate.SelfUpdateTime != data.getSelfUpdateTime()
848  	) {
849 				    toUpdate.SelfUpdateTime=data.getSelfUpdateTime()
850  	;
851 					updated = true;
852 				}
853 			
854 				if (toUpdate.VisionTime != data.getVisionTime()
855  	) {
856 				    toUpdate.VisionTime=data.getVisionTime()
857  	;
858 					updated = true;
859 				}
860 			
861 				if (toUpdate.LocUpdateMultiplier != data.getLocUpdateMultiplier()
862  	) {
863 				    toUpdate.LocUpdateMultiplier=data.getLocUpdateMultiplier()
864  	;
865 					updated = true;
866 				}
867 			
868 				if (toUpdate.ShowDebug != data.isShowDebug()
869  	) {
870 				    toUpdate.ShowDebug=data.isShowDebug()
871  	;
872 					updated = true;
873 				}
874 			
875 				if (toUpdate.ShowFocalPoint != data.isShowFocalPoint()
876  	) {
877 				    toUpdate.ShowFocalPoint=data.isShowFocalPoint()
878  	;
879 					updated = true;
880 				}
881 			
882 				if (toUpdate.DrawTraceLines != data.isDrawTraceLines()
883  	) {
884 				    toUpdate.DrawTraceLines=data.isDrawTraceLines()
885  	;
886 					updated = true;
887 				}
888 			
889 				if (toUpdate.SynchronousOff != data.isSynchronousOff()
890  	) {
891 				    toUpdate.SynchronousOff=data.isSynchronousOff()
892  	;
893 					updated = true;
894 				}
895 			
896 				if (toUpdate.AutoPickupOff != data.isAutoPickupOff()
897  	) {
898 				    toUpdate.AutoPickupOff=data.isAutoPickupOff()
899  	;
900 					updated = true;
901 				}
902 			
903 				if (!SafeEquals.equals(toUpdate.Action, data.getAction()
904  	)) {
905 					toUpdate.Action=data.getAction()
906  	;
907 					updated = true;
908 				}
909 			
910 					
911 					data = toUpdate; //the updating has finished
912 					
913 					if ( updated )
914 					{
915 						toUpdate.SimTime = this.time;
916 						return new IWorldObjectUpdateResult.WorldObjectUpdateResult<ILocalWorldObject>(IWorldObjectUpdateResult.Result.UPDATED, data);
917 					}
918 					
919 					return new IWorldObjectUpdateResult.WorldObjectUpdateResult<ILocalWorldObject>(IWorldObjectUpdateResult.Result.SAME, data);
920 				}
921 				throw new PogamutException("Unsupported object type for update. Expected ConfigChangeLocalImpl for object " + object.getId() +", not object of class " + object.getClass().getSimpleName() + ".", this);
922 			}
923 	
924 			/**
925 			 * Simulation time in MILLI SECONDS !!!
926 			 */
927 			@Override
928 			public long getSimTime() {
929 				return this.time;
930 			}
931 	
932 			@Override
933 			public IWorldObject getObject() {
934 				return data;
935 			}
936 	
937 			@Override
938 			public WorldObjectId getId() {
939 				return data.getId();
940 			}
941 			
942 		}	
943  	
944  		
945  	    public String toString() {
946             return
947             	super.toString() + "[" +
948             	
949 		              			"Id = " + String.valueOf(getId()
950  	) + " | " + 
951 		              		
952 		              			"BotId = " + String.valueOf(getBotId()
953  	) + " | " + 
954 		              		
955 		              			"ManualSpawn = " + String.valueOf(isManualSpawn()
956  	) + " | " + 
957 		              		
958 		              			"AutoTrace = " + String.valueOf(isAutoTrace()
959  	) + " | " + 
960 		              		
961 		              			"Name = " + String.valueOf(getName()
962  	) + " | " + 
963 		              		
964 		              			"SpeedMultiplier = " + String.valueOf(getSpeedMultiplier()
965  	) + " | " + 
966 		              		
967 		              			"RotationRate = " + String.valueOf(getRotationRate()
968  	) + " | " + 
969 		              		
970 		              			"Invulnerable = " + String.valueOf(isInvulnerable()
971  	) + " | " + 
972 		              		
973 		              			"SelfUpdateTime = " + String.valueOf(getSelfUpdateTime()
974  	) + " | " + 
975 		              		
976 		              			"VisionTime = " + String.valueOf(getVisionTime()
977  	) + " | " + 
978 		              		
979 		              			"LocUpdateMultiplier = " + String.valueOf(getLocUpdateMultiplier()
980  	) + " | " + 
981 		              		
982 		              			"ShowDebug = " + String.valueOf(isShowDebug()
983  	) + " | " + 
984 		              		
985 		              			"ShowFocalPoint = " + String.valueOf(isShowFocalPoint()
986  	) + " | " + 
987 		              		
988 		              			"DrawTraceLines = " + String.valueOf(isDrawTraceLines()
989  	) + " | " + 
990 		              		
991 		              			"SynchronousOff = " + String.valueOf(isSynchronousOff()
992  	) + " | " + 
993 		              		
994 		              			"AutoPickupOff = " + String.valueOf(isAutoPickupOff()
995  	) + " | " + 
996 		              		
997 		              			"Action = " + String.valueOf(getAction()
998  	) + " | " + 
999 		              		
1000 				"]";           		
1001         }
1002  	
1003  		
1004  		public String toHtmlString() {
1005  			return super.toString() + "[<br/>" +
1006             	
1007 		              			"<b>Id</b> = " + String.valueOf(getId()
1008  	) + " <br/> " + 
1009 		              		
1010 		              			"<b>BotId</b> = " + String.valueOf(getBotId()
1011  	) + " <br/> " + 
1012 		              		
1013 		              			"<b>ManualSpawn</b> = " + String.valueOf(isManualSpawn()
1014  	) + " <br/> " + 
1015 		              		
1016 		              			"<b>AutoTrace</b> = " + String.valueOf(isAutoTrace()
1017  	) + " <br/> " + 
1018 		              		
1019 		              			"<b>Name</b> = " + String.valueOf(getName()
1020  	) + " <br/> " + 
1021 		              		
1022 		              			"<b>SpeedMultiplier</b> = " + String.valueOf(getSpeedMultiplier()
1023  	) + " <br/> " + 
1024 		              		
1025 		              			"<b>RotationRate</b> = " + String.valueOf(getRotationRate()
1026  	) + " <br/> " + 
1027 		              		
1028 		              			"<b>Invulnerable</b> = " + String.valueOf(isInvulnerable()
1029  	) + " <br/> " + 
1030 		              		
1031 		              			"<b>SelfUpdateTime</b> = " + String.valueOf(getSelfUpdateTime()
1032  	) + " <br/> " + 
1033 		              		
1034 		              			"<b>VisionTime</b> = " + String.valueOf(getVisionTime()
1035  	) + " <br/> " + 
1036 		              		
1037 		              			"<b>LocUpdateMultiplier</b> = " + String.valueOf(getLocUpdateMultiplier()
1038  	) + " <br/> " + 
1039 		              		
1040 		              			"<b>ShowDebug</b> = " + String.valueOf(isShowDebug()
1041  	) + " <br/> " + 
1042 		              		
1043 		              			"<b>ShowFocalPoint</b> = " + String.valueOf(isShowFocalPoint()
1044  	) + " <br/> " + 
1045 		              		
1046 		              			"<b>DrawTraceLines</b> = " + String.valueOf(isDrawTraceLines()
1047  	) + " <br/> " + 
1048 		              		
1049 		              			"<b>SynchronousOff</b> = " + String.valueOf(isSynchronousOff()
1050  	) + " <br/> " + 
1051 		              		
1052 		              			"<b>AutoPickupOff</b> = " + String.valueOf(isAutoPickupOff()
1053  	) + " <br/> " + 
1054 		              		
1055 		              			"<b>Action</b> = " + String.valueOf(getAction()
1056  	) + " <br/> " + 
1057 		              		
1058 				"<br/>]";     
1059 		}
1060  	
1061  		
1062  		// --- Extra Java from XML BEGIN (extra/code/java/javapart/classcategory[@name=all]) ---
1063         	
1064 		// --- Extra Java from XML END (extra/code/java/javapart/classcategory[@name=all]) ---
1065 		
1066 	    // --- Extra Java from XML BEGIN (extra/code/java/javapart/classcategory[@name=local+classtype[@name=impl]) ---
1067 	        
1068 	    // --- Extra Java from XML END (extra/code/java/javapart/classcategory[@name=local+classtype[@name=impl]) ---        	            	
1069  	
1070 		}
1071