View Javadoc

1   
2               /**
3               IMPORTANT !!!
4   
5               DO NOT EDIT THIS FILE. IT IS GENERATED FROM approriate xml file in xmlresources/gbcommands BY
6               THE JavaClassesGenerator.xslt. MODIFY THESE FILES INSTEAD OF THIS ONE.
7   
8               IMPORTANT END !!!
9               */
10              package
11              cz.cuni.amis.pogamut.udk.communication.messages.gbcommands;
12  	    		import java.util.*;
13      import javax.vecmath.*;
14      import cz.cuni.amis.pogamut.base.communication.messages.*;
15      import cz.cuni.amis.pogamut.base.communication.worldview.*;
16      import cz.cuni.amis.pogamut.base.communication.worldview.event.*;
17      import cz.cuni.amis.pogamut.base.communication.worldview.object.*;
18      import cz.cuni.amis.pogamut.base.communication.translator.event.*;
19      import cz.cuni.amis.pogamut.base3d.worldview.object.*;
20      import cz.cuni.amis.pogamut.base3d.worldview.object.event.*;
21      import cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId;
22      import cz.cuni.amis.pogamut.udk.communication.messages.*;
23      import cz.cuni.amis.pogamut.udk.communication.worldview.objects.*;
24      import cz.cuni.amis.pogamut.udk.communication.translator.itemdescriptor.*;
25      import cz.cuni.amis.pogamut.udk.communication.messages.ItemType.Category;
26      import cz.cuni.amis.utils.exception.*;
27      import cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdateResult.Result;
28      import cz.cuni.amis.utils.SafeEquals;
29      import cz.cuni.amis.pogamut.multi.communication.worldview.object.*;
30      
31              
32              /**
33                
34  		When automatic pickup is disabled for bot (in ini bDisableAutoPickup=true) or if set by CONF {AutoPickupOff True},
35  		use this command to pickup inventory the bot is currently at. Will fail if the bot can't
36  		pickup the item for some reason - weaponstay true and already had it before or etc.
37  	
38                            Corresponding GameBots command is
39                            PICK.
40                        
41               */
42              
43              public class
44              Pick extends
45          CommandMessage
46  
47              {
48              
49              /**
50                Creates new instance of command Pick.
51                
52  		When automatic pickup is disabled for bot (in ini bDisableAutoPickup=true) or if set by CONF {AutoPickupOff True},
53  		use this command to pickup inventory the bot is currently at. Will fail if the bot can't
54  		pickup the item for some reason - weaponstay true and already had it before or etc.
55  	Corresponding GameBots message for this command is
56                PICK.
57                    @param Id 
58  			Id of the pickup we want to pick up.
59  		
60                */
61               public Pick(
62                  UnrealId Id) {
63                      
64                      this.Id = Id;
65                  
66                  }
67  
68              
69              		/**
70  		             Creates new instance of command Pick.
71  		             
72  		When automatic pickup is disabled for bot (in ini bDisableAutoPickup=true) or if set by CONF {AutoPickupOff True},
73  		use this command to pickup inventory the bot is currently at. Will fail if the bot can't
74  		pickup the item for some reason - weaponstay true and already had it before or etc.
75  	Corresponding GameBots message for this command is
76  		             PICK.
77  		             <p></p>WARNING: this is empty-command constructor, you have to use setters to fill it up!
78  		             */
79              		public  Pick() {
80              		}
81              	
82  
83              /////// Properties BEGIN
84              
85          /**
86          
87  			Id of the pickup we want to pick up.
88  		 */
89          protected
90           UnrealId Id =
91          	null;
92  
93          
94          /**
95          
96  			Id of the pickup we want to pick up.
97  		 */
98          public
99          UnrealId getId() {
100             return
101          Id;
102         }
103         
104 
105         
106             /**
107         
108 			Id of the pickup we want to pick up.
109 		 */
110         public Pick setId(UnrealId Id) {
111             this.Id = Id;
112             return this;
113             }
114        
115             /////// Properties END
116 
117             /////// Extra Java code BEGIN
118 
119             	/////// Additional code from xslt BEGIN
120             		
121 
122 
123             	/////// Additional code from xslt END
124 
125 	            /////// Extra Java from XML BEGIN
126             		
127             	/////// Extra Java from XML END
128 
129             /////// Extra Java code END
130 
131             
132 
133             /**
134               * Cloning constructor.
135               */
136              public Pick(Pick original) {
137                 
138                      this.Id=original.Id;
139                 
140              }
141 
142              
143 
144                  
145             public String toString() {
146                 return
147                 
148                     	toMessage();
149                     
150              }
151 
152              public String toHtmlString() {
153                 return super.toString() +
154             
155             "<b>Id</b> : " +
156             String.valueOf(Id) +
157             " <br/> " +
158              "";
159              }
160 
161              
162              
163              	 public String toMessage() {
164               		StringBuffer buf = new StringBuffer();
165               		buf.append("PICK");
166               		
167 		    					if (Id != null) {
168 		    						buf.append(" {Id " + Id.getStringId() + "}");
169 		    					}
170 		    				
171             		return buf.toString();
172             }
173              
174              }
175 
176