Wire up inventory select to ship state
Also mixed into this commit: * Use returning drivers where possible * Make the credits screen returnable via click
This commit is contained in:
@@ -1,8 +1,18 @@
|
||||
package ship
|
||||
|
||||
type DifficultyLevel int
|
||||
|
||||
const (
|
||||
DifficultyLevelMarine DifficultyLevel = 0
|
||||
DifficultyLevelVeteran DifficultyLevel = 1
|
||||
DifficultyLevelHero DifficultyLevel = 2
|
||||
DifficultyLevelMighty DifficultyLevel = 3
|
||||
)
|
||||
|
||||
// Ship encapsulates campaign state, including current location in the campaign,
|
||||
// marines and their stats, supplies, etc.
|
||||
type Ship struct {
|
||||
Difficulty DifficultyLevel
|
||||
NextScenario string
|
||||
|
||||
Squads []*Squad
|
||||
@@ -68,3 +78,16 @@ type Honours struct {
|
||||
PuritySeal bool
|
||||
ImperialLaurel bool
|
||||
}
|
||||
|
||||
func New() *Ship {
|
||||
s := &Ship{}
|
||||
s.Reset()
|
||||
|
||||
return s
|
||||
}
|
||||
|
||||
func (s *Ship) Reset() {
|
||||
*s = Ship{
|
||||
Difficulty: DifficultyLevelVeteran, // Default difficulty level
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user