private void LoadEffects() { foreach (ModifierInfo modifierInfo in modifierInfos) { if (!effects.Exists(modifierInfo.Id) && (modifierInfo.Type == "Effect" || modifierInfo.Type == "Base" || modifierInfo.Type == "Need")) { string text = Strings.Get($"STRINGS.DUPLICANTS.MODIFIERS.{modifierInfo.Id.ToUpper()}.NAME"); string description = Strings.Get($"STRINGS.DUPLICANTS.MODIFIERS.{modifierInfo.Id.ToUpper()}.TOOLTIP"); Effect effect = new Effect(modifierInfo.Id, text, description, modifierInfo.Duration * 600f, modifierInfo.ShowInUI && modifierInfo.Type != "Need", modifierInfo.TriggerFloatingText, modifierInfo.IsBad, modifierInfo.EmoteAnim, modifierInfo.EmoteCooldown, modifierInfo.StompGroup); foreach (ModifierInfo modifierInfo2 in modifierInfos) { if (modifierInfo2.Id == modifierInfo.Id) { effect.Add(new AttributeModifier(modifierInfo2.Attribute, ConvertValue(modifierInfo2.Value, modifierInfo2.Units), text, modifierInfo2.Multiplier, false, true)); } } effects.Add(effect); } } Effect effect2 = new Effect("Ranched", STRINGS.CREATURES.MODIFIERS.RANCHED.NAME, STRINGS.CREATURES.MODIFIERS.RANCHED.TOOLTIP, 600f, true, true, false, null, 0f, null); effect2.Add(new AttributeModifier(Db.Get().CritterAttributes.Happiness.Id, 5f, STRINGS.CREATURES.MODIFIERS.RANCHED.NAME, false, false, true)); effect2.Add(new AttributeModifier(Db.Get().Amounts.Wildness.deltaAttribute.Id, -0.09166667f, STRINGS.CREATURES.MODIFIERS.RANCHED.NAME, false, false, true)); effects.Add(effect2); Effect effect3 = new Effect("EggSong", STRINGS.CREATURES.MODIFIERS.INCUBATOR_SONG.NAME, STRINGS.CREATURES.MODIFIERS.INCUBATOR_SONG.TOOLTIP, 600f, true, false, false, null, 0f, null); effect3.Add(new AttributeModifier(Db.Get().Amounts.Incubation.deltaAttribute.Id, 4f, STRINGS.CREATURES.MODIFIERS.INCUBATOR_SONG.NAME, true, false, true)); effects.Add(effect3); Reactable.ReactablePrecondition precon = delegate(GameObject go, Navigator.ActiveTransition n) { int cell = Grid.PosToCell(go); return(Grid.IsValidCell(cell) && Grid.IsGas(cell)); }; Effect effect4 = effects.Get("WetFeet"); effect4.AddEmotePrecondition(precon); Effect effect5 = effects.Get("SoakingWet"); effect5.AddEmotePrecondition(precon); }
public void GetterSuccess(string filePath) { var resource = rs.Get(rs.RelativeUri(filePath)); Assert.NotNull(resource); }