Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ChainTableを利用した際に、次のテーブルに遷移する前に表のテキストを追加で表示できる機能の追加 #610

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

h-mikisato
Copy link
Contributor

これまではChainTableを特に工夫なく使った場合、

表1(X) > 表2(Y) > 表2の結果

のような表示となり、表1固有のテキストを表示することができませんでした。

今回ChainWithTextというクラスを作成し、これをChainTableの項目とした場合に、

表1(X) > 表1の結果 > 表2(Y) > 表2の結果

という表示を可能にしました。

同様のチェーン機能がD66Tableにも実装されていたため、こちらでも利用できるようにしてあります。

実用サンプルのために、独自のChainTableで実装されていた鋼鉄のユグドラシルの表をこの実装で書き換えました。

他にも同様の独自テーブルを実装しているシステムはあったが、一番単純に書き換えできたため
@codecov
Copy link

codecov bot commented Mar 6, 2023

Codecov Report

Patch coverage: 96.29% and project coverage change: -0.01 ⚠️

Comparison is base (ef09158) 95.43% compared to head (1a387e0) 95.43%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #610      +/-   ##
==========================================
- Coverage   95.43%   95.43%   -0.01%     
==========================================
  Files         332      333       +1     
  Lines       18589    18598       +9     
  Branches     4825     4830       +5     
==========================================
+ Hits        17741    17749       +8     
- Misses        848      849       +1     
Impacted Files Coverage Δ
lib/bcdice/game_system/Yggdrasill.rb 98.19% <ø> (-0.12%) ⬇️
lib/bcdice/dice_table/roll_result.rb 96.77% <93.75%> (-3.23%) ⬇️
lib/bcdice/dice_table.rb 100.00% <100.00%> (ø)
lib/bcdice/dice_table/chain_table.rb 93.75% <100.00%> (-0.37%) ⬇️
lib/bcdice/dice_table/chain_with_text.rb 100.00% <100.00%> (ø)
lib/bcdice/dice_table/d66_table.rb 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ysakasin ysakasin self-requested a review March 17, 2023 18:42
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.

None yet

1 participant