mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-17 13:53:57 -07:00
cleanup of the updateDiplomacy functions
Summary: Following d9d1f1bbeb the diplomacy window is updated on each
tick, so we can remove the old updateDiplomacy function which now only
updates the player data, and rename updateDiplomacyPanel to
updateDiplomacy for consistency with other windows.
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D172
This was SVN commit r19257.
This commit is contained in:
parent
3be6460e88
commit
1022619d98
4 changed files with 5 additions and 16 deletions
|
|
@ -115,10 +115,7 @@ function updateCounters()
|
|||
}
|
||||
}
|
||||
else if (!diplomacyCeasefireCounter.hidden)
|
||||
{
|
||||
diplomacyCeasefireCounter.hidden = true;
|
||||
updateDiplomacy();
|
||||
}
|
||||
|
||||
g_ResearchListTop = 4;
|
||||
if (linesCount)
|
||||
|
|
|
|||
|
|
@ -314,10 +314,10 @@ function openDiplomacy()
|
|||
|
||||
g_IsDiplomacyOpen = true;
|
||||
|
||||
updateDiplomacyPanel(true);
|
||||
updateDiplomacy(true);
|
||||
}
|
||||
|
||||
function updateDiplomacyPanel(opening = false)
|
||||
function updateDiplomacy(opening = false)
|
||||
{
|
||||
if (g_ViewedPlayer < 1 || !g_IsDiplomacyOpen)
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -331,7 +331,7 @@ var g_NotificationsTypes =
|
|||
"status": notification.status
|
||||
});
|
||||
|
||||
updateDiplomacy();
|
||||
updatePlayerData();
|
||||
},
|
||||
"tribute": function(notification, player)
|
||||
{
|
||||
|
|
@ -514,14 +514,6 @@ function handleNotifications()
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates playerdata cache and refresh diplomacy panel.
|
||||
*/
|
||||
function updateDiplomacy()
|
||||
{
|
||||
updatePlayerData();
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays all active counters (messages showing the remaining time) for wonder-victory, ceasefire etc.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -521,7 +521,7 @@ function playerFinished(player, won)
|
|||
if (player == Engine.GetPlayerID())
|
||||
reportGame();
|
||||
|
||||
updateDiplomacy();
|
||||
updatePlayerData();
|
||||
updateChatAddressees();
|
||||
|
||||
if (player != g_ViewedPlayer)
|
||||
|
|
@ -846,7 +846,7 @@ function updateGUIObjects()
|
|||
global.music.setState(global.music.states[battleState]);
|
||||
}
|
||||
|
||||
updateDiplomacyPanel();
|
||||
updateDiplomacy();
|
||||
}
|
||||
|
||||
function onReplayFinished()
|
||||
|
|
|
|||
Loading…
Reference in a new issue