Ticket #3841: 3841_ingame_summary_v0.3.patch
File 3841_ingame_summary_v0.3.patch, 6.8 KB (added by , 8 years ago) |
---|
-
binaries/data/mods/public/gui/session/menu.js
617 617 pauseGame(); 618 618 619 619 let extendedSimState = Engine.GuiInterfaceCall("GetExtendedSimulationState"); 620 let playersToShow = []; 621 622 if (g_ViewedPlayer < 1) 623 playersToShow = extendedSimState.players; 624 else 625 for (let player in g_Players) 626 if (player == 0 || player == g_ViewedPlayer || extendedSimState.players[g_ViewedPlayer].hasSeeAllyScore && g_Players[player].isMutualAlly[g_ViewedPlayer]) 627 playersToShow.push(extendedSimState.players[player]); 628 620 629 Engine.PushGuiPage("page_summary.xml", { 621 630 "sim": { 622 631 "mapSettings": g_GameAttributes.settings, 623 "playerStates": extendedSimState.players,632 "playerStates": playersToShow, 624 633 "timeElapsed" : extendedSimState.timeElapsed 625 634 }, 626 635 "gui": { -
binaries/data/mods/public/gui/session/menu.xml
48 48 style="StoneButtonFancy" 49 49 size="0 96 100% 124" 50 50 tooltip_style="sessionToolTip" 51 enabled="false"52 51 > 53 52 <translatableAttribute id="caption">Summary</translatableAttribute> 54 53 <action on="Press">openGameSummary();</action> -
binaries/data/mods/public/gui/session/session.js
480 480 // Disable stuff observers shouldn't use 481 481 Engine.GetGUIObjectByName("pauseButton").enabled = !g_IsObserver || !g_IsNetworked; 482 482 Engine.GetGUIObjectByName("menuResignButton").enabled = !g_IsObserver; 483 Engine.GetGUIObjectByName("summaryButton").enabled = g_IsObserver;484 483 } 485 484 486 485 function reportPerformance(time) -
binaries/data/mods/public/simulation/components/GuiInterface.js
107 107 "cheatsEnabled": cmpPlayer.GetCheatsEnabled(), 108 108 "disabledTemplates": cmpPlayer.GetDisabledTemplates(), 109 109 "hasSharedDropsites": cmpPlayer.HasSharedDropsites(), 110 "hasSeeAllyScore": cmpPlayer.HasSeeAllyScore(), 110 111 "phase": phase, 111 112 "isAlly": allies, 112 113 "isMutualAlly": mutualAllies, -
binaries/data/mods/public/simulation/components/Player.js
6 6 "</element>" + 7 7 "<element name='SharedDropsitesTech' a:help='Allies will share dropsites when this technology is researched. Leave empty to never share dropsites.'>" + 8 8 "<text/>" + 9 "</element>" + 10 "<element name='SeeAllyScoreTech' a:help='The player will see the score of its allies. Leave empty to never let the player see the score of allies.'>" + 11 "<text/>" + 9 12 "</element>"; 10 13 11 14 Player.prototype.Init = function() … … 35 38 this.state = "active"; // game state - one of "active", "defeated", "won" 36 39 this.diplomacy = []; // array of diplomatic stances for this player with respect to other players (including gaia and self) 37 40 this.sharedDropsites = false; 41 this.seeAllyScore = false; 38 42 this.formations = []; 39 43 this.startCam = undefined; 40 44 this.controlAllUnits = false; … … 550 554 return this.sharedDropsites; 551 555 }; 552 556 557 Player.prototype.HasSeeAllyScore = function() 558 { 559 return this.seeAllyScore; 560 }; 561 553 562 Player.prototype.SetControlAllUnits = function(c) 554 563 { 555 564 this.controlAllUnits = c; … … 705 714 this.UpdateSharedLos(); 706 715 else if (msg.tech == this.template.SharedDropsitesTech) 707 716 this.sharedDropsites = true; 717 else if (msg.tech == this.template.SeeAllyScoreTech) 718 this.seeAllyScore = true; 708 719 }; 709 720 710 721 Player.prototype.OnDiplomacyChanged = function() -
binaries/data/mods/public/simulation/data/technologies/unlock_see_ally_score.json
1 { 2 "genericName": "SeeAllyScore", 3 "description": "Allows you to see the score of your allies.", 4 "cost": { "food": 200, "wood": 200, "stone": 100, "metal": 100 }, 5 "requirements": {"tech": "unlock_shared_los"}, 6 "requirementsTooltip": "Requires Cartography", 7 "icon": "diaspora.png", 8 "researchTime": 40, 9 "tooltip": "You can see the score of your allies.", 10 "modifications": [{ "value": "Player/seeAllyScore", "replace": true }], 11 "soundComplete": "interface/alarm/alarm_upgradearmory.xml" 12 } 13 No newline at end of file -
binaries/data/mods/public/simulation/templates/special/player.xml
59 59 <Player> 60 60 <SharedLosTech>unlock_shared_los</SharedLosTech> 61 61 <SharedDropsitesTech>unlock_shared_dropsites</SharedDropsitesTech> 62 <SeeAllyScoreTech>unlock_see_ally_score</SeeAllyScoreTech> 62 63 </Player> 63 64 <StatisticsTracker/> 64 65 <TechnologyManager/> -
binaries/data/mods/public/simulation/templates/special/player_gaia.xml
3 3 <Player> 4 4 <SharedLosTech/> 5 5 <SharedDropsitesTech/> 6 <SeeAllyScoreTech/> 6 7 </Player> 7 8 </Entity> -
binaries/data/mods/public/simulation/templates/template_structure_economic_market.xml
56 56 <Technologies datatype="tokens"> 57 57 unlock_shared_los 58 58 unlock_shared_dropsites 59 unlock_see_ally_score 59 60 trade_convoys_speed 60 61 trade_convoys_armor 61 62 trade_gain_01