SVN
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
SVN
by DennisBergkamp » 12 Oct 2009, 17:20
So, I've actually uploaded my latest local source onto the google repository! Now, I don't really know how to use this stuff, but it's a start, at least 
http://code.google.com/p/cardforge/

http://code.google.com/p/cardforge/
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: SVN
by nantuko84 » 12 Oct 2009, 20:42
I've downloaded the source code and made some changes in deck editor to filter cards (how can you live without that?
)
here is my patch, please take a look, hope you like it and we will see these changes in next release

here is my patch, please take a look, hope you like it and we will see these changes in next release

- Attachments
-
deckEditorFilterCards.zip
- (12.34 KiB) Downloaded 342 times
Re: SVN
by DennisBergkamp » 12 Oct 2009, 21:18
Thanks Nantuko, I'll check 'em out and most definitely add them 

-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: SVN
by Rob Cashwalker » 12 Oct 2009, 21:22
So how was doing this patch from SVN any different than using the source code from the last beta and posting the change file? The point of the SVN in theory would be that you could've uploaded the change directly and just told Dennis to check out the source. Or am I missing something?
The Force will be with you, Always.
-
Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Re: SVN
by DennisBergkamp » 12 Oct 2009, 22:27

Seriously, that just made me laugh out loud

But I think the answer is easy, I don't think Nantuko has "committer" privileges (it's just you and I, Rob). Which brings up a good point, we should ask rares to add all of the other developers here on the forums.
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: SVN
by DennisBergkamp » 12 Oct 2009, 22:34
On the google code SVN page when selecting CardFactory.java:

Source path: svn/ trunk/ MTGForgeNew/ CardFactory.java
This file is too large to display.


-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: SVN
by frwololo » 13 Oct 2009, 09:50
You need committer's right to do that.Rob Cashwalker wrote:So how was doing this patch from SVN any different than using the source code from the last beta and posting the change file? The point of the SVN in theory would be that you could've uploaded the change directly and just told Dennis to check out the source.
However most svn clients allow you to do a diff and create a patch, then send that to someone with committer's rights, which should make the merge of code painless
Re: SVN
by Rob Cashwalker » 13 Oct 2009, 14:43
OK.. so I was missing something. 

The Force will be with you, Always.
-
Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Re: SVN
by DennisBergkamp » 13 Oct 2009, 16:25
This is quite a nice update, thanks a lot Nantuko!
Cards can be filtered by color and type now
I assume this update could work for the Quest Deck Editor too, right?
EDIT: I noticed something though: when clicking one of the filters, whatever cards are added to the deck (at the bottom) just clear and disappear, is there an easy way to fix that?
Cards can be filtered by color and type now

I assume this update could work for the Quest Deck Editor too, right?
EDIT: I noticed something though: when clicking one of the filters, whatever cards are added to the deck (at the bottom) just clear and disappear, is there an easy way to fix that?
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: SVN
by DennisBergkamp » 13 Oct 2009, 16:47
Actually, it seems that commenting out bottom.clear() in updateDisplay() fixes things. When something is filtered, updateDisplay() is called and accidentally clears the deck at the bottom.
But then the problem is that when clicking "New constructed deck", the deck doesn't clear.
So I've just added a separate method called clearDeck() which does a bottom.clear(), and it gets called when "New {type} deck" is clicked on the menu. From the limited testing I've done, this seems to work fine.
EDIT: There are some other funky things happening actually... when a deck is loaded, then cards added, then when a filter is applied the cards that were loaded stay but the cards that were added later disappear.
But then the problem is that when clicking "New constructed deck", the deck doesn't clear.
So I've just added a separate method called clearDeck() which does a bottom.clear(), and it gets called when "New {type} deck" is clicked on the menu. From the limited testing I've done, this seems to work fine.
EDIT: There are some other funky things happening actually... when a deck is loaded, then cards added, then when a filter is applied the cards that were loaded stay but the cards that were added later disappear.
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: SVN
by silly freak » 13 Oct 2009, 18:32
can I pleease join the project in google? please PM me for whatever info you need; i have a google account already
___
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
- silly freak
- DEVELOPER
- Posts: 598
- Joined: 26 Mar 2009, 07:18
- Location: Vienna, Austria
- Has thanked: 93 times
- Been thanked: 25 times
Re: SVN
by DennisBergkamp » 13 Oct 2009, 19:33
OK, so I'll play around with this a bit more to see if I can figure it out... but there's some weird things happening, I don't fully understand the deck editor code yet.
And yes, Silly Freak you should definitely join.
But Rares is the owner so he is the only one with permissions to add you, maybe also send him an email: mtgrares at yahoo dot com.
And yes, Silly Freak you should definitely join.
But Rares is the owner so he is the only one with permissions to add you, maybe also send him an email: mtgrares at yahoo dot com.
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: SVN
by DennisBergkamp » 13 Oct 2009, 19:41
I think this should do the trick:
Replace:
Replace:
- Code: Select all
public void updateDisplay() {
updateDisplay(this.top, this.bottom);
}
- Code: Select all
public void updateDisplay() {
//updateDisplay(this.top, this.bottom);
topModel.clear();
if (AllZone.NameChanger.shouldChangeCardName()) {
top = new CardList(AllZone.NameChanger.changeCard(top.toArray()));
bottom = new CardList(AllZone.NameChanger.changeCard(bottom
.toArray()));
}
Card c;
String cardName;
ReadBoosterPack pack = new ReadBoosterPack();
// update top
for (int i = 0; i < top.size(); i++) {
c = top.get(i);
// add rarity to card if this is a sealed card pool
cardName = AllZone.NameChanger.getOriginalName(c.getName());
if (!pack.getRarity(cardName).equals("error")) {
c.setRarity(pack.getRarity(cardName));
}
boolean filteredOut = filterByColor(c);
if (!filteredOut) {
filteredOut = filterByType(c);
}
if (!filteredOut) {
topModel.addCard(c);
}
}// for
topModel.resort();
}
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: SVN
by DennisBergkamp » 15 Oct 2009, 18:34
By the way, I really am in favor of using the SVN, I think it should make things easier (especially for me: fewer code merges!). Although, sometimes updates are made on top of older local versions, in those cases I don't mind merging stuff at all.
So did you guys email rares about getting "committer" privileges? By you guys I mean Zerker, Silly Freak, ... , whoever else is interested.
Also, I've been fixing a few bugs here and there on a daily basis, so I will probably update the SVN every other day or so (since it's so easy anyway - one click of a button).
So did you guys email rares about getting "committer" privileges? By you guys I mean Zerker, Silly Freak, ... , whoever else is interested.
Also, I've been fixing a few bugs here and there on a daily basis, so I will probably update the SVN every other day or so (since it's so easy anyway - one click of a button).
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Who is online
Users browsing this forum: No registered users and 27 guests