[Commits] [wesnoth/wesnoth] 87f750: Reorganize loading of initial Lua packages

GitHub noreply at github.com
Fri May 5 20:04:42 UTC 2017


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 87f750e3df0e1868c1ca23f7cc248ff6dea6ca42
      https://github.com/wesnoth/wesnoth/commit/87f750e3df0e1868c1ca23f7cc248ff6dea6ca42
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2017-05-05 (Fri, 05 May 2017)

  Changed paths:
    M src/scripting/lua_kernel_base.cpp

  Log Message:
  -----------
  Reorganize loading of initial Lua packages
- Now uses the internal (old) require function to load package.lua,
  and the external (new) require function to load other packages.


  Commit: b045760cd582619e1752ff71523cecd14986e318
      https://github.com/wesnoth/wesnoth/commit/b045760cd582619e1752ff71523cecd14986e318
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2017-05-05 (Fri, 05 May 2017)

  Changed paths:
    M data/lua/package.lua

  Log Message:
  -----------
  Prevent people from altering the special "empty package" value,
which is stored in wesnoth.package to prevent reloading loaded
packages just because they didn't return anything.

There's a special exception for accessing __tostring because ilua needs it.


  Commit: 1322e5e405c1f2064fe3f773112321135b8beebd
      https://github.com/wesnoth/wesnoth/commit/1322e5e405c1f2064fe3f773112321135b8beebd
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2017-05-05 (Fri, 05 May 2017)

  Changed paths:
    M src/scripting/lua_fileops.cpp

  Log Message:
  -----------
  Allow wesnoth.have_file to resolve relative file paths


  Commit: 72dd4496569460a7a29ceada2534597b46879c75
      https://github.com/wesnoth/wesnoth/commit/72dd4496569460a7a29ceada2534597b46879c75
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2017-05-05 (Fri, 05 May 2017)

  Changed paths:
    M src/scripting/lua_kernel_base.cpp

  Log Message:
  -----------
  Expose wesnoth.log to non-game contexts

It does have fewer features though - no "wml" logger, and
no third argument. But this shouldn't be surprising.


  Commit: b6ddbd8df269106fdfc3ed0eb61b99097e290058
      https://github.com/wesnoth/wesnoth/commit/b6ddbd8df269106fdfc3ed0eb61b99097e290058
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2017-05-05 (Fri, 05 May 2017)

  Changed paths:
    M data/lua/package.lua

  Log Message:
  -----------
  wesnoth.require: Only log error and return nil on failure


  Commit: cce24bfcd981c0ed02cd43f76f6aa0f274893120
      https://github.com/wesnoth/wesnoth/commit/cce24bfcd981c0ed02cd43f76f6aa0f274893120
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2017-05-05 (Fri, 05 May 2017)

  Changed paths:
    M src/scripting/lua_fileops.cpp

  Log Message:
  -----------
  Fix wesnoth file functions not working with relative paths


  Commit: 3bbb83357e5a44fcffc399c93690d36966c95138
      https://github.com/wesnoth/wesnoth/commit/3bbb83357e5a44fcffc399c93690d36966c95138
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2017-05-05 (Fri, 05 May 2017)

  Changed paths:
    M src/scripting/game_lua_kernel.cpp
    M src/scripting/lua_kernel_base.cpp

  Log Message:
  -----------
  Move wesnoth.get_time_stamp and wesnoth.get_image_size to lua_kernel_base


Compare: https://github.com/wesnoth/wesnoth/compare/244fe5784239...3bbb83357e5a


More information about the Commits mailing list