[Commits] [wesnoth/wesnoth] 797613: Refactor some duplicate code in Lua API

GitHub noreply at github.com
Wed Aug 24 07:19:01 UTC 2016


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 797613f760d0c84afefa39b305bb512f4a574479
      https://github.com/wesnoth/wesnoth/commit/797613f760d0c84afefa39b305bb512f4a574479
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-08-20 (Sat, 20 Aug 2016)

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

  Log Message:
  -----------
  Refactor some duplicate code in Lua API


  Commit: 1521f326df7a04feae7b1f7f56ffbce736a58c02
      https://github.com/wesnoth/wesnoth/commit/1521f326df7a04feae7b1f7f56ffbce736a58c02
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-08-20 (Sat, 20 Aug 2016)

  Changed paths:
    M projectfiles/Xcode/Wesnoth.xcodeproj/project.pbxproj
    M src/ai/default/aspect_attacks.cpp
    M src/ai/lua/core.cpp
    M src/ai/lua/lua_object.hpp
    M src/scripting/application_lua_kernel.cpp
    M src/scripting/game_lua_kernel.cpp
    R src/scripting/lua_api.cpp
    R src/scripting/lua_api.hpp
    M src/scripting/lua_common.cpp
    M src/scripting/lua_common.hpp
    M src/scripting/lua_fileops.cpp
    M src/scripting/lua_formula_bridge.cpp
    M src/scripting/lua_gui2.cpp
    M src/scripting/lua_pathfind_cost_calculator.hpp
    A src/scripting/lua_unit.cpp
    A src/scripting/lua_unit.hpp
    M src/scripting/mapgen_lua_kernel.cpp

  Log Message:
  -----------
  Move Lua unit wrapper to own file


  Commit: 4dd99b881f3de9a31af86214eb9d1d23a675c594
      https://github.com/wesnoth/wesnoth/commit/4dd99b881f3de9a31af86214eb9d1d23a675c594
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-08-20 (Sat, 20 Aug 2016)

  Changed paths:
    M src/scripting/game_lua_kernel.cpp
    M src/scripting/lua_common.cpp
    M src/scripting/lua_common.hpp
    M src/scripting/lua_formula_bridge.cpp
    M src/scripting/lua_kernel_base.cpp
    M src/scripting/lua_race.cpp
    M src/scripting/lua_rng.cpp
    M src/scripting/lua_unit.cpp

  Log Message:
  -----------
  Implement Lua placement new


  Commit: 6d38c77aab3ed3e52e158b548e2e1a826c7ce8be
      https://github.com/wesnoth/wesnoth/commit/6d38c77aab3ed3e52e158b548e2e1a826c7ce8be
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-08-20 (Sat, 20 Aug 2016)

  Changed paths:
    M src/ai/default/aspect_attacks.cpp
    M src/scripting/game_lua_kernel.cpp
    M src/scripting/lua_formula_bridge.cpp
    M src/scripting/lua_unit.cpp
    M src/scripting/lua_unit.hpp

  Log Message:
  -----------
  Extract Lua unit push code into a function


  Commit: 3804027d100fc02328a6829997792b8ef0587303
      https://github.com/wesnoth/wesnoth/commit/3804027d100fc02328a6829997792b8ef0587303
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-08-20 (Sat, 20 Aug 2016)

  Changed paths:
    M src/scripting/game_lua_kernel.cpp
    M src/scripting/game_lua_kernel.hpp
    M src/scripting/lua_unit.cpp
    M src/scripting/lua_unit.hpp

  Log Message:
  -----------
  Avoid luaW_hasmetatable when checking for units


  Commit: 4dcba0c3cdec6cb535206f8c23f0beb866db737f
      https://github.com/wesnoth/wesnoth/commit/4dcba0c3cdec6cb535206f8c23f0beb866db737f
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-08-20 (Sat, 20 Aug 2016)

  Changed paths:
    M src/scripting/game_lua_kernel.cpp

  Log Message:
  -----------
  Fix bug in wesnoth.put_unit


  Commit: fa0e63e3a3462dd3dabcdff5c2aecbc1fa213dbc
      https://github.com/wesnoth/wesnoth/commit/fa0e63e3a3462dd3dabcdff5c2aecbc1fa213dbc
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-08-20 (Sat, 20 Aug 2016)

  Changed paths:
    M src/scripting/game_lua_kernel.cpp
    M src/scripting/lua_unit.cpp
    M src/scripting/lua_unit.hpp

  Log Message:
  -----------
  Move unit metatable stuff into lua_unit file


  Commit: 22a39d0bb4d9f1b756cfdc43e7ff63565b580c04
      https://github.com/wesnoth/wesnoth/commit/22a39d0bb4d9f1b756cfdc43e7ff63565b580c04
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-08-20 (Sat, 20 Aug 2016)

  Changed paths:
    M projectfiles/Xcode/Wesnoth.xcodeproj/project.pbxproj
    M src/scripting/game_lua_kernel.cpp
    M src/scripting/lua_unit.cpp
    A src/scripting/lua_unit_attacks.cpp
    A src/scripting/lua_unit_attacks.hpp
    M src/scripting/lua_unit_type.cpp

  Log Message:
  -----------
  Move Lua unit attacks metatable to own file


  Commit: 2dd19b7d15a5f2997907c0b48649b28d0910b46c
      https://github.com/wesnoth/wesnoth/commit/2dd19b7d15a5f2997907c0b48649b28d0910b46c
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-08-20 (Sat, 20 Aug 2016)

  Changed paths:
    M src/scripting/lua_unit_attacks.cpp

  Log Message:
  -----------
  Fix Lua attacks metatable not working for attacks obtained from unit_type


  Commit: bb43fa29c46b41e52c3169f72a2dcaad94618778
      https://github.com/wesnoth/wesnoth/commit/bb43fa29c46b41e52c3169f72a2dcaad94618778
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-08-20 (Sat, 20 Aug 2016)

  Changed paths:
    M src/scripting/game_lua_kernel.cpp

  Log Message:
  -----------
  Use luaW_pushunit when getting lists of units


  Commit: 30b7ab8b2dc7a3a7d19372216307255327ce5b19
      https://github.com/wesnoth/wesnoth/commit/30b7ab8b2dc7a3a7d19372216307255327ce5b19
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-08-20 (Sat, 20 Aug 2016)

  Changed paths:
    M projectfiles/Xcode/Wesnoth.xcodeproj/project.pbxproj
    M src/ai/contexts.cpp
    M src/ai/lua/core.cpp
    M src/ai/lua/lua_object.cpp
    M src/config.cpp
    M src/game_initialization/mp_options.cpp
    M src/map/label.cpp
    M src/map/label.hpp
    M src/pathfind/pathfind.cpp
    M src/play_controller.cpp
    M src/play_controller.hpp
    M src/scripting/application_lua_kernel.cpp
    M src/scripting/game_lua_kernel.cpp
    M src/scripting/lua_common.cpp
    M src/scripting/lua_common.hpp
    M src/scripting/lua_formula_bridge.cpp
    M src/scripting/lua_gui2.cpp
    M src/scripting/lua_kernel_base.cpp
    R src/scripting/lua_types.cpp
    R src/scripting/lua_types.hpp
    M src/scripting/lua_unit.cpp
    M src/scripting/lua_unit.hpp
    M src/scripting/lua_unit_attacks.cpp
    M src/units/unit.cpp
    M src/units/unit.hpp

  Log Message:
  -----------
  Reduce use of const_cast


  Commit: 39477b40a727ed4aa4d717475331553e7176f7e1
      https://github.com/wesnoth/wesnoth/commit/39477b40a727ed4aa4d717475331553e7176f7e1
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-08-22 (Mon, 22 Aug 2016)

  Changed paths:
    M src/ai/lua/core.cpp
    M src/scripting/lua_common.cpp
    M src/scripting/lua_common.hpp
    M src/scripting/lua_formula_bridge.cpp
    M src/scripting/lua_unit.cpp
    M src/scripting/lua_unit_attacks.cpp

  Log Message:
  -----------
  Fix Lua metatables by using lauxlib to manage them


  Commit: e821e508c3b9504564b769bda649433833fa13ae
      https://github.com/wesnoth/wesnoth/commit/e821e508c3b9504564b769bda649433833fa13ae
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2016-08-24 (Wed, 24 Aug 2016)

  Changed paths:
    M projectfiles/Xcode/Wesnoth.xcodeproj/project.pbxproj
    M src/ai/contexts.cpp
    M src/ai/default/aspect_attacks.cpp
    M src/ai/lua/core.cpp
    M src/ai/lua/lua_object.cpp
    M src/ai/lua/lua_object.hpp
    M src/config.cpp
    M src/game_initialization/mp_options.cpp
    M src/map/label.cpp
    M src/map/label.hpp
    M src/pathfind/pathfind.cpp
    M src/play_controller.cpp
    M src/play_controller.hpp
    M src/scripting/application_lua_kernel.cpp
    M src/scripting/game_lua_kernel.cpp
    M src/scripting/game_lua_kernel.hpp
    R src/scripting/lua_api.cpp
    R src/scripting/lua_api.hpp
    M src/scripting/lua_common.cpp
    M src/scripting/lua_common.hpp
    M src/scripting/lua_fileops.cpp
    M src/scripting/lua_formula_bridge.cpp
    M src/scripting/lua_gui2.cpp
    M src/scripting/lua_kernel_base.cpp
    M src/scripting/lua_pathfind_cost_calculator.hpp
    M src/scripting/lua_race.cpp
    M src/scripting/lua_rng.cpp
    R src/scripting/lua_types.cpp
    R src/scripting/lua_types.hpp
    A src/scripting/lua_unit.cpp
    A src/scripting/lua_unit.hpp
    A src/scripting/lua_unit_attacks.cpp
    A src/scripting/lua_unit_attacks.hpp
    M src/scripting/lua_unit_type.cpp
    M src/scripting/mapgen_lua_kernel.cpp
    M src/units/unit.cpp
    M src/units/unit.hpp

  Log Message:
  -----------
  Merge pull request #744 from lua_refactor

Refactor some Lua stuff and reduce const_cast usage

Conflicts:
	src/scripting/game_lua_kernel.cpp
	src/scripting/lua_unit.cpp


Compare: https://github.com/wesnoth/wesnoth/compare/88d0619d5806...e821e508c3b9


More information about the Commits mailing list