Ticket #4078: all_ai_in_sp.patch
File all_ai_in_sp.patch, 2.4 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
1601 1601 ++assignedCount; 1602 1602 } 1603 1603 1604 // Only enable start button if we have enough assigned players1604 // Only enable start button if we are the controller 1605 1605 if (g_IsController) 1606 Engine.GetGUIObjectByName("startGame").enabled = assignedCount > 0;1606 Engine.GetGUIObjectByName("startGame").enabled = true; 1607 1607 1608 1608 for (let ai of g_Settings.AIDescriptions) 1609 1609 { … … 1683 1683 return; 1684 1684 1685 1685 let guid = hostGuidList[this.selected]; 1686 if (!guid) 1686 1687 if (!guid || guid.substr(0, 3) == "ai:") 1687 1688 { 1689 // Unassign any host from this player slot 1688 1690 if (g_IsNetworked) 1689 // Unassign any host from this player slot1690 1691 Engine.AssignNetworkPlayer(playerID, ""); 1691 // Remove AI from this player slot 1692 g_GameAttributes.settings.PlayerData[playerSlot].AI = ""; 1692 1693 // If a human was removed from the slot, make sure they are not reassigned 1694 let changeTarget = this.list_data[selection]; 1695 if(g_PlayerAssignments[changeTarget]) 1696 g_PlayerAssignments[changeTarget].player = -1; 1697 1698 // Set the AI, unless we are unassigning 1699 g_GameAttributes.settings.PlayerData[playerSlot].AI = guid ? guid.substr(3) : ""; 1693 1700 } 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 1701 else 1703 1702 swapPlayers(guid, playerSlot); 1704 1703