Fix formatting warnings (#30122)
This commit is contained in:
@@ -24,7 +24,7 @@ namespace Content.Server.Botany.Components
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Name of a base seed prototype that is used if <see cref="Seed"/> is null.
|
/// Name of a base seed prototype that is used if <see cref="Seed"/> is null.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataField("seedId", customTypeSerializer:typeof(PrototypeIdSerializer<SeedPrototype>))]
|
[DataField("seedId", customTypeSerializer: typeof(PrototypeIdSerializer<SeedPrototype>))]
|
||||||
public string? SeedId;
|
public string? SeedId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,10 +2,8 @@ using Robust.Shared.Prototypes;
|
|||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
using Content.Shared.Random;
|
using Content.Shared.Random;
|
||||||
using Content.Shared.Random.Helpers;
|
using Content.Shared.Random.Helpers;
|
||||||
using Content.Shared.Chemistry.Reagent;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Content.Shared.Atmos;
|
using Content.Shared.Atmos;
|
||||||
using FastAccessors;
|
|
||||||
|
|
||||||
namespace Content.Server.Botany;
|
namespace Content.Server.Botany;
|
||||||
|
|
||||||
@@ -42,6 +40,7 @@ public sealed class MutationSystem : EntitySystem
|
|||||||
// Add up everything in the bits column and put the number here.
|
// Add up everything in the bits column and put the number here.
|
||||||
const int totalbits = 275;
|
const int totalbits = 275;
|
||||||
|
|
||||||
|
#pragma warning disable IDE0055 // disable formatting warnings because this looks more readable
|
||||||
// Tolerances (55)
|
// Tolerances (55)
|
||||||
MutateFloat(ref seed.NutrientConsumption , 0.05f, 1.2f, 5, totalbits, severity);
|
MutateFloat(ref seed.NutrientConsumption , 0.05f, 1.2f, 5, totalbits, severity);
|
||||||
MutateFloat(ref seed.WaterConsumption , 3f , 9f , 5, totalbits, severity);
|
MutateFloat(ref seed.WaterConsumption , 3f , 9f , 5, totalbits, severity);
|
||||||
@@ -75,6 +74,7 @@ public sealed class MutationSystem : EntitySystem
|
|||||||
MutateBool(ref seed.TurnIntoKudzu , true , 10, totalbits, severity);
|
MutateBool(ref seed.TurnIntoKudzu , true , 10, totalbits, severity);
|
||||||
MutateBool(ref seed.CanScream , true , 10, totalbits, severity);
|
MutateBool(ref seed.CanScream , true , 10, totalbits, severity);
|
||||||
seed.BioluminescentColor = RandomColor(seed.BioluminescentColor, 10, totalbits, severity);
|
seed.BioluminescentColor = RandomColor(seed.BioluminescentColor, 10, totalbits, severity);
|
||||||
|
#pragma warning restore IDE0055
|
||||||
|
|
||||||
// ConstantUpgade (10)
|
// ConstantUpgade (10)
|
||||||
MutateHarvestType(ref seed.HarvestRepeat, 10, totalbits, severity);
|
MutateHarvestType(ref seed.HarvestRepeat, 10, totalbits, severity);
|
||||||
@@ -261,7 +261,7 @@ public sealed class MutationSystem : EntitySystem
|
|||||||
{
|
{
|
||||||
var pick = _randomChems.Pick(_robustRandom);
|
var pick = _randomChems.Pick(_robustRandom);
|
||||||
string chemicalId = pick.reagent;
|
string chemicalId = pick.reagent;
|
||||||
int amount = _robustRandom.Next(1, ((int)pick.quantity));
|
int amount = _robustRandom.Next(1, (int)pick.quantity);
|
||||||
SeedChemQuantity seedChemQuantity = new SeedChemQuantity();
|
SeedChemQuantity seedChemQuantity = new SeedChemQuantity();
|
||||||
if (chemicals.ContainsKey(chemicalId))
|
if (chemicals.ContainsKey(chemicalId))
|
||||||
{
|
{
|
||||||
@@ -274,7 +274,7 @@ public sealed class MutationSystem : EntitySystem
|
|||||||
seedChemQuantity.Max = 1 + amount;
|
seedChemQuantity.Max = 1 + amount;
|
||||||
seedChemQuantity.Inherent = false;
|
seedChemQuantity.Inherent = false;
|
||||||
}
|
}
|
||||||
int potencyDivisor = (int) Math.Ceiling(100.0f / seedChemQuantity.Max);
|
int potencyDivisor = (int)Math.Ceiling(100.0f / seedChemQuantity.Max);
|
||||||
seedChemQuantity.PotencyDivisor = potencyDivisor;
|
seedChemQuantity.PotencyDivisor = potencyDivisor;
|
||||||
chemicals[chemicalId] = seedChemQuantity;
|
chemicals[chemicalId] = seedChemQuantity;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,12 +29,12 @@ public sealed class SeedExtractorSystem : EntitySystem
|
|||||||
return;
|
return;
|
||||||
if (!_botanySystem.TryGetSeed(produce, out var seed) || seed.Seedless)
|
if (!_botanySystem.TryGetSeed(produce, out var seed) || seed.Seedless)
|
||||||
{
|
{
|
||||||
_popupSystem.PopupCursor(Loc.GetString("seed-extractor-component-no-seeds",("name", args.Used)),
|
_popupSystem.PopupCursor(Loc.GetString("seed-extractor-component-no-seeds", ("name", args.Used)),
|
||||||
args.User, PopupType.MediumCaution);
|
args.User, PopupType.MediumCaution);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_popupSystem.PopupCursor(Loc.GetString("seed-extractor-component-interact-message",("name", args.Used)),
|
_popupSystem.PopupCursor(Loc.GetString("seed-extractor-component-interact-message", ("name", args.Used)),
|
||||||
args.User, PopupType.Medium);
|
args.User, PopupType.Medium);
|
||||||
|
|
||||||
QueueDel(args.Used);
|
QueueDel(args.Used);
|
||||||
|
|||||||
Reference in New Issue
Block a user