diff options
| author | Fuwn <[email protected]> | 2021-05-03 16:38:41 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2021-05-03 16:38:41 -0700 |
| commit | e1e781bb2135ef78592226f1a3eaba4925702f1f (patch) | |
| tree | 8a5b590463ed413e1c6eabb719130e701b95ca63 /NET/worlds/scape/TalkAction.java | |
| download | worlds.jar-main.tar.xz worlds.jar-main.zip | |
Diffstat (limited to 'NET/worlds/scape/TalkAction.java')
| -rw-r--r-- | NET/worlds/scape/TalkAction.java | 109 |
1 files changed, 109 insertions, 0 deletions
diff --git a/NET/worlds/scape/TalkAction.java b/NET/worlds/scape/TalkAction.java new file mode 100644 index 0000000..7bc70a2 --- /dev/null +++ b/NET/worlds/scape/TalkAction.java @@ -0,0 +1,109 @@ +/* */ 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 + */
\ No newline at end of file |