Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-11-10 18:02:13 +0000
committerStijn Buys <ingar@osirion.org>2008-11-10 18:02:13 +0000
commit03d5bc014c0e815c6aaeec16d81e225e08732ab0 (patch)
tree05aa0464284059bdc05d96f3cc17e081a0da78ee /src/game/base/shipmodel.cc
parenta1eb1b4dc4d81df724ee43fc4e895dd22e81760f (diff)
adds jumpgate, station, ship dealer
Diffstat (limited to 'src/game/base/shipmodel.cc')
-rw-r--r--src/game/base/shipmodel.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/game/base/shipmodel.cc b/src/game/base/shipmodel.cc
index 66e752e..b4b60f4 100644
--- a/src/game/base/shipmodel.cc
+++ b/src/game/base/shipmodel.cc
@@ -48,6 +48,16 @@ void ShipModel::list()
con_print << registry.size() << " registered ship models\n";
}
+ShipModel *ShipModel::find(ShipModel *shipmodel)
+{
+ for (iterator smit = registry.begin(); smit != registry.end(); smit++) {
+ if ((*smit).second == shipmodel)
+ return shipmodel;
+ }
+
+ return 0;
+}
+
ShipModel *ShipModel::find(const std::string label)
{
std::map<std::string, ShipModel *>::iterator it = registry.find(label);