/// </summary>
[DataField(required: true)]
public List<ProtoId<RadioChannelPrototype>> Channels = new();
+
+ /// <summary>
+ /// How many items should be announced in a message before it truncates
+ /// </summary>
+ [DataField]
+ public int MaximumItems = 5;
}
if (recipeNames.Count == 0)
return;
- var message = Loc.GetString(
- "lathe-unlock-recipe-radio-broadcast",
- ("items", ContentLocalizationManager.FormatList(recipeNames))
- );
+ var message =
+ recipeNames.Count > ent.Comp.MaximumItems ?
+ Loc.GetString(
+ "lathe-unlock-recipe-radio-broadcast-overflow",
+ ("items", ContentLocalizationManager.FormatList(recipeNames.GetRange(0, ent.Comp.MaximumItems))),
+ ("count", recipeNames.Count)
+ ) :
+ Loc.GetString(
+ "lathe-unlock-recipe-radio-broadcast",
+ ("items", ContentLocalizationManager.FormatList(recipeNames))
+ );
foreach (var channel in ent.Comp.Channels)
{
lathe-popup-material-not-used = This material is not used in this machine.
lathe-unlock-recipe-radio-broadcast = This lathe is now capable of producing the following recipes: {$items}
+lathe-unlock-recipe-radio-broadcast-overflow = This lathe is now capable of producing {$count} new recipes, including: {$items}
lathe-unlock-recipe-radio-broadcast-item = [bold]{$item}[/bold]