mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-08-02 13:38:06 +00:00
Changed consolex to console logging (#1036)
## Description: Changed from consolex to console ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced - [x] I understand that submitting code with bugs that could have been caught through manual testing blocks releases and new features for all contributors ## Please put your Discord username so you can be contacted if a bug or regression is found: @qqkedsi
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { consolex } from "../Consolex";
|
||||
import { GameMapType } from "./Game";
|
||||
import { GameMap, GameMapImpl } from "./GameMap";
|
||||
import { terrainMapFileLoader } from "./TerrainMapFileLoader";
|
||||
@@ -65,13 +64,13 @@ export async function genTerrainFromBin(data: string): Promise<GameMap> {
|
||||
}
|
||||
|
||||
function logBinaryAsAscii(data: string, length: number = 8) {
|
||||
consolex.log("Binary data (1 = set bit, 0 = unset bit):");
|
||||
console.log("Binary data (1 = set bit, 0 = unset bit):");
|
||||
for (let i = 0; i < Math.min(length, data.length); i++) {
|
||||
const byte = data.charCodeAt(i);
|
||||
let byteString = "";
|
||||
for (let j = 7; j >= 0; j--) {
|
||||
byteString += byte & (1 << j) ? "1" : "0";
|
||||
}
|
||||
consolex.log(`Byte ${i}: ${byteString}`);
|
||||
console.log(`Byte ${i}: ${byteString}`);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user