This commit is contained in:
2025-09-23 01:07:24 +07:00
parent 9f484366bb
commit 0657f36206
12 changed files with 322 additions and 150 deletions
@@ -59,6 +59,13 @@ func NewStoryService(filepath string) (*StoryService, error) {
}
func (s *StoryService) GetPlace(code string) *Place {
if strings.HasPrefix(code, "[") || strings.HasSuffix(code, "]") {
return &Place{
Code: code,
Name: "Не найдено",
Text: "Уважаемые детективы внимательно прочитайте правила.",
}
}
code = clearCode(code)
for _, place := range s.story.Places {
if clearCode(place.Code) == code {