I noticed that the material component allows for a tags_modified field that is used to prevent changed modified tags from being reset:
function MaterialComponent:restore() if self._sv.tags_modified then self:set_tag_string(self._sv.tags_string) else self:_read_tags_from_json() end end
One issue I noticed was that on initialization, tags_modified is not checked for when the json is read:
function MaterialComponent:_read_tags_from_json() local json = radiant.entities.get_json(self) local tags = json and json.tags or '' self:set_tag_string(tags) end
It’d be useful to check for tags_modified = true on intialization because a mod might have modified the tags through a “mixinto.” Currently, if a mod does so, the tags will be reset back to the unmodded tags on reload. Do you think this could be added into the next release (its a quick fix)? I’m currently overriding the material_component.lua to achieve this but I’ve been told to avoid overriding.