#define _vtbl NULL
CLASS(Object, );
METHOD(Object, describe, string(entity this))
- string Object_describe(entity) { return string_null; }
+ string Object_describe(entity this) { return _("No description"); }
METHOD(Object, display, void(entity this, void(string name, string icon) returns))
- void Object_display(entity, void(string, string)) { }
+ void Object_display(entity this, void(string name, string icon) returns) { returns(sprintf("entity %i", this), "nopreview_menuskin"); }
ENDCLASS(Object)
#undef spawn_static
#undef spawn_1
if (strstrofs(sprintf("entity %i", e), DebugSource_activeFilter, 0) < 0) continue;
if (idx++ == i) break;
}
- if (returns) {
- if (e.display) e.display(e, returns);
- else returns(sprintf("entity %i", e), "");
- }
+ if (returns) e.display(e, returns);
return e;
}
METHOD(DebugSource, reload, int(string))
entity desc = this.descriptionPane;
entity entries = this.entryList;
entity e = entries.source.getEntry(entries.selectedItem, func_null);
- string s = e.describe ? e.describe(e) : _("No description");
+ string s = e.describe(e);
if (cvar("developer")) { s = sprintf("entity %i\n%s", e, s); }
desc.setDescription(desc, s);
}