Nesting Stitches

オープン
#951 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
csharp
領域
compilers

調査の方向性

ContentAtPath API と issue に記載されている既存の knot/stitch 構文から始め、ネストされたパスがどのように解析・解決されるかを確認します。要求されたネストされた stitch 構造を C# API から作成して参照でき、利用可能であれば関連する既存のテストで動作がカバーされていれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Hi!

I've been using ink for a while now and have been loving it so far. I'm trying to organize the script for my game in a way that's useful (and can be used in combination with some C# logic for more powerful interactions). So far, I've the following architecture:

CharacterFile.ink -> Character Knot -> Date Stitches (one stitch per in-game day, since time passes and conversations change).

Thing is, I would like to add one further level of nesting to the "Date stitch" so I can reference it using the C# API. Just like I can do use .HasFunction("CharacterKnot.dateStitch") I would like to be able to do .ContentAtPath("CharacterKnot.dateStitch.timeOfDay"). Searching around google and docs hasn't shed much light into the matter (Google said at some point that I can have stitches inside stitches but I can't seem to find a way of doing so). I've tried using gathers but those aren't supported by the C# API.

Any suggestions? I know I could simply create multiple stitches to differentiate the times of day, like:

=== Character ===
= 2025_06_27_morning

= 2025_06_27_evening

= 2025_06_28_morning

= 2025_06_28_evening

Which would allow me to reference them in C# with .ContentAtPath("Character.2025_06_27_morning"), but my ideal scenario is something like

=== Character ===
= 2025_06_27
    = morning
    = evening

= 2025_06_28
    = morning
    = evening

so I could reference it as .ContentAtPath("Character.2026_06_27.morning"). Just wondering if there could be a "cleaner" way of doing this (that avoids having to come up with unique names for everything).

主要言語
C#
スター
5k
フォーク
550
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

inkle/ink のほかの issue

inkle/ink の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。