When a save is loaded/unloaded, the script at raw/onLoad.init or raw/onUnload.init is run. They use the same format as dfhack.init.
Maps.ensureTileBlock: fixed temperature issues, and properly added blocks to the world.map.map_blocks vector to prevent weird glitches.