mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-16 15:32:15 -07:00
client: Support arbitrary game zones
Currently, the client ignores cards in unknown zones, as there is an implicit assumption that the set of zones known by the server and the client are the same. This patch makes it so that the client accept "custom zones" from the server (zones outside the builtin deck, graveyard, exile, sideboard, table, stack and hand zones) using the information from the ServerInfo_CardZone. Moving cards from/into these zones happens through a "View custom zone" action in the Game > Player menu and properly appears in the chat. Note that this patch intentionally does not introduce any support for having the server actually create such zones. Instead, this patch aims to improve backwards compatibility for when we do get to adding this capability in the future, by making sure that current clients will be able to interact with future new zones (even if suboptimally).
This commit is contained in:
parent
2792785bbd
commit
3cdc44322d
7 changed files with 90 additions and 8 deletions
|
|
@ -11,6 +11,10 @@ message ServerInfo_Zone {
|
|||
// setting beingLookedAt to true.
|
||||
// Cards in a zone with the type HiddenZone are referenced by their
|
||||
// list index, whereas cards in any other zone are referenced by their ids.
|
||||
//
|
||||
// WARNING: Adding new zone types will break compatibility with older
|
||||
// clients. Older clients will read new zone types as PrivateZone, which
|
||||
// is likely *NOT* what you want.
|
||||
|
||||
PrivateZone = 0;
|
||||
PublicZone = 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue