Menu

#2676 Map Editor: Units are not updated after editing native settlements

Fixed_0.11.0
closed-fixed
nobody
Editor (16)
7
2014-10-18
2014-02-23
Fenyo
No

Place a settlement somewhere on the map, then right-click on it, change the nationality of the settlement (for example: inca -> tupi) and now save it to file.
In the file you can see that the units inside the settlement are not updated to the changed nationality! (attributes not updated: "nationality", "ethnicity")

Discussion

  • Fenyo

    Fenyo - 2014-02-23

    Oh, and under some (mysterious) circumstances the settlementType attribute is also not updated of the indianSettlement tag.

     
  • Mike Pope

    Mike Pope - 2014-02-27

    Should be fixed in git.27f5622.

     
  • Fenyo

    Fenyo - 2014-03-01

    Yes, this is fixed, but there is new.

    Now i see a unit is placed outside the settlement - which is good, i was just about to suggest that - and this outside unit's nationality and ethnicity attributes are still not updated.
    And the modifier tag inside the settlement is also not updated! (for example: < modifier id="model.modifier.defence" source="model.settlement.inca" ... )

     
  • Mike Pope

    Mike Pope - 2014-03-03

    Should be all fixed in git.7dee80b. Note that units are no longer created outside the settlement, see BR#2680 for further comment on that issue. I think we are done here.

     
  • Fenyo

    Fenyo - 2014-03-04

    Note that units are no longer created outside the settlement, see BR#2680

    Yeah, but it seems it's not working yet, as i mentioned in BR#2680.

    I think we are done here.

    Almost. :)
    Now it changes the modifier tag also, but it seems the initial value (which is used when placing a settlement somewhere) is wrong.
    Open up the Map Editor, create a new empty map, and put a settlement somewhere. It will be an Inca settlement, but if you save to a file, and view the file, you can see that the modifier of that new settlement is model.settlement.village.

     
  • Fenyo

    Fenyo - 2014-03-04

    Oh, one more small thing:
    I think the Map Editor open/save dialog should show the "maps" folder initially instead of the "saves" folder.

     
  • Mike Pope

    Mike Pope - 2014-03-05

    I think the Map Editor open/save dialog should show the "maps" folder initially instead of the "saves" folder.

    No. That is not necessarily a writeable directory. Open/save is supposed to show user files. If you want one of the predefined FreeCol maps they are available under "New".

     
  • Mike Pope

    Mike Pope - 2014-03-06

    The mess with the EditSettlementDialog has been fixed, which was the cause of the source="model.settlement.village" problem. I think we are done here, again.

     
  • Fenyo

    Fenyo - 2014-03-08

    We are so close... :)

    Open Map Editor, create new empty map, put a settlement, which will be inca, put a second settlement, which will also be inca, now edit that second settlement, change it to aztec. Now save to a file. You can see in the file that the edited settlement modifier is changed to aztec, but the first settlement - which was not edited - has also changed to aztec modifier! :(

     

    Last edit: Fenyo 2014-03-08
  • Mike Pope

    Mike Pope - 2014-03-09

    You can see in the file that the edited settlement modifier is changed to aztec, but the first settlement - which was not edited - has also changed to aztec modifier!

    I can not reproduce this.

     
  • Mike Pope

    Mike Pope - 2014-03-09

    ...however I can see where the code could be racing. I have changed it to use a routine that correctly locks the modifier sets. Does git.32e2275 fix it for you?

     
  • Fenyo

    Fenyo - 2014-03-09

    Yes!
    I can't reproduce it anymore.
    It is definitely fixed.

    We can close this.

     
  • Mike Pope

    Mike Pope - 2014-03-09
    • status: open --> closed-fixed
    • Group: Current --> Fixed_trunk
     
  • Mike Pope

    Mike Pope - 2014-03-09

    OK, closing.

     
  • Mike Pope

    Mike Pope - 2014-10-18
    • Group: Fixed_trunk --> Fixed_0.11.0
     

Log in to post a comment.