Skip to content
This repository has been archived by the owner on Jul 28, 2018. It is now read-only.

Commit

Permalink
starting with electronic messages
Browse files Browse the repository at this point in the history
  • Loading branch information
dertseha committed Jun 5, 2017
1 parent 192adc9 commit 5e02346
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
7 changes: 7 additions & 0 deletions DataStore.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ type DataStore interface {
SetGameObject(projectID string, class, subclass, objType int, properties *GameObjectProperties,
onSuccess func(properties *GameObjectProperties), onFailure FailureFunc)

// ElectronicMessage queries the data of a specific electronic message.
ElectronicMessage(projectID string, messageType ElectronicMessageType, id int,
onSuccess func(message ElectronicMessage), onFailure FailureFunc)
// SetElectronicMessage requests to update the properties of a specific electronic message.
SetElectronicMessage(projectID string, messageType ElectronicMessageType, id int, message ElectronicMessage,
onSuccess func(message ElectronicMessage), onFailure FailureFunc)

// Palette queries a palette.
Palette(projectID string, paletteID string, onSuccess func(colors [256]Color), onFailure FailureFunc)
// Levels queries all levels of a project.
Expand Down
21 changes: 21 additions & 0 deletions ElectronicMessage.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package model

// ElectronicMessage describes the base properties of an electronic message.
type ElectronicMessage struct {
// NextMessage describes the message that will interrupt this one. -1 for no interrupt.
NextMessage *int
// IsInterrupt is set for interrupting messages.
IsInterrupt *bool
// ColorIndex for special colored headers. -1 for default.
ColorIndex *int
// LeftDisplay identifies the image for the left display. -1 for none.
LeftDisplay *int
// RightDisplay identifies the image for the right display. -1 for none.
RightDisplay *int

Title [LanguageCount]*string
Sender [LanguageCount]*string
Subject [LanguageCount]*string
VerboseText [LanguageCount]*string
TerseText [LanguageCount]*string
}
18 changes: 18 additions & 0 deletions ElectronicMessageType.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package model

// ElectronicMessageType classifies the messages.
type ElectronicMessageType string

const (
// ElectronicMessageTypeMail is for wireless mails.
ElectronicMessageTypeMail ElectronicMessageType = "mail"
// ElectronicMessageTypeLog is for collected logs.
ElectronicMessageTypeLog = "log"
// ElectronicMessageTypeFragment is for downloaded fragments.
ElectronicMessageTypeFragment = "fragment"
)

// ElectronicMessageTypes returns all known message types.
func ElectronicMessageTypes() []ElectronicMessageType {
return []ElectronicMessageType{ElectronicMessageTypeMail, ElectronicMessageTypeLog, ElectronicMessageTypeFragment}
}

0 comments on commit 5e02346

Please sign in to comment.