From 40e3d78179b397e52ee5d2db423f3c4fd2c713c0 Mon Sep 17 00:00:00 2001 From: Ido-Barnea Date: Wed, 21 Feb 2024 16:00:57 +0200 Subject: [PATCH 1/2] [#210] Added destination board in kill log --- development/code/ui/logs/Log.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/development/code/ui/logs/Log.ts b/development/code/ui/logs/Log.ts index a0f27566..03d54aae 100644 --- a/development/code/ui/logs/Log.ts +++ b/development/code/ui/logs/Log.ts @@ -1,10 +1,12 @@ import { + HELL_BOARD_ID, NOTATIONS_LETTERS, NOTATIONS_NUMBERS, VOID_BOARD_ID, } from '../../Constants'; import { Piece } from '../../logic/pieces/Piece'; import { Position } from '../../logic/pieces/PiecesUtilities'; +import { HELL_BOARD } from '../BoardManager'; import { Logger } from './Logger'; export enum LogColor { @@ -66,9 +68,11 @@ export class KillLog extends Log { let message = `${killedPieceIcon} ${killedPieceColor} ${killedPieceName} was `; if (killedPiece.position.boardId === VOID_BOARD_ID) { - message += 'permanently '; + message += 'permanently killed by '; + } else { + const spawnedInBoard = killedPiece.position.boardId === HELL_BOARD_ID ? 'Hell' : 'Heaven'; + message += `sent to ${spawnedInBoard} by ` } - message += 'killed by '; if (cause instanceof Piece) { const { From 97e362baf1e19c00d231044ddeb687d5cb24ccaa Mon Sep 17 00:00:00 2001 From: Ido-Barnea Date: Wed, 21 Feb 2024 16:01:13 +0200 Subject: [PATCH 2/2] [trivial] Formatting --- development/code/ui/logs/Log.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/development/code/ui/logs/Log.ts b/development/code/ui/logs/Log.ts index 03d54aae..14d7f157 100644 --- a/development/code/ui/logs/Log.ts +++ b/development/code/ui/logs/Log.ts @@ -70,8 +70,9 @@ export class KillLog extends Log { if (killedPiece.position.boardId === VOID_BOARD_ID) { message += 'permanently killed by '; } else { - const spawnedInBoard = killedPiece.position.boardId === HELL_BOARD_ID ? 'Hell' : 'Heaven'; - message += `sent to ${spawnedInBoard} by ` + const spawnedInBoard = + killedPiece.position.boardId === HELL_BOARD_ID ? 'Hell' : 'Heaven'; + message += `sent to ${spawnedInBoard} by `; } if (cause instanceof Piece) {