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:
parent
89e9c90ebc
commit
716af19f1c
@ -330,7 +330,10 @@ var g_NotificationsTypes =
|
||||
"targetPlayer": notification.targetPlayer,
|
||||
"status": notification.status
|
||||
});
|
||||
|
||||
updatePlayerData();
|
||||
},
|
||||
"ceasefire-ended": function(notification, player)
|
||||
{
|
||||
updatePlayerData();
|
||||
},
|
||||
"tribute": function(notification, player)
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user