Fix map reader ignoring valid variable names (#94387)

## About The Pull Request
Any VV edits to a map that involved numbers in a variable name would get
skipped during loading. This is because the regex pattern used to detect
variable names did not account for numbers. So for example, if you
wanted to VV edit an object's `flags_1` variable, it would get ignored
and be replaced by the initial value.

## Why It's Good For The Game
Map VV's for a ton of objects should work now.

## Changelog
🆑
fix: Fix map reader ignoring valid variable names. If a variable had a
number inside the name anywhere the map reader would ignore this value
when a map was loaded and use the initial value instead. This was due to
a faulty regex pattern that did not properly match variable names.
/🆑
This commit is contained in:
Tim
2025-12-13 20:51:19 -05:00
committed by GitHub
parent 5bd617532e
commit a0ab416d83
+1 -1
View File
@@ -102,7 +102,7 @@
/// Matches key formats in TMG (IE: newline after the \()
var/static/regex/matches_tgm = new(@'^"[A-z]*"[\s]*=[\s]*\([\s]*\n', "m")
/// Pulls out key value pairs for TGM
var/static/regex/var_edits_tgm = new(@'^\t([A-z]*) = (.*?);?$')
var/static/regex/var_edits_tgm = new(@'^\t([A-z0-9]*) = (.*?);?$')
/// Pulls out model paths for DMM
var/static/regex/model_path = new(@'(\/[^\{]*?(?:\{.*?\})?)(?:,|$)', "g")