← Back to team overview

widelands-dev team mailing list archive

Re: [Merge] lp:~widelands-dev/widelands/bug-1734199 into lp:widelands

 

After a game has been started, using the indexes is good, because it's more efficient. During game startup, those indexes are automatically generated from names. Configuration looks like this:

    tribes:new_militarysite_type {
       name = "atlanteans_guardhall",
       descname = pgettext("atlanteans_building", "Guardhall"),

       ....
    }

This is loaded before the savegame is loaded.

So, the configurations doesn't know anything about indexes at all. Configuring it like this instead:


    tribes:new_militarysite_type {
       id = 42,
       descname = pgettext("atlanteans_building", "Guardhall"),

       ....
    }

Would not be manageable for humans.

So, whenever we add a new building type, or change the order in which we load them, using indexes during saveloading will break.

@bunnybot merge

-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1734199/+merge/334369
Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1734199.


References