Fabio Bas
6af91b3d1c
Ignore filename case when loading custom sets
2015-05-21 19:58:35 +02:00
Fabio Bas
b566bf4a19
Load additional xml sets from $userprofile/customsets/
2015-05-20 18:27:50 +02:00
Fabio Bas
66adeb6d75
Improve sets handling
...
Move the “check unknown sets” method inside the cards database, so that
it can be executed when the card database gets reloaded after a card
database update.
Additionally, show the user a welcome message the first time they run a
new cockatrice version, so that they know why they get shown the “edit
sets” window and how to hide/disable sets.
2015-05-01 18:55:14 +02:00
Fabio Bas
881cea27f4
Rework the way sets selection/importing works; fix #539 (rebased)
2015-04-18 18:47:09 +02:00
Fabio Bas
eb6d067a21
Speed up deck editor filtering
...
* card: cache simpleName for each card
* deck editor: remove double comparation of searched term with card
name when sorting
2015-04-15 23:21:44 +02:00
Fabio Bas
0a366d7564
Fix #67
...
Workaround the two remaining issues, mostly fixing the “load deck”
screen in tab_game:
* Only preload up to the first 300 cards of a deck;
* don’t even bother trying to load card images if they’ll be shown
with width <= 10
Trying a 17k cards deck like the one proposed in #67 is still a no go,
mostly due to the cpu time used to create all the objects. Anyway, i
tested decks up to 8k cards and they works fine now (if you like to
wait while trice is loading them)..
2015-04-04 14:03:22 +02:00
Fabio Bas
b5b7ad8958
Startup: fix resetting card database to default
...
The check was inverted. LoadStatus::Ok = 0, so only when
db->loadCardDatabase() returns 0 we know the card database path is
correct
2015-03-30 12:28:13 +02:00
Fabio Bas
70b047adcb
Fix #745
2015-02-16 21:25:56 +01:00
Gavin Bises
7893ab086f
Fix broken cmc parsing from cards.xml
...
I don't know why this even compiled
2015-01-29 13:32:17 -05:00
Gavin Bises
e2fe25735b
Parse cmc from json and store in cards.xml
2015-01-28 20:28:38 -05:00
Fabio Bas
2101ed7096
Merge remote-tracking branch 'upstream/master' into pixmap_memory_2nd_attempt
...
Conflicts:
cockatrice/src/dlg_settings.cpp
cockatrice/src/dlg_settings.h
2015-01-05 22:46:12 +01:00
Michael Callahan
3a0c86938c
Clean up a small pile of compiler warnings.
2014-12-30 15:54:38 -07:00
Fabio Bas
f88621fd97
Use QPixmapCache for card images
...
Drop CardInfo’s own pixmap caches; use QPixmapCache instead.
Use QPixmap references instead of pointers.
Being stored in QPixmapCache, all card images are now subjected to
QPixmapCache’s size limit
2014-12-24 16:18:55 +01:00
Fabio Bas
2704523c73
Merge branch 'master' into set_extinfo
2014-11-26 11:45:51 +01:00
Mitchell Rosen
93ab9f9691
Add 'Start time' column to game list
2014-11-22 00:06:13 -08:00
Fabio Bas
ac43fa23b9
Better handle the TK set used for tokens
...
Let oracle add a basic TK set in cards.xml
Unify all the code previously using the string literal “TK”
2014-11-19 19:44:54 +01:00
Fabio Bas
cb37073828
Oracle: fetch release date and set type
...
and save them in cards.xml
2014-11-10 16:22:46 +01:00
Fabio Bas
fc1d06e13b
Add fallback urls for cards without a muId set
...
We only have a good HQ source for them; any idea on a low-quality
source?
2014-11-10 00:23:41 +01:00
Fabio Bas
4b8ac99370
Corrected spacing
2014-11-08 15:52:04 +01:00
Fabio Bas
8ca0b96d10
Rework the picture download behavior
...
Should fix #412
2014-11-08 15:08:49 +01:00
Gavin Bisesi
a26d4078cc
Revert "Find cards by prefix"
2014-10-14 11:28:30 -04:00
Gavin Bisesi
6810ae46d6
Merge pull request #260 from Mawu3n4/master
...
Find cards by prefix
2014-10-09 11:29:02 -04:00
Gavin Bisesi
006451f402
Merge pull request #238 from arxanas/no-overwrite-tokens-xml
...
Fix #231 : tokens.xml no longer overwritten by cards.xml.
2014-10-06 11:34:58 -04:00
Peng Liu
a83e6cdf48
Removed unused variable, bool stripped, from classes and functions.
2014-08-11 13:47:47 -04:00
Peng Liu
781460d6ac
Cockatrice can now load images both with and without .full. Will need to clean-up bool stripped (used to determine .full suffix inclusion).
2014-08-11 04:37:00 -04:00
Mawu3n4
d55f6fdec1
fix: show card only found once by prefix
2014-08-08 14:24:29 +02:00
Daenyth
765e865aa2
Continue downloading card images after failing url on one.
...
I should probably bust this out to a method.
2014-08-08 09:33:38 +02:00
Daenyth
42f1c6938f
Merged: First draft of better pic url error handling
...
Cherry-picked b9cb61abd05f83c67740aafa5e1e6939143547e4
2014-08-08 09:33:35 +02:00
Fabio Bas
bba8184d37
Fix off by one
2014-08-07 23:14:57 +02:00
Fabio Bas
88dfea8ece
Don't save card pictures if we don't have a proper set name for it
2014-08-07 23:14:50 +02:00
Fabio Bas
3bce98e3a9
Fix crashes trying to load the picture of a card with no <set>
2014-08-07 23:14:41 +02:00
Waleed Khan
ffc5b59fec
Fix #258 : Dashes to spaces.
2014-08-07 12:29:20 -04:00
Mawu3n4
10ab53c4ac
fix: find by prefix if card not found only
2014-08-07 17:43:14 +02:00
Waleed Khan
c0d4669088
Merge remote-tracking branch 'upstream/master' into no-overwrite-tokens-xml
...
Conflicts:
cockatrice/src/carddatabase.cpp
2014-08-07 11:06:41 -04:00
Dibe Zackaria
9092f2298b
fix: remove auto
2014-08-06 20:27:04 +02:00
Dibe Zackaria
e8abd6eb63
fix: typo
2014-08-06 20:13:59 +02:00
Mawu3n4
7d190ddaf7
fix: pushed old version
2014-08-06 18:01:47 +02:00
Mawu3n4
621a47de9c
add: find token cards by prefix
2014-08-06 17:54:47 +02:00
Fabio Bas
6502a182e8
Support loading of files with wrong extension
...
Like M15’s .png that cockatrice wrongly saved as .jpg
Additionally, move the QImageReader declaration outside of the inner
loop
2014-08-06 09:31:22 +02:00
Peng Liu
4bb1d28ae7
Removed the QLists for determining image format. Instead, using QImageReader, both when downloading/saving and when loading, to determine the correct format (Cockatrice now supports all QImageReader-supported formats).
...
Image loading still uses one for loop to iterate through the QList of paths to folders in which to search for images.
2014-08-05 14:54:40 -04:00
Peng Liu
8587b8c349
Refactored the magic bytes into two QLists: one containing a list of QStrings representing the supported extensions, the other containing a list of QByteArrays representing the magic bytes in hex.
...
Refactored the image loading loop to be two nested for loops: the outer loop iterating through the QList of paths to folders in which to search for images and the inner loop iterating through the QList of supported extensions.
2014-08-05 03:48:30 -04:00
Peng Liu
75122c3c9d
Switched back to using QFile instead of QImage for saving as QImage's save function adds overhead to the file size, leaving me unsure whether the original image is affected.
2014-08-04 17:01:58 -04:00
Peng Liu
387086cb4c
Added support for PNG images (both for downloading/saving and loading).
2014-08-04 16:43:57 -04:00
Gavin Bisesi
ffed0e00fe
Merge pull request #214 from pliu037/master
...
Added better support for custom card images
2014-07-31 13:42:57 -04:00
Waleed Khan
9ba5d7968e
Stop clobbering tokens.xml tokens; don't let Oracle read tokens into cards.xml.
2014-07-29 23:46:04 -04:00
Waleed Khan
8df7e9f164
Fix #231 : tokens.xml no longer overwritten by cards.xml.
2014-07-27 20:55:47 -04:00
Fabio Bas
9e12c5b2d4
Use custom picUrl if picUrlHq is not defined
2014-07-27 22:06:35 +02:00
pliu037
c3a68fcbd3
Cleaned up some lines of code
2014-07-27 12:47:05 -04:00
Fabio Bas
aa225f8df7
Add back support for custom picture urls in cards.xml
2014-07-26 23:36:51 +02:00
Gavin Bisesi
a50e7ba936
Merge pull request #156 from arxanas/master
...
Fix #45 : don't send tokens to deckstats.
2014-07-23 08:41:15 -04:00
Waleed Khan
40e97140d6
Merge remote-tracking branch 'upstream/master'
...
Conflicts:
cockatrice/src/carddatabase.cpp
2014-07-23 00:49:13 -04:00
Waleed Khan
2a5aa06881
Æ now actually works with the case-insensitive tags.
2014-07-22 20:58:38 -04:00
Waleed Khan
aff32e0f56
Ignore diacritics as well.
...
So [card]jotun grunt[/card] works as well as [card]Jötun Grunt[/card].
Also I removed some debugging information I accidentally left in.
2014-07-20 21:20:50 -04:00
pliu037
1a601d9509
Added better support for custom card images by prioritizing a check for card images in <Pictures path>/<CUSTOM> before all other checks.
2014-07-08 16:24:51 -04:00
arxanas
810029ce15
Fix #117 : Card tags now match disregarding case and punctuation.
2014-07-06 20:04:09 -04:00
arxanas
7cbe410172
Fix #45 : don't send tokens to deckstats.
2014-06-30 03:08:55 -04:00
Daenyth
6d3fe428e7
Fix some warnings
...
Ref #127
2014-06-27 22:19:23 -04:00
arxanas
080fd326ed
Fixed #131 : Compiles on OS X now.
2014-06-26 16:57:47 -04:00
Daenyth
df659e58fe
Mask set shortcodes for windows illegal filenames
...
Ref #122
2014-06-24 20:49:03 -04:00
Daenyth
0420f4f7af
Log download failures
2014-06-23 23:44:13 -04:00
Daenyth
e925403bc5
Log cardname when downloading
2014-06-23 22:18:40 -04:00
Daenyth
27847e1551
Don't be a jerk when card database isn't usable.
...
Better error message and allow the user to still connect
Ref: #102
2014-06-21 15:53:13 -04:00
Daenyth
38b83acae0
Fix #105 - remove emdash from card type when getting main type
2014-06-21 12:42:46 -04:00
Daenyth
53d2b82e61
Use picUrl templates to download cards.
...
Add HQ card option
2014-06-21 01:12:47 -04:00
Fabio Bas
f3a57d5506
Import data from mtgjson's allsets.xml
...
* add multiverse id to cards.xml
* remove pictures urls from cards.xml
TBD:
* fix/clean oracle’s gui
* add support in cockatrice
2014-06-16 00:27:33 +02:00
Matt Kelly
1bc48a7849
Convert rest of source to 4-space indent
2014-02-11 11:14:19 -05:00
Max-Wilhelm Bruker
3ba3952604
fixed issue #37 : add option to manually add token cards to the database
2012-05-17 18:29:35 +02:00
Max-Wilhelm Bruker
f553fd7456
some token code
2012-04-05 11:48:13 +02:00
Max-Wilhelm Bruker
10d958c4ce
Merge branch 'master' into devel
2012-03-23 12:18:16 +01:00
Max-Wilhelm Bruker
c92f3e4239
fix for issue #17 : oracle: convert smart quotes to normal quotes in card names
2012-03-23 12:17:59 +01:00
Max-Wilhelm Bruker
2259204890
cleaned up PictureLoader thread
2012-03-17 17:07:48 +01:00
Max-Wilhelm Bruker
a0655e083f
hq picture fix
2012-02-16 21:13:01 +01:00
Daenyth
a7f3ce4050
Add code support for planeswalker loyalty.
...
Added to CardInfo object and to the oracle importer. Next step is the
card info widget.
2011-12-03 17:15:33 -05:00
Max-Wilhelm Bruker
7dc2563390
sets.xml updated; don't try to retrieve empty picture urls
2011-11-12 00:52:04 +01:00
a b
9fe8f6fc03
mac fix
2011-10-27 22:06:52 +02:00
a b
c4bd38dbdc
Mac fixes
2011-09-27 22:33:45 +02:00
Max-Wilhelm Bruker
e6fc20114e
deck editor and picture file name fixes
2011-04-18 02:00:48 +02:00
Max-Wilhelm Bruker
7a7b686e67
fixed crash that occurs when reloading the card database while deck editor or game is running
2011-02-28 18:20:27 +01:00
Max-Wilhelm Bruker
1151077c1e
carddb thread fix; added VG, AE, PCH to sets
2011-02-21 18:18:08 +01:00
Max-Wilhelm Bruker
d4f600393f
minor visual change, server crash fix, multiplayer leave/concede fixes
2011-02-15 22:50:16 +01:00
Max-Wilhelm Bruker
8ccde61492
new picture downloader finished
2011-02-11 18:20:17 +01:00
Max-Wilhelm Bruker
3a5fce9613
new autodownloader partially done
2011-02-11 16:05:43 +01:00
Max-Wilhelm Bruker
b3f96f9490
changed picture download to multiverse id
2011-01-28 03:29:21 +01:00
Max-Wilhelm Bruker
f6849ff02b
sideboarding bug fix
2011-01-21 19:20:47 +01:00
brukie
dc0f21cce4
Threaded picture caching
2011-01-19 00:16:41 +01:00
Max-Wilhelm Bruker
b4436f2451
minor oracle improvement
2010-10-15 18:10:58 +02:00
Max-Wilhelm Bruker
ee0a010add
fixed bug #35
2010-10-09 14:09:36 +02:00
Max-Wilhelm Bruker
db2c2d1b15
card tap/untap animation; misc fixes
2010-10-07 17:18:15 +02:00
Max-Wilhelm Bruker
11e1202dcc
Added option to customize the card back picture
2010-09-10 19:30:14 +02:00
Max-Wilhelm Bruker
0b98d90337
search function couldn't find colorless cards: fixed
2010-08-27 22:48:35 +02:00
Max-Wilhelm Bruker
4f13c01e12
mac patches
2010-06-19 18:18:04 +02:00
Max-Wilhelm Bruker
40fc77c646
oracle importer changes
2010-05-08 23:24:35 +02:00
Max-Wilhelm Bruker
bda9768b1d
qt 4.5 compile fix
2010-04-21 22:41:52 +02:00
Max-Wilhelm Bruker
91a74abca8
rewrote picture downloader
2010-04-08 17:18:13 +02:00
Max-Wilhelm Bruker
2c9a8c2b57
minor cleanups and optimizations
2010-03-06 22:10:50 +01:00
Max-Wilhelm Bruker
888a64b0fd
new protocol code
2010-02-26 17:28:02 +01:00
Max-Wilhelm Bruker
42531d90e9
initial commit for card search dialog
2009-12-20 16:39:26 +01:00
Max-Wilhelm Bruker
30079a71ff
card picture fix
2009-10-18 00:57:51 +02:00
Max-Wilhelm Bruker
3c8f2b878b
improved importer
2009-10-17 17:13:55 +02:00
Max-Wilhelm Bruker
df8c01992b
fixed card picture download
2009-10-13 14:31:32 +02:00