boformer / BuildingThemes

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

Add Building Theme Mods #40

Closed boformer closed 9 years ago

boformer commented 9 years ago

Adds a new method to BuildingThemesManager that allows mods to register themes at runtime.

boformer commented 9 years ago

This is how a theme mod would look like: https://gist.github.com/boformer/0be4dda77590cb322d95

One problem is that if you disable the theme mod, the theme is still there until you restart the game. Another problem is that themes are deleted if the Building Themes mod resets for some reason.

boformer commented 9 years ago

I found a better solution:

The configuration file is now reloaded whenever a city is loaded to solve this problem:

One problem is that if you disable the theme mod, the theme is still there until you restart the game.

Also, there is now an interface for theme mods: IBuildingThemeUserMod The theme mods only have to implement the interface, the main mod searches for mods implementing the interface and adds them to the config.