[Freeciv-tickets] [freeciv] #41120: Counter requirement type

アーカイブの一覧に戻る
OSDN Ticket System norep****@osdn*****
Wed Feb 23 01:40:03 JST 2022


#41120: Counter requirement type

  Open Date: 2021-01-08 06:24
Last Update: 2022-02-23 01:40

URL for this Ticket:
    https://osdn.net//projects/freeciv/ticket/41120
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=41120

---------------------------------------------------------------------

Last Changes/Comment on this Ticket:
2022-02-23 01:40 Updated by: lachu

Comment:

Reply To cazfi
- You should not set checkpoint to 5 for ALL counters in counters_init(), but set for "Owned" counter only when initializing 'static struct counter counters'
Done
- Document the new requirement type in README.effects ("Requirement types and supported ranges" section)
Will be done in separate patch
- Use uppercase boolean macro, instead of assuming actual boolean type, in C-code: false -> FALSE
Done
- req_text_insert(): This should use translated name, not rule name. Same in universal_name_translation(). Unfortunately we don't have translated name yet -> I'll open a new ticket about that in a moment
Not done at the moment. I use invocation of  universal_untranslated_name instead of returning rulename directly from struct
- Add empty line between variable declarations and code, i.e., after "struct counter *count = req->source.value.counter;"
Done
- No space after ! (not): "if (! target_city) {" -> "if (!target_city) {"
Done
- Indentation wrong in worklist_item_post()

Done

---------------------------------------------------------------------
Ticket Status:

      Reporter: cazfi
         Owner: (None)
          Type: Patches
        Status: Open
      Priority: 5 - Medium
     MileStone: 3.2.0
     Component: General
      Severity: 5 - Medium
    Resolution: None
---------------------------------------------------------------------

Ticket details:

Add a new requirement type 'Counter'. Name of the requirement is name of the counter. Requirement works only at City range for now.
Add new 'checkpoint' int field to struct counter, and set it e.g. 5 for the City Owned counter. Requirement is fulfilled if the value of the requirement is at least checkpoint.
Test for example by introducing a ruleset rule that when city has been owned less than those 5 turns, it suffers extra unhappiness.


-- 
Ticket information of Freeciv project
Freeciv Project is hosted on OSDN

Project URL: https://osdn.net/projects/freeciv/
OSDN: https://osdn.net

URL for this Ticket:
    https://osdn.net/projects/freeciv/ticket/41120
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=41120



More information about the Freeciv-tickets mailing list
アーカイブの一覧に戻る