summaryrefslogtreecommitdiff
path: root/NET/worlds/console/BBDroneBitmapCommand.java
diff options
context:
space:
mode:
Diffstat (limited to 'NET/worlds/console/BBDroneBitmapCommand.java')
-rw-r--r--NET/worlds/console/BBDroneBitmapCommand.java65
1 files changed, 65 insertions, 0 deletions
diff --git a/NET/worlds/console/BBDroneBitmapCommand.java b/NET/worlds/console/BBDroneBitmapCommand.java
new file mode 100644
index 0000000..8092dcb
--- /dev/null
+++ b/NET/worlds/console/BBDroneBitmapCommand.java
@@ -0,0 +1,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
+ */ \ No newline at end of file