feat: add in-game chat with / key

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-24 11:06:29 +09:00
parent ce2f03baf5
commit ee9aec0b32
3 changed files with 49 additions and 2 deletions

View File

@@ -293,6 +293,13 @@ func (s *GameSession) BuyItem(playerID string, itemIdx int) bool {
return false
}
// SendChat appends a chat message to the combat log
func (s *GameSession) SendChat(playerName, message string) {
s.mu.Lock()
defer s.mu.Unlock()
s.addLog(fmt.Sprintf("[%s] %s", playerName, message))
}
// LeaveShop exits the shop phase
func (s *GameSession) LeaveShop() {
s.mu.Lock()