Inheritance in Graal doesn't work like that, you're not supposed to overwrite functions or variables. You're just supposed to extend the functionality of the supertype without changing it or complete its functionality if the supertype is abstract. If you observe the object type structure on the Wiki you'd notice that functions and variables are never overwritten by subtypes.
An example of this is the
TXMudContainer type on Aeon. Its abstract and gives all subtypes (most especially
TXMudPlayer) the ability to hold items. This allows for easy moving of item objects between players, npcs, and containers in the world like barrels and crates.
One of the tools I find invaluable for modularity and object types is this function, triggerAll():
PHP Code:
public function triggerAll(eventname, param0, param1, param2, param3, param4, param5, param6, param7, param8, param9) {
this.scriptlogmissingfunctions = false; // for no RC errors.
temp.i = 0;
temp.list = this.joinedclasses;
list.remove("util_triggerall"); // Class with this script
makevar(eventname @ "_base")(param0, param1, param2, param3, param4, param5, param6, param7, param8, param9);
for (i = 0; i < list.size(); i ++) {
makevar(eventname @ "_" @ list[i])(param0, param1, param2, param3, param4, param5, param6, param7, param8, param9);
}
}
I don't find the
classname::functionname() syntax too reliable.