(svn r15261) -Add: added Engine::GetRunningCost() to remove some code duplication. Also stops AIs decrementing vehicle counter of first company

This commit is contained in:
glx
2009-01-24 20:14:15 +00:00
parent af7b7867a7
commit 9b73303b4d
6 changed files with 43 additions and 81 deletions

View File

@@ -6,6 +6,7 @@
#define ENGINE_BASE_H
#include "engine_type.h"
#include "economy_type.h"
#include "oldpool.h"
DECLARE_OLD_POOL(Engine, Engine, 6, 10000)
@@ -48,6 +49,8 @@ struct Engine : PoolItem<Engine, EngineID, &_Engine_pool> {
~Engine();
inline bool IsValid() const { return this->info.climates != 0; }
Money GetRunningCost() const;
};
static inline bool IsEngineIndex(uint index)