PlayerNumber is a simple, regular data structure, and is depended on
by lower level things (eg. InputMapper). However, concepts like "joined players" and "human players" is a high-level, GAMESTATE concept, and engine stuff shouldn't depend on that. Move the GameState-depending stuff into GameState. Move IsAnyPlayerUsingMemoryCard as well (and rename to HumanPlayer), to fix MemoryCardManager dep.
This commit is contained in:
@@ -702,28 +702,14 @@ void MemoryCardManager::UnPauseMountingThread()
|
||||
RageFileDriverTimeout::SetTimeout( -1 );
|
||||
}
|
||||
|
||||
bool IsAnyPlayerUsingMemoryCard()
|
||||
{
|
||||
FOREACH_HumanPlayer( pn )
|
||||
{
|
||||
if( MEMCARDMAN->GetCardState(pn) == MemoryCardState_Ready )
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// lua start
|
||||
#include "LuaBinding.h"
|
||||
|
||||
class LunaMemoryCardManager: public Luna<MemoryCardManager>
|
||||
{
|
||||
public:
|
||||
static int IsAnyPlayerUsingMemoryCard( T* p, lua_State *L ) { lua_pushboolean(L, ::IsAnyPlayerUsingMemoryCard() ); return 1; }
|
||||
|
||||
LunaMemoryCardManager()
|
||||
{
|
||||
ADD_METHOD( IsAnyPlayerUsingMemoryCard );
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user