Index: binaries/data/mods/public/gui/session/menu.js
===================================================================
--- binaries/data/mods/public/gui/session/menu.js (revision 18464)
+++ binaries/data/mods/public/gui/session/menu.js (working copy)
@@ -617,10 +617,19 @@
pauseGame();
let extendedSimState = Engine.GuiInterfaceCall("GetExtendedSimulationState");
+ let playersToShow = [];
+
+ if (g_ViewedPlayer < 1)
+ playersToShow = extendedSimState.players;
+ else
+ for (let player in g_Players)
+ if (player == 0 || player == g_ViewedPlayer || extendedSimState.players[g_ViewedPlayer].hasSeeAllyScore && g_Players[player].isMutualAlly[g_ViewedPlayer])
+ playersToShow.push(extendedSimState.players[player]);
+
Engine.PushGuiPage("page_summary.xml", {
"sim": {
"mapSettings": g_GameAttributes.settings,
- "playerStates": extendedSimState.players,
+ "playerStates": playersToShow,
"timeElapsed" : extendedSimState.timeElapsed
},
"gui": {
Index: binaries/data/mods/public/gui/session/menu.xml
===================================================================
--- binaries/data/mods/public/gui/session/menu.xml (revision 18464)
+++ binaries/data/mods/public/gui/session/menu.xml (working copy)
@@ -48,7 +48,6 @@
style="StoneButtonFancy"
size="0 96 100% 124"
tooltip_style="sessionToolTip"
- enabled="false"
>
Summary
openGameSummary();
Index: binaries/data/mods/public/gui/session/session.js
===================================================================
--- binaries/data/mods/public/gui/session/session.js (revision 18464)
+++ binaries/data/mods/public/gui/session/session.js (working copy)
@@ -480,7 +480,6 @@
// Disable stuff observers shouldn't use
Engine.GetGUIObjectByName("pauseButton").enabled = !g_IsObserver || !g_IsNetworked;
Engine.GetGUIObjectByName("menuResignButton").enabled = !g_IsObserver;
- Engine.GetGUIObjectByName("summaryButton").enabled = g_IsObserver;
}
function reportPerformance(time)
Index: binaries/data/mods/public/simulation/components/GuiInterface.js
===================================================================
--- binaries/data/mods/public/simulation/components/GuiInterface.js (revision 18464)
+++ binaries/data/mods/public/simulation/components/GuiInterface.js (working copy)
@@ -107,6 +107,7 @@
"cheatsEnabled": cmpPlayer.GetCheatsEnabled(),
"disabledTemplates": cmpPlayer.GetDisabledTemplates(),
"hasSharedDropsites": cmpPlayer.HasSharedDropsites(),
+ "hasSeeAllyScore": cmpPlayer.HasSeeAllyScore(),
"phase": phase,
"isAlly": allies,
"isMutualAlly": mutualAllies,
Index: binaries/data/mods/public/simulation/components/Player.js
===================================================================
--- binaries/data/mods/public/simulation/components/Player.js (revision 18464)
+++ binaries/data/mods/public/simulation/components/Player.js (working copy)
@@ -6,6 +6,9 @@
"" +
"" +
"" +
+ "" +
+ "" +
+ "" +
"";
Player.prototype.Init = function()
@@ -35,6 +38,7 @@
this.state = "active"; // game state - one of "active", "defeated", "won"
this.diplomacy = []; // array of diplomatic stances for this player with respect to other players (including gaia and self)
this.sharedDropsites = false;
+ this.seeAllyScore = false;
this.formations = [];
this.startCam = undefined;
this.controlAllUnits = false;
@@ -550,6 +554,11 @@
return this.sharedDropsites;
};
+Player.prototype.HasSeeAllyScore = function()
+{
+ return this.seeAllyScore;
+};
+
Player.prototype.SetControlAllUnits = function(c)
{
this.controlAllUnits = c;
@@ -705,6 +714,8 @@
this.UpdateSharedLos();
else if (msg.tech == this.template.SharedDropsitesTech)
this.sharedDropsites = true;
+ else if (msg.tech == this.template.SeeAllyScoreTech)
+ this.seeAllyScore = true;
};
Player.prototype.OnDiplomacyChanged = function()
Index: binaries/data/mods/public/simulation/data/technologies/unlock_see_ally_score.json
===================================================================
--- binaries/data/mods/public/simulation/data/technologies/unlock_see_ally_score.json (nonexistent)
+++ binaries/data/mods/public/simulation/data/technologies/unlock_see_ally_score.json (working copy)
@@ -0,0 +1,12 @@
+{
+ "genericName": "SeeAllyScore",
+ "description": "Allows you to see the score of your allies.",
+ "cost": { "food": 200, "wood": 200, "stone": 100, "metal": 100 },
+ "requirements": {"tech": "unlock_shared_los"},
+ "requirementsTooltip": "Requires Cartography",
+ "icon": "diaspora.png",
+ "researchTime": 40,
+ "tooltip": "You can see the score of your allies.",
+ "modifications": [{ "value": "Player/seeAllyScore", "replace": true }],
+ "soundComplete": "interface/alarm/alarm_upgradearmory.xml"
+ }
\ No newline at end of file
Index: binaries/data/mods/public/simulation/templates/special/player.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/special/player.xml (revision 18464)
+++ binaries/data/mods/public/simulation/templates/special/player.xml (working copy)
@@ -59,6 +59,7 @@
unlock_shared_los
unlock_shared_dropsites
+ unlock_see_ally_score
Index: binaries/data/mods/public/simulation/templates/special/player_gaia.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/special/player_gaia.xml (revision 18464)
+++ binaries/data/mods/public/simulation/templates/special/player_gaia.xml (working copy)
@@ -3,5 +3,6 @@
+
Index: binaries/data/mods/public/simulation/templates/template_structure_economic_market.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/template_structure_economic_market.xml (revision 18464)
+++ binaries/data/mods/public/simulation/templates/template_structure_economic_market.xml (working copy)
@@ -56,6 +56,7 @@
unlock_shared_los
unlock_shared_dropsites
+ unlock_see_ally_score
trade_convoys_speed
trade_convoys_armor
trade_gain_01