Add support for sheet payload links (#2282)

* Fix "Print Evaluated" not evaluating with context

* Add support for sheet payload links
This commit is contained in:
Haselnussbomber 2025-05-29 19:37:48 +02:00 committed by GitHub
parent e52e0b6df9
commit 3f3a1f2be1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 183 additions and 70 deletions

View file

@ -94,6 +94,7 @@ internal class SeStringCreatorWidget : IDataWindowWidget
{ MacroCode.LowerHead, ["String"] },
{ MacroCode.ColorType, ["ColorType"] },
{ MacroCode.EdgeColorType, ["ColorType"] },
{ MacroCode.Ruby, ["StandardText", "RubyText"] },
{ MacroCode.Digit, ["Value", "TargetLength"] },
{ MacroCode.Ordinal, ["Value"] },
{ MacroCode.Sound, ["IsJingle", "SoundId"] },
@ -477,7 +478,12 @@ internal class SeStringCreatorWidget : IDataWindowWidget
}
}
RaptureLogModule.Instance()->PrintString(Service<SeStringEvaluator>.Get().Evaluate(sb.ToReadOnlySeString()));
var evaluated = Service<SeStringEvaluator>.Get().Evaluate(
sb.ToReadOnlySeString(),
this.localParameters,
this.language);
RaptureLogModule.Instance()->PrintString(evaluated);
}
if (this.entries.Count != 0)

View file

@ -63,6 +63,10 @@ internal class SheetRedirectResolverSelfTestStep : ISelfTestStep
new("WeatherPlaceName", 40),
new("WeatherPlaceName", 52),
new("WeatherPlaceName", 2300),
new("InstanceContent", 1),
new("PartyContent", 2),
new("PublicContent", 1),
new("AkatsukiNote", 1),
];
private unsafe delegate SheetRedirectFlags ResolveSheetRedirect(RaptureTextModule* thisPtr, Utf8String* sheetName, uint* rowId, uint* flags);