Sorry, but if I don’t answer directly it’s either because I’m busy (I was on holiday for a few days) or because it’s a little complicated (or both, like in this case).
I don’t like things to be complicated, but unfortunately it turned out roughly this way:
Here we see that a map object will inherit properties from its template (when it’s a template instance), it’s tile (when it’s a tile object) and it’s type (when it has a predefined type). It’s like multiple-inheritance, just that in the case of the same property being defined multiple times, the first one wins.
For tiles it’s a little easier, since it can only inherit properties based on its type.
Warning: The properties inherited by the tile based on its type are not necessarily inherited by a tile object using that tile. This happens when the tile object overrides the type, in which case only the properties of the overridden type are inherited. The same happens to properties inherited from the tile when an object template is a tile object, and the template instance overrides the tile.
Feedback is welcome, especially in regards to potential simplifications to this system.