Use JS classes for Template and Entity

`Template` and `Entity` used a costum form of inheritance.

Refs: #6285
This commit is contained in:
phosit
2026-07-14 11:50:18 +02:00
parent f9de339f85
commit 327e70ea82
2 changed files with 251 additions and 273 deletions
@@ -1,20 +0,0 @@
/**
* Provides a nicer syntax for defining classes,
* with support for OO-style inheritance.
*/
export function Class(data)
{
let ctor;
if (data._init)
ctor = data._init;
else
ctor = function() { };
if (data._super)
ctor.prototype = { "__proto__": data._super.prototype };
for (const key in data)
ctor.prototype[key] = data[key];
return ctor;
}
File diff suppressed because it is too large Load Diff