File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -2400,9 +2400,15 @@ void StartStore(TalkID s)
24002400 }
24012401 }
24022402
2403- // Insert extra options into empty even-numbered lines before the leave option.
2403+ // Insert extra options into empty even-numbered lines before the leave option,
2404+ // after any existing menu lines (so e.g. "Talk to Farnham" stays above mod options).
2405+ int firstExtraOptionLine = 10 ;
2406+ for (int line = 10 ; line < lastSelectableLine; line += 2 ) {
2407+ if (TextLine[line].hasText ())
2408+ firstExtraOptionLine = line + 2 ;
2409+ }
24042410 size_t optIdx = 0 ;
2405- for (int line = 10 ; line < lastSelectableLine && optIdx < extraOpts->size (); line += 2 ) {
2411+ for (int line = firstExtraOptionLine ; line < lastSelectableLine && optIdx < extraOpts->size (); line += 2 ) {
24062412 if (TextLine[line].hasText ()) continue ;
24072413 std::string label = (*extraOpts)[optIdx].getLabel ();
24082414 if (!label.empty ()) {
Original file line number Diff line number Diff line change @@ -130,7 +130,8 @@ DVL_API_FOR_TEST const char *TownerNameForTalkID(TalkID s);
130130/* *
131131 * @brief Registers a dynamic dialog option for a towner's talk menu.
132132 *
133- * Options are inserted into empty even-numbered lines before the towner's "leave" option.
133+ * Options are inserted into empty even-numbered lines before the towner's "leave" option,
134+ * after existing menu lines on even rows (so default choices like "Talk to …" stay first).
134135 * If no empty lines are available the option is silently skipped for that dialog session
135136 * and a warning is logged.
136137 *
You can’t perform that action at this time.
0 commit comments