Skip to content

Conversation

Copy link

Copilot AI commented Feb 9, 2026

The ScriptGenerationResult record had a duplicate property declaration causing compilation failure. Positional record parameters automatically generate properties, making explicit declarations redundant.

Changes:

  • Removed explicit DataFileName property declaration (lines 20-23)
  • Added XML doc <param> comment to document the positional parameter

Before:

public sealed record ScriptGenerationResult(string DataFileName)
{
    /// <summary>
    /// The data file name (without extension) used to generate the script.
    /// </summary>
    public string DataFileName { get; init; } = DataFileName;  // Duplicate!
    ...
}

After:

/// <param name="DataFileName">The data file name (without extension) used to generate the script.</param>
public sealed record ScriptGenerationResult(string DataFileName)
{
    // Property automatically generated from positional parameter
    ...
}

Validation:

  • Verified all refactored services maintain original functionality
  • Confirmed script generation produces correct output for all game versions (TR2, TR3, TR4, TRNG, TombEngine)
  • Validated LuaStudio and ClassicScriptStudio integration paths

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: Nickelony <20436882+Nickelony@users.noreply.github.com>
Copilot AI changed the title [WIP] Refactor level setup and import forms logic Fix duplicate property declaration in ScriptGenerationResult record Feb 9, 2026
Copilot AI requested a review from Nickelony February 9, 2026 21:00
@Nickelony Nickelony marked this pull request as ready for review February 9, 2026 21:31
@Nickelony Nickelony merged commit b14a5f4 into Nickelony/PM-Refactor-P2 Feb 9, 2026
@Nickelony Nickelony deleted the copilot/sub-pr-1120 branch February 9, 2026 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants