Fix some mispredict reconciliation issues. (#6319)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
@@ -592,30 +592,31 @@ namespace Content.Server.Botany.Components
|
||||
|
||||
if (Dead)
|
||||
{
|
||||
appearanceComponent.SetData(PlantHolderVisuals.Plant,
|
||||
new SpriteSpecifier.Rsi(Seed.PlantRsi, "dead"));
|
||||
appearanceComponent.SetData(PlantHolderVisuals.PlantRsi, Seed.PlantRsi.ToString());
|
||||
appearanceComponent.SetData(PlantHolderVisuals.PlantState, "dead");
|
||||
}
|
||||
else if (Harvest)
|
||||
{
|
||||
appearanceComponent.SetData(PlantHolderVisuals.Plant,
|
||||
new SpriteSpecifier.Rsi(Seed.PlantRsi, "harvest"));
|
||||
appearanceComponent.SetData(PlantHolderVisuals.PlantRsi, Seed.PlantRsi.ToString());
|
||||
appearanceComponent.SetData(PlantHolderVisuals.PlantState, "harvest");
|
||||
}
|
||||
else if (Age < Seed.Maturation)
|
||||
{
|
||||
var growthStage = Math.Max(1, (int) ((Age * Seed.GrowthStages) / Seed.Maturation));
|
||||
appearanceComponent.SetData(PlantHolderVisuals.Plant,
|
||||
new SpriteSpecifier.Rsi(Seed.PlantRsi, $"stage-{growthStage}"));
|
||||
|
||||
appearanceComponent.SetData(PlantHolderVisuals.PlantRsi, Seed.PlantRsi.ToString());
|
||||
appearanceComponent.SetData(PlantHolderVisuals.PlantState, $"stage-{growthStage}");
|
||||
_lastProduce = Age;
|
||||
}
|
||||
else
|
||||
{
|
||||
appearanceComponent.SetData(PlantHolderVisuals.Plant,
|
||||
new SpriteSpecifier.Rsi(Seed.PlantRsi, $"stage-{Seed.GrowthStages}"));
|
||||
appearanceComponent.SetData(PlantHolderVisuals.PlantRsi, Seed.PlantRsi.ToString());
|
||||
appearanceComponent.SetData(PlantHolderVisuals.PlantState, $"stage-{Seed.GrowthStages}");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
appearanceComponent.SetData(PlantHolderVisuals.Plant, SpriteSpecifier.Invalid);
|
||||
appearanceComponent.SetData(PlantHolderVisuals.PlantState, "");
|
||||
appearanceComponent.SetData(PlantHolderVisuals.HealthLight, false);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user