[wesnoth-commits] [wesnoth/wesnoth] 759974: put [resource] before other content (again); fixes...

GitHub noreply at github.com
Thu Oct 18 17:25:55 UTC 2018


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 7599746b25d250728d91b287a98d3b9d914f5963
      https://github.com/wesnoth/wesnoth/commit/7599746b25d250728d91b287a98d3b9d914f5963
  Author: gfgtdf <daniel.gfgtdf at gmail.com>
  Date:   2018-10-18 (Thu, 18 Oct 2018)

  Changed paths:
    M src/config.cpp
    M src/config.hpp
    M src/saved_game.cpp
    M src/saved_game.hpp

  Log Message:
  -----------
  put [resource] before other content (again); fixes #3345

Now content that is loaded via [load_resource] is placed to the position
where the [load_resource] was. This fixes a problem where previously one could
not use lua variables/functions created by the [resource][lua] because the
engine would put the [lua] tags from the [resource] after the [resource] from the
scenario.

This time it uses size_t indicies instad of vector iterators to prevent
possible bugs arisong from invalidating iterators when the size of the
vector changes.

This reverts commit b3e1680f886ec27c29150912bb27949d7cdd7f6e.

In the long run i think it might actually be better to allow [event] and
[lua] to have a order/priority attribute similar to lua on_event events.
Then this commit would probably not be needed anymore.



      **NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.


More information about the Commits mailing list