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 Will start to export IPLR messages regularly (like synchronous
35 batch). Can be used for continuous visualization of players
36 moving around the map. There are three categories (see below).
37 The default values for all category is true, that means that
38 without attributes all the categories will be exported.
39
40 Corresponding GameBots command is
41 STARTPLRS.
42
43 */
44
45 public class
46 StartPlayers extends
47 CommandMessage
48
49 {
50
51 /**
52 Creates new instance of command StartPlayers.
53
54 Will start to export IPLR messages regularly (like synchronous
55 batch). Can be used for continuous visualization of players
56 moving around the map. There are three categories (see below).
57 The default values for all category is true, that means that
58 without attributes all the categories will be exported.
59 Corresponding GameBots message for this command is
60 STARTPLRS.
61 @param Humans
62 All human players will be exported.
63
64 @param GBBots
65 All GameBots bots will be exported.
66
67 @param UnrealBots All UnrealBots will be exported.
68 */
69 public StartPlayers(
70 boolean Humans, boolean GBBots, boolean UnrealBots) {
71
72 this.Humans = Humans;
73
74 this.GBBots = GBBots;
75
76 this.UnrealBots = UnrealBots;
77
78 }
79
80
81 /**
82 Creates new instance of command StartPlayers.
83
84 Will start to export IPLR messages regularly (like synchronous
85 batch). Can be used for continuous visualization of players
86 moving around the map. There are three categories (see below).
87 The default values for all category is true, that means that
88 without attributes all the categories will be exported.
89 Corresponding GameBots message for this command is
90 STARTPLRS.
91 <p></p>WARNING: this is empty-command constructor, you have to use setters to fill it up!
92 */
93 public StartPlayers() {
94 }
95
96
97 /////// Properties BEGIN
98
99 /**
100
101 All human players will be exported.
102 */
103 protected
104 boolean Humans =
105 false;
106
107
108 /**
109
110 All human players will be exported.
111 */
112 public
113 boolean isHumans() {
114 return
115 Humans;
116 }
117
118
119
120 /**
121
122 All human players will be exported.
123 */
124 public StartPlayers setHumans(boolean Humans) {
125 this.Humans = Humans;
126 return this;
127 }
128
129 /**
130
131 All GameBots bots will be exported.
132 */
133 protected
134 boolean GBBots =
135 false;
136
137
138 /**
139
140 All GameBots bots will be exported.
141 */
142 public
143 boolean isGBBots() {
144 return
145 GBBots;
146 }
147
148
149
150 /**
151
152 All GameBots bots will be exported.
153 */
154 public StartPlayers setGBBots(boolean GBBots) {
155 this.GBBots = GBBots;
156 return this;
157 }
158
159 /**
160 All UnrealBots will be exported. */
161 protected
162 boolean UnrealBots =
163 false;
164
165
166 /**
167 All UnrealBots will be exported. */
168 public
169 boolean isUnrealBots() {
170 return
171 UnrealBots;
172 }
173
174
175
176 /**
177 All UnrealBots will be exported. */
178 public StartPlayers setUnrealBots(boolean UnrealBots) {
179 this.UnrealBots = UnrealBots;
180 return this;
181 }
182
183 /////// Properties END
184
185 /////// Extra Java code BEGIN
186
187 /////// Additional code from xslt BEGIN
188
189
190
191 /////// Additional code from xslt END
192
193 /////// Extra Java from XML BEGIN
194
195 /////// Extra Java from XML END
196
197 /////// Extra Java code END
198
199
200
201 /**
202 * Cloning constructor.
203 */
204 public StartPlayers(StartPlayers original) {
205
206 this.Humans=original.Humans;
207
208 this.GBBots=original.GBBots;
209
210 this.UnrealBots=original.UnrealBots;
211
212 }
213
214
215
216
217 public String toString() {
218 return
219
220 toMessage();
221
222 }
223
224 public String toHtmlString() {
225 return super.toString() +
226
227 "<b>Humans</b> : " +
228 String.valueOf(Humans) +
229 " <br/> " +
230
231 "<b>GBBots</b> : " +
232 String.valueOf(GBBots) +
233 " <br/> " +
234
235 "<b>UnrealBots</b> : " +
236 String.valueOf(UnrealBots) +
237 " <br/> " +
238 "";
239 }
240
241
242
243 public String toMessage() {
244 StringBuffer buf = new StringBuffer();
245 buf.append("STARTPLRS");
246
247 buf.append(" {Humans " + Humans + "}");
248
249 buf.append(" {GBBots " + GBBots + "}");
250
251 buf.append(" {UnrealBots " + UnrealBots + "}");
252
253 return buf.toString();
254 }
255
256 }
257
258