boformer / BuildingThemes

Mod for Cities:Skylines
http://steamcommunity.com/sharedfiles/filedetails/?id=466158459
MIT License
13 stars 11 forks source link

Built-in status not conserved when include changed. #62

Closed SamsamTS closed 9 years ago

SamsamTS commented 9 years ago

I investigated the problem reported by Benny :

The only problem I have with this mod at the moment is that when I disable any building from the default sets ingame from the theme manager it only works temporarily. They re-enable each time I quit and reload the game.

The isBuiltIn property of a built-in building that has been disabled is set to false when re-loading the config. Is this intended?

boformer commented 9 years ago

isBuiltIn = true means that the item is not saved in the main config

false means it is saved in the main config.

boformer commented 9 years ago

Here is the code that determines if a should be saved in the main cfg: https://github.com/boformer/BuildingThemes/blob/master/BuildingThemes/Configuration.cs#L160

SamsamTS commented 9 years ago

Humm I have to rethink some part of the UI logic then. How can I detect that the value has been restored to the built-in status?

Same for the themes, how can I detect that the theme cannot be deleted. The isBuiltIn property isn't the correct information.

boformer commented 9 years ago

We need a new config solution for that.

One that maintains 2 separate configs:

SamsamTS commented 9 years ago

The temporary fix will do for now I guess then.

boformer commented 9 years ago

Fixed in https://github.com/boformer/BuildingThemes/commit/151cbbd16fe17b99718a6e665db8c0ede26338a0