From 27302267b989e77a1186107204f5d594f14ed54e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C3=ABl=20Lemaire?=
Date: Fri, 5 May 2017 01:19:28 +0200
Subject: [PATCH] Added auto-saving to cloud, and loading cloud saves
---
TODO | 3 -
bower.json | 3 +-
out/index.html | 3 +-
out/tests.html | 23 ++--
package.json | 6 +-
spec/support/karma.conf.js | 8 +-
src/MainUI.ts | 27 ++++
src/common | 2 +-
src/core/GameSession.ts | 23 +++-
src/multi/Connection.spec.ts | 86 ++++++++++++
src/multi/Connection.ts | 89 ++++++++-----
src/multi/RemoteStorage.spec.ts | 51 +++++++
src/multi/RemoteStorage.ts | 125 ++++++++++++++++++
src/ui/BaseView.ts | 27 ++++
src/ui/TestGame.ts | 7 +
src/ui/battle/ActionIcon.ts | 2 +-
src/ui/battle/ArenaShip.ts | 2 +-
src/ui/battle/ShipListItem.ts | 2 +-
src/ui/common/Animations.ts | 6 +-
src/ui/common/Tooltip.ts | 4 +-
src/ui/common/UILabel.ts | 25 ++++
src/ui/common/UITextInput.ts | 4 +-
.../common/{Tools.spec.ts => UITools.spec.ts} | 18 +--
src/ui/common/{Tools.ts => UITools.ts} | 4 +-
src/ui/map/UniverseMapView.ts | 3 +
src/ui/menu/LoadDialog.ts | 87 +++++++++++-
tsconfig.json | 5 +
27 files changed, 559 insertions(+), 86 deletions(-)
create mode 100644 src/multi/Connection.spec.ts
create mode 100644 src/multi/RemoteStorage.spec.ts
create mode 100644 src/multi/RemoteStorage.ts
create mode 100644 src/ui/common/UILabel.ts
rename src/ui/common/{Tools.spec.ts => UITools.spec.ts} (77%)
rename src/ui/common/{Tools.ts => UITools.ts} (96%)
diff --git a/TODO b/TODO
index 0eb814f..59fe0c1 100644
--- a/TODO
+++ b/TODO
@@ -50,7 +50,6 @@
* Menu: fix background stars aggregating at right side when the game is not focused
* Add ship personality (with icons to identify ?)
* Tutorial
-* Campaign save slots, with auto-save
* Missions/quests system
* Main story arc
@@ -58,5 +57,3 @@ Later, if possible:
* Replays
* Multiplayer
* Formation or deployment phase
-* Saving to external file
-* Saving to cloud
diff --git a/bower.json b/bower.json
index c7adf49..e870061 100644
--- a/bower.json
+++ b/bower.json
@@ -11,7 +11,6 @@
"dependencies": {
"phaser": "2.6.2",
"parse": "1.9.2",
- "jasmine-core": "jasmine#^2.5.2",
- "deep-diff": "0.3.0"
+ "jasmine-core": "jasmine#^2.5.2"
}
}
\ No newline at end of file
diff --git a/out/index.html b/out/index.html
index c9e57ab..e23261a 100644
--- a/out/index.html
+++ b/out/index.html
@@ -15,7 +15,7 @@
padding: 0;
margin: 0;
}
-
+
.game {
width: 100%;
height: 100vh;
@@ -34,7 +34,6 @@
window.oncontextmenu = function (e) { e.preventDefault(); };
window.onload = function () {
window.ui = new TS.SpaceTac.MainUI();
- window.connection = new TS.SpaceTac.Multi.Connection(window.ui);
};
+
+
-
-
-
-
-
+
+
+
+
+
+