refactor: swap Aternos codex deps for IndifferentKetchup\Codex
Drops aternos/codex (and its codex-minecraft / codex-hytale satellites)
plus aternos/sherlock from composer.json. Adds indifferentketchup/codex
pinned to ^0.2.0, sourced via a Composer vcs repository pointing at the
Gitea-hosted ik-codex repo. composer.lock regenerated against the new
dep tree.
Re-points the seven Aternos\Codex\* import sites in src/ to their
IndifferentKetchup\Codex\* equivalents:
- src/Log.php (5 imports)
- src/Api/Response/CodexLogResponse.php (1 import)
- src/Printer/Printer.php (5 imports)
- src/Detective.php (rewritten — see below)
Stubs three sites that depend on Minecraft-specific code with no
analogue in IndifferentKetchup\Codex:
- src/Detective.php no longer extends the Aternos Detective with
Minecraft + Hytale satellites. Instead it extends our codex's
Detective and registers ProjectZomboidDetective, which itself
pre-registers all 11 PZ log subclasses.
- src/Data/Deobfuscator.php is reduced to a no-op shell. mclogs used
aternos/sherlock to fetch Mojang/Yarn obfuscation maps and
deobfuscate Vanilla / Fabric stack traces. Project Zomboid uses no
such mapping scheme; the deobfuscator returns null until iblogs
supports Minecraft logs again. Class signature preserved so callers
in src/Log.php and elsewhere don't break.
- src/Printer/FormatModification.php no longer extends the Minecraft
section-sign-code translator. It extends IndifferentKetchup\Codex's
Modification base class with a pass-through modify() implementation.
The format-* CSS color classes are retained for any future game's
own format-code scheme to reuse.
Updates composer.json metadata: description rewritten to drop the
"Minecraft" framing, authors entry replaced with indifferentketchup /
samkintop@gmail.com.
Verification:
composer update --ignore-platform-req=ext-frankenphp \
--ignore-platform-req=ext-mongodb
-> resolves cleanly: 1 install (indifferentketchup/codex 0.2.0),
4 removals (the aternos/* set).
php -l on every touched file -> no syntax errors.
Autoload smoke test -> Detective registers 11 PZ log classes;
Printer instantiates; FormatModification stub returns input
unchanged.
This commit is contained in:
@@ -1,10 +1,16 @@
|
|||||||
{
|
{
|
||||||
"name": "indifferentketchup/iblogs",
|
"name": "indifferentketchup/iblogs",
|
||||||
"description": "Paste, share and analyse Minecraft logs",
|
"description": "Paste, share, and analyse game-server logs.",
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "Matthias Neid",
|
"name": "indifferentketchup",
|
||||||
"email": "matthias@aternos.org"
|
"email": "samkintop@gmail.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"repositories": [
|
||||||
|
{
|
||||||
|
"type": "vcs",
|
||||||
|
"url": "https://git.indifferentketchup.com/indifferentketchup/ik-codex"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
@@ -15,9 +21,7 @@
|
|||||||
"ext-mongodb": "*",
|
"ext-mongodb": "*",
|
||||||
"ext-uri": "*",
|
"ext-uri": "*",
|
||||||
"ext-zlib": "*",
|
"ext-zlib": "*",
|
||||||
"aternos/codex-hytale": "^2.0",
|
"indifferentketchup/codex": "^0.2.0",
|
||||||
"aternos/codex-minecraft": "^5.0.1",
|
|
||||||
"aternos/sherlock": "^1.0.2",
|
|
||||||
"mongodb/mongodb": "2.1.2"
|
"mongodb/mongodb": "2.1.2"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
|||||||
184
composer.lock
generated
184
composer.lock
generated
@@ -4,21 +4,15 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "a570f76a4698742115ca4d1d4113a836",
|
"content-hash": "821a03243eb4b751e38ca3f8f063dd3e",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "aternos/codex",
|
"name": "indifferentketchup/codex",
|
||||||
"version": "v4.1.0",
|
"version": "v0.2.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/aternosorg/codex.git",
|
"url": "https://git.indifferentketchup.com/indifferentketchup/ik-codex",
|
||||||
"reference": "2d0b1930464d9c5129e90c5e69314b1da22c7c4a"
|
"reference": "2bd4fe6189c21be5b1fb03e8ac23b1a3c01d747c"
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/aternosorg/codex/zipball/2d0b1930464d9c5129e90c5e69314b1da22c7c4a",
|
|
||||||
"reference": "2d0b1930464d9c5129e90c5e69314b1da22c7c4a",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=8.4"
|
"php": ">=8.4"
|
||||||
@@ -29,161 +23,31 @@
|
|||||||
"type": "library",
|
"type": "library",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Aternos\\Codex\\": "src/"
|
"IndifferentKetchup\\Codex\\": "src/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"autoload-dev": {
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Matthias Neid",
|
|
||||||
"email": "matthias@aternos.org"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "PHP library to read, parse, print and analyse log files.",
|
|
||||||
"support": {
|
|
||||||
"issues": "https://github.com/aternosorg/codex/issues",
|
|
||||||
"source": "https://github.com/aternosorg/codex/tree/v4.1.0"
|
|
||||||
},
|
|
||||||
"time": "2026-01-21T14:12:19+00:00"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "aternos/codex-hytale",
|
|
||||||
"version": "v2.0.0",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/aternosorg/codex-hytale.git",
|
|
||||||
"reference": "9b48e2d0fa4b82a3f10c8833a766b7e76e233271"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/aternosorg/codex-hytale/zipball/9b48e2d0fa4b82a3f10c8833a766b7e76e233271",
|
|
||||||
"reference": "9b48e2d0fa4b82a3f10c8833a766b7e76e233271",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"aternos/codex": "^v4.1.0",
|
|
||||||
"ext-json": "*",
|
|
||||||
"php": ">=8.4.0"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"phpunit/phpunit": "^12.4"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Aternos\\Codex\\Hytale\\": "src/"
|
"IndifferentKetchup\\Codex\\Test\\Src\\": "test/src/",
|
||||||
|
"IndifferentKetchup\\Codex\\Test\\Tests\\": "test/tests/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"scripts": {
|
||||||
|
"test": [
|
||||||
|
"phpunit test/tests"
|
||||||
|
]
|
||||||
|
},
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "Matthias",
|
"name": "indifferentketchup",
|
||||||
"email": "matthias@aternos.org"
|
"email": "samkintop@gmail.com"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "PHP library to read, parse, print and analyse Hytale log files.",
|
"description": "Generic PHP log parsing and analysis framework.",
|
||||||
"support": {
|
"time": "2026-05-01T22:08:43+00:00"
|
||||||
"issues": "https://github.com/aternosorg/codex-hytale/issues",
|
|
||||||
"source": "https://github.com/aternosorg/codex-hytale/tree/v2.0.0"
|
|
||||||
},
|
|
||||||
"time": "2026-01-23T12:25:09+00:00"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "aternos/codex-minecraft",
|
|
||||||
"version": "v5.1.0",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/aternosorg/codex-minecraft.git",
|
|
||||||
"reference": "f921d0277449af04a72c3dbb784e37b5fa4934b1"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/aternosorg/codex-minecraft/zipball/f921d0277449af04a72c3dbb784e37b5fa4934b1",
|
|
||||||
"reference": "f921d0277449af04a72c3dbb784e37b5fa4934b1",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"aternos/codex": "^v4.1.0",
|
|
||||||
"ext-json": "*",
|
|
||||||
"php": ">=8.4.0"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"phpunit/phpunit": "^12"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"Aternos\\Codex\\Minecraft\\": "src/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Matthias",
|
|
||||||
"email": "matthias@aternos.org"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "PHP library to read, parse, print and analyse Minecraft log files.",
|
|
||||||
"support": {
|
|
||||||
"issues": "https://github.com/aternosorg/codex-minecraft/issues",
|
|
||||||
"source": "https://github.com/aternosorg/codex-minecraft/tree/v5.1.0"
|
|
||||||
},
|
|
||||||
"time": "2026-03-30T18:21:47+00:00"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "aternos/sherlock",
|
|
||||||
"version": "v1.1.3",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/aternosorg/sherlock.git",
|
|
||||||
"reference": "2bfb6427790b24df860f20905b76f09978a7df3a"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/aternosorg/sherlock/zipball/2bfb6427790b24df860f20905b76f09978a7df3a",
|
|
||||||
"reference": "2bfb6427790b24df860f20905b76f09978a7df3a",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"ext-curl": "*",
|
|
||||||
"ext-simplexml": "*",
|
|
||||||
"ext-zlib": "*",
|
|
||||||
"php": ">=8.0"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"phpunit/phpunit": "^9.5"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"Aternos\\Sherlock\\": "src/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Julian Vennen",
|
|
||||||
"email": "julian@aternos.org"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "PHP library to apply minecraft mappings to log files",
|
|
||||||
"support": {
|
|
||||||
"issues": "https://github.com/aternosorg/sherlock/issues",
|
|
||||||
"source": "https://github.com/aternosorg/sherlock/tree/v1.1.3"
|
|
||||||
},
|
|
||||||
"time": "2026-02-09T10:37:21+00:00"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "mongodb/mongodb",
|
"name": "mongodb/mongodb",
|
||||||
@@ -314,16 +178,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/polyfill-php85",
|
"name": "symfony/polyfill-php85",
|
||||||
"version": "v1.33.0",
|
"version": "v1.37.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/polyfill-php85.git",
|
"url": "https://github.com/symfony/polyfill-php85.git",
|
||||||
"reference": "d4e5fcd4ab3d998ab16c0db48e6cbb9a01993f91"
|
"reference": "fcfa4973a9917cef23f2e38774da74a2b7d115ee"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/polyfill-php85/zipball/d4e5fcd4ab3d998ab16c0db48e6cbb9a01993f91",
|
"url": "https://api.github.com/repos/symfony/polyfill-php85/zipball/fcfa4973a9917cef23f2e38774da74a2b7d115ee",
|
||||||
"reference": "d4e5fcd4ab3d998ab16c0db48e6cbb9a01993f91",
|
"reference": "fcfa4973a9917cef23f2e38774da74a2b7d115ee",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -370,7 +234,7 @@
|
|||||||
"shim"
|
"shim"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/polyfill-php85/tree/v1.33.0"
|
"source": "https://github.com/symfony/polyfill-php85/tree/v1.37.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -390,7 +254,7 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2025-06-23T16:12:55+00:00"
|
"time": "2026-04-26T13:10:57+00:00"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"packages-dev": [],
|
"packages-dev": [],
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace IndifferentKetchup\Iblogs\Api\Response;
|
namespace IndifferentKetchup\Iblogs\Api\Response;
|
||||||
|
|
||||||
use Aternos\Codex\Log\LogInterface;
|
use IndifferentKetchup\Codex\Log\LogInterface;
|
||||||
|
|
||||||
class CodexLogResponse extends ApiResponse
|
class CodexLogResponse extends ApiResponse
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,27 +2,19 @@
|
|||||||
|
|
||||||
namespace IndifferentKetchup\Iblogs\Data;
|
namespace IndifferentKetchup\Iblogs\Data;
|
||||||
|
|
||||||
use Aternos\Codex\Analysis\Information;
|
use IndifferentKetchup\Codex\Log\LogInterface;
|
||||||
use Aternos\Codex\Log\AnalysableLog;
|
|
||||||
use Aternos\Codex\Log\LogInterface;
|
|
||||||
use Aternos\Codex\Minecraft\Analysis\Information\Vanilla\VanillaVersionInformation;
|
|
||||||
use Aternos\Codex\Minecraft\Log\Minecraft\Vanilla\Fabric\FabricLog;
|
|
||||||
use Aternos\Codex\Minecraft\Log\Minecraft\Vanilla\VanillaClientLog;
|
|
||||||
use Aternos\Codex\Minecraft\Log\Minecraft\Vanilla\VanillaCrashReportLog;
|
|
||||||
use Aternos\Codex\Minecraft\Log\Minecraft\Vanilla\VanillaLog;
|
|
||||||
use Aternos\Codex\Minecraft\Log\Minecraft\Vanilla\VanillaNetworkProtocolErrorReportLog;
|
|
||||||
use Aternos\Codex\Minecraft\Log\Minecraft\Vanilla\VanillaServerLog;
|
|
||||||
use IndifferentKetchup\Iblogs\Cache\CacheEntry;
|
|
||||||
use Aternos\Sherlock\MapLocator\FabricMavenMapLocator;
|
|
||||||
use Aternos\Sherlock\MapLocator\LauncherMetaMapLocator;
|
|
||||||
use Aternos\Sherlock\Maps\GZURLYarnMap;
|
|
||||||
use Aternos\Sherlock\Maps\ObfuscationMap;
|
|
||||||
use Aternos\Sherlock\Maps\URLVanillaObfuscationMap;
|
|
||||||
use Aternos\Sherlock\Maps\VanillaObfuscationMap;
|
|
||||||
use Aternos\Sherlock\Maps\YarnMap;
|
|
||||||
use Aternos\Sherlock\ObfuscatedString;
|
|
||||||
use Exception;
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stub for v1 — `mclogs` used `aternos/sherlock` plus the Vanilla / Fabric
|
||||||
|
* Minecraft codex log subclasses to deobfuscate Mojang and Yarn mappings
|
||||||
|
* in stack traces. iblogs targets Project Zomboid, which uses no such
|
||||||
|
* mapping scheme, so the deobfuscator is a no-op until iblogs gains
|
||||||
|
* Minecraft support.
|
||||||
|
*
|
||||||
|
* Restore the original mapping flow (Sherlock map locators + obfuscation
|
||||||
|
* maps) when re-introducing Minecraft logs. The historical implementation
|
||||||
|
* lives in mclogs upstream commits prior to the iblogs fork.
|
||||||
|
*/
|
||||||
class Deobfuscator
|
class Deobfuscator
|
||||||
{
|
{
|
||||||
public function __construct(protected LogInterface $codexLog)
|
public function __construct(protected LogInterface $codexLog)
|
||||||
@@ -31,108 +23,6 @@ class Deobfuscator
|
|||||||
|
|
||||||
public function deobfuscate(): ?string
|
public function deobfuscate(): ?string
|
||||||
{
|
{
|
||||||
if (!$this->codexLog instanceof AnalysableLog) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
if (!$this->codexLog instanceof VanillaLog) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
$analysis = $this->codexLog->analyse();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var ?Information $version
|
|
||||||
*/
|
|
||||||
$version = $analysis->getFilteredInsights(VanillaVersionInformation::class)[0] ?? null;
|
|
||||||
if (!$version) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
$version = $version->getValue();
|
|
||||||
|
|
||||||
try {
|
|
||||||
$map = $this->getObfuscationMap($version);
|
|
||||||
} catch (Exception) {
|
|
||||||
$map = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($map === null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
$obfuscatedContent = new ObfuscatedString($this->codexLog->getLogFile()->getContent(), $map);
|
|
||||||
if ($content = $obfuscatedContent->getMappedContent()) {
|
|
||||||
return $content;
|
|
||||||
}
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/**
|
|
||||||
* Get the obfuscation map matching this log
|
|
||||||
*
|
|
||||||
* @param $version
|
|
||||||
* @return ObfuscationMap|null
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
protected function getObfuscationMap($version): ?ObfuscationMap
|
|
||||||
{
|
|
||||||
if (in_array(get_class($this->codexLog), [
|
|
||||||
VanillaServerLog::class,
|
|
||||||
VanillaClientLog::class,
|
|
||||||
VanillaCrashReportLog::class,
|
|
||||||
VanillaNetworkProtocolErrorReportLog::class
|
|
||||||
])) {
|
|
||||||
$urlCache = new CacheEntry("sherlock:vanilla:$version:client");
|
|
||||||
|
|
||||||
$mapURL = $urlCache->get();
|
|
||||||
if (!$mapURL) {
|
|
||||||
$mapURL = new LauncherMetaMapLocator($version, "client")->findMappingURL();
|
|
||||||
|
|
||||||
if (!$mapURL) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
$urlCache->set($mapURL, 30 * 24 * 60 * 60);
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
$mapCache = new CacheEntry("sherlock:$mapURL");
|
|
||||||
if ($mapContent = $mapCache->get()) {
|
|
||||||
$map = new VanillaObfuscationMap($mapContent);
|
|
||||||
} else {
|
|
||||||
$map = new URLVanillaObfuscationMap($mapURL);
|
|
||||||
$mapCache->set($map->getContent());
|
|
||||||
}
|
|
||||||
} catch (Exception) {
|
|
||||||
}
|
|
||||||
return $map ?? null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->codexLog instanceof FabricLog) {
|
|
||||||
$urlCache = new CacheEntry("sherlock:yarn:$version:server");
|
|
||||||
|
|
||||||
$mapURL = $urlCache->get();
|
|
||||||
if (!$mapURL) {
|
|
||||||
$mapURL = new FabricMavenMapLocator($version)->findMappingURL();
|
|
||||||
|
|
||||||
if (!$mapURL) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
$urlCache->set($mapURL, 24 * 60 * 60);
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
$mapCache = new CacheEntry("sherlock:$mapURL");
|
|
||||||
if ($mapContent = $mapCache->get()) {
|
|
||||||
$map = new YarnMap($mapContent);
|
|
||||||
} else {
|
|
||||||
$map = new GZURLYarnMap($mapURL);
|
|
||||||
$mapCache->set($map->getContent());
|
|
||||||
}
|
|
||||||
} catch (Exception) {
|
|
||||||
}
|
|
||||||
return $map ?? null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -2,15 +2,12 @@
|
|||||||
|
|
||||||
namespace IndifferentKetchup\Iblogs;
|
namespace IndifferentKetchup\Iblogs;
|
||||||
|
|
||||||
use Aternos\Codex\Minecraft\Log\Minecraft\MinecraftLog;
|
use IndifferentKetchup\Codex\Detective\ProjectZomboid\ProjectZomboidDetective;
|
||||||
|
|
||||||
class Detective extends \Aternos\Codex\Detective\Detective
|
class Detective extends \IndifferentKetchup\Codex\Detective\Detective
|
||||||
{
|
{
|
||||||
protected string $defaultLogClass = MinecraftLog::class;
|
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->addDetective(new \Aternos\Codex\Minecraft\Detective\Detective())
|
$this->addDetective(new ProjectZomboidDetective());
|
||||||
->addDetective(new \Aternos\Codex\Hytale\Detective\Detective());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
10
src/Log.php
10
src/Log.php
@@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
namespace IndifferentKetchup\Iblogs;
|
namespace IndifferentKetchup\Iblogs;
|
||||||
|
|
||||||
use Aternos\Codex\Analysis\Analysis;
|
use IndifferentKetchup\Codex\Analysis\Analysis;
|
||||||
use Aternos\Codex\Log\AnalysableLogInterface;
|
use IndifferentKetchup\Codex\Log\AnalysableLogInterface;
|
||||||
use Aternos\Codex\Log\File\StringLogFile;
|
use IndifferentKetchup\Codex\Log\File\StringLogFile;
|
||||||
use Aternos\Codex\Log\Level;
|
use IndifferentKetchup\Codex\Log\Level;
|
||||||
use Aternos\Codex\Log\LogInterface;
|
use IndifferentKetchup\Codex\Log\LogInterface;
|
||||||
use IndifferentKetchup\Iblogs\Config\ConfigKey;
|
use IndifferentKetchup\Iblogs\Config\ConfigKey;
|
||||||
use IndifferentKetchup\Iblogs\Data\Deobfuscator;
|
use IndifferentKetchup\Iblogs\Data\Deobfuscator;
|
||||||
use IndifferentKetchup\Iblogs\Data\MetadataEntry;
|
use IndifferentKetchup\Iblogs\Data\MetadataEntry;
|
||||||
|
|||||||
@@ -2,19 +2,23 @@
|
|||||||
|
|
||||||
namespace IndifferentKetchup\Iblogs\Printer;
|
namespace IndifferentKetchup\Iblogs\Printer;
|
||||||
|
|
||||||
|
use IndifferentKetchup\Codex\Printer\Modification;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class FormatModification
|
* Stub for v1 — `mclogs` extended `Aternos\Codex\Minecraft\Printer\FormatModification`
|
||||||
|
* to translate Minecraft section-sign format codes into HTML format spans
|
||||||
|
* (`format-black`, `format-darkblue`, etc., backed by the format-colors block
|
||||||
|
* in the iblogs CSS). Project Zomboid logs do not carry these codes, so this
|
||||||
|
* Modification is a pass-through under iblogs.
|
||||||
*
|
*
|
||||||
* @package Printer
|
* The CSS `format-*` color classes are retained so re-introducing a real
|
||||||
|
* Minecraft FormatModification later (or any other game with its own
|
||||||
|
* format-code scheme) can reuse the existing styling.
|
||||||
*/
|
*/
|
||||||
class FormatModification extends \Aternos\Codex\Minecraft\Printer\FormatModification
|
class FormatModification extends Modification
|
||||||
{
|
{
|
||||||
/**
|
public function modify(string $text): string
|
||||||
* @param string $format
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
protected function getClasses(string $format): string
|
|
||||||
{
|
{
|
||||||
return "format format-" . $format;
|
return $text;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
namespace IndifferentKetchup\Iblogs\Printer;
|
namespace IndifferentKetchup\Iblogs\Printer;
|
||||||
|
|
||||||
use Aternos\Codex\Log\Entry;
|
use IndifferentKetchup\Codex\Log\Entry;
|
||||||
use Aternos\Codex\Log\EntryInterface;
|
use IndifferentKetchup\Codex\Log\EntryInterface;
|
||||||
use Aternos\Codex\Log\Level;
|
use IndifferentKetchup\Codex\Log\Level;
|
||||||
use Aternos\Codex\Log\LineInterface;
|
use IndifferentKetchup\Codex\Log\LineInterface;
|
||||||
use Aternos\Codex\Printer\ModifiableDefaultPrinter;
|
use IndifferentKetchup\Codex\Printer\ModifiableDefaultPrinter;
|
||||||
use IndifferentKetchup\Iblogs\Id;
|
use IndifferentKetchup\Iblogs\Id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user