From 77e22d65fcb2d51a8ff4973ea0c8f201f284ad2e Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Fri, 6 Oct 2006 00:35:00 +0000 Subject: [PATCH] Some ActionScript conversion updates. git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@102 c613c5cb-e716-0410-b11b-feb51c14d237 --- src/as/com/threerings/parlor/card/data/Card.as | 8 +------- src/as/com/threerings/parlor/data/TableConfig.as | 2 ++ src/as/com/threerings/parlor/game/data/GameAI.as | 2 ++ src/as/com/threerings/parlor/game/data/GameConfig.as | 2 -- src/java/com/threerings/parlor/card/data/Card.java | 2 ++ 5 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/as/com/threerings/parlor/card/data/Card.as b/src/as/com/threerings/parlor/card/data/Card.as index d3c28f2a..fc09f3b4 100644 --- a/src/as/com/threerings/parlor/card/data/Card.as +++ b/src/as/com/threerings/parlor/card/data/Card.as @@ -198,10 +198,7 @@ public class Card // from interface DSet_Entry public function getKey () :Object { - if (_key == null) { - _key = Byte.valueOf(_value); - } - return _key; + return _value; } /** @@ -244,8 +241,5 @@ public class Card /** The number of the card. */ protected var _value :int; - - /** The comparison key. */ - protected var _key :Byte; } } diff --git a/src/as/com/threerings/parlor/data/TableConfig.as b/src/as/com/threerings/parlor/data/TableConfig.as index b2f35883..4b54a1fc 100644 --- a/src/as/com/threerings/parlor/data/TableConfig.as +++ b/src/as/com/threerings/parlor/data/TableConfig.as @@ -58,6 +58,7 @@ public class TableConfig extends SimpleStreamableObject // from Streamable override public function readObject (ins :ObjectInputStream) :void { + super.readObject(ins); desiredPlayerCount = ins.readInt(); minimumPlayerCount = ins.readInt(); teamMemberIndices = (ins.readObject() as TypedArray); @@ -67,6 +68,7 @@ public class TableConfig extends SimpleStreamableObject // from Streamable override public function writeObject (out :ObjectOutputStream) :void { + super.writeObject(out); out.writeInt(desiredPlayerCount); out.writeInt(minimumPlayerCount); out.writeObject(teamMemberIndices); diff --git a/src/as/com/threerings/parlor/game/data/GameAI.as b/src/as/com/threerings/parlor/game/data/GameAI.as index e877f7d1..a046d54b 100644 --- a/src/as/com/threerings/parlor/game/data/GameAI.as +++ b/src/as/com/threerings/parlor/game/data/GameAI.as @@ -32,6 +32,7 @@ public class GameAI extends SimpleStreamableObject // from Streamable override public function readObject (ins :ObjectInputStream) :void { + super.readObject(ins); personality = ins.readInt(); skill = ins.readInt(); } @@ -39,6 +40,7 @@ public class GameAI extends SimpleStreamableObject // from Streamable override public function writeObject (out :ObjectOutputStream) :void { + super.writeObject(out); out.writeInt(personality); out.writeInt(skill); } diff --git a/src/as/com/threerings/parlor/game/data/GameConfig.as b/src/as/com/threerings/parlor/game/data/GameConfig.as index d4b9d483..0c31de8e 100644 --- a/src/as/com/threerings/parlor/game/data/GameConfig.as +++ b/src/as/com/threerings/parlor/game/data/GameConfig.as @@ -174,7 +174,6 @@ public /*abstract*/ class GameConfig extends PlaceConfig override public function readObject (ins :ObjectInputStream) :void { super.readObject(ins); - players = (ins.readObject() as TypedArray); rated = ins.readBoolean(); ais = (ins.readObject() as TypedArray); @@ -184,7 +183,6 @@ public /*abstract*/ class GameConfig extends PlaceConfig override public function writeObject (out :ObjectOutputStream) :void { super.writeObject(out); - out.writeObject(players); out.writeBoolean(rated); out.writeObject(ais); diff --git a/src/java/com/threerings/parlor/card/data/Card.java b/src/java/com/threerings/parlor/card/data/Card.java index 159f5a89..ec7b0774 100644 --- a/src/java/com/threerings/parlor/card/data/Card.java +++ b/src/java/com/threerings/parlor/card/data/Card.java @@ -25,6 +25,7 @@ import java.io.IOException; import com.threerings.io.ObjectInputStream; import com.threerings.io.ObjectOutputStream; +import com.threerings.util.ActionScript; import com.threerings.presents.dobj.DSet; @@ -240,5 +241,6 @@ public class Card implements DSet.Entry, Comparable, CardCodes protected byte _value; /** The comparison key. */ + @ActionScript(omit=true) protected transient Byte _key; }