Fix declaring global variables from a map script. Fix #507.

Map scripts have a special environment with an __index function that allows to
get map entities easily. But when you set an environment, you no longer
have the usual __newindex that defines a global value.
Merge branch 'v1.2'
Allow to call map methods even when the map is not running.
Editor: fix tiles created on invisible layer. Fix #508.
Merge pull request #509 from Maxs1789/issue508

Editor: fix tiles created on invisible layer. Fix #508.
Editor: fix tiles created on invisible layer. Fix #508.
Update changelog with latest editor bugfix.
Merge branch 'v1.2'
Editor: fix npc painted a non existring direction. Fix #510.
Merge pull request #512 from Maxs1789/issue510

Editor: fix npc painted a non existring direction. Fix #510.
Editor: fix npc painted a non existring direction. Fix #510.
Update ChangeLog.
Merge branch 'v1.2'