include info about asset sources file

This commit is contained in:
2025-09-24 11:19:00 +04:00
committed by nett00n
parent 83cc433c2f
commit 7b0db3abff
5 changed files with 529 additions and 12 deletions

View File

@@ -159,6 +159,30 @@ push_error("error") # Use DebugManager.log_error() with context
if debug_mode: print("debug info") # Use DebugManager.log_debug()
```
### Asset Management
- **MANDATORY**: Every asset added to the project must be documented in `assets/sources.yaml`
- Include complete source information, license details, and attribution requirements
- Document any modifications made to original assets
- Verify license compatibility with project usage before adding assets
- Update sources.yaml in the same commit as adding the asset
```gdscript
# ✅ Correct asset addition workflow
# 1. Add asset file to appropriate assets/ subdirectory
# 2. Update assets/sources.yaml with complete metadata
# 3. Commit both files together with descriptive message
# Example sources.yaml entry:
# audio:
# sfx:
# "button_click.wav":
# source: "https://freesound.org/people/user/sounds/12345/"
# license: "CC BY 3.0"
# attribution: "Button Click by SoundArtist"
# modifications: "Normalized volume, trimmed silence"
# usage: "UI button interactions"
```
### Error Handling
- Always check if resources loaded successfully
- Use `DebugManager.log_error()` for critical failures
@@ -257,6 +281,26 @@ node.do_something() # Could crash if node doesn't exist
# Use autoloads instead
```
### Asset Management Violations
```gdscript
# ❌ Don't add assets without documentation
# Adding audio/new_music.mp3 without updating sources.yaml
# ❌ Don't use assets without verifying licenses
# Using copyrighted music without permission
# ❌ Don't modify assets without documenting changes
# Editing sprites without noting modifications in sources.yaml
# ❌ Don't commit assets and documentation separately
git add assets/sprites/new_sprite.png
git commit -m "add sprite" # Missing sources.yaml update
# ✅ Correct approach
git add assets/sprites/new_sprite.png assets/sources.yaml
git commit -m "add new sprite with attribution"
```
### Performance Issues
```gdscript
# ❌ Don't search nodes repeatedly