patchFreeciv - Patches: patch #5006, Suppress "Can build mines on...

 
 
Show feedback again

patch #5006: Suppress "Can build mines on tiles" etc in help based on Mining_Possible, etc

Submitted by:  Jacob Nevins <jtn>
Submitted on:  Fri 01 Aug 2014 11:52:30 AM UTC  
 
Category: docsPriority: 5 - Normal
Status: DonePrivacy: Public
Assigned to: Marko Lindqvist <cazfi>Open/Closed: Closed
Planned Release: 2.5.0, 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)

Thu 12 Feb 2015 05:23:19 AM UTC, SVN revision 28103:

Check that relevant "_Possible" effect is ever enabled to the particular unit type before
help claims that it can do the activity.

Requested by Jacob Nevins

See patch #5006

(Browse SVN revision 28103)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Thu 12 Feb 2015 05:23:10 AM UTC, SVN revision 28102:

Check that relevant "_Possible" effect is ever enabled to the particular unit type before
help claims that it can do the activity.

Requested by Jacob Nevins

See patch #5006

(Browse SVN revision 28102)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Thu 12 Feb 2015 05:23:03 AM UTC, SVN revision 28101:

Check that relevant "_Possible" effect is ever enabled to the particular unit type before
help claims that it can do the activity.

Requested by Jacob Nevins

See patch #5006

(Browse SVN revision 28101)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sat 07 Feb 2015 07:49:36 AM UTC, comment #6:

- S2_5 version

(file #23742)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sat 07 Feb 2015 07:14:35 AM UTC, comment #5:

Patch to complete this series for S2_6/TRUNK:
- Check (with some margin of error) that relevant _Possible effect is ever enabled for the particular unit type

36h review period starts.

--

It feels odd to be finally making the proper implementation for this in S2_6/TRUNK only at the same time as I'm already planning obsoleting _Possible effects (in favor of action enablers) in TRUNK...

S2_5 lacks tools this patch requires. I guess I have to make one-use to-the-point version of the checks there (utility functions able to check things just for unittype, not universal)

(file #23741)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sun 01 Feb 2015 04:03:03 PM UTC, comment #4:

> the shape of a solution for S2_5, but nothing firm yet (I'm not
> yet convinced we want to backport
> universal_fulfills_requirement(), although that's an easy way to
> solve the problem).


We seem to be missing many tools that would be very handy in updating the help system to match new features. And S2_5 is not the first branch where we end to this situation.
We should learn from this, and check the help system in S2_6 in earlier phase, when it's still possible to add needed lower level functionality. Maybe making "help system check" (i.e., to have at least a plan how to update it) an requirement for entering datafile format freeze?

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sun 03 Aug 2014 12:06:41 AM UTC, comment #3:

I've no immediate plans to work on this; feel free to take it.

> I'd really rather do this without introducing nreqs anywhere

When I say "nreqs" I'm being lazy; really I mean present=FALSE requirements for trunk.

Jacob Nevins <jtn>
Project Administrator
Sat 02 Aug 2014 12:10:02 AM UTC, comment #2:

> Removing fallout/pollution probably needs more effort (this
> doesn't have a requirements_vector).


Yes it has; "rmreqs"

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sat 02 Aug 2014 12:08:06 AM UTC, comment #1:

For trunk, using requirement_fulfilled_by_unit() and extension of the relevant requirements vectors can address irrigation, mining, farmland, and road/rail (can this unit mine? If so, can it produce any of the EC_MINE extras?, etc.). Removing fallout/pollution probably needs more effort (this doesn't have a requirements_vector).

I have some ideas of the shape of a solution for S2_5, but nothing firm yet (I'm not yet convinced we want to backport universal_fulfills_requirement(), although that's an easy way to solve the problem).

I'd really rather do this without introducing nreqs anywhere (more nreqs in 2.5 means more unlearning ruleset authors need for 2.6, and introducing new nreqs in 2.6 when we still haven't finished cleaning up from having removed the effects nreqs seems like asking for trouble).

I'm busy for the next few days, but would be happy to take this ticket afterwards, if nobody else has already, since I've recently been working on both helpdata and requirements parsing.

Emmet Hikory <persia>
Project Member
Fri 01 Aug 2014 11:52:30 AM UTC, original submission:

Currently, units with the "settlers" flag get a load of hardcoded help of the form "Can build mines/irrigation on tiles", " etc, regardless of whether this is actually possible in practice.

Now that rulesets have fine control over much of this stuff via effects like Mining_Possible, this can be inappropriate:

  • A ruleset could disallow any kind of e.g. mining globally, but the help would still claim it's possible.
  • Certain units can be restricted from activities (as proposed for civ2civ3 Transports under bug #22417).

The help system could check to see if a given unit type can ever perform the requested action. It won't be perfect but looking for simple things like nreqs for unit properties, or global effect values (maybe similar to bug #20521?) will give ruleset authors the tools they need to suppress this text.

There's also text "Can build roads and railroads", which is problematic now we have gen-roads. This falls into the same category as bases for which there's already a FIXME comment (maybe the above approaches will make this fixable?)

(Not sure how applicable this will be to trunk with generalised extras; maybe a different approach is needed there.)

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

 

Digest:
   patch dependencies.

Items that depend on this one: None found

 

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

     

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

     

     

    Follow 10 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 12 Feb 2015 05:23:39 AM UTCcazfiStatusReady For Test=>Done
      Assigned toNone=>cazfi
      Open/ClosedOpen=>Closed
    Sat 07 Feb 2015 07:49:36 AM UTCcazfiAttached File-=>Added HelpUnitSpecificIsPossible-S2_5.patch, #23742
    Sat 07 Feb 2015 07:14:35 AM UTCcazfiAttached File-=>Added HelpUnitSpecificIsPossible.patch, #23741
      StatusNone=>Ready For Test
      Planned Release2.5.0, 2.6.0=>2.5.0, 2.6.0, 3.0.0
    Sat 07 Feb 2015 06:36:55 AM UTCcazfiDependencies-=>Depends on patch #5796
    Wed 04 Feb 2015 04:27:44 AM UTCcazfiDependencies-=>Depends on patch #5783
    Sun 01 Feb 2015 02:01:58 PM UTCcazfiDependencies-=>Depends on patch #5774
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup