generated from VLADIMIR/template
92 lines
2.2 KiB
Go
92 lines
2.2 KiB
Go
package storytelling
|
|
|
|
// IStory provides access to a scenario story.
|
|
type IStory interface {
|
|
GetStory(scenario *Story, codes []string) *Story
|
|
}
|
|
|
|
// Story describes a scenario story.
|
|
type Story struct {
|
|
Background string `json:"background,omitempty"`
|
|
|
|
Introduction *Introduction `json:"introduction,omitempty"`
|
|
|
|
// Conclusion is available in the scenario editor and is not sent to players.
|
|
Conclusion *Conclusion `json:"conclusion,omitempty"`
|
|
|
|
Places []*Place `json:"places"`
|
|
|
|
// Questions are the questions the team must answer.
|
|
Questions []*Question `json:"questions,omitempty"`
|
|
}
|
|
|
|
// Question describes a question and its correct answer.
|
|
type Question struct {
|
|
Code string `json:"code"`
|
|
|
|
Text string `json:"text"`
|
|
|
|
// Answer is visible only to the author and organizers.
|
|
Answer string `json:"answer"`
|
|
}
|
|
|
|
// Conclusion describes text and video for the scenario editor.
|
|
type Conclusion struct {
|
|
Text string `json:"text"`
|
|
Video string `json:"video,omitempty"`
|
|
}
|
|
|
|
// Introduction describes the text and audio shown at the start of the game.
|
|
type Introduction struct {
|
|
Text string `json:"text"`
|
|
|
|
Audio string `json:"audio,omitempty"`
|
|
}
|
|
|
|
// Place describes a location, character, or player action in the story.
|
|
type Place struct {
|
|
Code string `json:"code"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
Text string `json:"text"`
|
|
|
|
Image string `json:"image"`
|
|
|
|
// Hidden reports whether the place is initially unavailable.
|
|
Hidden bool `json:"hidden"`
|
|
|
|
Applications []*Application `json:"applications,omitempty"`
|
|
|
|
// Doors are actions or dialogues that open other places.
|
|
Doors []*Door `json:"doors"`
|
|
|
|
// Keys are used to access hidden doors.
|
|
Keys []*Key `json:"keys"`
|
|
}
|
|
|
|
// Application describes evidence such as a weapon, fingerprint, or photo.
|
|
type Application struct {
|
|
Name string `json:"name"`
|
|
|
|
Image string `json:"image"`
|
|
|
|
// FileType is the evidence file type: image, pdf, or audio.
|
|
FileType string `json:"file_type,omitempty"`
|
|
}
|
|
|
|
// Door describes an action or dialogue.
|
|
type Door struct {
|
|
Code string `json:"code"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
// Keys are required to access a hidden door.
|
|
Keys []*Key `json:"keys"`
|
|
}
|
|
|
|
// Key describes an item that grants access to a door.
|
|
type Key struct {
|
|
Name string `json:"name"`
|
|
}
|