From f5d8587955f954651c013b7896a4b0b19114757b Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Wed, 31 Jul 2013 20:15:14 +0100 Subject: [PATCH] update code for the new internal name for enlightened - was ALIENS, now ENLIGHTENED --- code/boot.js | 2 +- code/chat.js | 6 +++--- code/entity_info.js | 2 +- code/redeeming.js | 2 +- main.js | 2 +- style.css | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/code/boot.js b/code/boot.js index eb5b1d6e..c7ee7ee6 100644 --- a/code/boot.js +++ b/code/boot.js @@ -274,7 +274,7 @@ window.setupPlayerStat = function() { var xmMax = MAX_XM_PER_LEVEL[level]; 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' diff --git a/code/chat.js b/code/chat.js index c6074d14..00d8d721 100644 --- a/code/chat.js +++ b/code/chat.js @@ -265,7 +265,7 @@ window.chat.writeDataToHash = function(newData, storageHash, isPublicChannel, is var msgToPlayer = false; 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 systemNarrowcast = json[2].plext.plextType === 'SYSTEM_NARROWCAST'; @@ -287,7 +287,7 @@ window.chat.writeDataToHash = function(newData, storageHash, isPublicChannel, is case 'PLAYER': // automatically generated messages pguid = markup[1].guid; 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 break; @@ -610,7 +610,7 @@ window.chat.setup = function() { window.requests.addRefreshFunction(chat.request); - var cls = PLAYER.team === 'ALIENS' ? 'enl' : 'res'; + var cls = PLAYER.team === 'RESISTANCE' ? 'res' : 'enl'; $('#chatinput mark').addClass(cls); $(document).on('click', '.nickname', function(event) { diff --git a/code/entity_info.js b/code/entity_info.js index e00b2e78..16fc06f4 100644 --- a/code/entity_info.js +++ b/code/entity_info.js @@ -9,7 +9,7 @@ // to. Uses TEAM_* enum values. window.getTeam = function(details) { 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; return team; } diff --git a/code/redeeming.js b/code/redeeming.js index eb613048..3529c13f 100644 --- a/code/redeeming.js +++ b/code/redeeming.js @@ -190,7 +190,7 @@ window.REDEEM_ENCOURAGEMENT = [ "Power up!", "Asset transfer in progress.", "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) { diff --git a/main.js b/main.js index f3592e17..a155c73d 100644 --- a/main.js +++ b/main.js @@ -53,7 +53,7 @@ for(var i = 0; i < d.length; i++) { break; } // 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 // security context so we can access the API easily. Setup as much as diff --git a/style.css b/style.css index 5d3441f3..532bc501 100644 --- a/style.css +++ b/style.css @@ -937,7 +937,7 @@ td + td { color: #00c2ff; } -.ALIENS { +.ALIENS, .ENLIGHTENED { color: #28f428; }