Skip to content

Commit

Permalink
do not strip ids when exporting mod
Browse files Browse the repository at this point in the history
  • Loading branch information
seiyria committed Aug 19, 2024
1 parent 766cd5f commit 7cadaa1
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/app/helpers/exporter.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,9 @@
import { IModKit } from '../../interfaces';
import { formatItems, formatNPCs, formatSpawners } from './export';

function stripIds(modData: IModKit) {
Object.keys(modData).forEach((modKey) => {
const key = modKey as keyof IModKit;

if (key === 'meta') return;

modData[key].forEach((ident: any) => delete ident._id);
});
}

export function formatMod(modData: IModKit): IModKit {
const backup = structuredClone(modData);

stripIds(modData);

const exported: IModKit = {
meta: {
...structuredClone(modData.meta),
Expand Down

0 comments on commit 7cadaa1

Please sign in to comment.