mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-09-01 19:09:09 +00:00
Add: support filtering content entries for patchpacks (#9541)
This changes nothing for us, but allows patchpacks to add the right pieces of code to start filtering content entries on patchpack only entries.
This commit is contained in:
@@ -26,7 +26,11 @@ protected:
|
||||
/**
|
||||
* Client requesting a list of content info:
|
||||
* byte type
|
||||
* uint32 openttd version
|
||||
* uint32 openttd version (or 0xFFFFFFFF if using a list)
|
||||
* Only if the above value is 0xFFFFFFFF:
|
||||
* uint8 count
|
||||
* string branch-name ("vanilla" for upstream OpenTTD)
|
||||
* string release version (like "12.0")
|
||||
* @param p The packet that was just received.
|
||||
* @return True upon success, otherwise false.
|
||||
*/
|
||||
|
@@ -207,7 +207,20 @@ void ClientNetworkContentSocketHandler::RequestContentList(ContentType type)
|
||||
|
||||
Packet *p = new Packet(PACKET_CONTENT_CLIENT_INFO_LIST);
|
||||
p->Send_uint8 ((byte)type);
|
||||
p->Send_uint32(_openttd_newgrf_version);
|
||||
p->Send_uint32(0xffffffff);
|
||||
p->Send_uint8 (1);
|
||||
p->Send_string("vanilla");
|
||||
p->Send_string(_openttd_content_version);
|
||||
|
||||
/* Patchpacks can extend the list with one. In BaNaNaS metadata you can
|
||||
* add a branch in the 'compatibility' list, to filter on this. If you want
|
||||
* your patchpack to be mentioned in the BaNaNaS web-interface, create an
|
||||
* issue on https://github.com/OpenTTD/bananas-api asking for this.
|
||||
|
||||
p->Send_string("patchpack"); // Or what-ever the name of your patchpack is.
|
||||
p->Send_string(_openttd_content_version_patchpack);
|
||||
|
||||
*/
|
||||
|
||||
this->SendPacket(p);
|
||||
}
|
||||
|
Reference in New Issue
Block a user