Rename Message.message to .content
This commit is contained in:
parent
c034612a35
commit
619d5bbae1
2 changed files with 6 additions and 6 deletions
|
@ -10,17 +10,17 @@ export enum MessageType {
|
|||
export class Message {
|
||||
static even = true;
|
||||
isEven: boolean;
|
||||
message: string;
|
||||
content: string;
|
||||
type: MessageType;
|
||||
|
||||
constructor(message: string, type: MessageType = MessageType.message) {
|
||||
this.message = message;
|
||||
this.content = message;
|
||||
this.isEven = Message.even;
|
||||
this.type = type;
|
||||
Message.even = !Message.even;
|
||||
}
|
||||
|
||||
toString(): string {
|
||||
return this.message;
|
||||
return this.content;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ type Version0Save = typeof __EMPTY_OBJECT;
|
|||
type Version1Save = Version0Save & {
|
||||
version: 1;
|
||||
messages: {
|
||||
message: string;
|
||||
content: string;
|
||||
type: MessageType;
|
||||
}[];
|
||||
selectedTab: keyof typeof TabHandler["AllTabs"];
|
||||
|
@ -72,7 +72,7 @@ export class SaveHandler extends StaticClass {
|
|||
settings: saveSettings,
|
||||
messages: messages.map((message) => {
|
||||
return {
|
||||
message: message.message,
|
||||
content: message.content,
|
||||
type: message.type,
|
||||
};
|
||||
}),
|
||||
|
@ -120,7 +120,7 @@ export class SaveHandler extends StaticClass {
|
|||
game.Log.reset();
|
||||
|
||||
fullSave.messages.forEach((message) => {
|
||||
game.Log.addMessage(message.message, message.type);
|
||||
game.Log.addMessage(message.content, message.type);
|
||||
});
|
||||
game.TabHandler.currentTab = game.TabHandler.AllTabs[fullSave.selectedTab];
|
||||
|
||||
|
|
Reference in a new issue