For now, the EZGameConfig contains a String called configData that

simply contains the game url or classname.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@51 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Ray Greenwell
2006-08-23 21:17:25 +00:00
parent 7d870d5eb6
commit 77c51c95d8
3 changed files with 26 additions and 20 deletions
@@ -23,8 +23,10 @@ import com.threerings.ezgame.client.EZGameController;
public /* abstract */ class EZGameConfig extends GameConfig
implements PartyGameConfig
{
/** A creator-submitted name of the game. */
public var gameName :String;
// TODO: this will eventually contain various XML configuration bits,
// or we'll expand this to contain other information.
// For now, the configData is either a classname or url.
public var configData :String;
override public function createController () :PlaceController
{
@@ -41,7 +43,7 @@ public /* abstract */ class EZGameConfig extends GameConfig
override public function getGameName () :String
{
return MessageBundle.taint(gameName);
return MessageBundle.taint(configData);
}
// from PartyGameConfig
@@ -58,26 +60,26 @@ public /* abstract */ class EZGameConfig extends GameConfig
}
var that :EZGameConfig = (other as EZGameConfig);
return (this.gameName === that.gameName);
return (this.configData === that.configData);
}
override public function hashCode () :int
{
return super.hashCode(); // TODO: incorporate gamename?
return super.hashCode(); // TODO: incorporate configData?
}
override public function writeObject (out :ObjectOutputStream) :void
{
super.writeObject(out);
out.writeField(gameName);
out.writeField(configData);
}
override public function readObject (ins :ObjectInputStream) :void
{
super.readObject(ins);
gameName = (ins.readField(String) as String);
configData = (ins.readField(String) as String);
}
}
}