diff --git a/config.xml b/config.xml index 958328c..5d467ac 100644 --- a/config.xml +++ b/config.xml @@ -1,5 +1,5 @@ - + TerranQuest Augmented Reality fantasy game diff --git a/platforms/android/.gradle/2.2.1/taskArtifacts/cache.properties.lock b/platforms/android/.gradle/2.2.1/taskArtifacts/cache.properties.lock index dbf52e1..822f385 100644 Binary files a/platforms/android/.gradle/2.2.1/taskArtifacts/cache.properties.lock and b/platforms/android/.gradle/2.2.1/taskArtifacts/cache.properties.lock differ diff --git a/platforms/android/.gradle/2.2.1/taskArtifacts/fileHashes.bin b/platforms/android/.gradle/2.2.1/taskArtifacts/fileHashes.bin index 333d02c..cb6fe8a 100644 Binary files a/platforms/android/.gradle/2.2.1/taskArtifacts/fileHashes.bin and b/platforms/android/.gradle/2.2.1/taskArtifacts/fileHashes.bin differ diff --git a/platforms/android/.gradle/2.2.1/taskArtifacts/fileSnapshots.bin b/platforms/android/.gradle/2.2.1/taskArtifacts/fileSnapshots.bin index a3f1f29..d115e0f 100644 Binary files a/platforms/android/.gradle/2.2.1/taskArtifacts/fileSnapshots.bin and b/platforms/android/.gradle/2.2.1/taskArtifacts/fileSnapshots.bin differ diff --git a/platforms/android/.gradle/2.2.1/taskArtifacts/taskArtifacts.bin b/platforms/android/.gradle/2.2.1/taskArtifacts/taskArtifacts.bin index 1bdda1d..0146abc 100644 Binary files a/platforms/android/.gradle/2.2.1/taskArtifacts/taskArtifacts.bin and b/platforms/android/.gradle/2.2.1/taskArtifacts/taskArtifacts.bin differ diff --git a/platforms/android/AndroidManifest.xml b/platforms/android/AndroidManifest.xml index bfa1fca..97ecd6d 100644 --- a/platforms/android/AndroidManifest.xml +++ b/platforms/android/AndroidManifest.xml @@ -1,5 +1,5 @@ - + diff --git a/platforms/android/assets/www/css/main.css b/platforms/android/assets/www/css/main.css index 806e392..71505a5 100644 --- a/platforms/android/assets/www/css/main.css +++ b/platforms/android/assets/www/css/main.css @@ -83,6 +83,16 @@ body { background: rgba(0,0,0,.9); } +#overlay-main #main-content { + overflow-x: auto; + overflow-y: auto; + position: absolute; + top: 0; + left: 0; + height: 100%; + width: 100%; +} + #mainCloseBtn { z-index: 999999; position: absolute; diff --git a/platforms/android/assets/www/js/home.js b/platforms/android/assets/www/js/home.js index 44a5e9e..88f8da5 100644 --- a/platforms/android/assets/www/js/home.js +++ b/platforms/android/assets/www/js/home.js @@ -22,14 +22,15 @@ var map = L.map('map'); var tileurl = "http://tile.stamen.com/terrain/{z}/{x}/{y}.jpg"; map.setZoom(16); map.dragging.disable(); -map.touchZoom.disable(); -map.doubleClickZoom.disable(); -map.scrollWheelZoom.disable(); +//map.touchZoom.disable(); +//map.doubleClickZoom.disable(); +//map.scrollWheelZoom.disable(); map.keyboard.disable(); $(".leaflet-control-zoom").css("visibility", "hidden"); // Disable tap handler, if present. -if (map.tap) - map.tap.disable(); +//if (map.tap) { +// map.tap.disable(); +//} var lc = L.control.locate({ position: 'topleft', // set the location of the control layer: undefined, // use your own layer for the location marker, creates a new layer by default @@ -63,8 +64,8 @@ var lc = L.control.locate({ }, locateOptions: {} // define location options e.g enableHighAccuracy: true or maxZoom: 10 }).addTo(map); -map.addLayer(new L.tileLayer(tileurl, {minZoom: 16, maxZoom: 16})); -//map.setView(new L.LatLng(46, -112), 15); +map.addLayer(new L.tileLayer(tileurl, {minZoom: 15, maxZoom: 17})); + lc.start(); function mapPos(lat, lon) { @@ -183,7 +184,9 @@ setTimeout(function () { * Syncs the user's stats with the server and calls refreshStats(). */ function syncStats() { - $.getJSON(mkApiUrl('getstats') + "?user=" + username, null, function (data) { + $.getJSON(mkApiUrl('getstats'), { + user: username + }, function (data) { if (data.status === 'OK') { maxenergy = data.stats.maxenergy; energy = data.stats.energy; @@ -248,13 +251,21 @@ $("#chatsendform").submit(function (event) { function toggleChat() { if ($('#chatmsgs').css('display') === 'none') { - $('#chatmsgs').css('display', 'block'); - $("#chatmsgs").animate({scrollTop: $('#chatmsgs').prop("scrollHeight")}, 1000); + openChat(); } else { - $('#chatmsgs').css('display', 'none'); + closeChat(); } } +function closeChat() { + $('#chatmsgs').css('display', 'none'); +} + +function openChat() { + $('#chatmsgs').css('display', 'block'); + $("#chatmsgs").animate({scrollTop: $('#chatmsgs').prop("scrollHeight")}, 1000); +} + function openProfile(user) { user = typeof user !== 'undefined' ? user : username; $('#main-content').load("screens/profile.html", null, function (x) { @@ -263,6 +274,11 @@ function openProfile(user) { }); } +function openRules() { + $('#main-content').load("screens/rules.html", null, function (x) { + $('#overlay-main').css('display', 'block'); + }); +} @@ -285,4 +301,10 @@ document.addEventListener("backbutton", function (event) { } else if ($('#chatmsgs').css('display') !== 'none') { toggleChat(); } -}, false); \ No newline at end of file +}, false); + +// Show the rules +if (localStorage.getItem("seenrules") !== 'yes') { + openRules(); + localStorage.setItem("seenrules", 'yes'); +} \ No newline at end of file diff --git a/platforms/android/assets/www/screens/home.html b/platforms/android/assets/www/screens/home.html index df580a0..7445801 100644 --- a/platforms/android/assets/www/screens/home.html +++ b/platforms/android/assets/www/screens/home.html @@ -38,7 +38,7 @@
- +
diff --git a/platforms/android/assets/www/screens/profile.html b/platforms/android/assets/www/screens/profile.html index 01bb045..ed04291 100644 --- a/platforms/android/assets/www/screens/profile.html +++ b/platforms/android/assets/www/screens/profile.html @@ -1,5 +1,6 @@ -
-
Badges
+
+

