Project

General

Profile

Actions

Feature #1836

open

re-write/improve reqtext.c

Added by Dean Brown 7 days ago. Updated 6 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
General
Target version:
-
Start date:
12/24/2025
Due date:
% Done:

0%

Estimated time:

Description

There's typos that need fixing -
"?good:Requires import of %s ." Extra space char
"?cityprop:Applies only to %s cities" Missing .
"?cityprop:Does not apply to %s cities" Missing .

I don't like a routine >3000 lines long, not good coding style IMO. I want to make it be like -

 switch (preq->source.kind) {
  case VUT_NONE:
    return FALSE;

  case VUT_COUNTER:
    return req_text_counter();

  case VUT_ADVANCE:
    return req_text_advance();

  case VUT_TECHFLAG:
    return req_text_techflag();

...

extracting a bunch of new routines, one for each req type.


Files

1836.patch (307 KB) 1836.patch Dean Brown, 12/26/2025 12:03 AM
Actions #1

Updated by Marko Lindqvist 7 days ago

  • Tracker changed from Tasks to Feature
  • Category changed from client-common to General

Split to two tickets:
1) typofixes -> goes to all branches
2) refactoring -> goes to main branch

Actions #2

Updated by Dean Brown 7 days ago

New issue #1839 for the typos.

Actions #3

Updated by Dean Brown 6 days ago

Did a bunch of testing to make sure I didn't break anything.

What a huge patch file!

Actions

Also available in: Atom PDF