mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-19 20:49:11 +00:00
(svn r23605) -Add: GAME_DIR and CONTENT_TYPE_GAME, and read gamescript from that directory
This commit is contained in:
@@ -32,6 +32,7 @@ enum ContentType {
|
||||
CONTENT_TYPE_HEIGHTMAP = 6, ///< The content consists of a heightmap
|
||||
CONTENT_TYPE_BASE_SOUNDS = 7, ///< The content consists of base sounds
|
||||
CONTENT_TYPE_BASE_MUSIC = 8, ///< The content consists of base music
|
||||
CONTENT_TYPE_GAME = 9, ///< The content consists of a game script
|
||||
CONTENT_TYPE_END, ///< Helper to mark the end of the types
|
||||
};
|
||||
|
||||
|
@@ -182,6 +182,7 @@ void ClientNetworkContentSocketHandler::RequestContentList(ContentType type)
|
||||
this->RequestContentList(CONTENT_TYPE_HEIGHTMAP);
|
||||
this->RequestContentList(CONTENT_TYPE_AI);
|
||||
this->RequestContentList(CONTENT_TYPE_AI_LIBRARY);
|
||||
this->RequestContentList(CONTENT_TYPE_GAME);
|
||||
this->RequestContentList(CONTENT_TYPE_NEWGRF);
|
||||
return;
|
||||
}
|
||||
@@ -384,6 +385,7 @@ static char *GetFullFilename(const ContentInfo *ci, bool compressed)
|
||||
case CONTENT_TYPE_AI_LIBRARY: dir = AI_LIBRARY_DIR; break;
|
||||
case CONTENT_TYPE_SCENARIO: dir = SCENARIO_DIR; break;
|
||||
case CONTENT_TYPE_HEIGHTMAP: dir = HEIGHTMAP_DIR; break;
|
||||
case CONTENT_TYPE_GAME: dir = GAME_DIR; break;
|
||||
}
|
||||
|
||||
static char buf[MAX_PATH];
|
||||
@@ -546,6 +548,10 @@ void ClientNetworkContentSocketHandler::AfterDownload()
|
||||
sd = AI_LIBRARY_DIR;
|
||||
break;
|
||||
|
||||
case CONTENT_TYPE_GAME:
|
||||
sd = GAME_DIR;
|
||||
break;
|
||||
|
||||
case CONTENT_TYPE_BASE_GRAPHICS:
|
||||
case CONTENT_TYPE_BASE_SOUNDS:
|
||||
case CONTENT_TYPE_BASE_MUSIC:
|
||||
|
Reference in New Issue
Block a user