Commit graph

4000 commits

Author SHA1 Message Date
Rob Blanckaert
c9c0fb28ee Counter expressions (#3534)
* Add peglib

* - Add expression engine
- Take an expression when setting a counter

* Shift + Click = Middleclick for counters

* minor cleanup for clangify

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

* Added tip entry
2019-02-02 13:56:49 -05:00
Filip Sufitchi
6e1b0a7590 Fix up Dockerfile to use ubuntu:bionic and actually build (#3540)
* Fix up Dockerfile to use ubuntu:bionic and actually build

* Remove commented PPA

* Fix up Dockerfile to use ubuntu:bionic and actually build

* cleanup

* fixup merge
2019-01-31 19:01:17 -05:00
ebbit1q
3562a48984
Merge pull request #3536 from ebbit1q/fix_3500
fix #3500
2019-01-30 18:01:11 +01:00
ebbit1q
bb4ca4db4a set default minumum player count for multi column layout to 4 (#3535)
fixes #3533
does not change existing settings
2019-01-30 15:29:24 +01:00
ebbit1q
c51377ca2a fix #3500 2019-01-30 15:13:27 +01:00
ctrlaltca
c3d94a51ec fix #3498 (#3527) 2019-01-27 12:51:03 -05:00
Rob Blanckaert
7cd9b9c0c8 Unconcede (#3515) 2019-01-27 12:50:41 -05:00
ctrlaltca
0dcf97d29d Bump version to 2.6.3 (#3525)
## Short roundup of the initial problem
A beta release for 2.6.3 has been relesed, but the codebase is still at 2.6.2

## What will change with this Pull Request?
Bumped version to 2.6.3
2019-01-27 12:11:22 +01:00
ctrlaltca
ebc881fa1c
fix #3523 (#3524) 2019-01-27 11:42:22 +01:00
ebbit1q
37f9f62f03 correctly report exit code in clangify (#3520) 2019-01-25 21:41:39 +01:00
Zach H
1ace060e34
zach's turn to run the show (#3521) 2019-01-25 13:36:43 -05:00
ebbit1q
495e232c22 add the amount of cards logged to the reveal cards event (#3516)
* add the amount of cards logged to the reveal cards event

sets cardname to the amount for the call if not 1 for the fromstr only
add braces for single line statements

* zach cleanup
2019-01-24 08:53:05 +01: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
19180243aa
Workaround fedora compilation problem on Travis; fix #3508 (#3512)
* attempt fix fedora by downgrading qt

* fix
2019-01-22 10:28:20 +01:00
Rob Blanckaert
a08cf9379b Disable darkmode on MacOS (#3513) 2019-01-22 10:28:06 +01:00
ebbit1q
1c6b43c545 fix typo in shortcut name (#3509)
In #3439 the shortcuts got some overhaul but this shortcut wasn't
correctly renamed.
This fix will clear users' original shortcut for increasing toughness.
An improvement over the current state of it not working at all and being
unable to set to the default shortcut.
Fixes #3506
2019-01-19 05:15:22 -05:00
Zach H
41bfbf2e83
Force Oracle run on new install/update (#3497)
* Force Oracle run on new install/update

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

* Add settings option to disable such a check

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>
2019-01-14 01:11:05 -05:00
ctrlaltca
273d5d89b7 Fix shortcuts on mac; fix #3482 (#3491)
* hopefully fix #3482

* Travis:uUse the most recent osx_image; use homebrew support in travis
2019-01-08 15:20:29 -05:00
Zach H
b0e643ecc0
Several download URLs have arrived! (#3494)
* Cockatrice Picture loader uses better defined URLs now
URLs are defined on the Card Management tab
Instead of Primary/Backup, you can now define a list of URLs
List of URLs can be drag/dropped for priority ordering
Oracle now uses scryfallId > mtgjsonUUID for !uuid!

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

* Simplify to QStringList and remove metacall

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

* fix issues brought up by Dae. Also fix how the defaults load to account for first time users.

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

* clangify

* Fix save settings on row moved (#3495)

* merge model fix, and reclangify

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

* Sources > Resources

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>
2019-01-08 15:18:06 -05:00
ctrlaltca
4eda7cda9e Make deck editor filter translatable ; extracted new translations; Fix #3488 (#3490)
* Fix #3488 ; extracted new translations

* Make operators translatable, too
2019-01-07 21:50:36 -05:00
ctrlaltca
463ef13fe0 Update version to 2.6.2 (#3492)
## Short roundup of the initial problem
We released 2.6.2, but CMake still thinks it's 2.6.1

## What will change with this Pull Request?
Update CMake version to 2.6.2
2019-01-07 09:12:27 -05:00
Caledor
ce140041e3 Switch from (s) to plural form whenever possible in message log (#3487)
* Use plural form whenever possible

Change for "%1 draws %2 card(s)" is self explanatory

Change for "look top X" switches var %2 and %3 so i can skip %3 for singular and translate as "top card", as explained in tr comment

For "counter(s)" i just moved it into %3 (each color) since plural form is already used there.

* clangify

* manual clangify attempt

* Add missing tr

* More missing tr
2019-01-06 20:48:20 +01:00
ebbit1q
84f6da103f remove all dos line endings (#3489) 2019-01-06 13:46:18 -05:00
ctrlaltca
2621cc09ac Optimize json parsing (#3480) 2018-12-30 19:05:40 -05:00
ebbit1q
40f787be14 add an ignore button to sort warning (#3463)
* add an ignore button to sort warning

* change warning message

* formatting
2018-12-30 18:51:03 -05:00
Caledor
59300e61fc Minor translation issue fix (#3481) 2018-12-28 15:59:11 -05:00
Zach H
ab1c4cb1d7
Use scryfall urls (#3474) 2018-12-20 18:49:53 -05:00
Zach Halpern
4616dd47bc preferences sym not dir 2018-12-20 18:26:46 -05:00
Zach H
94fe64c6c1
Update translations (#3475)
Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>
2018-12-20 18:26:00 -05:00
ctrlaltca
65f41e520e [WIP] Basic mtgjsonv4 support (#3458)
* Basic mtgjsonv4 support

* Fix set type

* [WIP] Oracle: use zx instead of zip

* clanfigy fixes

* Fix reading last block of xz

* Added back zip support

* [WIP] adding xz on ci + fixes

* typo

* resolve conflict

* Make gcc an happy puppy

* test appveyor build

* appveyor maybe

* Appveyor: add  xz bindir

* Update ssl version (the old one is not available anymore)

* Windows is a really shitty platform to code on.

* test vcpkg

* again

* gosh

* nowarn

* warning 2

* static

* Maybe

* cmake fix

* fsck this pain

* FindWin32SslRuntime: add vcpkg path

* Appveyor: cache support, force usable of openssl from vcpkg

* updated as suggested

* ouch

* Import card uuids and expose this property as !uuid! for card image download

* Minor style fixes

* address changed URL
2018-12-20 18:05:03 -05:00
ebbit1q
cee69705d8 fix rpm builds in travis (#3472)
* add rpm build option to travis compile

* better argument parsing
2018-12-12 13:26:13 +01:00
tooomm
3a05bcfb29 fix deployment on travis (#3468)
## Short roundup of the initial problem
Deployment conditions weren't met, because the $BUILDTYPE variable doesn't exist anymore.
@ebbit1q changed that, and there is a flag now that you pass to the compile script instead.

## What will change with this Pull Request?
- Remove that condition
It's not needed because we make sure via the build config itself that on tags no debug builds are run. This was a double check basically to prevent debug builds beeing deployed.
2018-12-07 11:48:06 -05:00
ebbit1q
e921cf88f9 place the os nametag after the version (#3465)
When i added the appended os nametags I didn't account for the dots inside the version, this will place the nametag before the last dot instead of after the first dot.
2018-12-05 19:34:56 -05:00
ebbit1q
952f13dec4 update macos (#3461)
Set travis image to xcode9.2: this image uses sierra instead of
el_capitan, el_capitan no longer builds.
Disable homebrew autoupdates, this gives a major speedup.
2018-11-28 15:51:36 -05:00
ebbit1q
ed2a3f92e0 fix travis format checking again (#3451)
Set the exit code properly, "$?" does not work after "if !".
Move "set -e" to after format checks.
2018-11-25 19:29:24 -05:00
ebbit1q
f1563c5604 add fedora docker image to travis compilation (#3447)
* add fedora docker image to travis compilation

fixes #1746

* add dockerfile

* would you like to please install for me? [y/n]

* remove bc dependency

* save cache separately for different docker builds

* add development packages to fedora dockerfile

* add package names

* use env values to make these all look the same

* set docker image name correctly

* add missing dependency

* minor oversight, add %% to remove all braces in check schema
2018-11-25 11:25:47 +01:00
ebbit1q
06081bd940 add keybinds to mill cards (#3439)
* add keybinds to mill cards

Add functions to move single card from top of deck to the graveyard and
exile.
Add keybinds to move single or multiple cards from top of deck to exile
or graveyard.
Add new keybinds to settings menu.
Move settings menu items around for a better fit.
Rename a few of the items in the settings menu.
Add default keybinds: ctrl alt d/e for single/multiple cards from top of
deck to the graveyard. No defaults are set for moving to exile.

* fix shortcut menu

* fix missing tag

* rename mismatched functions

* fixed your typos

* refactor shortcutsettings

correct a lot of typos
optimize a lot of functions
this could merit a pr on its own

* set mill keybinds

* refactor add related card actions

I found a function that was completely unintelligible so I made it
remotely legible and removed the duplication.

* shorten line by 17 characters

replace a lot of function calls with just a single reference

* add brackets

add brackets to all single line if statements etc.
readability improvements
2018-11-23 22:21:20 -05:00
ebbit1q
843b9df939 fix a bug from #3412 (#3454)
check if the card returned any info at all
2018-11-23 22:19:06 -05:00
ebbit1q
c7b8f3e923 Corrections to 3438 (#3452)
* correct previous misstake in #3438

wrong, this fixes that.

* add checking for second argument to --package

nice to have

* split find result into path and file
2018-11-22 17:32:18 -05:00
ebbit1q
964bb0974c add more clang-format focus to CONTRIBUTING.md (#3442)
* add more clang-format focus to CONTRIBUTING.md

Add more clang-format instructions and instructions on clangify.sh.
Move clang-format instructions to the section Formatting and make other format topics a subheader of it to articulate focus on it.
Add section about our ci formatting for people that look at this file after their test failed.
fixes #3065
also fixes #3340

* grammar

* grammar
2018-11-21 23:00:35 +01:00
ebbit1q
3f40a51cdb move package files to unique name (#3438) 2018-11-21 22:59:46 +01:00
tooomm
d9b11858fb exclude mac debug on tagged release (#3443)
leftover from #3433
2018-11-21 22:57:16 +01:00
ebbit1q
ec61d1f012 travis ci format check hotfix (#3449)
* set error message to be conditional

#3443 fails on the git merge base for "some reason" but at least this error message should be clearer.

* fix issues created earlier in #3433

split version from actual diff
remove --color-diff argument as apparently it isn't supported
2018-11-21 21:18:01 +01:00
Zach H
af2bce7141
add token creations from graveyard/exile (#3445) 2018-11-21 03:53:35 -05:00
ebbit1q
6b6c6c71ca add ccache to docker compilation (#3446)
* add ccache to docker image

* test commit please ignore
2018-11-20 14:55:20 +01:00
ebbit1q
57f15a9e98 fix building packages on travis-docker (#3441)
* add docker compilation to travis

add new matrix entry in .travis.yml for compiling on 18.04
add Dockerfile in .ci to build ubuntu 18.04 inside docker
remove release entry for uvuntu 16.04 to not conflict
refactor .travis.yml
refactor travis-comile.sh
merge travis-dependencies.sh into the travis.yml
remove travis-dependencies.sh

* enable debugging on travis-compile.sh

* set ubuntu16 buildtype to "Debug"

set buildtype Debug for as requirement for "test"
add --debug and --release flags to travis-compile.sh

* make output prettier

edit the format warning message and clangify.sh output

* fix clangify.sh

fix --cf-version flag
fix directory argument parsing
add directory parsing details to --help
add examples to --help

* test making packages

move dockerfile for bionic to make room for possibly other files
add missing file dependency
set macos brew to use protobuf --without-python@2

* remove test

* rm old Dockerfile
2018-11-16 18:32:00 +01:00
ebbit1q
72ed98e404 add docker compilation to travis (#3433)
* add docker compilation to travis

add new matrix entry in .travis.yml for compiling on 18.04
add Dockerfile in .ci to build ubuntu 18.04 inside docker
remove release entry for uvuntu 16.04 to not conflict
refactor .travis.yml
refactor travis-comile.sh
merge travis-dependencies.sh into the travis.yml
remove travis-dependencies.sh

* enable debugging on travis-compile.sh

* set ubuntu16 buildtype to "Debug"

set buildtype Debug for as requirement for "test"
add --debug and --release flags to travis-compile.sh

* make output prettier

edit the format warning message and clangify.sh output

* fix clangify.sh

fix --cf-version flag
fix directory argument parsing
add directory parsing details to --help
add examples to --help
2018-11-16 15:44:22 +01:00
ebbit1q
f70699d3de Improve clangify.sh (#3435)
* Improve clangify.sh

Separated from #3433 merge this branch first!

* fix error codes on -n and -t

fix output on -n
format -h message

* separate color diff from diff
2018-11-13 09:21:08 +01:00
ctrlaltca
638ee1af4a
This should fix appveyor compilation (#3434) 2018-11-12 18:50:38 +01:00
ebbit1q
8028bad7b1 set common protobuf files to compile with other tags in debug (#3432)
* set common protobuf files to compile with other tags in debug

force the same flags as release on debug builds
fixes #3431

* check for version first

* use Protobuf_VERSION instead of calling protoc --version

* lower verion requirement

* set tags to disable certain warnings instead of removing all
2018-11-09 11:05:11 +01:00