mirror of https://github.com/FreeCol/freecol.git
@compat 0.10.x removal: Drop old tile type change tags.
This commit is contained in:
parent
e69317bc40
commit
779733e6aa
|
@ -68,8 +68,6 @@
|
|||
|
||||
<!-- @compat 0.11.x -->
|
||||
<xs:attribute name="expended-equipment-type" type="EquipmentTypeId"/>
|
||||
<xs:attribute name="deliver-goods-type" type="GoodsTypeId"/>
|
||||
<xs:attribute name="deliver-amount" type="xs:nonNegativeInteger"/>
|
||||
<!-- end @compat 0.11.x -->
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
|
|
@ -61,14 +61,6 @@ public final class TileImprovementType extends FreeColSpecObjectType {
|
|||
/** The amount of the equipment expended in making this improvement. */
|
||||
private int expendedAmount;
|
||||
|
||||
// @compat 0.10.4
|
||||
/** The type of goods delivered by making this improvement. */
|
||||
private GoodsType deliverGoodsType = null;
|
||||
|
||||
/** The amount of goods delivered by making this improvement. */
|
||||
private int deliverAmount;
|
||||
// end @compat
|
||||
|
||||
/** The change to the movement cost due to this tile improvement. */
|
||||
private int movementCost = -1;
|
||||
|
||||
|
@ -387,8 +379,6 @@ public final class TileImprovementType extends FreeColSpecObjectType {
|
|||
// Serialization
|
||||
|
||||
private static final String ADD_WORK_TURNS_TAG = "add-work-turns";
|
||||
private static final String DELIVER_AMOUNT_TAG = "deliver-amount";
|
||||
private static final String DELIVER_GOODS_TYPE_TAG = "deliver-goods-type";
|
||||
private static final String DISASTER_TAG = "disaster";
|
||||
private static final String EXPENDED_AMOUNT_TAG = "expended-amount";
|
||||
private static final String EXPOSE_RESOURCE_PERCENT_TAG = "expose-resource-percent";
|
||||
|
@ -510,13 +500,6 @@ public final class TileImprovementType extends FreeColSpecObjectType {
|
|||
|
||||
expendedAmount = xr.getAttribute(EXPENDED_AMOUNT_TAG, 0);
|
||||
|
||||
// @compat 0.10.4
|
||||
deliverGoodsType = xr.getType(spec, DELIVER_GOODS_TYPE_TAG,
|
||||
GoodsType.class, (GoodsType)null);
|
||||
|
||||
deliverAmount = xr.getAttribute(DELIVER_AMOUNT_TAG, 0);
|
||||
// end @compat
|
||||
|
||||
movementCost = xr.getAttribute(MOVEMENT_COST_TAG, 0);
|
||||
|
||||
zIndex = xr.getAttribute(ZINDEX_TAG, 0);
|
||||
|
@ -552,32 +535,14 @@ public final class TileImprovementType extends FreeColSpecObjectType {
|
|||
final Specification spec = getSpecification();
|
||||
final String tag = xr.getLocalName();
|
||||
|
||||
if (TILE_TYPE_CHANGE_TAG.equals(tag)) {
|
||||
if (TILE_TYPE_CHANGE_TAG.equals(tag)
|
||||
// @compat 0.11.6
|
||||
|| OLD_CHANGE_TAG.equals(tag)
|
||||
// end @compat 0.11.6
|
||||
) {
|
||||
TileTypeChange change = new TileTypeChange(xr, spec);
|
||||
if (change != null) addChange(change);
|
||||
|
||||
// @compat 0.11.6
|
||||
} else if (OLD_CHANGE_TAG.equals(tag)) {
|
||||
// @compat 0.10.4
|
||||
if (deliverGoodsType != null) {
|
||||
TileTypeChange change = new TileTypeChange(spec);
|
||||
TileType from = xr.getType(spec, FROM_TAG,
|
||||
TileType.class, (TileType)null);
|
||||
TileType to = xr.getType(spec, TO_TAG,
|
||||
TileType.class, (TileType)null);
|
||||
xr.closeTag(OLD_CHANGE_TAG);
|
||||
change.setFrom(from);
|
||||
change.setTo(to);
|
||||
change.setProduction(new AbstractGoods(deliverGoodsType,
|
||||
deliverAmount));
|
||||
addChange(change);
|
||||
} else {
|
||||
// end @compat 0.10.4
|
||||
TileTypeChange change = new TileTypeChange(xr, spec);
|
||||
if (change != null) addChange(change);
|
||||
}
|
||||
// end @compat 0.11.6
|
||||
|
||||
} else if (DISASTER_TAG.equals(tag)) {
|
||||
Disaster disaster = xr.getType(spec, ID_ATTRIBUTE_TAG,
|
||||
Disaster.class, (Disaster)null);
|
||||
|
|
|
@ -78,17 +78,6 @@ public class TileTypeChange extends FreeColSpecObjectType {
|
|||
return from;
|
||||
}
|
||||
|
||||
// @compat 0.10.4
|
||||
/**
|
||||
* Set the original tile type.
|
||||
*
|
||||
* @param from The new original tile type.
|
||||
*/
|
||||
public final void setFrom(final TileType from) {
|
||||
this.from = from;
|
||||
}
|
||||
// end @compat 0.10.4
|
||||
|
||||
/**
|
||||
* Gets the destination tile type.
|
||||
*
|
||||
|
@ -98,17 +87,6 @@ public class TileTypeChange extends FreeColSpecObjectType {
|
|||
return to;
|
||||
}
|
||||
|
||||
// @compat 0.10.4
|
||||
/**
|
||||
* Set the destination tile type.
|
||||
*
|
||||
* @param to The new destination tile type.
|
||||
*/
|
||||
public final void setTo(final TileType to) {
|
||||
this.to = to;
|
||||
}
|
||||
// end @compat 0.10.4
|
||||
|
||||
/**
|
||||
* Gets the production consequent to the type change.
|
||||
*
|
||||
|
@ -118,17 +96,6 @@ public class TileTypeChange extends FreeColSpecObjectType {
|
|||
return production;
|
||||
}
|
||||
|
||||
// @compat 0.10.4
|
||||
/**
|
||||
* Set the production consequent to the type change.
|
||||
*
|
||||
* @param production The new consequent production.
|
||||
*/
|
||||
public final void setProduction(final AbstractGoods production) {
|
||||
this.production = production;
|
||||
}
|
||||
// end @compat 0.10.4
|
||||
|
||||
|
||||
// Serialization
|
||||
|
||||
|
|
Loading…
Reference in New Issue