Commit graph

4013 commits

Author SHA1 Message Date
ctrlaltca
46b34d6515 Add websocket feature (#3562)
* add websocket feature

* Added 2.7.0_min_version
2019-02-06 03:08:59 -05:00
Rob Blanckaert
073c531855 Connect from commandline (#3556)
* - Use Qt argument parser
- Add --connect command line option.

* Better version info
2019-02-06 03:08:24 -05:00
ctrlaltca
9118871afb Fix mistyped signal name; (#3561) 2019-02-06 02:39:31 -05:00
tooomm
a7d485d6f5 keep wrong project domain for proper settings storage (#3560)
* update project domain

* revert + comment/hint

* better wording
2019-02-05 23:57:35 -05:00
Rob Blanckaert
a719e3b306 Log number of cards revealed to other players. (#3555) 2019-02-05 02:33:11 -05:00
Rob Blanckaert
2bf444e4b7 Add shortcut for next phase with action (#3548)
* Add shortcut for next phase with action

* zach cleanup

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

* cleanup and niceties

* clangify

* rename cleanup

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>
2019-02-03 22:57:41 +01:00
Rob Blanckaert
c1d25bf58b Add /servatrice to websocket URL to help out reverse proxies. (#3551)
Remove unused define
Use websocket port from default servers if given.
2019-02-03 22:50:19 +01:00
Rob Blanckaert
544c66edde Make server 12-factor compatible. (#3546)
* Docker

* Herokuize

* Use mysql method with database_url

* cleanup
2019-02-03 21:58:54 +01:00
Zach H
5a4f020196
Merge pull request #3550 from ctrlaltca/fix_hghlight 2019-02-03 13:35:30 -05:00
Fabio Bas
ec081b8b03 Fix active player game area highlightning 2019-02-03 19:15:30 +01:00
Rob Blanckaert
9a8c81cf5e Client Websockets (#3545)
* Websockets

* Add setting to get websocket IP from header

* Add QT version guard

* Minor cleanup

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

* - Make QWebSocket required
- Remove QWEBSOCEKT_LIB guards
- Only TCP on port 4747
- Fix peerName lookup

* fix check

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

* Update CMakeLists.txt

* Update CMakeLists.txt
2019-02-03 11:43:22 +01:00
Rob Blanckaert
5e38214675 Playing a tableRow 3 card from the stack puts it to grave. (#3547)
* Playing a tableRow 3 card from the stack puts it to grave.

* move to top by resetting pos

* Zach touch

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>
2019-02-03 11:33:38 +01:00
ebbit1q
ba985f97e5 removes the pt of face down cards (#3542)
* removes the pt of face down cards

Instead of setting the pt of a hidden card to the value only known to
you, it's reset to nothing.
Resetting a card while it's already reset does nothing.
Removing the pt of a card is logged as "player removes the pt of card."
instead of "player sets the pt of card to ." (note the missing value).

* reset unknown cards to nothing instead

* replace cardname with card id for unknown cards

fixes #3543

* prefix #
2019-02-02 20:33:29 -05:00
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