Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion features/Terrain Helper/Shaders/Features/TerrainHelper.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
[Info]
Version = 1-0-1
# Activation-only feature (all code lives in the core mod, no shaders here), so
# opt out of version auditing — bumping this toggle .ini on every edit is churn.
AuditVersion = false

[Nexus]
nexusmodid = 143149
nexusfilegroupid = 000000
nexusfilename = Terrain Helper
autoupload = false
autoupload = true
17 changes: 16 additions & 1 deletion tools/feature_version_audit.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def get_feature_ini_metadata(feature_dir_or_ini_path):
if not sections:
sections = ['Info'] if parser.has_section('Info') else []

metadata = {'auto_upload': False}
metadata = {'auto_upload': False, 'audit_version': True}
for section in sections:
if not parser.has_section(section):
continue
Expand All @@ -196,6 +196,15 @@ def get_feature_ini_metadata(feature_dir_or_ini_path):
if auto_upload_str is not None:
metadata['auto_upload'] = str(auto_upload_str).strip().lower() not in ('false', '0', 'no', 'off', '')

# Activation-only features keep all code in the core mod; their toggle
# .ini opts out of version auditing/bumping with `AuditVersion = false`.
# Auditing is on by default, so a blank value must NOT exclude the ini:
# only explicit falsy values opt out (unlike auto_upload, which is opt-in
# and treats blank as off).
audit_version_str = section_items.get('auditversion') or section_items.get('audit_version')
if audit_version_str is not None:
metadata['audit_version'] = str(audit_version_str).strip().lower() not in ('false', '0', 'no', 'off')

section_metadata = {
'mod_id': section_items.get('nexusmodid') or section_items.get('nexus_mod_id') or section_items.get('mod_id'),
'mod_filename': section_items.get('nexusfilename') or section_items.get('nexus_filename') or section_items.get('nexusmodfilename') or section_items.get('nexus_mod_filename') or section_items.get('mod_filename') or section_items.get('modname') or section_items.get('name'),
Expand Down Expand Up @@ -630,6 +639,12 @@ def get_feature_key(feature_dir, feature_meta_map):

meta = feature_meta_map.get(feature_key)
ini_path = get_feature_ini(feature_dir)
# Activation-only features (e.g. Terrain Helper) opt out of version
# auditing via `AuditVersion = false` in their .ini: all their code lives
# in the core mod, so bumping the toggle .ini on every edit is meaningless
# churn. Skip them entirely from bump suggestions and PR-check failures.
if ini_path and not get_feature_ini_metadata(ini_path).get('audit_version', True):
continue
# Use last release tag (version_ref) as the baseline for version proposals so that
# multiple PRs between releases don't accumulate spurious bumps.
prior_ver = get_prior_version(ini_path, version_ref) if ini_path else None
Expand Down
Loading