Mineclonia/mods
E 842cc6d1e4 hud/mcl_formspec: add formspec V2 conversion utilities
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.
2021-05-02 00:54:52 -04:00
..
CORE Merge branch 'master' into mcl_autogroup 2021-04-29 21:24:32 +00:00
ENTITIES Merge branch 'master' into mcl_autogroup 2021-04-29 21:24:32 +00:00
ENVIRONMENT replace pairs() by ipairs() (3) 2021-02-18 15:26:09 +00:00
HELP Translate French - Small fixes 2021-02-16 22:30:26 +01:00
HUD hud/mcl_formspec: add formspec V2 conversion utilities 2021-05-02 00:54:52 -04:00
ITEMS items/mcl_banners: make previews items compatible with side preview 2021-05-02 00:42:12 -04:00
MAPGEN mapgen/mcl_mapgen_core: base mushrooms and nether decorations off block seed 2021-04-25 23:17:27 -04:00
MISC Remove shulker shell and emerald to gold temporary crafting recipes 2021-02-16 09:57:38 +01:00
PLAYER Merge branch 'master' into master 2021-02-28 14:04:10 +00:00