Skip to content

Conversation

@tuha263
Copy link
Contributor

@tuha263 tuha263 commented Nov 11, 2025

Summary

Apply TheOne Studio coding standards and best practices across the DynamicUserDifficulty module.

Changes

  • Null Safety: Added #nullable enable directive to 73 C# files
  • Sealed Classes: Applied sealed keyword to 35 classes to prevent unintended inheritance
  • Logging: Replaced all Debug.Log calls with ILogger for production-safe logging
  • Conditional Compilation: Added #if UNITY_EDITOR || DEVELOPMENT_BUILD guards for debug logs
  • Logger Fixes: Split ILogger.Error() calls to use separate Error() and Exception() methods
  • Critical Fixes: Updated WinStreakModifier and LossStreakModifier logging
  • .meta Files: Updated .gitignore to track all 113 .meta files, including DifficultyConfig.cs.meta (GUID: ca87a97319ecebd9ea36af4a38311aa1)

Files Changed

  • 61 C# source files modified
  • 113 .meta files added (now tracked)
  • 1 .gitignore file updated

Testing

✅ Compilation verified - no breaking changes
⏳ Pending: Run 164 Unity tests manually via Test Runner

🤖 Generated with Claude Code

- Add #nullable enable to 73 files for null safety
- Seal 35 classes to prevent unintended inheritance
- Replace Debug.Log with ILogger for production logging
- Add conditional compilation directives
- Fix ILogger.Error() calls (separate Error/Exception)
- Update .gitignore to track 113 .meta files
- Include DifficultyConfig.cs.meta for GUID preservation

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
@frostbun
Copy link

please remove all #if UNITY_EDITOR || DEVELOPMENT_BUILD & [prefix] from logs because they are handled in ILogger
remove log from constructors
remove verbose logs, keep necessary logs only

@frostbun
Copy link

No inline comments, everything should have descriptive names, only add comments when necessary

@frostbun
Copy link

logger must not be null right from the constructor, no need checking for null, use nullable annotation only
use this.logger.Debug instead of this.logger?.Debug

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.

3 participants