Page 5 of 21

Re: myk's code contributions

PostPosted: 02 Feb 2013, 07:38
by myk
I do not believe I can get the filtered deck generation code done before the Monday beta release. It is a much larger task than it originally appeared. The generation code currently makes several assumptions on what kinds of cards are available that just won't generally be true when the pool is pre-filtered. Getting the "random cardpool" button working was easy enough, but actual, playable deck generation is going to take a good bit of refactoring. I'd like to use the next few days to do some more testing of the code I've already written instead, to see if I can squash any bugs before it hits the beta crowd.

Re: myk's code contributions

PostPosted: 02 Feb 2013, 11:03
by Tygrak
Can I ask you where did you move the import deck button? If you already answered that question, sorry I didn't read the whole topic.
(Also sorry for my english, I am not a native speaker :) )

Re: myk's code contributions

PostPosted: 02 Feb 2013, 11:44
by myk
Import deck hasn't moved -- it's behind the "All Decks" tab just like it's always been.

Re: myk's code contributions

PostPosted: 02 Feb 2013, 11:59
by Tygrak
It dissapeared for me. I have no all decks tab now. In the 1.3.5 beta it is still there but in the daily build it isn't.

Re: myk's code contributions

PostPosted: 02 Feb 2013, 14:11
by Chris H.
Tygrak wrote:It dissapeared for me. I have no all decks tab now. In the 1.3.5 beta it is still there but in the daily build it isn't.
 
Delete the file named "editor_preferred.xml" which can be found in the /res/layouts/ folder and then restart Forge.

Re: myk's code contributions

PostPosted: 02 Feb 2013, 15:04
by Tygrak
Thanks alot. :)

Re: myk's code contributions

PostPosted: 02 Feb 2013, 15:40
by myk
bah, it means I didn't test my code enough, though. I explicitly wrote code to make sure deleting the file shouldn't be necessary. My own editor_preferred.xml was upgraded without incident. Tygrak, would you happen to have a copy of a "bad" editor_preferred.xml? Did you have a custom layout?
Edit: I played around with "bad" xml files and was unable to reproduce this problem. If anyone else experiences it, please send me your editor_preferred.xml file.

Re: myk's code contributions

PostPosted: 03 Feb 2013, 07:17
by Max mtg
i had a similiar crash when a parameter was added into xml file, yet my file didn't have it. So I guess assigning a default value for a missing parameter could partially or completelly solve the problem.

Re: myk's code contributions

PostPosted: 03 Feb 2013, 16:12
by RumbleBBU
Not posting from my own computer, so I need to be brief here... (and sorry, cannot post a screenshot.)

A slight problem related to the preset color and card type filter buttons that are now located on the left-hand side in the editor. The problem is that they do not automatically wrap to multiple lines if they do not fit on the panel. Recently, playing on a laptop, 1024x768 resolution, the last ones went off the panel and were not accesible - except by stretching the lefthand panel so much that the middle panel was not really usable.

I think it would be better if the color and card type buttons auto-wrapped like they used to.

Re: myk's code contributions

PostPosted: 03 Feb 2013, 20:11
by myk
I'll see what I can do

Re: myk's code contributions

PostPosted: 04 Feb 2013, 08:07
by myk
Thanks for the new icon, moo! It's much better than the purple blob I had there : )

Re: myk's code contributions

PostPosted: 04 Feb 2013, 09:10
by moomarc
Glad you like it! =D> Seems to work well across the different skins that don't have their own icon for it rather well too (can be a pain getting that right for the default sprite).

Re: myk's code contributions

PostPosted: 04 Feb 2013, 17:14
by Max mtg

Re: myk's code contributions

PostPosted: 04 Feb 2013, 18:10
by myk
when I added the bulk move APIs, it seemed wise to make the move explicit and consistent across all APIs that add/remove cards. In general, the pattern went from
for (int i; i < count; ++i) {
add(item);
}
to
add(item, count);
but since adding to a model would then add to a pool, it was too easy to forget to call the two-parameter version for the pool. removing the one-parameter method removed the possibility for that kind of error.

Re: myk's code contributions

PostPosted: 04 Feb 2013, 18:27
by Max mtg
myk wrote:when I added the bulk move APIs, it seemed wise to make the move explicit and consistent across all APIs that add/remove cards. In general, the pattern went from
for (int i; i < count; ++i) {
add(item);
}
to
add(item, count);
but since adding to a model would then add to a pool, it was too easy to forget to call the two-parameter version for the pool. removing the one-parameter method removed the possibility for that kind of error.
It's definetelly the mistake of one who wrote that cycle.

I do not want that one-parameter version removed from ItemPool, because that overload is there by design. Also a lot of other code uses that pool and it becomes unconvinient to develop when you are obliged to supply that extra parameter.

I have already reverted that change for the core classes affected, but kept your changes to GUI-related classes. See the changes at http://svn.slightlymagic.net/websvn/rev ... &peg=19382