Save groups by randomized ID, and Name is a property of the group
Sahasrahla opened this issue ยท 2 comments
I would propose that you save each group with a randomized identifier string, with "name" as one of the properties. This way rules can be attached to that unique string and simply display the 'name' associated with it, even if that name is edited on the Rules page.
I believe it would look something like this in LiteMount.lua:
`["57974002-d9e7-46f2-a73d-7c4eccf55ede"] = {
[Name] = "Race-Highmountain Tauren",
[288712] = true,
[258060] = true,
[213339] = true,
[242874] = true,
},
["rules"] = {
{
"Mount [map:203,submerged] mt:232",
"Mount [map:1355,flyable,qfc:56766] mt:254",
"Mount [instance:531] mt:241",
"LimitExclude ALL",
"LimitInclude [race:HighmountainTauren] 57974002-d9e7-46f2-a73d-7c4eccf55ede",
"Mount [extra:202477,nosubmerged] id:881",
},
`
Rules currently match to Groups by the group name. If you rename your groups for any reason, it breaks the rule(s) using that group and they all have to be edited to use the new group name.
Using a UUID in this way the group name becomes an independent property, so when you rename a group it'll still be connected to the Rule and the Rules tab would simply display the updated group name.