Skip to content

Commit

Permalink
Merge pull request #108 from MASSHUU12/fix-arguments-&-options-manual
Browse files Browse the repository at this point in the history
Fix arguments & options manual
  • Loading branch information
MASSHUU12 authored Dec 13, 2023
2 parents cb2d7b4 + 8144ba3 commit e592e90
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ All notable changes to this project will be documented in this file.
- Godot .NET SDK version to 4.2.1.
- Included example folder in exported repo.

### Fixed

- Arguments & options with multiple values were displayed incorrectly in manuals.

## [1.14.1-beta 2023-12-12]

### Added
Expand Down
8 changes: 6 additions & 2 deletions addons/yat/src/interfaces/ICommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ public virtual string GenerateArgumentsManual()

foreach (var attr in attributes)
{
sb.AppendLine($"[b]{attr.Name}[/b]: {attr.Type} - {attr.Description}");
sb.AppendLine($"[b]{attr.Name}[/b]: {(attr.Type is string[] type
? string.Join(" | ", type)
: attr.Type)} - {attr.Description}");
}

return sb.ToString();
Expand Down Expand Up @@ -136,7 +138,9 @@ public virtual string GenerateOptionsManual()

foreach (var attr in attributes)
{
sb.AppendLine($"[b]{attr.Name}[/b]: {attr.Type} - {attr.Description}");
sb.AppendLine($"[b]{attr.Name}[/b]: {(attr.Type is string[] type
? string.Join(" | ", type)
: attr.Type)} - {attr.Description}");
}

return sb.ToString();
Expand Down

0 comments on commit e592e90

Please sign in to comment.