Ticket #4078: all_ai_in_sp_v2.patch
File all_ai_in_sp_v2.patch, 3.2 KB (added by , 8 years ago) |
---|
-
binaries/data/mods/public/gui/credits/texts/programming.json
92 92 {"nick": "infyquest", "name": "Vijay Kiran Kamuju"}, 93 93 {"nick": "IronNerd", "name": "Matthew McMullan"}, 94 94 {"nick": "Itms", "name": "Nicolas Auvray"}, 95 {"nick": "ixly"}, 95 96 {"nick": "Jaison", "name": "Marco tom Suden"}, 96 97 {"nick": "jammus", "name": "James Scott"}, 97 98 {"nick": "Jgwman"}, -
binaries/data/mods/public/gui/gamesetup/gamesetup.js
1584 1584 let assignments = []; 1585 1585 let aiAssignments = {}; 1586 1586 let noAssignment; 1587 let assignedCount = 0; 1587 1588 1588 for (let guid of sortGUIDsByPlayerID()) 1589 1589 { 1590 1590 let player = g_PlayerAssignments[guid].player; … … 1596 1596 1597 1597 hostGuidList.push(guid); 1598 1598 assignments[player] = hostNameList.length-1; 1599 1600 if (player != -1)1601 ++assignedCount;1602 1599 } 1603 1600 1604 // Only enable start button if we have enough assigned players1605 if (g_IsController)1606 Engine.GetGUIObjectByName("startGame").enabled = assignedCount > 0;1607 1608 1601 for (let ai of g_Settings.AIDescriptions) 1609 1602 { 1610 1603 // If the map uses a hidden AI then don't hide it … … 1683 1676 return; 1684 1677 1685 1678 let guid = hostGuidList[this.selected]; 1686 if (!guid) 1679 1680 if (!guid || guid.substr(0, 3) == "ai:") 1687 1681 { 1682 // Unassign any host from this player slot 1688 1683 if (g_IsNetworked) 1689 // Unassign any host from this player slot1690 1684 Engine.AssignNetworkPlayer(playerID, ""); 1691 // Remove AI from this player slot 1692 g_GameAttributes.settings.PlayerData[playerSlot].AI = ""; 1685 1686 // If a human was removed from the slot, make sure they are not reassigned 1687 let changeTarget = this.list_data[selection]; 1688 if (g_PlayerAssignments[changeTarget]) 1689 g_PlayerAssignments[changeTarget].player = -1; 1690 1691 // Set the AI, unless we are unassigning 1692 g_GameAttributes.settings.PlayerData[playerSlot].AI = guid ? guid.substr(3) : ""; 1693 1693 } 1694 else if (guid.substr(0, 3) == "ai:")1695 {1696 if (g_IsNetworked)1697 // Unassign any host from this player slot1698 Engine.AssignNetworkPlayer(playerID, "");1699 // Set the AI for this player slot1700 g_GameAttributes.settings.PlayerData[playerSlot].AI = guid.substr(3);1701 }1702 1694 else 1703 1695 swapPlayers(guid, playerSlot); 1704 1696 -
binaries/data/mods/public/gui/gamesetup/gamesetup.xml
256 256 style="StoneButton" 257 257 size="100%-164 100%-52 100%-24 100%-24" 258 258 tooltip_style="onscreenToolTip" 259 enabled=" false"259 enabled="true" 260 260 > 261 261 <translatableAttribute id="caption">Start game!</translatableAttribute> 262 262 <translatableAttribute id="tooltip">Start a new game with the current settings.</translatableAttribute>