+
Badges
Loading...
@@ -14,9 +15,23 @@ function loadProfile(user) { $('#player-name').text(user); loadBadges(user); + loadPlayerStats(user); + } + + function loadPlayerStats(user) { + $.getJSON(mkApiUrl('getstats'), { + user: user + }, function (data) { + if (data.status === 'OK') { + $('#player-level').text('Level ' + Math.floor(data.stats.level)); + } else { + $('#player-level').text('Error: cannot load player stats.'); + } + }).fail(function () { + $('#player-level').text('Error: check your connection.'); + }); } - // TODO: Make this actually use the database/API! function loadBadges(user) { $('#loading-badges').html(' Loading...'); $('#loading-badges').css('display', 'block'); diff --git a/platforms/android/assets/www/screens/rules.html b/platforms/android/assets/www/screens/rules.html new file mode 100644 index 0000000..6ccde85 --- /dev/null +++ b/platforms/android/assets/www/screens/rules.html @@ -0,0 +1,18 @@ +
Rules
+

Please read these rules. Because TerranQuest is a game involving other + people and the environment, it's important to show good etiquette.

+
    +
  1. Do not endanger yourself or others
  2. +
  3. be considerate and polite in the in-game chat, and don't swear
  4. +
  5. Observe all local laws and rules
  6. +
  7. Respect property rights and obtain permission for playing on private land
  8. +
  9. Be nice to other people and try not to look too creepy
  10. +
  11. Respect and minimize your impact on the environment
  12. +
  13. Don't tamper with or deface any objects, landmarks, barcodes, or other real-world items
  14. +
  15. Pick up any trash you find and dispose of it properly if you can
  16. +
  17. Socialize with any players of other games, such as Geocaching and Ingress, you might meet
  18. +
  19. Follow the Netsyms Technologies Terms of Service at netsyms.com/legal
  20. + +
\ No newline at end of file diff --git a/platforms/android/assets/www/screens/signup.html b/platforms/android/assets/www/screens/signup.html index f7fab03..2202c42 100644 --- a/platforms/android/assets/www/screens/signup.html +++ b/platforms/android/assets/www/screens/signup.html @@ -32,6 +32,8 @@ +
+

By signing up, you agree to the Netsyms Technologies Terms of Service and Privacy Policy at netsyms.com/legal

- +
diff --git a/www/screens/profile.html b/www/screens/profile.html index 01bb045..ed04291 100644 --- a/www/screens/profile.html +++ b/www/screens/profile.html @@ -1,5 +1,6 @@ -
-
Badges
+
+

+
Badges
Loading...
@@ -14,9 +15,23 @@ function loadProfile(user) { $('#player-name').text(user); loadBadges(user); + loadPlayerStats(user); + } + + function loadPlayerStats(user) { + $.getJSON(mkApiUrl('getstats'), { + user: user + }, function (data) { + if (data.status === 'OK') { + $('#player-level').text('Level ' + Math.floor(data.stats.level)); + } else { + $('#player-level').text('Error: cannot load player stats.'); + } + }).fail(function () { + $('#player-level').text('Error: check your connection.'); + }); } - // TODO: Make this actually use the database/API! function loadBadges(user) { $('#loading-badges').html(' Loading...'); $('#loading-badges').css('display', 'block'); diff --git a/www/screens/rules.html b/www/screens/rules.html new file mode 100644 index 0000000..ef62fa0 --- /dev/null +++ b/www/screens/rules.html @@ -0,0 +1,18 @@ +
Rules
+

Please read these rules. Because TerranQuest is a game involving other + people and the environment, it's important to show good etiquette.

+
    +
  1. Do not endanger yourself or others
  2. +
  3. Be considerate and polite in the in-game chat, and don't swear
  4. +
  5. Observe all local laws and rules
  6. +
  7. Respect property rights and obtain permission for playing on private land
  8. +
  9. Be nice to other people and try not to look too creepy
  10. +
  11. Respect and minimize your impact on the environment
  12. +
  13. Don't tamper with or deface any objects, landmarks, barcodes, or other real-world items
  14. +
  15. Pick up any trash you find and dispose of it properly if you can
  16. +
  17. Socialize with any players of other games, such as Geocaching and Ingress, you might meet
  18. +
  19. Follow the Netsyms Technologies Terms of Service at netsyms.com/legal
  20. + +
\ No newline at end of file diff --git a/www/screens/signup.html b/www/screens/signup.html index f7fab03..2202c42 100644 --- a/www/screens/signup.html +++ b/www/screens/signup.html @@ -32,6 +32,8 @@ +
+

By signing up, you agree to the Netsyms Technologies Terms of Service and Privacy Policy at netsyms.com/legal