|
From: <bur...@us...> - 2010-04-22 05:45:23
|
Revision: 6789
http://freecol.svn.sourceforge.net/freecol/?rev=6789&view=rev
Author: burschik
Date: 2010-04-22 05:45:16 +0000 (Thu, 22 Apr 2010)
Log Message:
-----------
Fix 'bug' #2973110 by renaming educate least skilled unit option.
Modified Paths:
--------------
freecol/trunk/data/classic/specification.xml
freecol/trunk/data/freecol/specification.xml
freecol/trunk/data/testing/specification.xml
freecol/trunk/src/net/sf/freecol/client/gui/i18n/FreeColMessages.properties
freecol/trunk/src/net/sf/freecol/client/gui/panel/DragListener.java
freecol/trunk/src/net/sf/freecol/common/model/Building.java
freecol/trunk/src/net/sf/freecol/common/model/GameOptions.java
freecol/trunk/test/src/net/sf/freecol/common/model/SchoolTest.java
freecol/trunk/test/src/net/sf/freecol/common/model/SpecificationTest.java
Modified: freecol/trunk/data/classic/specification.xml
===================================================================
--- freecol/trunk/data/classic/specification.xml 2010-04-22 04:51:33 UTC (rev 6788)
+++ freecol/trunk/data/classic/specification.xml 2010-04-22 05:45:16 UTC (rev 6789)
@@ -1882,7 +1882,7 @@
<booleanOption id="model.option.expertsHaveConnections" defaultValue="false"/>
<booleanOption id="model.option.saveProductionOverflow" defaultValue="false"/>
<!-- Whether to educate the least skilled unit first -->
- <booleanOption id="model.option.educateLeastSkilledUnitFirst" defaultValue="true"/>
+ <booleanOption id="model.option.allowStudentSelection" value="false"/>
</optionGroup>
<optionGroup id="gameOptions.victoryConditions">
<!-- Victory condition: Should the player who first defeats the Royal Expeditionary Force win the game? -->
Modified: freecol/trunk/data/freecol/specification.xml
===================================================================
--- freecol/trunk/data/freecol/specification.xml 2010-04-22 04:51:33 UTC (rev 6788)
+++ freecol/trunk/data/freecol/specification.xml 2010-04-22 05:45:16 UTC (rev 6789)
@@ -180,11 +180,8 @@
<!-- Structure for tile-types
Notes:
- Parent options: ref, name, basic-move-cost, basic-work-turns, sail-to-europe
- Children: art, gen, modifier, production, resource
- art child options: basic, overlay, coast
- - all tiles must have at least basic. overlay will be drawn after all the base tiles are drawn
- - coast is for land tiles drawing their overlap on water tiles. default for coast = "terrain/beach/" for land tiles
+ Parent options: ref, name, basic-move-cost, basic-work-turns
+ Children: gen, modifier, production, resource
gen child options: humidityMin, humidityMax, temperatureMin, temperatureMax, altitudeMin, altitudeMax, latitudeMin, latitudeMax
- humidity is a percentage of water vapor saturation (0 is absolute dryness, 100 is total saturation)
- temperature in degrees Celsius (from -20 to +40; 0 being the water freezing point)
@@ -1716,7 +1713,7 @@
<booleanOption id="model.option.expertsHaveConnections" defaultValue="false"/>
<booleanOption id="model.option.saveProductionOverflow" defaultValue="false"/>
<!-- Whether to educate the least skilled unit first -->
- <booleanOption id="model.option.educateLeastSkilledUnitFirst" defaultValue="false"/>
+ <booleanOption id="model.option.allowStudentSelection" defaultValue="true"/>
</optionGroup>
<optionGroup id="gameOptions.victoryConditions">
<!-- Victory condition: Should the player who first defeats the Royal Expeditionary Force win the game? -->
Modified: freecol/trunk/data/testing/specification.xml
===================================================================
--- freecol/trunk/data/testing/specification.xml 2010-04-22 04:51:33 UTC (rev 6788)
+++ freecol/trunk/data/testing/specification.xml 2010-04-22 05:45:16 UTC (rev 6789)
@@ -2030,7 +2030,7 @@
<booleanOption id="model.option.expertsHaveConnections" defaultValue="false"/>
<booleanOption id="model.option.saveProductionOverflow" defaultValue="false"/>
<!-- Whether to educate the least skilled unit first -->
- <booleanOption id="model.option.educateLeastSkilledUnitFirst" defaultValue="false"/>
+ <booleanOption id="model.option.allowStudentSelection" defaultValue="true"/>
</optionGroup>
<optionGroup id="gameOptions.victoryConditions">
<!-- Victory condition: Should the player who first defeats the Royal Expeditionary Force win the game? -->
Modified: freecol/trunk/src/net/sf/freecol/client/gui/i18n/FreeColMessages.properties
===================================================================
--- freecol/trunk/src/net/sf/freecol/client/gui/i18n/FreeColMessages.properties 2010-04-22 04:51:33 UTC (rev 6788)
+++ freecol/trunk/src/net/sf/freecol/client/gui/i18n/FreeColMessages.properties 2010-04-22 05:45:16 UTC (rev 6789)
@@ -485,8 +485,8 @@
gameOptions.colony.expertsHaveConnections.shortDescription=Experts can use their connections to provide minimal amounts of resources for production in factories.
gameOptions.colony.saveProductionOverflow.name=Save production overflow
gameOptions.colony.saveProductionOverflow.shortDescription=Save overflow of hammers, bells and crosses.
-gameOptions.colony.educateLeastSkilledUnitFirst.name=Educate least skilled unit first
-gameOptions.colony.educateLeastSkilledUnitFirst.shortDescription=Educate least skilled unit first, and don't allow manual assignment of students
+gameOptions.colony.allowStudentSelection.name=Allow student selection
+gameOptions.colony.allowStudentSelection.shortDescription=Allows manual rather than automatic assignment of students
gameOptions.victoryConditions.name=Victory Conditions
gameOptions.victoryConditions.shortDescription=Settings for deciding how the game can be won.
gameOptions.victoryConditions.victoryDefeatREF.name=First player to gain independence
Modified: freecol/trunk/src/net/sf/freecol/client/gui/panel/DragListener.java
===================================================================
--- freecol/trunk/src/net/sf/freecol/client/gui/panel/DragListener.java 2010-04-22 04:51:33 UTC (rev 6788)
+++ freecol/trunk/src/net/sf/freecol/client/gui/panel/DragListener.java 2010-04-22 05:45:16 UTC (rev 6789)
@@ -325,7 +325,7 @@
Unit tempUnit = unitLabel.getUnit();
ImageLibrary imageLibrary = parentPanel.getLibrary();
boolean separatorNeeded = false;
- if (!tempUnit.getGame().getGameOptions().getBoolean(GameOptions.EDUCATE_LEAST_SKILLED_UNIT_FIRST)) {
+ if (tempUnit.getGame().getGameOptions().getBoolean(GameOptions.ALLOW_STUDENT_SELECTION)) {
for (Unit teacher : tempUnit.getColony().getTeachers()) {
if (tempUnit.canBeStudent(teacher) &&
tempUnit.getLocation() instanceof WorkLocation &&
Modified: freecol/trunk/src/net/sf/freecol/common/model/Building.java
===================================================================
--- freecol/trunk/src/net/sf/freecol/common/model/Building.java 2010-04-22 04:51:33 UTC (rev 6788)
+++ freecol/trunk/src/net/sf/freecol/common/model/Building.java 2010-04-22 05:45:16 UTC (rev 6789)
@@ -546,7 +546,7 @@
public Unit findStudent(final Unit teacher) {
Unit student = null;
GoodsType expertProduction = teacher.getType().getExpertProduction();
- boolean leastSkilled = getGameOptions().getBoolean(GameOptions.EDUCATE_LEAST_SKILLED_UNIT_FIRST);
+ boolean leastSkilled = !getGameOptions().getBoolean(GameOptions.ALLOW_STUDENT_SELECTION);
int skill = leastSkilled ? Integer.MAX_VALUE : Integer.MIN_VALUE;
for (Unit potentialStudent : getColony().getUnitList()) {
/**
Modified: freecol/trunk/src/net/sf/freecol/common/model/GameOptions.java
===================================================================
--- freecol/trunk/src/net/sf/freecol/common/model/GameOptions.java 2010-04-22 04:51:33 UTC (rev 6788)
+++ freecol/trunk/src/net/sf/freecol/common/model/GameOptions.java 2010-04-22 05:45:16 UTC (rev 6789)
@@ -79,8 +79,8 @@
* behaviour of the original game and disallows manually assigning
* students to teachers.
*/
- public static final String EDUCATE_LEAST_SKILLED_UNIT_FIRST =
- "model.option.educateLeastSkilledUnitFirst";
+ public static final String ALLOW_STUDENT_SELECTION =
+ "model.option.allowStudentSelection";
/**
* The difficulty of the game.
Modified: freecol/trunk/test/src/net/sf/freecol/common/model/SchoolTest.java
===================================================================
--- freecol/trunk/test/src/net/sf/freecol/common/model/SchoolTest.java 2010-04-22 04:51:33 UTC (rev 6788)
+++ freecol/trunk/test/src/net/sf/freecol/common/model/SchoolTest.java 2010-04-22 05:45:16 UTC (rev 6789)
@@ -1183,7 +1183,7 @@
Building school = colony.getBuilding(spec().getBuildingType("model.building.schoolhouse"));
assertTrue(schoolType.hasAbility("model.ability.teach"));
assertTrue(colony.canTrain(lumberJack));
- assertFalse(game.getGameOptions().getBoolean(GameOptions.EDUCATE_LEAST_SKILLED_UNIT_FIRST));
+ assertTrue(game.getGameOptions().getBoolean(GameOptions.ALLOW_STUDENT_SELECTION));
lumberJack.setLocation(school);
colonist1.setWorkType(cotton);
@@ -1195,8 +1195,8 @@
lumberJack.setStudent(null);
colonist2.setTeacher(null);
- ((BooleanOption) game.getGameOptions().getObject(GameOptions.EDUCATE_LEAST_SKILLED_UNIT_FIRST))
- .setValue(true);
+ ((BooleanOption) game.getGameOptions().getObject(GameOptions.ALLOW_STUDENT_SELECTION))
+ .setValue(false);
criminal1.setWorkType(cotton);
criminal2.setWorkType(lumber);
assertEquals(criminal2, school.findStudent(lumberJack));
Modified: freecol/trunk/test/src/net/sf/freecol/common/model/SpecificationTest.java
===================================================================
--- freecol/trunk/test/src/net/sf/freecol/common/model/SpecificationTest.java 2010-04-22 04:51:33 UTC (rev 6788)
+++ freecol/trunk/test/src/net/sf/freecol/common/model/SpecificationTest.java 2010-04-22 05:45:16 UTC (rev 6789)
@@ -126,7 +126,7 @@
assertFalse(spec.getBooleanOption(GameOptions.CUSTOM_IGNORE_BOYCOTT).getValue());
assertFalse(spec.getBooleanOption(GameOptions.EXPERTS_HAVE_CONNECTIONS).getValue());
assertFalse(spec.getBooleanOption(GameOptions.SAVE_PRODUCTION_OVERFLOW).getValue());
- assertFalse(spec.getBooleanOption(GameOptions.EDUCATE_LEAST_SKILLED_UNIT_FIRST).getValue());
+ assertTrue(spec.getBooleanOption(GameOptions.ALLOW_STUDENT_SELECTION).getValue());
}
// Check difficulty levels presence and values
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|