Closed boformer closed 9 years ago
You should change Serialize/Deserialize methods too like we discussed (don't save built in buildings if they belong to built in theme and save them otherwise)
Testing with this configuration:
<?xml version="1.0" encoding="utf-8"?>
<Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Themes>
<Theme name="European">
<Buildings>
<Building name="455335791.ERHL1A_Data" />
<Building name="455719510.ERHL1B_Data" />
<Building name="456227170.ERHL1C_Data" />
<Building name="457264872.ERHL1Cnr1_Data" />
<Building name="458977545.ERHL1Cnr Pub_Data" />
</Buildings>
</Theme>
<Theme name="Edinburgh">
<Buildings>
<Building name="455335791.ERHL1A_Data" />
<Building name="455719510.ERHL1B_Data" />
<Building name="456227170.ERHL1C_Data" />
<Building name="457264872.ERHL1Cnr1_Data" />
<Building name="458977545.ERHL1Cnr Pub_Data" />
</Buildings>
</Theme>
</Themes>
</Configuration>
Custom assets used: http://steamcommunity.com/workshop/filedetails/?id=455727807
It works.
@earalov I changed the Serialize method.
I am gone for 2 hours (cooking dinner). If you want, push the changes you want to make to this branch and merge it.
I changed the Serialize method.
I see. Extended parts of built-in themes should be saved too.
That makes the isBuiltIn flag for themes kind of pointless. Can I just remove it?
We can either save all themes to the config file, or only those with at least one custom building.
No it's not pointless. I'm going to commit to this branch in several minutes and I will show why.
Great, i forgot to merge this :/
Fixes #18