generated from VLADIMIR/template
fix
This commit is contained in:
@@ -22,17 +22,12 @@ func (s *story) GetStory(
|
||||
codesWithUseActions := map[string]struct{}{}
|
||||
codesHidden := map[string]struct{}{}
|
||||
givenApplications := map[string]struct{}{}
|
||||
// Введение передаётся игроку всегда — и до первого хода (начало игры),
|
||||
// и в дальнейшем (как заголовок истории).
|
||||
if scenario.Introduction != nil {
|
||||
story.Introduction = &Introduction{
|
||||
Text: s.cleaner.ClearText(scenario.Introduction.Text),
|
||||
Audio: scenario.Introduction.Audio,
|
||||
}
|
||||
}
|
||||
// Вопросы дела передаются команде всегда — с начала игры; правильные
|
||||
// ответы (Answer) команде не передаются: они нужны только автору и
|
||||
// организаторам при оценке ответов.
|
||||
for _, question := range scenario.Questions {
|
||||
story.Questions = append(story.Questions, &Question{
|
||||
Code: question.Code,
|
||||
@@ -49,7 +44,6 @@ func (s *story) GetStory(
|
||||
if i < len(codes)-1 {
|
||||
nextPlace, _ = s.findPlace(scenario, codes[i+1])
|
||||
}
|
||||
// Если следующая точка это открытие двери в текущей точке, то текущая точка считается использованной для действия
|
||||
if nextPlace != nil && currentPlace != nil {
|
||||
openDoor := false
|
||||
for _, door := range currentPlace.Doors {
|
||||
@@ -60,7 +54,6 @@ func (s *story) GetStory(
|
||||
}
|
||||
}
|
||||
if openDoor {
|
||||
// Запрещаем смотреть не выбранные действия
|
||||
for _, door := range currentPlace.Doors {
|
||||
if door.Code != nextPlace.Code {
|
||||
codesHidden[door.Code] = struct{}{}
|
||||
|
||||
Reference in New Issue
Block a user