Example #1
0
        /// <summary>Enables the citizen info panel customization. Can return null on failure.</summary>
        /// <param name="residentAI">The custom resident AI.</param>
        /// <param name="localizationProvider">The localization provider to use for text translation.</param>
        /// <returns>An instance of the <see cref="CustomCitizenInfoPanel"/> object that can be used for disabling
        /// the customization, or null when the customization fails.</returns>
        public static CustomCitizenInfoPanel Enable(RealTimeResidentAI <ResidentAI, Citizen> residentAI, ILocalizationProvider localizationProvider)
        {
            var result = new CustomCitizenInfoPanel(GameInfoPanelName, residentAI, localizationProvider);

            return(result.Initialize() ? result : null);
        }