blob: 8092dcb660ea6028e3e3c023d29dcf802b1db51d (
plain) (
blame)
1
2
3
4
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
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
|
/* */ package NET.worlds.console;
/* */
/* */ import NET.worlds.network.URL;
/* */ import NET.worlds.scape.Drone;
/* */ import java.io.DataInputStream;
/* */ import java.io.DataOutputStream;
/* */ import java.io.IOException;
/* */
/* */ public class BBDroneBitmapCommand extends BlackBoxCommand
/* */ {
/* */ private String name;
/* */ private String bitmap;
/* */
/* */ public BBDroneBitmapCommand(String pName, String pBitmap)
/* */ {
/* 16 */ this();
/* 17 */ this.name = new String(pName);
/* 18 */ this.bitmap = new String(pBitmap);
/* */ }
/* */
/* */ public BBDroneBitmapCommand() {
/* 22 */ this.commandType = 7;
/* */ }
/* */
/* */ public boolean execute()
/* */ {
/* 27 */ Drone id = ArmyOfZombies.instance().get(this.name);
/* 28 */ if (id != null)
/* */ {
/* 30 */ Drone newDrone = id.handleVAR_BITMAP(this.bitmap);
/* 31 */ ArmyOfZombies.instance().replaceZombie(this.name, newDrone);
/* 32 */ } else if (this.name.equals("@Pilot")) {
/* 33 */ Console c = Console.getActive();
/* 34 */ if (c != null) {
/* 35 */ c.setAvatar(URL.make(this.bitmap));
/* */ }
/* */ }
/* */ else {
/* 39 */ System.out.println("Couldn't find drone " + this.name +
/* 40 */ " for bitmap command.");
/* */ }
/* 42 */ doCallback(true);
/* 43 */ return true;
/* */ }
/* */
/* */ public void save(DataOutputStream dos) throws IOException
/* */ {
/* 48 */ super.save(dos);
/* 49 */ dos.writeUTF(this.name);
/* 50 */ dos.writeUTF(this.bitmap);
/* */ }
/* */
/* */ public void load(DataInputStream dis) throws IOException
/* */ {
/* 55 */ super.load(dis);
/* 56 */ this.name = new String(dis.readUTF());
/* 57 */ this.bitmap = new String(dis.readUTF());
/* */ }
/* */ }
/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\console\BBDroneBitmapCommand.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|