public override void OnLevelLoaded(LoadMode mode) { base.OnLevelLoaded(mode); Debug.Log("[PropLineTool, hereafter PLT]: start PropLineToolMod.OnLevelLoaded"); m_loadMode = mode; m_onLevelLoadedCount++; Debug.Log("[PLT]: Build Version: " + BUILD_VERSION); string _ordinal = Util.OrdinalSuffix(m_onLevelLoadedCount); Debug.Log("[PLT]: PropLineToolMod.OnLevelLoaded(): This is the " + m_onLevelLoadedCount + _ordinal + " time this method has been called, and the LoadMode is " + mode.ToString() + "."); Debug.Log("[PLT]: PropLineToolMod.OnLevelLoaded(): ItemClass.Availabilty of TMC tool controller is " + ToolsModifierControl.toolController.m_mode.ToString() + "."); bool _initializeToolMan = false; _initializeToolMan = ToolMan.ToolMan.Initialize(); //PropLineTool Initialization PropLineTool.PopulateRandIntArray(0, 10000); if (_initializeToolMan == true) { Debug.Log("[PLT]: PropLineToolMod.OnLevelLoaded(): ToolMan.Initialize() returned true."); Debug.Log("[PLT]: PropLineToolMod.OnLevelLoaded(): Adding/Initializing UI components..."); if (optionPanel == null) { optionPanel = (UIView.GetAView().AddUIComponent(typeof(UIOptionPanel)) as UIOptionPanel); } if (basicControlPanel == null) { basicControlPanel = (UIView.GetAView().AddUIComponent(typeof(UIBasicControlPanel)) as UIBasicControlPanel); } Debug.Log("[PLT]: PropLineToolMod.OnLevelLoaded(): UI components addition/initialization finished."); //debug purposes only //UIView.library.ShowModal<ExceptionPanel>("ExceptionPanel").SetMessage("[DEBUG] Prop Line Tool [PLT] Success in Initialization", "Prop Line Tool succeeded in registering itself with the game's tool controllers!", false); } else { Debug.LogError("[PLT]: PropLineToolMod.OnLevelLoaded(): ToolMan.Initialize() returned false."); //special thanks to RushHour.Compatibility for this UIView.library.ShowModal <ExceptionPanel>("ExceptionPanel").SetMessage("Prop Line Tool [PLT] Failed to Initialize", "Prop Line Tool failed to register itself with the game's tool controllers. Please save your output_log from this game session and post a link to it on the workshop page for PLT.", true); } Debug.Log("[PLT]: end PropLineToolMod.OnLevelLoaded"); }
public static ICities.LoadMode GetLoadMode() { ICities.LoadMode mode = m_loadMode; return(mode); }