bastion-siege-logic
Advanced tools
Comparing version 1.3.2 to 1.4.0
@@ -15,2 +15,5 @@ "use strict"; | ||
archer: '🏹', | ||
listLeader: '👑', | ||
listNormal: '🔅', | ||
listYou: '⚜', | ||
buildings: '🏘', | ||
@@ -17,0 +20,0 @@ workshop: '⚒', |
@@ -30,2 +30,6 @@ import { BattlereportRaw } from '../battlereport'; | ||
} | ||
export interface Chat { | ||
sender: string; | ||
text: string; | ||
} | ||
export interface DomainStats { | ||
@@ -42,2 +46,7 @@ wins: number; | ||
} | ||
export interface ListEntry { | ||
type: string; | ||
name: string; | ||
value: string; | ||
} | ||
export interface GamescreenContent { | ||
@@ -56,4 +65,6 @@ type?: string; | ||
castleSiegePlayerJoined?: Player; | ||
chat?: Chat; | ||
domainStats?: DomainStats; | ||
effects?: Effect[]; | ||
list?: ListEntry[]; | ||
player?: Player; | ||
@@ -60,0 +71,0 @@ resources?: Resources; |
@@ -13,2 +13,3 @@ "use strict"; | ||
const castle = __importStar(require("./gamescreen.castle")); | ||
const lists = __importStar(require("./gamescreen.lists")); | ||
const others = __importStar(require("./gamescreen.others")); | ||
@@ -20,2 +21,3 @@ const players = __importStar(require("./gamescreen.players")); | ||
castle, | ||
lists, | ||
others, | ||
@@ -22,0 +24,0 @@ players |
@@ -5,1 +5,2 @@ import { GamescreenContent } from './gamescreen-type'; | ||
export declare function getPatrolreport(content: string): GamescreenContent; | ||
export declare function getChat(content: string): GamescreenContent; |
@@ -105,2 +105,15 @@ "use strict"; | ||
exports.getPatrolreport = getPatrolreport; | ||
const CHAT_PREFIX = '#message /chat\n📣 '; | ||
function getChat(content) { | ||
if (contentFilter.starts(content, CHAT_PREFIX)) { | ||
const messageStartIndex = content.indexOf(': '); | ||
const sender = content.slice(CHAT_PREFIX.length, messageStartIndex); | ||
const text = content.slice(messageStartIndex + 2); | ||
return { chat: { | ||
sender, text | ||
} }; | ||
} | ||
return {}; | ||
} | ||
exports.getChat = getChat; | ||
//# sourceMappingURL=gamescreen.others.js.map |
{ | ||
"name": "bastion-siege-logic", | ||
"version": "1.3.2", | ||
"version": "1.4.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
116710
78
1666