[Freeciv-tickets] [freeciv] #45028: Document counters ruleset format

Zurück zum Archiv-Index
OSDN Ticket System norep****@osdn*****
Sun Sep 11 21:48:49 JST 2022


#45028: Document counters ruleset format

  Open Date: 2022-07-06 08:48
Last Update: 2022-09-11 21:48

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

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

Last Changes/Comment on this Ticket:
2022-09-11 21:48 Updated by: lachu

Comment:

Reply To cazfi
Reply To cazfi
Encountered a couple of problems:

- The patch does not apply, for the civ2civ3 part. Apparently you've created this in a tree where you have a (test) counter that does not exist in master

For some reason this still does not apply. It also seems that you've moved these to the very end of game.ruleset (after settings) from the location after clauses agreed earlier, and where the ruledit/ruleup saves them.

- xgettext gives "warning: unterminated character constant" about the changed game.rulesets, because of the ' in ";checkpoint              = Trigger value of the counter. When counter's". Our usual solution to these has been to use ` instead -> "counter`s". Sorry for not realizing that before 

That's still an issue.

- There's no need for adding [counters] -section. There's no entries in it (every counter is a section of its own). Even if we did, the documentation would go above it.

Rulesave still adds that. You should not be writing an entry comment but a section one, about a ruleset object type:
- Most importantly: use comment_write() instead of comment_entry_write() in comment_counters()
- Move comment_counters() among the other section comment writing functions (e.g. after the comment_clauses() )
- In comments-3.2.txt move entrydoc.counters to typedoc.counters (again: likely after typedoc.clauses)
- Likewise read the comment from typedoc.counters instead of entrydoc.counters
- Move "counters" in comments_storage among the section ones (again: after "clauses" is a good spot)

- ruledit gives: "3: Can't parse the comments file" - you would need at least to escape every " in it as \"

This escaping seems to work ok now.
0001-OSDN-45028-S-awomir-Lach-slawek-lach.art.pl.patch(11KB)
Still do not apply automatically
Still do not apply automatically. Maybe case is that I apply data manually. I will try to restore files and try ran script. You wrote there is no need to ensure script will apply changes, so I send patch.

---------------------------------------------------------------------
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:

Split from #44345.
Add the ruleset comments about counters sections. Remember also data/ruledit/comments-3.2.txt, and code changes to tools/ruleutil/comments.ch + call it from tools/ruleutil/rulesave.c

-- 
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/45028
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=45028



More information about the Freeciv-tickets mailing list
Zurück zum Archiv-Index