Fix: Correct item name interpolation
This commit is contained in:
@@ -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" 처럼 정상적으로 출력됨.
|
||||
Reference in New Issue
Block a user