There will be another massive change
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
7 posts
• Page 1 of 1
There will be another massive change
by 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.
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
by 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.
-
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
by Max mtg » 07 Sep 2011, 07:52
why not enumeration? I have also added quest type thereRob 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?
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
by 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
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
by Rob Cashwalker » 09 Sep 2011, 16:00
So where is it now?
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: There will be another massive change
by Max mtg » 09 Sep 2011, 17:55
Maybe it's not that massive, but it is in SVN already.Rob Cashwalker wrote:So where is it now?
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
by 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
7 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 23 guests