Closed oleg-derevenetz closed 1 month ago
Hi @oleg-derevenetz , according to https://github.com/ihhub/fheroes2/blob/829cb34ef4cea3f7f7ec5ea0920f47a07beb798f/src/fheroes2/maps/map_object_info.h#L120
we simply cannot move objects from one place to another because it breaks map format.
What we need to do is:
bool loadFromStream( StreamBase & msg, MapFormat & map )
method, after this line:
https://github.com/ihhub/fheroes2/blob/829cb34ef4cea3f7f7ec5ea0920f47a07beb798f/src/fheroes2/maps/map_format_info.cpp#L257we can call a function simply migrateV2toV3()
or something like this, and there we need to change objects for each tile and more specifically their group and their index.
Please let me know if you have any questions about this.
I suggest to put the objects at the end of the list.
I would not like to put Graveyards after Barriers and Traveller's Tents, so I left them at the beginning. However, as for "ugly" versions of Graveyards, I put them at the end to hide them in a way.
The map maker may select any Graveyard that better fits his map. :)
I have a suspicion that these crude Graveyards are just mock-ups accidentally left from some alpha versions of the game. They are frankly poorly drawn (totally not in the style of the game as a whole), not used in the original editors and do not appear in any known map. I don't really think there's a need to encourage map makers to use them. Unfortunately, they are apparently no longer so easy to remove by converting them into "proper" Graveyards, because "proper" Graveyards are larger objects than those mock-ups.
@oleg-derevenetz , thank you so much for this change!
fix #8784
Also related to #8785.
However, I am not sure about the logic of ordering in the objects list (did I put the Graveyard on the list to the correct place?).