Skip to content

Commit

Permalink
Corrected particles scripts / paths.
Browse files Browse the repository at this point in the history
Signed-off-by: Neloreck <Neloreck@gmail.com>
  • Loading branch information
Neloreck committed Jan 7, 2025
1 parent db11990 commit 506cfce
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cli/globals/paths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const BUILD_LUA_TSCONFIG: string = path.resolve(CLI_DIR, "build/tsconfig.
export const CLI_CONFIG: string = path.resolve(CLI_DIR, "config.json");

export const RESOURCES_DIR: string = path.resolve(CLI_DIR, config.resources.mod_assets_base_folder);
export const RESOURCES_PARTICLES_DIR: string = path.resolve(RESOURCES_DIR, "particles");
export const RESOURCES_PARTICLES_UNPACKED_DIR: string = path.resolve(RESOURCES_DIR, "particles_unpacked");

export const GAME_DATA_LTX_CONFIGS_DIR: string = path.resolve(CLI_DIR, config.build.configs);
export const GAME_DATA_SCRIPTS_DIR: string = path.resolve(CLI_DIR, config.build.scripts);
Expand Down
4 changes: 2 additions & 2 deletions cli/particles/pack_particles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as path from "path";

import { blue } from "chalk";

import { RESOURCES_DIR, RESOURCES_PARTICLES_DIR, TARGET_DIR, XRF_UTILS_PATH } from "#/globals";
import { RESOURCES_DIR, RESOURCES_PARTICLES_UNPACKED_DIR, TARGET_DIR, XRF_UTILS_PATH } from "#/globals";
import { NodeLogger } from "#/utils/logging";
import { TimeTracker } from "#/utils/timing";

Expand All @@ -25,7 +25,7 @@ export async function packParticles(parameters: IPackParticlesParameters = {}):
log.info("Unpacking particles file:");

const timeTracker: TimeTracker = new TimeTracker().start();
const from: string = parameters.path ?? RESOURCES_PARTICLES_DIR;
const from: string = parameters.path ?? RESOURCES_PARTICLES_UNPACKED_DIR;
const to: string = parameters.dest ?? path.resolve(RESOURCES_DIR, "particles.xr");

const command: string = `${XRF_UTILS_PATH} pack-particles -p ${from} -d ${to} ${parameters.force ? "-f" : ""}`;
Expand Down
4 changes: 2 additions & 2 deletions cli/particles/unpack_particles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as path from "path";

import { blue } from "chalk";

import { RESOURCES_DIR, RESOURCES_PARTICLES_DIR, TARGET_DIR, XRF_UTILS_PATH } from "#/globals";
import { RESOURCES_DIR, RESOURCES_PARTICLES_UNPACKED_DIR, TARGET_DIR, XRF_UTILS_PATH } from "#/globals";
import { NodeLogger } from "#/utils/logging";
import { TimeTracker } from "#/utils/timing";

Expand All @@ -26,7 +26,7 @@ export async function unpackParticles(parameters: IUnpackParticlesParameters = {

const timeTracker: TimeTracker = new TimeTracker().start();
const from: string = parameters.path ?? path.resolve(RESOURCES_DIR, "particles.xr");
const to: string = parameters.dest ?? RESOURCES_PARTICLES_DIR;
const to: string = parameters.dest ?? RESOURCES_PARTICLES_UNPACKED_DIR;

const command: string = `${XRF_UTILS_PATH} unpack-particles -p ${from} -d ${to} ${parameters.force ? "-f" : ""}`;

Expand Down
4 changes: 2 additions & 2 deletions cli/verify/verify_particles_unpacked.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as cp from "child_process";

import { blue } from "chalk";

import { RESOURCES_PARTICLES_DIR, XRF_UTILS_PATH } from "#/globals";
import { RESOURCES_PARTICLES_UNPACKED_DIR, XRF_UTILS_PATH } from "#/globals";
import { NodeLogger } from "#/utils/logging";
import { TimeTracker } from "#/utils/timing";

Expand All @@ -22,7 +22,7 @@ export async function verifyParticlesUnpacked(parameters: IFormatParticlesUnpack

const timeTracker: TimeTracker = new TimeTracker().start();

const command: string = `${XRF_UTILS_PATH} verify-particles -p ${RESOURCES_PARTICLES_DIR} -u`;
const command: string = `${XRF_UTILS_PATH} verify-particles -p ${RESOURCES_PARTICLES_UNPACKED_DIR} -u`;

log.info("Execute:", blue(command));
cp.execSync(command, { stdio: "inherit" });
Expand Down

0 comments on commit 506cfce

Please sign in to comment.