patchFreeciv - Patches: patch #3869, Place partisans based on nativity

 
 
Show feedback again

patch #3869: Place partisans based on nativity

Submitted by:  Emmet Hikory <persia>
Submitted on:  Mon 22 Apr 2013 12:28:49 AM UTC  
 
Category: generalPriority: 5 - Normal
Status: DonePrivacy: Public
Assigned to: Marko Lindqvist <cazfi>Open/Closed: Closed
Planned Release: 2.3.5, 2.4.0, 2.5.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)

Sun 28 Apr 2013 08:08:12 AM UTC, SVN revision 22786:

Restrict partisan placement to native terrain of the unit in addition
to terrain being land.

Patch by Emmet Hikory

See patch #3869

(Browse SVN revision 22786)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sun 28 Apr 2013 08:08:06 AM UTC, SVN revision 22785:

Restrict partisan placement to native terrain of the unit in addition
to terrain being land.

Patch by Emmet Hikory

See patch #3869

(Browse SVN revision 22785)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sun 28 Apr 2013 08:07:21 AM UTC, SVN revision 22784:

Restrict partisan placement to native terrain of the unit instead
of accepting any land terrain.

Patch by Emmet Hikory

See patch #3869

(Browse SVN revision 22784)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Mon 22 Apr 2013 11:11:06 PM UTC, comment #6:

Excellent! I like something that benefits not only me (saves lots of time), but also benefits all the users (no confusion about potential ruleset incompatibility). Attached are the S2_3 and S2_4 patches: identical aside from offsets.

(file #17812, file #17813)

Emmet Hikory <persia>
Project Member
Mon 22 Apr 2013 10:47:50 PM UTC, comment #5:

Two checks version has also the benefit of not allowing non-Land partisans - introducing those would be bordercase of breaking ruleset format freeze (if someone then creates ruleset with non-Land partisans, it wouldn't work with older releases of the same series).

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Mon 22 Apr 2013 10:38:53 PM UTC, comment #4:

There's two ways to solve the prior bug: either backport this patch (potentially allowing non-Land partisans), or add a nativity check in addition to the terrain class check. Which do you prefer? I'm tempted to add both checks, because it means I don't have to dig through the older code to see if there is something else that might get in the way of non-Land Partisans.

Emmet Hikory <persia>
Project Member
Mon 22 Apr 2013 10:27:15 PM UTC, comment #3:

Oh, I OTOH misshed the side that land partisans might have stricter restrictions than just land. This actually means that we have a bug in stable branches as any land partisan is supposed to work there.

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Mon 22 Apr 2013 10:17:35 PM UTC, comment #2:

Thanks for pointing that out: I was so concerned about not attempting to place Land-moving partisans on non-native Land terrain that I completely missed that this also enabled non-land-moving partisans. Updated patch attached.

(file #17811)

Emmet Hikory <persia>
Project Member
Mon 22 Apr 2013 10:08:03 PM UTC, comment #1:

README.rulesets has list of units that ruleset format restrictions require to be of certain move type. Assuming that this patch is sufficient to make non-land-moving partisans possible, they should be removed from that listing.

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Mon 22 Apr 2013 12:28:49 AM UTC, original submission:

The current logic assumes L_PARTISAN units are native to all tiles that are either TC_LAND or T_UNKNOWN, which may not be correct for rulesets with complex nativity. Fix this by using is_native_tile rather than is_ocean_tile.

Emmet Hikory <persia>
Project Member

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #17811:  native-partisans+docs.patch added by persia (1kB - application/octet-stream)
file #17801:  native-partisans.patch added by persia (915B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by cazfi (Posted a comment)
  • -unavailable- added by persia (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.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 9 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 28 Apr 2013 08:08:23 AM UTCcazfiStatusReady For Test=>Done
      Open/ClosedOpen=>Closed
    Mon 22 Apr 2013 11:11:06 PM UTCpersiaAttached File-=>Added restrict-partisan-placement-to-native-S2_3.patch, #17812
      Attached File-=>Added restrict-partisan-placement-to-native-S2_4.patch, #17813
    Mon 22 Apr 2013 10:27:15 PM UTCcazfiStatusNone=>Ready For Test
      Assigned toNone=>cazfi
      Planned Release=>2.3.5, 2.4.0, 2.5.0
    Mon 22 Apr 2013 10:17:35 PM UTCpersiaAttached File-=>Added native-partisans+docs.patch, #17811
    Mon 22 Apr 2013 12:28:49 AM UTCpersiaAttached File-=>Added native-partisans.patch, #17801
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup