Fix: Correct item name interpolation

This commit is contained in:
2025-12-07 21:47:51 +09:00
parent e1b000772e
commit 59ebb7cd98
3 changed files with 28 additions and 84 deletions
+12
View File
@@ -0,0 +1,12 @@
# 74. Fix Item Name Interpolation
## 1. 문제 (Problem)
- 아이템 이름 생성 시 `Instance of 'ItemTemplate'.name` 형태의 잘못된 문자열이 출력됨.
- 원인은 Dart의 문자열 보간 문법 오류: `"$template.name"`은 객체를 문자열로 변환함.
## 2. 해결 방안 (Solution)
- `lib/game/logic/loot_generator.dart` 파일 내의 문자열 보간 코드를 수정.
- `"${selectedModifier.prefix} $template.name"` -> `"${selectedModifier.prefix} ${template.name}"`
## 3. 기대 효과 (Expected Outcome)
- 아이템 이름이 "Sharp Wooden Sword" 처럼 정상적으로 출력됨.