mirror of
https://github.com/IvarK/AntimatterDimensionsSourceCode.git
synced 2024-11-22 04:05:42 +00:00
Merge branch 'master' into Steam-Webpack
This commit is contained in:
commit
fe50d5c453
1
.env.development
Normal file
1
.env.development
Normal file
@ -0,0 +1 @@
|
||||
VUE_APP_DEV=true
|
1
.env.master
Normal file
1
.env.master
Normal file
@ -0,0 +1 @@
|
||||
VUE_APP_DEV=true
|
@ -1,4 +1,4 @@
|
||||
name: Deploy 🚀
|
||||
name: Deploy master
|
||||
|
||||
on:
|
||||
push:
|
||||
@ -21,8 +21,8 @@ jobs:
|
||||
node-version: '14'
|
||||
cache: 'npm'
|
||||
- run: npm ci
|
||||
- run: npm run build
|
||||
- uses: JamesIves/github-pages-deploy-action@4.1.3
|
||||
- run: npm run build:master
|
||||
- uses: JamesIves/github-pages-deploy-action@v4
|
||||
with:
|
||||
branch: gh-pages
|
||||
folder: dist
|
31
.github/workflows/deploy-release.yml
vendored
Normal file
31
.github/workflows/deploy-release.yml
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
name: Deploy release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- release
|
||||
workflow_dispatch:
|
||||
branches:
|
||||
- release
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Deploy 🚀
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
lfs: true
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '14'
|
||||
cache: 'npm'
|
||||
- run: npm ci
|
||||
- run: npm run build:release
|
||||
- uses: JamesIves/github-pages-deploy-action@v4
|
||||
with:
|
||||
token: ${{ secrets.GH_PUBLISH_TOKEN }}
|
||||
repository-name: IvarK/AyyLmao5Hours
|
||||
branch: master
|
||||
folder: dist
|
||||
single-commit: true
|
@ -72,6 +72,11 @@ class AchievementState extends GameMechanicState {
|
||||
GameUI.notify.success(`Achievement: ${this.name}`);
|
||||
SteamFunctions.GiveAchievement(this.id);
|
||||
}
|
||||
if (player.speedrun.isActive && !player.speedrun.achievementTimes[this.id]) {
|
||||
// This stores a lot of data in the savefile and seems particularly suceptible to floating-point rounding issues
|
||||
// for some reason, so we floor to get rid of fractions of milliseconds and reduce what filesize impact we can
|
||||
player.speedrun.achievementTimes[this.id] = Math.floor(player.records.realTimePlayed);
|
||||
}
|
||||
Achievements._power.invalidate();
|
||||
EventHub.dispatch(GAME_EVENT.ACHIEVEMENT_UNLOCKED);
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { ProgressChecker } from "../storage/progress-checker";
|
||||
|
||||
import CloudInvalidDataModal from "@/components/modals/cloud/CloudInvalidDataModal";
|
||||
import CloudLoadConflictModal from "@/components/modals/cloud/CloudLoadConflictModal";
|
||||
import CloudManualLoginModal from "@/components/modals/cloud/CloudManualLoginModal";
|
||||
import CloudSaveConflictModal from "@/components/modals/cloud/CloudSaveConflictModal";
|
||||
@ -298,6 +299,7 @@ function getSaveInfo(save) {
|
||||
Modal.cloudSaveConflict = new Modal(CloudSaveConflictModal);
|
||||
Modal.cloudLoadConflict = new Modal(CloudLoadConflictModal);
|
||||
Modal.manualCloud = new Modal(CloudManualLoginModal);
|
||||
Modal.cloudInvalidData = new Modal(CloudInvalidDataModal);
|
||||
// eslint-disable-next-line max-params
|
||||
Modal.addCloudConflict = function(saveId, saveComparison, cloudSave, localSave, onAccept) {
|
||||
Modal.hide();
|
||||
@ -331,10 +333,6 @@ Modal.message = new class extends Modal {
|
||||
this.closeButton = props.closeButton ?? false;
|
||||
EventHub.ui.offAll(this._component);
|
||||
if (props.closeEvent) this.applyCloseListeners(props.closeEvent);
|
||||
|
||||
// TODO: remove this console.log
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(`Modal message: ${text}`);
|
||||
}
|
||||
|
||||
hide() {
|
||||
|
@ -1,5 +1,7 @@
|
||||
import { sha512_256 } from "js-sha512";
|
||||
|
||||
import { DEV } from "../devtools";
|
||||
|
||||
import FullScreenAnimationHandler from "../full-screen-animation-handler";
|
||||
|
||||
export class GameOptions {
|
||||
@ -80,7 +82,8 @@ export function tryImportSecret(data) {
|
||||
return true;
|
||||
}
|
||||
if (index === 3) {
|
||||
Speedrun.unlock();
|
||||
if (player.records.fullGameCompletions > 0 || DEV) Speedrun.unlock();
|
||||
else GameUI.notify.error("Complete the game at least once first!", 15000);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -1,6 +1,8 @@
|
||||
import VTooltip from "v-tooltip";
|
||||
import VueGtag from "vue-gtag";
|
||||
|
||||
import { DEV } from "../devtools";
|
||||
|
||||
import { useLongPress, useRepeatingClick } from "./longpress";
|
||||
import { notify } from "./notify";
|
||||
import { state } from "./ui.init";
|
||||
@ -129,22 +131,26 @@ export const GameUI = {
|
||||
},
|
||||
flushEvents() {
|
||||
this.flushPromise = undefined;
|
||||
if (PerformanceStats.isOn && PerformanceStats.currentBlocks.length > 0) {
|
||||
Vue.nextTick(() => PerformanceStats.start("Vue Render"));
|
||||
PerformanceStats.start("Vue Update");
|
||||
if (DEV) {
|
||||
if (PerformanceStats.isOn && PerformanceStats.currentBlocks.length > 0) {
|
||||
Vue.nextTick(() => PerformanceStats.start("Vue Render"));
|
||||
PerformanceStats.start("Vue Update");
|
||||
}
|
||||
}
|
||||
for (const event of this.events) {
|
||||
EventHub.ui.dispatch(event[0], event[1]);
|
||||
}
|
||||
EventHub.ui.dispatch(GAME_EVENT.UPDATE);
|
||||
ReactivityComplainer.complain();
|
||||
if (PerformanceStats.isOn && PerformanceStats.currentBlocks.length > 0) {
|
||||
PerformanceStats.end();
|
||||
Vue.nextTick(() => {
|
||||
PerformanceStats.end("Vue Render");
|
||||
PerformanceStats.end("Frame Time");
|
||||
PerformanceStats.render();
|
||||
});
|
||||
if (DEV) {
|
||||
ReactivityComplainer.complain();
|
||||
if (PerformanceStats.isOn && PerformanceStats.currentBlocks.length > 0) {
|
||||
PerformanceStats.end();
|
||||
Vue.nextTick(() => {
|
||||
PerformanceStats.end("Vue Render");
|
||||
PerformanceStats.end("Frame Time");
|
||||
PerformanceStats.render();
|
||||
});
|
||||
}
|
||||
}
|
||||
this.events = [];
|
||||
},
|
||||
@ -234,5 +240,5 @@ export const ui = new Vue({
|
||||
}
|
||||
}
|
||||
},
|
||||
template: "<GameUIComponent />"
|
||||
render: h => h(GameUIComponent)
|
||||
});
|
||||
|
@ -516,18 +516,6 @@ export const AutomatorBackend = {
|
||||
decoded = GameSaveSerializer.decodeText(rawInput, "automator script");
|
||||
parts = this.deserializeAutomatorData(decoded);
|
||||
} catch (e) {
|
||||
// TODO Remove everything but "return null" in this catch block before release; this is only here to maintain
|
||||
// compatability with scripts from older test versions and will never be called on scripts exported post-release
|
||||
if (decoded) {
|
||||
parts = decoded.split("||");
|
||||
if (parts.length === 3 && parts[1].length === parseInt(parts[0], 10)) {
|
||||
return {
|
||||
name: parts[1],
|
||||
content: parts[2],
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -171,8 +171,7 @@ export const Enslaved = {
|
||||
return EffarigUnlock.eternity.isUnlocked;
|
||||
},
|
||||
get realityBoostRatio() {
|
||||
const baseRealityBoostRatio = tempAmplifyToggle ? tempAmplifyFactor : 1;
|
||||
return Math.max(baseRealityBoostRatio, Math.floor(player.celestials.enslaved.storedReal /
|
||||
return Math.max(1, Math.floor(player.celestials.enslaved.storedReal /
|
||||
Math.max(1000, Time.thisRealityRealTime.totalMilliseconds)));
|
||||
},
|
||||
get canAmplify() {
|
||||
|
@ -246,7 +246,6 @@ export const AlchemyReactions = (function() {
|
||||
}));
|
||||
}
|
||||
return {
|
||||
// TODO: `all` sould be the one that is `compact()`ed
|
||||
all: AlchemyResources.all
|
||||
.map(r => (r.isBaseResource ? null : new AlchemyReaction(r, mapReagents(r))))
|
||||
};
|
||||
|
@ -3,6 +3,8 @@ import { sha512_256 } from "js-sha512";
|
||||
import { DC } from "./constants";
|
||||
import FullScreenAnimationHandler from "./full-screen-animation-handler";
|
||||
|
||||
export const DEV = process.env.VUE_APP_DEV === "true";
|
||||
|
||||
/* eslint-disable no-console */
|
||||
// Disabling no-console here seems
|
||||
// reasonable, since these are the devtools after all
|
||||
@ -251,32 +253,6 @@ export function isLocalEnvironment() {
|
||||
return href.includes("file") || href.includes("127.0.0.1") || href.includes("localhost");
|
||||
}
|
||||
|
||||
window.tempSpeedupToggle = false;
|
||||
window.tempSpeedupFactor = 500;
|
||||
// Speeds up game, intentionally doesn't persist between refreshes
|
||||
// With no arguments, toggles on/off
|
||||
dev.goFast = function(speed) {
|
||||
if (speed !== undefined && speed > 0) {
|
||||
tempSpeedupToggle = true;
|
||||
tempSpeedupFactor = speed;
|
||||
} else {
|
||||
tempSpeedupToggle = !tempSpeedupToggle;
|
||||
}
|
||||
};
|
||||
|
||||
window.tempAmplifyToggle = false;
|
||||
window.tempAmplifyFactor = 100;
|
||||
// Amplifies every reality you do, intentionally doesn't persist between refreshes
|
||||
// With no arguments, toggles on/off
|
||||
dev.amplify = function(amplification) {
|
||||
if (amplification !== undefined && amplification > 0) {
|
||||
tempAmplifyToggle = true;
|
||||
tempAmplifyFactor = amplification;
|
||||
} else {
|
||||
tempAmplifyToggle = !tempAmplifyToggle;
|
||||
}
|
||||
};
|
||||
|
||||
dev.togglePerformanceStats = function() {
|
||||
PerformanceStats.toggle();
|
||||
};
|
||||
@ -294,21 +270,6 @@ dev.buyAllPerks = function() {
|
||||
}
|
||||
};
|
||||
|
||||
(function() {
|
||||
let kongTest;
|
||||
const setKongTest = value => {
|
||||
kongTest = value;
|
||||
localStorage.setItem("kongTest", kongTest);
|
||||
if (kongTest) {
|
||||
document.documentElement.classList.add("_kong-test");
|
||||
} else {
|
||||
document.documentElement.classList.remove("_kong-test");
|
||||
}
|
||||
};
|
||||
setKongTest(localStorage.getItem("kongTest") === "true");
|
||||
dev.kongTest = () => setKongTest(!kongTest);
|
||||
}());
|
||||
|
||||
// This should help for balancing different glyph types, strong rounding of values is intentional
|
||||
dev.printResourceTotals = function() {
|
||||
console.log(`Antimatter: e${Currency.antimatter.exponent.toPrecision(3)}`);
|
||||
|
@ -224,6 +224,7 @@ export function manualRequestDimensionBoost(bulk) {
|
||||
export function requestDimensionBoost(bulk) {
|
||||
if (Currency.antimatter.gt(Player.infinityLimit) || !DimBoost.requirement.isSatisfied) return;
|
||||
if (!DimBoost.canBeBought) return;
|
||||
Tutorial.turnOffEffect(TUTORIAL_STATE.DIMBOOST);
|
||||
if (BreakInfinityUpgrade.autobuyMaxDimboosts.isBought && bulk) maxBuyDimBoosts();
|
||||
else softReset(1);
|
||||
}
|
||||
|
@ -145,6 +145,7 @@ export function manualRequestGalaxyReset(bulk) {
|
||||
export function requestGalaxyReset(bulk, limit = Number.MAX_VALUE) {
|
||||
if (EternityMilestone.autobuyMaxGalaxies.isReached && bulk) return maxBuyGalaxies(limit);
|
||||
if (player.galaxies >= limit || !Galaxy.canBeBought || !Galaxy.requirement.isSatisfied) return false;
|
||||
Tutorial.turnOffEffect(TUTORIAL_STATE.GALAXY);
|
||||
galaxyReset();
|
||||
return true;
|
||||
}
|
||||
|
@ -14,6 +14,11 @@ import { GameKeyboard } from "./keyboard";
|
||||
// Note: mod is a function key helper by Mousetap for both ctrl and command,
|
||||
// and should be used to provide support for both Windows and Max
|
||||
|
||||
// Note: DON'T add repeatables with modifier keys other than shift
|
||||
// because Mousetrap is crap, and we needed to plug it up to work
|
||||
// properly with shift, so you will need to plug it up additionally
|
||||
// for the other modifier keys (#3093).
|
||||
|
||||
// Free keys:
|
||||
// i, j, k, l, n, o, p, q, v, w, x
|
||||
|
||||
@ -267,13 +272,7 @@ export const shortcuts = [
|
||||
];
|
||||
|
||||
for (const hotkey of shortcuts) {
|
||||
let keys = "";
|
||||
for (const key of hotkey.keys) {
|
||||
// There may be multiple keys required, and the syntax is key1+key2+key3
|
||||
if (keys === "") keys += key;
|
||||
else keys += `+${key}`;
|
||||
}
|
||||
GameKeyboard[hotkey.type](keys, hotkey.function);
|
||||
GameKeyboard[hotkey.type](hotkey.keys.join("+"), hotkey.function);
|
||||
}
|
||||
|
||||
// We need to know whether the player is holding R or not for the replicanti galaxy
|
||||
@ -305,6 +304,7 @@ GameKeyboard.bindHotkey("alt+y", () => toggleAutobuyer(Autobuyer.reality));
|
||||
GameKeyboard.bindRepeatableHotkey(`${tier}`, () => buyManyDimension(tier));
|
||||
GameKeyboard.bindRepeatableHotkey(`num${tier}`, () => buyManyDimension(tier));
|
||||
GameKeyboard.bindRepeatableHotkey(`shift+${tier}`, () => buyOneDimension(tier));
|
||||
GameKeyboard.bindRepeatableHotkey(`shift+num${tier}`, () => buyOneDimension(tier));
|
||||
GameKeyboard.bindHotkey(`alt+${tier}`, () => toggleAutobuyer(Autobuyer.antimatterDimension(tier)));
|
||||
GameKeyboard.bindHotkey(`alt+num${tier}`, () => toggleAutobuyer(Autobuyer.antimatterDimension(tier)));
|
||||
GameKeyboard.bindHotkey(`shift+alt+${tier}`, () => toggleBuySingles(Autobuyer.antimatterDimension(tier)));
|
||||
|
@ -5,10 +5,28 @@ const numpadKeys = {};
|
||||
for (let num = 1; num <= 9; num++) numpadKeys[num + 96] = `num${num}`;
|
||||
Mousetrap.addKeycodes(numpadKeys);
|
||||
|
||||
function getKeys(combination) {
|
||||
return combination.split("+");
|
||||
}
|
||||
|
||||
// Extract "a" from "a", "shift+a", "shift+alt+a" and whatever else
|
||||
// Returns undefined for mod-only combos, like "shift+alt"
|
||||
const modifierKeys = ["ctrl", "shift", "alt", "mod"];
|
||||
function getMainKey(keys) {
|
||||
return keys.find(key => !modifierKeys.includes(key));
|
||||
}
|
||||
|
||||
class KeySpin {
|
||||
constructor(key, action) {
|
||||
constructor(key) {
|
||||
this.key = key;
|
||||
this.action = action;
|
||||
}
|
||||
|
||||
setAction(keys, action) {
|
||||
if (keys.includes("shift")) {
|
||||
this.shiftAction = action;
|
||||
} else {
|
||||
this.action = action;
|
||||
}
|
||||
}
|
||||
|
||||
start() {
|
||||
@ -16,14 +34,33 @@ class KeySpin {
|
||||
return;
|
||||
}
|
||||
this.isRunning = true;
|
||||
this.action();
|
||||
this.executeAction();
|
||||
this.interval = setInterval(() => {
|
||||
clearInterval(this.interval);
|
||||
this.action();
|
||||
this.interval = setInterval(() => this.action(), 40);
|
||||
this.executeAction();
|
||||
this.interval = setInterval(() => this.executeAction(), 40);
|
||||
}, 500);
|
||||
}
|
||||
|
||||
executeAction() {
|
||||
if (ui.view.shiftDown && this.shiftAction !== undefined) {
|
||||
this.shiftAction();
|
||||
} else if (this.action !== undefined) {
|
||||
this.action();
|
||||
}
|
||||
}
|
||||
|
||||
probablyStop() {
|
||||
// Goddamn, Mousetrap
|
||||
// It doesn't call keyup "1" for the case where you have "shift+1" pressed,
|
||||
// and you release the "1" key. Instead, it will call the keyup for "shift+1"
|
||||
// To fix this issue, we will stop on "shift+1", but only if we know that
|
||||
// shift is pressed, and that's what's in the ui.view.shiftDown
|
||||
if (ui.view.shiftDown) {
|
||||
this.stop();
|
||||
}
|
||||
}
|
||||
|
||||
stop() {
|
||||
this.isRunning = false;
|
||||
if (this.interval) {
|
||||
@ -35,7 +72,7 @@ class KeySpin {
|
||||
|
||||
export class GameKeyboard {
|
||||
static stopSpins() {
|
||||
for (const spin of GameKeyboard.spins) {
|
||||
for (const spin of spins) {
|
||||
spin.stop();
|
||||
}
|
||||
}
|
||||
@ -45,7 +82,7 @@ export class GameKeyboard {
|
||||
}
|
||||
|
||||
static bindRepeatable(key, callback) {
|
||||
this._bindSpin(key, new KeySpin(key, () => executeKey(callback)));
|
||||
this._bindSpin(key, () => executeKey(callback));
|
||||
}
|
||||
|
||||
static bindHotkey(key, callback, type) {
|
||||
@ -53,16 +90,26 @@ export class GameKeyboard {
|
||||
}
|
||||
|
||||
static bindRepeatableHotkey(key, callback) {
|
||||
this._bindSpin(key, new KeySpin(key, () => executeHotkey(callback)));
|
||||
this._bindSpin(key, () => executeHotkey(callback));
|
||||
}
|
||||
|
||||
static _bindSpin(key, spin) {
|
||||
if (GameKeyboard.spins.find(s => s.key === key)) {
|
||||
throw `Duplicate spin binding for ${key}`;
|
||||
static _bindSpin(combination, action) {
|
||||
const keys = getKeys(combination);
|
||||
const mainKey = getMainKey(keys);
|
||||
let spin = spins.find(s => s.key === mainKey);
|
||||
if (spin === undefined) {
|
||||
spin = new KeySpin(mainKey);
|
||||
spins.push(spin);
|
||||
Mousetrap.bind(mainKey, () => spin.start(), "keydown");
|
||||
Mousetrap.bind(mainKey, () => spin.stop(), "keyup");
|
||||
}
|
||||
GameKeyboard.spins.push(spin);
|
||||
Mousetrap.bind(key, () => spin.start(), "keydown");
|
||||
Mousetrap.bind(key, () => spin.stop(), "keyup");
|
||||
|
||||
if (combination !== mainKey) {
|
||||
Mousetrap.bind(combination, () => spin.start(), "keydown");
|
||||
Mousetrap.bind(combination, () => spin.probablyStop(), "keyup");
|
||||
}
|
||||
|
||||
spin.setAction(keys, action);
|
||||
}
|
||||
|
||||
static disable() {
|
||||
@ -71,7 +118,7 @@ export class GameKeyboard {
|
||||
}
|
||||
}
|
||||
|
||||
GameKeyboard.spins = [];
|
||||
const spins = [];
|
||||
|
||||
function executeKey(action) {
|
||||
if (ui.$viewModel.modal.progressBar !== undefined || GameEnd.endState >= END_STATE_MARKERS.INTERACTIVITY_DISABLED) {
|
||||
|
@ -16,6 +16,7 @@ export const NG = {
|
||||
// It's easier to do something like this to avoid it entirely.
|
||||
const automatorConstants = JSON.stringify(player.reality.automator.constants);
|
||||
const automatorScripts = JSON.stringify(player.reality.automator.scripts);
|
||||
const fullCompletions = player.records.fullGameCompletions;
|
||||
Modal.hideAll();
|
||||
Quote.clearAll();
|
||||
GameStorage.hardReset();
|
||||
@ -24,6 +25,7 @@ export const NG = {
|
||||
player.secretAchievementBits = JSON.parse(secretAchievements);
|
||||
player.reality.automator.constants = JSON.parse(automatorConstants);
|
||||
player.reality.automator.scripts = JSON.parse(automatorScripts);
|
||||
player.records.fullGameCompletions = fullCompletions + 1;
|
||||
ui.view.newUI = player.options.newUI;
|
||||
ui.view.news = player.options.news.enabled;
|
||||
Themes.find(Theme.currentName()).set();
|
||||
|
@ -270,6 +270,7 @@ window.player = {
|
||||
timePlayedAtBHUnlock: Number.MAX_VALUE,
|
||||
realTimePlayed: 0,
|
||||
realTimeDoomed: 0,
|
||||
fullGameCompletions: 0,
|
||||
totalAntimatter: DC.E1,
|
||||
lastTenInfinities: Array.range(0, 10).map(() =>
|
||||
[Number.MAX_VALUE, DC.D1, DC.D1, Number.MAX_VALUE]),
|
||||
@ -370,6 +371,7 @@ window.player = {
|
||||
completeFullGame: 0,
|
||||
},
|
||||
milestones: [],
|
||||
achievementTimes: {},
|
||||
},
|
||||
IPMultPurchases: 0,
|
||||
version: 13,
|
||||
|
@ -10,6 +10,228 @@ GameDatabase.changelog = [
|
||||
* @property {function: @return String} info Text body of information for the entry.
|
||||
* }
|
||||
*/
|
||||
{
|
||||
// TODO This is just a placeholder date (today), change this to the actual release date
|
||||
date: [2022, 11, 21],
|
||||
name: "The Reality Update",
|
||||
info: `
|
||||
<b>MAJOR STUFF:</b><br>
|
||||
<ul>
|
||||
<li>The Reality prestige layer.</li>
|
||||
<li>Added Glyphs.</li>
|
||||
<li>Added Reality Upgrades.</li>
|
||||
<li>Added Perks.</li>
|
||||
<li>Added an Automator.</li>
|
||||
<li>Added a Black Hole.</li>
|
||||
<li>Added Celestials.</li>
|
||||
<li>Added a new Modern UI style. The Old UI style is still available as Classic UI.</li>
|
||||
<li>Added modals to replace browser alerts, confirmations, and prompts.</li>
|
||||
<li>Added a How to Play modal with much more detail compared to the old How to Play.</li>
|
||||
<li>Added 5 new rows of achievements.</li>
|
||||
<li>Added a Multiplier Breakdown subtab.</li>
|
||||
<li>Added more Nicholas Cage.</li>
|
||||
<li>Cloud saving is now available to everyone. This needs your Google account.</li>
|
||||
<li>Shop tab is now available to everyone.</li>
|
||||
<li>Redesigned overall UI styling.</li>
|
||||
<li>\uE010</li>
|
||||
<li>Rewrote the game UI using the Vue.js framework, significantly improving performance, stability,
|
||||
and code maintainability.</li>
|
||||
<li>Added a speedrun mode.</li>
|
||||
</ul>
|
||||
<br>
|
||||
|
||||
Options and Accessibility:
|
||||
<ul>
|
||||
<li>Added a content summary modal to help players remember older game mechanics after a long time away.</li>
|
||||
<li>Added more keyboard shortcuts.</li>
|
||||
<li>Added more confirmations. (can be turned off in options)</li>
|
||||
<li>Added animations for Eternity and Dilation. (can be turned off in options)</li>
|
||||
<li>Added more community news and new AI news. (generated by AI using data from suggestions by community)</li>
|
||||
<li>Added a tutorial glow effect and icon to some buttons when first starting the game.</li>
|
||||
<li>Added a dropdown menu for easier selection of themes and notations.</li>
|
||||
<li>Added secret number of secret themes, all of which are no longer case sentitive.</li>
|
||||
<li>Unlocked secret themes are now permanently available to select from the dropdown.</li>
|
||||
<li>Added more notations.</li>
|
||||
<li>Added options to import and export saves from files.</li>
|
||||
<li>Added a max all Infinity Dimensions button.</li>
|
||||
<li>Added a button to minimize TT shop.</li>
|
||||
<li>Added 3 more study tree save slots. (total of 6)</li>
|
||||
<li>Added a blob.</li>
|
||||
<li>Added the ability to edit existing study tree slots.</li>
|
||||
<li>Added a modal for automatic selection of study tree paths when shift-clicking.</li>
|
||||
<li>Added a line of text on the IC tab telling "All Infinity Challenges unlocked" when all ICs are unlocked.</li>
|
||||
<li>Added a line of text on the EC tab telling that how many ECs are unlocked.</li>
|
||||
<li>Added options for adjusting save frequency and displaying time since last save.</li>
|
||||
<li>Added the ability to name your save file.</li>
|
||||
<li>Entries in away progress can now be individually shown or hidden.</li>
|
||||
<li>Added the ability to hide tabs and subtabs.</li>
|
||||
<li>Added options for adjusting offline progress behavior.</li>
|
||||
<li>Added an option to automatically switch tabs on some events.</li>
|
||||
<li>Added options to adjust news ticker scroll speed and repetition.</li>
|
||||
<li>Added IDs for Challenges and Achievements. (can be turned off in options)</li>
|
||||
<li>Added more progress bar information. (EC goal, progress in Dilation until TP gain)</li>
|
||||
<li>Added an option to turn off dynamic amount in autobuyers.</li>
|
||||
<li>Added a display showing you what type of Infinity/Eternity/Reality you are in, such as Dilation or Challenges</li>
|
||||
<li>You can now press other hotkeys while holding down a hotkey without interrupting the held hotkey.</li>
|
||||
<li>Info displays are now visible by default. (can be turned off in options)</li>
|
||||
<li>Improved import save modal by adding resouce information and offline progress mode selection.</li>
|
||||
<li>Number input fields may now have input assistance depending on your browser. (such as up and down arrows
|
||||
on the side)</li>
|
||||
<li>Resetting the game now requires inputting a specific phrase in order to prevent accidental resets.</li>
|
||||
</ul>
|
||||
<br>
|
||||
|
||||
Wording and Layout Changes:
|
||||
<ul>
|
||||
<li>Changed "Dimension Shift" to "Dimension Boost".</li>
|
||||
<li>Changed "Infinitied stat" to "Infinities".</li>
|
||||
<li>Changed "free galaxy" to "Tachyon Galaxy".</li>
|
||||
<li>Tickspeed now displays as a X/sec rate instead of a very small fraction X/Y tick time.</li>
|
||||
<li>Changed various texts for better clarity.</li>
|
||||
<li>Moved Autobuyers subtab to a new Automation tab and added additional controls for other Autobuyers to the tab,
|
||||
such as Infinity Dimension and Replicanti autobuyers.</li>
|
||||
<li>Added subsections in the Statistics subtab.</li>
|
||||
<li>Footer links have been moved to the new How to Play and About the Game modals.</li>
|
||||
<li>Changed some Achievement names and pictures.</li>
|
||||
<li>Changed some secret Achievement name and requirements.</li>
|
||||
<li>The cost of bought Infinity upgrades is now hidden.</li>
|
||||
<li>The "BREAK INFINITY" button is now visible (but locked) even before Automated Big Crunch interval is 0.1s.</li>
|
||||
<li>Improved text for post-break cost scaling upgrades.</li>
|
||||
<li>The exit Challenge button is now hidden when the player is not in a challenge.</li>
|
||||
<li>Eternity Challenges now show their current reward as well as the reward for the next completion.</li>
|
||||
<li>Having Eternities no longer prevents the Infinity animation from playing.</li>
|
||||
<li>Added colors to the Crunch/Eternity buttons when you have more than e50 of IP/EP; the color shows if you gain less
|
||||
(red), around same (white), or more (green) IP/EP than you currently have.</li>
|
||||
<li>Moved study 33 to right side.</li>
|
||||
<li>Fixed some tpyos.</li>
|
||||
</ul>
|
||||
<br>
|
||||
|
||||
New Upgrades and Improved Technical Behavior:
|
||||
<ul>
|
||||
<li>Autobuyers are now unlockable before Infinity with antimatter, but can only be upgraded after completing their
|
||||
respective Challenges.</li>
|
||||
<li>Added a new Infinity upgrade for 1e3 IP that gives you 50% of your best IP/min without using Max All,
|
||||
while offline.</li>
|
||||
<li>Added a new Eternity milestone that gives you 25% of your best EP/min while offline.</li>
|
||||
<li>Added another 2 new milestones that give you Infinities and Eternities while offline.</li>
|
||||
<li>The "Infinity Point generation based on fastest Infinity" upgrade now takes all IP multipliers into account.</li>
|
||||
<li>Tickspeed calculation is now dynamic, updating immediately instead of requiring an upgrade to be purchased.</li>
|
||||
<li>You can buy multiple RG at once if you have enough replicanti; you are no longer limited to one per game tick.</li>
|
||||
<li>Improved Time Dimension Max all behavior.</li>
|
||||
<li>Normal and Infinity Challenges now give rewards after Big Crunch.</li>
|
||||
<li>The Eternity autobuyer can now trigger when you have reached the EC goal, regardless of the settings.</li>
|
||||
</ul>
|
||||
<br>
|
||||
|
||||
Balance Changes:
|
||||
<ul>
|
||||
<li>NC10, 11, and 12 now unlock after 16 Infinities</li>
|
||||
<li>Each Achievement grants an additional 1.03x multiplier to Antimatter Dimensions.</li>
|
||||
<li>The Big Crunch Autobuyer's initial interval has been halved, requiring only half as much IP to max out, and
|
||||
other autobuyers have drastically lowered initial intervals.</li>
|
||||
<li>The 500 IP Infinity upgrade now costs 300 IP.</li>
|
||||
<li>Nicholas Cage.</li>
|
||||
<li>The 20-eternities milestone was moved to 8-eternities.</li>
|
||||
<li>Increased cost scaling for Time Dimensions after 1e6000.</li>
|
||||
<li>TS 83 has been hard capped.</li>
|
||||
<li>Lowered the Dilation unlock requirement from 13000 to 12900 total TT.</li>
|
||||
<li>TP gain amount in Dilation is now calculated based on the highest AM reached.</li>
|
||||
<li>Purchasing the study to unlock Dilation now requires a 23rd row study purchase.</li>
|
||||
<li>Changed the condition of IC1 (now it just applies Challenge restrictions, instead of running them).</li>
|
||||
<li>Changed the unlock conditions of IC2 (from 1e5000 to 1e10500) and IC6 (from 1e20000 to 1e22500).</li>
|
||||
<li>Changed the goal of IC1 (from 1e850 to 1e650).</li>
|
||||
<li>Changed the goal of IC5 (from 1e11111 to 1e16500).</li>
|
||||
<li>Added reward to "I forgot to nerf that" (5% mult to 1st AD).</li>
|
||||
<li>Added reward to "Is this safe?" (keep 1 RG on Infinity).</li>
|
||||
<li>Added reward to "Eternities are the new Infinity" (gain x2 more Eternities).</li>
|
||||
<li>Added reward to "This is what I have to do to get rid of you" (remove downside from TS 131 and 133).</li>
|
||||
<li>Changed reward of "That's FAST!" (from 1000 to 5000).</li>
|
||||
<li>Changed reward of "That's FASTER!" (from 2e5 to 5e5).</li>
|
||||
<li>Changed reward of "Forever isn't that long" (from 1e10 to 5e10).</li>
|
||||
<li>Changed reward of "Blink of an eye" (from 1e25 with dimension mult to 5e25).</li>
|
||||
<li>Changed reward of "That wasn't an eternity" (from 2e25 to 5e25).</li>
|
||||
<li>Changed requirement of "The Gods are pleased" (from x600 to x600 outside of NC8).</li>
|
||||
<li>Changed requirement of "Daredevil" (from 2 to 3).</li>
|
||||
<li>Changed requirement of "Blink of an eye" (from 200 ms to 250 ms).</li>
|
||||
<li>Changed requirement of "Game design is my passion (Hevipelle did nothing wrong)" (from 10 sec to 15 sec).</li>
|
||||
<li>Changed requirement of "MAXIMUM OVERDRIVE" (from 1e300 IP/min to 1e300 IP).</li>
|
||||
<li>Changed requirement of "Eternities are the new Infinity" (from 200 ms to 250 ms).</li>
|
||||
<li>Changed requirement of "Is this safe?" (from 30 minutes to 1 hour).</li>
|
||||
<li>Changed requirement of "Like feasting" (from 1e100 to 1e90).</li>
|
||||
<li>Changed requirement of "No ethical consumption" (from 5e9 to 2e9).</li>
|
||||
<li>Changed requirement of "When will it be enough?" (from 1e20000 to 1e18000).</li>
|
||||
<li>Changed requirement of "I never liked this infinity stuff anyway" (from 1e140000 to 1e200000).</li>
|
||||
<li>Changed requirement of "Unique snowflakes" (from 630 to 569).</li>
|
||||
<li>Changed requirement of "Now you're thinking with dilation!" (from 1e600 EP to 1e260000 AM).</li>
|
||||
<li>Changed requirement of "This is what I have to do to get rid of you" (from 1e20000 to 1e26000).</li>
|
||||
<li>Changed achievement 41 to "No DLC required", "buy 16 IU", "unlock 2 new IU".</li>
|
||||
<li>Changed position of "Zero deaths" (from 43 to 64).</li>
|
||||
<li>Changed position of "1 Million is a lot" (from 64 to 77).</li>
|
||||
<li>Changed position of "How the antitables have turned" (from 77 to 43).</li>
|
||||
<li>Swapped achievements 101 and 117.</li>
|
||||
<li>Swapped achievements 113 and 124.</li>
|
||||
<li>Lowered initial costs of post-break cost scaling upgrades (Tickspeed cost from 3e6 to 1e6,
|
||||
Dimension cost from 1e8 to 1e7).</li>
|
||||
<li>NC7 was reworked to not have RNG.</li>
|
||||
</ul>
|
||||
<br>
|
||||
|
||||
Removed features:
|
||||
<ul>
|
||||
<li>Infinity is now non-fixable.</li>
|
||||
<li>Removed autobuyer priority.</li>
|
||||
<li>Removed production graph subtab.</li>
|
||||
<li>Removed fungame.</li>
|
||||
<li>Removed savefixer.</li>
|
||||
<li>Removed some news.</li>
|
||||
<li>Removed floating text from purchasing Dimensions.</li>
|
||||
<li>Removed blob that caused game crash.</li>
|
||||
</ul>
|
||||
<br>
|
||||
|
||||
Bugfixes:
|
||||
<ul>
|
||||
<li>ID and replicanti autobuyer buttons are now hidden in EC8.</li>
|
||||
<li>Fixed a bug where IC5's cost increment was applied 2 times.</li>
|
||||
<li>Fixed a bug where inverted themes were broken.</li>
|
||||
<li>Fixed a bug where resetting the game unlocks a secret achievement.</li>
|
||||
<li>Fixed a bug where ECs are showing wrong goals after their 5th completion.</li>
|
||||
<li>Fixed a bug where non-antimatter galaxies weren't applying for tickspeed if your total galaxy count was less
|
||||
than 3.</li>
|
||||
<li>Fixed a bug where you could produce more than infinite antimatter for 1 tick even if you had a fixed Infinity or
|
||||
were in a challenge.</li>
|
||||
<li>Fixed a bug where formatted numbers on autobuyers wouldn't update properly when changing your notation.</li>
|
||||
<li>Fixed a bug where Infinity Dimensions would automatically purchase upon unlocking them in EC8 while autobuyers were
|
||||
enabled.</li>
|
||||
<li>Fixed a bug where the replicanti upgrade autobuyers would incorrectly display as off upon load/import.</li>
|
||||
<li>Fixed a bug where the replicanti interval upgrade would say it would upgrade to a number below the max speed.</li>
|
||||
<li>Fixed a bug where your Infinity Dimension mult would show as 0x if you had 0 infinity power.</li>
|
||||
<li>Fixed a bug where you could complete EC4 with 1 more Infinity than was allowed, by using the autobuyer.</li>
|
||||
<li>Fixed a bug where all non-Dimension Autobuyers didn't respect notation on the cost to reduce their interval.</li>
|
||||
<li>Fixed a bug where the Achievement reward from "To infinity!" wasn't working.</li>
|
||||
<li>Fixed a bug where the Sacrifice confirmation would show if you pressed the hotkey even when
|
||||
you can't Sacrifice.</li>
|
||||
<li>Fixed a bug where the game saved notification would appear twice when importing a save.</li>
|
||||
<li>Fixed a bug where the speed of the Tachyon Particle animation was affected your monitor's refresh rate. (if you have
|
||||
a 60hz monitor, it will be the same speed as it was before)</li>
|
||||
<li>Fixed a bug where the Achievement unlock notification for unlocking "4.3333 minutes of Infinity" said
|
||||
"Minute of Infinity".</li>
|
||||
<li>Fixed a bug where you could still Sacrifice after reaching Infinity.</li>
|
||||
<li>Fixed a bug where your free tickspeed upgrade count would display as a negative number shortly after purchasing your
|
||||
first Time Dimension.</li>
|
||||
<li>Fixed a bug where you were unable to purchase Dimensions if you had exactly their cost and their cost was below
|
||||
Infinity.</li>
|
||||
<li>Fixed a bug where the "X%" text on the progress bar was left aligned rather than centered.</li>
|
||||
<li>Fixed a bug where the Achievement image for "Blink of an eye" was a gif.</li>
|
||||
<li>Fixed a bug where the Achievement unlock condition of "Yo dawg, I heard you liked infinities" was not checked
|
||||
correctly.</li>
|
||||
<li>Fixed a bug where the formula for the displayed multiplier on TS11 was incorrect.</li>
|
||||
<li>Fixed a bug where the Sacrifice and Dimension Boost Autobuyer would not honor Autobuyer interval.</li>
|
||||
<li>Fixed a bug where the Reality link was just a video of some guy dancing.</li>
|
||||
<li>Fixed a bunch of other bugs.</li>
|
||||
`
|
||||
},
|
||||
{
|
||||
date: [2018, 6, 17],
|
||||
name: "This Update Sucks",
|
||||
|
@ -350,6 +350,9 @@ GameDatabase.credits = {
|
||||
}, {
|
||||
name: "Sweets the Alien",
|
||||
roles: 13
|
||||
}, {
|
||||
name: "Tables",
|
||||
roles: 13,
|
||||
}, {
|
||||
name: "Taylor Reeves",
|
||||
roles: 13
|
||||
|
@ -35,9 +35,9 @@ cut off part of the text if you are using one to transfer the save between devic
|
||||
A properly-formatted save string from the Reality update will start with
|
||||
<b>${GameSaveSerializer.startingString.savefile}</b> and end with <b>${GameSaveSerializer.endingString.savefile}</b>.
|
||||
If you are importing from a version of the game from before Reality was released, it will instead start with <b>eyJ</b>
|
||||
and end with <b>==</b>. If neither of these are the case, then part of your save is missing and it will fail to import.
|
||||
In addition to importing and exporting to your clipboard, you can also import and export from text files as well.
|
||||
<br>
|
||||
and end with <b>In19</b>, <b>fX0=</b>, or <b>fQ==</b>. If neither of these are the case, then part of your save is
|
||||
missing and it will fail to import. In addition to importing and exporting to your clipboard, you can also import
|
||||
and export from text files as well.
|
||||
<br>
|
||||
You can use the "Choose save" button to pick between three separate saves on your browser. These saves are, for most
|
||||
intents and purposes, completely separate from each other. Importing and exporting will only affect the current save
|
||||
@ -1289,9 +1289,9 @@ ${Enslaved.isCompleted
|
||||
The Nameless Ones won't directly unlock the next Celestial.
|
||||
`,
|
||||
isUnlocked: () => EffarigUnlock.eternity.isUnlocked,
|
||||
// TODO Add the rest of the testers here too before release; this is all only pre wave 1
|
||||
tags: ["reality", "time", "blackhole", "lategame", "endgame", "testers", "celestial",
|
||||
"ikerstream", "realrapidjazz", "saturnus", "earth", "garnet", "pichusuperlover"],
|
||||
...GameDatabase.credits.people.map(p => p.name)
|
||||
],
|
||||
tab: "celestials/enslaved"
|
||||
}, {
|
||||
name: "Tesseracts",
|
||||
|
@ -52,8 +52,8 @@ import "./multiplier-tab/index";
|
||||
|
||||
import "./celestials/quotes/index";
|
||||
|
||||
import "./h2p";
|
||||
|
||||
import "./credits";
|
||||
|
||||
import "./h2p";
|
||||
|
||||
import "./changelog";
|
||||
|
@ -431,7 +431,6 @@ GameDatabase.news = [
|
||||
link: "https://www.kongregate.com/games/Oninou/wami"
|
||||
},
|
||||
{
|
||||
// TODO: update this link because of the removal of flash from browsers
|
||||
name: "Anti-Idle",
|
||||
link: "https://www.kongregate.com/games/Tukkun/anti-idle-the-game"
|
||||
},
|
||||
|
@ -99,28 +99,28 @@ GameDatabase.progressStages = [
|
||||
{
|
||||
id: PROGRESS_STAGE.TERESA,
|
||||
name: "Teresa (1st Celestial)",
|
||||
hasReached: save => save.celestials.teresa.quoteBits > 0,
|
||||
hasReached: save => save.celestials?.teresa?.quoteBits > 0,
|
||||
suggestedResource: "Reality Machines",
|
||||
subProgressValue: save => Math.log10(1 + save.celestials.teresa.pouredAmount) / 21,
|
||||
},
|
||||
{
|
||||
id: PROGRESS_STAGE.EFFARIG,
|
||||
name: "Effarig (2nd Celestial)",
|
||||
hasReached: save => save.celestials.effarig.quoteBits > 0,
|
||||
hasReached: save => save.celestials?.effarig?.quoteBits > 0,
|
||||
suggestedResource: "Reality Machines and Relic Shards",
|
||||
subProgressValue: save => Math.log10(1 + save.celestials.effarig.relicShards) / 14,
|
||||
},
|
||||
{
|
||||
id: PROGRESS_STAGE.ENSLAVED,
|
||||
name: "The Nameless Ones (3rd Celestial)",
|
||||
hasReached: save => save.celestials.enslaved.quoteBits > 0,
|
||||
hasReached: save => save.celestials?.enslaved?.quoteBits > 0,
|
||||
suggestedResource: "Reality Machines and Glyph Level",
|
||||
subProgressValue: save => Math.sqrt((new Decimal(save.reality.realityMachines).log10() - 30) / 30),
|
||||
},
|
||||
{
|
||||
id: PROGRESS_STAGE.V,
|
||||
name: "V (4th Celestial)",
|
||||
hasReached: save => save.celestials.v.quoteBits > 0,
|
||||
hasReached: save => save.celestials?.v?.quoteBits > 0,
|
||||
suggestedResource: "Number of V-Achievements",
|
||||
subProgressValue: save => 0.0277 * Object.values(save.celestials.v.runUnlocks)
|
||||
.reduce((total, ach) => total + ach, 0),
|
||||
@ -128,28 +128,28 @@ GameDatabase.progressStages = [
|
||||
{
|
||||
id: PROGRESS_STAGE.RA,
|
||||
name: "Ra (5th Celestial)",
|
||||
hasReached: save => save.celestials.ra.quoteBits > 0,
|
||||
hasReached: save => save.celestials?.ra?.quoteBits > 0,
|
||||
suggestedResource: "Celestial Memories",
|
||||
subProgressValue: save => Object.values(save.celestials.ra.pets).reduce((sum, pet) => sum + pet.level, 0) / 100,
|
||||
},
|
||||
{
|
||||
id: PROGRESS_STAGE.IMAGINARY_MACHINES,
|
||||
name: "Imaginary Machines",
|
||||
hasReached: save => save.reality.iMCap > 0,
|
||||
hasReached: save => save.reality?.iMCap > 0,
|
||||
suggestedResource: "Imaginary Machines",
|
||||
subProgressValue: save => Math.log10(1 + save.reality.iMCap) / 9,
|
||||
},
|
||||
{
|
||||
id: PROGRESS_STAGE.LAITELA,
|
||||
name: "Lai'tela (6th Celestial)",
|
||||
hasReached: save => save.celestials.laitela.quoteBits > 0,
|
||||
hasReached: save => save.celestials?.laitela?.quoteBits > 0,
|
||||
suggestedResource: "Dark Matter and Singularities",
|
||||
subProgressValue: save => new Decimal(save.celestials.laitela.darkMatter).log10() / 308.25,
|
||||
},
|
||||
{
|
||||
id: PROGRESS_STAGE.PELLE,
|
||||
name: "Pelle (7th Celestial)",
|
||||
hasReached: save => save.celestials.pelle.doomed,
|
||||
hasReached: save => save.celestials?.pelle?.doomed,
|
||||
suggestedResource: "Remnants",
|
||||
subProgressValue: save => Math.log10(1 + save.celestials.pelle.remnants) / 9,
|
||||
},
|
||||
|
@ -4,24 +4,11 @@ import Payments from "./payments";
|
||||
|
||||
export const shop = {};
|
||||
|
||||
shop.kongEnabled = false;
|
||||
|
||||
shop.init = function() {
|
||||
if (document.referrer.indexOf("kongregate") === -1)
|
||||
return;
|
||||
shop.kongEnabled = true;
|
||||
try {
|
||||
kongregateAPI.loadAPI(() => {
|
||||
window.kongregate = kongregateAPI.getAPI();
|
||||
});
|
||||
// eslint-disable-next-line no-console
|
||||
} catch (err) { console.log("Couldn't load Kongregate API"); }
|
||||
};
|
||||
|
||||
export const ShopPurchaseData = {
|
||||
totalSTD: 0,
|
||||
spentSTD: 0,
|
||||
respecAvailable: false,
|
||||
lastRespec: "",
|
||||
|
||||
get availableSTD() {
|
||||
return this.totalSTD - this.spentSTD;
|
||||
@ -31,10 +18,21 @@ export const ShopPurchaseData = {
|
||||
return Cloud.loggedIn && this.availableSTD >= 0 && player.IAP.enabled;
|
||||
},
|
||||
|
||||
// We also allow for respecs if it's been at least 3 days since the last one
|
||||
get timeUntilRespec() {
|
||||
const msSinceLast = Date.now() - new Date(ShopPurchaseData.lastRespec).getTime();
|
||||
return TimeSpan.fromMilliseconds(3 * 86400 * 1000 - msSinceLast);
|
||||
},
|
||||
|
||||
get canRespec() {
|
||||
return this.respecAvailable || this.timeUntilRespec.totalDays <= 0;
|
||||
},
|
||||
|
||||
updateLocalSTD(newData) {
|
||||
this.totalSTD = newData.totalSTD;
|
||||
this.spentSTD = newData.spentSTD;
|
||||
this.respecAvailable = newData.respecAvailable;
|
||||
this.lastRespec = newData.lastRespec ?? 0;
|
||||
for (const key of Object.keys(GameDatabase.shopPurchases)) this[key] = newData[key] ?? 0;
|
||||
GameStorage.save();
|
||||
},
|
||||
@ -54,14 +52,12 @@ export const ShopPurchaseData = {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (showNotification) GameUI.notify.info("STD purchases successfully loaded!", 10000);
|
||||
if (showNotification && newSTDData.totalSTD > 0) GameUI.notify.info("STD purchases successfully loaded!", 10000);
|
||||
this.updateLocalSTD(newSTDData);
|
||||
},
|
||||
|
||||
respecRequest() {
|
||||
if (!Cloud.loggedIn) {
|
||||
Modal.message.show(`You are not logged in to Google, anything on this tab cannot be used unless you log in.`);
|
||||
} else if (player.options.confirmations.respecIAP) {
|
||||
if (player.options.confirmations.respecIAP) {
|
||||
Modal.respecIAP.show();
|
||||
} else {
|
||||
this.respecAll();
|
||||
@ -69,7 +65,7 @@ export const ShopPurchaseData = {
|
||||
},
|
||||
|
||||
async respecAll() {
|
||||
if (!this.respecAvailable) {
|
||||
if (!this.canRespec) {
|
||||
Modal.message.show(`You do not have a respec available. Making an STD purchase allows you to respec your upgrades
|
||||
once. You can only have at most one of these respecs, and they do not refund offline production purchases.`);
|
||||
return;
|
||||
@ -181,45 +177,3 @@ shop.purchaseLongerTimeSkip = function() {
|
||||
Speedrun.setSTDUse(true);
|
||||
simulateTime(3600 * 24);
|
||||
};
|
||||
|
||||
shop.migratePurchases = function() {
|
||||
if (!shop.kongEnabled) return;
|
||||
try {
|
||||
kongregate.mtx.requestUserItemList("", items);
|
||||
// eslint-disable-next-line no-console
|
||||
} catch (e) { console.log(e); }
|
||||
|
||||
function items(result) {
|
||||
let ipPurchases = 0;
|
||||
let dimPurchases = 0;
|
||||
let epPurchases = 0;
|
||||
let alldimPurchases = 0;
|
||||
for (const item of result.data) {
|
||||
if (item.identifier === "doublemult") {
|
||||
player.IAP.totalSTD += 30;
|
||||
player.IAP.spentSTD += 30;
|
||||
dimPurchases++;
|
||||
}
|
||||
if (item.identifier === "doubleip") {
|
||||
player.IAP.totalSTD += 40;
|
||||
player.IAP.spentSTD += 40;
|
||||
ipPurchases++;
|
||||
}
|
||||
if (item.identifier === "tripleep") {
|
||||
player.IAP.totalSTD += 50;
|
||||
player.IAP.spentSTD += 50;
|
||||
epPurchases++;
|
||||
}
|
||||
if (item.identifier === "alldimboost") {
|
||||
player.IAP.totalSTD += 60;
|
||||
player.IAP.spentSTD += 60;
|
||||
alldimPurchases++;
|
||||
}
|
||||
|
||||
}
|
||||
player.IAP.dimPurchases = dimPurchases;
|
||||
player.IAP.allDimPurchases = alldimPurchases;
|
||||
player.IAP.IPPurchases = ipPurchases;
|
||||
player.IAP.EPPurchases = epPurchases;
|
||||
}
|
||||
};
|
||||
|
@ -4,7 +4,6 @@ import { GameMechanicState } from "./game-mechanics/index";
|
||||
export const Speedrun = {
|
||||
unlock() {
|
||||
if (player.speedrun.isUnlocked) return;
|
||||
// TODO Actually change this when the time comes
|
||||
Modal.message.show(`You have unlocked Speedrun Mode! This allows you to start a new save file with some slight
|
||||
changes which can be helpful if you're trying to complete the game as quickly as possible. The option to
|
||||
start a Speedrun Save is now available in the Options tab, under Saving. Choosing to start a Speedrun Save
|
||||
@ -22,7 +21,10 @@ export const Speedrun = {
|
||||
},
|
||||
// Hard-resets the current save and puts it in a state ready to be "unpaused" once resources start being generated
|
||||
prepareSave(name) {
|
||||
const fullCompletions = player.records.fullGameCompletions;
|
||||
GameStorage.hardReset();
|
||||
player.records.fullGameCompletions = fullCompletions;
|
||||
|
||||
player.speedrun.isUnlocked = true;
|
||||
player.speedrun.isActive = true;
|
||||
player.reality.seed = Date.now();
|
||||
|
@ -77,18 +77,27 @@ export const Cloud = {
|
||||
const encoded = snapshot.val();
|
||||
const uintArray = decodeBase64Binary(encoded.replace(/-/gu, "+").replace(/_/gu, "/"));
|
||||
const save = pako.ungzip(uintArray, { to: "string" });
|
||||
// TODO: do something with this.
|
||||
JSON.parse(save);
|
||||
}
|
||||
},
|
||||
|
||||
compareSaves(cloud, local, hash) {
|
||||
return {
|
||||
farther: ProgressChecker.compareSaveProgress(cloud, local),
|
||||
older: ProgressChecker.compareSaveTimes(cloud, local),
|
||||
differentName: cloud?.options.saveFileName !== local?.options.saveFileName,
|
||||
hashMismatch: this.lastCloudHash && this.lastCloudHash !== hash,
|
||||
};
|
||||
// This try/except will generally only throw an exception if the cloud save is somehow malformed.
|
||||
// In practice this should only happen for saves which are really old, or from very early development.
|
||||
// This will be handled upstream by showing a modal notifying the player of the invalid data and giving them
|
||||
// options to resolve it without needing to open up the console.
|
||||
// Note: This could also technically happen if the local save is malformed instead - this shouldn't
|
||||
// happen unless the player is overtly cheating through the console, and in that case it seems unreasonable
|
||||
// to attempt to handle such open-ended behavior gracefully
|
||||
try {
|
||||
return {
|
||||
farther: ProgressChecker.compareSaveProgress(cloud, local),
|
||||
older: ProgressChecker.compareSaveTimes(cloud, local),
|
||||
differentName: cloud?.options.saveFileName !== local?.options.saveFileName,
|
||||
hashMismatch: this.lastCloudHash && this.lastCloudHash !== hash,
|
||||
};
|
||||
} catch (e) {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
|
||||
async saveCheck(forceModal = false) {
|
||||
@ -110,10 +119,17 @@ export const Cloud = {
|
||||
this.save(saveId);
|
||||
};
|
||||
|
||||
// If the comparison fails, we assume the cloud data is corrupted and show the relevant modal
|
||||
if (!saveComparison) {
|
||||
Modal.addCloudConflict(saveId, saveComparison, cloudSave, localSave, overwriteAndSendCloudSave);
|
||||
Modal.cloudInvalidData.show({ isSaving: true });
|
||||
return;
|
||||
}
|
||||
|
||||
// Bring up the modal if cloud saving will overwrite a cloud save which is older or possibly farther
|
||||
const hasBoth = cloudSave && localSave;
|
||||
// NOTE THIS CHECK IS INTENTIONALLY DIFFERENT FROM THE LOAD CHECK
|
||||
const hasConflict = hasBoth && (saveComparison.older === -1 || saveComparison.farther !== 1 ||
|
||||
const hasConflict = hasBoth && saveComparison && (saveComparison.older === -1 || saveComparison.farther === -1 ||
|
||||
saveComparison.differentName || saveComparison.hashMismatch);
|
||||
if (forceModal || (hasConflict && player.options.showCloudModal)) {
|
||||
Modal.addCloudConflict(saveId, saveComparison, cloudSave, localSave, overwriteAndSendCloudSave);
|
||||
@ -157,6 +173,13 @@ export const Cloud = {
|
||||
GameUI.notify.info(`Cloud save (slot ${saveId + 1}) loaded`);/* for user ${this.user.displayName}`);*/
|
||||
};
|
||||
|
||||
// If the comparison fails, we assume the cloud data is corrupted and show the relevant modal
|
||||
if (!saveComparison) {
|
||||
Modal.addCloudConflict(saveId, saveComparison, cloudSave, localSave, overwriteLocalSave);
|
||||
Modal.cloudInvalidData.show({ isSaving: false });
|
||||
return;
|
||||
}
|
||||
|
||||
// Bring up the modal if cloud loading will overwrite a local save which is older or possibly farther
|
||||
const hasBoth = cloudSave && localSave;
|
||||
const hasConflict = hasBoth && (saveComparison.older === 1 || saveComparison.farther !== -1 ||
|
||||
|
@ -1518,13 +1518,10 @@ GameStorage.devMigrations = {
|
||||
const toDelete = ["totalSTD", "spentSTD", "exportSTD", "IPPurchases", "EPPurchases", "RMPurchases",
|
||||
"dimPurchases", "allDimPurchases", "replicantiPurchases", "dilatedTimePurchases", "disabled"];
|
||||
for (const key of toDelete) delete player.IAP[key];
|
||||
|
||||
// TODO Possibly update this with a dev STD migration?
|
||||
}
|
||||
],
|
||||
|
||||
patch(player) {
|
||||
if (!isDevEnvironment()) return;
|
||||
player.options.testVersion = player.options.testVersion || 0;
|
||||
for (let version = player.options.testVersion; version < this.patches.length; version++) {
|
||||
const patch = this.patches[version];
|
||||
|
@ -1,3 +1,5 @@
|
||||
import { DEV } from "../devtools";
|
||||
|
||||
import { deepmergeAll } from "@/utility/deepmerge";
|
||||
import { GameStorage } from "./storage";
|
||||
|
||||
@ -80,8 +82,7 @@ GameStorage.migrations = {
|
||||
13: player => {
|
||||
// 12.3 is currently on live, will be updated to 13 after release
|
||||
|
||||
// TODO: REMOVE THE FOLLOWING LINE BEFORE RELEASE/MERGE FROM TEST
|
||||
if (isDevEnvironment()) GameStorage.devMigrations.setLatestTestVersion(player);
|
||||
if (DEV) GameStorage.devMigrations.setLatestTestVersion(player);
|
||||
|
||||
// Last update version check, fix emoji/cancer issue,
|
||||
// change diff value from 1/10 of a second to 1/1000 of a second, delete pointless properties from player
|
||||
@ -151,8 +152,6 @@ GameStorage.migrations = {
|
||||
GameStorage.migrations.etercreqConversion(player);
|
||||
GameStorage.migrations.moveTS33(player);
|
||||
GameStorage.migrations.addBestPrestigeCurrency(player);
|
||||
|
||||
shop.migratePurchases();
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -65,7 +65,7 @@ export const ProgressChecker = {
|
||||
// Returns -1 or 1 based on which save is older. Returns 0 if one is undefined, will be handled upstream
|
||||
compareSaveTimes(first, second) {
|
||||
if (!first || !second) return 0;
|
||||
const timeDifference = first.records.realTimePlayed - second.records.realTimePlayed;
|
||||
const timeDifference = first.records?.realTimePlayed - second.records?.realTimePlayed;
|
||||
if (timeDifference >= 0) return -1;
|
||||
return 1;
|
||||
}
|
||||
|
@ -1,5 +1,7 @@
|
||||
import * as ADNotations from "@antimatter-dimensions/notations";
|
||||
|
||||
import { DEV } from "../devtools";
|
||||
|
||||
import { deepmergeAll } from "@/utility/deepmerge";
|
||||
|
||||
export const GameStorage = {
|
||||
@ -16,7 +18,7 @@ export const GameStorage = {
|
||||
offlineTicks: undefined,
|
||||
|
||||
get localStorageKey() {
|
||||
return isDevEnvironment() ? "dimensionTestSave" : "dimensionSave";
|
||||
return DEV ? "dimensionTestSave" : "dimensionSave";
|
||||
},
|
||||
|
||||
load() {
|
||||
@ -213,15 +215,16 @@ export const GameStorage = {
|
||||
|
||||
const checkString = this.checkPlayerObject(playerObject);
|
||||
if (playerObject === Player.defaultStart || checkString !== "") {
|
||||
if (checkString !== "") {
|
||||
// TODO Probably remove this before release, it's mostly only helpful for debugging in development
|
||||
if (DEV && checkString !== "") {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(`Savefile was invalid and has been reset - ${checkString}`);
|
||||
}
|
||||
player = deepmergeAll([{}, Player.defaultStart]);
|
||||
player.records.gameCreatedTime = Date.now();
|
||||
player.lastUpdate = Date.now();
|
||||
if (isDevEnvironment()) this.devMigrations.setLatestTestVersion(player);
|
||||
if (DEV) {
|
||||
this.devMigrations.setLatestTestVersion(player);
|
||||
}
|
||||
} else {
|
||||
const isPreviousVersionSave = playerObject.version < 13;
|
||||
player = this.migrations.patch(playerObject);
|
||||
@ -229,12 +232,14 @@ export const GameStorage = {
|
||||
// Needed to check some notification about reality unlock study.
|
||||
EventHub.dispatch(GAME_EVENT.SAVE_CONVERTED_FROM_PREVIOUS_VERSION);
|
||||
}
|
||||
this.devMigrations.patch(player);
|
||||
if (DEV) {
|
||||
this.devMigrations.patch(player);
|
||||
}
|
||||
}
|
||||
|
||||
this.saves[this.currentSlot] = player;
|
||||
|
||||
if (isDevEnvironment()) {
|
||||
if (DEV) {
|
||||
guardFromNaNValues(player);
|
||||
}
|
||||
|
||||
|
@ -48,6 +48,10 @@ export const Tutorial = {
|
||||
if (fromState !== player.tutorialState) return;
|
||||
player.tutorialActive = false;
|
||||
ui.view.tutorialActive = false;
|
||||
// Check if we can immediately enter next tutorial state. This is needed
|
||||
// to correctly handle buying dimension 2 + tickspeed in the same tick,
|
||||
// for example.
|
||||
this.tutorialLoop();
|
||||
},
|
||||
|
||||
// Moves on to the next tutorialState, but only if parameter is current state.
|
||||
|
@ -2,11 +2,11 @@ import TWEEN from "tween.js";
|
||||
|
||||
import { DC } from "./core/constants";
|
||||
import { deepmergeAll } from "@/utility/deepmerge";
|
||||
import { playFabLogin } from "./core/playfab";
|
||||
import { SpeedrunMilestones } from "./core/speedrun";
|
||||
import { supportedBrowsers } from "./supported-browsers";
|
||||
|
||||
import Payments from "./core/payments";
|
||||
import { DEV } from "./core/devtools";
|
||||
|
||||
if (GlobalErrorHandler.handled) {
|
||||
throw new Error("Initialization failed");
|
||||
@ -370,10 +370,6 @@ export function getGameSpeedupFactor(effectsToConsider, blackHolesActiveOverride
|
||||
// an effarig glyph.
|
||||
factor = Math.clamp(factor, 1e-300, 1e300);
|
||||
|
||||
// Dev speedup should always be active
|
||||
if (tempSpeedupToggle) {
|
||||
factor *= tempSpeedupFactor;
|
||||
}
|
||||
return factor;
|
||||
}
|
||||
|
||||
@ -393,7 +389,6 @@ export function getGameSpeedupForDisplay() {
|
||||
// "diff" is in ms. It is only unspecified when it's being called normally and not due to simulating time, in which
|
||||
// case it uses the gap between now and the last time the function was called. This is on average equal to the update
|
||||
// rate.
|
||||
// TODO: Clean this up, remove the disable line
|
||||
// eslint-disable-next-line complexity
|
||||
export function gameLoop(passDiff, options = {}) {
|
||||
PerformanceStats.start("Frame Time");
|
||||
@ -848,6 +843,7 @@ export function getTTPerSecond() {
|
||||
return finalTT;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
function recursiveTimeOut(fn, iterations, endFn) {
|
||||
fn(iterations);
|
||||
if (iterations === 0) endFn();
|
||||
@ -898,7 +894,7 @@ export function simulateTime(seconds, real, fast) {
|
||||
} else if (infinitiedMilestone.gt(0)) {
|
||||
Currency.infinities.add(infinitiedMilestone);
|
||||
} else {
|
||||
Currency.eternityPoints.add(getOfflineEPGain(totalGameTime * 1000));
|
||||
Currency.eternityPoints.add(getOfflineEPGain(seconds * 1000));
|
||||
}
|
||||
|
||||
if (InfinityUpgrade.ipOffline.isBought && player.options.offlineProgress) {
|
||||
@ -1058,6 +1054,10 @@ export function browserCheck() {
|
||||
export function init() {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log("🌌 Antimatter Dimensions: Reality Update 🌌");
|
||||
if (DEV) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log("👨💻 Development Mode 👩💻");
|
||||
}
|
||||
GameStorage.load();
|
||||
Tabs.all.find(t => t.config.id === player.options.lastOpenTab).show(true);
|
||||
if(steamOn){SteamFunctions.UIZoom()}
|
||||
|
38
package-lock.json
generated
38
package-lock.json
generated
@ -5,9 +5,9 @@
|
||||
"packages": {
|
||||
"": {
|
||||
"dependencies": {
|
||||
"@antimatter-dimensions/notations": "^3.0.3",
|
||||
"@antimatter-dimensions/notations": "^3.1.0",
|
||||
"@fortawesome/fontawesome-free": "^6.1.1",
|
||||
"break_infinity.js": "^1.3.0",
|
||||
"break_infinity.js": "^2.0.0",
|
||||
"chevrotain": "^4.8.1",
|
||||
"codemirror": "^5.65.1",
|
||||
"core-js": "^3.6.5",
|
||||
@ -51,15 +51,15 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@antimatter-dimensions/notations": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@antimatter-dimensions/notations/-/notations-3.0.3.tgz",
|
||||
"integrity": "sha512-ldCH7P0G8saC1nE8D04hRZ3tUVjQ2YHkIBKowAfyTzZEppZtxpR6Zl+GqBE9lhT1Jv+no0xIKWm3QttQ5qODLg==",
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@antimatter-dimensions/notations/-/notations-3.1.0.tgz",
|
||||
"integrity": "sha512-FV0Nv0hsp0JoPNzqshtAVwN0l9l81OFsiygvS6yznM7i+YPdI3jOAsE1kWhK/mCEMTQfHgA+atsFoUV4sEdItQ==",
|
||||
"dependencies": {
|
||||
"break_infinity.js": "^1.2.0",
|
||||
"break_infinity.js": "^2.0.0",
|
||||
"tslib": "^2.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"break_infinity.js": "^1.2.0"
|
||||
"break_infinity.js": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/code-frame": {
|
||||
@ -6553,9 +6553,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/break_infinity.js": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/break_infinity.js/-/break_infinity.js-1.3.0.tgz",
|
||||
"integrity": "sha512-fuBYhRnzOL9U0naaC6ThKbicbqImKVVZmnqCHfNCopWqU2X6vcSf/T1gUn8yD1feGaxl4bgWWImMFYSX62iDsw==",
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/break_infinity.js/-/break_infinity.js-2.0.0.tgz",
|
||||
"integrity": "sha512-/7fy8+rA12V57DMPSWA90mBs4xPxHKpj79w/oBXTqyQS07oIHsWaB62pO43C/GRUkteVokhJ+G+UD8+OhHaz5g==",
|
||||
"dependencies": {
|
||||
"pad-end": "^1.0.2"
|
||||
}
|
||||
@ -12383,7 +12383,7 @@
|
||||
"node_modules/pad-end": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/pad-end/-/pad-end-1.0.2.tgz",
|
||||
"integrity": "sha1-a0GkL9t+/6VYWLt32t5S7uOI5sw="
|
||||
"integrity": "sha512-pHkQejQ2oo08iXEDDFYxUK1xPe8L5fpbLSpkKk+ytimW70S8golMYFP9nAPTLXW6DTt+bF5QLcbswx5imMszHg=="
|
||||
},
|
||||
"node_modules/pako": {
|
||||
"version": "2.0.4",
|
||||
@ -16497,11 +16497,11 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@antimatter-dimensions/notations": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@antimatter-dimensions/notations/-/notations-3.0.3.tgz",
|
||||
"integrity": "sha512-ldCH7P0G8saC1nE8D04hRZ3tUVjQ2YHkIBKowAfyTzZEppZtxpR6Zl+GqBE9lhT1Jv+no0xIKWm3QttQ5qODLg==",
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@antimatter-dimensions/notations/-/notations-3.1.0.tgz",
|
||||
"integrity": "sha512-FV0Nv0hsp0JoPNzqshtAVwN0l9l81OFsiygvS6yznM7i+YPdI3jOAsE1kWhK/mCEMTQfHgA+atsFoUV4sEdItQ==",
|
||||
"requires": {
|
||||
"break_infinity.js": "^1.2.0",
|
||||
"break_infinity.js": "^2.0.0",
|
||||
"tslib": "^2.0.0"
|
||||
}
|
||||
},
|
||||
@ -21458,9 +21458,9 @@
|
||||
}
|
||||
},
|
||||
"break_infinity.js": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/break_infinity.js/-/break_infinity.js-1.3.0.tgz",
|
||||
"integrity": "sha512-fuBYhRnzOL9U0naaC6ThKbicbqImKVVZmnqCHfNCopWqU2X6vcSf/T1gUn8yD1feGaxl4bgWWImMFYSX62iDsw==",
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/break_infinity.js/-/break_infinity.js-2.0.0.tgz",
|
||||
"integrity": "sha512-/7fy8+rA12V57DMPSWA90mBs4xPxHKpj79w/oBXTqyQS07oIHsWaB62pO43C/GRUkteVokhJ+G+UD8+OhHaz5g==",
|
||||
"requires": {
|
||||
"pad-end": "^1.0.2"
|
||||
}
|
||||
@ -25864,7 +25864,7 @@
|
||||
"pad-end": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/pad-end/-/pad-end-1.0.2.tgz",
|
||||
"integrity": "sha1-a0GkL9t+/6VYWLt32t5S7uOI5sw="
|
||||
"integrity": "sha512-pHkQejQ2oo08iXEDDFYxUK1xPe8L5fpbLSpkKk+ytimW70S8golMYFP9nAPTLXW6DTt+bF5QLcbswx5imMszHg=="
|
||||
},
|
||||
"pako": {
|
||||
"version": "2.0.4",
|
||||
|
@ -3,12 +3,14 @@
|
||||
"scripts": {
|
||||
"serve": "node build/check-npm.js && vue-cli-service serve",
|
||||
"build": "node build/pre-build.js && vue-cli-service build --dest ../AppFiles && node build/post-build.js",
|
||||
"build:master": "node build/pre-build.js && vue-cli-service build --mode master && node build/post-build.js",
|
||||
"build:release": "node build/pre-build.js && vue-cli-service build && node build/post-build.js",
|
||||
"lint": "vue-cli-service lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"@antimatter-dimensions/notations": "^3.0.3",
|
||||
"@antimatter-dimensions/notations": "^3.1.0",
|
||||
"@fortawesome/fontawesome-free": "^6.1.1",
|
||||
"break_infinity.js": "^1.3.0",
|
||||
"break_infinity.js": "^2.0.0",
|
||||
"chevrotain": "^4.8.1",
|
||||
"codemirror": "^5.65.1",
|
||||
"core-js": "^3.6.5",
|
||||
|
@ -1,3 +0,0 @@
|
||||
{
|
||||
"phabricator.uri" : "https://phabricator.playfab.com/"
|
||||
}
|
8
public/PlayFab/.gitignore
vendored
8
public/PlayFab/.gitignore
vendored
@ -1,8 +0,0 @@
|
||||
bin/
|
||||
obj/
|
||||
.vs/
|
||||
|
||||
*.map
|
||||
*.user
|
||||
|
||||
testTitleData.json
|
@ -1,145 +0,0 @@
|
||||
|
||||
JavaScript Getting Started Guide
|
||||
----
|
||||
|
||||
This guide will help you make your first API call in JavaScript.
|
||||
|
||||
JavaScript Project Setup
|
||||
----
|
||||
|
||||
* OS: This guide should work in any OS capable of running a web-browser
|
||||
* Installation
|
||||
* You are probably already reading this page on your favorite browser
|
||||
* New Project Setup
|
||||
* Create a new folder, with two empty text files:
|
||||
* PlayFabGettingStarted.html
|
||||
* PlayFabGettingStarted.js
|
||||
* PlayFab installation complete
|
||||
|
||||
Set up your first API call
|
||||
----
|
||||
|
||||
This guide will provide the minimum steps to make your first PlayFab API call. Confirmation will be visible on the webpage.
|
||||
|
||||
In your favorite text-editor, update the contents of PlayFabGettingStarted.html as follows:
|
||||
```HTML
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>PlayFab JavaScript Unit Tests</title>
|
||||
<script type="text/javascript" src="https://download.playfab.com/PlayFabClientApi.js"></script>
|
||||
<script type="text/javascript" src="PlayFabGettingStarted.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
PlayFab Getting Started Guide<br />
|
||||
TitleID: <input type="text" id="titleId" value="144"><br />
|
||||
CustomID: <input type="text" id="customId" value="GettingStartedGuide"><br />
|
||||
<input type="button" value="Call LoginWithCustomID" onclick="DoExampleLoginWithCustomID()"><br />
|
||||
Result:<br />
|
||||
<textarea id="resultOutput" cols="60" rows="5"></textarea><br />
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
In your favorite text-editor, update the contents of PlayFabGettingStarted.js as follows:
|
||||
```JavaScript
|
||||
function DoExampleLoginWithCustomID(){
|
||||
PlayFab.settings.titleId = document.getElementById("titleId").value;
|
||||
var loginRequest = {
|
||||
// Currently, you need to look up the correct format for this object in the API-docs:
|
||||
// https://api.playfab.com/Documentation/Client/method/LoginWithCustomID
|
||||
TitleId: PlayFab.settings.titleId,
|
||||
CustomId: document.getElementById("customId").value,
|
||||
CreateAccount: true
|
||||
};
|
||||
|
||||
PlayFabClientSDK.LoginWithCustomID(loginRequest, LoginCallback);
|
||||
}
|
||||
|
||||
var LoginCallback = function (result, error) {
|
||||
if (result !== null) {
|
||||
document.getElementById("resultOutput").innerHTML = "Congratulations, you made your first successful API call!";
|
||||
} else if (error !== null) {
|
||||
document.getElementById("resultOutput").innerHTML =
|
||||
"Something went wrong with your first API call.\n" +
|
||||
"Here's some debug information:\n" +
|
||||
CompileErrorReport(error);
|
||||
}
|
||||
}
|
||||
|
||||
// This is a utility function we haven't put into the core SDK yet. Feel free to use it.
|
||||
function CompileErrorReport(error) {
|
||||
if (error === null)
|
||||
return "";
|
||||
var fullErrors = error.errorMessage;
|
||||
for (var paramName in error.errorDetails)
|
||||
for (var msgIdx in error.errorDetails[paramName])
|
||||
fullErrors += "\n" + paramName + ": " + error.errorDetails[paramName][msgIdx];
|
||||
return fullErrors;
|
||||
}
|
||||
```
|
||||
|
||||
Finish and Execute
|
||||
----
|
||||
|
||||
* Open PlayFabGettingStarted.html in your favorite browser
|
||||
* Click the "Call LoginWithCustomID" button
|
||||
* You should see the following text in the Result section:
|
||||
```text
|
||||
Congratulations, you made your first successful API call!
|
||||
```
|
||||
|
||||
* At this point, you can start making other api calls, and building your game
|
||||
* For a list of all available client API calls, see our documentation:
|
||||
* https://api.playfab.com/
|
||||
* Happy coding!
|
||||
|
||||
Deconstruct the code
|
||||
----
|
||||
|
||||
This optional last section describes each part of this example in detail.
|
||||
|
||||
The HTML file has a few important lines:
|
||||
```HTML
|
||||
<script type="text/javascript" src="https://download.playfab.com/PlayFabClientApi.js"></script>
|
||||
```
|
||||
|
||||
This line loads the Client-SDK directly from the PlayFab CDN. Our CDN always hosts the latest version of PlayFabSDK. It may be safer for you to download the files, and use a fixed version: [PlayFab JavaScriptSDK](https://api.playfab.com/sdks/download/javascript)
|
||||
|
||||
The other important HTML lines:
|
||||
```HTML
|
||||
<script type="text/javascript" src="PlayFabGettingStarted.js"></script>
|
||||
...
|
||||
<input type="button" value="Call LoginWithCustomID" onclick="DoExampleLoginWithCustomID()"><br />
|
||||
```
|
||||
|
||||
As you can see above, PlayFabGettingStarted.js contains the DoExampleLoginWithCustomID function. These lines bind our js file to our webpage, and invoke the DoExampleLoginWithCustomID function in that script. Everything else is just GUI.
|
||||
|
||||
* Line by line breakdown for PlayFabGettingStarted.js
|
||||
* PlayFab.settings.titleId = document.getElementById("titleId").value;
|
||||
* This reads the titleId from the html-input, and sets it to the PlayFab sdk.
|
||||
* Every PlayFab developer creates a title in Game Manager. When you publish your game, you must code that titleId into your game. This lets the client know how to access the correct data within PlayFab. For most users, just consider it a mandatory step that makes PlayFab work.
|
||||
* var loginRequest = { TitleId: PlayFab.settings.titleId, CustomId: "GettingStartedGuide", CreateAccount: true };
|
||||
* Most PlayFab API methods require input parameters, and those input parameters are packed into a request object
|
||||
* Every API method requires a unique request object, with a mix of optional and mandatory parameters
|
||||
* For LoginWithCustomIDRequest, there is a mandatory parameter of CustomId, which uniquely identifies a player and CreateAccount, which allows the creation of a new account with this call. TitleId is another mandatory parameter in JavaScript, and it must match PlayFab.settings.titleId
|
||||
* PlayFabClientSDK.LoginWithCustomID(loginRequest, LoginCallback);
|
||||
* This begins the async request to "LoginWithCustomID", which will call LoginCallback when the API call is complete
|
||||
* For login, most developers will want to use a more appropriate login method
|
||||
* See the [PlayFab Login Documentation](https://api.playfab.com/Documentation/Client#Authentication) for a list of all login methods, and input parameters. Common choices are:
|
||||
* [LoginWithAndroidDeviceID](https://api.playfab.com/Documentation/Client/method/LoginWithAndroidDeviceID)
|
||||
* [LoginWithIOSDeviceID](https://api.playfab.com/Documentation/Client/method/LoginWithIOSDeviceID)
|
||||
* [LoginWithEmailAddress](https://api.playfab.com/Documentation/Client/method/LoginWithEmailAddress)
|
||||
* LoginCallback contains two parameters: result, error
|
||||
* When successful, error will be null, and the result object will contain the requested information, according to the API called
|
||||
* This result contains some basic information about the player, but for most users, login is simply a mandatory step before calling other APIs.
|
||||
* If error is not null, your API has failed
|
||||
* API calls can fail for many reasons, and you should always attempt to handle failure
|
||||
* Why API calls fail (In order of likelihood)
|
||||
* PlayFabSettings.TitleId is not set. If you forget to set titleId to your title, then nothing will work.
|
||||
* Request parameters. If you have not provided the correct or required information for a particular API call, then it will fail. See error.errorMessage, error.errorDetails, or error.GenerateErrorReport() for more info.
|
||||
* Device connectivity issue. Cell-phones lose/regain connectivity constantly, and so any API call at any time can fail randomly, and then work immediately after. Going into a tunnel can disconnect you completely.
|
||||
* PlayFab server issue. As with all software, there can be issues. See our [release notes](https://api.playfab.com/releaseNotes/) for updates.
|
||||
* The internet is not 100% reliable. Sometimes the message is corrupted or fails to reach the PlayFab server.
|
||||
* If you are having difficulty debugging an issue, and the information within the error information is not sufficient, please visit us on our [forums](https://community.playfab.com/index.html)
|
@ -1,201 +0,0 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright 2015 PlayFab Inc.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
@ -1,711 +0,0 @@
|
||||
/// <reference path="../typings/PlayFab/PlayFabAdminApi.d.ts" />
|
||||
|
||||
var PlayFab = typeof PlayFab != "undefined" ? PlayFab : {};
|
||||
|
||||
if(!PlayFab.settings) {
|
||||
PlayFab.settings = {
|
||||
titleId: null, // You must set this value for PlayFabSdk to work properly (Found in the Game Manager for your title, at the PlayFab Website)
|
||||
developerSecretKey: null, // For security reasons you must never expose this value to the client or players - You must set this value for Server-APIs to work properly (Found in the Game Manager for your title, at the PlayFab Website)
|
||||
advertisingIdType: null,
|
||||
advertisingIdValue: null,
|
||||
|
||||
// disableAdvertising is provided for completeness, but changing it is not suggested
|
||||
// Disabling this may prevent your advertising-related PlayFab marketplace partners from working correctly
|
||||
disableAdvertising: false,
|
||||
AD_TYPE_IDFA: "Idfa",
|
||||
AD_TYPE_ANDROID_ID: "Adid"
|
||||
}
|
||||
}
|
||||
|
||||
if(!PlayFab._internalSettings) {
|
||||
PlayFab._internalSettings = {
|
||||
sessionTicket: null,
|
||||
productionServerUrl: ".playfabapi.com",
|
||||
errorTitleId: "Must be have PlayFab.settings.titleId set to call this method",
|
||||
errorLoggedIn: "Must be logged in to call this method",
|
||||
errorSecretKey: "Must have PlayFab.settings.developerSecretKey set to call this method",
|
||||
|
||||
GetServerUrl: function () {
|
||||
return "https://" + PlayFab.settings.titleId + PlayFab._internalSettings.productionServerUrl;
|
||||
},
|
||||
|
||||
ExecuteRequest: function (completeUrl, data, authkey, authValue, callback) {
|
||||
if (callback != null && typeof (callback) != "function")
|
||||
throw "Callback must be null of a function";
|
||||
|
||||
if (data == null)
|
||||
data = {};
|
||||
|
||||
var startTime = new Date();
|
||||
var requestBody = JSON.stringify(data);
|
||||
|
||||
var xhr = new XMLHttpRequest();
|
||||
// window.console.log("URL: " + completeUrl);
|
||||
xhr.open("POST", completeUrl, true);
|
||||
|
||||
xhr.setRequestHeader('Content-Type', 'application/json');
|
||||
|
||||
if (authkey != null)
|
||||
xhr.setRequestHeader(authkey, authValue);
|
||||
|
||||
xhr.setRequestHeader('X-PlayFabSDK', "JavaScriptSDK-" + PlayFab._internalSettings.sdkVersion);
|
||||
|
||||
xhr.onloadend = function () {
|
||||
if (callback == null)
|
||||
return;
|
||||
|
||||
var result;
|
||||
try {
|
||||
// window.console.log("parsing json result: " + xhr.responseText);
|
||||
result = JSON.parse(xhr.responseText);
|
||||
} catch (e) {
|
||||
result = {
|
||||
code: 503, // Service Unavailable
|
||||
status: "Service Unavailable",
|
||||
error: "Connection error",
|
||||
errorCode: 2, // PlayFabErrorCode.ConnectionError
|
||||
errorMessage: xhr.responseText
|
||||
};
|
||||
}
|
||||
|
||||
result.CallBackTimeMS = new Date() - startTime;
|
||||
|
||||
if (result.code === 200)
|
||||
callback(result, null);
|
||||
else
|
||||
callback(null, result);
|
||||
}
|
||||
|
||||
xhr.onerror = function () {
|
||||
if (callback == null)
|
||||
return;
|
||||
|
||||
var result;
|
||||
try {
|
||||
result = JSON.parse(xhr.responseText);
|
||||
} catch (e) {
|
||||
result = {
|
||||
code: 503, // Service Unavailable
|
||||
status: "Service Unavailable",
|
||||
error: "Connection error",
|
||||
errorCode: 2, // PlayFabErrorCode.ConnectionError
|
||||
errorMessage: xhr.responseText
|
||||
};
|
||||
}
|
||||
|
||||
result.CallBackTimeMS = new Date() - startTime;
|
||||
callback(null, result);
|
||||
}
|
||||
|
||||
xhr.send(requestBody);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PlayFab.buildIdentifier = "jbuild_javascriptsdk_1";
|
||||
PlayFab.sdkVersion = "1.11.170828";
|
||||
|
||||
PlayFab.AdminApi = {
|
||||
|
||||
CreatePlayerSharedSecret: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/CreatePlayerSharedSecret", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
DeletePlayerSharedSecret: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/DeletePlayerSharedSecret", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetPlayerSharedSecrets: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/GetPlayerSharedSecrets", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetPolicy: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/GetPolicy", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
SetPlayerSecret: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/SetPlayerSecret", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
UpdatePlayerSharedSecret: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/UpdatePlayerSharedSecret", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
UpdatePolicy: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/UpdatePolicy", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
BanUsers: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/BanUsers", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
DeletePlayer: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/DeletePlayer", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetUserAccountInfo: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/GetUserAccountInfo", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetUserBans: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/GetUserBans", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
/**
|
||||
* @deprecated Please use DeletePlayer instead.
|
||||
*/
|
||||
ResetUsers: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/ResetUsers", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
RevokeAllBansForUser: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/RevokeAllBansForUser", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
RevokeBans: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/RevokeBans", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
SendAccountRecoveryEmail: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/SendAccountRecoveryEmail", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
UpdateBans: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/UpdateBans", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
UpdateUserTitleDisplayName: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/UpdateUserTitleDisplayName", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
CreatePlayerStatisticDefinition: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/CreatePlayerStatisticDefinition", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
/**
|
||||
* @deprecated Please use DeleteUser instead.
|
||||
*/
|
||||
DeleteUsers: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/DeleteUsers", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetDataReport: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/GetDataReport", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetPlayerStatisticDefinitions: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/GetPlayerStatisticDefinitions", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetPlayerStatisticVersions: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/GetPlayerStatisticVersions", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetUserData: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/GetUserData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetUserInternalData: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/GetUserInternalData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetUserPublisherData: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/GetUserPublisherData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetUserPublisherInternalData: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/GetUserPublisherInternalData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetUserPublisherReadOnlyData: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/GetUserPublisherReadOnlyData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetUserReadOnlyData: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/GetUserReadOnlyData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
IncrementPlayerStatisticVersion: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/IncrementPlayerStatisticVersion", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
RefundPurchase: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/RefundPurchase", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
ResetUserStatistics: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/ResetUserStatistics", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
ResolvePurchaseDispute: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/ResolvePurchaseDispute", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
UpdatePlayerStatisticDefinition: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/UpdatePlayerStatisticDefinition", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
UpdateUserData: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/UpdateUserData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
UpdateUserInternalData: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/UpdateUserInternalData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
UpdateUserPublisherData: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/UpdateUserPublisherData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
UpdateUserPublisherInternalData: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/UpdateUserPublisherInternalData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
UpdateUserPublisherReadOnlyData: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/UpdateUserPublisherReadOnlyData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
UpdateUserReadOnlyData: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/UpdateUserReadOnlyData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
AddNews: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/AddNews", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
AddVirtualCurrencyTypes: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/AddVirtualCurrencyTypes", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
DeleteStore: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/DeleteStore", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetCatalogItems: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/GetCatalogItems", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetPublisherData: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/GetPublisherData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetRandomResultTables: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/GetRandomResultTables", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetStoreItems: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/GetStoreItems", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetTitleData: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/GetTitleData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetTitleInternalData: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/GetTitleInternalData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
ListVirtualCurrencyTypes: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/ListVirtualCurrencyTypes", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
RemoveVirtualCurrencyTypes: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/RemoveVirtualCurrencyTypes", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
SetCatalogItems: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/SetCatalogItems", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
SetStoreItems: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/SetStoreItems", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
SetTitleData: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/SetTitleData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
SetTitleInternalData: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/SetTitleInternalData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
SetupPushNotification: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/SetupPushNotification", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
UpdateCatalogItems: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/UpdateCatalogItems", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
UpdateRandomResultTables: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/UpdateRandomResultTables", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
UpdateStoreItems: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/UpdateStoreItems", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
AddUserVirtualCurrency: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/AddUserVirtualCurrency", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetUserInventory: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/GetUserInventory", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GrantItemsToUsers: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/GrantItemsToUsers", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
RevokeInventoryItem: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/RevokeInventoryItem", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
SubtractUserVirtualCurrency: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/SubtractUserVirtualCurrency", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetMatchmakerGameInfo: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/GetMatchmakerGameInfo", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetMatchmakerGameModes: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/GetMatchmakerGameModes", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
ModifyMatchmakerGameModes: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/ModifyMatchmakerGameModes", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
AddServerBuild: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/AddServerBuild", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetServerBuildInfo: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/GetServerBuildInfo", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetServerBuildUploadUrl: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/GetServerBuildUploadUrl", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
ListServerBuilds: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/ListServerBuilds", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
ModifyServerBuild: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/ModifyServerBuild", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
RemoveServerBuild: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/RemoveServerBuild", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
SetPublisherData: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/SetPublisherData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetCloudScriptRevision: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/GetCloudScriptRevision", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetCloudScriptVersions: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/GetCloudScriptVersions", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
SetPublishedRevision: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/SetPublishedRevision", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
UpdateCloudScript: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/UpdateCloudScript", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
DeleteContent: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/DeleteContent", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetContentList: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/GetContentList", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetContentUploadUrl: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/GetContentUploadUrl", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
ResetCharacterStatistics: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/ResetCharacterStatistics", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
AddPlayerTag: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/AddPlayerTag", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
/**
|
||||
* @deprecated Please use GetTasks instead.
|
||||
*/
|
||||
GetAllActionGroups: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/GetAllActionGroups", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetAllSegments: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/GetAllSegments", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetPlayerSegments: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/GetPlayerSegments", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetPlayersInSegment: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/GetPlayersInSegment", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetPlayerTags: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/GetPlayerTags", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
RemovePlayerTag: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/RemovePlayerTag", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
AbortTaskInstance: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/AbortTaskInstance", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
CreateActionsOnPlayersInSegmentTask: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/CreateActionsOnPlayersInSegmentTask", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
CreateCloudScriptTask: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/CreateCloudScriptTask", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
DeleteTask: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/DeleteTask", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
/**
|
||||
* @deprecated Please use GetTasks instead.
|
||||
*/
|
||||
GetActionsOnPlayersInSegmentTaskInstance: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/GetActionsOnPlayersInSegmentTaskInstance", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetCloudScriptTaskInstance: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/GetCloudScriptTaskInstance", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetTaskInstances: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/GetTaskInstances", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetTasks: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/GetTasks", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
RunTask: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/RunTask", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
UpdateTask: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Admin/UpdateTask", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
};
|
||||
|
||||
var PlayFabAdminSDK = PlayFab.AdminApi;
|
File diff suppressed because it is too large
Load Diff
@ -1,141 +0,0 @@
|
||||
/// <reference path="../typings/PlayFab/PlayFabMatchmakerApi.d.ts" />
|
||||
|
||||
var PlayFab = typeof PlayFab != "undefined" ? PlayFab : {};
|
||||
|
||||
if(!PlayFab.settings) {
|
||||
PlayFab.settings = {
|
||||
titleId: null, // You must set this value for PlayFabSdk to work properly (Found in the Game Manager for your title, at the PlayFab Website)
|
||||
developerSecretKey: null, // For security reasons you must never expose this value to the client or players - You must set this value for Server-APIs to work properly (Found in the Game Manager for your title, at the PlayFab Website)
|
||||
advertisingIdType: null,
|
||||
advertisingIdValue: null,
|
||||
|
||||
// disableAdvertising is provided for completeness, but changing it is not suggested
|
||||
// Disabling this may prevent your advertising-related PlayFab marketplace partners from working correctly
|
||||
disableAdvertising: false,
|
||||
AD_TYPE_IDFA: "Idfa",
|
||||
AD_TYPE_ANDROID_ID: "Adid"
|
||||
}
|
||||
}
|
||||
|
||||
if(!PlayFab._internalSettings) {
|
||||
PlayFab._internalSettings = {
|
||||
sessionTicket: null,
|
||||
productionServerUrl: ".playfabapi.com",
|
||||
errorTitleId: "Must be have PlayFab.settings.titleId set to call this method",
|
||||
errorLoggedIn: "Must be logged in to call this method",
|
||||
errorSecretKey: "Must have PlayFab.settings.developerSecretKey set to call this method",
|
||||
|
||||
GetServerUrl: function () {
|
||||
return "https://" + PlayFab.settings.titleId + PlayFab._internalSettings.productionServerUrl;
|
||||
},
|
||||
|
||||
ExecuteRequest: function (completeUrl, data, authkey, authValue, callback) {
|
||||
if (callback != null && typeof (callback) != "function")
|
||||
throw "Callback must be null of a function";
|
||||
|
||||
if (data == null)
|
||||
data = {};
|
||||
|
||||
var startTime = new Date();
|
||||
var requestBody = JSON.stringify(data);
|
||||
|
||||
var xhr = new XMLHttpRequest();
|
||||
// window.console.log("URL: " + completeUrl);
|
||||
xhr.open("POST", completeUrl, true);
|
||||
|
||||
xhr.setRequestHeader('Content-Type', 'application/json');
|
||||
|
||||
if (authkey != null)
|
||||
xhr.setRequestHeader(authkey, authValue);
|
||||
|
||||
xhr.setRequestHeader('X-PlayFabSDK', "JavaScriptSDK-" + PlayFab._internalSettings.sdkVersion);
|
||||
|
||||
xhr.onloadend = function () {
|
||||
if (callback == null)
|
||||
return;
|
||||
|
||||
var result;
|
||||
try {
|
||||
// window.console.log("parsing json result: " + xhr.responseText);
|
||||
result = JSON.parse(xhr.responseText);
|
||||
} catch (e) {
|
||||
result = {
|
||||
code: 503, // Service Unavailable
|
||||
status: "Service Unavailable",
|
||||
error: "Connection error",
|
||||
errorCode: 2, // PlayFabErrorCode.ConnectionError
|
||||
errorMessage: xhr.responseText
|
||||
};
|
||||
}
|
||||
|
||||
result.CallBackTimeMS = new Date() - startTime;
|
||||
|
||||
if (result.code === 200)
|
||||
callback(result, null);
|
||||
else
|
||||
callback(null, result);
|
||||
}
|
||||
|
||||
xhr.onerror = function () {
|
||||
if (callback == null)
|
||||
return;
|
||||
|
||||
var result;
|
||||
try {
|
||||
result = JSON.parse(xhr.responseText);
|
||||
} catch (e) {
|
||||
result = {
|
||||
code: 503, // Service Unavailable
|
||||
status: "Service Unavailable",
|
||||
error: "Connection error",
|
||||
errorCode: 2, // PlayFabErrorCode.ConnectionError
|
||||
errorMessage: xhr.responseText
|
||||
};
|
||||
}
|
||||
|
||||
result.CallBackTimeMS = new Date() - startTime;
|
||||
callback(null, result);
|
||||
}
|
||||
|
||||
xhr.send(requestBody);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PlayFab.buildIdentifier = "jbuild_javascriptsdk_1";
|
||||
PlayFab.sdkVersion = "1.11.170828";
|
||||
|
||||
PlayFab.MatchmakerApi = {
|
||||
|
||||
AuthUser: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Matchmaker/AuthUser", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
PlayerJoined: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Matchmaker/PlayerJoined", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
PlayerLeft: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Matchmaker/PlayerLeft", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
StartGame: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Matchmaker/StartGame", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
UserInfo: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Matchmaker/UserInfo", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
};
|
||||
|
||||
var PlayFabMatchmakerSDK = PlayFab.MatchmakerApi;
|
@ -1,768 +0,0 @@
|
||||
/// <reference path="../typings/PlayFab/PlayFabServerApi.d.ts" />
|
||||
|
||||
var PlayFab = typeof PlayFab != "undefined" ? PlayFab : {};
|
||||
|
||||
if(!PlayFab.settings) {
|
||||
PlayFab.settings = {
|
||||
titleId: null, // You must set this value for PlayFabSdk to work properly (Found in the Game Manager for your title, at the PlayFab Website)
|
||||
developerSecretKey: null, // For security reasons you must never expose this value to the client or players - You must set this value for Server-APIs to work properly (Found in the Game Manager for your title, at the PlayFab Website)
|
||||
advertisingIdType: null,
|
||||
advertisingIdValue: null,
|
||||
|
||||
// disableAdvertising is provided for completeness, but changing it is not suggested
|
||||
// Disabling this may prevent your advertising-related PlayFab marketplace partners from working correctly
|
||||
disableAdvertising: false,
|
||||
AD_TYPE_IDFA: "Idfa",
|
||||
AD_TYPE_ANDROID_ID: "Adid"
|
||||
}
|
||||
}
|
||||
|
||||
if(!PlayFab._internalSettings) {
|
||||
PlayFab._internalSettings = {
|
||||
sessionTicket: null,
|
||||
productionServerUrl: ".playfabapi.com",
|
||||
errorTitleId: "Must be have PlayFab.settings.titleId set to call this method",
|
||||
errorLoggedIn: "Must be logged in to call this method",
|
||||
errorSecretKey: "Must have PlayFab.settings.developerSecretKey set to call this method",
|
||||
|
||||
GetServerUrl: function () {
|
||||
return "https://" + PlayFab.settings.titleId + PlayFab._internalSettings.productionServerUrl;
|
||||
},
|
||||
|
||||
ExecuteRequest: function (completeUrl, data, authkey, authValue, callback) {
|
||||
if (callback != null && typeof (callback) != "function")
|
||||
throw "Callback must be null of a function";
|
||||
|
||||
if (data == null)
|
||||
data = {};
|
||||
|
||||
var startTime = new Date();
|
||||
var requestBody = JSON.stringify(data);
|
||||
|
||||
var xhr = new XMLHttpRequest();
|
||||
// window.console.log("URL: " + completeUrl);
|
||||
xhr.open("POST", completeUrl, true);
|
||||
|
||||
xhr.setRequestHeader('Content-Type', 'application/json');
|
||||
|
||||
if (authkey != null)
|
||||
xhr.setRequestHeader(authkey, authValue);
|
||||
|
||||
xhr.setRequestHeader('X-PlayFabSDK', "JavaScriptSDK-" + PlayFab._internalSettings.sdkVersion);
|
||||
|
||||
xhr.onloadend = function () {
|
||||
if (callback == null)
|
||||
return;
|
||||
|
||||
var result;
|
||||
try {
|
||||
// window.console.log("parsing json result: " + xhr.responseText);
|
||||
result = JSON.parse(xhr.responseText);
|
||||
} catch (e) {
|
||||
result = {
|
||||
code: 503, // Service Unavailable
|
||||
status: "Service Unavailable",
|
||||
error: "Connection error",
|
||||
errorCode: 2, // PlayFabErrorCode.ConnectionError
|
||||
errorMessage: xhr.responseText
|
||||
};
|
||||
}
|
||||
|
||||
result.CallBackTimeMS = new Date() - startTime;
|
||||
|
||||
if (result.code === 200)
|
||||
callback(result, null);
|
||||
else
|
||||
callback(null, result);
|
||||
}
|
||||
|
||||
xhr.onerror = function () {
|
||||
if (callback == null)
|
||||
return;
|
||||
|
||||
var result;
|
||||
try {
|
||||
result = JSON.parse(xhr.responseText);
|
||||
} catch (e) {
|
||||
result = {
|
||||
code: 503, // Service Unavailable
|
||||
status: "Service Unavailable",
|
||||
error: "Connection error",
|
||||
errorCode: 2, // PlayFabErrorCode.ConnectionError
|
||||
errorMessage: xhr.responseText
|
||||
};
|
||||
}
|
||||
|
||||
result.CallBackTimeMS = new Date() - startTime;
|
||||
callback(null, result);
|
||||
}
|
||||
|
||||
xhr.send(requestBody);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PlayFab.buildIdentifier = "jbuild_javascriptsdk_1";
|
||||
PlayFab.sdkVersion = "1.11.170828";
|
||||
|
||||
PlayFab.ServerApi = {
|
||||
|
||||
AuthenticateSessionTicket: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/AuthenticateSessionTicket", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
SetPlayerSecret: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/SetPlayerSecret", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
BanUsers: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/BanUsers", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetPlayerProfile: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/GetPlayerProfile", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetPlayFabIDsFromFacebookIDs: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/GetPlayFabIDsFromFacebookIDs", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetPlayFabIDsFromSteamIDs: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/GetPlayFabIDsFromSteamIDs", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetUserAccountInfo: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/GetUserAccountInfo", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetUserBans: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/GetUserBans", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
RevokeAllBansForUser: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/RevokeAllBansForUser", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
RevokeBans: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/RevokeBans", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
SendPushNotification: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/SendPushNotification", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
UpdateAvatarUrl: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/UpdateAvatarUrl", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
UpdateBans: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/UpdateBans", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
DeleteUsers: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/DeleteUsers", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetFriendLeaderboard: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/GetFriendLeaderboard", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetLeaderboard: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/GetLeaderboard", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetLeaderboardAroundUser: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/GetLeaderboardAroundUser", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetPlayerCombinedInfo: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/GetPlayerCombinedInfo", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetPlayerStatistics: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/GetPlayerStatistics", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetPlayerStatisticVersions: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/GetPlayerStatisticVersions", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetUserData: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/GetUserData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetUserInternalData: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/GetUserInternalData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetUserPublisherData: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/GetUserPublisherData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetUserPublisherInternalData: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/GetUserPublisherInternalData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetUserPublisherReadOnlyData: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/GetUserPublisherReadOnlyData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetUserReadOnlyData: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/GetUserReadOnlyData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
UpdatePlayerStatistics: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/UpdatePlayerStatistics", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
UpdateUserData: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/UpdateUserData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
UpdateUserInternalData: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/UpdateUserInternalData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
UpdateUserPublisherData: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/UpdateUserPublisherData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
UpdateUserPublisherInternalData: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/UpdateUserPublisherInternalData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
UpdateUserPublisherReadOnlyData: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/UpdateUserPublisherReadOnlyData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
UpdateUserReadOnlyData: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/UpdateUserReadOnlyData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetCatalogItems: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/GetCatalogItems", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetPublisherData: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/GetPublisherData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetTime: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/GetTime", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetTitleData: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/GetTitleData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetTitleInternalData: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/GetTitleInternalData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetTitleNews: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/GetTitleNews", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
SetPublisherData: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/SetPublisherData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
SetTitleData: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/SetTitleData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
SetTitleInternalData: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/SetTitleInternalData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
AddCharacterVirtualCurrency: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/AddCharacterVirtualCurrency", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
AddUserVirtualCurrency: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/AddUserVirtualCurrency", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
ConsumeItem: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/ConsumeItem", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
EvaluateRandomResultTable: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/EvaluateRandomResultTable", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetCharacterInventory: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/GetCharacterInventory", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetRandomResultTables: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/GetRandomResultTables", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetUserInventory: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/GetUserInventory", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GrantItemsToCharacter: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/GrantItemsToCharacter", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GrantItemsToUser: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/GrantItemsToUser", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GrantItemsToUsers: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/GrantItemsToUsers", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
ModifyItemUses: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/ModifyItemUses", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
MoveItemToCharacterFromCharacter: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/MoveItemToCharacterFromCharacter", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
MoveItemToCharacterFromUser: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/MoveItemToCharacterFromUser", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
MoveItemToUserFromCharacter: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/MoveItemToUserFromCharacter", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
RedeemCoupon: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/RedeemCoupon", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
ReportPlayer: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/ReportPlayer", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
RevokeInventoryItem: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/RevokeInventoryItem", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
SubtractCharacterVirtualCurrency: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/SubtractCharacterVirtualCurrency", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
SubtractUserVirtualCurrency: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/SubtractUserVirtualCurrency", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
UnlockContainerInstance: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/UnlockContainerInstance", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
UnlockContainerItem: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/UnlockContainerItem", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
UpdateUserInventoryItemCustomData: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/UpdateUserInventoryItemCustomData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
AddFriend: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/AddFriend", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetFriendsList: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/GetFriendsList", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
RemoveFriend: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/RemoveFriend", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
SetFriendTags: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/SetFriendTags", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
DeregisterGame: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/DeregisterGame", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
NotifyMatchmakerPlayerLeft: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/NotifyMatchmakerPlayerLeft", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
RedeemMatchmakerTicket: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/RedeemMatchmakerTicket", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
RefreshGameServerInstanceHeartbeat: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/RefreshGameServerInstanceHeartbeat", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
RegisterGame: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/RegisterGame", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
SetGameServerInstanceData: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/SetGameServerInstanceData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
SetGameServerInstanceState: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/SetGameServerInstanceState", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
SetGameServerInstanceTags: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/SetGameServerInstanceTags", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
WriteCharacterEvent: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/WriteCharacterEvent", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
WritePlayerEvent: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/WritePlayerEvent", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
WriteTitleEvent: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/WriteTitleEvent", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
AddSharedGroupMembers: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/AddSharedGroupMembers", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
CreateSharedGroup: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/CreateSharedGroup", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
DeleteSharedGroup: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/DeleteSharedGroup", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetSharedGroupData: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/GetSharedGroupData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
RemoveSharedGroupMembers: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/RemoveSharedGroupMembers", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
UpdateSharedGroupData: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/UpdateSharedGroupData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
ExecuteCloudScript: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/ExecuteCloudScript", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetContentDownloadUrl: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/GetContentDownloadUrl", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
DeleteCharacterFromUser: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/DeleteCharacterFromUser", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetAllUsersCharacters: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/GetAllUsersCharacters", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetCharacterLeaderboard: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/GetCharacterLeaderboard", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetCharacterStatistics: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/GetCharacterStatistics", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetLeaderboardAroundCharacter: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/GetLeaderboardAroundCharacter", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetLeaderboardForUserCharacters: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/GetLeaderboardForUserCharacters", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GrantCharacterToUser: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/GrantCharacterToUser", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
UpdateCharacterStatistics: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/UpdateCharacterStatistics", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetCharacterData: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/GetCharacterData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetCharacterInternalData: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/GetCharacterInternalData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetCharacterReadOnlyData: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/GetCharacterReadOnlyData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
UpdateCharacterData: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/UpdateCharacterData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
UpdateCharacterInternalData: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/UpdateCharacterInternalData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
UpdateCharacterReadOnlyData: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/UpdateCharacterReadOnlyData", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
AddPlayerTag: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/AddPlayerTag", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
/**
|
||||
* @deprecated Please use GetAllSegments instead.
|
||||
*/
|
||||
GetAllActionGroups: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/GetAllActionGroups", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetAllSegments: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/GetAllSegments", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetPlayerSegments: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/GetPlayerSegments", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetPlayersInSegment: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/GetPlayersInSegment", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
GetPlayerTags: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/GetPlayerTags", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
RemovePlayerTag: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/RemovePlayerTag", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
|
||||
AwardSteamAchievement: function (request, callback) {
|
||||
if (!PlayFab.settings.developerSecretKey) throw PlayFab._internalSettings.errorSecretKey;
|
||||
|
||||
PlayFab._internalSettings.ExecuteRequest(PlayFab._internalSettings.GetServerUrl() + "/Server/AwardSteamAchievement", request, "X-SecretKey", PlayFab.settings.developerSecretKey, callback);
|
||||
},
|
||||
};
|
||||
|
||||
var PlayFabServerSDK = PlayFab.ServerApi;
|
@ -1,57 +0,0 @@
|
||||
# JavaScriptSDK README
|
||||
|
||||
|
||||
## 1. Overview:
|
||||
|
||||
JavaScriptSDK for the Client API of PlayFab
|
||||
|
||||
This SDK can alternatively be used via our CDN. Additional details can be found [here](https://blog.playfab.com/blog/playfab-now-serving-javascript-sdk-via-cdn).
|
||||
|
||||
If you want to start coding right away, check out our [JavaScript Getting Started Guide](JavaScriptGettingStarted.md)
|
||||
|
||||
|
||||
## 2. Prerequisites:
|
||||
|
||||
* Users should be very familiar with the topics covered in our [getting started guide](https://api.playfab.com/docs/general-getting-started).
|
||||
|
||||
To connect to the PlayFab service, your machine must be running TLS v1.2 or better.
|
||||
* For Windows, this means Windows 7 and above
|
||||
* [Official Microsoft Documentation](https://msdn.microsoft.com/en-us/library/windows/desktop/aa380516%28v=vs.85%29.aspx)
|
||||
* [Support for SSL/TLS protocols on Windows](http://blogs.msdn.com/b/kaushal/archive/2011/10/02/support-for-ssl-tls-protocols-on-windows.aspx)
|
||||
|
||||
|
||||
## 3. Example Project (UNDER CONSTRUCTION)
|
||||
|
||||
The Example project is being revised for the upcoming 1.0 release
|
||||
|
||||
This sdk includes an optional example project that is used by PlayFab to verify sdk features are fully functional.
|
||||
|
||||
Please read about the testTitleData.json format, and purpose here:
|
||||
* [testTitleData.md](https://github.com/PlayFab/SDKGenerator/blob/master/JenkinsConsoleUtility/testTitleData.md) must be created and placed in the root of the example (beside index.html & PlayFabApiTest.ts), and must be named "testTitleData.json"
|
||||
|
||||
|
||||
## 4. Troubleshooting:
|
||||
|
||||
For a complete list of available APIs, check out the [online documentation](http://api.playfab.com/Documentation/).
|
||||
|
||||
#### Contact Us
|
||||
We love to hear from our developer community!
|
||||
Do you have ideas on how we can make our products and services better?
|
||||
|
||||
Our Developer Success Team can assist with answering any questions as well as process any feedback you have about PlayFab services.
|
||||
|
||||
[Forums, Support and Knowledge Base](https://community.playfab.com/index.html)
|
||||
|
||||
|
||||
## 5. Acknowledgements
|
||||
|
||||
[dylanh724](https://www.github.com/dylanh724) - The previous tutorial before the current [Getting Started Guide](JavaScriptGettingStarted.md)
|
||||
|
||||
|
||||
## 6. Copyright and Licensing Information:
|
||||
|
||||
Apache License --
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
Full details available within the LICENSE file.
|
@ -1,160 +0,0 @@
|
||||
|
||||
JavaScript with TypeScript Getting Started Guide
|
||||
----
|
||||
|
||||
This guide will help you make your first API call using a Web TypeScript environment.
|
||||
|
||||
TypeScript Project Setup
|
||||
----
|
||||
|
||||
* OS: This guide is written for Windows 10 and Visual Studio
|
||||
* The "Project Setup" section of this guide will not be very useful for other operating systems and environments (sorry!)
|
||||
* TypeScript works on a wide variety of Operating Systems, Environments, and tools
|
||||
* Installation
|
||||
* Download and install Visual Studio 2015
|
||||
* Update TypeScript within VS to the [latest version](https://www.microsoft.com/en-us/download/details.aspx?id=48593) (2.1.5 when this document was written)
|
||||
* [OPTIONAL] Install the [Node.js tools](https://www.visualstudio.com/vs/node-js/) into Visual Studio
|
||||
* Download and extract the [PlayFab JavaScriptSDK](https://github.com/PlayFab/JavaScriptSDK/archive/master.zip) to a local folder of your choosing {playFabSdkLocation}
|
||||
* New Project Setup
|
||||
* Open Visual Studio and create a new "Blank Node.js Web Application"
|
||||
* ![TS image](/public/images/TypeScript/NewProj.png)
|
||||
* This creates a project with several setup files
|
||||
* [OPTIONAL] delete app.cs (We won't be using it)
|
||||
* In Windows Explorer, navigate to {playFabSdkLocation}/PlayFabSdk and find the "src" folder
|
||||
* In another Windows Explorer window, navigate to your new Visual Studio project
|
||||
* Copy the "src" folder from {playFabSdkLocation}/PlayFabSdk, into your project folder
|
||||
* Close the explorer windows, and return to Visual Studio
|
||||
* Toggle the "Show All Files" button a few times, until you can see the PlayFab source files
|
||||
* RClick "src" and "Include in Project"
|
||||
* ![TS image](/public/images/TypeScript/IncludeSdk.png)
|
||||
* At this point, running the project will open a browser, and display the default Microsoft example
|
||||
* Project setup complete!
|
||||
|
||||
|
||||
Set up your first API call
|
||||
----
|
||||
|
||||
This guide will provide the minimum steps to make your first PlayFab API call. Confirmation will be visible on the webpage.
|
||||
|
||||
In your favorite text-editor, update the contents of index.html as follows:
|
||||
```HTML
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>PlayFab JavaScript Unit Tests</title>
|
||||
<script type="text/javascript" src="src/PlayFab/PlayFabClientApi.js"></script>
|
||||
<script type="text/javascript" src="app.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
PlayFab Getting Started Guide<br/>
|
||||
TitleID: <input type="text" id="titleId" value="144"><br/>
|
||||
CustomID: <input type="text" id="customId" value="GettingStartedGuide"><br/>
|
||||
<input type="button" value="Call LoginWithCustomID" onclick="DoExampleLoginWithCustomID()"><br/>
|
||||
Result:<br/>
|
||||
<textarea id="resultOutput" cols="60" rows="5"></textarea><br/>
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
In your favorite text-editor, update the contents of app.ts as follows:
|
||||
```TypeScript
|
||||
function DoExampleLoginWithCustomID(): void {
|
||||
PlayFab.settings.titleId = (<HTMLInputElement>document.getElementById("titleId")).value;
|
||||
var loginRequest: PlayFabClientModels.LoginWithCustomIDRequest = {
|
||||
CustomId: (<HTMLInputElement>document.getElementById("customId")).value,
|
||||
CreateAccount: true
|
||||
};
|
||||
|
||||
PlayFabClientSDK.LoginWithCustomID(loginRequest, LoginCallback);
|
||||
}
|
||||
|
||||
var LoginCallback = function (result: PlayFabModule.SuccessContainer<PlayFabClientModels.LoginResult>, error: PlayFabModule.IPlayFabError): void {
|
||||
if (result !== null) {
|
||||
document.getElementById("resultOutput").innerHTML = "Congratulations, you made your first successful API call!";
|
||||
} else if (error !== null) {
|
||||
document.getElementById("resultOutput").innerHTML =
|
||||
"Something went wrong with your first API call.\n" +
|
||||
"Here's some debug information:\n" +
|
||||
CompileErrorReport(error);
|
||||
}
|
||||
}
|
||||
|
||||
// This is a utility function we haven't put into the core SDK yet. Feel free to use it.
|
||||
function CompileErrorReport(error: PlayFabModule.IPlayFabError): string {
|
||||
if (error === null)
|
||||
return "";
|
||||
var fullErrors: string = error.errorMessage;
|
||||
for (var paramName in error.errorDetails)
|
||||
for (var msgIdx in error.errorDetails[paramName])
|
||||
fullErrors += "\n" + paramName + ": " + error.errorDetails[paramName][msgIdx];
|
||||
return fullErrors;
|
||||
}
|
||||
```
|
||||
|
||||
Finish and Execute
|
||||
----
|
||||
|
||||
* Run the program: Drop Down -> Debug -> Start Debugging
|
||||
* In the new browser window, click the "Call LoginWithCustomID" button
|
||||
* You should see the following text in the Result section:
|
||||
```text
|
||||
Congratulations, you made your first successful API call!
|
||||
```
|
||||
|
||||
* At this point, you can start making other api calls, and building your game
|
||||
* For a list of all available client API calls, see our documentation:
|
||||
* https://api.playfab.com/
|
||||
* Happy coding!
|
||||
|
||||
Deconstruct the code
|
||||
----
|
||||
|
||||
|
||||
This optional last section describes each part of this example in detail.
|
||||
|
||||
The HTML file has a few important lines:
|
||||
```HTML
|
||||
<script type="text/javascript" src="src/PlayFab/PlayFabClientApi.js"></script>
|
||||
```
|
||||
|
||||
This line loads the Client-SDK from the local PlayFabSDK file. The latest version of this file is also available from [our CDN](https://download.playfab.com/PlayFabClientApi.js). For more information read our [CDN blog post](https://blog.playfab.com/blog/playfab-now-serving-javascript-sdk-via-cdn/).
|
||||
|
||||
The other important HTML lines:
|
||||
```HTML
|
||||
<script type="text/javascript" src="app.js"></script>
|
||||
...
|
||||
<input type="button" value="Call LoginWithCustomID" onclick="DoExampleLoginWithCustomID()"><br />
|
||||
```
|
||||
|
||||
As you can see above, app.js contains the DoExampleLoginWithCustomID function. These lines bind our js file to our webpage, and invoke the DoExampleLoginWithCustomID function in that script. Everything else is just GUI. The name "app.js" is based on the typescript file in our default project "app.ts". If you rename "app.ts", it will generate a ".js" file with the same name. You should not try to add ".ts" scripts directly to a webpage. For more information about TypeScript, read the [TypeScript tutorial](https://www.typescriptlang.org/docs/tutorial.html).
|
||||
|
||||
* Line by line breakdown for app.js
|
||||
* PlayFab.settings.titleId = (<HTMLInputElement>document.getElementById("titleId")).value;
|
||||
* This reads the titleId from the html-input, and sets it to the PlayFab sdk. TypeScript defines that getElementById returns type HTMLElement. We must cast that to the sub-type HTMLInputElement to get the input-specific field "value".
|
||||
* Every PlayFab developer creates a title in Game Manager. When you publish your game, you must code that titleId into your game. This lets the client know how to access the correct data within PlayFab. For most users, just consider it a mandatory step that makes PlayFab work.
|
||||
* var loginRequest: PlayFabClientModels.LoginWithCustomIDRequest = { TitleId: PlayFab.settings.titleId, CustomId: "GettingStartedGuide", CreateAccount: true };
|
||||
* Most PlayFab API methods require input parameters, and those input parameters are packed into a request object
|
||||
* Every API method requires a unique request object, with a mix of optional and mandatory parameters
|
||||
* We also cast this request to LoginWithCustomIDRequest, which is the required type for PlayFabClientSDK.LoginWithCustomID
|
||||
* For LoginWithCustomIDRequest, there is a mandatory parameter of CustomId, which uniquely identifies a player and CreateAccount, which allows the creation of a new account with this call.
|
||||
* PlayFabClientSDK.LoginWithCustomID(loginRequest, LoginCallback);
|
||||
* This begins the async request to "LoginWithCustomID", which will call LoginCallback when the API call is complete
|
||||
* For login, most developers will want to use a more appropriate login method
|
||||
* See the [PlayFab Login Documentation](https://api.playfab.com/Documentation/Client#Authentication) for a list of all login methods, and input parameters. Common choices are:
|
||||
* [LoginWithAndroidDeviceID](https://api.playfab.com/Documentation/Client/method/LoginWithAndroidDeviceID)
|
||||
* [LoginWithIOSDeviceID](https://api.playfab.com/Documentation/Client/method/LoginWithIOSDeviceID)
|
||||
* [LoginWithEmailAddress](https://api.playfab.com/Documentation/Client/method/LoginWithEmailAddress)
|
||||
* LoginCallback contains two parameters: result, error
|
||||
* When successful, error will be null, and the result object will contain the requested information, according to the API called
|
||||
* This result contains some basic information about the player, but for most users, login is simply a mandatory step before calling other APIs.
|
||||
* If error is not null, your API has failed
|
||||
* API calls can fail for many reasons, and you should always attempt to handle failure
|
||||
* Why API calls fail (In order of likelihood)
|
||||
* PlayFabSettings.TitleId is not set. If you forget to set titleId to your title, then nothing will work.
|
||||
* Request parameters. If you have not provided the correct or required information for a particular API call, then it will fail. See error.errorMessage, error.errorDetails, or error.GenerateErrorReport() for more info.
|
||||
* Device connectivity issue. Cell-phones lose/regain connectivity constantly, and so any API call at any time can fail randomly, and then work immediately after. Going into a tunnel can disconnect you completely.
|
||||
* PlayFab server issue. As with all software, there can be issues. See our [release notes](https://api.playfab.com/releaseNotes/) for updates.
|
||||
* The internet is not 100% reliable. Sometimes the message is corrupted or fails to reach the PlayFab server.
|
||||
* If you are having difficulty debugging an issue, and the information within the error information is not sufficient, please visit us on our [forums](https://community.playfab.com/index.html)
|
||||
|
@ -1,9 +0,0 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015 The jQuery Foundation
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@ -1,35 +0,0 @@
|
||||
Copyright jQuery Foundation and other contributors, https://jquery.org/
|
||||
|
||||
This software consists of voluntary contributions made by many
|
||||
individuals. For exact contribution history, see the revision history
|
||||
available at https://github.com/jquery/qunit
|
||||
|
||||
The following license applies to all parts of this software except as
|
||||
documented below:
|
||||
|
||||
====
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
====
|
||||
|
||||
All files located in the node_modules directory are externally maintained
|
||||
libraries used by this software which have their own licenses; we
|
||||
recommend you read them, as their terms may differ from the terms above.
|
@ -5,7 +5,6 @@
|
||||
<title>Antimatter Dimensions</title>
|
||||
<link rel="icon" type="image/png" href="icon.png">
|
||||
<meta name="Antimatter Dimensions" content="A game about huge numbers and watching them go up." >
|
||||
<script type="text/javascript" src='https://cdn1.kongregate.com/javascripts/kongregate_api.js'></script>
|
||||
<link href="https://fonts.googleapis.com/css?family=PT+Mono" rel="stylesheet">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheets/fontawesome/css/all.css">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheets/codemirror/codemirror.css">
|
||||
|
@ -4,7 +4,6 @@
|
||||
<title>Antimatter Dimensions</title>
|
||||
<link rel="icon" type="image/png" href="icon.png">
|
||||
<meta name="Antimatter Dimensions" content="A game about huge numbers and watching them go up." charset="utf-8" />
|
||||
<script type="text/javascript" src='https://cdn1.kongregate.com/javascripts/kongregate_api.js'></script>
|
||||
<link href="https://fonts.googleapis.com/css?family=PT+Mono" rel="stylesheet">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheets/ad-slider-component.css">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheets/styles.css?3">
|
||||
|
@ -2162,11 +2162,15 @@ br {
|
||||
|
||||
.o-hint-text--alchemy-node {
|
||||
font-size: 1.2rem;
|
||||
color: #4f5957;
|
||||
color: var(--color-text);
|
||||
text-shadow: none;
|
||||
transition: opacity 0.2s;
|
||||
}
|
||||
|
||||
.s-base--dark .o-hint-text--alchemy-node {
|
||||
text-shadow: 0.1rem 0.1rem black, 0.1rem -0.1rem black, -0.1rem -0.1rem black, -0.1rem 0.1rem black;
|
||||
}
|
||||
|
||||
.o-hint-text--alchemy-node--unfocused {
|
||||
opacity: 0;
|
||||
}
|
||||
@ -4746,8 +4750,8 @@ properly on certain themes. */
|
||||
.o-eternity-upgrade--useless {
|
||||
color: black;
|
||||
background-color: var(--color-pelle--base);
|
||||
filter: grayscale(50%);
|
||||
border-color: black;
|
||||
filter: grayscale(50%);
|
||||
}
|
||||
|
||||
.o-eternity-upgrade--available {
|
||||
|
@ -1,7 +1,6 @@
|
||||
<script>
|
||||
import ModalCloseButton from "@/components/modals/ModalCloseButton";
|
||||
|
||||
// TODO add searching
|
||||
export default {
|
||||
name: "ChangelogModal",
|
||||
components: {
|
||||
|
@ -90,10 +90,9 @@ export default {
|
||||
<br>
|
||||
<br>
|
||||
<div class="c-modal-hard-reset-danger">
|
||||
<!-- TODO: Change the wording of this; originally this assumed it's only unlockable from a completed save -->
|
||||
Starting a speedrun will overwrite your current save, replacing this save with the new speedrun save. Export
|
||||
this save first if you want to keep a save with a beaten game. Type in "Gotta Go Fast!" below to confirm and
|
||||
start the run.
|
||||
Starting a speedrun will overwrite your current save, replacing this save with the new speedrun save. The only
|
||||
things which will carry over are Glyph cosmetics and total full game completions. Export this save first if
|
||||
you want to keep anything else on your save. Type in "Gotta Go Fast!" below to confirm and start the run.
|
||||
</div>
|
||||
<input
|
||||
ref="confirmPhrase"
|
||||
|
72
src/components/modals/cloud/CloudInvalidDataModal.vue
Normal file
72
src/components/modals/cloud/CloudInvalidDataModal.vue
Normal file
@ -0,0 +1,72 @@
|
||||
<script>
|
||||
import ModalWrapperChoice from "@/components/modals/ModalWrapperChoice";
|
||||
|
||||
export default {
|
||||
name: "CloudInvalidDataModal",
|
||||
components: {
|
||||
ModalWrapperChoice,
|
||||
},
|
||||
props: {
|
||||
isSaving: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
conflict() {
|
||||
return this.$viewModel.modal.cloudConflict;
|
||||
},
|
||||
overwriteText() {
|
||||
return this.isSaving
|
||||
? "Overwrite Cloud Save"
|
||||
: "Load save from Cloud";
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
ignore() {
|
||||
EventHub.dispatch(GAME_EVENT.CLOSE_MODAL);
|
||||
},
|
||||
overwrite() {
|
||||
this.conflict.onAccept?.();
|
||||
EventHub.dispatch(GAME_EVENT.CLOSE_MODAL);
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ModalWrapperChoice
|
||||
class="c-modal-options__large"
|
||||
:cancel-class="'c-modal-message__okay-btn'"
|
||||
:confirm-class="'c-modal-message__okay-btn c-modal__confirm-btn'"
|
||||
:cancel-fn="overwrite"
|
||||
@confirm="ignore()"
|
||||
>
|
||||
<template #header>
|
||||
Could not compare with Cloud Save
|
||||
</template>
|
||||
While attempting to compare your saves, the game was unable to properly process the data in your
|
||||
Cloud save. This is most likely due to the Cloud save being very outdated, using a data
|
||||
format from a much older version of the game.
|
||||
<br>
|
||||
<br>
|
||||
<span v-if="isSaving">
|
||||
It is probably safe to overwrite your Cloud save. You can click "Cloud load" and force the save
|
||||
to be loaded if you would like to attempt to convert it to a valid save format that you can use.
|
||||
</span>
|
||||
<span v-else>
|
||||
You can try to load your data from the Cloud if desired. The game will attempt to load in your
|
||||
Cloud data by converting its format, but this may not work and in the worst case may require you
|
||||
to reset this save slot in order for the game to work again.
|
||||
</span>
|
||||
<br>
|
||||
Note: This modal will show up regardless of your settings, because this issue will continue to prevent
|
||||
the 5-minute autosave until it is resolved.
|
||||
<template #cancel-text>
|
||||
{{ overwriteText }}
|
||||
</template>
|
||||
<template #confirm-text>
|
||||
Do not overwrite
|
||||
</template>
|
||||
</ModalWrapperChoice>
|
||||
</template>
|
@ -74,6 +74,7 @@ export default {
|
||||
</span>
|
||||
Please select the save you want to load.
|
||||
<br>
|
||||
<br>
|
||||
<SaveInfoEntry
|
||||
:save-data="conflict.local"
|
||||
:other-data="conflict.cloud"
|
||||
|
@ -74,7 +74,6 @@ export default {
|
||||
},
|
||||
handleYesClick() {
|
||||
requestGalaxyReset(this.bulk);
|
||||
Tutorial.turnOffEffect(TUTORIAL_STATE.GALAXY);
|
||||
EventHub.ui.offAll(this);
|
||||
}
|
||||
},
|
||||
|
@ -29,7 +29,6 @@ export default {
|
||||
methods: {
|
||||
handleYesClick() {
|
||||
requestDimensionBoost(this.bulk);
|
||||
Tutorial.turnOffEffect(TUTORIAL_STATE.DIMBOOST);
|
||||
EventHub.ui.offAll(this);
|
||||
}
|
||||
},
|
||||
|
@ -106,7 +106,6 @@ export default {
|
||||
buyGalaxy(bulk) {
|
||||
if (!this.canBeBought) return;
|
||||
manualRequestGalaxyReset(this.canBulkBuy && bulk);
|
||||
Tutorial.turnOffEffect(TUTORIAL_STATE.GALAXY);
|
||||
},
|
||||
formatGalaxies(num) {
|
||||
return num > 1e8 ? format(num, 2) : formatInt(num);
|
||||
|
@ -64,7 +64,6 @@ export default {
|
||||
dimensionBoost(bulk) {
|
||||
if (!DimBoost.requirement.isSatisfied || !DimBoost.canBeBought) return;
|
||||
manualRequestDimensionBoost(bulk);
|
||||
Tutorial.turnOffEffect(TUTORIAL_STATE.DIMBOOST);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -108,7 +108,6 @@ export default {
|
||||
buyGalaxy(bulk) {
|
||||
if (!this.canBeBought) return;
|
||||
manualRequestGalaxyReset(this.canBulkBuy && bulk);
|
||||
Tutorial.turnOffEffect(TUTORIAL_STATE.GALAXY);
|
||||
},
|
||||
formatGalaxies(num) {
|
||||
return num > 1e8 ? format(num, 2) : formatInt(num);
|
||||
|
@ -60,7 +60,6 @@ export default {
|
||||
dimensionBoost(bulk) {
|
||||
if (!DimBoost.requirement.isSatisfied || !DimBoost.canBeBought) return;
|
||||
manualRequestDimensionBoost(bulk);
|
||||
Tutorial.turnOffEffect(TUTORIAL_STATE.DIMBOOST);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -117,10 +117,6 @@ export const BlackHoleAnimation = (function() {
|
||||
update(delta, dilationFactor) {
|
||||
const baseSpeed = 1.5;
|
||||
const speedFactor = Math.min(Math.pow(Math.max(dilationFactor, 2) / 2, 3), 5);
|
||||
// TODO: Figure out how to correctly handle delta in two cases:
|
||||
// 1. 30FPS browsers
|
||||
// 2. Big deltas (for ex. after tab switching)
|
||||
// Righ now, Math.min(delta, 16) is here to fix (2)
|
||||
const particleSpeed = baseSpeed * speedFactor * Math.min(delta, 16) / 1000;
|
||||
|
||||
if (!this.isInside) {
|
||||
|
@ -30,6 +30,7 @@ export default {
|
||||
realityUnlocked: false,
|
||||
garbleTimer: 0,
|
||||
garbleKey: 0,
|
||||
achievementTime: 0,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -86,6 +87,13 @@ export default {
|
||||
garbledDescriptionTemplate() {
|
||||
return this.makeGarbledTemplate(this.config.description);
|
||||
},
|
||||
achievedTime() {
|
||||
if (!player.speedrun.isActive) return null;
|
||||
if (this.achievementTime === undefined) return "Not Achieved yet";
|
||||
return this.achievementTime === 0
|
||||
? "Given at Speedrun start"
|
||||
: `Achieved after ${TimeSpan.fromMilliseconds(this.achievementTime).toStringShort()}`;
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
clearTimeout(this.mouseOverInterval);
|
||||
@ -110,6 +118,7 @@ export default {
|
||||
} else {
|
||||
this.garbleKey = this.id;
|
||||
}
|
||||
if (player.speedrun.isActive) this.achievementTime = player.speedrun.achievementTimes[this.id];
|
||||
},
|
||||
onMouseEnter() {
|
||||
clearTimeout(this.mouseOverInterval);
|
||||
@ -191,6 +200,12 @@ export default {
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
v-if="achievedTime"
|
||||
class="o-achievement-time"
|
||||
>
|
||||
{{ achievedTime }}
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<div
|
||||
@ -203,5 +218,8 @@ export default {
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
.o-achievement-time {
|
||||
font-weight: bold;
|
||||
color: var(--color-accent);
|
||||
}
|
||||
</style>
|
||||
|
@ -24,6 +24,8 @@ export default {
|
||||
creditsClosed: false,
|
||||
loggedIn: false,
|
||||
username: "",
|
||||
canRespec: false,
|
||||
respecTimeStr: "",
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -41,6 +43,11 @@ export default {
|
||||
enableText() {
|
||||
return `In-app Purchases: ${this.IAPsEnabled ? "Enabled" : "Disabled"}`;
|
||||
},
|
||||
respecText() {
|
||||
if (!this.loggedIn) return "Not logged in!";
|
||||
if (!this.canRespec) return "No respec available! (Purchase STDs or wait 3 days since your last one)";
|
||||
return null;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
update() {
|
||||
@ -51,6 +58,10 @@ export default {
|
||||
this.creditsClosed = GameEnd.creditsEverClosed;
|
||||
this.loggedIn = Cloud.loggedIn;
|
||||
this.username = Cloud.user?.displayName;
|
||||
this.canRespec = ShopPurchaseData.canRespec;
|
||||
if (!ShopPurchaseData.respecAvailable && !this.canRespec) {
|
||||
this.respecTimeStr = ShopPurchaseData.timeUntilRespec.toStringShort();
|
||||
}
|
||||
},
|
||||
showStore() {
|
||||
if (!steamOn) return;
|
||||
@ -63,13 +74,20 @@ export default {
|
||||
Payments.cancelPurchase(false);
|
||||
},
|
||||
respec() {
|
||||
if (this.creditsClosed) return;
|
||||
if (this.creditsClosed || !this.loggedIn || !this.canRespec) return;
|
||||
ShopPurchaseData.respecRequest();
|
||||
},
|
||||
toggleEnable() {
|
||||
if (ShopPurchaseData.availableSTD < 0) return;
|
||||
if (!player.IAP.enabled && this.spentSTD > 0) Speedrun.setSTDUse(true);
|
||||
player.IAP.enabled = !player.IAP.enabled;
|
||||
},
|
||||
respecClass() {
|
||||
return {
|
||||
"o-primary-btn--subtab-option": true,
|
||||
"o-pelle-disabled-pointer": this.creditsClosed,
|
||||
"o-primary-btn--disabled": !this.loggedIn || !this.canRespec
|
||||
};
|
||||
}
|
||||
},
|
||||
};
|
||||
@ -95,13 +113,16 @@ export default {
|
||||
{{ enableText }}
|
||||
</PrimaryButton>
|
||||
<PrimaryButton
|
||||
class="o-primary-btn--subtab-option"
|
||||
:class="{ 'o-pelle-disabled-pointer': creditsClosed }"
|
||||
v-tooltip="respecText"
|
||||
:class="respecClass()"
|
||||
@click="respec()"
|
||||
>
|
||||
Respec Shop
|
||||
</PrimaryButton>
|
||||
</div>
|
||||
<div v-if="!canRespec">
|
||||
Time until respec available: {{ respecTimeStr }}
|
||||
</div>
|
||||
<div
|
||||
v-if="loggedIn"
|
||||
class="c-login-info"
|
||||
|
@ -65,6 +65,9 @@ export default {
|
||||
return num.gt(0)
|
||||
? `${this.formatDecimalAmount(num)} ${pluralize("Eternity", num)}`
|
||||
: "no Eternities";
|
||||
},
|
||||
fullGameCompletions() {
|
||||
return player.records.fullGameCompletions;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@ -164,6 +167,9 @@ export default {
|
||||
<div>
|
||||
You have unlocked {{ quantifyInt("Secret Achievement", secretAchievementCount) }}.
|
||||
</div>
|
||||
<div v-if="fullGameCompletions">
|
||||
<b>You have completed the entire game {{ quantifyInt("time", fullGameCompletions) }}.</b>
|
||||
</div>
|
||||
<div>
|
||||
<br>
|
||||
<div class="c-matter-scale-container">
|
||||
|
@ -29,7 +29,6 @@ export default {
|
||||
this.enableAnimation = player.options.news.includeAnimated;
|
||||
},
|
||||
restart() {
|
||||
// TODO: Proper delay before ui is initialized
|
||||
if (!GameUI.initialized) {
|
||||
setTimeout(this.restart.bind(this), 100);
|
||||
return;
|
||||
|
@ -1,9 +1,10 @@
|
||||
import "drag-drop-touch";
|
||||
import "./shims";
|
||||
import "./merge-globals";
|
||||
import { DEV } from "../javascripts/core/devtools";
|
||||
import { browserCheck, init } from "../javascripts/game";
|
||||
|
||||
import { watchLatestCommit } from "@/commit-watcher";
|
||||
|
||||
if (browserCheck()) init();
|
||||
watchLatestCommit();
|
||||
if (DEV) watchLatestCommit();
|
||||
|
@ -1,11 +1,13 @@
|
||||
/**
|
||||
* @type {import('@vue/cli-service').ProjectOptions}
|
||||
*/
|
||||
|
||||
const isDev = process.env.VUE_APP_DEV === "true";
|
||||
|
||||
module.exports = {
|
||||
publicPath: "./",
|
||||
lintOnSave: false,
|
||||
configureWebpack: {
|
||||
devtool: "eval-source-map",
|
||||
},
|
||||
runtimeCompiler: true
|
||||
devtool: isDev ? "eval-source-map" : "source-map",
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user