|
From: <boo...@us...> - 2006-10-27 02:48:46
|
Revision: 1536
http://svn.sourceforge.net/pcgen/?rev=1536&view=rev
Author: boomer70
Date: 2006-10-26 19:48:37 -0700 (Thu, 26 Oct 2006)
Log Message:
-----------
Fixes for opening characters.
Modified Paths:
--------------
Trunk/pcgen/code/src/java/pcgen/core/PlayerCharacter.java
Trunk/pcgen/code/src/java/pcgen/gui/PCGen_Frame1.java
Trunk/pcgen/code/src/java/pcgen/gui/tabs/InfoAbility.java
Trunk/pcgen/code/src/java/pcgen/io/IOConstants.java
Trunk/pcgen/code/src/java/pcgen/io/PCGVer2Creator.java
Modified: Trunk/pcgen/code/src/java/pcgen/core/PlayerCharacter.java
===================================================================
--- Trunk/pcgen/code/src/java/pcgen/core/PlayerCharacter.java 2006-10-27 01:28:27 UTC (rev 1535)
+++ Trunk/pcgen/code/src/java/pcgen/core/PlayerCharacter.java 2006-10-27 02:48:37 UTC (rev 1536)
@@ -15343,11 +15343,6 @@
public void setUserPoolBonus( final AbilityCategory aCategory, final BigDecimal anAmount )
{
- if ( aCategory == AbilityCategory.FEAT )
- {
- throw new IllegalArgumentException("This method is not valid for feats."); //$NON-NLS-1$
- }
-
if ( theUserPoolBonuses == null )
{
theUserPoolBonuses = new HashMap<AbilityCategory, BigDecimal>();
@@ -15357,10 +15352,6 @@
public double getUserPoolBonus( final AbilityCategory aCategory )
{
-// if ( aCategory == AbilityCategory.FEAT )
-// {
-// throw new IllegalArgumentException("This method is not valid for feats."); //$NON-NLS-1$
-// }
BigDecimal userBonus = null;
if ( theUserPoolBonuses != null )
{
Modified: Trunk/pcgen/code/src/java/pcgen/gui/PCGen_Frame1.java
===================================================================
--- Trunk/pcgen/code/src/java/pcgen/gui/PCGen_Frame1.java 2006-10-27 01:28:27 UTC (rev 1535)
+++ Trunk/pcgen/code/src/java/pcgen/gui/PCGen_Frame1.java 2006-10-27 02:48:37 UTC (rev 1536)
@@ -684,8 +684,6 @@
return;
}
- Globals.getPCList().add(aPC);
- Globals.setCurrentPC(aPC);
addPCTab(aPC);
if (aPC.getLoadCompanion() && !aPC.getFollowerList().isEmpty())
@@ -1283,6 +1281,8 @@
genDlg.getClassList(), genDlg.getLevels(),
genDlg.getRollMethod());
+ Globals.getPCList().add(aPC);
+ Globals.setCurrentPC(aPC);
pc.setDirty(true);
setPC(pc);
Modified: Trunk/pcgen/code/src/java/pcgen/gui/tabs/InfoAbility.java
===================================================================
--- Trunk/pcgen/code/src/java/pcgen/gui/tabs/InfoAbility.java 2006-10-27 01:28:27 UTC (rev 1535)
+++ Trunk/pcgen/code/src/java/pcgen/gui/tabs/InfoAbility.java 2006-10-27 02:48:37 UTC (rev 1536)
@@ -550,6 +550,15 @@
}
/**
+ * @see pcgen.gui.tabs.BaseCharacterInfoTab#getTabName()
+ */
+ @Override
+ public String getTabName()
+ {
+ return theCategory.getPluralName();
+ }
+
+ /**
* @see pcgen.gui.tabs.ability.IAbilitySelectionListener#abilitySelected(pcgen.core.Ability)
*/
public void abilitySelected(final Ability anAbility)
Modified: Trunk/pcgen/code/src/java/pcgen/io/IOConstants.java
===================================================================
--- Trunk/pcgen/code/src/java/pcgen/io/IOConstants.java 2006-10-27 01:28:27 UTC (rev 1535)
+++ Trunk/pcgen/code/src/java/pcgen/io/IOConstants.java 2006-10-27 02:48:37 UTC (rev 1536)
@@ -108,6 +108,9 @@
/** CATCHPHRASE */
String TAG_CATCHPHRASE = "CATCHPHRASE";
+ /** CATEGORY */
+ String TAG_CATEGORY = "CATEGORY";
+
/** CHARACTERASSET */
String TAG_CHARACTERASSET = "CHARACTERASSET";
Modified: Trunk/pcgen/code/src/java/pcgen/io/PCGVer2Creator.java
===================================================================
--- Trunk/pcgen/code/src/java/pcgen/io/PCGVer2Creator.java 2006-10-27 01:28:27 UTC (rev 1535)
+++ Trunk/pcgen/code/src/java/pcgen/io/PCGVer2Creator.java 2006-10-27 02:48:37 UTC (rev 1536)
@@ -1444,8 +1444,11 @@
{
buffer.append(TAG_ABILITY).append(TAG_END);
buffer.append(EntityEncoder.encode(cat.getKeyName())).append(TAG_SEPARATOR);
+ buffer.append(TAG_TYPE).append(TAG_END);
buffer.append(EntityEncoder.encode(ability.getFeatType().toString())).append(TAG_SEPARATOR);
+ buffer.append(TAG_CATEGORY).append(TAG_END);
buffer.append(EntityEncoder.encode(ability.getCategory())).append(TAG_SEPARATOR);
+ buffer.append(TAG_MAPKEY).append(TAG_END);
buffer.append(EntityEncoder.encode(ability.getKeyName())).append(TAG_SEPARATOR);
int it2 = 0;
if ( ability.isMultiples() )
@@ -1487,6 +1490,7 @@
}
buffer.append(TAG_USERPOOL).append(TAG_END);
buffer.append(EntityEncoder.encode(cat.getKeyName())).append(TAG_SEPARATOR);
+ buffer.append(TAG_POOLPOINTS).append(TAG_END);
buffer.append(thePC.getUserPoolBonus(cat));
buffer.append(LINE_SEP);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|