From 2e80b4f96b417c92170c262e3ff55d5b89ce2045 Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Sat, 3 Mar 2007 08:32:18 +0000 Subject: [PATCH] Added much needed method. git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@222 c613c5cb-e716-0410-b11b-feb51c14d237 --- src/as/com/threerings/ezgame/SeatingControl.as | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/as/com/threerings/ezgame/SeatingControl.as b/src/as/com/threerings/ezgame/SeatingControl.as index 0fd599ed..c962ebef 100644 --- a/src/as/com/threerings/ezgame/SeatingControl.as +++ b/src/as/com/threerings/ezgame/SeatingControl.as @@ -54,6 +54,19 @@ public class SeatingControl extends SubControl return (_ctrl.callEZCodeFriend("getPlayers_v1") as Array); } + /** + * Get the names of the seated players, omitting any watchers. + */ + public function getPlayerNames () :Array /* of String */ + { + return getPlayerIds().map( + function (playerId :int, o2:*, o3:*) :String + { + return _ctrl.getOccupantName(playerId); + } + ); + } + // TODO: methods for allowing a player to pick a seat } }