mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-19 15:33:12 +09:00
Covers the icon_size default of 64 in the export icon loaders and the host recreating saves and script-output when an instance is assigned. Both tests fail when the original fix is reverted. Closes #710 Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
839f9eb56c
commit
ae6e25d1b9
4 files changed
+78
-10
No files matched your search
@@ -160,7 +160,7 @@ async function loadSimpleIcon(
|
||||
item: SimpleIconSpecification,
|
||||
size: number,
|
||||
iconCache: IconCache,
|
||||
) {
|
||||
): Promise<Image | null> {
|
||||
let icon = await loadIcon(server, modVersions, item.icon, item.icon_size ?? 64, 0, iconCache);
|
||||
if (icon) {
|
||||
let iconScale = size / (item.icon_size ?? 64);
|
||||
@@ -178,7 +178,7 @@ async function loadLayeredIcon(
|
||||
item: LayeredIconSpecification,
|
||||
size: number,
|
||||
iconCache: IconCache,
|
||||
) {
|
||||
): Promise<Image> {
|
||||
let baseLayerSize = (item.icons[0].icon_size || item.icon_size) ?? 64;
|
||||
let icon = new Jimp({ width: size, height: size });
|
||||
|
||||
@@ -590,3 +590,5 @@ export async function exportData(server: FactorioServer) {
|
||||
|
||||
// For testing only
|
||||
export const _exportLocale = exportLocale;
|
||||
export const _loadSimpleIcon = loadSimpleIcon;
|
||||
export const _loadLayeredIcon = loadLayeredIcon;
|
||||
Reference in new issue
Block a user