bugFreeciv - Bugs: bug #21345, have_huts never set => scenario...

 
 
Show feedback again

bug #21345: have_huts never set => scenario load/save cycles keep adding more huts

Submitted by:  Jacob Nevins <jtn>
Submitted on:  Fri 13 Dec 2013 07:48:56 PM UTC  
 
Category: generalSeverity: 3 - Normal
Priority: 5 - NormalStatus: Fixed
Assigned to: Marko Lindqvist <cazfi>Open/Closed: Closed
Release: 2.4.1Operating System: Any
Planned Release: 2.5.2, 2.6.0, 3.0.0

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Sat 19 Sep 2015 06:47:19 PM UTC, SVN revision 29931:

Do not load extras with cause EC_HUT from the savegame if have_huts is FALSE.
Always save have_huts as TRUE on regular savegames.

See bug #21345

(Browse SVN revision 29931)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sat 19 Sep 2015 06:47:11 PM UTC, SVN revision 29930:

Do not load extras with cause EC_HUT from the savegame if have_huts is FALSE.
Always save have_huts as TRUE on regular savegames.

See bug #21345

(Browse SVN revision 29930)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sun 13 Sep 2015 02:48:11 PM UTC, comment #7:

Full S2_6/TRUNK implementation

- Do not load extras of cause EC_HUT if have_huts is FALSE
- Always save have_huts as TRUE on regular savegames

Note that we don't know what has caused an extra to be on the map. If extra has several causes of which EC_HUT is just one, and some other than EC_HUT has caused it to appear, it still won't get loaded.

(file #25130, file #25131)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Wed 09 Sep 2015 06:43:26 PM UTC, SVN revision 29841:

Do not load huts from the savegame if have_huts is FALSE.
Always save have_huts as TRUE on regular savegames.

See bug #21345

(Browse SVN revision 29841)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Wed 09 Sep 2015 06:42:52 PM UTC, SVN revision 29840:

Do not load huts from the pre-2.6 savegame if have_huts is FALSE.

See bug #21345

(Browse SVN revision 29840)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Wed 09 Sep 2015 06:42:35 PM UTC, SVN revision 29839:

Do not load huts from the pre-2.6 savegame if have_huts is FALSE.

See bug #21345

(Browse SVN revision 29839)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Mon 07 Sep 2015 03:54:14 AM UTC, comment #3:

> Loading old (2.5 or earlier) savegames with "Hut" special
> should obviously work like in S2_5


Patch attached for that part.

I've set ticket status to "Ready For Test" for this step, but won't close it when patches committed.

(file #25078)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Mon 07 Sep 2015 03:40:58 AM UTC, comment #2:

Here's a fix for S2_5:
- Do not load huts if have_huts is FALSE
- Always save have_huts as TRUE on regular savegames

It's still unclear what to do with S2_6 & TRUNK. Loading old (2.5 or earlier) savegames with "Hut" special should obviously work like in S2_5, but what to do with new savegame format?

(file #25077)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Fri 13 Dec 2013 07:49:46 PM UTC, comment #1:

(Some but not all of the supplied scenarios do have have_huts set.)

Jacob Nevins <jtn>
Project Administrator
Fri 13 Dec 2013 07:48:56 PM UTC, original submission:

There's a variable map.server.have_huts that, if set, prevents generating huts (make_huts()) when starting a game.

Unlike the equivalent have_resources / add_resources(), the function that adds huts does not set the variable. In fact the only way I can see that it gets set is if a savegame has "map.have_huts" set or absent (and it's always saved).

Thus, if one creates a scenario by starting a game with settings that generate huts, and does "Save Scenario" (saving huts on the map), then when the scenario is loaded to play then more huts will be generated; and if you do repeated load / scenario-save cycles as part of developing a scenario, you'll keep getting more huts.

Jacob Nevins <jtn>
Project Administrator

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #25130:  HaveHuts.patch added by cazfi (1kB - text/x-diff)
file #25131:  HaveHuts-S2_6.patch added by cazfi (892B - text/x-diff)
file #25078:  HaveHuts.patch added by cazfi (842B - text/x-diff)
file #25077:  HaveHuts-S2_5.patch added by cazfi (1kB - text/x-diff)

 

Depends on the following items: None found

Digest:
   task dependencies, patch dependencies.

 

Carbon-Copy List
  • -unavailable- added by cazfi (Updated the item)
  • -unavailable- added by jtn (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Error: not logged in

     

     

    Follow 12 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 19 Sep 2015 06:47:37 PM UTCcazfiStatusReady For Test=>Fixed
      Assigned toNone=>cazfi
      Open/ClosedOpen=>Closed
    Sun 13 Sep 2015 02:48:11 PM UTCcazfiAttached File-=>Added HaveHuts.patch, #25130
      Attached File-=>Added HaveHuts-S2_6.patch, #25131
      StatusNone=>Ready For Test
    Wed 09 Sep 2015 06:43:35 PM UTCcazfiStatusReady For Test=>None
    Mon 07 Sep 2015 03:54:14 AM UTCcazfiAttached File-=>Added HaveHuts.patch, #25078
      StatusNone=>Ready For Test
    Mon 07 Sep 2015 03:40:58 AM UTCcazfiAttached File-=>Added HaveHuts-S2_5.patch, #25077
      CategoryNone=>general
      Planned Release=>2.5.2, 2.6.0, 3.0.0
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup