Finalize Farclip release polish
This commit is contained in:
@@ -1,70 +0,0 @@
|
||||
name: Finalize Farclip Release Polish
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'test/farclip-config-sync'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
finalize:
|
||||
if: ${{ github.event.head_commit.message == 'Prepare Farclip final release polish' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout branch
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: test/farclip-config-sync
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Apply final Farclip release polish
|
||||
shell: bash
|
||||
run: |
|
||||
python - <<'PY'
|
||||
from pathlib import Path
|
||||
|
||||
def replace_exact(path, old, new):
|
||||
p = Path(path)
|
||||
text = p.read_text(encoding='utf-8')
|
||||
if old not in text:
|
||||
raise SystemExit(f'Expected text not found in {path}: {old!r}')
|
||||
p.write_text(text.replace(old, new, 1), encoding='utf-8')
|
||||
|
||||
replace_exact(
|
||||
'setup_tool.py',
|
||||
' "farclip": "Increases the maximum terrain render distance. Vanilla default is 777. Tweaks default is 1500.",',
|
||||
' "farclip": "Sets the active terrain render distance used by the game. Vanilla default is 777. The Tool keeps the executable Farclip ceiling fixed at 3000.",',
|
||||
)
|
||||
replace_exact(
|
||||
'setup_tool.py',
|
||||
' self.create_slider_row(frame_nums, 0, "Render distance (Farclip) [Safe Max: 1500]:", self.vt_farclip, 777, 1500, 10000, "farclip")',
|
||||
' self.create_slider_row(frame_nums, 0, "Render distance (Farclip) [Safe Max: 1500]:", self.vt_farclip, 777, 1500, 3000, "farclip")',
|
||||
)
|
||||
replace_exact(
|
||||
'setup_tool_dynamic.py',
|
||||
' signature = super()._vanilla_tweaks_signature()\n # Bump when normalization changes so existing managed installs get one',
|
||||
' signature = super()._vanilla_tweaks_signature()\n # Runtime Farclip lives in Config.wtf; the executable ceiling is fixed.\n # Keep the executable signature stable when only Render Distance changes.\n signature["farclip"] = int(_FARCLIP_EXE_CEILING)\n # Bump when normalization changes so existing managed installs get one',
|
||||
)
|
||||
replace_exact(
|
||||
'tests/test_farclip_config_sync.py',
|
||||
' signature = tool._vanilla_tweaks_signature()\n self.assertEqual(signature["selected_patch_normalization"], 4)',
|
||||
' signature = tool._vanilla_tweaks_signature()\n self.assertEqual(signature["selected_patch_normalization"], 4)\n self.assertEqual(signature["farclip"], 3000)\n\n tool.vt_farclip = _Var(1500)\n runtime_changed = tool._vanilla_tweaks_signature()\n self.assertEqual(runtime_changed["farclip"], 3000)\n self.assertEqual(signature, runtime_changed)',
|
||||
)
|
||||
replace_exact(
|
||||
'RELEASE_NOTES.md',
|
||||
'- SuperWoW now uses the same FoV selected by the Modernization Tool by synchronizing the `FoV` CVar in `WTF/Config.wtf`.\n',
|
||||
'- SuperWoW now uses the same FoV selected by the Modernization Tool by synchronizing the `FoV` CVar in `WTF/Config.wtf`.\n- Render Distance now keeps the executable Farclip ceiling fixed at **3000** while synchronizing the selected runtime value to `WTF/Config.wtf`, preventing stale higher Farclip values from conflicting with `WoW_Modernized.exe`.\n',
|
||||
)
|
||||
PY
|
||||
|
||||
- name: Commit finalized changes
|
||||
shell: bash
|
||||
run: |
|
||||
rm .github/workflows/finalize-farclip-release.yml
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git add setup_tool.py setup_tool_dynamic.py tests/test_farclip_config_sync.py RELEASE_NOTES.md .github/workflows/finalize-farclip-release.yml
|
||||
git commit -m "Finalize Farclip release polish"
|
||||
git push origin HEAD:test/farclip-config-sync
|
||||
@@ -10,6 +10,7 @@ This update focuses on **better compatibility, safer WoW.exe patching, improved
|
||||
- Improved support for already-patched clients while preserving client-specific loader code.
|
||||
- Removed overly strict build/version checks that could reject compatible clients.
|
||||
- SuperWoW now uses the same FoV selected by the Modernization Tool by synchronizing the `FoV` CVar in `WTF/Config.wtf`.
|
||||
- Render Distance now keeps the executable Farclip ceiling fixed at **3000** while synchronizing the selected runtime value to `WTF/Config.wtf`, preventing stale higher Farclip values from conflicting with `WoW_Modernized.exe`.
|
||||
|
||||
## 🎨 MPQ & Recovery
|
||||
|
||||
|
||||
+2
-2
@@ -111,7 +111,7 @@ class WowSetupTool:
|
||||
|
||||
# Tweaks Tab
|
||||
"fov": "Calculates horizontal Field of View mathematically scaled to maintain vertical aspect space based on your screen ratio.",
|
||||
"farclip": "Increases the maximum terrain render distance. Vanilla default is 777. Tweaks default is 1500.",
|
||||
"farclip": "Sets the active terrain render distance used by the game. Vanilla default is 777. The Tool keeps the executable Farclip ceiling fixed at 3000.",
|
||||
"frill": "Changes the ground clutter (grass) render distance. Vanilla default is 70. Tweaks default is 300.",
|
||||
"nameplate": "Increases the distance at which enemy nameplates become visible. Vanilla default is 20. Tweaks default is 41.",
|
||||
"cam": "Increases the maximum camera zoom-out distance. Vanilla default is 50. Max safe limit is 100.",
|
||||
@@ -749,7 +749,7 @@ class WowSetupTool:
|
||||
frame_nums.pack(fill='x', padx=15, pady=0)
|
||||
frame_nums.columnconfigure(1, weight=1)
|
||||
|
||||
self.create_slider_row(frame_nums, 0, "Render distance (Farclip) [Safe Max: 1500]:", self.vt_farclip, 777, 1500, 10000, "farclip")
|
||||
self.create_slider_row(frame_nums, 0, "Render distance (Farclip) [Safe Max: 1500]:", self.vt_farclip, 777, 1500, 3000, "farclip")
|
||||
self.create_slider_row(frame_nums, 1, "Ground clutter (Frilldistance) [Safe Max: 300]:", self.vt_frill, 70, 300, 1000, "frill")
|
||||
self.create_slider_row(frame_nums, 2, "Nameplate range [Safe Max: 41]:", self.vt_nameplate, 20, 41, 150, "nameplate")
|
||||
self.create_slider_row(frame_nums, 3, "Camera distance [Safe Max: 100]:", self.vt_maxcam, 50, 100, 250, "cam")
|
||||
|
||||
@@ -287,6 +287,9 @@ class ModernWowSetupTool(_ModernWowSetupToolCore):
|
||||
|
||||
def _vanilla_tweaks_signature(self):
|
||||
signature = super()._vanilla_tweaks_signature()
|
||||
# Runtime Farclip lives in Config.wtf; the executable ceiling is fixed.
|
||||
# Keep the executable signature stable when only Render Distance changes.
|
||||
signature["farclip"] = int(_FARCLIP_EXE_CEILING)
|
||||
# Bump when normalization changes so existing managed installs get one
|
||||
# clean WoW_Modernized.exe rebuild under the new policy.
|
||||
signature["selected_patch_normalization"] = 4
|
||||
|
||||
@@ -56,6 +56,12 @@ class FarclipConfigSyncTests(unittest.TestCase):
|
||||
tool.vt_bluemoon = _Var(False)
|
||||
signature = tool._vanilla_tweaks_signature()
|
||||
self.assertEqual(signature["selected_patch_normalization"], 4)
|
||||
self.assertEqual(signature["farclip"], 3000)
|
||||
|
||||
tool.vt_farclip = _Var(1500)
|
||||
runtime_changed = tool._vanilla_tweaks_signature()
|
||||
self.assertEqual(runtime_changed["farclip"], 3000)
|
||||
self.assertEqual(signature, runtime_changed)
|
||||
|
||||
def test_existing_farclip_cvar_is_replaced_without_touching_other_settings(self):
|
||||
tool = self._tool(777)
|
||||
|
||||
Reference in New Issue
Block a user