[Commits] [wesnoth/wesnoth] 520927: Lua: add variables metatable

GitHub noreply at github.com
Thu Jan 18 22:53:08 UTC 2018


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 5209271db30c1fa83422476e182c13098f8bd4aa
      https://github.com/wesnoth/wesnoth/commit/5209271db30c1fa83422476e182c13098f8bd4aa
  Author: V N <n1m5spm at yandex.com>
  Date:   2018-01-19 (Fri, 19 Jan 2018)

  Changed paths:
    M data/lua/core.lua

  Log Message:
  -----------
  Lua: add variables metatable

The implementation differs from already-existing
wml.variable.proxy in that it does not try to proxy table sub-fields,
and is fast & simple.

Example usage:
wml.variables.test = 123
print(wml.variables.test)





More information about the Commits mailing list