1
0
forked from 0ad/0ad

Add a GUI notification when the ceasefire ended so that devs and modders can do fancy things with that event and

use it to fix an oversight in 1022619d98 (the diplomacy dialog wasn't
updated).

Differential Revision: https://code.wildfiregames.com/D181
Reviewed By: mimo
This was SVN commit r19260.
This commit is contained in:
elexis 2017-03-02 18:02:59 +00:00
parent 89e9c90ebc
commit 716af19f1c
2 changed files with 9 additions and 1 deletions

View File

@ -330,7 +330,10 @@ var g_NotificationsTypes =
"targetPlayer": notification.targetPlayer,
"status": notification.status
});
updatePlayerData();
},
"ceasefire-ended": function(notification, player)
{
updatePlayerData();
},
"tribute": function(notification, player)

View File

@ -124,6 +124,11 @@ CeasefireManager.prototype.StopCeasefire = function()
this.diplomacyBeforeCeasefire = [];
Engine.PostMessage(SYSTEM_ENTITY, MT_CeasefireEnded);
cmpGuiInterface.PushNotification({
"type": "ceasefire-ended",
"players": [-1] // processed globally
});
};
Engine.RegisterSystemComponentType(IID_CeasefireManager, "CeasefireManager", CeasefireManager);