Commit graph

2719 commits

Author SHA1 Message Date
tooomm
d07bf1211a
Improve dialogs (#4153) 2020-11-13 16:01:44 -05:00
Zach H
0966a8e90f
Fix #566 by allowing for DeckName/Comments to be resized to the max, and even hidden! (#4157) 2020-11-13 15:36:20 -05:00
ebbit1q
68074b0f74
check if node is a dir before deletion (#4165) 2020-11-13 14:55:01 -05:00
tooomm
3064621a7e
Add exclude term to search hints (#4038) 2020-11-02 18:44:19 -05:00
tooomm
0405c82cb2
File name cleanup (#4154) 2020-11-01 19:03:08 -05:00
tooomm
ef78fdf342
Fix resizing for game filter dialog (#4149) 2020-10-29 20:21:01 -04:00
Kaitlin
a49c4865bb
Add game filtering for spectator attributes (#4127) 2020-10-27 15:49:02 -04:00
fdipilla
1a94261490
Multiple background images on all zones (#4144) 2020-10-23 15:36:02 -04:00
Zach H
e10446f5b8
Remove annoying spectator log messages (#4138) 2020-10-22 16:46:50 +02:00
ebbit1q
8cbc4c91f6
free qprocess on oracle update fail (#4134)
* free qprocess on oracle update fail

reload the database whenever oracle exits
search for oracle in ../oracle so you can use it from the build dir

* only ask for the db updater once
2020-10-21 10:31:18 -04:00
tooomm
5df069ab19
userlists --> account (#4139) 2020-10-12 17:18:11 -04:00
ebbit1q
752ba7d905
add face down to the string if the card is face down (#4130) 2020-10-06 16:51:20 -04:00
ebbit1q
9cf7621102
rename selected card menu (#4132) 2020-10-06 16:49:29 -04:00
ebbit1q
a5511190a3
add missing cardlink for the flip messages in the message log (#4122) 2020-10-02 12:12:13 -04:00
Kaitlin
eba9c097f6
Add dropdown for game age filtering (#4092)
* Part 1 for #3067: Basic combo box (dropdown) filtering mechanism for game age.

* Apply suggestions from draft review

# Conflicts:
#	cockatrice/src/gamesmodel.cpp
#	cockatrice/src/gamesmodel.h

* switch to using QTime

* check for games older than a day

* formatting for casts and more unnecessary cosmetic changes

* ebbit1q fixes

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2020-09-30 23:46:10 -04:00
tooomm
58d024d067
fix update message (#4116) 2020-09-29 22:00:09 -04:00
Kaitlin
a8b79fd020
Fix show-buddies-only filter loading, and add handling for creator name filter storage/loading. (#4105) 2020-09-26 21:55:13 -04:00
ebbit1q
02935be14f
fix QByteArray::append(QString) deprecation in qt 5.15.1 (#4102) 2020-09-22 16:09:48 -04:00
Zach H
bec02b4952
Judges can talk in games (#4091) 2020-09-09 13:20:59 -04:00
Kaitlin
79f590c99a
Fix #3957: Properly set filters to defaults on initial load and disable "Clear filters" button if filters are set to defaults. (#4088)
* Fix #3957: Properly set filters to defaults on initial load and disable "Clear filters" button if filters are set to defaults

* Reuse resetFilterParameters() in GamesProxyModel constructor, and remove "off" designation for player min/max (as a default of 1/99 is enforced by the UI).
2020-09-09 11:24:54 -04:00
Kaitlin
ade3e81682
Move "Games shown" text to top, to match user count list. (#4089)
Fixes last part of #3068 that isn't already handled by #4088.
2020-09-08 14:34:36 -04:00
Zach H
3536fa8a75
Fix #4072 by changing outdated HTTP to HTTPS calls within the codebase (#4073) 2020-08-23 17:24:26 -04:00
fdipilla
b0c7b9078d
Multiple bg images zone (#4005) 2020-08-23 15:55:53 -04:00
ebbit1q
964207d04f
make custom sets directory configurable (#4047) 2020-08-23 13:24:30 -04:00
ebbit1q
feee9cc328
fix #4070 (#4071) 2020-08-22 20:30:56 -04:00
ZeldaZach
69f035f017 translation updates 2020-08-16 15:18:21 -04:00
olegshtch
44297dcd1c
Fix release tests (#4063) 2020-08-13 10:18:01 -04:00
awlangham
5d9d91262b
Added horizontal layout and stretch for player icon (#4052) 2020-07-28 01:22:02 -04:00
awlangham
fe63dfa762
Made user information window resizable (#4009) 2020-07-23 18:04:15 -04:00
ebbit1q
a76a3e5db6
Change method of opening directories to be the same for all oses, including linux (#4046)
* add opening directory in file browser to linux

this uses QDesktopServices to open the url "file://[location]"
by default this is
"file://$HOME/.local/share/Cockatrice/Cockatrice/pics/CUSTOM"

any distro that has a file browser should have an accompanying mime type
specifying the file handler for the file:// protocol using the
inode/directory mime type

see https://specifications.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html

if a user were to have removed their mime database this will not work and
it will fail with nothing but a log message, this would be rare and not
worth checking in my opinion

* make opening directories the same for all oses

* sort headers
2020-07-16 11:22:24 +02:00
Lee Tran
faecfd65fe
fix message when moving cards to bottom of library (#4006) 2020-07-09 17:25:25 -04:00
tooomm
2a7268c088
move db udpate (#4015) 2020-06-29 10:25:17 +02:00
ebbit1q
7fa1936d0f
qt 5.15 compatibility (#4027) 2020-06-19 10:50:09 -04:00
tooomm
28f3229a0e
remove storm phrasing (#4001) 2020-05-18 15:27:53 -04:00
ZeldaZach
3dff63069e translation updates 2020-05-17 18:25:55 -04:00
kopcion
1eea8e9a37
Refactor messagelogwidget (#3875) 2020-05-17 18:15:30 -04:00
Rocangus
2de863f645
Spell Out Entire Counter Names With First Letter Capitalized (#3997) 2020-05-17 17:24:17 -04:00
fdipilla
fd0620445c
Different backgrounds per player (#3990) 2020-05-14 20:31:12 -04:00
ebbit1q
04274d2497
add ubuntu 20.04 to travis (#3989) 2020-05-13 13:42:08 -04:00
Kaitlin
1988e4558f
Change filter hint text to "Games shown: X / Y" and fix user-game segfault (#3973) 2020-05-08 15:15:54 -04:00
Zach H
9246c190fa
Enhance Shortcut Menu (#3987) 2020-05-08 15:10:36 -04:00
Olxinos
46fe0cd725
prevent checkboxes' labels from being clipped in settings (#3968)
Merged, thank you
2020-04-24 18:33:26 +02:00
Olxinos
db85ec48c7
Minor fixes to some std::sort calls (#3967) 2020-04-23 11:23:59 -04:00
ctrlaltca
1976c4caed
macOS: test a simple way to bypass apptranslocation (#3944) 2020-04-08 17:34:57 -04:00
Kaitlin
2c3eab9b0c
Fix #3068: Add hint text about game list filters (#3946)
Kaitlin Huben <kaitlin.huben+gitlab@gmail.com>
2020-04-07 17:55:36 -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
Zach H
a135ad064a
Handle Release Channels better as we host more packages now (#3922) 2020-03-26 13:41:38 -04:00
ZeldaZach
71dd6b8a30 Fix missing QDate
Signed-off-by: ZeldaZach <zahalpern+github@gmail.com>
2020-03-18 17:57:40 -04:00
ebbit1q
18a07274d4
clangify everything with the new header sorting (#3908) 2020-03-18 17:36:02 -04:00
ZeldaZach
e84409c0cf Translation Updates 2020-03-16 22:01:57 -04:00
Phillip Wheatley
91dc8b3b08
Add configuration option to send desktop notification on buddy presence (#3886) 2020-03-16 21:49:11 -04:00
Xenos6666
63b4f9b2f0
Add keyboard shorcuts to focus and unfocus chat (#3898)
* Added keyboard shorcuts to focus and unfocus chat

* Fixed format

* Changed the Esc behavior to work on any QLineEdit in the main Window and ignore shortcut conflicts

* Fixed a conflict with shortcuts

* Configurable unfocus shortcut and format fixes

* minor style fix
2020-03-16 21:48:05 -04:00
ebbit1q
17efe8c003
add pauper to the list of checked formats in search (#3901)
* add pauper to the list of checked formats without a short form

l:p remains reserved for pioneer

* throw out weird hardcoded formats

this will at least still work whenever a format gets added
the shorthands are still kept
2020-03-16 20:56:30 -04:00
ebbit1q
a80c756dcb
update deprecated methods in qt5.14 and protobuf 3.4 (#3906) 2020-03-16 20:41:41 -04:00
skwerlman
8dd1e39ea9
support mtgo .dek files (#3889)
* support mtgo .dek files

they use plain text internally so we just need to reveal them in the load dialog

* formatting
2020-02-04 08:11:24 -05:00
Phillip Wheatley
0f18fa9546 Hide games created/hosted by people on your Ignore List (#3883)
* Implement filter for games created by ignored users.
2020-01-13 10:13:36 -05:00
ebbit1q
7bfefee073 add deck hash copying functions (#3882) 2020-01-13 10:11:19 -05:00
Zach H
8fb0baa449
Trim tokens as this is our most common issue (#3870)
Signed-off-by: ZeldaZach <zahalpern+github@gmail.com>
2019-11-23 14:18:28 -05:00
ebbit1q
b187fb52e0 add pioneer (#3856) 2019-11-02 23:48:17 -04:00
ZeldaZach
096a472ed0 translations 2019-10-21 19:09:28 -04:00
ebbit1q
a3fc9b6ee5 add move top card to stack keybind (#3827) 2019-10-09 00:10:23 -04:00
ebbit1q
9eebc590c1 [WIP] add shortcuts for readying and sideboarding in the lobby (#3832)
* add shortcuts for readying and sideboarding in the lobby

* clangify
2019-10-08 23:59:48 -04:00
ebbit1q
cd29e2f252 add disable tearoffmenu option (#3826) 2019-10-02 14:58:22 -04:00
ctrlaltca
7e8a63cd62
Settings: default to current chosen directory while opening file dialogs (#3810) 2019-09-09 09:23:38 +02:00
Zach H
53728598fe
translation updates (#3804) 2019-08-31 21:36:13 -04:00
ctrlaltca
3b98eb77f5 Close all player-associated zoneviews when he quits; fix #3799 (#3800) 2019-08-27 20:07:33 -04:00
ctrlaltca
b6df5a4ac3 Deal with recent Qt methods deprecation (#3801)
* Deal with recent Qt methods deprecation

 * Use std::sort, std::less instead of qSort/qLess
 * Use QFontMetrics::horizontalAdvance instead of ::width
 * Use qApp->primaryScreen() instead of QDesktopWidget
 * use lambas instead of QSignalMapper
 * Use QTreeWidgetItem::setForeground instead of ::setTextColor
 * Use QDir::setPath instead of operator=(QString)
 * Use QList::swapItemsAt instead of ::swap

* fix error
2019-08-27 20:06:54 -04:00
ctrlaltca
f54165025e Add a new command to reverse turn order (#3802) 2019-08-27 20:04:27 -04:00
ctrlaltca
013137c418 Fix #3783 (#3785) 2019-07-17 10:05:00 -04:00
Rob Blanckaert
2ef3e6fc93 Enable tear-off on menus. (#3772) 2019-07-11 22:53:43 -04:00
ebbit1q
a3a1e20074 replace old mulligan with new behavior (#3773) 2019-07-11 22:53:09 -04:00
ctrlaltca
f4adf79ad9 Message log: remove all workarounds; fix #3553 (#3760)
* Remove workarounds in messagelog
2019-07-07 22:27:50 -04:00
ctrlaltca
965a6cdde7
fix #3755 (#3756) 2019-06-12 14:50:26 +02:00
tooomm
62c0825874 fix grammar (#3754) 2019-06-09 19:01:32 +02:00
tooomm
4e918f0f5d move brackets out of link tags (#3753) 2019-06-09 19:00:53 +02:00
Zach H
22e2e442f5
updated translations for 2.7.1 (#3750) 2019-06-08 12:38:59 -04:00
ctrlaltca
c0c4a6df50
Fix card database load after update (#3748) 2019-06-08 14:48:34 +02:00
ctrlaltca
1288795de9
fix #3735 (#3746) 2019-06-08 10:14:58 +02:00
Zach H
0380de9571
add trans strings for upstream (#3745) 2019-06-04 17:41:58 -04:00
ebbit1q
6ac3852995 grammar fixes (#3727) 2019-06-04 17:33:36 -04:00
ctrlaltca
1d8fb79e11 Misc startup improvement (#3740)
* Misc startup improvement

* fix paths

* clangiftw

* reworked save sets dialog

* Unified load and save steps for tokens and spoilers; added "finished" page

* linting1

* linting2

* wording

* undo layout change

* wording

* fix spoiler path again

* simplify phrase

* lint

* lint fix

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>
2019-06-02 21:47:37 -04:00
ctrlaltca
7c3cc527f6
fix windows style (#3739) 2019-06-01 16:08:44 +02:00
ctrlaltca
218aec07f8 Split buttons in the deck editor (#3709) 2019-05-31 11:54:32 -04:00
ctrlaltca
ada13f6578 Card Database converter (#3694)
* Database converter

* Fix win compilation and NSIS installer

* Maybe fix windows again

* Re-fix windows
2019-05-31 11:48:30 -04:00
Rob Blanckaert
8682367b52 View hand window (#3731)
* Roar

* Add View Hand menu to player

* Add shortcut

* reorder right click menu
2019-05-31 16:53:24 +02:00
tooomm
fd8bf66acd style (#3728) 2019-05-27 21:17:57 +02:00
ctrlaltca
115ed78059 Update Translations (#3717)
* Extract new strings from translations

* fetch new translations
2019-05-10 23:13:34 +02:00
ctrlaltca
6c21855f98
Token dialog fixes (#3711)
* Token dialog fixes

* clangify

* edit custom tokens

* Fix in-game token dialog
2019-05-09 09:37:27 +02:00
ctrlaltca
0dc4cc7e03
propose to save deck before loading a new one; fix #3699 (#3707) 2019-05-05 22:38:53 +02:00
ctrlaltca
95d6efcdbf
Dont create dummy card infos for unkown cards (#3708) 2019-05-05 22:37:48 +02:00
ebbit1q
9073cb53a8 add !sflang! property for card image urls (#3670)
update translations
add translation for the sflang property to supported languages
2019-04-18 13:01:50 -04:00
tooomm
837924b819 reword (#3682) 2019-04-06 23:12:21 -04:00
ctrlaltca
0ce2e61db9 Fix filters (#3676) 2019-04-02 23:02:34 -04:00
ebbit1q
1854e3440b add ci: filter for color identity to help page (#3673) 2019-03-27 22:57:12 -04:00
ebbit1q
c874f201c3 add a bunch of parents to dialogs (#3658)
* add a bunch of parents to dialogs

works on #3651

* use game as parent instead

* add more parents

* fix create token dialog modality

* add parent to game information window

* replace a bunch of nullptrs with the magic of sed

* add parent to tip of the day and counters

* reorder game ptr

* set parent for life counter

* clangify
2019-03-26 14:54:47 -04:00
Rob Blanckaert
a522255baf
- Chnage some hard-coded colors to take into account their background. (#3654)
- Change some SVGs from black to white if their background is too dark.
2019-03-13 16:11:30 -07:00
ctrlaltca
2d8f01b2e9 Show current counter value on "set counter" dialog (#3650)
* fix point 10 of issue #655

* clanfigyism
2019-03-11 00:33:19 +01:00
ctrlaltca
6f95556632
Fix related cards menu in deck editor (#3649) 2019-03-10 23:15:24 +01:00
ctrlaltca
0326f0d4c9
Permit use of up/down keys to increment/decrement counter value; Fix #3618 (#3646)
* Fix #3618

* clanfigy me softly

* fix unused var and params

* Frce the dialog being modal; ensure self deletion

* More qt-like behavior

* Restore dialogSemaphore logic
2019-03-10 22:22:19 +01:00
ctrlaltca
389f7fdc25
Shortcuts preference pane (#3641)
* Shortcuts preference pane

* Honor and glory to the hypnoclangifier

* clanfigy: exclude deleted files from being checked

* keep the olf translation context to be able to reuse old translations

* Fix gcc; extract translations

* Moved generic buttons after the groupbox

* Update current item on "clear/reset all"

* Sequenceedit: make buttons larger and translatable, add text

* Event filter

* Don't filter arrow keys; added placeholder text

* group counters
2019-03-10 21:49:33 +01:00
ctrlaltca
52cc725de4
Fix crash on card relation to inexistent card; fix #3637 (#3640)
* Fix crash on card relation to inexistent card; fix #3637

But that whole loop is a logic mess

* Check if related cards exists before creating the menu entry

* honor and glory to the hypnoclanfigier
2019-03-10 18:47:24 +01:00
Rob Blanckaert
a304d4235d Fix #3614 (#3633) 2019-03-07 22:48:03 -05:00
Rob Blanckaert
4ce928eb41 Allow more characters in bare searches (#3632) 2019-03-07 12:21:30 +01:00
Rob Blanckaert
b172172be1 Fix #3587 (#3634) 2019-03-07 12:21:08 +01:00
Rob Blanckaert
55c4207182 Fix related cards popup (#3613) 2019-03-04 02:19:37 -05:00
ebbit1q
440311c939 set word wrapping (#3612)
fix #3605
2019-03-04 02:17:33 -05:00
Zach Halpern
81059fa3d8 translations 2019-03-04 01:49:43 -05:00
Rob Blanckaert
477faafb84 Adjust fontsize up on highdpi displays (#3610) 2019-03-04 01:32:09 -05:00
ebbit1q
abe4f5ca60 don't remove pt! 🔥🔥🔥🔥 (#3606)
* don't remove pt! 🔥🔥🔥🔥

* apply water to burns

* clangify

* fix clientside

* clangify

* missed qdebug

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>
2019-03-04 00:55:54 -05:00
Rob Blanckaert
a86aeb00c5 Fix 3598 (#3607)
* Fix 3598

* spelling
2019-03-03 22:03:35 -05:00
Zach H
754b9bdc5a
Won't change if autoconnect enabled (#3602)
* Only will auto-select RR if autoconnect is not checked off.

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

* Only will auto-select RR if autoconnect is not checked off.

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

* On disconnect, un-check autoconnect. Better naming.

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>
2019-03-03 21:57:48 -05:00
Rob Blanckaert
5a3f2fcff7 Allow /\ in simple searches. (#3604) 2019-03-03 21:48:20 -05:00
ebbit1q
9411396b97 rework pt setting (#3584)
* rework pt setting

save pt as a string serverside
set the pt of cards that enter the battlefield to empty (was -1/0)
implement old behaviour as changePT clientside
display old pt to messagelog
add new keybind for new set behaviour (default ctrl+shift+p)
add flow pt actions and keybinds that increase while decreasing
put more braces everywhere
various refactors like adding consts and for loops
remove a single superfluous semicolon
does not change the way pt is displayed client side
does not fix 3455 fully

* fix drawing of pt

remove search for / in carditem's paint() (crash)
ptstring is now always orange unless it's a faceup card with a pt that
matches the cardinfo pt
set changept to remove the pt if the field is empty
set changept to keep the old value if one side is empty
return in changept for +0/+0
clean up some if statements

* return on change to +0/+0

* change log message for empty original pts

* typo

* remove changept

add parsept to unify reading pt strings
change setpt behavior to be an "upgraded" version of the old setpt
add arbitrary strings as anything that starts with /

* clangify

* remove debug lines

* add tip of the day

* add missing images

* clangify
2019-03-03 16:24:57 -05:00
Zach Halpern
18ad3cf4a5 Disable auto connect when updating 2019-03-03 16:14:08 -05:00
Rob Blanckaert
a7f19f7848 Fix some dark mode colors. (#3596)
* Pick a link color that looks good in both light and dark mode

* Fix up chat log colors
2019-03-03 05:24:10 -05:00
Rob Blanckaert
63839eb464 Fixes #3590 (#3595) 2019-03-01 18:11:09 -05: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
Zach Halpern
4427ad1451 Don't use hardcoded index
Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>
2019-02-28 00:34:12 -05:00
Zach H
e77e439c4b
Minor cleanup & set RR default for new clients (#3591)
* Minor cleanup & set RR default for new clients

* Handle case of no entries

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

* Use RR as default on rebuilds

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>
2019-02-28 00:10:10 -05:00
Rob Blanckaert
45b16ba78d
macOS: Fix qt5.12 scale issues and dark mode (#3588)
* Maybe fix QT 5.12 scale.

* Use Palette colors
2019-02-24 10:05:09 -08:00
Rob Blanckaert
e68305d7bf - CardItems have dummy CardInfos if they arent in the database (#3589)
- If a CardInfo has no sets, add a dummy one to try to download it by non-set specific templates.
2019-02-23 19:52:38 -05:00
Zach Halpern
c2150fd9bd Update translations
Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>
2019-02-22 16:49:06 -05:00
Rob Blanckaert
ea8201af5c Judge mode (#3531)
* Judge mode

* Use seperate judge icon

* Fix clang init ordering complaint

* Create gavel.svg

* Add judge level

* Adjust judge permissions.

* - Tag events caused by judges
- Allow judges access to card right click menus.

* Allow judges to  change phase / turn.

* Remove gavel from pawn

* Make judge action text black.

* Create scales

* Rename scales to scales.svg

* Use scales

* remove gavel

* - Address PR feedback
- Fix sort order

* Zach

* add option to servatrice.ini
2019-02-21 14:00:00 -05:00
Rob Blanckaert
9d27b36704
Make v4 Cockatrice XML importer convert picURL to picurl to match v3 behavior and allow picURL images to load. (#3585) 2019-02-21 03:48:03 -08:00
Rob Blanckaert
d519f992d2
Updater for websockets (#3581)
* Dont clobber password when pulling down server list.
* Force download server list on client update.
2019-02-19 00:24:35 -08:00
Rob Blanckaert
c32f2190bd - Mill cards in correct order
- Roll up shuffles into bottom message
- Remove unused variable
2019-02-11 02:12:56 -08:00
Zach H
78c18b7db6
new translations (#3573) 2019-02-08 21:03:03 -05:00
ctrlaltca
099d524a42 Smoother trice (#3566) 2019-02-08 20:57:17 -05:00
Rob Blanckaert
612edae5f6 Click replay timeline to seek. (#3570)
* Click replay timeline to seek.

* Fix seek for long games

* Erase log when rewinding

* zach cleanup

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>
2019-02-08 20:32:56 -05:00
Rob Blanckaert
b065ada633 Fix unbalanced save() restore() in cards (#3571) 2019-02-08 14:24:55 +01:00
ctrlaltca
e4bac025dd
remove debug (#3572) 2019-02-08 11:57:24 +01:00
ctrlaltca
923b4acdbc Make the xml parser less strict about xml problems (#3567)
* Make the xml parser less strict about xml problems

* clanfigy me harder
2019-02-08 01:50:54 -05:00
ctrlaltca
2703db75d0 Update card menu when its counters change (#3565) 2019-02-08 01:50:34 -05:00
Rob Blanckaert
d932581f4a Move to bottom of library in random order. (#3549)
* - Allow shuffling a subset of a zone
- When moving cards to the bottom of library, shuffle them after
- Process events in the correct order serverside

* Zach fixes

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

* Comments + additional guard
2019-02-07 14:08:44 -05:00
ctrlaltca
6e3fd30fcb Add install mode to logger; fix #3558 (#3563)
## Related Ticket(s)
- Fixes #3558

![schermata 2019-02-06 alle 08 45 25](https://user-images.githubusercontent.com/1631111/52327211-98419900-29eb-11e9-9d15-69f59fc9d379.png)
2019-02-06 12:27:32 +01: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
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
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
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
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
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
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
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 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
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
Zach H
af2bce7141
add token creations from graveyard/exile (#3445) 2018-11-21 03:53:35 -05:00
tooomm
0cd671c022 Improve hints for manage sets dialog (#3419) 2018-10-31 21:14:47 -04:00
ebbit1q
75203cf385 add reset power and toughness option #3402 (#3412)
* add reset power and toughness function on cards

Add actResetPT to set the power and toughness in the same way as
actSetPT but instead of prompting the user it will fetch the original
pt from the card info for each card.
Add the new command to the card rmb list, keybinds and settings.

* changed style to .clang-format

Please change the contributing guidelines to use this style instead.
2018-10-20 23:33:35 -04:00
Henry Lancelle
cf9fdcd09e Translate curly apostrophe to ASCII apostrophe (#3395) (#3401)
* Translate curly apostrophe to ASCII apostrophe (#3395)

Treats the curly apostrophe as a straight apostrophe when searching in
the deck editor search bar.

* Moved logic for handeling translation to CardDatabaseDisplayModel.

This implementation was done with strings instead of characters because
the curly apostrophes and quotes are considered multi-characters.
Thus, the method of iterating through the string and replacing
the characters with the proper translations was difficult to cleanly
implement.

* clang-tidy modifications

* Implemented faster algorithm for string translation.

Optimized the algorithm for string translation, before it would compute
in O(N*M) time where N is the size of the string and M is the size of
the translation table.  Now it will compute in O(N) time where N is the
length of the string.

* Renaming variables and methods.

* Fixed character literal type, was unicode, is now wide.
2018-10-03 09:15:02 +02:00
Lee Tran
eb4b1e74f1 Disable saving of decks when the deck is empty (#3384)
* Disable saving of decks when the deck is empty

* Replace tabs with spaces to conform with coding conventions

* Remove whitespace at end of line to satisfy the CI robot overlords

* Improve logic to check if deck is empty, fix functionality when a deck is loaded

* Fix code style issues

* Disable more menus when the deck is empty

* Streamline code for disabling save menus when the deck is empty

* Fix save-disabling when loading a deck from the clipboard

* Enable saving deck directly after loading deck
2018-09-21 10:46:31 -04:00
Lee Tran
70005a6f1d Enable the creation and using of shortcuts to move cards from the top of the library to play face down. (#3388) 2018-09-07 09:14:34 +02:00
Alessandro Marzialetti
c58abadff1 fix: cockatrice quits properly when the window is closed (#3329) 2018-08-27 15:01:53 +02:00
Andrew Zwicky
ed01752cb4 [WIP] Card image loading: Fallback on 404 (#3367)
* 2479: Running clang-format

Reformatting files to be in line with style guidelines.

* 2479: Updates to remove set/url indices

This change removes set and Url indices in favor
of check for empty lists and removing items from them
instead.

* 2479: TransformUrl will now error on missing fields

If transformUrl is called with a template, and the card/set
is missing something required by that template, it will now
return an empty string, instead of the template with an empty
string substituted in.

* 2479: clang-format updates

* 2479: Fixing omission of ! from two properties

* 2479: Adding prefix on debug messages

Adding PictureLoader: to the front of each debug message
from this file, so that it can be more easily filtered out
by grep in the log of a running application.

* 2479: Remove outdated comment

* 2479: Remove unused method from intermediate work

* 2479: Updating QDebug messages to be more consistent

* 2479: clang-format updates

* 2479: Remove repeated code, replace with call to nextUrl

This removes some redundant code that is better replaced with a call
to nextUrl, in case the code needed to populate the nextUrl changes
significantly.

* 2479: Adding more detailed comments

* 2479: Refactor transformUrl

Refactor transformUrl to do everything in a single loop instead
of two almost identical loops.  set information is populated if
present, but is added with empty strings if absent.
2018-08-22 09:52:38 +02:00
Zach H
e341337ce0
Revert "[WIP] Fallback on 404" (#3364) 2018-08-11 09:06:18 -04:00
Andrew Zwicky
cbd430555f 2479: Working Url traversal
Url checking is now working as expected.  In set order,
starting with custom sets, then going in priority
order by url template order, Urls will checked, and the
first successful one will be used.
2018-08-09 23:50:01 -05:00
Andrew Zwicky
8239539946 2479:
Initial work on downloading cards through fallback URLs.

This change will add in the ability to proceed to the next URL
should the first one fail.  First trial shows that it's working,
but needs more refinement.
2018-08-08 22:42:22 -05:00
Andrew Zwicky
e467698d72 2497: Forgot to check in .h file 2018-08-05 17:43:28 -05:00
Andrew Zwicky
846b426a7c 2497: Start to implement fallback on card image urls
Return a list instead of a single url.  This is the start
of getting many possible urls instead of one.  Functionally
identical except that the primary url will be attempted for
cards without a muid.
2018-08-05 16:21:53 -05:00
tooomm
f1eab4e26a remove unused beta file endings (#3338) 2018-08-02 21:31:32 +02:00
David Szabo
283ce23111 Manage sets window: "Enable all/selected" button toggling never disabled (#3337)
## Related Ticket(s)
- Fixes #3314 

## Short roundup of the initial problem
When the view was sorted in the manage sets window, the "Enable/Disable All" buttons never toggled to "Enable/Disable selected" buttons, even when more sets were selected.

## What will change with this Pull Request?
- Selected sets can be enabled/disabled in sorted view as well
2018-07-25 14:39:42 +02:00
tooomm
451e1874a7 UI dialog tweaks: filter + create game(s) (#3351)
* vbox --> grid layout
2018-07-25 08:21:29 +02:00
tooomm
69c103ede3
missing features dlg: better update hint (#3352)
## Short roundup of the initial problem
People missed the hint on how to resolve missing features on their own, because update hint was hidden behind the `Show details` label.

## What will change with this Pull Request?
- Update hint is more prominently placed and not hidden behind a label
- It's translatable now
- Wording update to reflect UI change

## Screenshots
<!-- simply drag & drop image files directly into this description! -->
- before
![missing_features](https://user-images.githubusercontent.com/9874850/43153756-74cfd9f0-8f72-11e8-9e0f-fbf47b13f324.png)
- after
![missing_features_new](https://user-images.githubusercontent.com/9874850/43153761-78bec4e0-8f72-11e8-9853-ccc1ecb7f558.png)
2018-07-24 21:05:42 +02:00
Zach H
aa308717de
translation pulls (#3335) 2018-07-17 20:19:40 -04:00
tooomm
cba1ca8d5b remove Qt guards (#3328)
* remove version guards

* clangify

* [skip ci] README wording

* add cmake requirement to readme

* remove return

* remove min req from README
2018-07-17 20:08:42 -04:00
tooomm
4796110afb updates (#3311) 2018-06-29 16:06:55 -04:00
David Szabo
87eb132af1 Tips close with the main window (#3305)
* tips close with main window

* null verification added
2018-06-24 19:37:30 -04:00
ctrlaltca
2354a6f89d Fix cards loading bug (#3307) 2018-06-24 17:49:26 -04:00
ctrlaltca
e223f07462 fix #3235 (#3302) 2018-06-21 18:56:53 -04:00
ctrlaltca
f70e87c5a0
Fix #3285 (#3299) 2018-06-19 22:55:01 +02:00
ctrlaltca
0b3e86e307 Fix "reinstall" button in updater, fix #3293 (#3297) 2018-06-19 19:57:44 +02:00
ctrlaltca
a5ea4f7da2 Add ability to edit chat macros, Fix #3296 (#3298) 2018-06-19 19:15:13 +02:00
Zach H
c7072cd543
translations push (#3291) 2018-06-17 18:23:05 -04:00
Zach H
5e0bfc3193
translations (#3290) 2018-06-17 18:13:02 -04:00
tooomm
b316a5d541 new icons (#3289) 2018-06-17 18:09:58 -04:00
David Szabo
d36f86c523 Duplicate cards & empty setlist (#3283)
* Card duplicates handled

* clangify

* kinda works, some cards are still duplicated

* separate card entries grouped together

* clangify
2018-06-16 22:42:22 -04:00
David Szabo
81803e2612 Search in "Manage sets" window (#3229)
* search field added; sortfilterproxy displayed in treeview

* searching works properly

* moving with filter on works; view isnt't updated yet

* clangify & view updating figured out

* moving disabled when sorting is active

* drag&drop disabled when view sorted

* clangified

* foreach replaced

* button rename & SORT_RESET defined

* changed variable names

* 'x' button added & searchlabel text modified

* 'enabled' column won't grow anymore

* column resize improvement

* button hint & restore original order added

* moving with filter on works; view isnt't updated yet

* sort disable build in column headers (3 clicks)

* codacy fix

* typo + wording

* background color for warning

* buttons moved down a bit

* clicking "default order" button will hide the warning text
2018-06-10 11:00:42 -04:00
Bers
91b3c7343d fixed 2 warning-errors on archlinux(gcc 8.1): implicit fallthrough, ignored qualifiers (#3270) 2018-06-09 10:28:17 +02:00
tooomm
494dfc2f4b actCancel remove (#3261) 2018-05-25 21:59:52 -04:00