Skip to content

ADD: average transport density chart to line list screen#580

Merged
simupoppo merged 3 commits into
teamhimeh:OTRP-KUTAv6from
kanyao1230:feature/transport-density-chart
Jun 12, 2026
Merged

ADD: average transport density chart to line list screen#580
simupoppo merged 3 commits into
teamhimeh:OTRP-KUTAv6from
kanyao1230:feature/transport-density-chart

Conversation

@kanyao1230

Copy link
Copy Markdown

概要

路線一覧画面の右上グラフに、平均輸送密度Avg. density)を追加します。

変更内容

  • グラフに11番目の曲線として「平均輸送密度」を追加(紫色)
  • 計算式:Freight ton-kilo ÷ 走行距離
  • セーブデータには保存しない(UIで動的に計算)
  • simcolor.hCOL_TRANSPORT_DENSITY を定義
  • ja.OTRP.tab に日本語訳を追加

実装の詳細

financial_historyLINE_TONKILOLINE_DISTANCE から毎回計算するため、MAX_LINE_COST は変更しておらず、既存のセーブデータとの互換性を維持しています。フィルタボタンの状態もセーブ対象外です。

Computes ton-kilo / distance dynamically in the UI; not saved to save data.
Adds COL_TRANSPORT_DENSITY (purple) to simcolor.h for the curve color.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Comment thread gui/schedule_list.cc Outdated
COL_TOLL,
COL_TONKILO
COL_TONKILO,
COL_TRANSPORT_DENSITY

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

この値は記録されておらず、MAX_LINE_COSTの外であることをコメントで追記してください(後に記録値を追加する際、混同する原因になります)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

コメントしました

Comment thread gui/schedule_list.h Outdated
gui_label_t lbl_filter, lbl_memo, lbl_name, lbl_colour;
gui_chart_t chart;
button_t filterButtons[MAX_LINE_COST];
button_t filterButtons[MAX_LINE_COST + 1];

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MAX_LINE_COST_GUIschedule_list.h内でstaticに定義し、filterButtons[MAX_LINE_COST_GUI]でボタン一覧を定義してください

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

分けました

Comment thread gui/schedule_list.cc Outdated


static const char *cost_type[MAX_LINE_COST] =
#define MAX_LINE_COST_GUI (MAX_LINE_COST + 1)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

schedule_list.h内で定義・使用してください

kanyao1230 and others added 2 commits June 12, 2026 02:04
…t density

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…rays

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@simupoppo simupoppo merged commit 55dc40c into teamhimeh:OTRP-KUTAv6 Jun 12, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants