<Operation Class="PatchOperationSetName"> only for nodes containing xml childs

Started by smarrazzo, February 05, 2018, 11:13:05 AM

Previous topic - Next topic

smarrazzo

I used :
   
<Operation Class="PatchOperationSetName">
        <xpath>*/ThingDef[defName = "Ship_Beam"]/costList/Steel</xpath>
        <name>SteelBar</name>
    </Operation>

and i discovered that this dosen't work for nodes containing straight values because in the class PatchOperationSetName we have the line:
element.InnerXml = current.InnerXml;
and  this is valid only for nodes with chidren  and thus generating an xml exception when parsing, for nodes containing strings and numbers or straight values in general...
Plz tynan fix it...