Fix aura tooltips on panel entities.
Removed from the GUI interface in d8ed8b1462
, but its uses weren't
checked (or ignored).
(https://code.wildfiregames.com/source/0ad/browse/ps/trunk/binaries/data/mods/public/gui/session/session.js;20965$998)
Reported by @Langbart
Based on a patch by: @Langbart
Differential revision: https://code.wildfiregames.com/D4648
Fixes #6387
This was SVN commit r26896.
This commit is contained in:
parent
f3d8f1e797
commit
f03f19cfc5
@ -33,7 +33,9 @@ Auras.prototype.GetDescriptions = function()
|
||||
{
|
||||
let aura = AuraTemplates.Get(auraID);
|
||||
ret[auraID] = {
|
||||
"name": aura.auraName,
|
||||
"name": {
|
||||
"generic": aura.auraName
|
||||
},
|
||||
"description": aura.auraDescription || null,
|
||||
"radius": this.GetRange(auraID) || null
|
||||
};
|
||||
|
@ -250,22 +250,24 @@ GuiInterface.prototype.AddMiragedEntity = function(player, entity, mirage)
|
||||
*/
|
||||
GuiInterface.prototype.GetEntityState = function(player, ent)
|
||||
{
|
||||
let cmpTemplateManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_TemplateManager);
|
||||
|
||||
if (!ent)
|
||||
return null;
|
||||
|
||||
// All units must have a template; if not then it's a nonexistent entity id.
|
||||
let template = cmpTemplateManager.GetCurrentTemplateName(ent);
|
||||
const template = Engine.QueryInterface(SYSTEM_ENTITY, IID_TemplateManager).GetCurrentTemplateName(ent);
|
||||
if (!template)
|
||||
return null;
|
||||
|
||||
let ret = {
|
||||
const ret = {
|
||||
"id": ent,
|
||||
"player": INVALID_PLAYER,
|
||||
"template": template
|
||||
};
|
||||
|
||||
const cmpAuras = Engine.QueryInterface(ent, IID_Auras);
|
||||
if (cmpAuras)
|
||||
ret.auras = cmpAuras.GetDescriptions();
|
||||
|
||||
let cmpMirage = Engine.QueryInterface(ent, IID_Mirage);
|
||||
if (cmpMirage)
|
||||
ret.mirage = true;
|
||||
|
Loading…
Reference in New Issue
Block a user