public void ReverseParameterConsequence(profile_death_dataFeature profile_death_data) { SaveManager.instance.GetCurrentPlayerState().ModifyStat(EStat.HEALTH, Mathf.RoundToInt(-profile_death_data.profile_death_healthcare_value)); SaveManager.instance.GetCurrentPlayerState().ModifyStat(EStat.ECOLOGY, Mathf.RoundToInt(-profile_death_data.profile_death_ecology_value)); SaveManager.instance.GetCurrentPlayerState().ModifyStat(EStat.PROSPERITY, Mathf.RoundToInt(-profile_death_data.profile_death_prosperity_value)); SaveManager.instance.GetCurrentPlayerState().ModifyStat(EStat.PEACE, Mathf.RoundToInt(-profile_death_data.profile_death_peace_value)); SaveManager.instance.GetCurrentPlayerState().ModifyStat(EStat.HEALTH_DAILY, Mathf.RoundToInt(-profile_death_data.profile_death_healthcare_value)); SaveManager.instance.GetCurrentPlayerState().ModifyStat(EStat.ECOLOGY_DAILY, Mathf.RoundToInt(-profile_death_data.profile_death_ecology_value)); SaveManager.instance.GetCurrentPlayerState().ModifyStat(EStat.PROSPERITY_DAILY, Mathf.RoundToInt(-profile_death_data.profile_death_prosperity_value)); SaveManager.instance.GetCurrentPlayerState().ModifyStat(EStat.PEACE_DAILY, Mathf.RoundToInt(-profile_death_data.profile_death_peace_value)); ChaosGlobe.instance.MarkSituationDirty(); }
private void ApplyConsequence(profile_death_dataFeature profile_death_data) { profile_death_data.profile_death_instruction.CallScript(); for (int i = 0; i < profile_death_data.profile_death_disabler.Count; ++i) { template_profile disabledProfile = profile_death_data.profile_death_disabler[i] as template_profile; disabledProfile.Template.profile_basic_data.profile_is_enabled = false; SaveManager.instance.GetCurrentPlayerState().AddDisabledProfile(disabledProfile.Id); } for (int i = 0; i < profile_death_data.profile_death_enabler.Count; ++i) { template_profile enabledProfile = profile_death_data.profile_death_enabler[i] as template_profile; enabledProfile.Template.profile_basic_data.profile_is_enabled = true; SaveManager.instance.GetCurrentPlayerState().AddEnabledProfile(enabledProfile.Id); } Phone.instance.AddNewsText(profile_death_data.profile_death_news_first); Phone.instance.AddNewsText(profile_death_data.profile_death_news_second); Phone.instance.AddNewsText(profile_death_data.profile_death_news_third); }