It is currently 07 Sep 2025, 17:14
   
Text Size

Card.getText()

Post MTG Forge Related Programming Questions Here

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

Re: Card.getText()

Postby Sloth » 14 Sep 2010, 12:50

The new version works fine for me now.

The only thing that needs to be done:

Either delete all "no text" entries of Text:

or

replace "no text" with "" ingame.
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Card.getText()

Postby Chris H. » 14 Sep 2010, 12:56

friarisol wrote:We should probably put a post up on the change so everyone is aware of the new format. And probably actually submit the new folder to the SVN. This will make mass-changes more difficult since devs can no longer just search through one file for a specific string.
`
I guess that it is possible that this could create more problems than it solves. I think we should go ahead and try it for awhile and see how it all turns out. We should be able to go back to the old system if we decide that this new system is too problematic. :D
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: Card.getText()

Postby Rob Cashwalker » 14 Sep 2010, 14:44

The new version works fine for me now.

The only thing that needs to be done:

Either delete all "no text" entries of Text:

or

replace "no text" with "" ingame.
DOH!!! yeah, I did forget about those...
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: Card.getText()

Postby Chris H. » 14 Sep 2010, 15:42

I have updated my local copy to r2041. Forge as a jar file will launch fairly quickly and I am not noticing any additional lag.

Our total cards have 2501 different cards without any spellText in the text field. They display "no text" instead. This string is being displayed in the text panel of the deck editor and the battlefield.

ReadCard.java now has a section of code which looks like this:

Code: Select all
else if (s.startsWith("Text:"))
{
    String t = s.substring(5);
    if (!t.equals("no text"));
        c.setText(t);
}
`
I made a minor change and this seems to work OK:

Code: Select all
else if (s.startsWith("Text:"))
{
    String t = s.substring(5);
    if (t.equals("no text")) t = ("");
    c.setText(t);
}
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: Card.getText()

Postby Chris H. » 14 Sep 2010, 16:30

Sloth wrote:The only thing that needs to be done:

replace "no text" with "" ingame.
`
Fixed and merged into the SVN.
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Previous

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 38 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 38 users online :: 0 registered, 0 hidden and 38 guests (based on users active over the past 10 minutes)
Most users ever online was 7303 on 15 Jul 2025, 20:46

Users browsing this forum: No registered users and 38 guests

Login Form