Skip to content

Commit 3fee372

Browse files
committed
feat(exd): reduce useless logging
1 parent 555987f commit 3fee372

2 files changed

Lines changed: 16 additions & 1 deletion

File tree

packages/exd/src/csv.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,12 @@ export class CSVExporter {
108108
return `"${formatSeString(seString).replace(/"/g, '""')}"`
109109
} catch (error) {
110110
const hex = value.toString('hex')
111-
console.warn('Failed parsing hex', hex, 'as SeString:', error)
111+
console.warn(
112+
'Failed parsing hex',
113+
hex,
114+
'as SeString:',
115+
error instanceof Error ? error.message : error,
116+
)
112117
return `__HEX__${hex}`
113118
}
114119
}

packages/exd/src/sestring/format.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,22 @@ export function formatSeString(seString: SeString): string {
144144
switch (payloadType) {
145145
// SaintCoinach formats SeString as a string with hex values for certain tags
146146
case Type.Fixed:
147+
case Type.ResetTime:
147148
case Type.UIForeground:
148149
case Type.UIGlow:
149150
case Type.Unknown0A:
150151
case Type.Unknown14:
152+
case Type.Unknown17:
151153
case Type.Unknown2D:
152154
case Type.Unknown60:
155+
// Known unhandled tags
156+
case 27 as Type:
157+
case 28 as Type:
158+
case 38 as Type:
159+
case 65 as Type:
160+
case 66 as Type:
161+
case 81 as Type:
162+
case 97 as Type:
153163
parts.push(
154164
formatHexValueTag(
155165
tagName,

0 commit comments

Comments
 (0)