Remove the PlantAdjustAttribute "Prob" field and use the existing probability field from ReagentEffects instead.
[DataField]
public float Amount { get; protected set; } = 1;
- [DataField]
- public float Prob { get; protected set; } = 1; // = (80);
-
/// <summary>
/// Localisation key for the name of the adjusted attribute. Used for guidebook descriptions.
/// </summary>
|| mustHaveAlivePlant && (plantHolderComponent.Seed == null || plantHolderComponent.Dead))
return false;
- if (Prob >= 1f)
- return true;
-
- // Dependencies are never injected for reagents if you intend to do that for this.
- return !(Prob <= 0f) && IoCManager.Resolve<IRobustRandom>().Prob(Prob);
+ return true;
}
protected override string? ReagentEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys)
- !type:PlantAdjustHealth
amount: -0.5
- !type:PlantAdjustMutationMod
- prob: 0.3
+ probability: 0.3
amount: 0.4
metabolisms:
Medicine:
- !type:PlantAdjustNutrition
amount: 0.05
- !type:PlantAdjustWeeds
- prob: 0.025
+ probability: 0.025
amount: 1
- !type:PlantAdjustPests
- prob: 0.025
+ probability: 0.025
amount: 1
- !type:RobustHarvest {}
metabolisms:
- !type:PlantAdjustNutrition
amount: 0.1
- !type:PlantAdjustPests
- prob: 0.1
+ probability: 0.1
amount: -1
- !type:PlantAdjustHealth
amount: 0.1
- !type:PlantAffectGrowth
- prob: 0.2
+ probability: 0.2
amount: 1
- !type:PlantDiethylamine {}
metabolisms:
- !type:PlantAdjustHealth
amount: -1.5
- !type:PlantAdjustMutationMod
- prob: 0.2
+ probability: 0.2
amount: 0.1
metabolisms:
Poison: