Some ActionScript conversion updates.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@102 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
@@ -198,10 +198,7 @@ public class Card
|
|||||||
// from interface DSet_Entry
|
// from interface DSet_Entry
|
||||||
public function getKey () :Object
|
public function getKey () :Object
|
||||||
{
|
{
|
||||||
if (_key == null) {
|
return _value;
|
||||||
_key = Byte.valueOf(_value);
|
|
||||||
}
|
|
||||||
return _key;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -244,8 +241,5 @@ public class Card
|
|||||||
|
|
||||||
/** The number of the card. */
|
/** The number of the card. */
|
||||||
protected var _value :int;
|
protected var _value :int;
|
||||||
|
|
||||||
/** The comparison key. */
|
|
||||||
protected var _key :Byte;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ public class TableConfig extends SimpleStreamableObject
|
|||||||
// from Streamable
|
// from Streamable
|
||||||
override public function readObject (ins :ObjectInputStream) :void
|
override public function readObject (ins :ObjectInputStream) :void
|
||||||
{
|
{
|
||||||
|
super.readObject(ins);
|
||||||
desiredPlayerCount = ins.readInt();
|
desiredPlayerCount = ins.readInt();
|
||||||
minimumPlayerCount = ins.readInt();
|
minimumPlayerCount = ins.readInt();
|
||||||
teamMemberIndices = (ins.readObject() as TypedArray);
|
teamMemberIndices = (ins.readObject() as TypedArray);
|
||||||
@@ -67,6 +68,7 @@ public class TableConfig extends SimpleStreamableObject
|
|||||||
// from Streamable
|
// from Streamable
|
||||||
override public function writeObject (out :ObjectOutputStream) :void
|
override public function writeObject (out :ObjectOutputStream) :void
|
||||||
{
|
{
|
||||||
|
super.writeObject(out);
|
||||||
out.writeInt(desiredPlayerCount);
|
out.writeInt(desiredPlayerCount);
|
||||||
out.writeInt(minimumPlayerCount);
|
out.writeInt(minimumPlayerCount);
|
||||||
out.writeObject(teamMemberIndices);
|
out.writeObject(teamMemberIndices);
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ public class GameAI extends SimpleStreamableObject
|
|||||||
// from Streamable
|
// from Streamable
|
||||||
override public function readObject (ins :ObjectInputStream) :void
|
override public function readObject (ins :ObjectInputStream) :void
|
||||||
{
|
{
|
||||||
|
super.readObject(ins);
|
||||||
personality = ins.readInt();
|
personality = ins.readInt();
|
||||||
skill = ins.readInt();
|
skill = ins.readInt();
|
||||||
}
|
}
|
||||||
@@ -39,6 +40,7 @@ public class GameAI extends SimpleStreamableObject
|
|||||||
// from Streamable
|
// from Streamable
|
||||||
override public function writeObject (out :ObjectOutputStream) :void
|
override public function writeObject (out :ObjectOutputStream) :void
|
||||||
{
|
{
|
||||||
|
super.writeObject(out);
|
||||||
out.writeInt(personality);
|
out.writeInt(personality);
|
||||||
out.writeInt(skill);
|
out.writeInt(skill);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -174,7 +174,6 @@ public /*abstract*/ class GameConfig extends PlaceConfig
|
|||||||
override public function readObject (ins :ObjectInputStream) :void
|
override public function readObject (ins :ObjectInputStream) :void
|
||||||
{
|
{
|
||||||
super.readObject(ins);
|
super.readObject(ins);
|
||||||
|
|
||||||
players = (ins.readObject() as TypedArray);
|
players = (ins.readObject() as TypedArray);
|
||||||
rated = ins.readBoolean();
|
rated = ins.readBoolean();
|
||||||
ais = (ins.readObject() as TypedArray);
|
ais = (ins.readObject() as TypedArray);
|
||||||
@@ -184,7 +183,6 @@ public /*abstract*/ class GameConfig extends PlaceConfig
|
|||||||
override public function writeObject (out :ObjectOutputStream) :void
|
override public function writeObject (out :ObjectOutputStream) :void
|
||||||
{
|
{
|
||||||
super.writeObject(out);
|
super.writeObject(out);
|
||||||
|
|
||||||
out.writeObject(players);
|
out.writeObject(players);
|
||||||
out.writeBoolean(rated);
|
out.writeBoolean(rated);
|
||||||
out.writeObject(ais);
|
out.writeObject(ais);
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ import java.io.IOException;
|
|||||||
|
|
||||||
import com.threerings.io.ObjectInputStream;
|
import com.threerings.io.ObjectInputStream;
|
||||||
import com.threerings.io.ObjectOutputStream;
|
import com.threerings.io.ObjectOutputStream;
|
||||||
|
import com.threerings.util.ActionScript;
|
||||||
|
|
||||||
import com.threerings.presents.dobj.DSet;
|
import com.threerings.presents.dobj.DSet;
|
||||||
|
|
||||||
@@ -240,5 +241,6 @@ public class Card implements DSet.Entry, Comparable, CardCodes
|
|||||||
protected byte _value;
|
protected byte _value;
|
||||||
|
|
||||||
/** The comparison key. */
|
/** The comparison key. */
|
||||||
|
@ActionScript(omit=true)
|
||||||
protected transient Byte _key;
|
protected transient Byte _key;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user