Publish our table after we create the game if we're going to immediately create
the game. Also factor that out into tableCreated() for easy subclass listening. git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@832 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
@@ -166,12 +166,7 @@ public class TableManager
|
|||||||
notePlayerAdded(table, creator);
|
notePlayerAdded(table, creator);
|
||||||
}
|
}
|
||||||
|
|
||||||
// stick the table into the table lobby object
|
// stick the table into our tables tables
|
||||||
if (shouldPublish(table)) {
|
|
||||||
_tlobj.addToTables(table);
|
|
||||||
}
|
|
||||||
|
|
||||||
// also stick it into our tables tables
|
|
||||||
_tables.put(table.tableId, table);
|
_tables.put(table.tableId, table);
|
||||||
|
|
||||||
// if the table has only one seat, start the game immediately
|
// if the table has only one seat, start the game immediately
|
||||||
@@ -179,6 +174,9 @@ public class TableManager
|
|||||||
createGame(table);
|
createGame(table);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// wire our table into our bits
|
||||||
|
tableCreated(table);
|
||||||
|
|
||||||
return table;
|
return table;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -335,6 +333,19 @@ public class TableManager
|
|||||||
updateTable(table);
|
updateTable(table);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Puts a newly created table into our internal tables and publishes it to the lobby object.
|
||||||
|
* Can also be overridden by custom managers that want to react to table creation.
|
||||||
|
*/
|
||||||
|
protected void tableCreated (Table table)
|
||||||
|
throws InvocationException
|
||||||
|
{
|
||||||
|
// publish the table in the lobby object if desired
|
||||||
|
if (shouldPublish(table)) {
|
||||||
|
_tlobj.addToTables(table);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes the table from all of our internal tables and from its lobby's distributed object.
|
* Removes the table from all of our internal tables and from its lobby's distributed object.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user