update code for the new internal name for enlightened - was ALIENS, now ENLIGHTENED
This commit is contained in:
parent
b857998c23
commit
f5d8587955
@ -274,7 +274,7 @@ window.setupPlayerStat = function() {
|
|||||||
var xmMax = MAX_XM_PER_LEVEL[level];
|
var xmMax = MAX_XM_PER_LEVEL[level];
|
||||||
var xmRatio = Math.round(PLAYER.energy/xmMax*100);
|
var xmRatio = Math.round(PLAYER.energy/xmMax*100);
|
||||||
|
|
||||||
var cls = PLAYER.team === 'ALIENS' ? 'enl' : 'res';
|
var cls = PLAYER.team === 'RESISTANCE' ? 'res' : 'enl';
|
||||||
|
|
||||||
|
|
||||||
var t = 'Level:\t' + level + '\n'
|
var t = 'Level:\t' + level + '\n'
|
||||||
|
@ -265,7 +265,7 @@ window.chat.writeDataToHash = function(newData, storageHash, isPublicChannel, is
|
|||||||
var msgToPlayer = false;
|
var msgToPlayer = false;
|
||||||
|
|
||||||
var time = json[1];
|
var time = json[1];
|
||||||
var team = json[2].plext.team === 'ALIENS' ? TEAM_ENL : TEAM_RES;
|
var team = json[2].plext.team === 'RESISTANCE' ? TEAM_RES : TEAM_ENL;
|
||||||
var auto = json[2].plext.plextType !== 'PLAYER_GENERATED';
|
var auto = json[2].plext.plextType !== 'PLAYER_GENERATED';
|
||||||
var systemNarrowcast = json[2].plext.plextType === 'SYSTEM_NARROWCAST';
|
var systemNarrowcast = json[2].plext.plextType === 'SYSTEM_NARROWCAST';
|
||||||
|
|
||||||
@ -287,7 +287,7 @@ window.chat.writeDataToHash = function(newData, storageHash, isPublicChannel, is
|
|||||||
case 'PLAYER': // automatically generated messages
|
case 'PLAYER': // automatically generated messages
|
||||||
pguid = markup[1].guid;
|
pguid = markup[1].guid;
|
||||||
nick = markup[1].plain;
|
nick = markup[1].plain;
|
||||||
team = markup[1].team === 'ALIENS' ? TEAM_ENL : TEAM_RES;
|
team = markup[1].team === 'RESISTANCE' ? TEAM_RES : TEAM_ENL;
|
||||||
if(ind > 0) msg += nick; // don’t repeat nick directly
|
if(ind > 0) msg += nick; // don’t repeat nick directly
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -610,7 +610,7 @@ window.chat.setup = function() {
|
|||||||
|
|
||||||
window.requests.addRefreshFunction(chat.request);
|
window.requests.addRefreshFunction(chat.request);
|
||||||
|
|
||||||
var cls = PLAYER.team === 'ALIENS' ? 'enl' : 'res';
|
var cls = PLAYER.team === 'RESISTANCE' ? 'res' : 'enl';
|
||||||
$('#chatinput mark').addClass(cls);
|
$('#chatinput mark').addClass(cls);
|
||||||
|
|
||||||
$(document).on('click', '.nickname', function(event) {
|
$(document).on('click', '.nickname', function(event) {
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
// to. Uses TEAM_* enum values.
|
// to. Uses TEAM_* enum values.
|
||||||
window.getTeam = function(details) {
|
window.getTeam = function(details) {
|
||||||
var team = TEAM_NONE;
|
var team = TEAM_NONE;
|
||||||
if(details.controllingTeam.team === 'ALIENS') team = TEAM_ENL;
|
if(details.controllingTeam.team === 'ALIENS' || details.controllingTeam.team === 'ENLIGHTENED') team = TEAM_ENL;
|
||||||
if(details.controllingTeam.team === 'RESISTANCE') team = TEAM_RES;
|
if(details.controllingTeam.team === 'RESISTANCE') team = TEAM_RES;
|
||||||
return team;
|
return team;
|
||||||
}
|
}
|
||||||
|
@ -190,7 +190,7 @@ window.REDEEM_ENCOURAGEMENT = [
|
|||||||
"Power up!",
|
"Power up!",
|
||||||
"Asset transfer in progress.",
|
"Asset transfer in progress.",
|
||||||
"Well done, Agent.",
|
"Well done, Agent.",
|
||||||
"Make the " + {'RESISTANCE' : 'Resistance', 'ALIENS' : 'Enlightened'}[PLAYER.team] + " proud!"
|
"Make the " + {'RESISTANCE' : 'Resistance', 'ENLIGHTENED' : 'Enlightened'}[PLAYER.team] + " proud!"
|
||||||
];
|
];
|
||||||
|
|
||||||
window.handleRedeemResponse = function(data, textStatus, jqXHR) {
|
window.handleRedeemResponse = function(data, textStatus, jqXHR) {
|
||||||
|
2
main.js
2
main.js
@ -53,7 +53,7 @@ for(var i = 0; i < d.length; i++) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// player information is now available in a hash like this:
|
// player information is now available in a hash like this:
|
||||||
// window.PLAYER = {"ap": "123", "energy": 123, "available_invites": 123, "nickname": "somenick", "team": "ALIENS||RESISTANCE"};
|
// window.PLAYER = {"ap": "123", "energy": 123, "available_invites": 123, "nickname": "somenick", "team": "ENLIGHTENED||RESISTANCE"};
|
||||||
|
|
||||||
// remove complete page. We only wanted the user-data and the page’s
|
// remove complete page. We only wanted the user-data and the page’s
|
||||||
// security context so we can access the API easily. Setup as much as
|
// security context so we can access the API easily. Setup as much as
|
||||||
|
Loading…
x
Reference in New Issue
Block a user