vassalengine-svn-trunk Mailing List for VASSAL Engine
Brought to you by:
rodneykinney,
uckelman
You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(12) |
Nov
(26) |
Dec
(27) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(17) |
Feb
(9) |
Mar
(46) |
Apr
(17) |
May
(32) |
Jun
(47) |
Jul
(32) |
Aug
(21) |
Sep
(42) |
Oct
(27) |
Nov
(6) |
Dec
(7) |
| 2008 |
Jan
(21) |
Feb
(83) |
Mar
(75) |
Apr
(9) |
May
(115) |
Jun
(29) |
Jul
(75) |
Aug
(54) |
Sep
(40) |
Oct
(100) |
Nov
(104) |
Dec
(41) |
| 2009 |
Jan
(131) |
Feb
(89) |
Mar
(110) |
Apr
(32) |
May
(35) |
Jun
(31) |
Jul
(22) |
Aug
(26) |
Sep
(14) |
Oct
(49) |
Nov
(13) |
Dec
(5) |
| 2010 |
Jan
(4) |
Feb
(23) |
Mar
(38) |
Apr
(163) |
May
(105) |
Jun
(3) |
Jul
(96) |
Aug
(44) |
Sep
(43) |
Oct
(55) |
Nov
(68) |
Dec
(6) |
| 2011 |
Jan
(11) |
Feb
(1) |
Mar
(2) |
Apr
(3) |
May
|
Jun
(4) |
Jul
(30) |
Aug
(35) |
Sep
(30) |
Oct
(45) |
Nov
(17) |
Dec
|
| 2012 |
Jan
(1) |
Feb
(11) |
Mar
(7) |
Apr
(12) |
May
(26) |
Jun
(13) |
Jul
(20) |
Aug
(18) |
Sep
(47) |
Oct
(29) |
Nov
(7) |
Dec
(79) |
| 2013 |
Jan
(1) |
Feb
(18) |
Mar
(34) |
Apr
(42) |
May
(38) |
Jun
(32) |
Jul
(18) |
Aug
(5) |
Sep
(23) |
Oct
(32) |
Nov
(33) |
Dec
(13) |
| 2014 |
Jan
(30) |
Feb
(21) |
Mar
(13) |
Apr
|
May
|
Jun
(76) |
Jul
(24) |
Aug
(7) |
Sep
(7) |
Oct
|
Nov
|
Dec
(11) |
| 2015 |
Jan
|
Feb
|
Mar
(3) |
Apr
(2) |
May
(12) |
Jun
|
Jul
|
Aug
|
Sep
(4) |
Oct
(1) |
Nov
(1) |
Dec
|
| 2016 |
Jan
(3) |
Feb
|
Mar
(2) |
Apr
(7) |
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(10) |
Dec
(2) |
| 2017 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(4) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: swampwallaby--- v. vassalengine-s. <vas...@li...> - 2017-06-30 04:31:39
|
Revision: 9254
http://sourceforge.net/p/vassalengine/svn/9254
Author: swampwallaby
Date: 2017-06-30 04:31:36 +0000 (Fri, 30 Jun 2017)
Log Message:
-----------
Add Scrub terrain
Modified Paths:
--------------
VSQL-src/trunk/tdc/UnitInfo.java
Modified: VSQL-src/trunk/tdc/UnitInfo.java
===================================================================
--- VSQL-src/trunk/tdc/UnitInfo.java 2017-06-30 04:11:42 UTC (rev 9253)
+++ VSQL-src/trunk/tdc/UnitInfo.java 2017-06-30 04:31:36 UTC (rev 9254)
@@ -538,6 +538,7 @@
terrainInfo.put(TdcProperties.TERRAIN_POLDER, new TerrainInfo(TdcProperties.TERRAIN_POLDER, 0));
terrainInfo.put(TdcProperties.TERRAIN_OOIJ_POLDER, new TerrainInfo(TdcProperties.TERRAIN_OOIJ_POLDER, 0));
terrainInfo.put(TdcProperties.TERRAIN_ORCHARD, new TerrainInfo(TdcProperties.TERRAIN_ORCHARD, -1));
+ terrainInfo.put(TdcProperties.TERRAIN_SCRUB, new TerrainInfo(TdcProperties.TERRAIN_SCRUB, -1));
terrainInfo.put(TdcProperties.TERRAIN_WOODS, new TerrainInfo(TdcProperties.TERRAIN_WOODS, -2));
terrainInfo.put(TdcProperties.TERRAIN_BRUSHWOODS, new TerrainInfo(TdcProperties.TERRAIN_BRUSHWOODS, -2));
terrainInfo.put(TdcProperties.TERRAIN_SWAMP, new TerrainInfo(TdcProperties.TERRAIN_SWAMP, 1));
@@ -572,6 +573,7 @@
terrainInfoArmoured.put(TdcProperties.TERRAIN_POLDER, new TerrainInfo(TdcProperties.TERRAIN_POLDER, 0));
terrainInfoArmoured.put(TdcProperties.TERRAIN_OOIJ_POLDER, new TerrainInfo(TdcProperties.TERRAIN_OOIJ_POLDER, 0));
terrainInfoArmoured.put(TdcProperties.TERRAIN_ORCHARD, new TerrainInfo(TdcProperties.TERRAIN_ORCHARD, -1));
+ terrainInfoArmoured.put(TdcProperties.TERRAIN_SCRUB, new TerrainInfo(TdcProperties.TERRAIN_SCRUB, -1));
terrainInfoArmoured.put(TdcProperties.TERRAIN_WOODS, new TerrainInfo(TdcProperties.TERRAIN_WOODS, -2));
terrainInfoArmoured.put(TdcProperties.TERRAIN_BRUSHWOODS, new TerrainInfo(TdcProperties.TERRAIN_BRUSHWOODS, -2));
terrainInfoArmoured.put(TdcProperties.TERRAIN_SWAMP, new TerrainInfo(TdcProperties.TERRAIN_SWAMP, 1));
@@ -585,15 +587,15 @@
terrainInfoArmoured.put(TdcProperties.TERRAIN_VILLAGE, new TerrainInfo(TdcProperties.TERRAIN_VILLAGE, 0));
if (isTinianRules()) {
- terrainInfo.put(TdcProperties.TERRAIN_BEACH, new TerrainInfo(TdcProperties.TERRAIN_BEACH, 0));
- terrainInfo.put(TdcProperties.TERRAIN_MARSH, new TerrainInfo(TdcProperties.TERRAIN_MARSH, -2));
- terrainInfo.put(TdcProperties.TERRAIN_TOWN, new TerrainInfo(TdcProperties.TERRAIN_TOWN, -2));
- terrainInfo.put(TdcProperties.TERRAIN_BUILDINGS, new TerrainInfo(TdcProperties.TERRAIN_BUILDINGS, -2));
- terrainInfo.put(TdcProperties.TERRAIN_RUNWAY, new TerrainInfo(TdcProperties.TERRAIN_RUNWAY, 1));
- terrainInfo.put(TdcProperties.TERRAIN_BRUSH, new TerrainInfo(TdcProperties.TERRAIN_BRUSH, -1));
- terrainInfo.put(TdcProperties.TERRAIN_SUGAR_CANE, new TerrainInfo(TdcProperties.TERRAIN_SUGAR_CANE, -1));
- terrainInfo.put(TdcProperties.TERRAIN_ROCKY, new TerrainInfo(TdcProperties.TERRAIN_ROCKY, -2));
- terrainInfo.put(TdcProperties.TERRAIN_CAVE, new TerrainInfo(TdcProperties.TERRAIN_CAVE, 0));
+ terrainInfoArmoured.put(TdcProperties.TERRAIN_BEACH, new TerrainInfo(TdcProperties.TERRAIN_BEACH, 0));
+ terrainInfoArmoured.put(TdcProperties.TERRAIN_MARSH, new TerrainInfo(TdcProperties.TERRAIN_MARSH, -2));
+ terrainInfoArmoured.put(TdcProperties.TERRAIN_TOWN, new TerrainInfo(TdcProperties.TERRAIN_TOWN, -2));
+ terrainInfoArmoured.put(TdcProperties.TERRAIN_BUILDINGS, new TerrainInfo(TdcProperties.TERRAIN_BUILDINGS, -2));
+ terrainInfoArmoured.put(TdcProperties.TERRAIN_RUNWAY, new TerrainInfo(TdcProperties.TERRAIN_RUNWAY, 1));
+ terrainInfoArmoured.put(TdcProperties.TERRAIN_BRUSH, new TerrainInfo(TdcProperties.TERRAIN_BRUSH, -1));
+ terrainInfoArmoured.put(TdcProperties.TERRAIN_SUGAR_CANE, new TerrainInfo(TdcProperties.TERRAIN_SUGAR_CANE, -1));
+ terrainInfoArmoured.put(TdcProperties.TERRAIN_ROCKY, new TerrainInfo(TdcProperties.TERRAIN_ROCKY, -2));
+ terrainInfoArmoured.put(TdcProperties.TERRAIN_CAVE, new TerrainInfo(TdcProperties.TERRAIN_CAVE, 0));
}
else {
terrainInfoArmoured.put(TdcProperties.TERRAIN_TOWN, new TerrainInfo(TdcProperties.TERRAIN_TOWN, -1));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
vassalengine-svn mailing list
vas...@li...
https://lists.sourceforge.net/lists/listinfo/vassalengine-svn
|
|
From: swampwallaby--- v. vassalengine-s. <vas...@li...> - 2017-06-30 04:11:45
|
Revision: 9253
http://sourceforge.net/p/vassalengine/svn/9253
Author: swampwallaby
Date: 2017-06-30 04:11:42 +0000 (Fri, 30 Jun 2017)
Log Message:
-----------
Crete Tweaks
Modified Paths:
--------------
VSQL-src/trunk/tdc/CommandRangeChecker.java
VSQL-src/trunk/tdc/UnitInfo.java
VSQL-src/trunk/tdc/attack/AttackView.java
Modified: VSQL-src/trunk/tdc/CommandRangeChecker.java
===================================================================
--- VSQL-src/trunk/tdc/CommandRangeChecker.java 2017-06-29 06:38:19 UTC (rev 9252)
+++ VSQL-src/trunk/tdc/CommandRangeChecker.java 2017-06-30 04:11:42 UTC (rev 9253)
@@ -1,7 +1,7 @@
/*
* $Id$
*
- * Copyright (c) 2005-2012 by Brent Easton
+ * Copyright (c) 2005-2017 by Brent Easton
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -78,7 +78,7 @@
info = i;
piece = p;
setLeaderAttributes();
- map = p.getMap();
+ map = p.getMap();
}
/**
@@ -88,6 +88,8 @@
* Obscured to me must be skipped Commandos in D-Day must be within 2 hexes of
* another Commando unit
*
+ * In Crete, Greek units must be in command range of any allied leader
+ *
*/
protected void setLeaderAttributes() {
unitType = (String) piece.getProperty(TdcProperties.TYPE);
@@ -101,34 +103,35 @@
return;
}
- canBeActivated = Boolean.valueOf((String) piece.getProperty(TdcProperties.ACTIVE))
- .booleanValue()
- && !Boolean.TRUE.equals(piece.getProperty(Properties.INVISIBLE_TO_ME))
- && !Boolean.TRUE.equals(piece.getProperty(Properties.OBSCURED_TO_ME))
- && !"Leader".equals(piece.getProperty("Type"));
- alwaysInCommand = isAlwaysInCommand();
- if (canBeActivated && !alwaysInCommand) {
- targetHasTelephoneCapbility = hasTelephoneCapability(piece);
+ // Greek unit in Crete
+ if (info.isGreek() && UnitInfo.isCreteRules()) {
+ canBeActivated = true;
+ alwaysInCommand = false;
+ leaderFormationType = TdcProperties.ARMY;
+ leaderFormationValue = TdcProperties.ARMY_ALLIED;
+ }
+ else {
+ canBeActivated = Boolean.valueOf((String) piece.getProperty(TdcProperties.ACTIVE)).booleanValue() && !Boolean.TRUE.equals(piece.getProperty(Properties.INVISIBLE_TO_ME))
+ && !Boolean.TRUE.equals(piece.getProperty(Properties.OBSCURED_TO_ME)) && !"Leader".equals(piece.getProperty("Type"));
+ alwaysInCommand = isAlwaysInCommand();
+ if (canBeActivated && !alwaysInCommand) {
+ targetHasTelephoneCapbility = hasTelephoneCapability(piece);
- String unitClass = (String) piece.getProperty(TdcProperties.CLASS);
- if (unitClass != null) {
- if (unitClass.equals(TdcProperties.INFANTRY) || unitClass.equals(TdcProperties.VEHICLE)
- || unitClass.equals(TdcProperties.GUN) || unitClass.equals(TdcProperties.CLASS_LANDING_CRAFT)) {
- leaderFormationType = TdcProperties.FORMATION;
- pieceFormation = (String) piece.getProperty(TdcProperties.FORMATION) + "";
- leaderFormationValue = pieceFormation;
- leaderFormation2Value = (String) piece.getProperty(TdcProperties.FORMATION2) + "";
- isUnitIndependent = Boolean.valueOf(
- (String) piece.getProperty(TdcProperties.IS_INDEPENDENT)).booleanValue();
- isUnitNonFormationCommand = Boolean.valueOf(
- (String) piece.getProperty(TdcProperties.NON_FORMATION_COMMAND)).booleanValue()
- && !Boolean.valueOf((String) piece.getProperty(TdcProperties.COMMAND_BREAKDOWN))
- .booleanValue();
- if (leaderFormationValue != null) {
- if (isUnitIndependent || isUnitNonFormationCommand) {
- leaderFormationType = TdcProperties.DIVISION;
- leaderFormationValue = (String) piece.getProperty(leaderFormationType) + "";
- leaderFormation2Value = (String) piece.getProperty(TdcProperties.DIVISION2) + "";
+ String unitClass = (String) piece.getProperty(TdcProperties.CLASS);
+ if (unitClass != null) {
+ if (unitClass.equals(TdcProperties.INFANTRY) || unitClass.equals(TdcProperties.VEHICLE) || unitClass.equals(TdcProperties.GUN) || unitClass.equals(TdcProperties.CLASS_LANDING_CRAFT)) {
+ leaderFormationType = TdcProperties.FORMATION;
+ pieceFormation = (String) piece.getProperty(TdcProperties.FORMATION) + "";
+ leaderFormationValue = pieceFormation;
+ leaderFormation2Value = (String) piece.getProperty(TdcProperties.FORMATION2) + "";
+ isUnitIndependent = Boolean.valueOf((String) piece.getProperty(TdcProperties.IS_INDEPENDENT)).booleanValue();
+ isUnitNonFormationCommand = Boolean.valueOf((String) piece.getProperty(TdcProperties.NON_FORMATION_COMMAND)).booleanValue() && !Boolean.valueOf((String) piece.getProperty(TdcProperties.COMMAND_BREAKDOWN)).booleanValue();
+ if (leaderFormationValue != null) {
+ if (isUnitIndependent || isUnitNonFormationCommand) {
+ leaderFormationType = TdcProperties.DIVISION;
+ leaderFormationValue = (String) piece.getProperty(leaderFormationType) + "";
+ leaderFormation2Value = (String) piece.getProperty(TdcProperties.DIVISION2) + "";
+ }
}
}
}
@@ -143,10 +146,10 @@
*
* @return Always in Command or c) It's in an Artillery Park on the Bir
* Hacheim board.
- *
- * TGD New Rules :-
- * Artillery in Artillery Parks always in command
- * Red TQR units (except Commandos) always in command
+ *
+ * TGD New Rules :-
+ * Artillery in Artillery Parks always in command
+ * Red TQR units (except Commandos) always in command
*/
protected boolean isAlwaysInCommand() {
@@ -157,7 +160,7 @@
if (Boolean.valueOf((String) piece.getProperty(TdcProperties.ALWAYS_IN_COMMAND)).booleanValue()) {
return true;
}
-
+
if (info.isRedTqr()) {
return true;
}
@@ -193,7 +196,7 @@
return true;
}
}
-
+
// TGD Artillery units in Artillery Parks
if (UnitInfo.isTgdRules()) {
if (TdcProperties.TGD_ARTY_PARK.equals(piece.getProperty(BasicPiece.CURRENT_ZONE))) {
@@ -200,7 +203,7 @@
return true;
}
}
-
+
// Tinian Artillery units in Artillery Parks
if (UnitInfo.isTinianRules()) {
final String zone = (String) piece.getProperty(BasicPiece.CURRENT_ZONE);
@@ -230,8 +233,7 @@
// Only American units have telephone capability in WED and earlier
// In WED only American Leaders have Telephone property, all units are
// assumed to have it
- if (TdcProperties.DIVISION_82AB.equals(division)
- || TdcProperties.DIVISION_101AB.equals(division)) {
+ if (TdcProperties.DIVISION_82AB.equals(division) || TdcProperties.DIVISION_101AB.equals(division)) {
// Leader must have the telephone symbol
if (isLeader && !hasTelephone) {
@@ -240,13 +242,10 @@
// Both Leader and Units must be in an OP, strongpoint or City, Town or
// Fortified terrain
- final String terrain = (String) TdcMap.getTerrainProperty(piece,
- TerrainBasicPiece.CURRENT_TERRAIN);
- final String strongpoint = (String) TdcMap.getTerrainProperty(piece,
- TdcProperties.STRONGPOINT);
+ final String terrain = (String) TdcMap.getTerrainProperty(piece, TerrainBasicPiece.CURRENT_TERRAIN);
+ final String strongpoint = (String) TdcMap.getTerrainProperty(piece, TdcProperties.STRONGPOINT);
final String op = (String) TdcMap.getTerrainProperty(piece, TdcProperties.OP);
- return "true".equals(op) || "true".equals(strongpoint) || TdcProperties.CITY.equals(terrain)
- || TdcProperties.TOWN.equals(terrain) || TdcProperties.FORTIFIED.equals(terrain);
+ return "true".equals(op) || "true".equals(strongpoint) || TdcProperties.CITY.equals(terrain) || TdcProperties.TOWN.equals(terrain) || TdcProperties.FORTIFIED.equals(terrain);
}
// In D-DAY, Units of some Divisions can have telephone capability
else if (TdcProperties.DIVISION_716.equals(division) || TdcProperties.DIVISION_352.equals(division)) {
@@ -256,8 +255,7 @@
}
// Check if Telephone has been cut
- final boolean isTelephoneCut = "2".equals(piece.getProperty(TdcProperties.LAYER_TELEPHONE
- + "_Level"));
+ final boolean isTelephoneCut = "2".equals(piece.getProperty(TdcProperties.LAYER_TELEPHONE + "_Level"));
if (isTelephoneCut) {
return false;
}
@@ -270,10 +268,8 @@
// Leaders must be in appropriate terrain or stacked with another
// telephone unit.
// Town, City or Fortified Hex
- final String terrain = (String) TdcMap.getTerrainProperty(piece,
- TerrainBasicPiece.CURRENT_TERRAIN);
- if (TdcProperties.CITY.equals(terrain) || TdcProperties.TOWN.equals(terrain)
- || TdcProperties.FORTIFIED.equals(terrain)) {
+ final String terrain = (String) TdcMap.getTerrainProperty(piece, TerrainBasicPiece.CURRENT_TERRAIN);
+ if (TdcProperties.CITY.equals(terrain) || TdcProperties.TOWN.equals(terrain) || TdcProperties.FORTIFIED.equals(terrain)) {
return true;
}
@@ -316,8 +312,7 @@
return visitor.isInCommand();
}
else {
- if (leaderFormationValue != null && leaderFormationValue.length() > 0
- && piece.getMap() != null) {
+ if (leaderFormationValue != null && leaderFormationValue.length() > 0 && piece.getMap() != null) {
String s = TdcProperties.CLASS + "=" + TdcProperties.LEADER + " && " + leaderFormationType;
if (leaderFormation2Value.length() > 0) {
@@ -396,7 +391,7 @@
return;
}
}
-
+
/*
* Regardless of command range, American units in certain hexes are in
* command if their leader is also in a telephone hex
@@ -451,19 +446,18 @@
GamePiece piece;
String formation;
boolean inCommand;
-
-
- public CommandoVisitor (GamePiece piece) {
+
+ public CommandoVisitor(GamePiece piece) {
this.piece = piece;
- formation = (String) piece.getProperty(TdcProperties.FORMATION);
+ formation = (String) piece.getProperty(TdcProperties.FORMATION);
inCommand = false;
}
-
+
/* Is Unit In command? */
public boolean isInCommand() {
return inCommand;
}
-
+
public Object visitStack(Stack s) {
for (int i = 0; i < s.getPieceCount(); i++) {
apply(s.getPieceAt(i));
Modified: VSQL-src/trunk/tdc/UnitInfo.java
===================================================================
--- VSQL-src/trunk/tdc/UnitInfo.java 2017-06-29 06:38:19 UTC (rev 9252)
+++ VSQL-src/trunk/tdc/UnitInfo.java 2017-06-30 04:11:42 UTC (rev 9253)
@@ -432,6 +432,10 @@
return TdcProperties.ENGINEER.equals(unitSubClass);
}
+ public boolean isGreek() {
+ return TdcProperties.SUBCLASS_GREEK.equals(unitSubClass);
+ }
+
public boolean isTank() {
return isVehicle() && TdcRatings.WHITE.equals(getFireColor()) && "Red".equals(ratings.get(TdcRatings.MOVE_COLOUR));
}
Modified: VSQL-src/trunk/tdc/attack/AttackView.java
===================================================================
--- VSQL-src/trunk/tdc/attack/AttackView.java 2017-06-29 06:38:19 UTC (rev 9252)
+++ VSQL-src/trunk/tdc/attack/AttackView.java 2017-06-30 04:11:42 UTC (rev 9253)
@@ -34,6 +34,7 @@
import net.miginfocom.swing.MigLayout;
import tdc.AttackWizard;
import tdc.AttackWizard.WizardTargetCommand;
+import tdc.UnitInfo;
import VASSAL.build.GameModule;
import VASSAL.command.Command;
import VASSAL.counters.GamePiece;
@@ -197,8 +198,8 @@
mainPanel.add(specialAttack,WIDTH+",wrap");
}
- // Central Panel for Air Attack - Air Defence roll
- if (myModel.isAirPower()) {
+ // Central Panel for Air Attack - Air Defence roll - D-Day rules only
+ if (myModel.isAirPower() && UnitInfo.isTgdRules()) {
specialAttack = new JPanel(new MigLayout("hidemode 3","[center,grow]"));
final int airDefenceRating = myModel.getAirDefenceRating();
final String airDefenceTerrain = myModel.getAirDefenceDescription();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
vassalengine-svn mailing list
vas...@li...
https://lists.sourceforge.net/lists/listinfo/vassalengine-svn
|
|
From: swampwallaby--- v. vassalengine-s. <vas...@li...> - 2017-06-29 06:38:23
|
Revision: 9252
http://sourceforge.net/p/vassalengine/svn/9252
Author: swampwallaby
Date: 2017-06-29 06:38:19 +0000 (Thu, 29 Jun 2017)
Log Message:
-----------
Changes for GTS Crete
Modified Paths:
--------------
VSQL-src/trunk/tdc/ScenarioCardTabWidget.java
VSQL-src/trunk/tdc/TdcHighlighter.java
VSQL-src/trunk/tdc/TdcProperties.java
VSQL-src/trunk/tdc/TdcScenarioOptions.java
VSQL-src/trunk/tdc/TdcWizard.java
VSQL-src/trunk/tdc/UnitInfo.java
VSQL-src/trunk/tdc/attack/AttackModel.java
VSQL-src/trunk/tdc/attack/AttackView.java
Modified: VSQL-src/trunk/tdc/ScenarioCardTabWidget.java
===================================================================
--- VSQL-src/trunk/tdc/ScenarioCardTabWidget.java 2017-01-21 23:51:39 UTC (rev 9251)
+++ VSQL-src/trunk/tdc/ScenarioCardTabWidget.java 2017-06-29 06:38:19 UTC (rev 9252)
@@ -1,7 +1,7 @@
/*
* $Id: ScenarioCardTabWidget 7690 2011-07-07 23:44:55Z swampwallaby $
*
- * Copyright (c) 2012-2014 by Brent Easton
+ * Copyright (c) 2012-2017 by Brent Easton
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -159,8 +159,13 @@
return null;
}
- // Find the board name loaded on each scenario card. If is the Unused board,
- // hide the tab.
+ /*
+ * For TDC/TGD, Find the board name loaded on each scenario card. If is the Unused board,
+ hide the tab.
+
+ For Crete, check the Used-XXXX global variable matching the Map-Division property of the map on that tab
+
+ */
protected void updateVisibility() {
// Make a base set of widgets, if it has not already been done
@@ -185,8 +190,21 @@
// Too Early, no boards loaded yet
return;
}
+ if (UnitInfo.isCreteRules()) {
+ final String division = (String) wm.getProperty(TdcProperties.MAP_DIVISION);
+ final String useMap = (String) GameModule.getGameModule().getProperty("Used-"+division);
+
+ visible[i] = ! "false".equals(useMap);
+ }
+ else {
names[i] = it.next().getAttributeValueString(Board.IMAGE);
- visible[i] = !names[i].contains("unused");
+ if (names[i] == null) {
+ visible[i] = true;
+ }
+ else {
+ visible[i] = !names[i].contains("unused");
+ }
+ }
}
}
}
Modified: VSQL-src/trunk/tdc/TdcHighlighter.java
===================================================================
--- VSQL-src/trunk/tdc/TdcHighlighter.java 2017-01-21 23:51:39 UTC (rev 9251)
+++ VSQL-src/trunk/tdc/TdcHighlighter.java 2017-06-29 06:38:19 UTC (rev 9252)
@@ -25,7 +25,6 @@
import java.awt.Graphics;
import java.awt.Rectangle;
-
import VASSAL.counters.ColoredBorder;
import VASSAL.counters.GamePiece;
import VASSAL.counters.Labeler;
Modified: VSQL-src/trunk/tdc/TdcProperties.java
===================================================================
--- VSQL-src/trunk/tdc/TdcProperties.java 2017-01-21 23:51:39 UTC (rev 9251)
+++ VSQL-src/trunk/tdc/TdcProperties.java 2017-06-29 06:38:19 UTC (rev 9252)
@@ -1,7 +1,7 @@
/*
* $Id$
*
- * Copyright (c) 2005-2010 by Brent Easton
+ * Copyright (c) 2005-2017 by Brent Easton
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -26,7 +26,7 @@
*/
public interface TdcProperties {
- public static final boolean DEBUG = false; // Debug Mode - Mouse over viewer shows ratings
+ public static final boolean DEBUG = true; // Debug Mode - Mouse over viewer shows ratings
public static final String STEP = "Step"; // Step Count Marker
public static final String ACTIVE = "Active"; // Unit can be Activated Marker
@@ -137,6 +137,7 @@
public static final String RULES_TGD = "TGD";
public static final String RULES_DDAY = "DDAY"; // For compatibility with early versions of module
public static final String RULES_TINIAN = "TINIAN";
+ public static final String RULES_CRETE = "CRETE";
public static final String SDZ_1AB = "SDZ-1AB";
public static final String SDZ_52AL = "SDZ-52AL";
@@ -223,6 +224,7 @@
public static final String TYPE_RUBBLE = "Rubble";
public static final String TYPE_DELAY_P = "Delay-P";
public static final String TYPE_DELAY_G = "Delay-G";
+ public static final String TYPE_DELAY_A = "Delay-A";
public static final String TYPE_COLUMN = "Column";
public static final String TYPE_EVENT = "Event";
public static final String TYPE_ARTILLERY_PARK = "APark";
@@ -276,6 +278,7 @@
public static final String NAVAL_LOADING = "Loading";
public static final String NAVAL_LANDING = "Landing";
public static final String COMBAT_NO_NEG = "CombatNoNeg"; // true if a unit attracts no negative modifiers on combat
+ public static final String COMBAT_NO_MOD = "CombatNoMod"; // true if a unit attracts no modifiers at all on combat
public static final String ADD_10_TO_SWORD_NAVAL_RANGE = "Add10ToSwordNavalRange"; // Global value to add to all Naval ranges on map
// Beach Attack Classes (BAC)
@@ -288,6 +291,31 @@
public static final String ZONE_LANDING_WAVE = "Landing Wave";
+ // Global properties belonging to Maps
+ public static final String MAP_DIVISION = "Map-Division";
+ // Crete
+ public static final String TERRAIN_SCRUB = "Scrub";
+
+ public static final String SUPPLY_FULL = "Full";
+ public static final String SUPPLY_REDUCED = "Reduced";
+ public static final String SUPPLY_DIMINISHED = "Diminished";
+ public static final String SUPPLY_EMERGENCY = "Emergency";
+
+ public static final String SUPPLY_MALEME_SUDA = "Maleme-Suda";
+ public static final String SUPPLY_RETHYMON = "Rethymon";
+ public static final String SUPPLY_HERAKLION = "Heraklion";
+
+ public static final String BOARD_KASTELLI = "Kastelli";
+ public static final String BOARD_MALEME = "Maleme";
+ public static final String BOARD_CANEA_SUDA = "Canea Suda";
+ public static final String BOARD_GEORGEOPOLIS = "Georgeopolis";
+ public static final String BOARD_RETHYMON = "Rethymon";
+ public static final String BOARD_HERAKLION = "Heraklion";
+
+ public static final String CLASS_PARTISAN = "Partisan";
+ public static final String SUBCLASS_GREEK = "Greek";
+
+
}
Modified: VSQL-src/trunk/tdc/TdcScenarioOptions.java
===================================================================
--- VSQL-src/trunk/tdc/TdcScenarioOptions.java 2017-01-21 23:51:39 UTC (rev 9251)
+++ VSQL-src/trunk/tdc/TdcScenarioOptions.java 2017-06-29 06:38:19 UTC (rev 9252)
@@ -1,7 +1,7 @@
/*
* $Id: TdcScenarioOptions.java 963 2006-08-25 12:48:03Z swampwallaby $
*
- * Copyright (c) 2006-2010 by Brent Easton
+ * Copyright (c) 2006-2017 by Brent Easton
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -65,21 +65,31 @@
protected AttachOption attach_Reinhold_Frundsberg;
protected AttachOption attach_Euling_Frundsberg;
protected ChillBooleanOption chill_reorg;
-
+
protected BooleanOption telephoneCommand736;
protected BooleanOption add10toSwordNavalRange;
protected AttachOption attach_22arm;
+
+ protected BooleanOption creteDiv2nz;
+ protected BooleanOption creteDivcrefor;
+ protected BooleanOption creteDiv5geb;
+ protected BooleanOption creteDiv7fl;
+ protected BooleanOption creteDiv14th;
+ protected BooleanOption creteDiv19th;
+ protected BooleanOption creteDivfjr1;
+ protected BooleanOption creteDivfjr2;
- public TdcScenarioOptions () {
+ public TdcScenarioOptions() {
super();
}
-
+
public Component getComponent() {
if (panel == null) {
+
panel = new JPanel();
panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
-
+
final Box optionBox = Box.createVerticalBox();
optionBox.setBorder(BorderFactory.createEtchedBorder());
optionBox.add(new JLabel("Scenario Options"));
@@ -87,150 +97,161 @@
final Box generalBox = Box.createVerticalBox();
generalBox.setBorder(BorderFactory.createEtchedBorder());
-
+
generalBox.add(new JLabel(" "));
generalBox.add(new JLabel("General"));
generalBox.add(new JLabel(" "));
-
+
aicAllied = new BooleanOption("AIC-Allied", "Allied units always in command");
generalBox.add(aicAllied.getControls());
-
+
aicGerman = new BooleanOption("AIC-German", "Axis units always in command");
generalBox.add(aicGerman.getControls());
+
+ generalBox.add(new JLabel(" "));
optionBox.add(generalBox);
-
- final Box ddBox = Box.createVerticalBox();
- ddBox.setBorder(BorderFactory.createEtchedBorder());
- ddBox.add(new JLabel(" "));
- ddBox.add(new JLabel("The Greatest Day"));
- ddBox.add(new JLabel(" "));
- telephoneCommand736 = new BooleanOption("736TelCom", "736 Rgt Command depends only on Phone Lines?");
- ddBox.add(telephoneCommand736.getControls());
- ddBox.add(new JLabel(" "));
-
-
- attach_22arm = new AttachOption("Attach-22Arm",
- "22 Arm Brigade are attached to division ", new String[] {
- TdcProperties.DIVISION_7TH, TdcProperties.DIVISION_50TH },
- "7th-v-50th");
- ddBox.add(attach_22arm.getControls());
-
- optionBox.add(ddBox);
-
- add10toSwordNavalRange = new BooleanOption(TdcProperties.ADD_10_TO_SWORD_NAVAL_RANGE, "+10 hexes to naval Range?");
- ddBox.add(add10toSwordNavalRange.getControls());
- ddBox.add(new JLabel(" "));
- optionBox.add(ddBox);
-
- final Box tdcBox = Box.createVerticalBox();
- tdcBox.setBorder(BorderFactory.createEtchedBorder());
- tdcBox.add(new JLabel(" "));
- tdcBox.add(new JLabel("The Devils Cauldron"));
- tdcBox.add(new JLabel(" "));
-
- aic505 = new BooleanOption("AIC-505 PIR", "505 PIR is always in command");
- tdcBox.add(aic505.getControls());
-
- commandBreakdown = new BooleanOption("Command-Breakdown", "Command Breakdown has occured (Scenario AD#1)");
- tdcBox.add(commandBreakdown.getControls());
-
- attach_CG_82AB = new AttachOption("Attach-CG",
- "Coldstream Guards are attached to division ", new String[] {
- TdcProperties.DIVISION_GDS, TdcProperties.DIVISION_82AB },
- "Gds-v-82AB");
- tdcBox.add(attach_CG_82AB.getControls());
+ optionBox.add(new JLabel(" "));
- attach_GdsInd_43rd = new AttachOption("Attach-GdsInd",
- "Guards Independent are attached to division ", new String[] {
- TdcProperties.DIVISION_GDS, TdcProperties.DIVISION_43RD },
- "Gds-v-43rd");
- tdcBox.add(attach_GdsInd_43rd.getControls());
+ if (UnitInfo.isCreteRules()) {
+
+ final Box creteBox = Box.createVerticalBox();
+ creteBox.setBorder(BorderFactory.createEtchedBorder());
+
+ creteBox.add(new JLabel(" "));
+ creteBox.add(new JLabel("Crete"));
+ creteBox.add(new JLabel(" "));
+
+ creteDiv2nz = new BooleanOption("Used-2nz", "2nd NZ division card used in scenario");
+ creteBox.add(creteDiv2nz.getControls());
+
+ creteDivcrefor = new BooleanOption("Used-crefor", "CREFOR division card used in scenario");
+ creteBox.add(creteDivcrefor.getControls());
+
+ creteDiv14th = new BooleanOption("Used-14th", "14th Brigade division card used in scenario");
+ creteBox.add(creteDiv14th.getControls());
+
+ creteDiv19th = new BooleanOption("Used-19th", "19th Brigade division card used in scenario");
+ creteBox.add(creteDiv19th.getControls());
+
+ creteDiv5geb = new BooleanOption("Used-5geb", "5th Gebirgs division card used in scenario");
+ creteBox.add(creteDiv5geb.getControls());
+
+ creteDiv7fl = new BooleanOption("Used-7fl", "7th Flieger division card used in scenario");
+ creteBox.add(creteDiv7fl.getControls());
+
+ creteDivfjr1 = new BooleanOption("Used-fjr1", "FJR 1 Regiment division card used in scenario");
+ creteBox.add(creteDivfjr1.getControls());
+
+ creteDivfjr2 = new BooleanOption("Used-fjr2", "FJR 2 Regiment division card used in scenario");
+ creteBox.add(creteDivfjr2.getControls());
+
+ creteBox.add(new JLabel(" "));
+
+ optionBox.add(creteBox);
+ optionBox.add(new JLabel(" "));
+
+ }
- attach_82ABArt_Gds = new AttachOption("Attach-82ABArt",
- "82AB Artillery are attached to division ", new String[] {
- TdcProperties.DIVISION_82AB, TdcProperties.DIVISION_GDS },
- "82AB-v-Gds");
- tdcBox.add(attach_82ABArt_Gds.getControls());
-
- attach_FrInd_Hoh = new AttachOption("Attach-FrInd",
- "Frundsberg Independents are attached to division ", new String[] {
- TdcProperties.DIVISION_FR, TdcProperties.DIVISION_HOH },
- "Fr-v-Hoh");
- tdcBox.add(attach_FrInd_Hoh.getControls());
-
- attach_Bruhn_Hoh = new AttachOption("Attach-Bruhn",
- "KG Bruhn are attached to division ", new String[] {
- TdcProperties.DIVISION_VT, TdcProperties.DIVISION_HOH },
- "VT-v-Hoh");
- tdcBox.add(attach_Bruhn_Hoh.getControls());
- tdcBox.add(new JLabel(" "));
-
- optionBox.add(tdcBox);
- optionBox.add(new JLabel(" "));
-
- final Box germanReconfigBox = Box.createVerticalBox();
- germanReconfigBox.setBorder(BorderFactory.createEtchedBorder());
-
- attach_Harder_Spindler = new AttachOption("Attach-Harder-Spindler",
- "KG Harder are attached to Formation ", new String[] {
- TdcProperties.FORMATION_HARDER, TdcProperties.FORMATION_SPINDLER },
- "S4.5.2-Harder");
-
- attach_Krafft_Spindler = new AttachOption("Attach-Krafft-Spindler",
- "KG Krafft are attached to Formation ", new String[] {
- TdcProperties.FORMATION_KRAFFT, TdcProperties.FORMATION_SPINDLER },
- "S4.5.2-Krafft");
-
- attach_vonAllwoerden_Spindler = new AttachOption("Attach-vonAllwoerden-Spindler",
- "KG von Allwoerden are attached to Formation ", new String[] {
- TdcProperties.FORMATION_VONALLWOERDEN, TdcProperties.FORMATION_SPINDLER },
- "S4.5.2-vonAllwoerden");
-
- attach_Henke_Frundsberg = new AttachOption("Attach-Henke-Frundsberg",
- "KG Henke are attached to Formation ", new String[] {
- TdcProperties.FORMATION_HENKE, TdcProperties.FORMATION_FRUNDSBERG },
- "S4.5.3-Henke");
-
- attach_Knaust_Frundsberg = new AttachOption("Attach-Knaust-Frundsberg",
- "KG Knaust are attached to Formation ", new String[] {
- TdcProperties.FORMATION_KNAUST, TdcProperties.FORMATION_FRUNDSBERG },
- "S4.5.3-Knaust");
-
- attach_Reinhold_Frundsberg = new AttachOption("Attach-Reinhold-Frundsberg",
- "KG Reinhold are attached to Formation ", new String[] {
- TdcProperties.FORMATION_REINHOLD, TdcProperties.FORMATION_FRUNDSBERG },
- "S4.5.3-Reinhold");
-
- attach_Euling_Frundsberg = new AttachOption("Attach-Euling-Frundsberg",
- "KG Euling are attached to Formation ", new String[] {
- TdcProperties.FORMATION_EULING, TdcProperties.FORMATION_FRUNDSBERG },
- "S4.5.3-Euling");
-
- chill_reorg = new ChillBooleanOption("Eindhoven-Chill", "Eindhoven R.C. has reorganised to KG Chill");
-
- germanReconfigBox.add(new JLabel(" "));
- germanReconfigBox.add(new JLabel("Where Eagles Dare"));
- germanReconfigBox.add(new JLabel(" "));
-
- germanReconfigBox.add(attach_Harder_Spindler.getControls());
- germanReconfigBox.add(attach_Krafft_Spindler.getControls());
- germanReconfigBox.add(attach_vonAllwoerden_Spindler.getControls());
- germanReconfigBox.add(new JLabel(" "));
-
- germanReconfigBox.add(attach_Henke_Frundsberg.getControls());
- germanReconfigBox.add(attach_Knaust_Frundsberg.getControls());
- germanReconfigBox.add(attach_Reinhold_Frundsberg.getControls());
- germanReconfigBox.add(attach_Euling_Frundsberg.getControls());
- germanReconfigBox.add(new JLabel(" "));
+ if (UnitInfo.isTgdRules()) {
- germanReconfigBox.add(chill_reorg.getControls());
- germanReconfigBox.add(new JLabel(" "));
-
- optionBox.add(germanReconfigBox);
-
+ final Box ddBox = Box.createVerticalBox();
+ ddBox.setBorder(BorderFactory.createEtchedBorder());
+ ddBox.add(new JLabel(" "));
+ ddBox.add(new JLabel("The Greatest Day"));
+ ddBox.add(new JLabel(" "));
+ telephoneCommand736 = new BooleanOption("736TelCom", "736 Rgt Command depends only on Phone Lines?");
+ ddBox.add(telephoneCommand736.getControls());
+ ddBox.add(new JLabel(" "));
+
+ attach_22arm = new AttachOption("Attach-22Arm", "22 Arm Brigade are attached to division ", new String[] { TdcProperties.DIVISION_7TH, TdcProperties.DIVISION_50TH }, "7th-v-50th");
+ ddBox.add(attach_22arm.getControls());
+
+ optionBox.add(ddBox);
+
+ add10toSwordNavalRange = new BooleanOption(TdcProperties.ADD_10_TO_SWORD_NAVAL_RANGE, "+10 hexes to naval Range?");
+ ddBox.add(add10toSwordNavalRange.getControls());
+ ddBox.add(new JLabel(" "));
+ optionBox.add(ddBox);
+
+ }
+
+ if (UnitInfo.isTdcRules()) {
+ final Box tdcBox = Box.createVerticalBox();
+ tdcBox.setBorder(BorderFactory.createEtchedBorder());
+ tdcBox.add(new JLabel(" "));
+ tdcBox.add(new JLabel("The Devils Cauldron"));
+ tdcBox.add(new JLabel(" "));
+
+ aic505 = new BooleanOption("AIC-505 PIR", "505 PIR is always in command");
+ tdcBox.add(aic505.getControls());
+
+ commandBreakdown = new BooleanOption("Command-Breakdown", "Command Breakdown has occured (Scenario AD#1)");
+ tdcBox.add(commandBreakdown.getControls());
+
+ attach_CG_82AB = new AttachOption("Attach-CG", "Coldstream Guards are attached to division ", new String[] { TdcProperties.DIVISION_GDS, TdcProperties.DIVISION_82AB }, "Gds-v-82AB");
+ tdcBox.add(attach_CG_82AB.getControls());
+
+ attach_GdsInd_43rd = new AttachOption("Attach-GdsInd", "Guards Independent are attached to division ", new String[] { TdcProperties.DIVISION_GDS, TdcProperties.DIVISION_43RD }, "Gds-v-43rd");
+ tdcBox.add(attach_GdsInd_43rd.getControls());
+
+ attach_82ABArt_Gds = new AttachOption("Attach-82ABArt", "82AB Artillery are attached to division ", new String[] { TdcProperties.DIVISION_82AB, TdcProperties.DIVISION_GDS }, "82AB-v-Gds");
+ tdcBox.add(attach_82ABArt_Gds.getControls());
+
+ attach_FrInd_Hoh = new AttachOption("Attach-FrInd", "Frundsberg Independents are attached to division ", new String[] { TdcProperties.DIVISION_FR, TdcProperties.DIVISION_HOH }, "Fr-v-Hoh");
+ tdcBox.add(attach_FrInd_Hoh.getControls());
+
+ attach_Bruhn_Hoh = new AttachOption("Attach-Bruhn", "KG Bruhn are attached to division ", new String[] { TdcProperties.DIVISION_VT, TdcProperties.DIVISION_HOH }, "VT-v-Hoh");
+ tdcBox.add(attach_Bruhn_Hoh.getControls());
+ tdcBox.add(new JLabel(" "));
+
+ optionBox.add(tdcBox);
+ optionBox.add(new JLabel(" "));
+
+ final Box germanReconfigBox = Box.createVerticalBox();
+ germanReconfigBox.setBorder(BorderFactory.createEtchedBorder());
+
+ attach_Harder_Spindler = new AttachOption("Attach-Harder-Spindler", "KG Harder are attached to Formation ", new String[] { TdcProperties.FORMATION_HARDER, TdcProperties.FORMATION_SPINDLER }, "S4.5.2-Harder");
+
+ attach_Krafft_Spindler = new AttachOption("Attach-Krafft-Spindler", "KG Krafft are attached to Formation ", new String[] { TdcProperties.FORMATION_KRAFFT, TdcProperties.FORMATION_SPINDLER }, "S4.5.2-Krafft");
+
+ attach_vonAllwoerden_Spindler = new AttachOption("Attach-vonAllwoerden-Spindler", "KG von Allwoerden are attached to Formation ", new String[] { TdcProperties.FORMATION_VONALLWOERDEN, TdcProperties.FORMATION_SPINDLER },
+ "S4.5.2-vonAllwoerden");
+
+ attach_Henke_Frundsberg = new AttachOption("Attach-Henke-Frundsberg", "KG Henke are attached to Formation ", new String[] { TdcProperties.FORMATION_HENKE, TdcProperties.FORMATION_FRUNDSBERG }, "S4.5.3-Henke");
+
+ attach_Knaust_Frundsberg = new AttachOption("Attach-Knaust-Frundsberg", "KG Knaust are attached to Formation ", new String[] { TdcProperties.FORMATION_KNAUST, TdcProperties.FORMATION_FRUNDSBERG }, "S4.5.3-Knaust");
+
+ attach_Reinhold_Frundsberg = new AttachOption("Attach-Reinhold-Frundsberg", "KG Reinhold are attached to Formation ", new String[] { TdcProperties.FORMATION_REINHOLD, TdcProperties.FORMATION_FRUNDSBERG }, "S4.5.3-Reinhold");
+
+ attach_Euling_Frundsberg = new AttachOption("Attach-Euling-Frundsberg", "KG Euling are attached to Formation ", new String[] { TdcProperties.FORMATION_EULING, TdcProperties.FORMATION_FRUNDSBERG }, "S4.5.3-Euling");
+
+ chill_reorg = new ChillBooleanOption("Eindhoven-Chill", "Eindhoven R.C. has reorganised to KG Chill");
+
+ germanReconfigBox.add(new JLabel(" "));
+ germanReconfigBox.add(new JLabel("Where Eagles Dare"));
+ germanReconfigBox.add(new JLabel(" "));
+
+ germanReconfigBox.add(attach_Harder_Spindler.getControls());
+ germanReconfigBox.add(attach_Krafft_Spindler.getControls());
+ germanReconfigBox.add(attach_vonAllwoerden_Spindler.getControls());
+ germanReconfigBox.add(new JLabel(" "));
+
+ germanReconfigBox.add(attach_Henke_Frundsberg.getControls());
+ germanReconfigBox.add(attach_Knaust_Frundsberg.getControls());
+ germanReconfigBox.add(attach_Reinhold_Frundsberg.getControls());
+ germanReconfigBox.add(attach_Euling_Frundsberg.getControls());
+ germanReconfigBox.add(new JLabel(" "));
+
+ germanReconfigBox.add(chill_reorg.getControls());
+ germanReconfigBox.add(new JLabel(" "));
+
+ optionBox.add(germanReconfigBox);
+
+ }
+
panel.add(optionBox);
-
+
}
return panel;
@@ -272,8 +293,7 @@
public BasicOption(String propertyName, String prompt) {
globalPropertyName = propertyName;
this.prompt = prompt;
- globalProperty = GameModule.getGameModule().getMutableProperty(
- globalPropertyName);
+ globalProperty = GameModule.getGameModule().getMutableProperty(globalPropertyName);
}
protected abstract Configurer createConfigurer();
@@ -318,8 +338,7 @@
}
protected Configurer createConfigurer() {
- return new BooleanConfigurer("", prompt, "true".equals(globalProperty
- .getPropertyValue()));
+ return new BooleanConfigurer("", prompt, "true".equals(globalProperty.getPropertyValue()));
}
protected PropertyChangeListener createGlobalListener() {
@@ -333,18 +352,17 @@
}
}
-
+
public static class ChillBooleanOption extends BooleanOption {
public ChillBooleanOption(String propertyName, String prompt) {
super(propertyName, prompt);
}
-
+
protected Configurer createConfigurer() {
- return new BooleanConfigurer("", prompt, "2".equals(globalProperty
- .getPropertyValue()));
+ return new BooleanConfigurer("", prompt, "2".equals(globalProperty.getPropertyValue()));
}
-
+
protected PropertyChangeListener createGlobalListener() {
return new PropertyChangeListener() {
public void propertyChange(PropertyChangeEvent evt) {
@@ -355,7 +373,7 @@
}
};
}
-
+
protected PropertyChangeListener createLocalListener() {
return new PropertyChangeListener() {
public void propertyChange(PropertyChangeEvent evt) {
@@ -364,9 +382,9 @@
}
};
}
-
+
}
-
+
/**
* A list of values option
*/
@@ -403,14 +421,13 @@
* can be attached to different Divisions. Whenever the option
* is changed, all units whose 'Attach' property match the supplied
* value must be notified to change the Division held as a Dynamic Property.
- *
+ *
*/
public static class AttachOption extends StringEnumOption {
protected String attachMarkerValue;
- public AttachOption(String propertyName, String prompt, String[] options,
- String markerValue) {
+ public AttachOption(String propertyName, String prompt, String[] options, String markerValue) {
this(propertyName, prompt, options);
this.attachMarkerValue = markerValue;
}
@@ -441,7 +458,8 @@
KeyStroke stroke;
if (index == 0) {
stroke = KeyStroke.getKeyStroke('1', InputEvent.ALT_MASK);
- } else {
+ }
+ else {
stroke = KeyStroke.getKeyStroke('2', InputEvent.ALT_MASK);
}
@@ -449,9 +467,11 @@
public String getComponentName() {
return "TdcScenarioOptions";
}
+
public String getComponentTypeName() {
return "TdcScenarioOptions";
- }});
+ }
+ });
gc.setKeyStroke(stroke);
PieceFilter filter = new AttachFilter(attachMarkerValue);
for (Iterator<Map> i = Map.getAllMaps(); i.hasNext(); gc.apply(i.next(), filter)) {
@@ -479,5 +499,4 @@
}
-
}
\ No newline at end of file
Modified: VSQL-src/trunk/tdc/TdcWizard.java
===================================================================
--- VSQL-src/trunk/tdc/TdcWizard.java 2017-01-21 23:51:39 UTC (rev 9251)
+++ VSQL-src/trunk/tdc/TdcWizard.java 2017-06-29 06:38:19 UTC (rev 9252)
@@ -117,12 +117,14 @@
units.clear();
targets.clear();
- if (TdcProperties.CLASS_AIRPOWER.equals(piece.getProperty(TdcProperties.CLASS))) {
+ // Air and Partisan attacks are special attacks on the same stack as the source, not LOS thread.
+ if (TdcProperties.CLASS_AIRPOWER.equals(piece.getProperty(TdcProperties.CLASS)) || TdcProperties.CLASS_PARTISAN.equals(piece.getProperty(TdcProperties.CLASS)) ) {
isAirPower = true;
attackCommand = new KeyCommand(ATTACK_COMMAND, attackKey, Decorator.getOutermost(this));
attackCommand.setEnabled(getMap() != null && getMap() instanceof TdcMap);
keyCommands.add(attackCommand);
}
+ // Attacks using an Artillery Park or Naval Target marker mus build a list of units in their matching Artillery Park/Naval Box
else if (TdcProperties.TYPE_ARTILLERY_PARK.equals(piece.getProperty(TdcProperties.TYPE))) {
if (TdcProperties.DIVISION_NAVAL.equals(piece.getProperty(TdcProperties.DIVISION))) {
buildAssaultForceCommands();
@@ -131,6 +133,7 @@
buildArtilleryParkCommands();
}
}
+ // Standard Attack
else {
attackCommand = new KeyCommand(ATTACK_COMMAND, attackKey, Decorator.getOutermost(this));
attackCommand.setEnabled(getMap() != null && getMap() instanceof TdcMap);
Modified: VSQL-src/trunk/tdc/UnitInfo.java
===================================================================
--- VSQL-src/trunk/tdc/UnitInfo.java 2017-01-21 23:51:39 UTC (rev 9251)
+++ VSQL-src/trunk/tdc/UnitInfo.java 2017-06-29 06:38:19 UTC (rev 9252)
@@ -1,7 +1,7 @@
/*
* $Id: UnitInfo 7690 2011-07-07 23:44:55Z swampwallaby $
*
- * Copyright (c) 2012-2014 by Brent Easton
+ * Copyright (c) 2012-2017 by Brent Easton
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -125,7 +125,9 @@
protected String beachAttackClass;
protected boolean isAirPower;
+ protected boolean isPartisanAttack;
protected boolean ignoreNegativeCombatModifiers;
+ protected boolean ignoreAllCombatModifiers;
protected boolean hasAirDefence;
protected int maxLOS = 99;
@@ -132,7 +134,6 @@
protected String maxLOSReason = "";
protected boolean hill = false;
protected boolean op = false;
-
public static String getRuleSet() {
if (ruleset == null) {
ruleset = (String) GameModule.getGameModule().getProperty(TdcProperties.RULESET);
@@ -147,17 +148,25 @@
}
public static boolean isGTS2Rules() {
- return isTgdRules() || isTinianRules();
+ return isTgdRules() || isTinianRules() || isCreteRules();
}
-
+
public static boolean isTgdRules() {
return TdcProperties.RULES_TGD.equals(getRuleSet()) || TdcProperties.RULES_DDAY.equals(getRuleSet());
}
-
+
+ public static boolean isTdcRules() {
+ return TdcProperties.RULES_TDC.equals(getRuleSet()) || TdcProperties.RULES_WED.equals(getRuleSet());
+ }
+
public static boolean isTinianRules() {
return TdcProperties.RULES_TINIAN.equals(getRuleSet());
}
+ public static boolean isCreteRules() {
+ return TdcProperties.RULES_CRETE.equals(getRuleSet());
+ }
+
public static int getArtilleryDirectRange() {
return isNqosRules() ? 5 : 4;
}
@@ -242,8 +251,7 @@
}
public boolean isFireWoodsReduced() {
- return TdcRatings.GREEN.equals(getFireColor()) || TdcRatings.ORANGE.equals(getFireColor()) || TdcRatings.YELLOW.equals(getFireColor())
- || TdcRatings.BROWN.equals(getFireColor()) || TdcRatings.BLACK.equals(getFireColor());
+ return TdcRatings.GREEN.equals(getFireColor()) || TdcRatings.ORANGE.equals(getFireColor()) || TdcRatings.YELLOW.equals(getFireColor()) || TdcRatings.BROWN.equals(getFireColor()) || TdcRatings.BLACK.equals(getFireColor());
}
public boolean isFireMarshReduced() {
@@ -355,6 +363,10 @@
return isAirPower;
}
+ public boolean isPartisanAttack() {
+ return isPartisanAttack;
+ }
+
public boolean hasAirDefence() {
return hasAirDefence;
}
@@ -363,6 +375,10 @@
return ignoreNegativeCombatModifiers;
}
+ public boolean isIgnoreAllCombatModifiers() {
+ return ignoreAllCombatModifiers;
+ }
+
public boolean isNoHighlighting() {
return isAirPower();
}
@@ -372,10 +388,9 @@
}
public boolean isIndirectFire() {
- return isNaval() ||
- (isTinianRules() && isArtillery() && "Saipan".equals(unit.getProperty(BasicPiece.CURRENT_ZONE)));
+ return isNaval() || (isTinianRules() && isArtillery() && "Saipan".equals(unit.getProperty(BasicPiece.CURRENT_ZONE)));
}
-
+
public int getNavalRange() {
int r = 0;
if (isIndirectFire()) {
@@ -434,7 +449,7 @@
}
public boolean isOp() {
- return op;
+ return op && ! rubbled;
}
public int getMaxLOS() {
@@ -530,17 +545,17 @@
terrainInfo.put(TdcProperties.TERRAIN_BOCAGE, new TerrainInfo(TdcProperties.TERRAIN_HEDGEROW, -2));
terrainInfo.put(TdcProperties.TERRAIN_HILL, new TerrainInfo(TdcProperties.TERRAIN_HILL, -2));
terrainInfo.put(TdcProperties.TERRAIN_VILLAGE, new TerrainInfo(TdcProperties.TERRAIN_VILLAGE, -1));
-
+
if (isTinianRules()) {
terrainInfo.put(TdcProperties.TERRAIN_BEACH, new TerrainInfo(TdcProperties.TERRAIN_BEACH, 0));
terrainInfo.put(TdcProperties.TERRAIN_MARSH, new TerrainInfo(TdcProperties.TERRAIN_MARSH, -2));
terrainInfo.put(TdcProperties.TERRAIN_TOWN, new TerrainInfo(TdcProperties.TERRAIN_TOWN, -2));
- terrainInfo.put(TdcProperties.TERRAIN_BUILDINGS, new TerrainInfo(TdcProperties.TERRAIN_BUILDINGS, -2));
+ terrainInfo.put(TdcProperties.TERRAIN_BUILDINGS, new TerrainInfo(TdcProperties.TERRAIN_BUILDINGS, -2));
terrainInfo.put(TdcProperties.TERRAIN_RUNWAY, new TerrainInfo(TdcProperties.TERRAIN_RUNWAY, 1));
terrainInfo.put(TdcProperties.TERRAIN_BRUSH, new TerrainInfo(TdcProperties.TERRAIN_BRUSH, -1));
terrainInfo.put(TdcProperties.TERRAIN_SUGAR_CANE, new TerrainInfo(TdcProperties.TERRAIN_SUGAR_CANE, -1));
terrainInfo.put(TdcProperties.TERRAIN_ROCKY, new TerrainInfo(TdcProperties.TERRAIN_ROCKY, -2));
- terrainInfo.put(TdcProperties.TERRAIN_CAVE, new TerrainInfo(TdcProperties.TERRAIN_CAVE, -3));
+ terrainInfo.put(TdcProperties.TERRAIN_CAVE, new TerrainInfo(TdcProperties.TERRAIN_CAVE, -3));
}
else {
terrainInfo.put(TdcProperties.TERRAIN_BEACH, new TerrainInfo(TdcProperties.TERRAIN_BEACH, 1));
@@ -562,18 +577,18 @@
terrainInfoArmoured.put(TdcProperties.TERRAIN_DESERT, new TerrainInfo(TdcProperties.TERRAIN_DESERT, 0));
terrainInfoArmoured.put(TdcProperties.TERRAIN_BOCAGE, new TerrainInfo(TdcProperties.TERRAIN_BOCAGE, -1));
terrainInfoArmoured.put(TdcProperties.TERRAIN_HEDGEROW, new TerrainInfo(TdcProperties.TERRAIN_HEDGEROW, -1));
- terrainInfoArmoured.put(TdcProperties.TERRAIN_HILL, new TerrainInfo(TdcProperties.TERRAIN_HILL, -1));
+ terrainInfoArmoured.put(TdcProperties.TERRAIN_HILL, new TerrainInfo(TdcProperties.TERRAIN_HILL, -1));
terrainInfoArmoured.put(TdcProperties.TERRAIN_VILLAGE, new TerrainInfo(TdcProperties.TERRAIN_VILLAGE, 0));
-
+
if (isTinianRules()) {
terrainInfo.put(TdcProperties.TERRAIN_BEACH, new TerrainInfo(TdcProperties.TERRAIN_BEACH, 0));
terrainInfo.put(TdcProperties.TERRAIN_MARSH, new TerrainInfo(TdcProperties.TERRAIN_MARSH, -2));
terrainInfo.put(TdcProperties.TERRAIN_TOWN, new TerrainInfo(TdcProperties.TERRAIN_TOWN, -2));
- terrainInfo.put(TdcProperties.TERRAIN_BUILDINGS, new TerrainInfo(TdcProperties.TERRAIN_BUILDINGS, -2));
+ terrainInfo.put(TdcProperties.TERRAIN_BUILDINGS, new TerrainInfo(TdcProperties.TERRAIN_BUILDINGS, -2));
terrainInfo.put(TdcProperties.TERRAIN_RUNWAY, new TerrainInfo(TdcProperties.TERRAIN_RUNWAY, 1));
terrainInfo.put(TdcProperties.TERRAIN_BRUSH, new TerrainInfo(TdcProperties.TERRAIN_BRUSH, -1));
terrainInfo.put(TdcProperties.TERRAIN_SUGAR_CANE, new TerrainInfo(TdcProperties.TERRAIN_SUGAR_CANE, -1));
- terrainInfo.put(TdcProperties.TERRAIN_ROCKY, new TerrainInfo(TdcProperties.TERRAIN_ROCKY, -2));
+ terrainInfo.put(TdcProperties.TERRAIN_ROCKY, new TerrainInfo(TdcProperties.TERRAIN_ROCKY, -2));
terrainInfo.put(TdcProperties.TERRAIN_CAVE, new TerrainInfo(TdcProperties.TERRAIN_CAVE, 0));
}
else {
@@ -764,7 +779,9 @@
}
isAirPower = TdcProperties.CLASS_AIRPOWER.equals(unit.getProperty(TdcProperties.CLASS));
+ isPartisanAttack = TdcProperties.CLASS_PARTISAN.equals(unit.getProperty(TdcProperties.CLASS));
ignoreNegativeCombatModifiers = "true".equals(unit.getProperty(TdcProperties.COMBAT_NO_NEG));
+ ignoreAllCombatModifiers = "true".equals(unit.getProperty(TdcProperties.COMBAT_NO_MOD));
final String flakRating = baseRatings.get(TdcRatings.FLAK_RATING);
hasAirDefence = flakRating != null && flakRating.length() > 0 && !flakRating.equals("No");
}
@@ -856,7 +873,7 @@
}
final String hill = (String) TdcMap.getTerrainProperty(unit, TdcProperties.HILL);
- if ("true".equals(hill) & ! column) {
+ if ("true".equals(hill) & !column) {
final int modifier = isArmoured() ? -2 : -1;
adjustSpecialDefence("Hill", modifier);
addDefenceModifier("Hill", modifier, true, false, true);
@@ -966,7 +983,7 @@
if (TdcProperties.TIME_NIGHT.equals(time)) {
weatherAdjusted = true;
- final int nightRange = (isNqosRules() || isTgdRules()) ? 3 : 2;
+ final int nightRange = (isNqosRules() || isTgdRules() || isCreteRules()) ? 3 : 2;
adjustSpecialFire("Night", -2);
addAttackModifier("Night", -2);
adjustSpecialAssault("Night", -2);
@@ -1056,10 +1073,14 @@
// Check for Rubble Counter in City or Fortified hex
if (!rubbled) {
if (TdcProperties.TYPE_RUBBLE.equals(type)) {
+ final String rubbleLevel = (String) piece.getProperty("Rubble_Level");
+
if (TdcProperties.TERRAIN_CITY.equals(terrain) || TdcProperties.TERRAIN_FORTIFIED.equals(terrain)) {
- adjustSpecialDefence("Rubble", -1);
- addDefenceModifier("Rubble", -1);
rubbled = true;
+ if ("1".equals(rubbleLevel)) {
+ adjustSpecialDefence("Rubble", -1);
+ addDefenceModifier("Rubble", -1);
+ }
}
}
}
@@ -1187,6 +1208,17 @@
}
}
+ // Air Landing Delay
+ else if (TdcProperties.TYPE_DELAY_A.equals(type)) {
+ adjustFireRating("Air Landing Delay", -2);
+ addAttackModifier("Air Landing Delay", -2);
+ adjustAssaultRating("Air Landing Delay", -2);
+ adjustDefenceRating("Air Landing Delay", 2);
+ addDefenceModifier("Air Landing Delay", 2, unit);
+ adjustTqrRating("Air Landing Delay", -1);
+ setMoveRating("Air Landing Delay", "No");
+ }
+
// IP/Entrenchement CCounter
else if (TdcProperties.TYPE_IP.equals(type)) {
if (!entrench && !ip) {
@@ -1271,7 +1303,7 @@
adjustDefenceRating("Hero", -2);
addDefenceModifier("Hero", -2, unit);
}
-
+
// Cave (Tinian)
else if (TdcProperties.TYPE_CAVE.equals(type)) {
adjustDefenceRating("In Cave", -3);
@@ -1426,6 +1458,44 @@
if (tqAdjust != 0) {
adjustSpecialTqr("Divisional TQR Adjustment", tqAdjust);
}
+
+ /* --- CRETE Supply Levels -- */
+ final Map map = unit.getMap();
+ if (map == null) {
+ return;
+ }
+
+ // Work out which 'set' of maps, based on board name
+ final String boardName = (String) unit.getProperty(BasicPiece.CURRENT_BOARD);
+ if (boardName == null) {
+ return;
+ }
+
+ if (TdcProperties.SUBCLASS_GREEK.equals(unitSubClass)) {
+ return;
+ }
+
+ String supplyVar = null;
+ if (boardName.startsWith(TdcProperties.BOARD_KASTELLI) || boardName.startsWith(TdcProperties.BOARD_MALEME) || boardName.startsWith(TdcProperties.BOARD_CANEA_SUDA) || boardName.startsWith(TdcProperties.BOARD_GEORGEOPOLIS)) {
+ supplyVar = TdcProperties.SUPPLY_MALEME_SUDA;
+ }
+ else if (boardName.startsWith(TdcProperties.BOARD_RETHYMON)) {
+ supplyVar = TdcProperties.SUPPLY_RETHYMON;
+ }
+ else if (boardName.startsWith(TdcProperties.BOARD_HERAKLION)) {
+ supplyVar = TdcProperties.SUPPLY_HERAKLION;
+ }
+
+ supplyVar = "Supply-" + army + "-" + supplyVar;
+ String supplyLevel = (String) GameModule.getGameModule().getProperty(supplyVar);
+
+ if (TdcProperties.SUPPLY_DIMINISHED.equals(supplyLevel)) {
+ adjustSpecialTqr("Diminished Supply", -1);
+ }
+ else if (TdcProperties.SUPPLY_EMERGENCY.equals(supplyLevel)) {
+ adjustSpecialTqr("Emergency Supply", -2);
+ adjustSpecialFire("Emergency Supply", -1);
+ }
}
protected boolean isSouthOfRhine(GamePiece p) {
@@ -1447,8 +1517,7 @@
return !"north".equals(southInd);
}
- if (board.startsWith("All American") || board.startsWith("Groesbeek") || board.startsWith("Grave") || board.startsWith("The Island")
- || board.equals("Cuijk")) {
+ if (board.startsWith("All American") || board.startsWith("Groesbeek") || board.startsWith("Grave") || board.startsWith("The Island") || board.equals("Cuijk")) {
return true;
}
Modified: VSQL-src/trunk/tdc/attack/AttackModel.java
===================================================================
--- VSQL-src/trunk/tdc/attack/AttackModel.java 2017-01-21 23:51:39 UTC (rev 9251)
+++ VSQL-src/trunk/tdc/attack/AttackModel.java 2017-06-29 06:38:19 UTC (rev 9252)
@@ -45,6 +45,7 @@
public static final String COUNTER_BATTERY_FIRE = "Counter-Battery Fire";
public static final String AIR_DEFENCE = "Air Defence";
public static final String AIR_STRIKE = "Air Strike";
+ public static final String PARTISAN_ATTACK = "Partisan Attack";
protected GamePiece source;
protected UnitInfo sourceInfo;
@@ -196,10 +197,19 @@
return sourceInfo.isIgnoreNegativeCombatModifiers();
}
+ public boolean isIgnoreAllModifiers() {
+ return sourceInfo.isIgnoreAllCombatModifiers();
+ }
+
public boolean isAirPower() {
return sourceInfo.isAirPower();
}
+ public boolean isPartisanAttack() {
+ return sourceInfo.isPartisanAttack();
+ }
+
+
public static int[] xOffsets = new int[] {0, 100, 100, 0, -100, -100};
public static int[] yOffsets = new int[] {-100, -50, 50, 100, -50, 50};
@@ -325,6 +335,9 @@
else if (sourceInfo.isAirPower()) {
return AIR_STRIKE;
}
+ else if (sourceInfo.isPartisanAttack()) {
+ return PARTISAN_ATTACK;
+ }
else {
return MODES[mode] + " Fire";
}
@@ -341,7 +354,7 @@
modeEnabled[i] = true;
}
- if (isSpecialAttack() || isAirPower() || isAirDefence()) {
+ if (isSpecialAttack() || isAirPower() || isAirDefence() || isPartisanAttack()) {
mode = MODE_DIRECT;
modeEnabled[MODE_INDIRECT] = false;
modeEnabled[MODE_OPPORTUNITY] = false;
@@ -530,6 +543,9 @@
if (isIgnoreNegativeModifiers()) {
text.add("Ignoring negative defence modifiers");
}
+ if (isIgnoreAllModifiers()) {
+ text.add("Ignoring all modifiers");
+ }
}
else {
if (specialAttackType == AttackWizard.BEACH_SPECIAL_ATTACK) {
@@ -760,13 +776,13 @@
}
protected void addAttackModifier(FireModifier modifier) {
- if (!isIgnoreNegativeModifiers() || modifier.getValue() >= 0) {
+ if (! isIgnoreAllModifiers() && (!isIgnoreNegativeModifiers() || modifier.getValue() >= 0)) {
attackModifiers.add(modifier);
}
}
protected void addDefenceModifier(FireModifier modifier) {
- if (!isIgnoreNegativeModifiers() || modifier.getValue() >= 0) {
+ if (! isIgnoreAllModifiers() && (!isIgnoreNegativeModifiers() || modifier.getValue() >= 0)) {
defenceModifiers.add(modifier);
}
}
Modified: VSQL-src/trunk/tdc/attack/AttackView.java
===================================================================
--- VSQL-src/trunk/tdc/attack/AttackView.java 2017-01-21 23:51:39 UTC (rev 9251)
+++ VSQL-src/trunk/tdc/attack/AttackView.java 2017-06-29 06:38:19 UTC (rev 9252)
@@ -120,7 +120,7 @@
if (rating != null) {
rating.refresh();
}
- specialAttack.setVisible(myModel.isCounterBatteryFire() || myModel.isAirPower());
+ specialAttack.setVisible(myModel.isCounterBatteryFire() || myModel.isAirPower() || myModel.isPartisanAttack());
}
protected void pack() {
@@ -156,6 +156,9 @@
else if (myModel.isAirDefence()) {
heading = new JLabel("Air Defence");
}
+ else if (myModel.isPartisanAttack()) {
+ heading = new JLabel("Partisan Attack");
+ }
else if (myModel.specialAttackType > AttackWizard.NO_SPECIAL_ATTACK) {
heading = new JLabel(AttackWizard.SPECIAL_ATTACKS[myModel.specialAttackType]);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
vassalengine-svn mailing list
vas...@li...
https://lists.sourceforge.net/lists/listinfo/vassalengine-svn
|
|
From: SourceForge.net <no...@sl...> - 2017-06-09 21:29:13
|
Hi,
Thanks for being a SourceForge user. Our records indicate that you are subscribed to the following project mailing list:
vassalengine-svn
We are contacting you to confirm you are still interested in receiving emails from this SourceForge project list. If you do not confirm your subscription by June 29th, you will be unsubscribed from the above mailing list.
Please click here to confirm your subscription:
https://sourceforge.net/mailman/reconfirm?confirm=13cb5935-13a8-4caa-8eb6-c7a30d672fa6&email=vassalengine-svn-trunk%40lists.sourceforge.net
Thanks,
The SourceForge Team
A Slashdot Media Company
|
|
From: <uck...@us...> - 2017-01-21 23:51:43
|
Revision: 9251
http://sourceforge.net/p/vassalengine/svn/9251
Author: uckelman
Date: 2017-01-21 23:51:39 +0000 (Sat, 21 Jan 2017)
Log Message:
-----------
Updated for 3.2.18.
Modified Paths:
--------------
VASSAL-src/trunk/Makefile
Modified: VASSAL-src/trunk/Makefile
===================================================================
--- VASSAL-src/trunk/Makefile 2017-01-21 23:50:55 UTC (rev 9250)
+++ VASSAL-src/trunk/Makefile 2017-01-21 23:51:39 UTC (rev 9251)
@@ -46,11 +46,11 @@
DOCDIR:=doc
DISTDIR:=dist
-VNUM:=3.2.17
+VNUM:=3.2.18
#SVNVERSION:=$(shell svnversion | perl -pe 's/(\d+:)?(\d+[MS]?)/$$2/; s/(\d+)M/$$1+1/e')
SVNVERSION:=$(shell git svn log -1 --oneline | grep -oP '^r\K\d+')
-#VERSION:=$(VNUM)-svn$(SVNVERSION)
-VERSION:=$(VNUM)
+VERSION:=$(VNUM)-svn$(SVNVERSION)
+#VERSION:=$(VNUM)
#CLASSPATH:=$(CLASSDIR):$(LIBDIR)/*
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
vassalengine-svn mailing list
vas...@li...
https://lists.sourceforge.net/lists/listinfo/vassalengine-svn
|
|
From: <uck...@us...> - 2017-01-21 23:51:00
|
Revision: 9250
http://sourceforge.net/p/vassalengine/svn/9250
Author: uckelman
Date: 2017-01-21 23:50:55 +0000 (Sat, 21 Jan 2017)
Log Message:
-----------
Merged Brent-3.2-Work@9249.
Bug 12538: Decks report multiple shuffles after loading saved game
Modified Paths:
--------------
VASSAL-src/trunk/src/VASSAL/build/GameModule.java
VASSAL-src/trunk/src/VASSAL/build/module/map/DrawPile.java
VASSAL-src/trunk/src/VASSAL/counters/Deck.java
VASSAL-src/trunk/src/VASSAL/tools/KeyStrokeListener.java
Modified: VASSAL-src/trunk/src/VASSAL/build/GameModule.java
===================================================================
--- VASSAL-src/trunk/src/VASSAL/build/GameModule.java 2017-01-20 08:38:39 UTC (rev 9249)
+++ VASSAL-src/trunk/src/VASSAL/build/GameModule.java 2017-01-21 23:50:55 UTC (rev 9250)
@@ -395,6 +395,15 @@
}
}
+ public void removeKeyStrokeListener (KeyStrokeListener l) {
+ if (l != null) {
+ keyStrokeListeners.remove(l);
+ for (KeyStrokeSource s : keyStrokeSources) {
+ l.removeKeyStrokeSource(s);
+ }
+ }
+ }
+
@Deprecated public void fireKeyStroke(KeyStroke stroke) {
if (stroke != null) {
for (KeyStrokeListener l : keyStrokeListeners) {
Modified: VASSAL-src/trunk/src/VASSAL/build/module/map/DrawPile.java
===================================================================
--- VASSAL-src/trunk/src/VASSAL/build/module/map/DrawPile.java 2017-01-20 08:38:39 UTC (rev 9249)
+++ VASSAL-src/trunk/src/VASSAL/build/module/map/DrawPile.java 2017-01-21 23:50:55 UTC (rev 9250)
@@ -812,4 +812,11 @@
}
return l;
}
+
+ public void setup(boolean gameStarting) {
+ super.setup(gameStarting);
+ if (myDeck != null) {
+ myDeck.setup(gameStarting);
+ }
+ }
}
Modified: VASSAL-src/trunk/src/VASSAL/counters/Deck.java
===================================================================
--- VASSAL-src/trunk/src/VASSAL/counters/Deck.java 2017-01-20 08:38:39 UTC (rev 9249)
+++ VASSAL-src/trunk/src/VASSAL/counters/Deck.java 2017-01-21 23:50:55 UTC (rev 9250)
@@ -378,7 +378,6 @@
repaintMap();
}
});
- GameModule.getGameModule().addKeyStrokeListener(shuffleListener);
}
shuffleListener.setKeyStroke(getShuffleKey());
@@ -389,7 +388,6 @@
repaintMap();
}
});
- GameModule.getGameModule().addKeyStrokeListener(reshuffleListener);
}
reshuffleListener.setKeyStroke(getReshuffleKey());
@@ -400,7 +398,6 @@
repaintMap();
}
});
- GameModule.getGameModule().addKeyStrokeListener(reverseListener);
}
reverseListener.setKeyStroke(getReverseKey());
@@ -410,6 +407,19 @@
}
}
+ public void setup(boolean gameStarting) {
+ if (gameStarting) {
+ GameModule.getGameModule().addKeyStrokeListener(shuffleListener);
+ GameModule.getGameModule().addKeyStrokeListener(reshuffleListener);
+ GameModule.getGameModule().addKeyStrokeListener(reverseListener);
+ }
+ else {
+ GameModule.getGameModule().removeKeyStrokeListener(shuffleListener);
+ GameModule.getGameModule().removeKeyStrokeListener(reshuffleListener);
+ GameModule.getGameModule().removeKeyStrokeListener(reverseListener);
+ }
+ }
+
public String getFaceDownOption() {
return faceDownOption;
}
Modified: VASSAL-src/trunk/src/VASSAL/tools/KeyStrokeListener.java
===================================================================
--- VASSAL-src/trunk/src/VASSAL/tools/KeyStrokeListener.java 2017-01-20 08:38:39 UTC (rev 9249)
+++ VASSAL-src/trunk/src/VASSAL/tools/KeyStrokeListener.java 2017-01-21 23:50:55 UTC (rev 9250)
@@ -79,4 +79,13 @@
src.getComponent().registerKeyboardAction(l, key, src.getMode());
}
}
+
+ public void removeKeyStrokeSource(KeyStrokeSource src) {
+ if (src != null) {
+ sources.remove(src);
+ }
+ if (key != null) {
+ src.getComponent().unregisterKeyboardAction(key);
+ }
+ }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
vassalengine-svn mailing list
vas...@li...
https://lists.sourceforge.net/lists/listinfo/vassalengine-svn
|
|
From: <uck...@us...> - 2016-12-31 18:32:02
|
Revision: 9247
http://sourceforge.net/p/vassalengine/svn/9247
Author: uckelman
Date: 2016-12-31 18:31:58 +0000 (Sat, 31 Dec 2016)
Log Message:
-----------
Updated for 3.2.17 release.
Modified Paths:
--------------
VASSAL-src/trunk/README
Modified: VASSAL-src/trunk/README
===================================================================
--- VASSAL-src/trunk/README 2016-12-31 18:06:38 UTC (rev 9246)
+++ VASSAL-src/trunk/README 2016-12-31 18:31:58 UTC (rev 9247)
@@ -1,4 +1,4 @@
-The VASSAL Team is happy to announce the release of VASSAL 3.2.16, which
+The VASSAL Team is happy to announce the release of VASSAL 3.2.17, which
which fixes several problems found in earlier versions.
********************************************************************************
@@ -23,7 +23,7 @@
indicating with which module you're seeing a problem.
* If you are using MacOS X 10.8.3 or later, you may see the message
- "VASSAL-3.2.16.app is damaged and can’t be opened. You should move it to
+ "VASSAL-3.2.17.app is damaged and can’t be opened. You should move it to
the Trash." The problem is NOT that your download was corrupt, but rather
that MacOS is preventing you from running VASSAL. To start VASSAL, control-
click or right-click the app bundle's icon and select Open from the menu.
@@ -45,42 +45,50 @@
For Linux:
- http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.16-linux.tar.bz2
+ http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.17-linux.tar.bz2
For Mac OS X:
- http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.16-macosx.dmg
+ http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.17-macosx.dmg
For Windows:
- http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.16-windows.exe
+ http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.17-windows.exe
For other operating systems:
- http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.16-other.zip
+ http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.17-other.zip
Source code:
- http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.16-src.zip
+ http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.17-src.zip
*********************
Recent Changes
*********************
+The following bugs in 3.2.16 are fixed in 3.2.17:
+
+* 12534: Regular Expression matching not supported in Calulated Property
+* 12533: Game Refresher fails if Extensions are loaded
+* 12527: "Save Game" behaves as "Save As"
+* 12526: Switching desktop on Mac OS X 10.11.3 sometimes clones the currently
+ selected unit
+* 12518: Rotated Layer following property does not update if property changes
+* 11649: Persistent LOS thread not working with zoom different from 100%
+* 11404: Some uses of the PRNG introduce a minuscule amount of modulo bias
+* 9670: IllegalStateException: Icon Family VASSAL not found in
+ ServerAddressBook.getCurrentIcon
+
The following bugs in 3.2.15 are fixed in 3.2.16:
* 12524: Images retile unnecessarily due to bad timestamp
* 12522: Deck shuffling logged incorrectly
-The following bugs in 3.2.14 are fixed in 3.2.15:
+For changes prior to 3.2.16, see the change log.
-* 11864: Relative $INSTALL_DIR in VASSAL.sh breaks paths for documentation
-* 11769: NPE in Deck.getState()
-
-For changes prior to 3.2.15, see the change log.
-
-Please report all bugs in 3.2.16 even if they are bugs which you've already
+Please report all bugs in 3.2.17 even if they are bugs which you've already
reported against other versions. We take your bug reports seriously---they're
the reason we've been able to fix so many bugs.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
vassalengine-svn mailing list
vas...@li...
https://lists.sourceforge.net/lists/listinfo/vassalengine-svn
|
|
From: <uck...@us...> - 2016-12-31 18:06:42
|
Revision: 9246
http://sourceforge.net/p/vassalengine/svn/9246
Author: uckelman
Date: 2016-12-31 18:06:38 +0000 (Sat, 31 Dec 2016)
Log Message:
-----------
Updated for 3.2.17 release.
Modified Paths:
--------------
VASSAL-src/trunk/CHANGES
VASSAL-src/trunk/Makefile
Modified: VASSAL-src/trunk/CHANGES
===================================================================
--- VASSAL-src/trunk/CHANGES 2016-11-20 14:37:05 UTC (rev 9245)
+++ VASSAL-src/trunk/CHANGES 2016-12-31 18:06:38 UTC (rev 9246)
@@ -1,4 +1,4 @@
-3.2.17 - ???
+3.2.17 - 31 December 2016
* 12534: Regular Expression matching not supported in Calulated Property
* 12533: Game Refresher fails if Extensions are loaded
Modified: VASSAL-src/trunk/Makefile
===================================================================
--- VASSAL-src/trunk/Makefile 2016-11-20 14:37:05 UTC (rev 9245)
+++ VASSAL-src/trunk/Makefile 2016-12-31 18:06:38 UTC (rev 9246)
@@ -49,8 +49,8 @@
VNUM:=3.2.17
#SVNVERSION:=$(shell svnversion | perl -pe 's/(\d+:)?(\d+[MS]?)/$$2/; s/(\d+)M/$$1+1/e')
SVNVERSION:=$(shell git svn log -1 --oneline | grep -oP '^r\K\d+')
-VERSION:=$(VNUM)-svn$(SVNVERSION)
-#VERSION:=$(VNUM)
+#VERSION:=$(VNUM)-svn$(SVNVERSION)
+VERSION:=$(VNUM)
#CLASSPATH:=$(CLASSDIR):$(LIBDIR)/*
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
vassalengine-svn mailing list
vas...@li...
https://lists.sourceforge.net/lists/listinfo/vassalengine-svn
|
|
From: <uck...@us...> - 2016-11-20 14:37:09
|
Revision: 9245
http://sourceforge.net/p/vassalengine/svn/9245
Author: uckelman
Date: 2016-11-20 14:37:05 +0000 (Sun, 20 Nov 2016)
Log Message:
-----------
Added bugfix note.
Modified Paths:
--------------
VASSAL-src/trunk/CHANGES
VASSAL-src/trunk/NOTES-bgg
VASSAL-src/trunk/NOTES-csw
VASSAL-src/trunk/NOTES-news
VASSAL-src/trunk/NOTES-vassalforum
Modified: VASSAL-src/trunk/CHANGES
===================================================================
--- VASSAL-src/trunk/CHANGES 2016-11-20 14:34:32 UTC (rev 9244)
+++ VASSAL-src/trunk/CHANGES 2016-11-20 14:37:05 UTC (rev 9245)
@@ -6,6 +6,7 @@
* 12526: Switching desktop on Mac OS X 10.11.3 sometimes clones the currently
selected unit
* 12518: Rotated Layer following property does not update if property changes
+* 11649: Persistent LOS thread not working with zoom different from 100%
* 11404: Some uses of the PRNG introduce a minuscule amount of modulo bias
* 9670: IllegalStateException: Icon Family VASSAL not found in
ServerAddressBook.getCurrentIcon
Modified: VASSAL-src/trunk/NOTES-bgg
===================================================================
--- VASSAL-src/trunk/NOTES-bgg 2016-11-20 14:34:32 UTC (rev 9244)
+++ VASSAL-src/trunk/NOTES-bgg 2016-11-20 14:37:05 UTC (rev 9245)
@@ -29,6 +29,7 @@
* 12527: "Save Game" behaves as "Save As"
* 12526: Switching desktop on Mac OS X 10.11.3 sometimes clones the currently selected unit
* 12518: Rotated Layer following property does not update if property changes
+* 11649: Persistent LOS thread not working with zoom different from 100%
* 11404: Some uses of the PRNG introduce a minuscule amount of modulo bias
* 9670: IllegalStateException: Icon Family VASSAL not found in ServerAddressBook.getCurrentIcon
Modified: VASSAL-src/trunk/NOTES-csw
===================================================================
--- VASSAL-src/trunk/NOTES-csw 2016-11-20 14:34:32 UTC (rev 9244)
+++ VASSAL-src/trunk/NOTES-csw 2016-11-20 14:37:05 UTC (rev 9245)
@@ -28,6 +28,7 @@
* 12527: "Save Game" behaves as "Save As"
* 12526: Switching desktop on Mac OS X 10.11.3 sometimes clones the currently selected unit
* 12518: Rotated Layer following property does not update if property changes
+* 11649: Persistent LOS thread not working with zoom different from 100%
* 11404: Some uses of the PRNG introduce a minuscule amount of modulo bias
* 9670: IllegalStateException: Icon Family VASSAL not found in ServerAddressBook.getCurrentIcon
Modified: VASSAL-src/trunk/NOTES-news
===================================================================
--- VASSAL-src/trunk/NOTES-news 2016-11-20 14:34:32 UTC (rev 9244)
+++ VASSAL-src/trunk/NOTES-news 2016-11-20 14:37:05 UTC (rev 9245)
@@ -29,6 +29,7 @@
<li>12527: "Save Game" behaves as "Save As"</li>
<li>12526: Switching desktop on Mac OS X 10.11.3 sometimes clones the currently selected unit</li>
<li>12518: Rotated Layer following property does not update if property changes</li>
+ <li>11649: Persistent LOS thread not working with zoom different from 100%</li>
<li>11404: Some uses of the PRNG introduce a minuscule amount of modulo bias</li>
<li>9670: IllegalStateException: Icon Family VASSAL not found in ServerAddressBook.getCurrentIcon</li>
</ul>
Modified: VASSAL-src/trunk/NOTES-vassalforum
===================================================================
--- VASSAL-src/trunk/NOTES-vassalforum 2016-11-20 14:34:32 UTC (rev 9244)
+++ VASSAL-src/trunk/NOTES-vassalforum 2016-11-20 14:37:05 UTC (rev 9245)
@@ -31,6 +31,7 @@
* 12527: "Save Game" behaves as "Save As"
* 12526: Switching desktop on Mac OS X 10.11.3 sometimes clones the currently selected unit
* 12518: Rotated Layer following property does not update if property changes
+* 11649: Persistent LOS thread not working with zoom different from 100%
* 11404: Some uses of the PRNG introduce a minuscule amount of modulo bias
* 9670: IllegalStateException: Icon Family VASSAL not found in ServerAddressBook.getCurrentIcon
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
_______________________________________________
vassalengine-svn mailing list
vas...@li...
https://lists.sourceforge.net/lists/listinfo/vassalengine-svn
|
|
From: <uck...@us...> - 2016-11-20 14:34:35
|
Revision: 9244
http://sourceforge.net/p/vassalengine/svn/9244
Author: uckelman
Date: 2016-11-20 14:34:32 +0000 (Sun, 20 Nov 2016)
Log Message:
-----------
Merged Brent-3.2-Work@9233.
Fixed Bug 11649: Persistent LOS thread not working with zoom different from 100%
Modified Paths:
--------------
VASSAL-src/trunk/src/VASSAL/build/module/map/LOS_Thread.java
Modified: VASSAL-src/trunk/src/VASSAL/build/module/map/LOS_Thread.java
===================================================================
--- VASSAL-src/trunk/src/VASSAL/build/module/map/LOS_Thread.java 2016-11-20 00:05:45 UTC (rev 9243)
+++ VASSAL-src/trunk/src/VASSAL/build/module/map/LOS_Thread.java 2016-11-20 14:34:32 UTC (rev 9244)
@@ -493,8 +493,8 @@
}
}
}
- lastAnchor = mapAnchor;
- lastArrow = mapArrow;
+ lastAnchor = anchor;
+ lastArrow = arrow;
}
public boolean drawAboveCounters() {
@@ -682,8 +682,8 @@
lastLocation = location;
}
- Point mapAnchor = map.mapCoordinates(lastAnchor);
- Point mapArrow = map.mapCoordinates(lastArrow);
+ Point mapAnchor = lastAnchor;
+ Point mapArrow = lastArrow;
int fudge = (int) (1.0 / map.getZoom() * 2);
Rectangle r = new Rectangle(Math.min(mapAnchor.x, mapArrow.x)-fudge,
Math.min(mapAnchor.y, mapArrow.y)-fudge,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
_______________________________________________
vassalengine-svn mailing list
vas...@li...
https://lists.sourceforge.net/lists/listinfo/vassalengine-svn
|
|
From: <uck...@us...> - 2016-11-20 00:05:49
|
Revision: 9243
http://sourceforge.net/p/vassalengine/svn/9243
Author: uckelman
Date: 2016-11-20 00:05:45 +0000 (Sun, 20 Nov 2016)
Log Message:
-----------
Noted bug fixes.
Modified Paths:
--------------
VASSAL-src/trunk/CHANGES
VASSAL-src/trunk/NOTES-bgg
VASSAL-src/trunk/NOTES-csw
VASSAL-src/trunk/NOTES-news
VASSAL-src/trunk/NOTES-vassalforum
Modified: VASSAL-src/trunk/CHANGES
===================================================================
--- VASSAL-src/trunk/CHANGES 2016-11-19 23:52:20 UTC (rev 9242)
+++ VASSAL-src/trunk/CHANGES 2016-11-20 00:05:45 UTC (rev 9243)
@@ -1,8 +1,14 @@
3.2.17 - ???
+* 12534: Regular Expression matching not supported in Calulated Property
+* 12533: Game Refresher fails if Extensions are loaded
* 12527: "Save Game" behaves as "Save As"
* 12526: Switching desktop on Mac OS X 10.11.3 sometimes clones the currently
selected unit
+* 12518: Rotated Layer following property does not update if property changes
+* 11404: Some uses of the PRNG introduce a minuscule amount of modulo bias
+* 9670: IllegalStateException: Icon Family VASSAL not found in
+ ServerAddressBook.getCurrentIcon
3.2.16 - 1 April 2016
Modified: VASSAL-src/trunk/NOTES-bgg
===================================================================
--- VASSAL-src/trunk/NOTES-bgg 2016-11-19 23:52:20 UTC (rev 9242)
+++ VASSAL-src/trunk/NOTES-bgg 2016-11-20 00:05:45 UTC (rev 9243)
@@ -1,5 +1,5 @@
-[size=18][b]VASSAL 3.2.16 released[/b][/size]
-The VASSAL Team is happy to announce the release of VASSAL 3.2.16, which fixes several problems found in earlier versions.
+[size=18][b]VASSAL 3.2.17 released[/b][/size]
+The VASSAL Team is happy to announce the release of VASSAL 3.2.17, which fixes several problems found in earlier versions.
[size=16][b]IMPORTANT[/b][/size]
* If you save a module, game, or log in VASSAL 3.2, you will NOT be able to open it afterwards with VASSAL 3.1. We recommend keeping a backup copy of any pre-3.2 files you plan to modify in 3.2 until you've verified that everything works to your satisfaction.
@@ -10,32 +10,37 @@
* If some images display with incorrect colors, clear your tile cache (under Tools > Clear Tile Cache in the Module Manager) and reload the module. If the images still display with incorrect colors, PLEASE contact us indicating with which module you're seeing a problem.
-* If you are using MacOS X 10.8.3 or later, you may see the message "VASSAL-3.2.16.app is damaged and can’t be opened. You should move it to the Trash." The problem is NOT that your download was corrupt, but rather that MacOS is preventing you from running VASSAL. To start VASSAL, control-click or right-click the app bundle's icon and select Open from the menu. You'll see a dialog asking whether you want to open VASSAL. Select "Open". Thereafter, you should be able to start VASSAL normally.
+* If you are using MacOS X 10.8.3 or later, you may see the message "VASSAL-3.2.17.app is damaged and can’t be opened. You should move it to the Trash." The problem is NOT that your download was corrupt, but rather that MacOS is preventing you from running VASSAL. To start VASSAL, control-click or right-click the app bundle's icon and select Open from the menu. You'll see a dialog asking whether you want to open VASSAL. Select "Open". Thereafter, you should be able to start VASSAL normally.
* Oracle's Java 7 and 8 have very poor rendering performance on some MacOS X systems, particularly Yosemite. If you are experiencing this, please use Apple's Java 6 instead.
[size=16][b]Download[/b][/size]
-[url=http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.16-linux.tar.bz2]Linux[/url]
-[url=http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.16-macosx.dmg]Mac OS X[/url]
-[url=http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.16-windows.exe]Windows[/url]
-[url=http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.16-other.zip]Other[/url]
-[url=http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.16-src.zip]Source code[/url]
+[url=http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.17-linux.tar.bz2]Linux[/url]
+[url=http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.17-macosx.dmg]Mac OS X[/url]
+[url=http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.17-windows.exe]Windows[/url]
+[url=http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.17-other.zip]Other[/url]
+[url=http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.17-src.zip]Source code[/url]
[size=16][b]Recent Changes[/b][/size]
+The following bugs in 3.2.16 are fixed in 3.2.17:
+
+* 12534: Regular Expression matching not supported in Calulated Property
+* 12533: Game Refresher fails if Extensions are loaded
+* 12527: "Save Game" behaves as "Save As"
+* 12526: Switching desktop on Mac OS X 10.11.3 sometimes clones the currently selected unit
+* 12518: Rotated Layer following property does not update if property changes
+* 11404: Some uses of the PRNG introduce a minuscule amount of modulo bias
+* 9670: IllegalStateException: Icon Family VASSAL not found in ServerAddressBook.getCurrentIcon
+
The following bugs in 3.2.15 are fixed in 3.2.16:
* 12524: Images retile unnecessarily due to bad timestamp
* 12522: Deck shuffling logged incorrectly
-The following bugs in 3.2.14 are fixed in 3.2.15:
+For changes prior to 3.2.16, see the change log.
-* 11864: Relative $INSTALL_DIR in VASSAL.sh breaks paths for documentation
-* 11769: NPE in Deck.getState()
+Please report all bugs in 3.2.17, even if they are bugs which you've already reported against other versions. We take your bug reports seriously---they're the reason we've been able to fix so many bugs.
-For changes prior to 3.2.15, see the change log.
-
-Please report all bugs in 3.2.16, even if they are bugs which you've already reported against other versions. We take your bug reports seriously---they're the reason we've been able to fix so many bugs.
-
[size=16][b]New Features in 3.2[/b][/size]
* Levels within a Layer can be moved up or down the level list using buttons. [RFE 1919]
Modified: VASSAL-src/trunk/NOTES-csw
===================================================================
--- VASSAL-src/trunk/NOTES-csw 2016-11-19 23:52:20 UTC (rev 9242)
+++ VASSAL-src/trunk/NOTES-csw 2016-11-20 00:05:45 UTC (rev 9243)
@@ -1,4 +1,4 @@
-The VASSAL Team is happy to announce the release of VASSAL 3.2.16, which which fixes several problems found in earlier versions.
+The VASSAL Team is happy to announce the release of VASSAL 3.2.17, which which fixes several problems found in earlier versions.
<h3>IMPORTANT</h3>
* If you save a module, game, or log in VASSAL 3.2, you will NOT be able to open it afterwards with VASSAL 3.1. We recommend keeping a backup copy of any pre-3.2 files you plan to modify in 3.2 until you've verified that everything works to your satisfaction.
@@ -9,32 +9,37 @@
* If some images display with incorrect colors, clear your tile cache (under Tools > Clear Tile Cache in the Module Manager) and reload the module. If the images still display with incorrect colors, PLEASE contact us indicating with which module you're seeing a problem.
-* If you are using MacOS X 10.8.3 or later, you may see the message "VASSAL-3.2.16.app is damaged and can’t be opened. You should move it to the Trash." The problem is NOT that your download was corrupt, but rather that MacOS is preventing you from running VASSAL. To start VASSAL, control-click or right-click the app bundle's icon and select Open from the menu. You'll see a dialog asking whether you want to open VASSAL. Select "Open". Thereafter, you should be able to start VASSAL normally.
+* If you are using MacOS X 10.8.3 or later, you may see the message "VASSAL-3.2.17.app is damaged and can’t be opened. You should move it to the Trash." The problem is NOT that your download was corrupt, but rather that MacOS is preventing you from running VASSAL. To start VASSAL, control-click or right-click the app bundle's icon and select Open from the menu. You'll see a dialog asking whether you want to open VASSAL. Select "Open". Thereafter, you should be able to start VASSAL normally.
* Oracle's Java 7 has very poor rendering performance on some MacOS X systems. If you are experiencing this, please use Apple's Java 6 instead.
<h3>Download</h3>
-* <a href='http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.16-linux.tar.bz2' target='_new'>Linux</a>
-* <a href='http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.16-macosx.dmg' target='_new'>Mac OS X</a>
-* <a href='http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.16-windows.exe' target='_new'>Windows</a>
-* <a href='http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.16-other.zip' target='_new'>Other</a>
-* <a href='http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.16-src.zip' target='_new'>Source code</a>
+* <a href='http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.17-linux.tar.bz2' target='_new'>Linux</a>
+* <a href='http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.17-macosx.dmg' target='_new'>Mac OS X</a>
+* <a href='http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.17-windows.exe' target='_new'>Windows</a>
+* <a href='http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.17-other.zip' target='_new'>Other</a>
+* <a href='http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.17-src.zip' target='_new'>Source code</a>
<h3>Recent Changes</h3>
+The following bugs in 3.2.16 are fixed in 3.2.17:
+
+* 12534: Regular Expression matching not supported in Calulated Property
+* 12533: Game Refresher fails if Extensions are loaded
+* 12527: "Save Game" behaves as "Save As"
+* 12526: Switching desktop on Mac OS X 10.11.3 sometimes clones the currently selected unit
+* 12518: Rotated Layer following property does not update if property changes
+* 11404: Some uses of the PRNG introduce a minuscule amount of modulo bias
+* 9670: IllegalStateException: Icon Family VASSAL not found in ServerAddressBook.getCurrentIcon
+
The following bugs in 3.2.15 are fixed in 3.2.16:
* 12524: Images retile unnecessarily due to bad timestamp
* 12522: Deck shuffling logged incorrectly
-The following bugs in 3.2.14 are fixed in 3.2.15:
+For changes prior to 3.2.16, see the change log.
-* 11864: Relative $INSTALL_DIR in VASSAL.sh breaks paths for documentation
-* 11769: NPE in Deck.getState()
+Please report all bugs in 3.2.17, even if they are bugs which you've already reported against other versions. We take your bug reports seriously---they're the reason we've been able to fix so many bugs.
-For changes prior to 3.2.15, see the change log.
-
-Please report all bugs in 3.2.16, even if they are bugs which you've already reported against other versions. We take your bug reports seriously---they're the reason we've been able to fix so many bugs.
-
<h3>New Features in 3.2</h3>
* Levels within a Layer can be moved up or down the level list using buttons. [RFE 1919]
Modified: VASSAL-src/trunk/NOTES-news
===================================================================
--- VASSAL-src/trunk/NOTES-news 2016-11-19 23:52:20 UTC (rev 9242)
+++ VASSAL-src/trunk/NOTES-news 2016-11-20 00:05:45 UTC (rev 9243)
@@ -1,5 +1,5 @@
<p>
-The VASSAL Team is happy to announce the release of VASSAL 3.2.16, which which fixes several problems found in earlier versions.
+The VASSAL Team is happy to announce the release of VASSAL 3.2.17, which which fixes several problems found in earlier versions.
</p>
<h2>IMPORTANT</h2>
<ul>
@@ -7,39 +7,44 @@
<li>If you found it necessary to set a very large maximum heap (> 512MB) for a module with VASSAL 3.1, it should now be possible with VASSAL 3.2 to set a much lower maximum heap and achieve similar or better display performance. 512MB should now be adequate for most modules.</li>
<li>VASL 6 is compatible with VASSAL 3.2. VASL users, please upgrade!</li>
<li>If some images display with incorrect colors, clear your tile cache (under Tools > Clear Tile Cache in the Module Manager) and reload the module. If the images still display with incorrect colors, PLEASE contact us indicating with which module you're seeing a problem.</li>
- <li>If you are using MacOS X 10.8.3 or later, you may see the message "VASSAL-3.2.16.app is damaged and can’t be opened. You should move it to the Trash." The problem is NOT that your download was corrupt, but rather that MacOS is preventing you from running VASSAL. To start VASSAL, control-click or right-click the app bundle's icon and select Open from the menu. You'll see a dialog asking whether you want to open VASSAL. Select "Open". Thereafter, you should be able to start VASSAL normally.</li>
+ <li>If you are using MacOS X 10.8.3 or later, you may see the message "VASSAL-3.2.17.app is damaged and can’t be opened. You should move it to the Trash." The problem is NOT that your download was corrupt, but rather that MacOS is preventing you from running VASSAL. To start VASSAL, control-click or right-click the app bundle's icon and select Open from the menu. You'll see a dialog asking whether you want to open VASSAL. Select "Open". Thereafter, you should be able to start VASSAL normally.</li>
<li>Oracle's Java 7 and 8 have very poor rendering performance on some MacOS X systems, particularly Yosemite. If you are experiencing this, please use Apple's Java 6 instead.</li>
</ul>
<h2>Download</h2>
<ul>
- <li><a href="http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.16-linux.tar.bz2" target="_blank">Linux</a></li>
- <li><a href="http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.16-macosx.dmg">Mac OS X</a></li>
- <li><a href="http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.16-windows.exe">Windows</a></li>
- <li><a href="http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.16-other.zip">Other</a></li>
- <li><a href="http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.16-src.zip">Source</a></li>
+ <li><a href="http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.17-linux.tar.bz2" target="_blank">Linux</a></li>
+ <li><a href="http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.17-macosx.dmg">Mac OS X</a></li>
+ <li><a href="http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.17-windows.exe">Windows</a></li>
+ <li><a href="http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.17-other.zip">Other</a></li>
+ <li><a href="http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.17-src.zip">Source</a></li>
</ul>
<h2>Recent Changes</h2>
<p>
-The following bugs in 3.2.14 are fixed in 3.2.16:
+The following bugs in 3.2.16 are fixed in 3.2.17:
<ul>
- <li>12524: Images retile unnecessarily due to bad timestamp</li>
- <li>12522: Deck shuffling logged incorrectly</li>
+ <li>12534: Regular Expression matching not supported in Calulated Property</li>
+ <li>12533: Game Refresher fails if Extensions are loaded</li>
+ <li>12527: "Save Game" behaves as "Save As"</li>
+ <li>12526: Switching desktop on Mac OS X 10.11.3 sometimes clones the currently selected unit</li>
+ <li>12518: Rotated Layer following property does not update if property changes</li>
+ <li>11404: Some uses of the PRNG introduce a minuscule amount of modulo bias</li>
+ <li>9670: IllegalStateException: Icon Family VASSAL not found in ServerAddressBook.getCurrentIcon</li>
</ul>
</p>
<p>
-The following bugs in 3.2.14 are fixed in 3.2.15:
+The following bugs in 3.2.15 are fixed in 3.2.16:
<ul>
- <li>11864: Relative $INSTALL_DIR in VASSAL.sh breaks paths for documentation</li>
- <li>11769: NPE in Deck.getState()</li>
+ <li>12524: Images retile unnecessarily due to bad timestamp</li>
+ <li>12522: Deck shuffling logged incorrectly</li>
</ul>
</p>
<p>
-For changes prior to 3.2.15, see the change log.
+For changes prior to 3.2.16, see the change log.
</p>
<p>
-Please report all bugs in 3.2.16 even if they are bugs which you've already reported against other versions. We take your bug reports seriously—they're the reason we've been able to fix so many bugs.
+Please report all bugs in 3.2.17 even if they are bugs which you've already reported against other versions. We take your bug reports seriously—they're the reason we've been able to fix so many bugs.
</p>
<h2>New Features in 3.2</h2>
Modified: VASSAL-src/trunk/NOTES-vassalforum
===================================================================
--- VASSAL-src/trunk/NOTES-vassalforum 2016-11-19 23:52:20 UTC (rev 9242)
+++ VASSAL-src/trunk/NOTES-vassalforum 2016-11-20 00:05:45 UTC (rev 9243)
@@ -1,6 +1,6 @@
-[size=200][b]VASSAL 3.2.16 released[/b][/size]
+[size=200][b]VASSAL 3.2.17 released[/b][/size]
-The VASSAL Team is happy to announce the release of VASSAL 3.2.16, which which fixes several problems found in earlier versions.
+The VASSAL Team is happy to announce the release of VASSAL 3.2.17, which which fixes several problems found in earlier versions.
[size=150][b]IMPORTANT[/b][/size]
@@ -11,33 +11,38 @@
* VASL 6 is compatible with VASSAL 3.2. VASL users, please upgrade!
-* If you are using MacOS X 10.8.3 or later, you may see the message "VASSAL-3.2.16.app is damaged and can’t be opened. You should move it to the Trash." The problem is NOT that your download was corrupt, but rather that MacOS is preventing you from running VASSAL. To start VASSAL, control-click or right-click the app bundle's icon and select Open from the menu. You'll see a dialog asking whether you want to open VASSAL. Select "Open". Thereafter, you should be able to start VASSAL normally.
+* If you are using MacOS X 10.8.3 or later, you may see the message "VASSAL-3.2.17.app is damaged and can’t be opened. You should move it to the Trash." The problem is NOT that your download was corrupt, but rather that MacOS is preventing you from running VASSAL. To start VASSAL, control-click or right-click the app bundle's icon and select Open from the menu. You'll see a dialog asking whether you want to open VASSAL. Select "Open". Thereafter, you should be able to start VASSAL normally.
* Oracle's Java 7 and 8 have very poor rendering performance on some MacOS X systems, particularly Yosemite. If you are experiencing this, please use Apple's Java 6 instead.
[size=150][b]Download[/b][/size]
-[url=http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.16-linux.tar.bz2]Linux[/url]
-[url=http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.16-macosx.dmg]Mac OS X[/url]
-[url=http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.16-windows.exe]Windows[/url]
-[url=http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.16-other.zip]Other[/url]
-[url=http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.16-src.zip]Source code[/url]
+[url=http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.17-linux.tar.bz2]Linux[/url]
+[url=http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.17-macosx.dmg]Mac OS X[/url]
+[url=http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.17-windows.exe]Windows[/url]
+[url=http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.17-other.zip]Other[/url]
+[url=http://downloads.sourceforge.net/vassalengine/VASSAL-3.2.17-src.zip]Source code[/url]
[size=150][b]Recent Changes[/b][/size]
-The following bugs in 3.2.14 are fixed in 3.2.16:
+The following bugs in 3.2.16 are fixed in 3.2.17:
+* 12534: Regular Expression matching not supported in Calulated Property
+* 12533: Game Refresher fails if Extensions are loaded
+* 12527: "Save Game" behaves as "Save As"
+* 12526: Switching desktop on Mac OS X 10.11.3 sometimes clones the currently selected unit
+* 12518: Rotated Layer following property does not update if property changes
+* 11404: Some uses of the PRNG introduce a minuscule amount of modulo bias
+* 9670: IllegalStateException: Icon Family VASSAL not found in ServerAddressBook.getCurrentIcon
+
+The following bugs in 3.2.15 are fixed in 3.2.16:
+
* 12524: Images retile unnecessarily due to bad timestamp
* 12522: Deck shuffling logged incorrectly
-The following bugs in 3.2.14 are fixed in 3.2.15:
+For changes prior to 3.2.16, see the change log.
-* 11864: Relative $INSTALL_DIR in VASSAL.sh breaks paths for documentation
-* 11769: NPE in Deck.getState()
+Please report all bugs in 3.2.17, even if they are bugs which you've already reported against other versions. We take your bug reports seriously---they're the reason we've been able to fix so many bugs.
-For changes prior to 3.2.15, see the change log.
-
-Please report all bugs in 3.2.16, even if they are bugs which you've already reported against other versions. We take your bug reports seriously---they're the reason we've been able to fix so many bugs.
-
[size=150][b]New Features in 3.2[/b][/size]
* Levels within a Layer can be moved up or down the level list using buttons. [RFE 1919]
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
_______________________________________________
vassalengine-svn mailing list
vas...@li...
https://lists.sourceforge.net/lists/listinfo/vassalengine-svn
|
|
From: <uck...@us...> - 2016-11-19 23:52:25
|
Revision: 9242
http://sourceforge.net/p/vassalengine/svn/9242
Author: uckelman
Date: 2016-11-19 23:52:20 +0000 (Sat, 19 Nov 2016)
Log Message:
-----------
Use valueOf for creating all of the classes which wrap primitives. This
lets us take advantage of immutable object caching.
Modified Paths:
--------------
VASSAL-src/trunk/src/VASSAL/build/module/ToolbarMenu.java
VASSAL-src/trunk/src/bsh/BSHLiteral.java
VASSAL-src/trunk/src/bsh/BSHUnaryExpression.java
VASSAL-src/trunk/src/bsh/JJTParserState.java
VASSAL-src/trunk/src/bsh/Parser.java
VASSAL-src/trunk/src/bsh/Primitive.java
VASSAL-src/trunk/src/bsh/This.java
VASSAL-src/trunk/src/bsh/XThis.java
VASSAL-src/trunk/src/bsh/bsh.jjt
Modified: VASSAL-src/trunk/src/VASSAL/build/module/ToolbarMenu.java
===================================================================
--- VASSAL-src/trunk/src/VASSAL/build/module/ToolbarMenu.java 2016-11-07 17:28:27 UTC (rev 9241)
+++ VASSAL-src/trunk/src/VASSAL/build/module/ToolbarMenu.java 2016-11-19 23:52:20 UTC (rev 9242)
@@ -216,7 +216,7 @@
Object property = b.getClientProperty(MENU_PROPERTY);
b.addPropertyChangeListener(this);
b.setVisible(false);
- b.putClientProperty(HIDDEN_BY_TOOLBAR, new Boolean(true));
+ b.putClientProperty(HIDDEN_BY_TOOLBAR, Boolean.TRUE);
if (property instanceof JPopupMenu) {
// This button corresponds to another ToolbarMenu button.
Modified: VASSAL-src/trunk/src/bsh/BSHLiteral.java
===================================================================
--- VASSAL-src/trunk/src/bsh/BSHLiteral.java 2016-11-07 17:28:27 UTC (rev 9241)
+++ VASSAL-src/trunk/src/bsh/BSHLiteral.java 2016-11-19 23:52:20 UTC (rev 9242)
@@ -97,7 +97,7 @@
ch = getEscapeChar(ch);
}
- value = new Primitive(new Character(ch).charValue());
+ value = new Primitive(Character.valueOf(ch).charValue());
}
void stringSetup(String str)
Modified: VASSAL-src/trunk/src/bsh/BSHUnaryExpression.java
===================================================================
--- VASSAL-src/trunk/src/bsh/BSHUnaryExpression.java 2016-11-07 17:28:27 UTC (rev 9241)
+++ VASSAL-src/trunk/src/bsh/BSHUnaryExpression.java 2016-11-19 23:52:20 UTC (rev 9242)
@@ -101,7 +101,7 @@
Object operand = Primitive.promoteToInteger(val);
if ( operand instanceof Boolean )
- return new Boolean(
+ return Boolean.valueOf(
Primitive.booleanUnaryOperation((Boolean)operand, kind));
else
if ( operand instanceof Integer )
@@ -112,21 +112,21 @@
if(kind == INCR || kind == DECR)
{
if(operandType == Byte.TYPE)
- return new Byte((byte)result);
+ return Byte.valueOf((byte)result);
if(operandType == Short.TYPE)
- return new Short((short)result);
+ return Short.valueOf((short)result);
if(operandType == Character.TYPE)
- return new Character((char)result);
+ return Character.valueOf((char)result);
}
- return new Integer(result);
+ return Integer.valueOf(result);
}
else if(operand instanceof Long)
- return new Long(Primitive.longUnaryOperation((Long)operand, kind));
+ return Long.valueOf(Primitive.longUnaryOperation((Long)operand, kind));
else if(operand instanceof Float)
- return new Float(Primitive.floatUnaryOperation((Float)operand, kind));
+ return Float.valueOf(Primitive.floatUnaryOperation((Float)operand, kind));
else if(operand instanceof Double)
- return new Double(Primitive.doubleUnaryOperation((Double)operand, kind));
+ return Double.valueOf(Primitive.doubleUnaryOperation((Double)operand, kind));
else
throw new InterpreterError("An error occurred. Please call technical support.");
}
Modified: VASSAL-src/trunk/src/bsh/JJTParserState.java
===================================================================
--- VASSAL-src/trunk/src/bsh/JJTParserState.java 2016-11-07 17:28:27 UTC (rev 9241)
+++ VASSAL-src/trunk/src/bsh/JJTParserState.java 2016-11-19 23:52:20 UTC (rev 9242)
@@ -75,7 +75,7 @@
void openNodeScope(Node n) {
- marks.push(new Integer(mk));
+ marks.push(Integer.valueOf(mk));
mk = sp;
n.jjtOpen();
}
Modified: VASSAL-src/trunk/src/bsh/Parser.java
===================================================================
--- VASSAL-src/trunk/src/bsh/Parser.java 2016-11-07 17:28:27 UTC (rev 9241)
+++ VASSAL-src/trunk/src/bsh/Parser.java 2016-11-19 23:52:20 UTC (rev 9242)
@@ -2325,14 +2325,14 @@
if(ch == 'f' || ch == 'F')
{
literal = literal.substring(0,literal.length()-1);
- jjtn000.value = new Primitive( new Float( literal ).floatValue() );
+ jjtn000.value = new Primitive( Float.valueOf( literal ).floatValue() );
}
else
{
if(ch == 'd' || ch == 'D')
literal = literal.substring(0,literal.length()-1);
- jjtn000.value = new Primitive( new Double( literal ).doubleValue() );
+ jjtn000.value = new Primitive( Double.valueOf( literal ).doubleValue() );
}
break;
case CHARACTER_LITERAL:
Modified: VASSAL-src/trunk/src/bsh/Primitive.java
===================================================================
--- VASSAL-src/trunk/src/bsh/Primitive.java 2016-11-07 17:28:27 UTC (rev 9241)
+++ VASSAL-src/trunk/src/bsh/Primitive.java 2016-11-19 23:52:20 UTC (rev 9242)
@@ -132,14 +132,14 @@
this.value = value;
}
- public Primitive(boolean value) { this(new Boolean(value)); }
- public Primitive(byte value) { this(new Byte(value)); }
- public Primitive(short value) { this(new Short(value)); }
- public Primitive(char value) { this(new Character(value)); }
- public Primitive(int value) { this(new Integer(value)); }
- public Primitive(long value) { this(new Long(value)); }
- public Primitive(float value) { this(new Float(value)); }
- public Primitive(double value) { this(new Double(value)); }
+ public Primitive(boolean value) { this(Boolean.valueOf(value)); }
+ public Primitive(byte value) { this(Byte.valueOf(value)); }
+ public Primitive(short value) { this(Short.valueOf(value)); }
+ public Primitive(char value) { this(Character.valueOf(value)); }
+ public Primitive(int value) { this(Integer.valueOf(value)); }
+ public Primitive(long value) { this(Long.valueOf(value)); }
+ public Primitive(float value) { this(Float.valueOf(value)); }
+ public Primitive(double value) { this(Double.valueOf(value)); }
/**
Return the primitive value stored in its java.lang wrapper class
@@ -268,18 +268,18 @@
switch(kind)
{
case EQ:
- return new Boolean(lhs == rhs);
+ return Boolean.valueOf(lhs == rhs);
case NE:
- return new Boolean(lhs != rhs);
+ return Boolean.valueOf(lhs != rhs);
case BOOL_OR:
case BOOL_ORX:
- return new Boolean( lhs || rhs );
+ return Boolean.valueOf( lhs || rhs );
case BOOL_AND:
case BOOL_ANDX:
- return new Boolean( lhs && rhs );
+ return Boolean.valueOf( lhs && rhs );
default:
throw new InterpreterError("unimplemented binary operator");
@@ -297,65 +297,65 @@
// boolean
case LT:
case LTX:
- return new Boolean(lhs < rhs);
+ return Boolean.valueOf(lhs < rhs);
case GT:
case GTX:
- return new Boolean(lhs > rhs);
+ return Boolean.valueOf(lhs > rhs);
case EQ:
- return new Boolean(lhs == rhs);
+ return Boolean.valueOf(lhs == rhs);
case LE:
case LEX:
- return new Boolean(lhs <= rhs);
+ return Boolean.valueOf(lhs <= rhs);
case GE:
case GEX:
- return new Boolean(lhs >= rhs);
+ return Boolean.valueOf(lhs >= rhs);
case NE:
- return new Boolean(lhs != rhs);
+ return Boolean.valueOf(lhs != rhs);
// arithmetic
case PLUS:
- return new Long(lhs + rhs);
+ return Long.valueOf(lhs + rhs);
case MINUS:
- return new Long(lhs - rhs);
+ return Long.valueOf(lhs - rhs);
case STAR:
- return new Long(lhs * rhs);
+ return Long.valueOf(lhs * rhs);
case SLASH:
- return new Long(lhs / rhs);
+ return Long.valueOf(lhs / rhs);
case MOD:
- return new Long(lhs % rhs);
+ return Long.valueOf(lhs % rhs);
// bitwise
case LSHIFT:
case LSHIFTX:
- return new Long(lhs << rhs);
+ return Long.valueOf(lhs << rhs);
case RSIGNEDSHIFT:
case RSIGNEDSHIFTX:
- return new Long(lhs >> rhs);
+ return Long.valueOf(lhs >> rhs);
case RUNSIGNEDSHIFT:
case RUNSIGNEDSHIFTX:
- return new Long(lhs >>> rhs);
+ return Long.valueOf(lhs >>> rhs);
case BIT_AND:
case BIT_ANDX:
- return new Long(lhs & rhs);
+ return Long.valueOf(lhs & rhs);
case BIT_OR:
case BIT_ORX:
- return new Long(lhs | rhs);
+ return Long.valueOf(lhs | rhs);
case XOR:
- return new Long(lhs ^ rhs);
+ return Long.valueOf(lhs ^ rhs);
default:
throw new InterpreterError(
@@ -374,65 +374,65 @@
// boolean
case LT:
case LTX:
- return new Boolean(lhs < rhs);
+ return Boolean.valueOf(lhs < rhs);
case GT:
case GTX:
- return new Boolean(lhs > rhs);
+ return Boolean.valueOf(lhs > rhs);
case EQ:
- return new Boolean(lhs == rhs);
+ return Boolean.valueOf(lhs == rhs);
case LE:
case LEX:
- return new Boolean(lhs <= rhs);
+ return Boolean.valueOf(lhs <= rhs);
case GE:
case GEX:
- return new Boolean(lhs >= rhs);
+ return Boolean.valueOf(lhs >= rhs);
case NE:
- return new Boolean(lhs != rhs);
+ return Boolean.valueOf(lhs != rhs);
// arithmetic
case PLUS:
- return new Integer(lhs + rhs);
+ return Integer.valueOf(lhs + rhs);
case MINUS:
- return new Integer(lhs - rhs);
+ return Integer.valueOf(lhs - rhs);
case STAR:
- return new Integer(lhs * rhs);
+ return Integer.valueOf(lhs * rhs);
case SLASH:
- return new Integer(lhs / rhs);
+ return Integer.valueOf(lhs / rhs);
case MOD:
- return new Integer(lhs % rhs);
+ return Integer.valueOf(lhs % rhs);
// bitwise
case LSHIFT:
case LSHIFTX:
- return new Integer(lhs << rhs);
+ return Integer.valueOf(lhs << rhs);
case RSIGNEDSHIFT:
case RSIGNEDSHIFTX:
- return new Integer(lhs >> rhs);
+ return Integer.valueOf(lhs >> rhs);
case RUNSIGNEDSHIFT:
case RUNSIGNEDSHIFTX:
- return new Integer(lhs >>> rhs);
+ return Integer.valueOf(lhs >>> rhs);
case BIT_AND:
case BIT_ANDX:
- return new Integer(lhs & rhs);
+ return Integer.valueOf(lhs & rhs);
case BIT_OR:
case BIT_ORX:
- return new Integer(lhs | rhs);
+ return Integer.valueOf(lhs | rhs);
case XOR:
- return new Integer(lhs ^ rhs);
+ return Integer.valueOf(lhs ^ rhs);
default:
throw new InterpreterError(
@@ -448,31 +448,31 @@
// boolean
case LT:
case LTX:
- return new Boolean(lhs.compareTo(rhs) < 0);
+ return Boolean.valueOf(lhs.compareTo(rhs) < 0);
case GT:
case GTX:
- return new Boolean(lhs.compareTo(rhs) > 0);
+ return Boolean.valueOf(lhs.compareTo(rhs) > 0);
case EQ:
- return new Boolean(lhs.equals(rhs));
+ return Boolean.valueOf(lhs.equals(rhs));
case LE:
case LEX:
- return new Boolean(lhs.compareTo(rhs) <= 0);
+ return Boolean.valueOf(lhs.compareTo(rhs) <= 0);
case GE:
case GEX:
- return new Boolean(lhs.compareTo(rhs) >= 0);
+ return Boolean.valueOf(lhs.compareTo(rhs) >= 0);
case NE:
- return new Boolean(!lhs.equals(rhs));
+ return Boolean.valueOf(!lhs.equals(rhs));
case PLUS:
return lhs + rhs;
case MATCH:
- return new Boolean(Pattern.matches(rhs, lhs));
+ return Boolean.valueOf(Pattern.matches(rhs, lhs));
default:
throw new InterpreterError(
@@ -492,41 +492,41 @@
// boolean
case LT:
case LTX:
- return new Boolean(lhs < rhs);
+ return Boolean.valueOf(lhs < rhs);
case GT:
case GTX:
- return new Boolean(lhs > rhs);
+ return Boolean.valueOf(lhs > rhs);
case EQ:
- return new Boolean(lhs == rhs);
+ return Boolean.valueOf(lhs == rhs);
case LE:
case LEX:
- return new Boolean(lhs <= rhs);
+ return Boolean.valueOf(lhs <= rhs);
case GE:
case GEX:
- return new Boolean(lhs >= rhs);
+ return Boolean.valueOf(lhs >= rhs);
case NE:
- return new Boolean(lhs != rhs);
+ return Boolean.valueOf(lhs != rhs);
// arithmetic
case PLUS:
- return new Double(lhs + rhs);
+ return Double.valueOf(lhs + rhs);
case MINUS:
- return new Double(lhs - rhs);
+ return Double.valueOf(lhs - rhs);
case STAR:
- return new Double(lhs * rhs);
+ return Double.valueOf(lhs * rhs);
case SLASH:
- return new Double(lhs / rhs);
+ return Double.valueOf(lhs / rhs);
case MOD:
- return new Double(lhs % rhs);
+ return Double.valueOf(lhs % rhs);
// can't shift floating-point values
case LSHIFT:
@@ -554,41 +554,41 @@
// boolean
case LT:
case LTX:
- return new Boolean(lhs < rhs);
+ return Boolean.valueOf(lhs < rhs);
case GT:
case GTX:
- return new Boolean(lhs > rhs);
+ return Boolean.valueOf(lhs > rhs);
case EQ:
- return new Boolean(lhs == rhs);
+ return Boolean.valueOf(lhs == rhs);
case LE:
case LEX:
- return new Boolean(lhs <= rhs);
+ return Boolean.valueOf(lhs <= rhs);
case GE:
case GEX:
- return new Boolean(lhs >= rhs);
+ return Boolean.valueOf(lhs >= rhs);
case NE:
- return new Boolean(lhs != rhs);
+ return Boolean.valueOf(lhs != rhs);
// arithmetic
case PLUS:
- return new Float(lhs + rhs);
+ return Float.valueOf(lhs + rhs);
case MINUS:
- return new Float(lhs - rhs);
+ return Float.valueOf(lhs - rhs);
case STAR:
- return new Float(lhs * rhs);
+ return Float.valueOf(lhs * rhs);
case SLASH:
- return new Float(lhs / rhs);
+ return Float.valueOf(lhs / rhs);
case MOD:
- return new Float(lhs % rhs);
+ return Float.valueOf(lhs % rhs);
// can't shift floats
case LSHIFT:
@@ -611,9 +611,9 @@
static Object promoteToInteger(Object wrapper )
{
if(wrapper instanceof Character)
- return new Integer(((Character)wrapper).charValue());
+ return Integer.valueOf(((Character)wrapper).charValue());
else if((wrapper instanceof Byte) || (wrapper instanceof Short))
- return new Integer(((Number)wrapper).intValue());
+ return Integer.valueOf(((Number)wrapper).intValue());
return wrapper;
}
@@ -637,23 +637,23 @@
if((b = (lnum instanceof Double)) || (rnum instanceof Double))
{
if(b)
- rhs = new Double(rnum.doubleValue());
+ rhs = Double.valueOf(rnum.doubleValue());
else
- lhs = new Double(lnum.doubleValue());
+ lhs = Double.valueOf(lnum.doubleValue());
}
else if((b = (lnum instanceof Float)) || (rnum instanceof Float))
{
if(b)
- rhs = new Float(rnum.floatValue());
+ rhs = Float.valueOf(rnum.floatValue());
else
- lhs = new Float(lnum.floatValue());
+ lhs = Float.valueOf(lnum.floatValue());
}
else if((b = (lnum instanceof Long)) || (rnum instanceof Long))
{
if(b)
- rhs = new Long(rnum.longValue());
+ rhs = Long.valueOf(rnum.longValue());
else
- lhs = new Long(lnum.longValue());
+ lhs = Long.valueOf(lnum.longValue());
}
}
@@ -819,7 +819,7 @@
// Promote character to Number type for these purposes
if (value instanceof Character)
- value = new Integer(((Character)value).charValue());
+ value = Integer.valueOf(((Character)value).charValue());
if (value instanceof Number)
return (Number)value;
@@ -1117,7 +1117,7 @@
// first promote char to Number type to avoid duplicating code
if ( value instanceof Character )
- value = new Integer(((Character)value).charValue());
+ value = Integer.valueOf(((Character)value).charValue());
if ( !(value instanceof Number) )
throw new InterpreterError("bad type in cast");
@@ -1125,19 +1125,19 @@
Number number = (Number)value;
if (toType == Byte.TYPE)
- return new Byte(number.byteValue());
+ return Byte.valueOf(number.byteValue());
if (toType == Short.TYPE)
- return new Short(number.shortValue());
+ return Short.valueOf(number.shortValue());
if (toType == Character.TYPE)
- return new Character((char)number.intValue());
+ return Character.valueOf((char)number.intValue());
if (toType == Integer.TYPE)
- return new Integer(number.intValue());
+ return Integer.valueOf(number.intValue());
if (toType == Long.TYPE)
- return new Long(number.longValue());
+ return Long.valueOf(number.longValue());
if (toType == Float.TYPE)
- return new Float(number.floatValue());
+ return Float.valueOf(number.floatValue());
if (toType == Double.TYPE)
- return new Double(number.doubleValue());
+ return Double.valueOf(number.doubleValue());
throw new InterpreterError("error in wrapper cast");
}
Modified: VASSAL-src/trunk/src/bsh/This.java
===================================================================
--- VASSAL-src/trunk/src/bsh/This.java 2016-11-07 17:28:27 UTC (rev 9241)
+++ VASSAL-src/trunk/src/bsh/This.java 2016-11-19 23:52:20 UTC (rev 9242)
@@ -269,12 +269,12 @@
// a default hashCode()
if ( methodName.equals("hashCode" ) )
- return new Integer(this.hashCode());
+ return Integer.valueOf(this.hashCode());
// a default equals() testing for equality with the This reference
if ( methodName.equals("equals" ) ) {
Object obj = args[0];
- return new Boolean( this == obj );
+ return Boolean.valueOf( this == obj );
}
// Look for a default invoke() handler method in the namespace
Modified: VASSAL-src/trunk/src/bsh/XThis.java
===================================================================
--- VASSAL-src/trunk/src/bsh/XThis.java 2016-11-07 17:28:27 UTC (rev 9241)
+++ VASSAL-src/trunk/src/bsh/XThis.java 2016-11-19 23:52:20 UTC (rev 9242)
@@ -95,7 +95,7 @@
int hash = 21;
for(int i=0; i<ca.length; i++)
hash *= ca[i].hashCode() + 3;
- Object hashKey = new Integer(hash);
+ Object hashKey = Integer.valueOf(hash);
Object interf = interfaces.get( hashKey );
@@ -165,7 +165,7 @@
} catch ( UtilEvalError e ) {/*leave null*/ }
if ( methodName.equals("equals" ) && equalsMethod == null ) {
Object obj = args[0];
- return new Boolean( proxy == obj );
+ return Boolean.valueOf( proxy == obj );
}
/*
Modified: VASSAL-src/trunk/src/bsh/bsh.jjt
===================================================================
--- VASSAL-src/trunk/src/bsh/bsh.jjt 2016-11-07 17:28:27 UTC (rev 9241)
+++ VASSAL-src/trunk/src/bsh/bsh.jjt 2016-11-19 23:52:20 UTC (rev 9242)
@@ -1050,14 +1050,14 @@
if(ch == 'f' || ch == 'F')
{
literal = literal.substring(0,literal.length()-1);
- jjtThis.value = new Primitive( new Float( literal ).floatValue() );
+ jjtThis.value = new Primitive( Float.valueOf( literal ).floatValue() );
}
else
{
if(ch == 'd' || ch == 'D')
literal = literal.substring(0,literal.length()-1);
- jjtThis.value = new Primitive( new Double( literal ).doubleValue() );
+ jjtThis.value = new Primitive( Double.valueOf( literal ).doubleValue() );
}
}
|
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
_______________________________________________
vassalengine-svn mailing list
vas...@li...
https://lists.sourceforge.net/lists/listinfo/vassalengine-svn
|
|
From: <uck...@us...> - 2016-11-07 17:28:31
|
Revision: 9241
http://sourceforge.net/p/vassalengine/svn/9241
Author: uckelman
Date: 2016-11-07 17:28:27 +0000 (Mon, 07 Nov 2016)
Log Message:
-----------
Merged Brent-3.2-Work@9234.
Fixed Bug 9670: IllegalStateException: Icon Family VASSAL not found in
ServerAddressBook.getCurrentIcon
Modified Paths:
--------------
VASSAL-src/trunk/src/VASSAL/tools/ApplicationIcons.java
VASSAL-src/trunk/src/VASSAL/tools/icon/IconFactory.java
Modified: VASSAL-src/trunk/src/VASSAL/tools/ApplicationIcons.java
===================================================================
--- VASSAL-src/trunk/src/VASSAL/tools/ApplicationIcons.java 2016-11-07 17:24:58 UTC (rev 9240)
+++ VASSAL-src/trunk/src/VASSAL/tools/ApplicationIcons.java 2016-11-07 17:28:27 UTC (rev 9241)
@@ -41,6 +41,8 @@
// FIXME: check that parentless dialogs get the right icons
public class ApplicationIcons {
+
+ public static final String VASSAL_ICON_LARGE = "VASSAL-256x256.png";
private ApplicationIcons() {}
@@ -97,7 +99,7 @@
dst, // 24x24
ImageUtils.getImageResource("/icons/32x32/VASSAL.png"),
ImageUtils.getImageResource("/icons/48x48/VASSAL.png"),
- ImageUtils.getImageResource("/images/VASSAL-256x256.png")
+ ImageUtils.getImageResource("/images/"+VASSAL_ICON_LARGE)
);
}
else {
Modified: VASSAL-src/trunk/src/VASSAL/tools/icon/IconFactory.java
===================================================================
--- VASSAL-src/trunk/src/VASSAL/tools/icon/IconFactory.java 2016-11-07 17:24:58 UTC (rev 9240)
+++ VASSAL-src/trunk/src/VASSAL/tools/icon/IconFactory.java 2016-11-07 17:28:27 UTC (rev 9241)
@@ -40,6 +40,7 @@
import VASSAL.build.IllegalBuildException;
import VASSAL.i18n.Resources;
+import VASSAL.tools.ApplicationIcons;
import VASSAL.tools.DataArchive;
import VASSAL.tools.ErrorDialog;
import VASSAL.tools.JarArchive;
@@ -277,7 +278,11 @@
try {
//Build a URL to the Vassal images folder. It is guaranteed to exist
// in any version of Vassal
- imageUrl = jar.getURL(DataArchive.IMAGE_DIR);
+ // Bug 9670 BUT there may also be an images folder in another Jar file in the Classloader path before the Vengine.jar
+ // so look for an Icon we know must exist there.
+ // imageUrl = jar.getURL(DataArchive.IMAGE_DIR
+ imageUrl = jar.getURL(DataArchive.IMAGE_DIR+ApplicationIcons.VASSAL_ICON_LARGE);
+ imageUrl = new URL (imageUrl.toString().substring(0, imageUrl.toString().length() - ApplicationIcons.VASSAL_ICON_LARGE.length()));
logger.info("VASSAL images folder found at "+imageUrl);
// Determine if we are running locally under a debugger, or
// from an installation package. If running an installed version
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
vassalengine-svn mailing list
vas...@li...
https://lists.sourceforge.net/lists/listinfo/vassalengine-svn
|
|
From: <uck...@us...> - 2016-11-07 17:25:01
|
Revision: 9240
http://sourceforge.net/p/vassalengine/svn/9240
Author: uckelman
Date: 2016-11-07 17:24:58 +0000 (Mon, 07 Nov 2016)
Log Message:
-----------
Merged Brent-3.2-Work@9232.
Fixed Bug 12534: Regular Expression matching not supported in Calulated Property
Modified Paths:
--------------
VASSAL-src/trunk/src/bsh/Primitive.java
Modified: VASSAL-src/trunk/src/bsh/Primitive.java
===================================================================
--- VASSAL-src/trunk/src/bsh/Primitive.java 2016-11-07 17:23:53 UTC (rev 9239)
+++ VASSAL-src/trunk/src/bsh/Primitive.java 2016-11-07 17:24:58 UTC (rev 9240)
@@ -36,6 +36,7 @@
import java.util.Map;
import java.util.HashMap;
+import java.util.regex.Pattern;
/**
Wrapper for primitive types in Bsh. This is package public because it
@@ -470,6 +471,9 @@
case PLUS:
return lhs + rhs;
+ case MATCH:
+ return new Boolean(Pattern.matches(rhs, lhs));
+
default:
throw new InterpreterError(
"Unimplemented binary String operator");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
vassalengine-svn mailing list
vas...@li...
https://lists.sourceforge.net/lists/listinfo/vassalengine-svn
|
|
From: <uck...@us...> - 2016-11-07 17:23:57
|
Revision: 9239
http://sourceforge.net/p/vassalengine/svn/9239
Author: uckelman
Date: 2016-11-07 17:23:53 +0000 (Mon, 07 Nov 2016)
Log Message:
-----------
Merged Brent-3.2-Work@9231.
Fixed Bug 12518: Rotated Layer following property does not update if
property changes
Modified Paths:
--------------
VASSAL-src/trunk/src/VASSAL/counters/Embellishment.java
Modified: VASSAL-src/trunk/src/VASSAL/counters/Embellishment.java
===================================================================
--- VASSAL-src/trunk/src/VASSAL/counters/Embellishment.java 2016-11-07 17:22:52 UTC (rev 9238)
+++ VASSAL-src/trunk/src/VASSAL/counters/Embellishment.java 2016-11-07 17:23:53 UTC (rev 9239)
@@ -798,7 +798,9 @@
return String.valueOf(isActive());
}
else if (key.equals(Properties.VISIBLE_STATE)) {
+ checkPropertyLevel();
String s = String.valueOf(super.getProperty(key));
+ s += value;
if (drawUnderneathWhenSelected) {
s += getProperty(Properties.SELECTED);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
vassalengine-svn mailing list
vas...@li...
https://lists.sourceforge.net/lists/listinfo/vassalengine-svn
|
|
From: <uck...@us...> - 2016-11-07 17:22:55
|
Revision: 9238
http://sourceforge.net/p/vassalengine/svn/9238
Author: uckelman
Date: 2016-11-07 17:22:52 +0000 (Mon, 07 Nov 2016)
Log Message:
-----------
Merged Brent-3.2-Work@9230.
Fixed Bug 12533: Game Refresher fails if Extensions are loaded.
Modified Paths:
--------------
VASSAL-src/trunk/src/VASSAL/build/GpIdChecker.java
Modified: VASSAL-src/trunk/src/VASSAL/build/GpIdChecker.java
===================================================================
--- VASSAL-src/trunk/src/VASSAL/build/GpIdChecker.java 2016-11-07 17:21:40 UTC (rev 9237)
+++ VASSAL-src/trunk/src/VASSAL/build/GpIdChecker.java 2016-11-07 17:22:52 UTC (rev 9238)
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2013 by Brent Easton
+ * Copyright (c) 2011-2016 by Brent Easton
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -39,6 +39,7 @@
protected GpIdSupport gpIdSupport;
protected int maxId;
protected boolean useName = false;
+ protected boolean extensionsLoaded = false;
final HashMap<String, SlotElement> goodSlots = new HashMap<String, SlotElement>();
final ArrayList<SlotElement> errorSlots = new ArrayList<SlotElement>();
@@ -51,9 +52,11 @@
maxId = -1;
}
+ // This constructor is used by the GameRefresher to refresh a game with extensions possibly loaded
public GpIdChecker(boolean useName) {
this();
this.useName = useName;
+ this.extensionsLoaded = true;
}
/**
@@ -105,10 +108,16 @@
protected void testGpId(String id, SlotElement element) {
/*
* If this has been called from a ModuleExtension, the GpId is prefixed with
- * the Extension Id. Remove the Extension Id and just process the numerid part.
+ * the Extension Id. Remove the Extension Id and just process the numeric part.
+ *
+ * NOTE: If GpIdChecker is being used by the GameRefesher, then there may be
+ * extensions loaded, so retain the extension prefix to ensure a correct
+ * unique slot id check.
*/
- if (id.contains(":")) {
- id = id.split(":")[1];
+ if (! extensionsLoaded) {
+ if (id.contains(":")) {
+ id = id.split(":")[1];
+ }
}
if (id == null || id.length() == 0) { // gpid not generated yet?
@@ -119,11 +128,17 @@
errorSlots.add(element);
}
try {
- final int iid = Integer.parseInt(id);
- goodSlots.put(id, element); // gpid is good.
- if (iid >= maxId) {
- maxId = iid+1;
+ if (extensionsLoaded) {
+ goodSlots.put(id, element);
+ System.out.println("Add Id "+id);
}
+ else {
+ final int iid = Integer.parseInt(id);
+ goodSlots.put(id, element); // gpid is good.
+ if (iid >= maxId) {
+ maxId = iid+1;
+ }
+ }
}
catch (Exception e) {
errorSlots.add(element); // non-numeric gpid?
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
vassalengine-svn mailing list
vas...@li...
https://lists.sourceforge.net/lists/listinfo/vassalengine-svn
|
|
From: <uck...@us...> - 2016-11-07 17:21:44
|
Revision: 9237
http://sourceforge.net/p/vassalengine/svn/9237
Author: uckelman
Date: 2016-11-07 17:21:40 +0000 (Mon, 07 Nov 2016)
Log Message:
-----------
Reverted previous merge.
Modified Paths:
--------------
VASSAL-src/trunk/src/VASSAL/build/GpIdChecker.java
VASSAL-src/trunk/src/VASSAL/counters/Embellishment.java
VASSAL-src/trunk/src/VASSAL/tools/ApplicationIcons.java
VASSAL-src/trunk/src/VASSAL/tools/icon/IconFactory.java
VASSAL-src/trunk/src/bsh/Primitive.java
Modified: VASSAL-src/trunk/src/VASSAL/build/GpIdChecker.java
===================================================================
--- VASSAL-src/trunk/src/VASSAL/build/GpIdChecker.java 2016-11-07 17:10:16 UTC (rev 9236)
+++ VASSAL-src/trunk/src/VASSAL/build/GpIdChecker.java 2016-11-07 17:21:40 UTC (rev 9237)
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2016 by Brent Easton
+ * Copyright (c) 2011-2013 by Brent Easton
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -39,7 +39,6 @@
protected GpIdSupport gpIdSupport;
protected int maxId;
protected boolean useName = false;
- protected boolean extensionsLoaded = false;
final HashMap<String, SlotElement> goodSlots = new HashMap<String, SlotElement>();
final ArrayList<SlotElement> errorSlots = new ArrayList<SlotElement>();
@@ -52,11 +51,9 @@
maxId = -1;
}
- // This constructor is used by the GameRefresher to refresh a game with extensions possibly loaded
public GpIdChecker(boolean useName) {
this();
this.useName = useName;
- this.extensionsLoaded = true;
}
/**
@@ -108,16 +105,10 @@
protected void testGpId(String id, SlotElement element) {
/*
* If this has been called from a ModuleExtension, the GpId is prefixed with
- * the Extension Id. Remove the Extension Id and just process the numeric part.
- *
- * NOTE: If GpIdChecker is being used by the GameRefesher, then there may be
- * extensions loaded, so retain the extension prefix to ensure a correct
- * unique slot id check.
+ * the Extension Id. Remove the Extension Id and just process the numerid part.
*/
- if (! extensionsLoaded) {
- if (id.contains(":")) {
- id = id.split(":")[1];
- }
+ if (id.contains(":")) {
+ id = id.split(":")[1];
}
if (id == null || id.length() == 0) { // gpid not generated yet?
@@ -128,17 +119,11 @@
errorSlots.add(element);
}
try {
- if (extensionsLoaded) {
- goodSlots.put(id, element);
- System.out.println("Add Id "+id);
+ final int iid = Integer.parseInt(id);
+ goodSlots.put(id, element); // gpid is good.
+ if (iid >= maxId) {
+ maxId = iid+1;
}
- else {
- final int iid = Integer.parseInt(id);
- goodSlots.put(id, element); // gpid is good.
- if (iid >= maxId) {
- maxId = iid+1;
- }
- }
}
catch (Exception e) {
errorSlots.add(element); // non-numeric gpid?
@@ -353,4 +338,4 @@
return null;
}
}
-}
+}
\ No newline at end of file
Modified: VASSAL-src/trunk/src/VASSAL/counters/Embellishment.java
===================================================================
--- VASSAL-src/trunk/src/VASSAL/counters/Embellishment.java 2016-11-07 17:10:16 UTC (rev 9236)
+++ VASSAL-src/trunk/src/VASSAL/counters/Embellishment.java 2016-11-07 17:21:40 UTC (rev 9237)
@@ -798,9 +798,7 @@
return String.valueOf(isActive());
}
else if (key.equals(Properties.VISIBLE_STATE)) {
- checkPropertyLevel();
String s = String.valueOf(super.getProperty(key));
- s += value;
if (drawUnderneathWhenSelected) {
s += getProperty(Properties.SELECTED);
}
Modified: VASSAL-src/trunk/src/VASSAL/tools/ApplicationIcons.java
===================================================================
--- VASSAL-src/trunk/src/VASSAL/tools/ApplicationIcons.java 2016-11-07 17:10:16 UTC (rev 9236)
+++ VASSAL-src/trunk/src/VASSAL/tools/ApplicationIcons.java 2016-11-07 17:21:40 UTC (rev 9237)
@@ -41,8 +41,6 @@
// FIXME: check that parentless dialogs get the right icons
public class ApplicationIcons {
-
- public static final String VASSAL_ICON_LARGE = "VASSAL-256x256.png";
private ApplicationIcons() {}
@@ -99,7 +97,7 @@
dst, // 24x24
ImageUtils.getImageResource("/icons/32x32/VASSAL.png"),
ImageUtils.getImageResource("/icons/48x48/VASSAL.png"),
- ImageUtils.getImageResource("/images/"+VASSAL_ICON_LARGE)
+ ImageUtils.getImageResource("/images/VASSAL-256x256.png")
);
}
else {
Modified: VASSAL-src/trunk/src/VASSAL/tools/icon/IconFactory.java
===================================================================
--- VASSAL-src/trunk/src/VASSAL/tools/icon/IconFactory.java 2016-11-07 17:10:16 UTC (rev 9236)
+++ VASSAL-src/trunk/src/VASSAL/tools/icon/IconFactory.java 2016-11-07 17:21:40 UTC (rev 9237)
@@ -40,7 +40,6 @@
import VASSAL.build.IllegalBuildException;
import VASSAL.i18n.Resources;
-import VASSAL.tools.ApplicationIcons;
import VASSAL.tools.DataArchive;
import VASSAL.tools.ErrorDialog;
import VASSAL.tools.JarArchive;
@@ -278,11 +277,7 @@
try {
//Build a URL to the Vassal images folder. It is guaranteed to exist
// in any version of Vassal
- // Bug 9670 BUT there may also be an images folder in another Jar file in the Classloader path before the Vengine.jar
- // so look for an Icon we know must exist there.
- // imageUrl = jar.getURL(DataArchive.IMAGE_DIR
- imageUrl = jar.getURL(DataArchive.IMAGE_DIR+ApplicationIcons.VASSAL_ICON_LARGE);
- imageUrl = new URL (imageUrl.toString().substring(0, imageUrl.toString().length() - ApplicationIcons.VASSAL_ICON_LARGE.length()));
+ imageUrl = jar.getURL(DataArchive.IMAGE_DIR);
logger.info("VASSAL images folder found at "+imageUrl);
// Determine if we are running locally under a debugger, or
// from an installation package. If running an installed version
Modified: VASSAL-src/trunk/src/bsh/Primitive.java
===================================================================
--- VASSAL-src/trunk/src/bsh/Primitive.java 2016-11-07 17:10:16 UTC (rev 9236)
+++ VASSAL-src/trunk/src/bsh/Primitive.java 2016-11-07 17:21:40 UTC (rev 9237)
@@ -36,7 +36,6 @@
import java.util.Map;
import java.util.HashMap;
-import java.util.regex.Pattern;
/**
Wrapper for primitive types in Bsh. This is package public because it
@@ -471,9 +470,6 @@
case PLUS:
return lhs + rhs;
- case MATCH:
- return new Boolean(Pattern.matches(rhs, lhs));
-
default:
throw new InterpreterError(
"Unimplemented binary String operator");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
vassalengine-svn mailing list
vas...@li...
https://lists.sourceforge.net/lists/listinfo/vassalengine-svn
|
|
From: <uck...@us...> - 2016-11-07 17:10:20
|
Revision: 9236
http://sourceforge.net/p/vassalengine/svn/9236
Author: uckelman
Date: 2016-11-07 17:10:16 +0000 (Mon, 07 Nov 2016)
Log Message:
-----------
Merge branch 'brent' into merge
Modified Paths:
--------------
VASSAL-src/trunk/src/VASSAL/build/GpIdChecker.java
VASSAL-src/trunk/src/VASSAL/counters/Embellishment.java
VASSAL-src/trunk/src/VASSAL/tools/ApplicationIcons.java
VASSAL-src/trunk/src/VASSAL/tools/icon/IconFactory.java
VASSAL-src/trunk/src/bsh/Primitive.java
Modified: VASSAL-src/trunk/src/VASSAL/build/GpIdChecker.java
===================================================================
--- VASSAL-src/trunk/src/VASSAL/build/GpIdChecker.java 2016-10-22 23:02:07 UTC (rev 9235)
+++ VASSAL-src/trunk/src/VASSAL/build/GpIdChecker.java 2016-11-07 17:10:16 UTC (rev 9236)
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2013 by Brent Easton
+ * Copyright (c) 2011-2016 by Brent Easton
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -39,6 +39,7 @@
protected GpIdSupport gpIdSupport;
protected int maxId;
protected boolean useName = false;
+ protected boolean extensionsLoaded = false;
final HashMap<String, SlotElement> goodSlots = new HashMap<String, SlotElement>();
final ArrayList<SlotElement> errorSlots = new ArrayList<SlotElement>();
@@ -51,9 +52,11 @@
maxId = -1;
}
+ // This constructor is used by the GameRefresher to refresh a game with extensions possibly loaded
public GpIdChecker(boolean useName) {
this();
this.useName = useName;
+ this.extensionsLoaded = true;
}
/**
@@ -105,10 +108,16 @@
protected void testGpId(String id, SlotElement element) {
/*
* If this has been called from a ModuleExtension, the GpId is prefixed with
- * the Extension Id. Remove the Extension Id and just process the numerid part.
+ * the Extension Id. Remove the Extension Id and just process the numeric part.
+ *
+ * NOTE: If GpIdChecker is being used by the GameRefesher, then there may be
+ * extensions loaded, so retain the extension prefix to ensure a correct
+ * unique slot id check.
*/
- if (id.contains(":")) {
- id = id.split(":")[1];
+ if (! extensionsLoaded) {
+ if (id.contains(":")) {
+ id = id.split(":")[1];
+ }
}
if (id == null || id.length() == 0) { // gpid not generated yet?
@@ -119,11 +128,17 @@
errorSlots.add(element);
}
try {
- final int iid = Integer.parseInt(id);
- goodSlots.put(id, element); // gpid is good.
- if (iid >= maxId) {
- maxId = iid+1;
+ if (extensionsLoaded) {
+ goodSlots.put(id, element);
+ System.out.println("Add Id "+id);
}
+ else {
+ final int iid = Integer.parseInt(id);
+ goodSlots.put(id, element); // gpid is good.
+ if (iid >= maxId) {
+ maxId = iid+1;
+ }
+ }
}
catch (Exception e) {
errorSlots.add(element); // non-numeric gpid?
@@ -338,4 +353,4 @@
return null;
}
}
-}
\ No newline at end of file
+}
Modified: VASSAL-src/trunk/src/VASSAL/counters/Embellishment.java
===================================================================
--- VASSAL-src/trunk/src/VASSAL/counters/Embellishment.java 2016-10-22 23:02:07 UTC (rev 9235)
+++ VASSAL-src/trunk/src/VASSAL/counters/Embellishment.java 2016-11-07 17:10:16 UTC (rev 9236)
@@ -798,7 +798,9 @@
return String.valueOf(isActive());
}
else if (key.equals(Properties.VISIBLE_STATE)) {
+ checkPropertyLevel();
String s = String.valueOf(super.getProperty(key));
+ s += value;
if (drawUnderneathWhenSelected) {
s += getProperty(Properties.SELECTED);
}
Modified: VASSAL-src/trunk/src/VASSAL/tools/ApplicationIcons.java
===================================================================
--- VASSAL-src/trunk/src/VASSAL/tools/ApplicationIcons.java 2016-10-22 23:02:07 UTC (rev 9235)
+++ VASSAL-src/trunk/src/VASSAL/tools/ApplicationIcons.java 2016-11-07 17:10:16 UTC (rev 9236)
@@ -41,6 +41,8 @@
// FIXME: check that parentless dialogs get the right icons
public class ApplicationIcons {
+
+ public static final String VASSAL_ICON_LARGE = "VASSAL-256x256.png";
private ApplicationIcons() {}
@@ -97,7 +99,7 @@
dst, // 24x24
ImageUtils.getImageResource("/icons/32x32/VASSAL.png"),
ImageUtils.getImageResource("/icons/48x48/VASSAL.png"),
- ImageUtils.getImageResource("/images/VASSAL-256x256.png")
+ ImageUtils.getImageResource("/images/"+VASSAL_ICON_LARGE)
);
}
else {
Modified: VASSAL-src/trunk/src/VASSAL/tools/icon/IconFactory.java
===================================================================
--- VASSAL-src/trunk/src/VASSAL/tools/icon/IconFactory.java 2016-10-22 23:02:07 UTC (rev 9235)
+++ VASSAL-src/trunk/src/VASSAL/tools/icon/IconFactory.java 2016-11-07 17:10:16 UTC (rev 9236)
@@ -40,6 +40,7 @@
import VASSAL.build.IllegalBuildException;
import VASSAL.i18n.Resources;
+import VASSAL.tools.ApplicationIcons;
import VASSAL.tools.DataArchive;
import VASSAL.tools.ErrorDialog;
import VASSAL.tools.JarArchive;
@@ -277,7 +278,11 @@
try {
//Build a URL to the Vassal images folder. It is guaranteed to exist
// in any version of Vassal
- imageUrl = jar.getURL(DataArchive.IMAGE_DIR);
+ // Bug 9670 BUT there may also be an images folder in another Jar file in the Classloader path before the Vengine.jar
+ // so look for an Icon we know must exist there.
+ // imageUrl = jar.getURL(DataArchive.IMAGE_DIR
+ imageUrl = jar.getURL(DataArchive.IMAGE_DIR+ApplicationIcons.VASSAL_ICON_LARGE);
+ imageUrl = new URL (imageUrl.toString().substring(0, imageUrl.toString().length() - ApplicationIcons.VASSAL_ICON_LARGE.length()));
logger.info("VASSAL images folder found at "+imageUrl);
// Determine if we are running locally under a debugger, or
// from an installation package. If running an installed version
Modified: VASSAL-src/trunk/src/bsh/Primitive.java
===================================================================
--- VASSAL-src/trunk/src/bsh/Primitive.java 2016-10-22 23:02:07 UTC (rev 9235)
+++ VASSAL-src/trunk/src/bsh/Primitive.java 2016-11-07 17:10:16 UTC (rev 9236)
@@ -36,6 +36,7 @@
import java.util.Map;
import java.util.HashMap;
+import java.util.regex.Pattern;
/**
Wrapper for primitive types in Bsh. This is package public because it
@@ -470,6 +471,9 @@
case PLUS:
return lhs + rhs;
+ case MATCH:
+ return new Boolean(Pattern.matches(rhs, lhs));
+
default:
throw new InterpreterError(
"Unimplemented binary String operator");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
vassalengine-svn mailing list
vas...@li...
https://lists.sourceforge.net/lists/listinfo/vassalengine-svn
|
|
From: <uck...@us...> - 2016-10-22 23:02:10
|
Revision: 9235
http://sourceforge.net/p/vassalengine/svn/9235
Author: uckelman
Date: 2016-10-22 23:02:07 +0000 (Sat, 22 Oct 2016)
Log Message:
-----------
Additional fix for Bug 11404: Missed two uses of Random.nextFloat()
which cause modulo bias.
Modified Paths:
--------------
VASSAL-src/trunk/src/VASSAL/build/module/RandomTextButton.java
VASSAL-src/trunk/src/VASSAL/build/module/dice/DieServer.java
Modified: VASSAL-src/trunk/src/VASSAL/build/module/RandomTextButton.java
===================================================================
--- VASSAL-src/trunk/src/VASSAL/build/module/RandomTextButton.java 2016-10-08 02:25:09 UTC (rev 9234)
+++ VASSAL-src/trunk/src/VASSAL/build/module/RandomTextButton.java 2016-10-22 23:02:07 UTC (rev 9235)
@@ -108,7 +108,7 @@
final StringBuilder result = new StringBuilder();
int total = addToTotal;
for (int i = 0; i < nDice; ++i) {
- int roll = (int) (ran.nextFloat() * nSides + 1);
+ int roll = ran.nextInt(nSides) + 1;
// take the face value from user defined faces
if (isNumeric) {
Modified: VASSAL-src/trunk/src/VASSAL/build/module/dice/DieServer.java
===================================================================
--- VASSAL-src/trunk/src/VASSAL/build/module/dice/DieServer.java 2016-10-08 02:25:09 UTC (rev 9234)
+++ VASSAL-src/trunk/src/VASSAL/build/module/dice/DieServer.java 2016-10-22 23:02:07 UTC (rev 9235)
@@ -164,7 +164,7 @@
String val = getReportPrefix(desc);
int total = 0;
for (int j = 0; j < nDice; ++j) {
- int result = (int) (ran.nextFloat() * nSides + 1) + plus;
+ final int result = ran.nextInt(nSides) + 1 + plus;
if (reportTotal) {
total += result;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
vassalengine-svn mailing list
vas...@li...
https://lists.sourceforge.net/lists/listinfo/vassalengine-svn
|
|
From: <uck...@us...> - 2016-05-10 18:19:25
|
Revision: 9228
http://sourceforge.net/p/vassalengine/svn/9228
Author: uckelman
Date: 2016-05-10 18:19:22 +0000 (Tue, 10 May 2016)
Log Message:
-----------
Don't reset lastSaveFile during setup().
Modified Paths:
--------------
VASSAL-src/trunk/src/VASSAL/build/module/GameState.java
Modified: VASSAL-src/trunk/src/VASSAL/build/module/GameState.java
===================================================================
--- VASSAL-src/trunk/src/VASSAL/build/module/GameState.java 2016-05-09 08:00:52 UTC (rev 9227)
+++ VASSAL-src/trunk/src/VASSAL/build/module/GameState.java 2016-05-10 18:19:22 UTC (rev 9228)
@@ -325,9 +325,6 @@
gameStarted |= this.gameStarting;
lastSave = gameStarting ? saveString() : null;
- if (!gameStarting) {
- lastSaveFile = null;
- }
}
/** Return true if a game is currently in progress */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
vassalengine-svn mailing list
vas...@li...
https://lists.sourceforge.net/lists/listinfo/vassalengine-svn
|
|
From: <swa...@us...> - 2016-05-09 08:00:56
|
Revision: 9227
http://sourceforge.net/p/vassalengine/svn/9227
Author: swampwallaby
Date: 2016-05-09 08:00:52 +0000 (Mon, 09 May 2016)
Log Message:
-----------
Fix company stacking issue
Modified Paths:
--------------
VSQL-src/trunk/bfn/StackingChecker.java
Modified: VSQL-src/trunk/bfn/StackingChecker.java
===================================================================
--- VSQL-src/trunk/bfn/StackingChecker.java 2016-05-09 07:59:14 UTC (rev 9226)
+++ VSQL-src/trunk/bfn/StackingChecker.java 2016-05-09 08:00:52 UTC (rev 9227)
@@ -142,7 +142,9 @@
boolean geHqFpSeen = false;
boolean navalSeen = false;
boolean nonNavalSeen = false;
+ boolean isCompany = false;
+
for (GamePiece piece : pieces) {
final String pieceType = (String) piece.getProperty(BfnProperties.TYPE);
@@ -177,8 +179,9 @@
final String unitClass = (String) piece.getProperty(BfnProperties.CLASS);
final String unitSubClass = (String) piece.getProperty(BfnProperties.SUBCLASS);
+ isCompany = "true".equals(piece.getProperty(BfnProperties.PROP_BRK));
- if (BfnProperties.SUBCLASS_BREAKDOWN.equals(unitSubClass)) {
+ if (isCompany) {
companyCount++;
}
else {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
vassalengine-svn mailing list
vas...@li...
https://lists.sourceforge.net/lists/listinfo/vassalengine-svn
|
|
From: <swa...@us...> - 2016-05-09 07:59:18
|
Revision: 9226
http://sourceforge.net/p/vassalengine/svn/9226
Author: swampwallaby
Date: 2016-05-09 07:59:14 +0000 (Mon, 09 May 2016)
Log Message:
-----------
GTS Tinian Support
Modified Paths:
--------------
VSQL-src/trunk/tdc/AttackWizard.java
VSQL-src/trunk/tdc/CommandRangeChecker.java
VSQL-src/trunk/tdc/TdcCounterDetailViewer.java
VSQL-src/trunk/tdc/TdcProperties.java
VSQL-src/trunk/tdc/TdcRatings.java
VSQL-src/trunk/tdc/TdcWizard.java
VSQL-src/trunk/tdc/UnitInfo.java
VSQL-src/trunk/tdc/attack/AttackModel.java
Modified: VSQL-src/trunk/tdc/AttackWizard.java
===================================================================
--- VSQL-src/trunk/tdc/AttackWizard.java 2016-04-27 14:11:01 UTC (rev 9225)
+++ VSQL-src/trunk/tdc/AttackWizard.java 2016-05-09 07:59:14 UTC (rev 9226)
@@ -169,7 +169,7 @@
specialAttackType = NO_SPECIAL_ATTACK;
setSource(source);
setArtilleryPark(artilleryPark);
- if (sourceInfo.isNaval()) {
+ if (sourceInfo.isIndirectFire()) {
GamePiece assaultForceMarker = null;
// Find the matching assault force counter
@@ -181,7 +181,8 @@
for (int i = 0; i < s.getPieceCount(); i++) {
GamePiece u = s.getPieceAt(i);
if (TdcProperties.TYPE_ARTILLERY_PARK.equals(u.getProperty(TdcProperties.TYPE))) {
- if (TdcProperties.DIVISION_NAVAL.equals(u.getProperty(TdcProperties.DIVISION))) {
+ if (TdcProperties.DIVISION_NAVAL.equals(u.getProperty(TdcProperties.DIVISION))
+ || (UnitInfo.isTinianRules() && TdcProperties.DIVISION_4MARINES.equals(u.getProperty(TdcProperties.DIVISION)))) {
String park = (String) u.getProperty(TdcProperties.ARTILLERY_PARK_ID);
if (park != null && park.equals(parkId)) {
assaultForceMarker = u;
@@ -190,6 +191,17 @@
}
}
}
+ else {
+ if (TdcProperties.TYPE_ARTILLERY_PARK.equals(un.getProperty(TdcProperties.TYPE))) {
+ if (TdcProperties.DIVISION_NAVAL.equals(un.getProperty(TdcProperties.DIVISION))
+ || (UnitInfo.isTinianRules() && TdcProperties.DIVISION_4MARINES.equals(un.getProperty(TdcProperties.DIVISION)))) {
+ String park = (String) un.getProperty(TdcProperties.ARTILLERY_PARK_ID);
+ if (park != null && park.equals(parkId)) {
+ assaultForceMarker = un;
+ }
+ }
+ }
+ }
}
}
// Launch an attack with an indirect range
Modified: VSQL-src/trunk/tdc/CommandRangeChecker.java
===================================================================
--- VSQL-src/trunk/tdc/CommandRangeChecker.java 2016-04-27 14:11:01 UTC (rev 9225)
+++ VSQL-src/trunk/tdc/CommandRangeChecker.java 2016-05-09 07:59:14 UTC (rev 9226)
@@ -186,6 +186,7 @@
}
}
+ // NQOS Artillery units in Artillery Parks
if (TdcProperties.BIR_HACHEIM.equals(piece.getProperty("CurrentBoard"))) {
final String location = (String) piece.getProperty("LocationName");
if (location != null && location.startsWith(TdcProperties.ARTILLERY_PARK)) {
@@ -199,6 +200,14 @@
return true;
}
}
+
+ // Tinian Artillery units in Artillery Parks
+ if (UnitInfo.isTinianRules()) {
+ final String zone = (String) piece.getProperty(BasicPiece.CURRENT_ZONE);
+ if ("Saipan".equals(zone) || TdcProperties.TGD_ARTY_PARK.equals(zone)) {
+ return true;
+ }
+ }
// Units of the 736th Regiment are Always in command if the 736TelCmd option
// is true and
Modified: VSQL-src/trunk/tdc/TdcCounterDetailViewer.java
===================================================================
--- VSQL-src/trunk/tdc/TdcCounterDetailViewer.java 2016-04-27 14:11:01 UTC (rev 9225)
+++ VSQL-src/trunk/tdc/TdcCounterDetailViewer.java 2016-05-09 07:59:14 UTC (rev 9226)
@@ -681,6 +681,11 @@
if (inBirHachiem)
terrain += ", In Bir Hachiem";
+ String poi = (String) hgrid.getProperty(TdcProperties.TERRAIN_POI, snapPt);
+ if (poi != null) {
+ terrain += "("+poi+")";
+ }
+
time = (String) GameModule.getGameModule().getProperty(TdcProperties.TIME);
if (time == null)
time = "";
Modified: VSQL-src/trunk/tdc/TdcProperties.java
===================================================================
--- VSQL-src/trunk/tdc/TdcProperties.java 2016-04-27 14:11:01 UTC (rev 9225)
+++ VSQL-src/trunk/tdc/TdcProperties.java 2016-05-09 07:59:14 UTC (rev 9226)
@@ -136,6 +136,7 @@
public static final String RULES_NQOS = "NQOS";
public static final String RULES_TGD = "TGD";
public static final String RULES_DDAY = "DDAY"; // For compatibility with early versions of module
+ public static final String RULES_TINIAN = "TINIAN";
public static final String SDZ_1AB = "SDZ-1AB";
public static final String SDZ_52AL = "SDZ-52AL";
@@ -166,8 +167,6 @@
public static final String ARTILLERY_PARK = "Artillery Park";
// D-DAY
-
- //
public static final String TERRAIN_CLEAR = "Clear";
public static final String TERRAIN_POLDER = "Polder";
public static final String TERRAIN_OOIJ_POLDER = "Ooij Polder";
@@ -187,6 +186,26 @@
public static final String TERRAIN_MARSH = "Marsh";
public static final String TERRAIN_HILL = "Hill";
+ // TINIAN
+ public static final String TERRAIN_RUNWAY = "Runway";
+ public static final String TERRAIN_SUGAR_CANE = "Sugar Cane";
+ public static final String TERRAIN_BRUSH = "Brush";
+ public static final String TERRAIN_CAVE = "Cave";
+ public static final String TERRAIN_ROCKY = "Rocky";
+ public static final String TERRAIN_BUILDINGS = "Buildings";
+ public static final String TERRAIN_SLOPE = "Slope";
+ public static final String TERRAIN_STEEP_SLOPE = "Steep Slope";
+ public static final String TERRAIN_STACKING = "Stacking";
+ public static final String TERRAIN_TRAIL = "Trail";
+ public static final String TERRAIN_POI = "POI";
+ public static final String TERRAIN_OVERRIDE = "Terrain"; // Counter overriding hex terrain
+ public static final String TERRAIN_BLOCKING = "Blocking"; // Counter overriding terrain blocking
+ public static final String SUBCLASS_NAVAL_GUN = "NavalGun";
+ public static final String DIVISION_2MARINES = "2mar";
+ public static final String DIVISION_4MARINES = "4mar";
+ public static final String DIVISION_IMP_ARMY = "jp-army";
+ public static final String DIVISION_IMP_NAVY = "jp-navy";
+
public static final String RATINGS = "Ratings";
public static final String RATING_INDIRECT = "Rating-Indirect";
@@ -212,7 +231,8 @@
public static final String TYPE_ARTILLERY_MARKER = "ArtilleryMarker";
public static final String TYPE_BEACH_DEFENCE = "BeachDefence";
public static final String TYPE_AIR = "Air";
-
+ public static final String TYPE_CAVE = "Cave";
+
public static final String CLASS_HEROIC = "Heroic";
public static final String CLASS_LANDING_CRAFT = "LandingCraft";
public static final String CLASS_LCS = "LCS";
@@ -251,6 +271,7 @@
public static final String NAVAL_LONG_RANGE = "Long";
public static final String NAVAL_MEDIUM_RANGE = "Medium";
public static final String NAVAL_SHORT_RANGE = "Short";
+ public static final String NAVAL_SAIPAN_RANGE = "Saipan";
public static final String NAVAL_EN_ROUTE = "En Route";
public static final String NAVAL_LOADING = "Loading";
public static final String NAVAL_LANDING = "Landing";
Modified: VSQL-src/trunk/tdc/TdcRatings.java
===================================================================
--- VSQL-src/trunk/tdc/TdcRatings.java 2016-04-27 14:11:01 UTC (rev 9225)
+++ VSQL-src/trunk/tdc/TdcRatings.java 2016-05-09 07:59:14 UTC (rev 9226)
@@ -88,7 +88,7 @@
"24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38",
"39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53",
"54", "55", "56", "57", "58", "59", "60", "61", "62", "63", "64", "65", "66", "67", "68",
- "69", "70" };
+ "69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "80", "81", "82", "83" };
protected static final String[] DEF_RATINGS = new String[] { "-5", "-4", "-3", "-2", "-1", "0",
"+1", "+2", "+3", "+4", "+5" };
Modified: VSQL-src/trunk/tdc/TdcWizard.java
===================================================================
--- VSQL-src/trunk/tdc/TdcWizard.java 2016-04-27 14:11:01 UTC (rev 9225)
+++ VSQL-src/trunk/tdc/TdcWizard.java 2016-05-09 07:59:14 UTC (rev 9226)
@@ -209,6 +209,9 @@
final String aparkMap = (String) piece.getProperty(TdcProperties.ARTILLERY_PARK_MAP);
final String parkId = (String) piece.getProperty(TdcProperties.ARTILLERY_PARK_ID);
final Map map = Map.getMapById(aparkMap);
+ if (map == null) {
+ return;
+ }
// Locate all Artillery Units in the matching Artillery Park on the matching
// Division display
@@ -220,7 +223,7 @@
if ("true".equals(unit.getProperty(TdcProperties.IS_ARTILLERY))) {
final String zone = (String) unit.getProperty(BasicPiece.CURRENT_ZONE);
final String location = (String) unit.getProperty(BasicPiece.LOCATION_NAME);
- if (TdcProperties.TGD_ARTY_PARK.equals(zone) && parkId.equals(location)) {
+ if (zone != null && zone.startsWith(TdcProperties.TGD_ARTY_PARK) && parkId.equals(location)) {
units.add(unit);
}
}
Modified: VSQL-src/trunk/tdc/UnitInfo.java
===================================================================
--- VSQL-src/trunk/tdc/UnitInfo.java 2016-04-27 14:11:01 UTC (rev 9225)
+++ VSQL-src/trunk/tdc/UnitInfo.java 2016-05-09 07:59:14 UTC (rev 9226)
@@ -146,9 +146,17 @@
return TdcProperties.RULES_NQOS.equals(getRuleSet());
}
+ public static boolean isGTS2Rules() {
+ return isTgdRules() || isTinianRules();
+ }
+
public static boolean isTgdRules() {
return TdcProperties.RULES_TGD.equals(getRuleSet()) || TdcProperties.RULES_DDAY.equals(getRuleSet());
}
+
+ public static boolean isTinianRules() {
+ return TdcProperties.RULES_TINIAN.equals(getRuleSet());
+ }
public static int getArtilleryDirectRange() {
return isNqosRules() ? 5 : 4;
@@ -163,7 +171,7 @@
else if (TdcProperties.NAVAL_MEDIUM_RANGE.equals(boxname)) {
r = 20;
}
- else if (TdcProperties.NAVAL_SHORT_RANGE.equals(boxname)) {
+ else if (TdcProperties.NAVAL_SHORT_RANGE.equals(boxname) || TdcProperties.NAVAL_SAIPAN_RANGE.equals(boxname)) {
r = 10;
}
@@ -363,9 +371,14 @@
return TdcProperties.DIVISION_NAVAL.equals(division) && !TdcProperties.CLASS_LANDING_CRAFT.equals(unitClass);
}
+ public boolean isIndirectFire() {
+ return isNaval() ||
+ (isTinianRules() && isArtillery() && "Saipan".equals(unit.getProperty(BasicPiece.CURRENT_ZONE)));
+ }
+
public int getNavalRange() {
int r = 0;
- if (isNaval()) {
+ if (isIndirectFire()) {
r = UnitInfo.calculateNavalAddRange((String) unit.getProperty(TdcProperties.NAVAL_BOX));
}
return r;
@@ -510,16 +523,30 @@
terrainInfo.put(TdcProperties.TERRAIN_BRUSHWOODS, new TerrainInfo(TdcProperties.TERRAIN_BRUSHWOODS, -2));
terrainInfo.put(TdcProperties.TERRAIN_SWAMP, new TerrainInfo(TdcProperties.TERRAIN_SWAMP, 1));
terrainInfo.put(TdcProperties.TERRAIN_SAND_DUNES, new TerrainInfo(TdcProperties.TERRAIN_SAND_DUNES, -1));
- terrainInfo.put(TdcProperties.TERRAIN_VILLAGE, new TerrainInfo(TdcProperties.TERRAIN_VILLAGE, -1));
- terrainInfo.put(TdcProperties.TERRAIN_TOWN, new TerrainInfo(TdcProperties.TERRAIN_TOWN, -2));
terrainInfo.put(TdcProperties.TERRAIN_CITY, new TerrainInfo(TdcProperties.TERRAIN_CITY, -3));
terrainInfo.put(TdcProperties.TERRAIN_FORTIFIED, new TerrainInfo(TdcProperties.TERRAIN_FORTIFIED, -4));
terrainInfo.put(TdcProperties.TERRAIN_DESERT, new TerrainInfo(TdcProperties.TERRAIN_DESERT, 0));
- terrainInfo.put(TdcProperties.TERRAIN_BEACH, new TerrainInfo(TdcProperties.TERRAIN_BEACH, 1));
- terrainInfo.put(TdcProperties.TERRAIN_MARSH, new TerrainInfo(TdcProperties.TERRAIN_MARSH, 1));
terrainInfo.put(TdcProperties.TERRAIN_BOCAGE, new TerrainInfo(TdcProperties.TERRAIN_BOCAGE, -2));
terrainInfo.put(TdcProperties.TERRAIN_BOCAGE, new TerrainInfo(TdcProperties.TERRAIN_HEDGEROW, -2));
terrainInfo.put(TdcProperties.TERRAIN_HILL, new TerrainInfo(TdcProperties.TERRAIN_HILL, -2));
+ terrainInfo.put(TdcProperties.TERRAIN_VILLAGE, new TerrainInfo(TdcProperties.TERRAIN_VILLAGE, -1));
+
+ if (isTinianRules()) {
+ terrainInfo.put(TdcProperties.TERRAIN_BEACH, new TerrainInfo(TdcProperties.TERRAIN_BEACH, 0));
+ terrainInfo.put(TdcProperties.TERRAIN_MARSH, new TerrainInfo(TdcProperties.TERRAIN_MARSH, -2));
+ terrainInfo.put(TdcProperties.TERRAIN_TOWN, new TerrainInfo(TdcProperties.TERRAIN_TOWN, -2));
+ terrainInfo.put(TdcProperties.TERRAIN_BUILDINGS, new TerrainInfo(TdcProperties.TERRAIN_BUILDINGS, -2));
+ terrainInfo.put(TdcProperties.TERRAIN_RUNWAY, new TerrainInfo(TdcProperties.TERRAIN_RUNWAY, 1));
+ terrainInfo.put(TdcProperties.TERRAIN_BRUSH, new TerrainInfo(TdcProperties.TERRAIN_BRUSH, -1));
+ terrainInfo.put(TdcProperties.TERRAIN_SUGAR_CANE, new TerrainInfo(TdcProperties.TERRAIN_SUGAR_CANE, -1));
+ terrainInfo.put(TdcProperties.TERRAIN_ROCKY, new TerrainInfo(TdcProperties.TERRAIN_ROCKY, -2));
+ terrainInfo.put(TdcProperties.TERRAIN_CAVE, new TerrainInfo(TdcProperties.TERRAIN_CAVE, -3));
+ }
+ else {
+ terrainInfo.put(TdcProperties.TERRAIN_BEACH, new TerrainInfo(TdcProperties.TERRAIN_BEACH, 1));
+ terrainInfo.put(TdcProperties.TERRAIN_MARSH, new TerrainInfo(TdcProperties.TERRAIN_MARSH, 1));
+ terrainInfo.put(TdcProperties.TERRAIN_TOWN, new TerrainInfo(TdcProperties.TERRAIN_TOWN, -2));
+ }
terrainInfoArmoured = new HashMap<String, TerrainInfo>();
terrainInfoArmoured.put(TdcProperties.TERRAIN_CLEAR, new TerrainInfo(TdcProperties.TERRAIN_CLEAR, 0));
@@ -530,16 +557,30 @@
terrainInfoArmoured.put(TdcProperties.TERRAIN_BRUSHWOODS, new TerrainInfo(TdcProperties.TERRAIN_BRUSHWOODS, -2));
terrainInfoArmoured.put(TdcProperties.TERRAIN_SWAMP, new TerrainInfo(TdcProperties.TERRAIN_SWAMP, 1));
terrainInfoArmoured.put(TdcProperties.TERRAIN_SAND_DUNES, new TerrainInfo(TdcProperties.TERRAIN_SAND_DUNES, -1));
- terrainInfoArmoured.put(TdcProperties.TERRAIN_VILLAGE, new TerrainInfo(TdcProperties.TERRAIN_VILLAGE, 0));
- terrainInfoArmoured.put(TdcProperties.TERRAIN_TOWN, new TerrainInfo(TdcProperties.TERRAIN_TOWN, -1));
terrainInfoArmoured.put(TdcProperties.TERRAIN_CITY, new TerrainInfo(TdcProperties.TERRAIN_CITY, -2));
terrainInfoArmoured.put(TdcProperties.TERRAIN_FORTIFIED, new TerrainInfo(TdcProperties.TERRAIN_FORTIFIED, -3));
terrainInfoArmoured.put(TdcProperties.TERRAIN_DESERT, new TerrainInfo(TdcProperties.TERRAIN_DESERT, 0));
- terrainInfoArmoured.put(TdcProperties.TERRAIN_BEACH, new TerrainInfo(TdcProperties.TERRAIN_BEACH, 0));
- terrainInfoArmoured.put(TdcProperties.TERRAIN_MARSH, new TerrainInfo(TdcProperties.TERRAIN_MARSH, 0));
terrainInfoArmoured.put(TdcProperties.TERRAIN_BOCAGE, new TerrainInfo(TdcProperties.TERRAIN_BOCAGE, -1));
terrainInfoArmoured.put(TdcProperties.TERRAIN_HEDGEROW, new TerrainInfo(TdcProperties.TERRAIN_HEDGEROW, -1));
- terrainInfoArmoured.put(TdcProperties.TERRAIN_HILL, new TerrainInfo(TdcProperties.TERRAIN_HILL, -1));
+ terrainInfoArmoured.put(TdcProperties.TERRAIN_HILL, new TerrainInfo(TdcProperties.TERRAIN_HILL, -1));
+ terrainInfoArmoured.put(TdcProperties.TERRAIN_VILLAGE, new TerrainInfo(TdcProperties.TERRAIN_VILLAGE, 0));
+
+ if (isTinianRules()) {
+ terrainInfo.put(TdcProperties.TERRAIN_BEACH, new TerrainInfo(TdcProperties.TERRAIN_BEACH, 0));
+ terrainInfo.put(TdcProperties.TERRAIN_MARSH, new TerrainInfo(TdcProperties.TERRAIN_MARSH, -2));
+ terrainInfo.put(TdcProperties.TERRAIN_TOWN, new TerrainInfo(TdcProperties.TERRAIN_TOWN, -2));
+ terrainInfo.put(TdcProperties.TERRAIN_BUILDINGS, new TerrainInfo(TdcProperties.TERRAIN_BUILDINGS, -2));
+ terrainInfo.put(TdcProperties.TERRAIN_RUNWAY, new TerrainInfo(TdcProperties.TERRAIN_RUNWAY, 1));
+ terrainInfo.put(TdcProperties.TERRAIN_BRUSH, new TerrainInfo(TdcProperties.TERRAIN_BRUSH, -1));
+ terrainInfo.put(TdcProperties.TERRAIN_SUGAR_CANE, new TerrainInfo(TdcProperties.TERRAIN_SUGAR_CANE, -1));
+ terrainInfo.put(TdcProperties.TERRAIN_ROCKY, new TerrainInfo(TdcProperties.TERRAIN_ROCKY, -2));
+ terrainInfo.put(TdcProperties.TERRAIN_CAVE, new TerrainInfo(TdcProperties.TERRAIN_CAVE, 0));
+ }
+ else {
+ terrainInfoArmoured.put(TdcProperties.TERRAIN_TOWN, new TerrainInfo(TdcProperties.TERRAIN_TOWN, -1));
+ terrainInfoArmoured.put(TdcProperties.TERRAIN_BEACH, new TerrainInfo(TdcProperties.TERRAIN_BEACH, 0));
+ terrainInfoArmoured.put(TdcProperties.TERRAIN_MARSH, new TerrainInfo(TdcProperties.TERRAIN_MARSH, 0));
+ }
}
protected String getDetails(ArrayList<String> details) {
@@ -683,7 +724,7 @@
if (hex == null)
hex = "";
- terrain = (String) TdcMap.getTerrainProperty(unit, TerrainBasicPiece.CURRENT_TERRAIN);
+ terrain = (String) unit.getProperty(TerrainBasicPiece.CURRENT_TERRAIN);
if (terrain == null)
terrain = "";
@@ -1230,6 +1271,12 @@
adjustDefenceRating("Hero", -2);
addDefenceModifier("Hero", -2, unit);
}
+
+ // Cave (Tinian)
+ else if (TdcProperties.TYPE_CAVE.equals(type)) {
+ adjustDefenceRating("In Cave", -3);
+ addDefenceModifier("In Cave", -3, unit);
+ }
}
}
Modified: VSQL-src/trunk/tdc/attack/AttackModel.java
===================================================================
--- VSQL-src/trunk/tdc/attack/AttackModel.java 2016-04-27 14:11:01 UTC (rev 9225)
+++ VSQL-src/trunk/tdc/attack/AttackModel.java 2016-05-09 07:59:14 UTC (rev 9226)
@@ -710,7 +710,7 @@
int massBonus = 0;
String massDesc = "";
- if (UnitInfo.isTgdRules()) {
+ if (UnitInfo.isTgdRules() ) {
if (mass >= 8) {
massBonus = 3;
massDesc = "8+";
@@ -742,7 +742,7 @@
massDesc = "5-6";
}
}
- if (massBonus > 0) {
+ if (massBonus != 0) {
addDefenceModifier(new FireModifier("Mass " + massDesc + " steps", massBonus, FireModifier.BASIC, true, true, true, this));
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
vassalengine-svn mailing list
vas...@li...
https://lists.sourceforge.net/lists/listinfo/vassalengine-svn
|
|
From: <uck...@us...> - 2016-04-27 14:11:05
|
Revision: 9225
http://sourceforge.net/p/vassalengine/svn/9225
Author: uckelman
Date: 2016-04-27 14:11:01 +0000 (Wed, 27 Apr 2016)
Log Message:
-----------
Fixed Bug 12527: "Save Game" behaves as "Save As", not "Save"
Modified Paths:
--------------
VASSAL-src/trunk/CHANGES
VASSAL-src/trunk/src/VASSAL/build/module/GameState.java
VASSAL-src/trunk/src/VASSAL/i18n/VASSAL.properties
VASSAL-src/trunk/src/VASSAL/launch/PlayerWindow.java
Modified: VASSAL-src/trunk/CHANGES
===================================================================
--- VASSAL-src/trunk/CHANGES 2016-04-18 00:24:30 UTC (rev 9224)
+++ VASSAL-src/trunk/CHANGES 2016-04-27 14:11:01 UTC (rev 9225)
@@ -1,5 +1,6 @@
3.2.17 - ???
+* 12527: "Save Game" behaves as "Save As"
* 12526: Switching desktop on Mac OS X 10.11.3 sometimes clones the currently
selected unit
Modified: VASSAL-src/trunk/src/VASSAL/build/module/GameState.java
===================================================================
--- VASSAL-src/trunk/src/VASSAL/build/module/GameState.java 2016-04-18 00:24:30 UTC (rev 9224)
+++ VASSAL-src/trunk/src/VASSAL/build/module/GameState.java 2016-04-27 14:11:01 UTC (rev 9225)
@@ -94,8 +94,9 @@
protected Map<String,GamePiece> pieces = new HashMap<String,GamePiece>();
protected List<GameComponent> gameComponents = new ArrayList<GameComponent>();
protected List<GameSetupStep> setupSteps = new ArrayList<GameSetupStep>();
- protected Action loadGame, saveGame, newGame, closeGame;
+ protected Action loadGame, saveGame, saveGameAs, newGame, closeGame;
protected String lastSave;
+ protected File lastSaveFile = null;
protected DirectoryConfigurer savedGameDirectoryPreference;
protected String loadComments;
@@ -129,6 +130,17 @@
// some languages
saveGame.putValue(Action.MNEMONIC_KEY, (int)Resources.getString("GameState.save_game.shortcut").charAt(0));
+ saveGameAs = new AbstractAction(Resources.getString("GameState.save_game_as")) {
+ private static final long serialVersionUID = 1L;
+
+ public void actionPerformed(ActionEvent e) {
+ saveGameAs();
+ }
+ };
+ // FIMXE: setting nmemonic from first letter could cause collisions in
+ // some languages
+ saveGameAs.putValue(Action.MNEMONIC_KEY, (int)Resources.getString("GameState.save_game_as.shortcut").charAt(0));
+
newGame = new AbstractAction(Resources.getString("GameState.new_game")) {
private static final long serialVersionUID = 1L;
@@ -157,9 +169,11 @@
mm.addAction("GameState.new_game", newGame);
mm.addAction("GameState.load_game", loadGame);
mm.addAction("GameState.save_game", saveGame);
+ mm.addAction("GameState.save_game_as", saveGameAs);
mm.addAction("GameState.close_game", closeGame);
saveGame.setEnabled(gameStarting);
+ saveGameAs.setEnabled(gameStarting);
closeGame.setEnabled(gameStarting);
}
@@ -290,6 +304,7 @@
newGame.setEnabled(!gameStarting);
saveGame.setEnabled(gameStarting);
+ saveGameAs.setEnabled(gameStarting);
closeGame.setEnabled(gameStarting);
if (gameStarting) {
@@ -310,6 +325,9 @@
gameStarted |= this.gameStarting;
lastSave = gameStarting ? saveString() : null;
+ if (!gameStarting) {
+ lastSaveFile = null;
+ }
}
/** Return true if a game is currently in progress */
@@ -393,6 +411,8 @@
else {
loadGameInBackground(f);
}
+
+ lastSaveFile = f;
}
catch (IOException e) {
ReadErrorDialog.error(e, f);
@@ -417,43 +437,76 @@
return GameModule.getGameModule().encode(getRestoreCommand());
}
+ protected boolean checkForOldSaveFile(File f) {
+ if (f.exists()) {
+ // warn user if overwriting a save from an old version
+ final AbstractMetaData md = MetaDataFactory.buildMetaData(f);
+ if (md != null && md instanceof SaveMetaData) {
+ if (Info.hasOldFormat(md.getVassalVersion())) {
+ return Dialogs.showConfirmDialog(
+ GameModule.getGameModule().getFrame(),
+ Resources.getString("Warning.save_will_be_updated_title"),
+ Resources.getString("Warning.save_will_be_updated_heading"),
+ Resources.getString(
+ "Warning.save_will_be_updated_message",
+ f.getPath(),
+ "3.2"
+ ),
+ JOptionPane.WARNING_MESSAGE,
+ JOptionPane.OK_CANCEL_OPTION) != JOptionPane.CANCEL_OPTION;
+ }
+ }
+ }
- /** Prompts the user for a file into which to save the game */
+ return true;
+ }
+
+ /** Saves the game to an existing file, or prompts for a new one. */
public void saveGame() {
final GameModule g = GameModule.getGameModule();
g.warn(Resources.getString("GameState.saving_game")); //$NON-NLS-1$
+ if (lastSaveFile != null) {
+ if (!checkForOldSaveFile(lastSaveFile)) {
+ return;
+ }
+
+ try {
+ saveGame(lastSaveFile);
+ g.warn(Resources.getString("GameState.game_saved")); //$NON-NLS-1$
+ }
+ catch (IOException e) {
+ WriteErrorDialog.error(e, lastSaveFile);
+/*
+ Logger.log(err);
+ GameModule.getGameModule().warn(Resources.getString("GameState.save_failed")); //$NON-NLS-1$
+*/
+ }
+ }
+ else {
+ saveGameAs();
+ }
+ }
+
+ /** Prompts the user for a file into which to save the game */
+ public void saveGameAs() {
+ final GameModule g = GameModule.getGameModule();
+
+ g.warn(Resources.getString("GameState.saving_game")); //$NON-NLS-1$
+
final File saveFile = getSaveFile();
if (saveFile == null) {
g.warn(Resources.getString("GameState.save_canceled")); //$NON-NLS-1$
}
else {
- if (saveFile.exists()) {
- // warn user if overwriting a save from an old version
- final AbstractMetaData md = MetaDataFactory.buildMetaData(saveFile);
- if (md != null && md instanceof SaveMetaData) {
- if (Info.hasOldFormat(md.getVassalVersion())) {
- if (Dialogs.showConfirmDialog(
- g.getFrame(),
- Resources.getString("Warning.save_will_be_updated_title"),
- Resources.getString("Warning.save_will_be_updated_heading"),
- Resources.getString(
- "Warning.save_will_be_updated_message",
- saveFile.getPath(),
- "3.2"
- ),
- JOptionPane.WARNING_MESSAGE,
- JOptionPane.OK_CANCEL_OPTION) == JOptionPane.CANCEL_OPTION)
- {
- return;
- }
- }
- }
+ if (!checkForOldSaveFile(saveFile)) {
+ return;
}
try {
saveGame(saveFile);
+ lastSaveFile = saveFile;
g.warn(Resources.getString("GameState.game_saved")); //$NON-NLS-1$
}
catch (IOException e) {
Modified: VASSAL-src/trunk/src/VASSAL/i18n/VASSAL.properties
===================================================================
--- VASSAL-src/trunk/src/VASSAL/i18n/VASSAL.properties 2016-04-18 00:24:30 UTC (rev 9224)
+++ VASSAL-src/trunk/src/VASSAL/i18n/VASSAL.properties 2016-04-27 14:11:01 UTC (rev 9225)
@@ -398,8 +398,10 @@
GameState.save_game_query=Save Game?
GameState.load_game=Load Game...
GameState.load_game.shortcut=L
-GameState.save_game=Save Game...
+GameState.save_game=Save Game
GameState.save_game.shortcut=S
+GameState.save_game_as=Save Game As...
+GameState.save_game_as.shortcut=A
GameState.close_game=Close Game
GameState.close_game.shortcut=C
GameState.load_error=Load Error
Modified: VASSAL-src/trunk/src/VASSAL/launch/PlayerWindow.java
===================================================================
--- VASSAL-src/trunk/src/VASSAL/launch/PlayerWindow.java 2016-04-18 00:24:30 UTC (rev 9224)
+++ VASSAL-src/trunk/src/VASSAL/launch/PlayerWindow.java 2016-04-27 14:11:01 UTC (rev 9225)
@@ -77,6 +77,7 @@
fileMenu.add(mm.addKey("GameState.new_game"));
fileMenu.add(mm.addKey("GameState.load_game"));
fileMenu.add(mm.addKey("GameState.save_game"));
+ fileMenu.add(mm.addKey("GameState.save_game_as"));
fileMenu.add(mm.addKey("GameState.close_game"));
fileMenu.addSeparator();
fileMenu.add(mm.addKey("BasicLogger.begin_logfile"));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
vassalengine-svn mailing list
vas...@li...
https://lists.sourceforge.net/lists/listinfo/vassalengine-svn
|
|
From: <uck...@us...> - 2016-04-07 18:40:10
|
Revision: 9220
http://sourceforge.net/p/vassalengine/svn/9220
Author: uckelman
Date: 2016-04-07 18:40:07 +0000 (Thu, 07 Apr 2016)
Log Message:
-----------
Added bugfix note.
Modified Paths:
--------------
VASSAL-src/trunk/CHANGES
Modified: VASSAL-src/trunk/CHANGES
===================================================================
--- VASSAL-src/trunk/CHANGES 2016-04-07 18:40:04 UTC (rev 9219)
+++ VASSAL-src/trunk/CHANGES 2016-04-07 18:40:07 UTC (rev 9220)
@@ -1,3 +1,8 @@
+3.2.17 - ???
+
+* 12526: Switching desktop on Mac OS X 10.11.3 sometimes clones the currently
+ selected unit
+
3.2.16 - 1 April 2016
* 12524: Images retile unnecessarily due to bad timestamp
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
_______________________________________________
vassalengine-svn mailing list
vas...@li...
https://lists.sourceforge.net/lists/listinfo/vassalengine-svn
|
|
From: <uck...@us...> - 2016-04-07 18:40:07
|
Revision: 9219
http://sourceforge.net/p/vassalengine/svn/9219
Author: uckelman
Date: 2016-04-07 18:40:04 +0000 (Thu, 07 Apr 2016)
Log Message:
-----------
Fixed Bug 12526: Switching desktop on Mac OS X 10.11.3 sometimes clones
the currently selected unit
Applied patch from Alex Carmel.
Modified Paths:
--------------
VASSAL-src/trunk/src/VASSAL/counters/BasicPiece.java
Modified: VASSAL-src/trunk/src/VASSAL/counters/BasicPiece.java
===================================================================
--- VASSAL-src/trunk/src/VASSAL/counters/BasicPiece.java 2016-04-07 18:40:01 UTC (rev 9218)
+++ VASSAL-src/trunk/src/VASSAL/counters/BasicPiece.java 2016-04-07 18:40:04 UTC (rev 9219)
@@ -438,7 +438,7 @@
}
Command comm = null;
final GamePiece outer = Decorator.getOutermost(this);
- if (KeyStroke.getKeyStroke(cloneKey, InputEvent.CTRL_MASK).equals(stroke)) {
+ if (cloneKey != 0 && KeyStroke.getKeyStroke(cloneKey, InputEvent.CTRL_MASK).equals(stroke)) {
final GamePiece newPiece = ((AddPiece) GameModule.getGameModule().decode(GameModule.getGameModule().encode(new AddPiece(outer)))).getTarget();
newPiece.setId(null);
GameModule.getGameModule().getGameState().addPiece(newPiece);
@@ -463,7 +463,7 @@
}
}
}
- else if (KeyStroke.getKeyStroke(deleteKey, InputEvent.CTRL_MASK).equals(stroke)) {
+ else if (deleteKey != 0 && KeyStroke.getKeyStroke(deleteKey, InputEvent.CTRL_MASK).equals(stroke)) {
comm = new RemovePiece(outer);
if (getMap() != null && GlobalOptions.getInstance().autoReportEnabled() && !Boolean.TRUE.equals(outer.getProperty(Properties.INVISIBLE_TO_OTHERS))) {
String s = "* " + outer.getLocalizedName();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
_______________________________________________
vassalengine-svn mailing list
vas...@li...
https://lists.sourceforge.net/lists/listinfo/vassalengine-svn
|