public override void OnCreated(ILoading loading) { base.OnCreated(loading); Debugger.Initialize(); Debugger.Log("ON_CREATED"); Debugger.Log("Building Themes: Initializing Mod..."); PolicyPanelEnabler.Register(); BuildingThemesManager.instance.Reset(); BuildingVariationManager.instance.Reset(); if (BuildingVariationManager.Enabled) { try { Detour.BuildingInfoDetour.Deploy(); } catch (Exception e) { Debugger.LogException(e); } } try { Detour.BuildingManagerDetour.Deploy(); } catch (Exception e) { Debugger.LogException(e); } try { Detour.ZoneBlockDetour.Deploy(); } catch (Exception e) { Debugger.LogException(e); } try { Detour.ImmaterialResourceManagerDetour.Deploy(); } catch (Exception e) { Debugger.LogException(e); } try { Detour.PrivateBuildingAIDetour <ResidentialBuildingAI> .Deploy(); } catch (Exception e) { Debugger.LogException(e); } try { Detour.PrivateBuildingAIDetour <CommercialBuildingAI> .Deploy(); } catch (Exception e) { Debugger.LogException(e); } try { Detour.PrivateBuildingAIDetour <IndustrialBuildingAI> .Deploy(); } catch (Exception e) { Debugger.LogException(e); } try { Detour.PrivateBuildingAIDetour <OfficeBuildingAI> .Deploy(); } catch (Exception e) { Debugger.LogException(e); } try { Detour.PoliciesPanelDetour.Deploy(); } catch (Exception e) { Debugger.LogException(e); } Debugger.Log("Building Themes: Mod successfully intialized."); }
public override void OnCreated(ILoading loading) { base.OnCreated(loading); Debugger.Initialize(); Debugger.Log("ON_CREATED"); Debugger.Log("Building Themes: Initializing Mod..."); try { PolicyPanelEnabler.Register(); BuildingThemesManager.instance.Reset(); BuildingVariationManager.instance.Reset(); UpdateConfig(); try { Redirector <BuildingManagerDetour> .Deploy(); Debugger.Log("Building Themes: BuildingManager Methods detoured!"); } catch (Exception e) { Debugger.LogException(e); } try { Redirector <DistrictManagerDetour> .Deploy(); Debugger.Log("Building Themes: DistrictManager Methods detoured!"); } catch (Exception e) { Debugger.LogException(e); } try { Redirector <ZoneBlockDetour> .Deploy(); Debugger.Log("Building Themes: ZoneBlock Methods detoured!"); ZoneBlockDetour.SetUp(); } catch (Exception e) { Debugger.LogException(e); } try { Detour.ImmaterialResourceManagerDetour.Deploy(); } catch (Exception e) { Debugger.LogException(e); } try { Detour.PrivateBuildingAIDetour <ResidentialBuildingAI> .Deploy(); } catch (Exception e) { Debugger.LogException(e); } try { Detour.PrivateBuildingAIDetour <CommercialBuildingAI> .Deploy(); } catch (Exception e) { Debugger.LogException(e); } try { Detour.PrivateBuildingAIDetour <IndustrialBuildingAI> .Deploy(); } catch (Exception e) { Debugger.LogException(e); } try { Detour.PrivateBuildingAIDetour <OfficeBuildingAI> .Deploy(); } catch (Exception e) { Debugger.LogException(e); } try { Detour.PoliciesPanelDetour.Deploy(); } catch (Exception e) { Debugger.LogException(e); } try { Redirector <DistrictWorldInfoPanelDetour> .Deploy(); Debugger.Log("Building Themes: DistrictWorldInfoPanel Methods detoured!"); } catch (Exception e) { Debugger.LogException(e); } Debugger.Log("Building Themes: Mod successfully intialized."); } catch (Exception e) { Debugger.LogException(e); } }