Formspecs come in different versions. While maintaining the same basic
syntax, version 1->2 changed (among other things) how coordinates work
by eliminating some (previously) built-in spacing and padding. This
commit adds a number of utility functions that can be used to upgrade
a formspec in-place.
- `size2r` returns a string with the provided w,h coordinates converted
for use with `size[]` in formspec versions 2+
- `i2r` converts a single coordinate from the V1 coordinates system to
the V2+ "Real" coordinates
- `xy2r` returns a string suitable for use with other elements that
accept a coordinate pair. It is a simple wrapper for `i2r`.
The formulas used reflect those specified by the Minetest Lua API docs.
In 0.60.0, the inventory rendering of nodes was changed, so images were removed. This caused missing image errors with *existing* node formspecs, however, so empty dummy images are added back.