This prevents a crash when an incompatible engine function is used as an
engine callback function.
Unfortunately, this breaks any scripts that have wrong type information in
engine callbacks and only worked because those were ignored.
* all non-diggable materials are now in front of diggable materials
* except: firestone and coal are still in front of rock
At least this change makes it necessary to test every scenario we have if there are any problems with the landscape
The engine has a few more usages of the operators, but they don't look
prone to overflowing. The other operators in Script already used SetInt,
which always truncates to 32 bit.
The interaction with IsContainer objects is still flawed in a way: when a lorry is inside a (IsContainer-)hut, you can take the lorry into your hands. Since we don't have that possibility in the normal game, I leave it unchanged for now.
However, it is now possible to add a Chest (or a cupboard!) into a WoodenCabin and then store stuff inside of it.
Since mesh instances can now be attached to attached definitions, attached
definitions need to denumerate pointers recursively to make sure that the
reference to the mesh instance is restored correctly.
..by putting the text into another subwindow. Might be good to "fix" (it's intended but possibly not wise) that in the engine, but not right now before the release, because it could introduce new bugs.
I am not sure why the 'isMainWindow' was there. It wasn't there in 7319f7b3cc and got introduced in the major rework in 049088be78 - I guess it was just an oversight that was not noticed because usually the UI windows have the text or other things that need to scroll on a deeper level.
Anyway, checking whether the window is a script-root window does not make any sense as far as I can see now.
I must be mad. This script failed a lot of times. I had to add those brackets. Even then, the first run failed, the buildings were still ownerless. What is this sorcery.