mirror of
https://github.com/OMGeeky/andors-trail.git
synced 2026-01-03 18:25:02 +01:00
Merge branch 'developmentsavegames' into nut_arulir_mountain
This commit is contained in:
@@ -28,7 +28,8 @@ public final class AndorsTrailApplication extends Application {
|
||||
public static final boolean DEVELOPMENT_VALIDATEDATA = true;
|
||||
public static final boolean DEVELOPMENT_DEBUGMESSAGES = true;
|
||||
public static final boolean DEVELOPMENT_INCOMPATIBLE_SAVEGAMES = DEVELOPMENT_DEBUGRESOURCES || DEVELOPMENT_DEBUGBUTTONS || DEVELOPMENT_FASTSPEED;
|
||||
public static final int CURRENT_VERSION = DEVELOPMENT_INCOMPATIBLE_SAVEGAMES ? 999 : 48;
|
||||
public static final int DEVELOPMENT_INCOMPATIBLE_SAVEGAME_VERSION = 999;
|
||||
public static final int CURRENT_VERSION = DEVELOPMENT_INCOMPATIBLE_SAVEGAMES ? DEVELOPMENT_INCOMPATIBLE_SAVEGAME_VERSION : 48;
|
||||
public static final String CURRENT_VERSION_DISPLAY = "0.7.7";
|
||||
public static final boolean IS_RELEASE_VERSION = !CURRENT_VERSION_DISPLAY.matches(".*[a-d].*");
|
||||
|
||||
|
||||
@@ -175,6 +175,22 @@ public final class LoadSaveActivity extends Activity implements OnClickListener
|
||||
public void onClick(View view) {
|
||||
final int slot = (Integer) view.getTag();
|
||||
|
||||
if (!isLoading && slot != SLOT_NUMBER_CREATE_NEW_SLOT && AndorsTrailApplication.CURRENT_VERSION == AndorsTrailApplication.DEVELOPMENT_INCOMPATIBLE_SAVEGAME_VERSION) {
|
||||
final FileHeader header = Savegames.quickload(this, slot);
|
||||
if (header != null && header.fileversion != AndorsTrailApplication.DEVELOPMENT_INCOMPATIBLE_SAVEGAME_VERSION) {
|
||||
final Dialog d = CustomDialogFactory.createDialog(this,
|
||||
"Overwriting not allowed",
|
||||
getResources().getDrawable(android.R.drawable.ic_dialog_alert),
|
||||
"You are currently using a development version of Andor's trail. Overwriting a regular savegame is not allowed in development mode.",
|
||||
null,
|
||||
true);
|
||||
CustomDialogFactory.addDismissButton(d, android.R.string.ok);
|
||||
CustomDialogFactory.show(d);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (isLoading) {
|
||||
if(!Savegames.getSlotFile(slot).exists()) {
|
||||
showErrorLoadingEmptySlot();
|
||||
|
||||
@@ -319,7 +319,7 @@ public final class Savegames {
|
||||
public final long savedVersion;
|
||||
|
||||
public String describe() {
|
||||
return playerName + ", " + displayInfo;
|
||||
return (fileversion == AndorsTrailApplication.DEVELOPMENT_INCOMPATIBLE_SAVEGAME_VERSION ? "(D) " : "") + playerName + ", " + displayInfo;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user