/* */ package NET.worlds.scape; /* */ /* */ import java.io.IOException; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public class TalkAction /* */ extends Action /* */ { /* 21 */ String txt = null; /* */ /* */ /* */ /* */ public TalkAction() {} /* */ /* */ /* */ public TalkAction(String text) /* */ { /* 30 */ this.txt = text; /* */ } /* */ /* */ /* */ /* */ /* */ /* */ public Persister trigger(Event arg, Persister seqID) /* */ { /* 39 */ Pilot.getActive(); /* 40 */ Pilot.sendText(this.txt); /* */ /* 42 */ return null; /* */ } /* */ /* */ /* */ /* */ /* */ public Object properties(int index, int offset, int mode, Object value) /* */ throws NoSuchPropertyException /* */ { /* 51 */ Object ret = null; /* 52 */ switch (index - offset) { /* */ case 0: /* 54 */ if (mode == 0) { /* 55 */ ret = StringPropertyEditor.make(new Property(this, index, /* 56 */ "Message")); /* 57 */ } else if (mode == 1) { /* 58 */ ret = this.txt; /* 59 */ } else if (mode == 2) /* 60 */ this.txt = ((String)value); /* 61 */ break; /* */ /* */ default: /* 64 */ ret = super.properties(index, offset + 1, mode, value); /* */ } /* 66 */ return ret; /* */ } /* */ /* */ /* */ /* */ /* */ /* 73 */ private static Object classCookie = new Object(); /* */ /* */ public void saveState(Saver s) throws IOException /* */ { /* 77 */ s.saveVersion(0, classCookie); /* 78 */ super.saveState(s); /* 79 */ s.saveString(this.txt); /* */ } /* */ /* */ public void restoreState(Restorer r) /* */ throws IOException, TooNewException /* */ { /* 85 */ switch (r.restoreVersion(classCookie)) { /* */ case 0: /* 87 */ super.restoreState(r); /* 88 */ this.txt = r.restoreString(); /* 89 */ break; /* */ default: /* 91 */ throw new TooNewException(); /* */ } /* */ /* */ } /* */ /* */ /* */ /* */ /* */ public String toString() /* */ { /* 101 */ return super.toString() + "[" + this.txt + "]"; /* */ } /* */ } /* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\TalkAction.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */