It is currently 12 Sep 2025, 17:11
   
Text Size

There will be another massive change

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

There will be another massive change

Postby Max mtg » 06 Sep 2011, 15:22

I'm changing the String[] GameType field to an enumeration type.
Will update all affected files, expect a big commit.
As a dependency deckType will be switched to that enumeration type too.
DeckManager may also be object of changes (because for now it loads all the deck into memory on start and then - on closing deckeditor for instance - it DELETES all the decks on disk and writes them again - this should not happen) according to issue 87

BTW, when are we going to release 1.1.3? (so that I would refrain from making big changes before a milestone release)

Also, if anyone would have troubles with that transition, ask me - I'll help you.
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times

Re: There will be another massive change

Postby Rob Cashwalker » 07 Sep 2011, 04:10

In my local copy for the new gui, I added "Quest" as a game type in Constants.GameTypes. Constants.Runtime.GameType should stay as a string, I think?
The Force will be with you, Always.
User avatar
Rob Cashwalker
Programmer
 
Posts: 2167
Joined: 09 Sep 2008, 15:09
Location: New York
Has thanked: 5 times
Been thanked: 40 times

Re: There will be another massive change

Postby Max mtg » 07 Sep 2011, 07:52

Rob Cashwalker wrote:In my local copy for the new guWhyi, I added "Quest" as a game type in Constants.GameTypes. Constants.Runtime.GameType should stay as a string, I think?
why not enumeration? I have also added quest type there
string can be assigned any crap unlike enum
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times

Re: There will be another massive change

Postby Max mtg » 09 Sep 2011, 11:15

Just commited the change.
This allowed me to untie deck editors from global variable AllZone().Constants.GameType

Hope, you'll be fine with those too
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times

Re: There will be another massive change

Postby Rob Cashwalker » 09 Sep 2011, 16:00

So where is it now?
The Force will be with you, Always.
User avatar
Rob Cashwalker
Programmer
 
Posts: 2167
Joined: 09 Sep 2008, 15:09
Location: New York
Has thanked: 5 times
Been thanked: 40 times

Re: There will be another massive change

Postby Max mtg » 09 Sep 2011, 17:55

Rob Cashwalker wrote:So where is it now?
Maybe it's not that massive, but it is in SVN already.

check out Constant.Runtime.gameType
moreover I think this piece of data with some extra effort can be moved into a local variable.
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times

Re: There will be another massive change

Postby Max mtg » 09 Sep 2011, 18:28

@10335 fixed an exception in Quest Load from old saves
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 31 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 31 users online :: 0 registered, 0 hidden and 31 guests (based on users active over the past 10 minutes)
Most users ever online was 7967 on 09 Sep 2025, 23:08

Users browsing this forum: No registered users and 31 guests

Login Form