Cleanup old functions/variables
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
51 posts
• Page 1 of 4 • 1, 2, 3, 4
Cleanup old functions/variables
by Sloth » 14 Oct 2011, 16:50
In order to further trim down the code, I want to hunt down some unneeded functions/variables and post them here. If someone things we still need them post here.
If you find something which is no longer needed, you can post it here.
First find: Some commands
1.ReplaceMoveToGraveyardCommand
Only used by: Cerebral Eruption (which I think is scriptable)
2. CycleCommand
not used at all.
3. addTurnFaceUpCommand
not used at all
If you find something which is no longer needed, you can post it here.
First find: Some commands
1.ReplaceMoveToGraveyardCommand
Only used by: Cerebral Eruption (which I think is scriptable)
2. CycleCommand
not used at all.
3. addTurnFaceUpCommand
not used at all
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Cleanup old functions/variables
by jeffwadsworth » 14 Oct 2011, 19:50
I will work on Cerebral Eruption right now and scratch it off the list. *DONE*
- jeffwadsworth
- Super Tester Elite
- Posts: 1172
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 70 times
Re: Cleanup old functions/variables
by Sloth » 14 Oct 2011, 20:51
Thanks Jeff!jeffwadsworth wrote:I will work on Cerebral Eruption right now and scratch it off the list. *DONE*
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Cleanup old functions/variables
by slapshot5 » 30 Oct 2011, 12:40
Is the ZCTrigger class used at all, or is it a relic of the past? Does anyone know for sure?
-slapshot5
-slapshot5
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: Cleanup old functions/variables
by Sloth » 30 Oct 2011, 12:50
This is still used a lot. Just search for addComesIntoPlayCommand (Fading, Echo, "CARDNAME comes into play tapped",...).slapshot5 wrote:Is the ZCTrigger class used at all, or is it a relic of the past? Does anyone know for sure?
-slapshot5
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Cleanup old functions/variables
by slapshot5 » 30 Oct 2011, 12:52
I know it's used. Maybe I asked the wrong question. Is it *needed* in the new Trigger system?
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: Cleanup old functions/variables
by Sloth » 30 Oct 2011, 13:04
They should all be replaceable with static triggered abilities.slapshot5 wrote:I know it's used. Maybe I asked the wrong question. Is it *needed* in the new Trigger system?
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Cleanup old functions/variables
by Sloth » 29 Nov 2011, 16:06
I've rewritten the Recover keyword and noticed the old version set a cancelCommand of a spellAbility, but getcancelCommand is never used (or the variable). Does anybody need this?
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Cleanup old functions/variables
by Doublestrike » 08 Dec 2011, 06:51
There's a few rogue packages in the SVN from Braids and Max mtg - can these be sliced out somehow, or renamed (relicensed)?
---
A joke is a very serious thing.
A joke is a very serious thing.
-
Doublestrike - UI Programmer
- Posts: 715
- Joined: 08 Aug 2011, 09:07
- Location: Bali
- Has thanked: 183 times
- Been thanked: 161 times
Re: Cleanup old functions/variables
by slapshot5 » 24 Dec 2011, 13:27
I think this method in ManaPool is now defunct:
- Code: Select all
public final void subtractOne(final String manaStr) {
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: Cleanup old functions/variables
by jendave » 24 Dec 2011, 23:11
They can be renamed. They cannot be relicensed. As far as I know, only Braids' code needs to be handled with care regarding license (it is dual-licensed). I inserted a license header at the top of all files in the project with the appropriate license. Make sure any file that you touch retains the proper header.Doublestrike wrote:There's a few rogue packages in the SVN from Braids and Max mtg - can these be sliced out somehow, or renamed (relicensed)?
Re: Cleanup old functions/variables
by Doublestrike » 25 Dec 2011, 02:44
@jendave - cheers, thanks for the reply. I probably won't do much with them, those packages just sort of irritate my OCD.jendave wrote:Make sure any file that you touch retains the proper header.
Regarding the "proper header", shouldn't all files have the same header, or something? Not sure how this works but it seems sort of half-implemented (or less).
Anyway, just throwing these ideas out there, maybe they're inconsequential.
---
A joke is a very serious thing.
A joke is a very serious thing.
-
Doublestrike - UI Programmer
- Posts: 715
- Joined: 08 Aug 2011, 09:07
- Location: Bali
- Has thanked: 183 times
- Been thanked: 161 times
Re: Cleanup old functions/variables
by friarsol » 29 Dec 2011, 18:54
I was looking at Landwalk, seeing if we can clean things up, and it seems like we might be able to convert all of the different Landwalk keywords into Static Abilities.
The current reminder text says: "This creature is unblockable as long as defending player controls a Swamp."
The only problem with this is the Legends Enchantments (Deadfall) that negate landwalking. Can anyone think of a good way of handling that?
The current reminder text says: "This creature is unblockable as long as defending player controls a Swamp."
The only problem with this is the Legends Enchantments (Deadfall) that negate landwalking. Can anyone think of a good way of handling that?
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Cleanup old functions/variables
by slapshot5 » 05 Jan 2012, 14:15
Here's the big one: What should we do with the Old GUI code? Should we start weeding it out piece-by-piece? Nobody will be able to weed it all out by themselves. But as we find unused things, should we remove them?
Or is there a reason to keep this code around?
I was looking specifically at GuiDisplay.addObservers
It comes up when I'm searching for the Observer leaks, but it never gets called. (Called from GuiDisplay constructor, but that constructor is only called wrapped with "if (Constant.Runtime.OLDGUI[0]) {", which cannot get set anymore.)
In the interest of moving forward, my vote is to remove old GUI pieces/methods as we determine it it not being used, then when we are close, we can start deleting classes.
-slapshot5
Or is there a reason to keep this code around?
I was looking specifically at GuiDisplay.addObservers
It comes up when I'm searching for the Observer leaks, but it never gets called. (Called from GuiDisplay constructor, but that constructor is only called wrapped with "if (Constant.Runtime.OLDGUI[0]) {", which cannot get set anymore.)
In the interest of moving forward, my vote is to remove old GUI pieces/methods as we determine it it not being used, then when we are close, we can start deleting classes.
-slapshot5
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: Cleanup old functions/variables
by friarsol » 05 Jan 2012, 15:47
That's probably the right way to go. I'm all for clearing out unused classes. The main one I'd be careful around is the Multi-Blockers UI element.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
51 posts
• Page 1 of 4 • 1, 2, 3, 4
Who is online
Users browsing this forum: No registered users and 35 guests