[Commits] [wesnoth/wesnoth] 072ddc: Reimplement wesnoth.require function in Lua

GitHub noreply at github.com
Wed May 3 06:47:03 UTC 2017


  Branch: refs/heads/lua_require
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 072ddc4dc121f7bb0b264f1c8f4d1c506b62dd90
      https://github.com/wesnoth/wesnoth/commit/072ddc4dc121f7bb0b264f1c8f4d1c506b62dd90
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2017-05-03 (Wed, 03 May 2017)

  Changed paths:
    A data/lua/package.lua
    M src/scripting/lua_kernel_base.cpp

  Log Message:
  -----------
  Reimplement wesnoth.require function in Lua


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

  Changed paths:
    M data/lua/package.lua

  Log Message:
  -----------
  Allow shorter module name specification in wesnoth.require

Basically, you can now omit the "lua/" prefix and the ".lua" suffix.
If necessary, they will automatically be applied for you.


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

  Changed paths:
    M data/ai/lua/ai_helper.lua
    M data/ai/lua/battle_calcs.lua
    M data/ai/lua/ca_high_xp_attack.lua
    M data/ai/lua/generic_recruit_engine.lua
    M data/ai/lua/generic_rush_engine.lua
    M data/ai/lua/retreat.lua
    M data/ai/micro_ais/cas/ca_assassin_move.lua
    M data/ai/micro_ais/cas/ca_big_animals.lua
    M data/ai/micro_ais/cas/ca_bottleneck_attack.lua
    M data/ai/micro_ais/cas/ca_bottleneck_move.lua
    M data/ai/micro_ais/cas/ca_coward.lua
    M data/ai/micro_ais/cas/ca_fast_attack_utils.lua
    M data/ai/micro_ais/cas/ca_fast_combat.lua
    M data/ai/micro_ais/cas/ca_fast_combat_leader.lua
    M data/ai/micro_ais/cas/ca_fast_move.lua
    M data/ai/micro_ais/cas/ca_forest_animals_move.lua
    M data/ai/micro_ais/cas/ca_forest_animals_new_rabbit.lua
    M data/ai/micro_ais/cas/ca_forest_animals_tusker_attack.lua
    M data/ai/micro_ais/cas/ca_forest_animals_tusklet_move.lua
    M data/ai/micro_ais/cas/ca_goto.lua
    M data/ai/micro_ais/cas/ca_hang_out.lua
    M data/ai/micro_ais/cas/ca_healer_initialize.lua
    M data/ai/micro_ais/cas/ca_healer_may_attack.lua
    M data/ai/micro_ais/cas/ca_healer_move.lua
    M data/ai/micro_ais/cas/ca_herding_attack_close_enemy.lua
    M data/ai/micro_ais/cas/ca_herding_dog_move.lua
    M data/ai/micro_ais/cas/ca_herding_dog_stopmove.lua
    M data/ai/micro_ais/cas/ca_herding_f_herding_area.lua
    M data/ai/micro_ais/cas/ca_herding_herd_sheep.lua
    M data/ai/micro_ais/cas/ca_herding_sheep_move.lua
    M data/ai/micro_ais/cas/ca_herding_sheep_runs_dog.lua
    M data/ai/micro_ais/cas/ca_herding_sheep_runs_enemy.lua
    M data/ai/micro_ais/cas/ca_hunter.lua
    M data/ai/micro_ais/cas/ca_lurkers.lua
    M data/ai/micro_ais/cas/ca_messenger_attack.lua
    M data/ai/micro_ais/cas/ca_messenger_escort_move.lua
    M data/ai/micro_ais/cas/ca_messenger_f_next_waypoint.lua
    M data/ai/micro_ais/cas/ca_messenger_move.lua
    M data/ai/micro_ais/cas/ca_patrol.lua
    M data/ai/micro_ais/cas/ca_protect_unit_attack.lua
    M data/ai/micro_ais/cas/ca_protect_unit_finish.lua
    M data/ai/micro_ais/cas/ca_protect_unit_move.lua
    M data/ai/micro_ais/cas/ca_recruit_random.lua
    M data/ai/micro_ais/cas/ca_return_guardian.lua
    M data/ai/micro_ais/cas/ca_simple_attack.lua
    M data/ai/micro_ais/cas/ca_stationed_guardian.lua
    M data/ai/micro_ais/cas/ca_swarm_move.lua
    M data/ai/micro_ais/cas/ca_swarm_scatter.lua
    M data/ai/micro_ais/cas/ca_wolves_move.lua
    M data/ai/micro_ais/cas/ca_wolves_multipacks_attack.lua
    M data/ai/micro_ais/cas/ca_wolves_multipacks_functions.lua
    M data/ai/micro_ais/cas/ca_wolves_multipacks_wander.lua
    M data/ai/micro_ais/cas/ca_wolves_wander.lua
    M data/ai/micro_ais/cas/ca_zone_guardian.lua
    M data/ai/micro_ais/engines/priority_target_engine.lua
    M data/ai/micro_ais/mai-defs/animals.lua
    M data/ai/micro_ais/mai-defs/escort.lua
    M data/ai/micro_ais/mai-defs/fast.lua
    M data/ai/micro_ais/mai-defs/guardian.lua
    M data/ai/micro_ais/mai-defs/patrol.lua
    M data/ai/micro_ais/mai-defs/protect.lua
    M data/ai/micro_ais/mai-defs/recruiting.lua
    M data/ai/micro_ais/micro_ai_helper.lua
    M data/ai/micro_ais/micro_ai_self_data.lua
    M data/ai/micro_ais/micro_ai_unit_variables.lua
    M data/ai/micro_ais/micro_ai_wml_tag.lua
    M data/campaigns/Eastern_Invasion/ai/ca_ogres_flee.lua
    M data/campaigns/Eastern_Invasion/lua/bandits.lua
    M data/campaigns/Heir_To_The_Throne/scenarios/17_Scepter_of_Fire.cfg
    M data/campaigns/Legend_of_Wesmere/lua/wml_tags.lua
    M data/campaigns/Northern_Rebirth/lua/respawn_utils.lua
    M data/campaigns/Sceptre_of_Fire/scenarios/4_Gathering_Materials.cfg
    M data/campaigns/Son_Of_The_Black_Eye/ai/ca_transport_S6.lua
    M data/campaigns/The_Hammer_of_Thursagan/lua/spawns.lua
    M data/campaigns/tutorial/lua/character_selection.lua
    M data/lua/backwards-compatibility.lua
    M data/lua/cave_map_generator.lua
    M data/lua/feeding.lua
    M data/lua/mapgen_helper.lua
    M data/lua/on_event.lua
    M data/lua/wml-flow.lua
    M data/lua/wml-tags.lua
    M data/lua/wml-utils.lua
    M data/lua/wml/animate_unit.lua
    M data/lua/wml/endlevel.lua
    M data/lua/wml/find_path.lua
    M data/lua/wml/harm_unit.lua
    M data/lua/wml/items.lua
    M data/lua/wml/message.lua
    M data/lua/wml/modify_unit.lua
    M data/lua/wml/object.lua
    M data/lua/wml/objectives.lua
    M data/lua/wml/random_placement.lua
    M data/multiplayer/eras.lua
    M data/multiplayer/scenarios/2p_Dark_Forecast.lua
    M data/scenario-test.cfg
    M data/test/scenarios/ai/_main.cfg
    M data/test/scenarios/interrupts.cfg

  Log Message:
  -----------
  Shorten requires where possible


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

  Changed paths:
    M src/scripting/lua_fileops.cpp

  Log Message:
  -----------
  Minor reformatting and comment fixup


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

  Changed paths:
    M src/scripting/lua_fileops.cpp

  Log Message:
  -----------
  Add flag to wesnoth.have_file to require it to be a real file, not a directory


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

  Changed paths:
    M src/scripting/lua_fileops.cpp

  Log Message:
  -----------
  Allow wesnoth.read_file to list a directory contents


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

  Changed paths:
    M data/lua/package.lua
    M data/lua/wml-tags.lua

  Log Message:
  -----------
  Allow wesnoth.require to load a whole directory in one call
- Use this feature when loading the WML tags from data/lua/wml


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

  Changed paths:
    M data/lua/wml-tags.lua
    A data/lua/wml/heal_unit.lua
    A data/lua/wml/kill.lua
    A data/lua/wml/modify_ai.lua
    A data/lua/wml/modify_side.lua
    A data/lua/wml/move_unit.lua
    A data/lua/wml/role.lua
    A data/lua/wml/set_variable.lua
    A data/lua/wml/test_condition.lua

  Log Message:
  -----------
  Split several of the larger WML tags into their own file


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

  Changed paths:
    R data/ai/micro_ais/micro_ai_wml_tag.lua
    M data/core/_main.cfg
    A data/lua/wml/micro_ai.lua

  Log Message:
  -----------
  Move [micro_ai] implementation to data/lua/wml


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

  Changed paths:
    M data/lua/wml/micro_ai.lua

  Log Message:
  -----------
  Load all MicroAI definitions in a single line


Compare: https://github.com/wesnoth/wesnoth/compare/6459c2f7cd3f...badc2d56d0cd


More information about the Commits mailing list