Commit graph

19 commits

Author SHA1 Message Date
ebbit1q
1e70989f38
add password hash test (#4528)
* clangify tests

* add password hash test

* properly use googletest semantics
2022-01-16 16:32:11 -05:00
ebbit1q
07ea2d4334
add button to open themes location to settings (#4289)
* add button to open themes location to settings

botton creates directory if it doesn't exist yet
themes path is no longer hardcoded but included in settings
themes now default to None  the default theme is no longer required
themes set to None  will not look for empty directories anymore
this is backwards compatible
users with a nonexistant theme (Default) set will get the new None  theme

* remove default theme from install instructions
2021-03-21 13:11:34 -04:00
ebbit1q
06bfc0291a
Create game as spectator (#4281)
* refactoring

* allow for creation of games as spectator

allow setting the amount of games per user to none
remove limit on amount of games when creating a game as judge as
spectator

* refactor common/server_player.cpp

* do not close games with spectating host automatically

* remove check that filters out 0 player games

this check didn't really do anything, deleted games are removed before
it would be reached

* don't transfer host to spectators

this seems to cause a bug, also present on master
2021-03-13 14:39:25 -05:00
ebbit1q
964207d04f
make custom sets directory configurable (#4047) 2020-08-23 13:24:30 -04:00
olegshtch
4a563a131b
Update test card database to v4 (#4064) 2020-08-21 18:18:53 -04:00
olegshtch
daa89a9fb4
Run tests on WIndows CI (#4056)
* Run tests on Windows CI.

* Add message logger

* Skip tests that cannot be linked.

* Fix test call

* Fix mock link issue on MSVC

* Fix PATH variable to find libraries for tests

* Fail test step on test errors
2020-08-14 12:45:15 -04:00
olegshtch
44297dcd1c
Fix release tests (#4063) 2020-08-13 10:18:01 -04:00
olegshtch
446f9be24d
Fix unresolved symbols when link tests to system libgtest-dev (#4055) 2020-07-30 14:52:44 -04:00
ctrlaltca
27b7ebe208
Oracle / card xml improvements (#3934)
* fix #1610

* fix #2679; partially fix #3647

* Fix tests

* Remove debug code
2020-03-30 21:56:03 +02:00
Rob Blanckaert
eb60fec8e2 Filter Strings for Deck Editor search (#3582)
* Add MagicCards.info like fitler parser.

* Use FilterString whenever one of [:=<>] is in the edit box.

* Opts

* Opt

* - Capture errors
- Allow querying any property by full name

* clang format

* Update cockatrice/src/filter_string.cpp

Co-Authored-By: basicer <basicer@basicer.com>

* - Some refactoring for clarity
- More filters
- Add filter help

* Clangify

* Add icon

* Fix test name

* Remove stay debug

* - Add Rarity filter
- Make " trigger filter string mode

* You have to pass both filter types

* clangify

* - Allow filtering by legality
- Import legality into card.xml

* Add format filter to filtertree

* More color search options

* RIP extended

* More fixes

* Fix c:m

* set syntax help parent

* Fix warning

* add additional explanations to syntax help

* Allow multiple ands/ors to be chained

* Cleanup and refactor

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>

* Move utility into guards

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>

* I heard you like refactors so I put a refactor inside your refactor (#3594)

* I heard you like refactors so I put a refactor inside your refactor

so you can refactor while you refactor

* clangify

* Update tab_deck_editor.h
2019-03-01 14:30:32 -05:00
ctrlaltca
ed70099e36 Rework of the card database, xml format and oracle parser (#3511)
* CardDB: merge all card properties in a new structure

* Pre Json parser changes

 * Cockatrice: use qt's builtin json support
 * Move qt-json src dir from cockatrice to oracle
 * Add dummy cockatricexml4 parser (yet to be implemented)

* Implement a new parser and xml format

 * cockatricexml4: new xml parser following the "generic properties hash" pattern;
 * oracleimporter: refactor the parsing code to better adapt to cockatricexml4; rewrote split cards parsing
 * carddb: change "colors" from a stringlist to a string
 * carddb: move the getMainCardType() method to the cockatricexml3 parser
 *

* CardInfo: show all properties (stil missing: nice name + translation)

* Rework the "add related card" feature so that it doesn't change the card name in the carddb

Also, fix token count display

* Picture loader: Added support for transform cards

* Fix side information for flip cards

Mtgjson uses side a/b for flip cards, while scryfall doesn't

* Pictureloader: dynamic tag resolution from card properties

Examples old => new
* !cardid! => !set:muid!
* !uuid!   => !set:uuid!
* !collectornumber! => !set:num!
New examples:
 * !prop:type!
 * !prop:manacost!

* Start moving mtg-related property names to a specific file

* Clangify

* Fix tests

* Make gcc an happy puppy

* Revert "Make gcc an happy puppy"

This reverts commit 446ec5f27516c4d3b32dbfc79557f4827c5c5bdf.

* Some gcc fixes

* Share set list between different db parsers, so they won't overwrite one each other

* All glory to the hypnoclangifier!

* Fix test compilation

* Cleanup edited files in the prior PR. (#3519)

* Cleanup edited files in the prior PR.

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>

* Fix includes

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>

* Update carddatabase.h
2019-01-23 18:17:10 -05:00
ctrlaltca
f97959febc
fix #3257 (#3258) 2018-05-24 15:46:02 +02:00
ctrlaltca
a7f4aace9c Extract the xml parser from carddatabase (#3223) 2018-05-04 03:46:08 -04:00
Zach H
35159ef61a
Clang script (#3085) 2018-02-06 08:45:13 -05:00
ctrlaltca
517420cccb Replace CardInfo* and Carset* with smart pointers (#3053)
* Replace CardInfo* and Carset* with smart pointers

* fixes to help memory & c++11 stuff
2018-02-02 12:52:47 -05:00
Zach H
d19744236e
Automatic Spoiler Season (#2991)
* oracle now can be run in spoiler or normal mode

* tests for travis

* only run on relaunch

* spoilers in client (not oracle now) and tray icon shows when done

* spoiler status will be checked before downloading spoiler file

* only download if they care about spoilers

* reload db on spoiler download

* manual update button, code cleanup, and fix enabling sets when new

* cleanup, nullchecks, and fixes to spoiler

* reload DB even if not in spoiler season; necessary as we have a check elsewhere to prevent the reload if spoiler check happens

* Implement changes from 2991#issuecomment-356169374

* Change implicit nullptrs, alert on file deletion, minor changes

* make reload thread safe and minor changes from 2991#issuecomment-356450302

* Fix locking

* Disable update now button while process running
2018-01-10 13:27:43 -05:00
Fabio Bas
bb5292aa8d Drop Qt4, libgcrypt, qtmobility dependencies 2016-05-11 12:45:58 +02:00
Fabio Bas
2d2958e931 cmake: Enable c++11 for all targets 2016-03-21 13:09:56 +01:00
Fabio Bas
18993b397b First test for card database: loading and clear 2016-03-21 11:08:14 +01:00