patchFreeciv - Patches: patch #3871, Support airlifting units with...

 
 
Show feedback again

patch #3871: Support airlifting units with complex nativity

Submitted by:  Emmet Hikory <persia>
Submitted on:  Mon Apr 22 06:10:53 2013  
 
Category: generalPriority: 5 - Normal
Status: DonePrivacy: Public
Assigned to: Emmet Hikory <persia>Open/Closed: Closed
Planned Release: 2.6.0Contains string changes: None

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)

Thu Feb 25 00:43:21 2016, comment #8:

> it should probably use the action enablers framework that is currently in-progress.

Now patch #7008.

Sveinung Kvilhaugsvik <sveinung>
Project Member
Tue Apr 29 16:02:21 2014, SVN revision 24827:

Use a unit class flag for airlifting

Rather than restricting airlifts to ground units, provide a
unit class flag that allows ruleset authors to control which unit
classes are considered suitable for airlift.

Implementation suggestion by David Fernandez

See patch #3871

(Browse SVN revision 24827)

Emmet Hikory <persia>
Project MemberIn charge of this item.
Sun Apr 27 20:54:40 2014, comment #6:

Although I don't think this is the correct final solution, applying it to trunk will reduce the number of times I have to remember that this is an already-addressed nativity issue.

Emmet Hikory <persia>
Project MemberIn charge of this item.
Thu Apr 3 23:22:03 2014, comment #5:

I've not been working on it at all, and suspect that it should probably use the action enablers framework that is currently in-progress. That said, attached is a quick patch converting it to a unit class flag, in case someone wants to play with that.

(file #20469)

Emmet Hikory <persia>
Project MemberIn charge of this item.
Thu Jul 11 01:58:55 2013, comment #4:

I'm interested to see this feature implemented, in case you still working on it.
Would it be simpler if you create a new unit flag in units.ruleset to define which units can be airlifted? (without changing the ruleset effects)

David Fernandez <bardo>
Sat Apr 27 23:36:02 2013, comment #3:

Err, rather, I'll not generate that soon. Whlie the base of the implementation is relatively sane, generating accurate helptext is thorny enough to likely be confusing in the face of anything other than the simplest requirements.

Emmet Hikory <persia>
Project MemberIn charge of this item.
Sat Apr 27 22:39:45 2013, comment #2:

Makes sense. While the result of 3 total airlift, in a combination of air and sea is documented, I agree it that it's not as rich as it might be. Will regenerate with a separate effect.

Emmet Hikory <persia>
Project MemberIn charge of this item.
Sat Apr 27 22:25:41 2013, comment #1:

I don't like the idea of Airlift capacity to be checked with RPT_POSSIBLE. Server should be sure about every rule it enforces. I haven't bothered to check if this particular change would affect any important corner-case, but if we start using RPT_POSSIBLE for enforced rules in general, there will be a lot of bugs in such corner-cases.
Hmm.. what if I define seemingly valid effects that city can airlift 2 land units and 1 sea unit each turn? What the effects actually turn to? You can just airlift total of three units of land and sea classes.

I would be much prefer separate effect to control if unit is able to airlift.

Marko Lindqvist <cazfi>
Project Administrator
Mon Apr 22 06:10:53 2013, original submission:

The current code restricts airlifting to UMT_LAND units, which is annoying for ruleset authors who might want to define a unit that happens to only move on land but is unsuitable for airlift (e.g. continental assault engine) or some unit that can move on both land and sea that is suitable for airlift (e.g. frogmen). The attached patch removes the hardcoded restriction, replacing it with ruleset definitions for the "Airlift" effect: units that may be airlifted are now controlled by the reqs/nreqs of the effects, so ruleset authors may control this with any of UnitType, UnitFlag, UnitClass, or UnitClassFlag. Ruleset adjustments are included for all rulesets in source control to retain prior behaviour (all using UnitClass for simplicity).

Emmet Hikory <persia>
Project MemberIn charge of this item.

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #20469:  airlift-class-flag.patch added by persia (11kB - application/octet-stream)
file #17803:  control-airlift-nativity.patch added by persia (9kB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

     

    Error: not logged in

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue Apr 29 16:12:38 2014persiaStatusReady For Test=>Done
      Open/ClosedOpen=>Closed
    Sun Apr 27 20:54:40 2014persiaStatusNone=>Ready For Test
      Assigned toNone=>persia
      Planned Release=>2.6.0
    Sun Apr 13 09:56:04 2014persiaSummaryControl airlift nativity with EFT_AIRLIFT=>Support airlifting units with complex nativity
    Thu Apr 3 23:22:03 2014persiaAttached File-=>Added airlift-class-flag.patch, #20469
    Mon Apr 22 06:10:53 2013persiaAttached File-=>Added control-airlift-nativity.patch, #17803
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup