Skip to content

Conversation

@dgibbs64
Copy link
Member

@dgibbs64 dgibbs64 commented Aug 9, 2025

Description

This pull request consolidates and improves the Unreal map compression modules in the project. It replaces the previous separate scripts for Unreal and Unreal 2 map compression with a unified and more robust script, updates the command definitions and options accordingly, and removes redundant code. The main benefits are easier maintenance, broader file type support, and improved user experience.

Module Consolidation and Improvements:

  • Added a new unified compress_unreal_maps.sh script that compresses both Unreal and Unreal 2 maps, supports a wider range of file types, provides better output, and handles old compressed files more robustly.
  • Removed the old compress_ut99_maps.sh and compress_unreal2_maps.sh scripts, as their functionality is now covered by the new unified script. [1] [2]
  • Updated module fetching logic to remove references to the deleted scripts.

Command and Option Updates:

  • Updated core_getopt.sh to define a single cmd_map_compressor_unreal command for all Unreal engines, replacing the previous separate commands for UT99 and Unreal 2. Also updated the logic that adds this command based on the engine type. [1] [2]

Other Improvements:

  • Added a missing core_exit.sh call to the end of install_ut2k4_key.sh for consistent script termination.
  • Disabled shellcheck warning SC2154 in .shellcheckrc to avoid false positives about undefined variables.

Fixes #3632

Type of change

  • Bug fix (a change which fixes an issue).
  • New feature (a change which adds functionality).
  • New Server (new server added).
  • Refactor (restructures existing code).
  • Comment update (typo, spelling, explanation, examples, etc).

Checklist

PR will not be merged until all steps are complete.

  • This pull request links to an issue.
  • This pull request uses the develop branch as its base.
  • This pull request subject follows the Conventional Commits standard.
  • This code follows the style guidelines of this project.
  • I have performed a self-review of my code.
  • I have checked that this code is commented where required.
  • I have provided a detailed enough description of this PR.
  • I have checked if documentation needs updating.

Documentation

If documentation does need updating either update it by creating a PR (preferred) or request a documentation update.

Thank you for your Pull Request!

@dgibbs64 dgibbs64 added this to the v25.2.0 milestone Aug 9, 2025
Copilot AI review requested due to automatic review settings August 9, 2025 00:12
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR consolidates Unreal map compression functionality by replacing separate scripts for Unreal and Unreal 2 with a unified, more robust solution that supports broader file types and provides improved user experience.

  • Replaces compress_ut99_maps.sh and compress_unreal2_maps.sh with a single compress_unreal_maps.sh script
  • Updates command definitions to use unified cmd_map_compressor_unreal for all Unreal engines
  • Adds missing core_exit.sh call to install_ut2k4_key.sh and disables SC2154 shellcheck warning

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
lgsm/modules/compress_unreal_maps.sh New unified compression script supporting multiple file types with improved error handling
lgsm/modules/compress_ut99_maps.sh Removed old UT99-specific compression script
lgsm/modules/compress_unreal2_maps.sh Removed old Unreal 2-specific compression script
lgsm/modules/core_getopt.sh Updated to use single unified map compressor command
lgsm/modules/core_modules.sh Removed reference to deleted compress_ut99_maps.sh
lgsm/modules/install_ut2k4_key.sh Added missing core_exit.sh call
.shellcheckrc Added SC2154 disable rule

@dgibbs64 dgibbs64 linked an issue Aug 9, 2025 that may be closed by this pull request
@dgibbs64 dgibbs64 enabled auto-merge (squash) August 9, 2025 00:22
@dgibbs64 dgibbs64 force-pushed the feature/3632-map-compress branch from 25f5b40 to b92aecb Compare August 9, 2025 00:34
dgibbs64 and others added 5 commits August 9, 2025 01:36
* Removed `compress_ut99_maps.sh` and integrated its functionality into `compress_unreal_maps.sh`.
* Updated `core_getopt.sh` to reference the new unified compression script.
* Cleaned up `core_modules.sh` by removing the obsolete function for `compress_ut99_maps.sh`.
* Added `core_exit.sh` call to `install_ut2k4_key.sh` for consistent exit handling.
* Updated the loop to iterate over the `exts` array correctly using `"${exts[@]}"` instead of `${exts}`.
* This change ensures proper handling of file extensions during the compression process.
@dgibbs64 dgibbs64 force-pushed the feature/3632-map-compress branch from b92aecb to 49f5cd3 Compare August 9, 2025 00:36
@dgibbs64 dgibbs64 merged commit 4714851 into develop Aug 9, 2025
4 checks passed
@dgibbs64 dgibbs64 deleted the feature/3632-map-compress branch August 9, 2025 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] LGSM Compress UE maps improvements

1 participant